import { parseSse } from "./sse.js"; import type { AskOptions, AskResponse, BridgesResponse, CorroboratedResponse, DistinctionReceiptOptions, DistinctionReceiptResponse, EntityResponse, IdeaAtom, LivingResponse, OpportunitiesResponse, PriorArtResponse, Stats, StreamEvent, } from "./types.js"; export const SDK_VERSION = "0.67.0"; export interface CommonsClientOptions { /** Base URL of `commons serve`, e.g. `http://localhost:8788`. */ baseUrl: string; /** Optional fetch override (tests / custom agents). */ fetch?: typeof fetch; } function flag(v: boolean | undefined): string | undefined { if (v === undefined) return undefined; return v ? "1" : "0"; } export class CommonsError extends Error { readonly status: number; readonly body: string; constructor(status: number, body: string) { super(`commons HTTP ${status}: ${body.slice(0, 200)}`); this.name = "CommonsError"; this.status = status; this.body = body; } } /** Typed client for the commons HTTP API (see `/openapi.yaml`). */ export class CommonsClient { readonly baseUrl: string; private readonly fetchImpl: typeof fetch; constructor(opts: CommonsClientOptions) { this.baseUrl = opts.baseUrl.replace(/\/+$/, ""); const customFetch = opts.fetch; this.fetchImpl = customFetch ? (input, init) => customFetch(input, init) : (input, init) => globalThis.fetch(input, init); } /** Build a GET URL with query params (exported for unit tests). */ url(path: string, params: Record): string { const u = new URL(path, this.baseUrl.endsWith("/") ? this.baseUrl : this.baseUrl + "/"); // Absolute path on the server u.pathname = path.startsWith("/") ? path : `/${path}`; for (const [k, v] of Object.entries(params)) { if (v === undefined || v === "") continue; u.searchParams.set(k, String(v)); } return u.toString(); } private async getJson(path: string, params: Record, signal?: AbortSignal): Promise { const res = await this.fetchImpl(this.url(path, params), { signal }); const text = await res.text(); if (!res.ok) throw new CommonsError(res.status, text); return JSON.parse(text) as T; } private async postJson(path: string, body: unknown, signal?: AbortSignal): Promise { const res = await this.fetchImpl(this.url(path, {}), { method: "POST", headers: { "Content-Type": "application/json", Accept: "application/json" }, body: JSON.stringify(body), signal, }); const text = await res.text(); if (!res.ok) throw new CommonsError(res.status, text); return (text.trim() ? JSON.parse(text) : {}) as T; } stats(signal?: AbortSignal): Promise { return this.getJson("/api/stats", {}, signal); } /** * Ask the commons. **Streaming is the default** (`stream: true`): hits arrive * in the `meta` event and the answer is collected from `token` events. * Pass `{ stream: false }` for a single buffered `/api/ask` JSON response. */ async ask(query: string, opts: AskOptions = {}): Promise { const stream = opts.stream !== false; if (!stream) { return this.getJson( "/api/ask", { q: query, top: opts.top, mode: opts.mode, dense: flag(opts.dense), rerank: flag(opts.rerank), synth: flag(opts.synth), }, opts.signal, ); } const { meta, answer } = await this.askStreamCollect(query, opts); if (!meta) { return { mode: "SPECIFIC", mode_source: "default", query, hits: [], answer: answer || undefined, }; } if (answer && !meta.answer) meta.answer = answer; else if (answer && meta.answer !== answer) meta.answer = answer; return meta; } /** * SSE ask: yields `meta` (AskResponse), then `token` chunks, then `done`. * Buffers the full stream (commons serve is one-shot tiny_http), then yields. */ async *askStream(query: string, opts: AskOptions = {}): AsyncGenerator { const res = await this.fetchImpl( this.url("/api/ask/stream", { q: query, top: opts.top, mode: opts.mode, dense: flag(opts.dense), rerank: flag(opts.rerank), }), { signal: opts.signal, headers: { Accept: "text/event-stream" } }, ); const text = await res.text(); if (!res.ok) throw new CommonsError(res.status, text); yield* parseSse(text); } /** Collect tokens from {@link askStream} into one answer string (+ meta). */ async askStreamCollect( query: string, opts: AskOptions = {}, ): Promise<{ meta: AskResponse | null; answer: string }> { let meta: AskResponse | null = null; let answer = ""; for await (const ev of this.askStream(query, opts)) { if (ev.event === "meta") meta = ev.data as AskResponse; else if (ev.event === "token") { const t = (ev.data as { text?: string })?.text ?? ""; answer += t; } } return { meta, answer }; } corroborated(opts: { min?: number; n?: number; signal?: AbortSignal } = {}): Promise { return this.getJson( "/api/corroborated", { min: opts.min, n: opts.n }, opts.signal, ); } bridges(signal?: AbortSignal): Promise { return this.getJson("/api/bridges", {}, signal); } /** Browse one concept by stable `id` or surface `label`. Paged: follow `next_offset`. */ entity( opts: { id?: string; label?: string; offset?: number; limit?: number; signal?: AbortSignal }, ): Promise { return this.getJson( "/api/entity", { id: opts.id, label: opts.label, offset: opts.offset, limit: opts.limit }, opts.signal, ); } /** Every grounded idea for a concept, walking `next_offset` pages. */ async *entityIdeas( opts: { id?: string; label?: string; pageSize?: number; signal?: AbortSignal }, ): AsyncGenerator { let offset: number | null = 0; while (offset !== null) { const page: EntityResponse = await this.entity({ id: opts.id, label: opts.label, offset, limit: opts.pageSize ?? 100, signal: opts.signal, }); yield* page.ideas; offset = page.next_offset ?? null; } } /** When was an idea first disclosed publicly — chronological (`GET /api/prior-art`). */ priorArt( query: string, opts: { n?: number; signal?: AbortSignal } = {}, ): Promise { return this.getJson("/api/prior-art", { q: query, n: opts.n }, opts.signal); } /** Frontier concepts adjacent to a topic (contested / emerging / breadth). */ opportunities( query: string, opts: { n?: number; top?: number; signal?: AbortSignal } = {}, ): Promise { return this.getJson( "/api/opportunities", { q: query, n: opts.n, top: opts.top }, opts.signal, ); } /** One grounded idea — the encoding unit (`GET /api/idea`). */ idea(id: string, opts: { signal?: AbortSignal } = {}): Promise { return this.getJson("/api/idea", { id }, opts.signal); } /** Newest ideas in the commons (`GET /api/living`). */ living( opts: { n?: number; modality?: "spoken" | "written"; signal?: AbortSignal } = {}, ): Promise { return this.getJson( "/api/living", { n: opts.n, modality: opts.modality }, opts.signal, ); } /** Fetch the live OpenAPI document (`GET /openapi.yaml`). */ async openapiYaml(signal?: AbortSignal): Promise { const res = await this.fetchImpl(this.url("/openapi.yaml", {}), { signal }); const text = await res.text(); if (!res.ok) throw new CommonsError(res.status, text); return text; } /** Sub-ms shared L0 competence crystals & negative-space dead-end guardrails (`GET /api/ecosystem/agent-context`). */ l0Context(task: string, signal?: AbortSignal): Promise> { return this.getJson("/api/ecosystem/agent-context", { task }, signal); } /** Zero-rewrite OpenAI-compatible chat completion (`POST /v1/chat/completions`). */ chatCompletions( promptOrMessages: string | Array<{ role: string; content: string }>, opts: { model?: string; signal?: AbortSignal } = {}, ): Promise> { const messages = typeof promptOrMessages === "string" ? [{ role: "user", content: promptOrMessages }] : promptOrMessages; return this.postJson( "/v1/chat/completions", { model: opts.model ?? "scholar-grounded", messages, stream: false }, opts.signal, ); } /** Deterministic 384-D OpenAI-compatible embeddings (`POST /v1/embeddings`). */ embeddings( input: string | string[], opts: { model?: string; signal?: AbortSignal } = {}, ): Promise> { return this.postJson( "/v1/embeddings", { model: opts.model ?? "scholar-embed-384", input }, opts.signal, ); } /** Google / Linux Foundation A2A 1.0 task execution (`POST /a2a` `message/send`). */ a2aSend( text: string, opts: { skillId?: string; signal?: AbortSignal } = {}, ): Promise> { return this.postJson( "/a2a", { jsonrpc: "2.0", id: 1, method: "message/send", params: { skillId: opts.skillId ?? "commons_ask", message: { role: "user", parts: [{ kind: "text", text }] }, }, }, opts.signal, ); } /** Linux Foundation REST Agent Communication Protocol (`POST /acp/runs`). */ acpRun(prompt: string, signal?: AbortSignal): Promise> { return this.postJson( "/acp/runs", { agent_name: "commons-scholar", input: [{ role: "user", parts: [{ content_type: "text/plain", content: prompt }] }], }, signal, ); } /** Fetch ready-to-pass function-calling tool schemas (`openai` | `anthropic` | `gemini`). */ toolpack( provider: "openai" | "anthropic" | "gemini" = "openai", signal?: AbortSignal, ): Promise { return this.getJson(`/api/tools/${provider}.json`, {}, signal); } /** Direct REST webhook invocation of any of the 59 Scholar MCP tools (`POST /api/tools/invoke`). */ invokeTool( name: string, args: Record = {}, signal?: AbortSignal, ): Promise> { return this.postJson("/api/tools/invoke", { name, arguments: args }, signal); } /** Query or POST to any `/api/reference/` solver, forge, ontology, or multimodal video engine. */ reference>( slug: string, opts: { q?: string; body?: unknown; signal?: AbortSignal } = {}, ): Promise { const clean = slug.replace(/^\/+|\/+$/g, ""); if (opts.body !== undefined) { return this.postJson(`/api/reference/${clean}`, opts.body, opts.signal); } return this.getJson(`/api/reference/${clean}`, { q: opts.q }, opts.signal); } ontologySpine(q = "thermodynamic", body?: unknown): Promise> { return this.reference("ontology-spine", { q, body }); } cospanOde(q = "seihr", body?: unknown): Promise> { return this.reference("categorical-ode", { q, body }); } videoHubIngest(q = "", body?: unknown): Promise> { return this.reference("video-hub-ingest", { q, body }); } omniVideoAlign(q = "", body?: unknown): Promise> { return this.reference("omni-video-align", { q, body }); } c2paProvenance(q = "", body?: unknown): Promise> { return this.reference("c2pa-provenance", { q, body }); } videoMoatEconomics(q = "", body?: unknown): Promise> { return this.reference("video-moat-economics", { q, body }); } trainingCommons(q = "", body?: unknown): Promise> { return this.reference("training-commons", { q, body }); } scalingPruning(q = "", body?: unknown): Promise> { return this.reference("scaling-pruning", { q, body }); } federatedSuperlearner(q = "", body?: unknown): Promise> { return this.reference("federated-superlearner", { q, body }); } tufazipCodec(q = "", body?: unknown): Promise> { return this.reference("tufazip-codec", { q, body }); } compressionBenchmark(q = "", body?: unknown): Promise> { return this.reference("compression-benchmark", { q, body }); } wai1TufaArchive(q = "", body?: unknown): Promise> { return this.reference("wai1-tufa-archive", { q, body }); } multimodalMdlScheduler(q = "", body?: unknown): Promise> { return this.reference("multimodal-mdl-scheduler", { q, body }); } scholarBench(q = "", body?: unknown): Promise> { return this.reference("scholar-bench", { q, body }); } scholarBenchLeaderboard(q = ""): Promise> { return this.getJson("/api/reference/scholar-bench", { mode: "leaderboard", q }); } waldenLineage(q = "", body?: unknown): Promise> { return this.reference("walden-lineage", { q, body }); } sdkRegistry(signal?: AbortSignal): Promise> { return this.getJson("/api/reference/sdk-registry", {}, signal); } /** Audit a `.bib` BibTeX string, DOI list, or structured `{ refs, claims, artifact_name }` payload (`POST /api/truth-lock/audit`). */ truthLockAudit( refsOrPayload: string | { refs?: string | string[]; claims?: string[]; artifact_name?: string; q?: string }, signal?: AbortSignal, ): Promise> { const body = typeof refsOrPayload === "string" ? { refs: refsOrPayload } : refsOrPayload; return this.postJson("/api/truth-lock/audit", body, signal); } /** Search local + OpenAlex CC0 scholarly works (`GET /api/works`). */ works( query: string, opts: { partner?: boolean; n?: number; signal?: AbortSignal } = {}, ): Promise> { return this.getJson("/api/works", { q: query, partner: flag(opts.partner ?? true), n: opts.n }, opts.signal); } /** List all 8 Scholar Ecosystem Channels (`GET /api/channels`). */ channels(opts: { q?: string; signal?: AbortSignal } = {}): Promise> { return this.getJson("/api/channels", { q: opts.q }, opts.signal); } /** Fetch one ecosystem channel (`science`, `patents`, `math`, `biology`, `chemistry`, `stem`, `art`, `radio-tv`). */ channel( slug: string, opts: { q?: string; limit?: number; signal?: AbortSignal } = {}, ): Promise> { const clean = slug.replace(/^\/+|\/+$/g, ""); return this.getJson(`/api/channels/${clean}`, { q: opts.q, limit: opts.limit }, opts.signal); } /** Fetch Watch/Listen stage metadata, timestamped claims & 32-bin Epistemic Danmaku curve (`GET /api/watch`). */ watch( opts: { mediaId?: string; url?: string; channel?: string; signal?: AbortSignal }, ): Promise> { return this.getJson("/api/watch", { v: opts.mediaId, url: opts.url, ch: opts.channel }, opts.signal); } /** Mint a Scholar x JouleDB Price-Per-Distinction receipt (`GET /api/jouledb/distinction`). */ jouledbDistinction( query: string, opts: { top?: number; signal?: AbortSignal } = {}, ): Promise> { return this.getJson("/api/jouledb/distinction", { q: query, top: opts.top }, opts.signal); } /** Fetch cross-repo JCR-1 COSE_Sign1 Price-Per-Distinction receipt (`GET /api/distinction-receipt`). */ distinctionReceipt( query: string, opts: DistinctionReceiptOptions = {}, ): Promise { return this.getJson("/api/distinction-receipt", { q: query, top: opts.top ?? 8 }, opts.signal); } /** Alias for distinctionReceipt (`scholar_price_per_distinction` -> `GET /api/distinction-receipt`). */ pricePerDistinction( query: string, opts: DistinctionReceiptOptions = {}, ): Promise { return this.distinctionReceipt(query, opts); } /** Snake_case alias for pricePerDistinction (`GET /api/distinction-receipt`). */ price_per_distinction( query: string, top = 8, signal?: AbortSignal, ): Promise { return this.distinctionReceipt(query, { top, signal }); } /** Inspect 10,240-bit Amorphic VSA hologram & 37-attractor basin (`GET /api/jouledb/amorphic`). */ jouledbAmorphic(query = "reversible computing", signal?: AbortSignal): Promise> { return this.getJson("/api/jouledb/amorphic", { q: query }, signal); } /** Map OpenIE Research Radio, TV & Bilibili seams (`GET /api/jouledb/seams`). */ jouledbSeams(seam = "all", signal?: AbortSignal): Promise> { return this.getJson("/api/jouledb/seams", { seam }, signal); } /** Audit the persistent Merkle Joule Ledger (`GET /api/jouledb/ledger`). */ jouledbLedger(signal?: AbortSignal): Promise> { return this.getJson("/api/jouledb/ledger", {}, signal); } /** Inspect cryptographic Ed25519 handle lock & BLAKE3 audit root (`GET /api/identity/`). */ identity(handle: string, signal?: AbortSignal): Promise> { const clean = handle.trim().replace(/^@+/, ""); return this.getJson(`/api/identity/${clean}`, {}, signal); } /** Claim a zero-password Ed25519 @handle (`POST /api/identity/claim`). */ claimIdentity( body: { handle: string; pubkey_hex: string; sig_hex: string; display_name?: string }, signal?: AbortSignal, ): Promise> { return this.postJson("/api/identity/claim", body, signal); } /** List interactive Science/Math/Bio/Chem/Patent/Art capsules (`GET /api/capsules`). */ capsules( opts: { ecosystem?: string; handle?: string; signal?: AbortSignal } = {}, ): Promise> { return this.getJson("/api/capsules", { ecosystem: opts.ecosystem, handle: opts.handle }, opts.signal); } /** Fetch creator or lab channel JSON (`GET /api/u/`). */ creatorChannel(handle: string, signal?: AbortSignal): Promise> { const clean = handle.trim().replace(/^@+/, ""); return this.getJson(`/api/u/${clean}`, {}, signal); } /** Fetch signed §102 defensive prior-art disclosure JSON (`GET /api/disclosure/`). */ disclosure(cid: string, signal?: AbortSignal): Promise> { const clean = cid.replace(/^\/+|\/+$/g, ""); return this.getJson(`/api/disclosure/${clean}`, {}, signal); } /** Deploy an opaque-origin CSP-sandboxed interactive HTML5/Wasm capsule (`POST /api/publish/capsule`). */ publishCapsule(body: Record, signal?: AbortSignal): Promise> { return this.postJson("/api/publish/capsule", body, signal); } /** Deposit a signed §102 defensive prior-art disclosure (`POST /api/publish/disclosure`). */ publishDisclosure(body: Record, signal?: AbortSignal): Promise> { return this.postJson("/api/publish/disclosure", body, signal); } /** Deploy a Podcast RSS or lecture media stream (`POST /api/publish/feed`). */ publishFeed(body: Record, signal?: AbortSignal): Promise> { return this.postJson("/api/publish/feed", body, signal); } /** Fetch the 64-element Minimum Basis Nucleus (`N64`) catalog & Crucible summary (`GET /api/nucleus`). */ codingNucleus( opts: { stratum?: string; full?: boolean; signal?: AbortSignal } = {}, ): Promise> { return this.getJson( "/api/nucleus", { stratum: opts.stratum, full: opts.full ? "1" : undefined }, opts.signal, ); } /** Snake_case alias for codingNucleus (`GET /api/nucleus`). */ coding_nucleus(stratum = "", full = false, signal?: AbortSignal): Promise> { return this.codingNucleus({ stratum: stratum || undefined, full, signal }); } /** Decompose source code into its 64-bit `NucleusFootprint(u64)` & JouleDB receipt (`POST /api/nucleus/decompose`). */ nucleusDecompose( code: string, lang = "rust", signal?: AbortSignal, ): Promise> { return this.postJson("/api/nucleus/decompose", { code, lang }, signal); } /** Run unprompted multi-file `SWE-sweep` defect discovery (`POST /api/nucleus/sweep`). */ nucleusSweep( files: Array<{ path: string; content: string }>, signal?: AbortSignal, ): Promise> { return this.postJson("/api/nucleus/sweep", { files }, signal); } /** Run unprompted `SWE-sweep` + Copy-on-Write (`CoW`) auto-repair (`POST /api/nucleus/repair`). */ nucleusRepair( files: Array<{ path: string; content: string }>, signal?: AbortSignal, ): Promise> { return this.postJson("/api/nucleus/repair", { files }, signal); } /** Lift legacy `COBOL`, `Fortran`, `C89`, or `PL/SQL` source to `N64` `Form` + safe Rust (`POST /api/nucleus/legacy-lift`). */ legacyLift( code: string, dialect = "", signal?: AbortSignal, ): Promise> { return this.postJson("/api/nucleus/legacy-lift", { code, dialect: dialect || undefined }, signal); } /** Fetch 8-Station Gate-First Software Factory catalog & `SAP-F1..SAP-F8` falsifier ledger (`GET /api/factory`). */ softwareFactory(signal?: AbortSignal): Promise> { return this.getJson("/api/factory", {}, signal); } /** Execute closed-loop Research-Search-Coding Triad (`POST /api/factory/run`). */ softwareFactoryRun( body: { spec?: string; code?: string; dialect?: string; files?: Array<{ path: string; content: string }> }, signal?: AbortSignal, ): Promise> { return this.postJson("/api/factory/run", body, signal); } /** Fetch 22-system Post-Git & Game-VCS audit catalog & `ucb-vcs` scorecard (`GET /api/vcs`). */ postGitVcs(tribe = "", signal?: AbortSignal): Promise> { return this.getJson("/api/vcs", tribe ? { tribe } : {}, signal); } /** Simulate `OFPN` Prolly-Merkle merge vs. `Git diff3`, `48 B FastCDC` obliteration & `Lore` Gatekeeper (`POST /api/vcs/simulate`). */ postGitVcsSimulate( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/vcs/simulate", body, signal); } /** Fetch 12-system Non-LLM synthesis landscape & `ucb-kepler` scorecard (`GET /api/kepler`). */ keplerZeroLlm(era = "", signal?: AbortSignal): Promise> { return this.getJson("/api/kepler", era ? { era } : {}, signal); } /** Synthesize verified Rust/Python/C99 + 4 KB SECDED `LUT6` circuit with 0 LLM tokens (`POST /api/kepler/synthesize`). */ keplerSynthesize( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/kepler/synthesize", body, signal); } /** Fetch 22 compute fabrics, 48 unsiloed languages & Cleanroom SOC2 catalog (`GET /api/omni`). */ omniCleanroom(family = "", signal?: AbortSignal): Promise> { return this.getJson("/api/omni", family ? { family } : {}, signal); } /** Compile & silicon-emulate an N64 kernel across ARM64, x86-64 & RV64IM (`POST /api/omni/compile`). */ omniCompile( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/omni/compile", body, signal); } /** Fetch 24 software ecosystems & 4 canonical 5-plane certified app blueprints (`GET /api/blueprint`). */ appBlueprint(camp = "", signal?: AbortSignal): Promise> { return this.getJson("/api/blueprint", camp ? { camp } : {}, signal); } /** Verify all 5 planes & eject zero-lock-in SQL+RLS, Rust, TypeScript & Python (`POST /api/blueprint/compile`). */ appBlueprintCompile( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/blueprint/compile", body, signal); } /** Fetch 18 audited DST, formal policy & autonomous SRE platforms (`GET /api/flight`). */ flightSre(camp = "", signal?: AbortSignal): Promise> { return this.getJson("/api/flight", camp ? { camp } : {}, signal); } /** Run seeded VOPR cluster simulation, ddmin shrinking & Zero-Token SRE self-healing (`POST /api/flight/simulate`). */ flightSimulate( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/flight/simulate", body, signal); } /** Fetch 18 audited Design-to-Code, accessibility, local-first sync & supply-chain platforms (`GET /api/surface`). */ surfaceSync(camp = "", signal?: AbortSignal): Promise> { return this.getJson("/api/surface", camp ? { camp } : {}, signal); } /** Verify WCAG 2.2 AA, anti-slop hierarchy, RLS sync shapes & supply chain, and eject 4 UI stacks (`POST /api/surface/compile`). */ surfaceCompile( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/surface/compile", body, signal); } /** Fetch Coalgebraic Form, 855 Linguist targets, 270 Constellation grammars, 6 predicted fabric dialects & Cleanroom scorecard (`GET /api/form`). */ formCleanroom(signal?: AbortSignal): Promise> { return this.getJson("/api/form", {}, signal); } /** Verify lossless SHA-256 Form capsule, 4-ISA + Wasm32 RCE-Compile normal form, and cleanroom-receipt/1 + shunt meter gate (`POST /api/form/verify`). */ formVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/form/verify", body, signal); } /** Fetch Hourglass v1.0.0 scorecard, 6 Wave-9 Lean 4.36 kernels, 5 sovereign targets (+WGSL) & 182-row R-GATE matrix (`GET /api/hourglass`). */ hourglassV1(signal?: AbortSignal): Promise> { return this.getJson("/api/hourglass", {}, signal); } /** Verify zero-axiom Lean 4.36 extraction, WebGPU WGSL W-GRP-1..3 shader, 4,352-bit Kulisch superaccumulator, Cinder SLS & cleanroom-receipt/1 seal (`POST /api/hourglass/verify`). */ hourglassVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/hourglass/verify", body, signal); } /** Fetch UCB v1.1.0 Cospan Interfaces scorecard, 7-entry interface economics ledger, N=64 MDL optimality & Lux A2UI catalog (`GET /api/cospan`). */ cospanInterfaces(signal?: AbortSignal): Promise> { return this.getJson("/api/cospan", {}, signal); } /** Verify SI dimensional cospan port handoffs, Vest non-malleable wire combinators, WIT linear handles, JouleContract v0.8.0, WCA/AP2/x402 & Lux A2UI (`POST /api/cospan/verify`). */ cospanVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/cospan/verify", body, signal); } /** Fetch UCB v1.2.0 R1-R5 Fabric Utilization scorecard, 22 fabrics, Jetson Thor TI INA3221 shunt receipts & Lean 4.36 N=64 MDL proof summary (`GET /api/fabric`). */ fabricR1R5(signal?: AbortSignal): Promise> { return this.getJson("/api/fabric", {}, signal); } /** Verify R1-R5 RTOS/SDF/cache/ISO-15066 safety, HierFormJepa R-PROPOSER airlock, edit-time LSP, Cleanroom R-PRICE-1 & Lean 4.36 N=64 MDL proof (`POST /api/fabric/verify`). */ fabricVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/fabric/verify", body, signal); } /** Fetch UCB v1.3.0 Open-Standards catalog (`GET /api/standards`). */ openStandards(signal?: AbortSignal): Promise> { return this.getJson("/api/standards", {}, signal); } /** Verify JouleSpec v0.3, JCP v0.3, Sandbox v0.1 C16, ARL v1.4 Fisher-Holm, SATB & WebDSA v0.1 (`POST /api/standards/verify`). */ standardsVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/standards/verify", body, signal); } /** Fetch UCB v1.4.0 24/24 Open-Standards closure catalog (`GET /api/substrate`). */ substrate24(signal?: AbortSignal): Promise> { return this.getJson("/api/substrate", {}, signal); } /** Verify JoulePlan v0.1, Pool/Mesh, JouleTable/Sense, Cleanroom Plant2 & Task Satiation (`POST /api/substrate/verify`). */ substrateVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/substrate/verify", body, signal); } /** Fetch UCB v1.5.0 20-crate Liquid Silicon, fpos, VAULT16, CAD/MathGround & WAI2 catalog (`GET /api/silicon`). */ liquidSilicon(signal?: AbortSignal): Promise> { return this.getJson("/api/silicon", {}, signal); } /** Verify fpos Derive, Phase-6 Liquid Silicon, VAULT16/MLT1, CAD/SKY130 & WAI2 (`POST /api/silicon/verify`). */ liquidSiliconVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/silicon/verify", body, signal); } /** Fetch UCB v1.6.0 21-crate Quantum LRAT, Post-Layout SPICE, QF_BV/Xylo, MoQ & 302-grammar catalog (`GET /api/quantum`). */ quantumSpice(signal?: AbortSignal): Promise> { return this.getJson("/api/quantum", {}, signal); } /** Verify wai-quantum DEM/LRAT & QIR PPM, Post-Layout 46,918-MOSFET SPICE, QF_BV/Xylo & MoQ/MIH (`POST /api/quantum/verify`). */ quantumVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/quantum/verify", body, signal); } /** Fetch UCB v1.7.0 22-crate Formulaic Dreaming, Dynamic PEC/Pauli, Space Rad-Hard/DMA, DBSP & 318-grammar catalog (`GET /api/dreaming`). */ formulaicDreaming(signal?: AbortSignal): Promise> { return this.getJson("/api/dreaming", {}, signal); } /** Verify Study #33 FDM-6TIER-v1, Dynamic PEC/Pauli, 12T DICE/TMR/DMA & DBSP/PLZ22 (`POST /api/dreaming/verify`). */ dreamingVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/dreaming/verify", body, signal); } /** Fetch UCB v1.9.0 / HANDOFF v1.8.0 23-crate BondWord(u32), ucb-arrive, Landauer-40, Landed(m, L) & Quotient QEC catalog (`GET /api/bonding`). */ ucbBonding(signal?: AbortSignal): Promise> { return this.getJson("/api/bonding", {}, signal); } /** Verify 4-bond molecule DAG, homomorphic Landed(m, L) surface round-trip, non-mixed shunt receipts & bb:144 QEC (`POST /api/bonding/verify`). */ bondingVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/bonding/verify", body, signal); } /** Fetch UCB v2.0.0 24-crate Three-Body Solution, Landauer v3 (selected23), Felleisen, Perm-CSS, Weyl/Boson, picture-dct/2 & SuRF catalog (`GET /api/threebody`). */ ucbThreebody(signal?: AbortSignal): Promise> { return this.getJson("/api/threebody", {}, signal); } /** Verify UCB v2.0.0 Three-Body scorecard, CallTargetSemanticResolver, from_dem parity/L0 gate, picture-dct/2 & SuRF (`POST /api/threebody/verify`). */ threebodyVerify( body: Record, signal?: AbortSignal, ): Promise> { return this.postJson("/api/threebody/verify", body, signal); } }