{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum-cli/schemas/local-tools.v1.json", "title": "wai.quantum.local-tools/1", "description": "The answers of the local MCP server's own tools (wai-quantum mcp), those the command line writes beside the engine's: a receipt's check, the workbench archive's submissions, a program's history, the person's taste, and the person's own providers. Each is a $def; every tool's outputSchema in tools/list is its answer's schema standing alone. The engine's answers are in wai-quantum's schemas.", "$defs": { "verify": { "description": "Whether a job's receipt seals its request and its result, and the key that signed it; for an estimate, also every estimate's receipt and the request re-run here; for an answer of the variational and algorithm library, also its digest chain and the answer re-run here; for a wasmQ job, also its body and its form (extensions/quantum-wasmq.md §6.5).", "anyOf": [ { "type": "object", "description": "Whether a job's receipt seals its request and its result and every rule of its form holds, and the key that signed it.", "required": [ "valid", "key" ], "properties": { "valid": { "type": "boolean" }, "reasons": { "type": "array", "items": { "type": "string" }, "description": "Each rule the receipt breaks (the provider protocol's section 8.4, wasmq_form among them for a wasmQ job): and section 8.8's when the receipt is held to a trust list or a time: none when it is valid." }, "form": { "type": [ "string", "null" ], "description": "The receipt's form: rfc8785, or first." }, "provider": { "type": "object", "description": "For a provider's result, what it says of itself." }, "compile": { "type": "object", "description": "For a sealed compile, or a job that ran compiled and carries its certificate's chain (wai/extensions/quantum-compile.md section 6): what a second look at the certificate found. again is reproduced (compiled again here, the request gives this certificate byte for byte), partly (not reproduced; the output was held to the program here by a tableau, in exact arithmetic or on dense unitaries, and whole says which), host_statement (its form holds, and nothing more could be decided here) or differs (not the certificate the request bears out: the job is then not valid, though its seal holds; differences says why).", "required": [ "again", "form", "passes", "differences", "why" ], "properties": { "again": { "enum": [ "reproduced", "partly", "host_statement", "differs" ] }, "form": { "enum": [ "chained", "earlier" ], "description": "chained: every pass names its digests, its layer and its distance. earlier: sealed before certificates carried them." }, "layer": { "type": [ "string", "null" ], "description": "The layer the whole compile stands on, as the certificate states it." }, "weakest": { "type": [ "string", "null" ], "description": "The weakest layer among its passes' checks, as the certificate states it." }, "passes": { "type": "integer", "minimum": 0 }, "differences": { "type": "array", "items": { "type": "string" } }, "why": { "type": "string" }, "whole": { "type": "object", "description": "With partly: the check of the whole output against the whole program made here, its layer among it." } } }, "equivalence": { "type": "object", "description": "For a job whose result seals the equivalence checker's verdict on the program it ran compiled (a provider's compiled.equivalence, a device target's target.compiled.equivalence): that verdict decided again here from what the receipt holds, within the budget it names. again is agrees or differs; here is the verdict decided here (null where the receipt holds nothing to decide it from). A program refuted here did not run the request's program, and a sealed verdict the receipt does not bear out is not taken: either way the job is not valid, though its seal holds. An undecided verdict is stated as it is and never taken as proved.", "required": ["again", "sealed", "why", "here"], "properties": { "again": { "enum": ["agrees", "differs"] }, "sealed": { "enum": ["proved", "refuted", "undecided"] }, "why": { "type": "string" }, "here": { "type": ["object", "null"], "description": "The verdict decided here, in the form of job-result.v1.json's compiled.equivalence." } } }, "key": { "type": [ "string", "null" ], "description": "The signing key, 32 bytes in hex." }, "signer": { "type": [ "string", "null" ], "description": "That key as a did:key." }, "answer": { "type": "object", "description": "For a job whose result seals the engine's verdict of its answer (the provider protocol's section 8.9): the verdict worked out again here. Its level, whether it holds, the layer that decided it with that layer's limits, the result's accuracy class, and again: reproduced, partly, host_statement (nothing of it could be worked out again here: it is the host's statement under its seal) or differs (not the verdict the job bears out: the job is then not valid, though its seal holds).", "required": [ "level", "holds", "layer", "again", "checks", "differences", "statement" ], "properties": { "schema": { "const": "wai.quantum.verdict/1" }, "level": { "type": "string" }, "holds": { "type": [ "boolean", "null" ] }, "layer": { "type": "string" }, "limits": { "type": "string" }, "accuracy": { "type": [ "string", "null" ] }, "again": { "enum": [ "reproduced", "partly", "host_statement", "differs" ] }, "checks": { "type": "array", "items": { "type": "object" } }, "differences": { "type": "array", "items": { "type": "string" } }, "statement": { "type": "string" } } }, "planner": { "type": "object", "description": "For a job under a contract, what its reasoning says: the route chosen, the class wanted and given, whether the choice depends on the host, what was kept, and the shadow." }, "recheck": { "type": "object", "description": "With recheck: whether the routes priced again and the shadow run again are what the job sealed.", "properties": { "holds": { "type": "boolean" }, "engine": { "type": "object" }, "priced": { "type": "object" }, "shadow": { "type": "object" } } }, "wasmq": { "type": "object", "description": "For a wasmQ job (quantum-wasmq section 6.5), beside the verdict: how the run ended, each rule of the profile's form it breaks, and where the host's unsealed words differ from what is sealed, which change no verdict.", "required": [ "outcome", "problems", "notes" ], "additionalProperties": false, "properties": { "outcome": { "type": [ "string", "null" ], "description": "The sealed result's status: ok, or fault." }, "problems": { "type": "array", "items": { "type": "string" }, "description": "Each rule of quantum-wasmq section 6.5 the job breaks, in words (the reason wasmq_form): the first 64, then how many more. Empty when it breaks none." }, "notes": { "type": "array", "items": { "type": "string" }, "description": "Where the body's unsealed status or method differs from what is sealed or is missing, and members nothing seals: told beside the verdict, and no part of it." }, "bundle": { "type": "boolean", "description": "`wai-quantum verify --json --bundle` only: whether the envelope given is the one the receipt binds." }, "reproduced": { "type": [ "boolean", "null" ], "description": "`wai-quantum verify --json --bundle` only: whether running the envelope again here gives the same result, byte for byte; null when it is not the envelope the receipt binds." } } }, "time": { "type": "object", "description": "What the receipt seals of when it was issued (the provider protocol's section 8.2), for a receipt of its form: the time, in milliseconds since 1970 by its signer's clock, or that it seals none.", "required": [ "sealed" ], "properties": { "sealed": { "type": "boolean" }, "issued_ms": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "not_after_ms": { "type": [ "integer", "null" ], "minimum": 0, "maximum": 9007199254740991, "description": "The first moment the receipt is no longer offered; null when it states none." } } }, "trust": { "type": "object", "description": "With a trust list (section 8.8): whether it lists the receipt's key, and the window and revocation its entry gives.", "required": [ "listed" ], "properties": { "listed": { "type": "boolean" }, "not_before_ms": { "type": [ "integer", "null" ], "minimum": 0, "maximum": 9007199254740991 }, "not_after_ms": { "type": [ "integer", "null" ], "minimum": 0, "maximum": 9007199254740991 }, "revoked_from_ms": { "type": [ "integer", "null" ], "minimum": 0, "maximum": 9007199254740991 } } }, "checked_at_ms": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "With a time to hold the receipt to (section 8.8): that time." }, "skew_ms": { "type": "integer", "minimum": 0, "description": "How far after checked_at_ms a receipt's issue may be." }, "given": { "enum": [ "text", "members", "parsed" ], "description": "How the job was given (section 9): its own text; its members, judged as the message wrote them; or a value already parsed, with no text to judge." }, "not_seen": { "type": "array", "items": { "type": "string" }, "description": "For a job given parsed: what parsing loses, which this verdict could not see." } } }, { "$ref": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/set.v1.json#/$defs/verify" }, { "$ref": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/estimate.v1.json#/$defs/verify" }, { "$ref": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/algorithms.v1.json#/$defs/verify" } ] }, "discover_submit": { "type": "object", "description": "What the archive did with a generator, and its best entry after.", "required": [ "outcome", "best" ], "properties": { "outcome": { "type": "object" }, "best": { "type": [ "object", "null" ] } } }, "history_commit": { "type": "object", "description": "The version an agent's edit was recorded as, and in whose name.", "required": [ "version", "parent", "by", "history" ], "properties": { "version": { "type": "string" }, "parent": { "type": "string" }, "by": { "type": [ "object", "null" ], "properties": { "kind": { "enum": [ "person", "assistant", "agent", "engine", "origin" ] }, "name": { "type": [ "string", "null" ] } } }, "history": { "type": "string", "description": "The history file's path." } } }, "history_changes": { "type": "object", "required": [ "changes", "rules" ], "properties": { "changes": { "type": "array", "items": { "type": "object" } }, "breaches": {}, "rules": { "type": "array", "items": { "type": "string" } } } }, "history_blame": { "type": "object", "required": [ "version", "lines", "authorship" ], "properties": { "version": { "type": "string" }, "lines": { "type": "array", "items": { "type": "object" } }, "authorship": { "type": "object" } } }, "history_log": { "type": "object", "required": [ "versions", "check" ], "properties": { "versions": { "type": "array", "items": { "type": "object" } }, "check": { "type": "object" } } }, "taste_rank": { "type": "object", "description": "Programs ranked by the person's own taste profile: each with its score, its parts' scores and its typicality; where the parts or the cost put another first; and whether the ranking narrows what comes first.", "required": [ "choices", "ranked" ], "properties": { "choices": { "type": "integer", "description": "The choices the profile has learned from." }, "dial": { "type": "number", "description": "The novelty dial, -1 to 1." }, "ranked": { "type": "array", "items": { "type": "object", "required": [ "name", "score", "final" ], "properties": { "name": { "type": "string" }, "score": { "type": "number" }, "final": { "type": "number" }, "novelty": { "type": [ "number", "null" ] }, "typicality": { "type": [ "number", "null" ] }, "cost": { "type": [ "number", "null" ] }, "parts": { "type": "object", "additionalProperties": { "type": "number" } } } } }, "disagree": { "type": "array", "items": { "type": "object", "properties": { "part": { "type": "string" }, "first": { "type": "string" } } } }, "narrowing": { "type": [ "object", "null" ] } } }, "taste_next": { "type": "object", "description": "The pair the person's taste profile is least sure of that the engine proves equal, or why there is none.", "required": [ "a" ], "properties": { "a": { "type": [ "string", "null" ] }, "b": { "type": "string" }, "how": { "type": "string", "description": "How the engine proved them equal." }, "p_a": { "type": "number", "description": "The profile's probability that the person prefers a." }, "why": { "type": "string" } } }, "providers_list": { "type": "object", "description": "The person's providers, and where each one's credential is; with free, what is free.", "required": [ "registry", "providers" ], "properties": { "registry": { "type": "string", "description": "The registry file's path." }, "providers": { "type": "array", "items": { "type": "object" } }, "free": { "type": "object" } } }, "provider_job": { "type": "object", "description": "A job on a provider, in the form of a job (job.v1.json), its id the record's handle: running, ended with its error, or done with its result and receipt, which verify_quantum_result checks.", "required": [ "id", "status", "method", "request" ], "properties": { "id": { "type": "string" }, "status": { "enum": [ "running", "done", "failed", "cancelled" ] }, "method": { "const": "provider" }, "why": { "type": "string" }, "request": { "type": "object" }, "result": { "type": "object" }, "error": { "type": "string" }, "submitted_ms": { "type": "integer" }, "finished_ms": { "type": "integer" } } }, "provider_jobs": { "type": "object", "description": "Every job recorded on this machine, as it last stood: no provider is asked.", "required": [ "ledger", "jobs", "unread" ], "properties": { "ledger": { "type": "string", "description": "The directory the records are in." }, "jobs": { "type": "array", "items": { "type": "object", "required": [ "id", "provider", "status", "shots", "submitted_ms" ], "properties": { "id": { "type": "string" }, "provider": { "type": "string" }, "status": { "enum": [ "running", "done", "failed", "cancelled" ] }, "shots": { "type": "integer" }, "submitted_ms": { "type": "integer" }, "finished_ms": { "type": "integer" }, "error": { "type": "string" } } } }, "unread": { "type": "array", "items": { "type": "string" }, "description": "Why any file among the records could not be read." } } }, "provider_estimate": { "type": "object", "description": "The dry run of a job on a provider: nothing submitted, nothing spent.", "required": [ "dry_run", "provider", "plan", "estimate", "free", "confirm" ], "properties": { "dry_run": { "const": true }, "provider": { "type": "object" }, "calibration": { "type": [ "string", "null" ] }, "billing": { "type": "object" }, "plan": { "type": "object" }, "estimate": { "type": "object" }, "free": { "type": "boolean" }, "confirm": { "type": "string", "description": "What the person reads before confirming a run that is not free." }, "planner": { "$ref": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/job-result.v1.json#/$defs/planner" } } }, "routed": { "type": "object", "description": "Every route a job could take under its contract, each with its price or why it was rejected, and the route chosen: nothing submitted, nothing spent.", "required": [ "dry_run", "planner" ], "properties": { "dry_run": { "const": true }, "planner": { "$ref": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/job-result.v1.json#/$defs/planner" }, "plan": { "$ref": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/plan.v1.json" }, "provider_plan": { "$ref": "#/$defs/provider_estimate" }, "confirm": { "type": "object", "description": "Where the route chosen is a provider's and not free: what a person confirms it by. token is a digest of the route, its estimate's money and the program and shots it would send; a run is sent only when given that token made again at send time.", "required": [ "token", "route", "money", "says" ], "properties": { "token": { "type": "string" }, "route": { "type": "string" }, "money": { "type": "object" }, "says": { "type": "string" } } } } }, "landscape_estimate": { "type": "object", "description": "The dry run of an energy-landscape job on a provider (wai/extensions/quantum-providers.md §11): the job's operations and memory as the extension counts them, the provider's estimate, and whether it is free. Nothing submitted, nothing spent.", "required": [ "provider", "kind", "device", "provenance", "op", "protocol", "members", "operations", "bytes", "estimate", "free", "confirmation", "sent" ], "properties": { "provider": { "type": "string", "description": "The person's name for the provider." }, "kind": { "enum": [ "http", "process" ] }, "device": { "type": "string" }, "provenance": { "type": "string" }, "op": { "enum": [ "run", "sweep", "compare", "replay" ] }, "protocol": { "enum": [ "wai.quantum.landscape/1", "wai.quantum.landscape/2" ], "description": "The version of the landscape protocol the job is of: the one its request names, the first where it names none. The device's description lists it, or nothing is planned." }, "members": { "type": "array", "description": "What the provider places jobs on, as its description lists them.", "items": { "type": "object" } }, "operations": { "type": "integer", "minimum": 0, "description": "The job's operations, as wai.quantum.landscape/1 §2.0 counts them before anything runs (a job of wai.quantum.landscape/2 is counted the same way); the provider's estimate counts the same." }, "bytes": { "type": "integer", "minimum": 0, "description": "The memory the job can hold, counted the same way." }, "estimate": { "type": "object", "description": "The provider's estimate, or why its cost is unknown, with the counts beside it." }, "free": { "type": "boolean" }, "confirmation": { "type": "string", "description": "What the person reads before confirming a run that is not free." }, "sent": { "type": "string" } } } } }