{"openapi":"3.1.0","info":{"title":"Agent API — REST door","description":"Formal policy results over a claim dictionary: every assertion in a ruleset, with what the engine concluded about it. One engine sits behind this door and an MCP door, and both return identical bytes.\n\nThis service never calls an LLM: extraction happens on your model, against the prompt pack this API generates.\n\nDSAIL ruleset grammar (v1.3), the subset this service compiles to SMT:\n\n  version 1.3;                       -- optional; 1.2 and 1.3 are accepted\n\n  declare <name> as boolean;         -- a yes/no claim\n  declare <name> as numeric;         -- a number; may carry a unit at the use site\n  declare <name> as enum [\"a\",\"b\"];  -- ORDERED vocabulary (comparable with < >)\n  declare <name> as enum {\"a\",\"b\"};  -- UNORDERED vocabulary (== and != only)\n  declare local <name> as boolean;   -- rule-local; NOT a claim, never extracted\n\n  assert <name> { <expr> };              -- the rule. Holds => compliant.\n  assert <name> [pessimistic] { ... };   -- unknown-resolution policy:\n                                         -- optimistic | pessimistic | neutral\n\nEnum members are double-quoted strings. Every statement ends with a semicolon.\nYou do not write `let` bindings for claim values — this service injects them\nfrom the claim dictionary you submit to check.\n\nExpressions:\n  comparison   ==  !=  <  <=  >  >=      (thresholds are STRICT: > means\n                                          strictly greater, NOT at-or-above.\n                                          Write >= if you mean at-or-above.\n                                          Equality is ==, not =.)\n  arithmetic   +  -  *  /  %\n  LOGIC IS FUNCTION-STYLE, NOT INFIX. There is no `and`/`or`/`not` keyword:\n               And(a, b, ...)     Or(a, b, ...)     Not(a)\n               Xor(a, b)          Implies(a, b)     If(cond, a, b)\n  conditional  IF <cond> THEN <expr> [ELSE <expr>] END\n               CASE <subject> OF \"x\": <expr>, \"y\": <expr>, DEFAULT: <expr> END\n  quantifiers  ForAll(x in s, p)      Exists(x in s, p)\n               AtLeast(n, x in s, p)  AtMost(n, x in s, p)\n               ExactlyOne(x in s, p)  CountWhere(x in s, p)\n  sets         IsMember(v, s)  IsSubset(a, b)\n               Union(a, b)  Intersect(a, b)  Difference(a, b)\n\nWhat a check answers. Every assertion gets its own result, and that is the\nwhole answer:\n\n  TRUE       the assertion holds\n  FALSE      the assertion is violated\n  UNKNOWN    a claim it needs was submitted as unknown, or is unconstrained\n  AMBIGUOUS  its evidence was contradicted\n\nThere is no combined verdict, no severity and no ranking. What a violated\nassertion should cost — a refusal, a human review, a note in a file — is a\ndecision for the system reading the result, and this service does not make it.\n\nHost annotations. These are ordinary DSAIL comments, invisible to the compiler,\nread by this service. Every one of them describes a CLAIM — what to ask for it\nand what a valid answer looks like. None of them decides an outcome:\n\n  // @ask <claim> What is ...?       -- the question shown to an extractor\n  // @context <claim> <text>         -- extra context for the extractor\n  // @range <claim> 0..100           -- numeric bounds, enforced at check time\n  // @unit <claim> USD               -- expected unit for a numeric claim\n\n@effect, @effect-default and @consistency are NOT recognised. A ruleset\ncarrying one does not compile.\n\nWorked example:\n\n  version 1.3;\n  // @ask loanAmount What is the loan principal, in USD?\n  // @unit loanAmount USD\n  // @range loanAmount 0..100000000\n  declare loanAmount as numeric;\n  // @ask hasAppraisal Does the file contain a completed appraisal?\n  declare hasAppraisal as boolean;\n  declare riskTier as enum [\"low\",\"medium\",\"high\"];\n\n  assert within_cap { loanAmount <= 1000000 };\n  assert large_but_documented { Or(loanAmount <= 500000, hasAppraisal) };\n  assert tier_permitted { riskTier != \"high\" };\n","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["operations"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/version":{"get":{"tags":["operations"],"summary":"Version","operationId":"version_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/compile":{"post":{"tags":["ruleset"],"summary":"Compile a ruleset; get its hash, manifest and validation contract","operationId":"compile_ruleset_v1_compile_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompileRequest"}}},"required":true},"responses":{"200":{"description":"Compiled.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":true},"ruleset_hash":{"type":"string","description":"sha256 of the normalised source. This is the object key."},"unit_library_hash":{"type":["string","null"],"description":"The project unit library this compile read. Half of a result's provenance; null selects the six built-in standards."},"unbridged_units":{"items":{"properties":{"rule":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"cause":{"type":"string","enum":["missing","ambiguous"]}},"type":"object","required":["rule","from","to","cause"]},"type":"array","description":"Unit pairs this ruleset compares that no loaded converter bridges, attributed by the engine to the rule that cannot be lowered. Each one answers UNKNOWN for every claim dictionary until a converter is added."},"manifest":{"properties":{"ruleset_hash":{"type":"string"},"claims":{"items":{"properties":{"claim":{"type":"string"},"data_type":{"type":"string","enum":["boolean","numeric","enum"]},"question":{"type":"string","description":"Shown to the extracting model."},"context":{"type":"string"},"vocabulary":{"items":{"type":"string"},"type":"array"},"ordered":{"type":"boolean"},"boolean_subtype":{"type":"string"},"unit":{"type":["string","null"]},"range":{"properties":{"min":{"type":"number"},"max":{"type":"number"}},"type":"object"},"required":{"type":"boolean"},"unknown_allowed":{"type":"boolean","const":true},"unknown_sentinel":{"type":"string","description":"Present only when this claim's own vocabulary contains a member spelled like the sentinel. Then the string means that member and this names the value that means undetermined (null)."}},"type":"object","required":["claim","data_type","question","required","unknown_allowed"]},"type":"array"},"rules":{"items":{"properties":{"rule":{"type":"string"},"assertions":{"items":{"properties":{"name":{"type":"string"},"unknown_policy":{"type":"string","enum":["optimistic","pessimistic","neutral"]},"line":{"type":["integer","null"]},"source":{"type":["string","null"]}},"type":"object","required":["name","unknown_policy"],"description":"One assertion a rule states. The engine answers per assertion, so this is the unit a check reports on."},"type":"array"}},"type":"object","required":["rule","assertions"],"description":"One rule, with the assertions it states. A rule is the unit a policy is written in; an assertion is the unit the engine answers, and one rule may state several. A ruleset compiled here is a single DSAIL source and the grammar has no grouping construct, so today every rule holds exactly one assertion and carries its name — read results through this level anyway and a rule that states more costs you nothing."},"type":"array"}},"type":"object","required":["ruleset_hash","claims","rules"]},"source":{"type":"string","description":"The normalised DSAIL source that hashed to `ruleset_hash`, so a caller that only ever compiles has something to show or diff without a separate load-by-name call."},"review":{"type":"string","description":"A plain-text rendering of what this ruleset asks and decides, for a person about to approve it. Derived from the manifest on every compile, never stored, so it cannot drift from the contract a caller was handed."},"summary":{"type":"string","description":"The same thing in one sentence, for a row in a list rather than a page a person reads."},"claim_schema":{"type":"object","description":"JSON Schema for the claim dictionary."},"validation_contract":{"type":"object","description":"Exactly what check will reject, known before submitting."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"stored":{"properties":{"parent_hash":{"type":["string","null"]},"revision_depth":{"type":"integer"}},"type":"object"},"label":{"properties":{"vocabulary_version":{"type":"string","example":"v1"},"level_one":{"type":["string","null"],"enum":["finance","consumer_finance","capital_markets","insurance","regulatory_compliance","hr_workforce","security_access","security_classification","healthcare","legal_contracts","procurement","engineering_release","content_safety","other",null],"description":"Level-one domain id. Null only when declined."},"level_two":{"type":["string","null"],"pattern":"^l2-[0-9]{4,}$","description":"Level-two term id, from GET /v1/vocabulary. Null when the proposal matched no published term (the proposal was counted toward promotion instead) or none was offered."},"confidence":{"type":["string","null"],"enum":["high","medium","low",null]},"declined":{"type":"boolean"},"updated_at":{"type":"string","description":"UTC, ISO 8601."}},"type":["object","null"],"required":["vocabulary_version","level_one","level_two","confidence","declined","updated_at"],"description":"The ruleset's stored application-domain label (TJP-642), as ids under `vocabulary_version`. Null when the ruleset carries none, or when this account has labeling disabled. A label never alters a result; the level-two proposal text a caller sent is matched and dropped, never stored or returned."},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","ruleset_hash","source","manifest","review","summary","claim_schema","validation_contract","diagnostics","versions"]}}}},"400":{"description":"The request body did not match the contract (shape, not content).","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"413":{"description":"A complexity budget was exceeded.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"422":{"description":"The source did not compile. The error carries diagnostics and the grammar as a hint.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"503":{"description":"ENGINE_BUSY: the solver was busy with other requests for longer than a call may wait. Nothing was charged; retry after `retry_after_ms` (also sent as Retry-After).","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}}}}},"/v1/check":{"post":{"tags":["check"],"summary":"Validate a claim dictionary and solve it, in one call","operationId":"check_v1_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"}}},"required":true},"responses":{"200":{"description":"Every rule, with each assertion's own result.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":true},"ruleset_hash":{"type":"string"},"unit_library_hash":{"type":["string","null"],"description":"The other half of a result's provenance. DSAIL numerics are dimensional, and a project may add unit converters that change what a comparison resolves to, so the ruleset hash alone no longer identifies every input. Null means no project library, which is itself reproducible: it selects the six built-in standard libraries."},"rules":{"items":{"properties":{"rule":{"type":"string"},"assertions":{"items":{"properties":{"name":{"type":"string"},"check":{"type":"string","enum":["TRUE","FALSE","UNKNOWN","AMBIGUOUS"],"description":"The engine's own result, in the same four words the platform's run results use. TRUE = the assertion holds. FALSE = the assertion is violated. UNKNOWN = a claim the assertion needs was not determined. AMBIGUOUS = the assertion's evidence was contradicted — reserved: it needs an instance axis carrying several answers for one claim, and a claim dictionary holds one value per claim, so nothing produces it yet. Handle it now and a later release costs you no change."},"unknown_policy":{"type":"string"},"source":{"type":["string","null"]},"reason_unknown":{"type":"string"},"unbridged_units":{"items":{"properties":{"from":{"type":"string"},"to":{"type":"string"}},"type":"object","required":["from","to"]},"type":"array","description":"Unit pairs this assertion compares that no loaded converter bridges — the engine's own account of why it answered UNKNOWN."}},"type":"object","required":["name","check"],"description":"What the engine concluded about one assertion. Exactly that, and nothing derived from it: this service publishes no severity, no effect and no verdict, so what a FALSE should cost is the reader's decision."},"type":"array"}},"type":"object","required":["rule","assertions"],"description":"One rule's assertions, each with its own result. There is no rule-level conclusion: joining assertions is the reader's call, and the platform's own join (bit-pair, in ``common.multi_instance.verifier_ref``) is the way to do it."},"type":"array"},"claims":{"properties":{"bound":{"items":{"type":"string"},"type":"array"},"unbound":{"items":{"type":"string"},"type":"array","description":"Claims the engine had no value for — submitted as unknown, or absent. Why an assertion answered UNKNOWN is readable here."},"quantities":{"items":{"properties":{"claim":{"type":"string"},"submitted":{"type":"string","description":"The value as the caller sent it."},"bound":{"type":"string","description":"The DSAIL literal it became. Verbatim: the host performs no unit arithmetic."},"measured_in":{"type":["string","null"],"description":"The claim's declared @unit, if any."},"conversion":{"properties":{"from":{"type":"string"},"to":{"type":"string"},"by":{"type":"string","const":"engine"},"status":{"type":"string"},"factor":{"type":"number"}},"type":"object","required":["from","to","by","status"],"description":"Present only when the submitted unit differs from the declared one. 'by' is always 'engine': Z3 applies the factor as an exact rational, and the factor here is reported from the same registry for a human to check, never used to compute anything."}},"type":"object","required":["claim","submitted","bound","measured_in"]},"type":"array","description":"What each numeric claim was worth. Without it a check names the claims it bound and nothing about their values, so an answer of '30000 CAD' judged against a policy written in USD leaves no trace of the currency it arrived in."}},"type":"object","required":["bound","unbound"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","ruleset_hash","unit_library_hash","rules","claims","versions"],"description":"Every rule in the ruleset with every assertion's own result, and nothing combined on top of them. Pure over its inputs: no timestamps, no durations, no request id, so the same ruleset and claim dictionary always produce the same bytes — through either door."}}}},"404":{"description":"No stored ruleset for that hash.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"400":{"description":"The request body did not match the contract (shape, not content).","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"413":{"description":"A complexity budget was exceeded.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"422":{"description":"The claim dictionary was rejected. Every failing field is named.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"500":{"description":"The engine and the manifest disagree about which assertions this ruleset states, so no results are offered. Deliberately not a partial answer.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"503":{"description":"ENGINE_BUSY: the solver was busy with other requests for longer than a call may wait. Nothing was charged; retry after `retry_after_ms` (also sent as Retry-After).","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}}}}},"/v1/prompt-pack/{ruleset_hash}":{"get":{"tags":["extraction"],"summary":"Extraction prompts, claim schema and validation contract for a ruleset","operationId":"prompt_pack_v1_prompt_pack__ruleset_hash__get","parameters":[{"name":"ruleset_hash","in":"path","required":true,"schema":{"type":"string","title":"Ruleset Hash"}}],"responses":{"200":{"description":"The prompt pack.","content":{"application/json":{"schema":{"type":"object","required":["ok","ruleset_hash","integrity_rule","prompts","claim_schema","versions"],"properties":{"ok":{"type":"boolean","const":true},"ruleset_hash":{"type":"string"},"integrity_rule":{"type":"string"},"prompts":{"type":"array","items":{"type":"object","required":["claim","data_type","question","answer_format","unknown_rule"],"properties":{"claim":{"type":"string"},"data_type":{"type":"string"},"question":{"type":"string"},"answer_format":{"type":"string"},"unknown_rule":{"type":"string"},"undetermined_value":{"type":"string","description":"The literal to send when this claim could not be determined: \"unknown\", or null where the vocabulary itself contains \"unknown\"."},"context":{"type":"string"},"vocabulary":{"type":"array","items":{"type":"string"}},"ordered_vocabulary":{"type":"boolean","description":"True when the enum was declared ordered, so its members compare with < and >."},"unit":{"type":"string"},"range":{"type":"object"}}}},"claim_schema":{"type":"object"},"validation_contract":{"type":"object"},"assembly_notes":{"type":"array","items":{"type":"string"}},"versions":{"type":"object","description":"Which engine and which wire contract produced this response.","required":["engine","engine_version","language_version","service_version","wire_version"],"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"type":"array","items":{"type":"string"}},"service_version":{"type":"string"},"wire_version":{"type":"string"}}}}}}}},"400":{"description":"That is not a content hash (64 lowercase hex characters).","content":{"application/json":{"schema":{"type":"object","required":["ok","error","versions"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"type":"array","description":"EVERY failing field, not the first one.","items":{"type":"object","required":["field","expected","received"],"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}}}},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"type":"array","items":{"type":"object","required":["severity","message"],"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}}}},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}}},"versions":{"type":"object","description":"Which engine and which wire contract produced this response.","required":["engine","engine_version","language_version","service_version","wire_version"],"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"type":"array","items":{"type":"string"}},"service_version":{"type":"string"},"wire_version":{"type":"string"}}}}}}}},"404":{"description":"No stored ruleset for that hash.","content":{"application/json":{"schema":{"type":"object","required":["ok","error","versions"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"type":"array","description":"EVERY failing field, not the first one.","items":{"type":"object","required":["field","expected","received"],"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}}}},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"type":"array","items":{"type":"object","required":["severity","message"],"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}}}},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}}},"versions":{"type":"object","description":"Which engine and which wire contract produced this response.","required":["engine","engine_version","language_version","service_version","wire_version"],"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"type":"array","items":{"type":"string"}},"service_version":{"type":"string"},"wire_version":{"type":"string"}}}}}}}},"422":{"description":"The stored source no longer compiles under this engine.","content":{"application/json":{"schema":{"type":"object","required":["ok","error","versions"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"type":"array","description":"EVERY failing field, not the first one.","items":{"type":"object","required":["field","expected","received"],"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}}}},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"type":"array","items":{"type":"object","required":["severity","message"],"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}}}},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}}},"versions":{"type":"object","description":"Which engine and which wire contract produced this response.","required":["engine","engine_version","language_version","service_version","wire_version"],"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"type":"array","items":{"type":"string"}},"service_version":{"type":"string"},"wire_version":{"type":"string"}}}}}}}}}}},"/v1/prompt-pack":{"post":{"tags":["extraction"],"summary":"Prompt pack for source you have not compiled yet","operationId":"prompt_pack_for_source_v1_prompt_pack_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptPackRequest"}}},"required":true},"responses":{"200":{"description":"The prompt pack.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":true},"ruleset_hash":{"type":"string"},"integrity_rule":{"type":"string"},"prompts":{"items":{"properties":{"claim":{"type":"string"},"data_type":{"type":"string"},"question":{"type":"string"},"answer_format":{"type":"string"},"unknown_rule":{"type":"string"},"undetermined_value":{"type":"string","description":"The literal to send when this claim could not be determined: \"unknown\", or null where the vocabulary itself contains \"unknown\"."},"context":{"type":"string"},"vocabulary":{"items":{"type":"string"},"type":"array"},"ordered_vocabulary":{"type":"boolean","description":"True when the enum was declared ordered, so its members compare with < and >."},"unit":{"type":"string"},"range":{"type":"object"}},"type":"object","required":["claim","data_type","question","answer_format","unknown_rule"]},"type":"array"},"claim_schema":{"type":"object"},"validation_contract":{"type":"object"},"assembly_notes":{"items":{"type":"string"},"type":"array"},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","ruleset_hash","integrity_rule","prompts","claim_schema","versions"]}}}},"400":{"description":"The request body or a path parameter did not match the contract.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"404":{"description":"No stored ruleset for that hash.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"413":{"description":"A complexity budget was exceeded.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"422":{"description":"The source did not compile.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}}}}},"/v1/rulesets":{"get":{"tags":["ruleset"],"summary":"List named rulesets, with what each one decides","operationId":"list_rulesets_v1_rulesets_get","responses":{"200":{"description":"The library.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":true},"namespace":{"type":"string","description":"Service-internal scope identifier. For clients, not for display: never show this to a person, who identifies a ruleset by name."},"rulesets":{"items":{"properties":{"name":{"type":"string","description":"The primary handle."},"ruleset_hash":{"type":"string"},"bound_at":{"type":"string","description":"When this name last started pointing at these bytes — the ruleset's last-changed time."},"revision_depth":{"type":"integer"},"approval_count":{"type":"integer"},"compiles":{"type":"boolean","description":"False when the stored source no longer compiles under this engine, or its bytes are gone. The row is still returned — a listing a single unreadable entry could hide is worse than one that says so — and the counts are null."},"summary":{"type":"string","description":"One sentence: what this ruleset asks and what it can decide. Derived per row from the manifest, never stored beside it."},"claim_count":{"type":["integer","null"]},"rule_count":{"type":["integer","null"]}},"type":"object","required":["name","ruleset_hash","bound_at","revision_depth","approval_count","compiles","summary","claim_count","rule_count"]},"type":"array"},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","namespace","rulesets","versions"],"description":"Every named ruleset saved for this connection, with enough per row to render a library without a second call."}}}}}},"post":{"tags":["ruleset"],"summary":"Store a named revision of a ruleset","operationId":"save_ruleset_v1_rulesets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveRulesetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"The name or the body did not match the contract.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"404":{"description":"The parent_hash given is not stored, so no revision can cite it.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"413":{"description":"A complexity budget was exceeded.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"422":{"description":"The source did not compile.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}}}}},"/v1/rulesets/{name}":{"get":{"tags":["ruleset"],"summary":"Load a named ruleset with its full contract, revision chain and approvals","operationId":"load_ruleset_v1_rulesets__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"The stored ruleset.","content":{"application/json":{"schema":{"type":"object","required":["ok","namespace","name","ruleset_hash","source","manifest","revision_chain","approvals","versions"],"description":"A stored ruleset, in the shape a compile of it would return plus what the store knows about it. This is how a saved ruleset is SHOWN — re-compiling remembered source produces a different object the moment the two disagree, and an approval follows the stored bytes.","properties":{"ok":{"type":"boolean","const":true},"ruleset_hash":{"type":"string","description":"sha256 of the normalised source. This is the object key."},"unit_library_hash":{"type":["string","null"],"description":"The project unit library this compile read. Half of a result's provenance; null selects the six built-in standards."},"unbridged_units":{"type":"array","description":"Unit pairs this ruleset compares that no loaded converter bridges, attributed by the engine to the rule that cannot be lowered. Each one answers UNKNOWN for every claim dictionary until a converter is added.","items":{"type":"object","required":["rule","from","to","cause"],"properties":{"rule":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"cause":{"type":"string","enum":["missing","ambiguous"]}}}},"manifest":{"type":"object","required":["ruleset_hash","claims","rules"],"properties":{"ruleset_hash":{"type":"string"},"claims":{"type":"array","items":{"type":"object","required":["claim","data_type","question","required","unknown_allowed"],"properties":{"claim":{"type":"string"},"data_type":{"type":"string","enum":["boolean","numeric","enum"]},"question":{"type":"string","description":"Shown to the extracting model."},"context":{"type":"string"},"vocabulary":{"type":"array","items":{"type":"string"}},"ordered":{"type":"boolean"},"boolean_subtype":{"type":"string"},"unit":{"type":["string","null"]},"range":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"required":{"type":"boolean"},"unknown_allowed":{"type":"boolean","const":true},"unknown_sentinel":{"type":"string","description":"Present only when this claim's own vocabulary contains a member spelled like the sentinel. Then the string means that member and this names the value that means undetermined (null)."}}}},"rules":{"type":"array","items":{"type":"object","description":"One rule, with the assertions it states. A rule is the unit a policy is written in; an assertion is the unit the engine answers, and one rule may state several. A ruleset compiled here is a single DSAIL source and the grammar has no grouping construct, so today every rule holds exactly one assertion and carries its name — read results through this level anyway and a rule that states more costs you nothing.","required":["rule","assertions"],"properties":{"rule":{"type":"string"},"assertions":{"type":"array","items":{"type":"object","description":"One assertion a rule states. The engine answers per assertion, so this is the unit a check reports on.","required":["name","unknown_policy"],"properties":{"name":{"type":"string"},"unknown_policy":{"type":"string","enum":["optimistic","pessimistic","neutral"]},"line":{"type":["integer","null"]},"source":{"type":["string","null"]}}}}}}}}},"source":{"type":"string","description":"The normalised DSAIL source that hashed to `ruleset_hash`, so a caller that only ever compiles has something to show or diff without a separate load-by-name call."},"review":{"type":"string","description":"A plain-text rendering of what this ruleset asks and decides, for a person about to approve it. Derived from the manifest on every compile, never stored, so it cannot drift from the contract a caller was handed."},"summary":{"type":"string","description":"The same thing in one sentence, for a row in a list rather than a page a person reads."},"claim_schema":{"type":"object","description":"JSON Schema for the claim dictionary."},"validation_contract":{"type":"object","description":"Exactly what check will reject, known before submitting."},"diagnostics":{"type":"array","items":{"type":"object","required":["severity","message"],"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}}}},"stored":{"type":"object","properties":{"parent_hash":{"type":["string","null"]},"revision_depth":{"type":"integer"}}},"label":{"type":["object","null"],"description":"The ruleset's stored application-domain label (TJP-642), as ids under `vocabulary_version`. Null when the ruleset carries none, or when this account has labeling disabled. A label never alters a result; the level-two proposal text a caller sent is matched and dropped, never stored or returned.","required":["vocabulary_version","level_one","level_two","confidence","declined","updated_at"],"properties":{"vocabulary_version":{"type":"string","example":"v1"},"level_one":{"type":["string","null"],"enum":["finance","consumer_finance","capital_markets","insurance","regulatory_compliance","hr_workforce","security_access","security_classification","healthcare","legal_contracts","procurement","engineering_release","content_safety","other",null],"description":"Level-one domain id. Null only when declined."},"level_two":{"type":["string","null"],"pattern":"^l2-[0-9]{4,}$","description":"Level-two term id, from GET /v1/vocabulary. Null when the proposal matched no published term (the proposal was counted toward promotion instead) or none was offered."},"confidence":{"type":["string","null"],"enum":["high","medium","low",null]},"declined":{"type":"boolean"},"updated_at":{"type":"string","description":"UTC, ISO 8601."}}},"versions":{"type":"object","description":"Which engine and which wire contract produced this response.","required":["engine","engine_version","language_version","service_version","wire_version"],"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"type":"array","items":{"type":"string"}},"service_version":{"type":"string"},"wire_version":{"type":"string"}}},"namespace":{"type":"string","description":"Service-internal scope identifier. For clients, not for display: never show this to a person, who identifies a ruleset by name."},"name":{"type":"string","description":"The name that was asked for."},"revision_chain":{"type":"array","items":{"type":"string"},"description":"This hash, then its parent, back to the root."},"approvals":{"type":"array","items":{"type":"object","required":["hash","approver","approved_at"],"properties":{"hash":{"type":"string","description":"The exact bytes signed for. An approval follows the hash, never a name: a later revision is not covered by it."},"approver":{"type":"string"},"note":{"type":["string","null"]},"approved_at":{"type":"string","description":"UTC, ISO 8601."}}}}}}}}},"400":{"description":"That is not a usable ruleset name.","content":{"application/json":{"schema":{"type":"object","required":["ok","error","versions"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"type":"array","description":"EVERY failing field, not the first one.","items":{"type":"object","required":["field","expected","received"],"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}}}},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"type":"array","items":{"type":"object","required":["severity","message"],"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}}}},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}}},"versions":{"type":"object","description":"Which engine and which wire contract produced this response.","required":["engine","engine_version","language_version","service_version","wire_version"],"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"type":"array","items":{"type":"string"}},"service_version":{"type":"string"},"wire_version":{"type":"string"}}}}}}}},"404":{"description":"No ruleset by that name.","content":{"application/json":{"schema":{"type":"object","required":["ok","error","versions"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"type":"array","description":"EVERY failing field, not the first one.","items":{"type":"object","required":["field","expected","received"],"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}}}},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"type":"array","items":{"type":"object","required":["severity","message"],"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}}}},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}}},"versions":{"type":"object","description":"Which engine and which wire contract produced this response.","required":["engine","engine_version","language_version","service_version","wire_version"],"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"type":"array","items":{"type":"string"}},"service_version":{"type":"string"},"wire_version":{"type":"string"}}}}}}}},"422":{"description":"The stored source no longer compiles under this engine.","content":{"application/json":{"schema":{"type":"object","required":["ok","error","versions"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"type":"array","description":"EVERY failing field, not the first one.","items":{"type":"object","required":["field","expected","received"],"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}}}},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"type":"array","items":{"type":"object","required":["severity","message"],"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}}}},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}}},"versions":{"type":"object","description":"Which engine and which wire contract produced this response.","required":["engine","engine_version","language_version","service_version","wire_version"],"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"type":"array","items":{"type":"string"}},"service_version":{"type":"string"},"wire_version":{"type":"string"}}}}}}}}}}},"/v1/units":{"get":{"tags":["units"],"summary":"Which unit standards are loaded and what this project added","operationId":"unit_library_v1_units_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/units/bridge":{"get":{"tags":["units"],"summary":"Whether one unit converts to another, and by what factor","operationId":"unit_bridge_v1_units_bridge_get","parameters":[{"name":"from_unit","in":"query","required":true,"schema":{"type":"string","title":"From Unit"}},{"name":"to_unit","in":"query","required":true,"schema":{"type":"string","title":"To Unit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Both unit names are required.","content":{"application/json":{"schema":{"type":"object","required":["ok","error","versions"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"type":"array","description":"EVERY failing field, not the first one.","items":{"type":"object","required":["field","expected","received"],"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}}}},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"type":"array","items":{"type":"object","required":["severity","message"],"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}}}},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}}},"versions":{"type":"object","description":"Which engine and which wire contract produced this response.","required":["engine","engine_version","language_version","service_version","wire_version"],"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"type":"array","items":{"type":"string"}},"service_version":{"type":"string"},"wire_version":{"type":"string"}}}}}}}}}}},"/v1/units/converters":{"post":{"tags":["units"],"summary":"Add a converter to this project's unit library","operationId":"add_unit_converter_v1_units_converters_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddConverterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"The converter did not match the contract. A factor is required and is never inferred.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"413":{"description":"attribution exceeded the ceiling.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}}}}},"/v1/approvals":{"post":{"tags":["ruleset"],"summary":"Save under a name and bind a human approval to an exact ruleset hash","operationId":"record_approval_v1_approvals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"}}},"required":true},"responses":{"200":{"description":"Saved, then approved.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":true},"ruleset_hash":{"type":"string"},"namespace":{"type":"string","description":"Service-internal scope identifier. For clients, not for display: never show this to a person, who identifies a ruleset by name."},"name":{"type":["string","null"],"description":"The name these bytes are saved under after this call. Null only when none was supplied and none was already bound."},"saved":{"type":"boolean","description":"Whether this call bound a name. The binding happens BEFORE the approval is recorded, so a refused name records no approval at all."},"approval":{"properties":{"hash":{"type":"string","description":"The exact bytes signed for. An approval follows the hash, never a name: a later revision is not covered by it."},"approver":{"type":"string"},"note":{"type":["string","null"]},"approved_at":{"type":"string","description":"UTC, ISO 8601."}},"type":"object","required":["hash","approver","approved_at"]},"approvals":{"items":{"properties":{"hash":{"type":"string","description":"The exact bytes signed for. An approval follows the hash, never a name: a later revision is not covered by it."},"approver":{"type":"string"},"note":{"type":["string","null"]},"approved_at":{"type":"string","description":"UTC, ISO 8601."}},"type":"object","required":["hash","approver","approved_at"]},"type":"array","description":"Every approval on this hash, including the new one."},"label":{"properties":{"vocabulary_version":{"type":"string","example":"v1"},"level_one":{"type":["string","null"],"enum":["finance","consumer_finance","capital_markets","insurance","regulatory_compliance","hr_workforce","security_access","security_classification","healthcare","legal_contracts","procurement","engineering_release","content_safety","other",null],"description":"Level-one domain id. Null only when declined."},"level_two":{"type":["string","null"],"pattern":"^l2-[0-9]{4,}$","description":"Level-two term id, from GET /v1/vocabulary. Null when the proposal matched no published term (the proposal was counted toward promotion instead) or none was offered."},"confidence":{"type":["string","null"],"enum":["high","medium","low",null]},"declined":{"type":"boolean"},"updated_at":{"type":"string","description":"UTC, ISO 8601."}},"type":["object","null"],"required":["vocabulary_version","level_one","level_two","confidence","declined","updated_at"],"description":"The ruleset's stored application-domain label (TJP-642), as ids under `vocabulary_version`. Null when the ruleset carries none, or when this account has labeling disabled. A label never alters a result; the level-two proposal text a caller sent is matched and dropped, never stored or returned."},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","ruleset_hash","namespace","name","saved","approval","approvals","versions"]}}}},"400":{"description":"The body did not match the contract, that is not a content hash, or `name` is not a usable ruleset name — in which case nothing was saved and no approval was recorded.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"404":{"description":"The hash is not stored, so there is nothing to approve.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"413":{"description":"approver or note exceeded the published ceiling.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}}}}},"/v1/vocabulary":{"get":{"tags":["operations"],"summary":"The application-domain vocabulary: level one, level-two terms with provenance, version history, K and the promotion rule (TJP-642)","operationId":"vocabulary_v1_vocabulary_get","responses":{"200":{"description":"The current vocabulary document.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":true},"version":{"type":"string"},"published_at":{"type":["string","null"]},"description":{"type":["string","null"]},"level_one":{"items":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"type":"object","required":["id","name"]},"type":"array"},"level_two":{"items":{"properties":{"id":{"type":"string","pattern":"^l2-[0-9]{4,}$"},"term":{"type":"string"},"aliases":{"items":{"type":"string"},"type":"array"},"provenance":{"type":"string","enum":["seeded","promoted"]},"since_version":{"type":"string"},"promoted_at":{"type":["string","null"]}},"type":"object","required":["id","term","provenance","since_version"]},"type":"array"},"confidence_buckets":{"items":{"type":"string"},"type":"array"},"promotion":{"properties":{"k":{"type":"integer","description":"Distinct external accounts that must independently propose a term before it is published."},"proposal_ttl_days":{"type":"integer"},"rule":{"type":"string"}},"type":"object","required":["k","proposal_ttl_days","rule"]},"counts":{"type":"object"},"version_history":{"items":{"type":"object"},"type":"array"},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","version","level_one","level_two","promotion","version_history","versions"],"description":"The application-domain vocabulary as a machine-readable, versioned document. Level one is closed and published in full; level two lists every term that is currently in the vocabulary, with its provenance (seeded for cold start, or promoted by K distinct external accounts). Unpromoted proposals are not here — they are counts, not vocabulary."}}}}}}},"/v1/account":{"get":{"tags":["operations"],"summary":"Entitlement and usage position — the enforced one since TJP-623 — plus the terms version and vocabulary version applicable to this tier","operationId":"account_status_v1_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/flags":{"get":{"tags":["operations"],"summary":"This deployment's own feature flags (not the platform's)","operationId":"feature_flags_v1_flags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/credentials/evaluation":{"post":{"tags":["operations"],"summary":"Obtain an evaluation credential: no sign-up, scoped to compile and check, capped, expiring (TJP-621)","operationId":"issue_evaluation_credential_v1_credentials_evaluation_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluationCredentialRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Issued. The token appears once.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":true},"credential":{"type":"string","description":"The bearer token. Store it; it is not retrievable again."},"credential_id":{"type":"string","description":"Names the credential without unlocking anything; safe to log."},"grade":{"type":"string","enum":["evaluation"]},"expires_at":{"type":"string","description":"ISO 8601, UTC."},"limits":{"properties":{"ttl_days":{"type":"integer"},"calls_per_day":{"type":"integer"},"calls_total":{"type":"integer"}},"type":"object","required":["ttl_days","calls_per_day","calls_total"]},"scope":{"items":{"type":"string"},"type":"array"},"header":{"type":"string","const":"x-jaxon-credential"},"upgrade":{"type":"string"},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","credential","credential_id","grade","expires_at","limits","header","versions"],"description":"An evaluation credential, minted on request with no human gate (TJP-621). The token is shown here and nowhere else — the service stores only its hash. Send it as the x-jaxon-credential header. It is scoped to compile, check and the prompt pack, capped per day and over its lifetime, and expires; every response it produces carries x-jaxon-credential-grade: evaluation."}}}},"400":{"description":"This deployment does not require credentials, so it issues none.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}},"429":{"description":"Too many evaluation credentials were issued from this network today. The message is an upgrade prompt.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean","const":false},"error":{"properties":{"code":{"type":"string","enum":["VALIDATION_REJECTED","COMPILE_FAILED","BUDGET_EXCEEDED","RULESET_NOT_FOUND","ENGINE_ERROR","ENGINE_BUSY","BAD_REQUEST","CREDENTIAL_REQUIRED","CREDENTIAL_INVALID","CREDENTIAL_SCOPE","EVALUATION_LIMIT","ENTITLEMENT_EXCEEDED","TIER_UNAVAILABLE"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri","description":"The docs-site page that resolves this code (markdown). Fetch it before retrying blind."},"failures":{"items":{"properties":{"field":{"type":"string"},"expected":{"type":"string"},"received":{"type":"string"}},"type":"object","required":["field","expected","received"]},"type":"array","description":"EVERY failing field, not the first one."},"failure_count":{"type":"integer","description":"How many fields failed in total. Equal to the length of `failures` unless a very large rejection was truncated, which the message says."},"diagnostics":{"items":{"properties":{"severity":{"type":"string","enum":["error","warning"]},"line":{"type":["integer","null"]},"message":{"type":"string"}},"type":"object","required":["severity","message"]},"type":"array"},"hint":{"type":"string","description":"The grammar guide, carried on compile failures so the next call can succeed without a human."},"budget":{"type":"string"},"limit":{"type":"integer"},"actual":{"type":"integer","description":"How much the request used, where that is known. Absent for solver_memory_mb: the solver stops at the limit."},"retry_after_ms":{"type":"integer","description":"ENGINE_BUSY only: when to retry. The REST door also sends it, in seconds, as Retry-After."}},"type":"object","required":["code","message"]},"versions":{"properties":{"engine":{"type":"string","example":"dsail-core"},"engine_version":{"type":"string"},"language_version":{"type":"string","description":"DSAIL language version."},"supported_language_versions":{"items":{"type":"string"},"type":"array"},"service_version":{"type":"string"},"wire_version":{"type":"string"}},"type":"object","required":["engine","engine_version","language_version","service_version","wire_version"],"description":"Which engine and which wire contract produced this response."}},"type":"object","required":["ok","error","versions"]}}}}}}},"/v1/workspaces":{"get":{"tags":["teams"],"summary":"Every workspace you may work in, and which one is in use","operationId":"list_workspaces_v1_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/workspaces/current":{"post":{"tags":["teams"],"summary":"Work in a different team, or in your own workspace","operationId":"use_workspace_v1_workspaces_current_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseWorkspaceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/teams":{"post":{"tags":["teams"],"summary":"Create a team with a ruleset library of its own","operationId":"create_team_v1_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/teams/{team_id}/members":{"get":{"tags":["teams"],"summary":"Who is in this team, and who administers it","operationId":"team_members_v1_teams__team_id__members_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/teams/{team_id}/invitations":{"post":{"tags":["teams"],"summary":"Invite somebody by email. The link comes back once.","operationId":"invite_to_team_v1_teams__team_id__invitations_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/teams/{team_id}/members/{member}/role":{"post":{"tags":["teams"],"summary":"Make a member an administrator, or return them to a member","operationId":"set_team_role_v1_teams__team_id__members__member__role_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/teams/{team_id}/members/{member}":{"delete":{"tags":["teams"],"summary":"Remove a member and revoke the keys they issued for this team","operationId":"remove_from_team_v1_teams__team_id__members__member__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"member","in":"path","required":true,"schema":{"type":"string","title":"Member"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/rulesets/{name}/copies":{"post":{"tags":["teams"],"summary":"Copy one of your rulesets into another of your workspaces","operationId":"copy_ruleset_v1_rulesets__name__copies_post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyRulesetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/credentials/api-key":{"post":{"tags":["operations"],"summary":"Issue a production REST API key for the caller's own project (TJP-623). The token appears once.","description":"Grade three, for a caller who has already proved the account is theirs.\n\nAuthenticated by whatever the caller already holds — the connector's\nOAuth subject through the MCP door, or an existing credential here — and\nissued into that caller's own namespace. There is deliberately no route\nthat issues one to the bearer of a link.","operationId":"issue_api_key_v1_credentials_api_key_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IssueApiKeyRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AddConverterRequest":{"properties":{"from_unit":{"type":"string","title":"From Unit","description":"The unit being converted FROM."},"to_unit":{"type":"string","title":"To Unit","description":"The unit being converted TO."},"factor":{"type":"number","title":"Factor","description":"to = from * factor + offset. Required, and never inferred: a rate is a policy decision, so it is supplied by a person."},"offset":{"type":"number","title":"Offset","description":"Affine offset; 0 for every scale but temperature.","default":0.0},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution","description":"Where this figure came from. Recorded alongside the edit; deliberately not part of the library hash."}},"type":"object","required":["from_unit","to_unit","factor"],"title":"AddConverterRequest"},"ApprovalRequest":{"properties":{"ruleset_hash":{"type":"string","title":"Ruleset Hash"},"approver":{"type":"string","title":"Approver"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Save the ruleset under this name as part of approving it. The binding happens BEFORE the approval is recorded, so what a person approves is findable afterwards rather than reachable only by a hash. Omit for a hash that is already saved under a name."},"label":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Label","description":"Optional application-domain label from YOUR model (TJP-642): {domain: <a level-one id from GET /v1/vocabulary>, topic: <a short free-text level-two term>, confidence: high|medium|low, declined: bool}. Inert — it never changes a result. Stored and reported as ids only; the topic string is matched against the vocabulary and then dropped. Off-list domains are refused. Omit it, or send {declined: true}, to not label."}},"type":"object","required":["ruleset_hash","approver"],"title":"ApprovalRequest"},"CheckRequest":{"properties":{"claims":{"additionalProperties":true,"type":"object","title":"Claims","description":"Claim name to value. Every declared claim must be present; a claim you could not determine is submitted as \"unknown\" or null."},"ruleset_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ruleset Hash","description":"The hash returned by compile. Preferred after the first call."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source text, if you have not compiled it yet. Passing both is allowed and asserts they agree; a mismatch is refused."},"label":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Label","description":"Optional application-domain label from YOUR model (TJP-642): {domain: <a level-one id from GET /v1/vocabulary>, topic: <a short free-text level-two term>, confidence: high|medium|low, declined: bool}. Inert — it never changes a result. Stored and reported as ids only; the topic string is matched against the vocabulary and then dropped. Off-list domains are refused. Omit it, or send {declined: true}, to not label."}},"type":"object","required":["claims"],"title":"CheckRequest"},"CompileRequest":{"properties":{"source":{"type":"string","title":"Source","description":"DSAIL ruleset source. Host annotations may appear in comments."},"parent_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Hash","description":"The revision this one supersedes. A revision is a new object with a parent, never an edit of the old one."},"label":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Label","description":"Optional application-domain label from YOUR model (TJP-642): {domain: <a level-one id from GET /v1/vocabulary>, topic: <a short free-text level-two term>, confidence: high|medium|low, declined: bool}. Inert — it never changes a result. Stored and reported as ids only; the topic string is matched against the vocabulary and then dropped. Off-list domains are refused. Omit it, or send {declined: true}, to not label."}},"type":"object","required":["source"],"title":"CompileRequest"},"CopyRulesetRequest":{"properties":{"destination":{"type":"string","title":"Destination","description":"Where to copy it TO: a team's name or id, or `personal`."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Where to copy it FROM. Defaults to the workspace in use."},"new_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"New Name","description":"Bind the copy under this name instead. A name already in use in the destination is refused rather than overwritten."}},"type":"object","required":["destination"],"title":"CopyRulesetRequest"},"CreateTeamRequest":{"properties":{"name":{"type":"string","maxLength":64,"title":"Name","description":"What to call the team. A label shown to its members, not an identifier: it need not be unique, and nothing is addressed by it."}},"type":"object","required":["name"],"title":"CreateTeamRequest"},"EvaluationCredentialRequest":{"properties":{"client":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Client","description":"What is asking, e.g. 'dsail-python/0.1.0'. Recorded as the credential's label; never required."}},"type":"object","title":"EvaluationCredentialRequest"},"InviteRequest":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email","description":"The address to invite. Only somebody signing in as this address can accept, and only once. The address itself is not stored."}},"type":"object","required":["email"],"title":"InviteRequest"},"IssueApiKeyRequest":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Label","description":"What this key is for, e.g. 'invoice service'. Recorded on the credential so an operator can tell two of them apart; never required."}},"type":"object","title":"IssueApiKeyRequest"},"PromptPackRequest":{"properties":{"ruleset_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ruleset Hash"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","title":"PromptPackRequest"},"RoleRequest":{"properties":{"role":{"type":"string","title":"Role","description":"`admin` or `member`. Changes only who may invite, remove and promote — every member already reads and writes the whole of the team's library."}},"type":"object","required":["role"],"title":"RoleRequest"},"SaveRulesetRequest":{"properties":{"name":{"type":"string","title":"Name"},"source":{"type":"string","title":"Source"},"parent_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Hash"},"label":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Label","description":"Optional application-domain label from YOUR model (TJP-642): {domain: <a level-one id from GET /v1/vocabulary>, topic: <a short free-text level-two term>, confidence: high|medium|low, declined: bool}. Inert — it never changes a result. Stored and reported as ids only; the topic string is matched against the vocabulary and then dropped. Off-list domains are refused. Omit it, or send {declined: true}, to not label."}},"type":"object","required":["name","source"],"title":"SaveRulesetRequest"},"UseWorkspaceRequest":{"properties":{"workspace":{"type":"string","title":"Workspace","description":"A team's name or id, or `personal` for your own workspace. Resolved against your own memberships, so two teams may share a name; an ambiguous name is refused and names the ids."}},"type":"object","required":["workspace"],"title":"UseWorkspaceRequest"}}}}