{"openapi":"3.1.0","info":{"title":"analyzr API","version":"0.1.0-alpha.0","description":"analyzr: a headless store for BPMN process landscapes. Problems are RFC 9457 `application/problem+json`."},"security":[{"agentToken":[]},{}],"components":{"securitySchemes":{"agentToken":{"type":"http","scheme":"bearer","description":"Agent token (`analyzr_at_…`). In local mode the web UI and the CLI act as the owner through the session cookie from `POST /api/v1/session` instead."}},"schemas":{"Candidate":{"type":"object","properties":{"type":{"type":"string","enum":["call","message","signal","trigger"]},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"basis":{"$ref":"#/components/schemas/CandidateBasis"},"score":{"type":"number","minimum":0,"maximum":1},"signals":{"$ref":"#/components/schemas/CandidateSignals"}},"required":["type","from","to","basis","score","signals"],"description":"A candidate relation for agents to judge."},"Ref":{"type":"string","maxLength":456,"pattern":"^([a-z0-9]+(?:-[a-z0-9]+)*(?:\\/[a-z0-9]+(?:-[a-z0-9]+)*)*)#([A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)$","description":"Reference to a BPMN element: `<model_key>#<element_id>`, or `<model_key>#<process_id>` for a process.","example":"vertrieb/auftragsabwicklung#Event_WareVersandbereit"},"CandidateBasis":{"type":"string","enum":["rule","key","lexical","compatible"],"description":"Why a pair of endpoints is a candidate."},"CandidateSignals":{"type":"object","properties":{"keyEqual":{"type":"boolean"},"jaccard":{"type":"number","minimum":0,"maximum":1},"levenshtein":{"type":"number","minimum":0,"maximum":1},"eventDefCompatible":{"type":"boolean"}},"description":"Similarity signals behind a candidate score."},"DerivedRelation":{"type":"object","properties":{"type":{"type":"string","enum":["call","message","signal","trigger"]},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"status":{"type":"string","enum":["accepted","proposed"]},"tier":{"$ref":"#/components/schemas/Tier"},"confidence":{"type":"number","minimum":0,"maximum":1},"attrs":{"type":"object","additionalProperties":{}}},"required":["type","from","to","status","tier","confidence","attrs"],"description":"A relation computed by code (rules or baseline)."},"Tier":{"type":"string","enum":["key","lexical","semantic","manual","rule"],"description":"Evidence tier of a relation."},"ProjectFacts":{"type":"object","properties":{"models":{"type":"array","items":{"$ref":"#/components/schemas/ModelFacts"}}},"required":["models"],"description":"Head facts of all of a project's models."},"ModelFacts":{"type":"object","properties":{"modelKey":{"$ref":"#/components/schemas/ModelKey"},"factsVersion":{"type":"string"},"processes":{"type":"array","items":{"$ref":"#/components/schemas/ProcessInfo"}},"facts":{"type":"array","items":{"$ref":"#/components/schemas/Fact"}},"messageFlows":{"type":"array","items":{"$ref":"#/components/schemas/MessageFlowInfo"}}},"required":["modelKey","factsVersion","processes","facts","messageFlows"],"description":"Facts of one model revision."},"ModelKey":{"type":"string","maxLength":200,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\/[a-z0-9]+(?:-[a-z0-9]+)*)*$","description":"Immutable model key: lowercase slug segments separated by `/`.","example":"finanzen/rechnungsstellung"},"ProcessInfo":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/Ref"},"processId":{"$ref":"#/components/schemas/ElementId"},"name":{"type":["string","null"]},"participantName":{"type":["string","null"]},"isExecutable":{"type":"boolean"}},"required":["ref","processId","name","participantName","isExecutable"],"description":"A BPMN process defined in a model."},"ElementId":{"type":"string","maxLength":255,"pattern":"^[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$","description":"BPMN element or process id (XML NCName).","example":"Event_WareVersandbereit"},"Fact":{"type":"object","properties":{"modelKey":{"$ref":"#/components/schemas/ModelKey"},"ref":{"$ref":"#/components/schemas/Ref"},"kind":{"$ref":"#/components/schemas/FactKind"},"elementId":{"$ref":"#/components/schemas/ElementId"},"processId":{"anyOf":[{"$ref":"#/components/schemas/ElementId"},{"type":"null"}]},"scope":{"$ref":"#/components/schemas/FactScope"},"eventDef":{"anyOf":[{"$ref":"#/components/schemas/EventDef"},{"type":"null"}]},"label":{"type":"string","maxLength":200},"keyRaw":{"type":"string"},"keyNorm":{"type":"string"},"fingerprint":{"type":"string","pattern":"^[0-9a-f]{12}$"},"attrs":{"$ref":"#/components/schemas/FactAttrs"}},"required":["modelKey","ref","kind","elementId","processId","scope","eventDef","label","keyRaw","keyNorm","fingerprint","attrs"],"description":"A fact extracted from one BPMN model revision."},"FactKind":{"type":"string","enum":["process","call","msg_throw","msg_catch","sig_throw","sig_catch","evt_start","evt_end","data_store","message_flow","lane","task"],"description":"Kind of a fact extracted from a BPMN model."},"FactScope":{"type":"string","enum":["process","subprocess","event_subprocess"],"description":"Scope of the element within its process."},"EventDef":{"type":"string","enum":["none","message","signal","timer","conditional","error","escalation","terminate","link","compensate","multiple"],"description":"Event definition of an event; `none` for a plain event."},"FactAttrs":{"type":"object","properties":{"elementType":{"type":"string"},"documentation":{"type":"string","maxLength":2000},"participantName":{"type":"string"},"participantId":{"type":"string"},"isExecutable":{"type":"boolean"},"dynamic":{"type":"boolean"},"messageName":{"type":"string"},"signalName":{"type":"string"},"correlationKey":{"type":"string"},"subprocessId":{"type":"string"},"readBy":{"type":"array","items":{"type":"string"}},"writtenBy":{"type":"array","items":{"type":"string"}},"flowNodeRefs":{"type":"array","items":{"type":"string"}},"binding":{"type":"string"},"version":{"type":"string"},"versionTag":{"type":"string"},"tenantId":{"type":"string"},"attachedTo":{"type":"string"},"interrupting":{"type":"boolean"},"sourceRef":{"$ref":"#/components/schemas/Ref"},"targetRef":{"$ref":"#/components/schemas/Ref"}},"additionalProperties":{},"description":"Kind-specific attributes of a fact (open object)."},"MessageFlowInfo":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/Ref"},"elementId":{"$ref":"#/components/schemas/ElementId"},"name":{"type":["string","null"]},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"messageName":{"type":["string","null"]}},"required":["ref","elementId","name","from","to","messageName"],"description":"A message flow within one collaboration file."},"ValueChainViolation":{"type":"object","properties":{"reason":{"$ref":"#/components/schemas/ValueChainViolationReason"},"elementId":{"type":["string","null"]},"connectionId":{"type":["string","null"]},"path":{"type":["string","null"]},"detail":{"type":"string"}},"required":["reason","elementId","connectionId","path","detail"],"description":"One reason a value chain is refused."},"ValueChainViolationReason":{"type":"string","enum":["not-json","not-an-object","schema","duplicate-id","unknown-endpoint","self-connection","connection-not-allowed","document-too-large","too-many-elements","too-many-connections","name-required","name-too-long","name-characters","id-too-long","id-characters","reserved-id","link-too-long","link-characters","geometry-out-of-range","multiple-parents","hierarchy-cycle","hierarchy-too-deep","duplicate-connection","sequence-cycle"],"description":"Why a value chain is refused."},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"version":{"type":"string"},"db":{"type":"string","enum":["ok","down"]},"demo":{"type":"string","enum":["readonly"],"description":"Present only on a read-only demo: nothing can be changed."},"imprintUrl":{"type":"string","maxLength":2048,"format":"uri","description":"Only on a read-only demo whose operator set one: the absolute https URL of its legal notice (Impressum)."},"privacyUrl":{"type":"string","maxLength":2048,"format":"uri","description":"Only on a read-only demo whose operator set one: the absolute https URL of its privacy policy."}},"required":["status","version","db"],"description":"Server health."},"Me":{"type":"object","properties":{"principalId":{"$ref":"#/components/schemas/PrincipalId"},"kind":{"type":"string","enum":["user","service"]},"handle":{"type":"string"},"authMode":{"$ref":"#/components/schemas/AuthMode"},"clientId":{"type":["string","null"]}},"required":["principalId","kind","handle","authMode","clientId"],"description":"The authenticated caller."},"PrincipalId":{"type":"string","pattern":"^prn_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Principal id (`prn_` + ULID).","example":"prn_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"AuthMode":{"type":"string","enum":["local","oidc"],"description":"Authentication mode."},"ApiProblem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"code":{"$ref":"#/components/schemas/ProblemCode"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ProblemFieldError"}}},"required":["type","title","status","code"],"additionalProperties":{},"description":"RFC 9457 problem details."},"ProblemCode":{"type":"string","enum":["validation-failed","bpmn-invalid","unauthorized","insufficient-scope","forbidden","human-decision-required","demo-readonly","not-found","method-not-allowed","conflict","precondition-failed","precondition-required","revision-conflict","value-chain-invalid","value-chain-unsupported-version","lease-lost","task-cancelled","already-submitted","wrong-task-kind","payload-too-large","unsupported-media-type","internal","not-implemented"],"description":"Machine-readable problem code."},"ProblemFieldError":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"description":"One validation error."},"CreateSessionBody":{"type":"object","properties":{"client":{"$ref":"#/components/schemas/InteractiveClient"}},"description":"Request body to open a local-mode owner session."},"InteractiveClient":{"type":"string","enum":["analyzr-web","analyzr-cli"],"default":"analyzr-web","description":"Interactive client of a human user."},"ProjectPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"nextCursor":{"anyOf":[{"$ref":"#/components/schemas/Cursor"},{"type":"null"}]}},"required":["items","nextCursor"],"description":"A page of Project items."},"Project":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ProjectId"},"key":{"$ref":"#/components/schemas/ProjectKey"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"$ref":"#/components/schemas/Role"},"lastSeq":{"type":"integer","minimum":0},"createdAt":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","key","name","role","lastSeq","createdAt"],"description":"A project: one process landscape."},"ProjectId":{"type":"string","pattern":"^prj_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Project id (`prj_` + ULID).","example":"prj_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"ProjectKey":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Unique project key (lowercase slug).","example":"nordwind-handel"},"Role":{"type":"string","enum":["viewer","editor","owner"],"description":"Project role."},"Timestamp":{"type":"string","format":"date-time","description":"RFC 3339 timestamp (UTC).","example":"2026-10-06T12:00:00.000Z"},"Cursor":{"type":"string","maxLength":512,"description":"Opaque pagination cursor."},"CreateProjectBody":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/ProjectKey"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["key","name"],"description":"Request body to create a project."},"ModelPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Model"}},"nextCursor":{"anyOf":[{"$ref":"#/components/schemas/Cursor"},{"type":"null"}]}},"required":["items","nextCursor"],"description":"A page of Model items."},"Model":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ModelId"},"projectId":{"$ref":"#/components/schemas/ProjectId"},"key":{"$ref":"#/components/schemas/ModelKey"},"name":{"type":["string","null"]},"headRevisionId":{"$ref":"#/components/schemas/RevisionId"},"headRev":{"type":"integer","minimum":1},"engine":{"anyOf":[{"$ref":"#/components/schemas/Engine"},{"type":"null"}]},"stage":{"$ref":"#/components/schemas/ModelStage"},"openItems":{"type":"integer","minimum":0},"updatedAt":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","projectId","key","name","headRevisionId","headRev","engine","stage","openItems","updatedAt"],"description":"A BPMN model (one file) with a stable key."},"ModelId":{"type":"string","pattern":"^mdl_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Model id (`mdl_` + ULID).","example":"mdl_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"RevisionId":{"type":"string","pattern":"^rev_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Model revision id (`rev_` + ULID).","example":"rev_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"Engine":{"type":"string","enum":["c7","c8"],"description":"Target engine: Camunda 7 (`c7`) or Camunda 8 (`c8`)."},"ModelStage":{"type":"string","enum":["waiting_for_agent","agent_working","agent_failed","waiting_for_review","waiting_for_clarification","incorporated"],"description":"Pipeline stage of a model."},"PutModelResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["created","revised","unchanged"]},"model":{"$ref":"#/components/schemas/Model"},"revision":{"$ref":"#/components/schemas/Revision"}},"required":["outcome","model","revision"],"description":"Result of uploading one BPMN file."},"Revision":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/RevisionId"},"modelId":{"$ref":"#/components/schemas/ModelId"},"rev":{"type":"integer","minimum":1},"contentHash":{"$ref":"#/components/schemas/Sha256Hex"},"factsHash":{"$ref":"#/components/schemas/Sha256Hex"},"factsVersion":{"type":"string"},"engine":{"anyOf":[{"$ref":"#/components/schemas/Engine"},{"type":"null"}]},"source":{"$ref":"#/components/schemas/RevisionSource"},"seq":{"type":"integer","minimum":1},"createdAt":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","modelId","rev","contentHash","factsHash","factsVersion","engine","source","seq","createdAt"],"description":"An immutable revision of a model."},"Sha256Hex":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Lowercase hex SHA-256 digest."},"RevisionSource":{"type":"object","properties":{"kind":{"type":"string","enum":["upload","import","seed"]},"path":{"type":"string"}},"required":["kind"],"additionalProperties":{},"description":"Origin of a revision."},"BpmnXml":{"type":"string","description":"BPMN 2.0 XML document (UTF-8)."},"RevisionPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Revision"}},"nextCursor":{"anyOf":[{"$ref":"#/components/schemas/Cursor"},{"type":"null"}]}},"required":["items","nextCursor"],"description":"A page of Revision items."},"RevisionFacts":{"type":"object","properties":{"modelKey":{"$ref":"#/components/schemas/ModelKey"},"revisionId":{"$ref":"#/components/schemas/RevisionId"},"factsVersion":{"type":"string"},"processes":{"type":"array","items":{"$ref":"#/components/schemas/ProcessInfo"}},"facts":{"type":"array","items":{"$ref":"#/components/schemas/Fact"}},"messageFlows":{"type":"array","items":{"$ref":"#/components/schemas/MessageFlowInfo"}}},"required":["modelKey","revisionId","factsVersion","processes","facts","messageFlows"],"description":"Facts extracted from one revision."},"ImportResult":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/ImportFileOutcome"}}},"required":["files"],"description":"Outcome per file of an import."},"ImportFileOutcome":{"type":"object","properties":{"path":{"type":"string"},"modelKey":{"anyOf":[{"$ref":"#/components/schemas/ModelKey"},{"type":"null"}]},"outcome":{"type":"string","enum":["created","revised","unchanged","failed"]},"problem":{"anyOf":[{"$ref":"#/components/schemas/ApiProblem"},{"type":"null"}]}},"required":["path","modelKey","outcome","problem"],"description":"Outcome of one file of an import."},"ImportModelsBody":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"},"minItems":1,"description":"BPMN files; each part’s filename is its path below the import root."}},"required":["files"]},"Landscape":{"type":"object","properties":{"projectId":{"$ref":"#/components/schemas/ProjectId"},"seq":{"type":"integer","minimum":0},"models":{"type":"array","items":{"$ref":"#/components/schemas/LandscapeModel"}},"relations":{"type":"array","items":{"$ref":"#/components/schemas/Relation"}},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}}},"required":["projectId","seq","models","relations","findings"],"description":"The current process landscape of a project."},"LandscapeModel":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ModelId"},"key":{"$ref":"#/components/schemas/ModelKey"},"name":{"type":["string","null"]},"stage":{"$ref":"#/components/schemas/ModelStage"},"processes":{"type":"array","items":{"$ref":"#/components/schemas/ProcessInfo"}}},"required":["id","key","name","stage","processes"],"description":"A model as part of the landscape."},"Relation":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/RelationId"},"type":{"$ref":"#/components/schemas/RelationType"},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"status":{"$ref":"#/components/schemas/RelationStatus"},"endpointState":{"$ref":"#/components/schemas/EndpointState"},"tier":{"$ref":"#/components/schemas/Tier"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"version":{"type":"integer","minimum":1},"attrs":{"type":"object","additionalProperties":{}},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceKind"},{"type":"null"}]},"provenance":{"anyOf":[{"$ref":"#/components/schemas/RelationProvenance"},{"type":"null"}]},"noLinks":{"type":"array","items":{"$ref":"#/components/schemas/RelationNoLink"}},"updatedAt":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","type","from","to","status","endpointState","tier","confidence","version","attrs","source","provenance","noLinks","updatedAt"],"description":"A relation between two processes."},"RelationId":{"type":"string","pattern":"^rel_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Relation id (`rel_` + ULID).","example":"rel_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"RelationType":{"type":"string","enum":["call","message","signal","trigger","manual"],"description":"Type of a relation between two processes."},"RelationStatus":{"type":"string","enum":["proposed","accepted","rejected","held","obsolete"],"description":"Review status of a relation."},"EndpointState":{"type":"string","enum":["ok","changed","missing"],"description":"State of the relation endpoints in the head revisions."},"SourceKind":{"type":"string","enum":["human","agent","rule"],"description":"Origin of an assertion."},"RelationProvenance":{"type":"object","properties":{"assertionId":{"$ref":"#/components/schemas/AssertionId"},"kind":{"$ref":"#/components/schemas/AssertionKind"},"verdict":{"anyOf":[{"$ref":"#/components/schemas/Verdict"},{"type":"null"}]},"sourceKind":{"$ref":"#/components/schemas/SourceKind"},"principalId":{"$ref":"#/components/schemas/PrincipalId"},"handle":{"type":"string"},"clientId":{"type":["string","null"]},"procedure":{"anyOf":[{"$ref":"#/components/schemas/DeclaredProcedure"},{"type":"null"}]},"llmModel":{"type":["string","null"]},"tier":{"anyOf":[{"$ref":"#/components/schemas/Tier"},{"type":"null"}]},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"rationale":{"type":["string","null"]},"question":{"type":["string","null"]},"label":{"type":["string","null"]},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["assertionId","kind","verdict","sourceKind","principalId","handle","clientId","procedure","llmModel","tier","confidence","rationale","question","label","at"],"description":"The assertion a relation status rests on."},"AssertionId":{"type":"string","pattern":"^asr_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Relation assertion id (`asr_` + ULID).","example":"asr_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"AssertionKind":{"type":"string","enum":["proposal","withdrawal","decision","note"],"description":"Kind of a relation assertion."},"Verdict":{"type":"string","enum":["accept","reject","hold"],"description":"Verdict of a decision."},"DeclaredProcedure":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"version":{"type":"string","minLength":1,"maxLength":50}},"required":["id","version"],"description":"Procedure id and version declared by an agent."},"RelationNoLink":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/NoLinkId"},"handle":{"type":"string"},"origin":{"$ref":"#/components/schemas/ModelKey"},"reason":{"type":"string"},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","handle","origin","reason","at"],"description":"An agent judgement that the pair is unrelated."},"NoLinkId":{"type":"string","pattern":"^nlk_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Stored no-link id (`nlk_` + ULID).","example":"nlk_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"Finding":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/FindingKind"},"refs":{"type":"array","items":{"$ref":"#/components/schemas/Ref"},"minItems":1},"detail":{"type":"string"}},"required":["kind","refs","detail"],"description":"A deterministic finding about the landscape."},"FindingKind":{"type":"string","enum":["unresolved-call","dynamic-call","duplicate-process-id","dangling-throw","unmatched-catch"],"description":"Kind of a deterministic finding."},"RelationPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Relation"}},"nextCursor":{"anyOf":[{"$ref":"#/components/schemas/Cursor"},{"type":"null"}]}},"required":["items","nextCursor"],"description":"A page of Relation items."},"FindingList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}}},"required":["items"],"description":"Deterministic findings of the project head."},"NoLinkList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/NoLink"}}},"required":["items"],"description":"Live, current agent no-links, oldest first."},"NoLink":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/NoLinkId"},"type":{"type":"string","enum":["call","message","signal","trigger"]},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"handle":{"type":"string"},"origin":{"$ref":"#/components/schemas/ModelKey"},"reason":{"type":"string"},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","type","from","to","handle","origin","reason","at"],"description":"An agent judgement that a typed pair is unrelated."},"RelationAssertionList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RelationAssertion"}}},"required":["items"],"description":"The history of a relation, oldest first."},"RelationAssertion":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AssertionId"},"seq":{"type":"integer","minimum":1},"kind":{"$ref":"#/components/schemas/AssertionKind"},"verdict":{"anyOf":[{"$ref":"#/components/schemas/Verdict"},{"type":"null"}]},"sourceKind":{"$ref":"#/components/schemas/SourceKind"},"principalId":{"$ref":"#/components/schemas/PrincipalId"},"handle":{"type":"string"},"clientId":{"type":["string","null"]},"procedure":{"anyOf":[{"$ref":"#/components/schemas/DeclaredProcedure"},{"type":"null"}]},"llmModel":{"type":["string","null"]},"submissionId":{"anyOf":[{"$ref":"#/components/schemas/SubmissionId"},{"type":"null"}]},"tier":{"anyOf":[{"$ref":"#/components/schemas/Tier"},{"type":"null"}]},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"rationale":{"type":["string","null"]},"evidence":{"type":"array","items":{"type":"string"}},"question":{"type":["string","null"]},"label":{"type":["string","null"]},"linkedRelationId":{"anyOf":[{"$ref":"#/components/schemas/RelationId"},{"type":"null"}]},"fromFp":{"type":["string","null"]},"toFp":{"type":["string","null"]},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","seq","kind","verdict","sourceKind","principalId","handle","clientId","procedure","llmModel","submissionId","tier","confidence","rationale","evidence","question","label","linkedRelationId","fromFp","toFp","at"],"description":"One assertion of a relation history."},"SubmissionId":{"type":"string","pattern":"^sbm_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Stored analysis submission id (`sbm_` + ULID); not the client-chosen `submissionId`.","example":"sbm_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"ProposeRelationResult":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/ProposalOutcome"},"relation":{"$ref":"#/components/schemas/Relation"}},"required":["result","relation"],"description":"Outcome of an ad-hoc proposal."},"ProposalOutcome":{"type":"string","enum":["applied","duplicate","suppressed","reopened","invalid:malformed-ref","invalid:type-not-allowed","invalid:unknown-ref","invalid:outside-task-model","invalid:type-mismatch","invalid:same-process","invalid:message-flow","invalid:confidence-out-of-range","invalid:rationale-too-long","invalid:question-too-long","invalid:too-much-evidence","invalid:control-characters"],"description":"Outcome of one proposed relation."},"ProposeRelationBody":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/RelationType"},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"confidence":{"type":"number","minimum":0,"maximum":1},"rationale":{"type":"string","maxLength":1000},"evidence":{"type":"array","items":{"type":"string","maxLength":1000},"maxItems":20,"default":[]},"question":{"type":["string","null"],"maxLength":500,"default":null},"procedure":{"anyOf":[{"$ref":"#/components/schemas/DeclaredProcedure"},{"type":"null"}],"default":null},"llmModel":{"type":["string","null"],"minLength":1,"maxLength":100,"default":null}},"required":["type","from","to","confidence","rationale"],"description":"An ad-hoc relation proposal."},"DecisionResult":{"type":"object","properties":{"relation":{"$ref":"#/components/schemas/Relation"},"corrected":{"anyOf":[{"$ref":"#/components/schemas/Relation"},{"type":"null"}]}},"required":["relation","corrected"],"description":"The decided relation (and its correction)."},"DecisionBody":{"oneOf":[{"type":"object","properties":{"verdict":{"type":"string","enum":["accept"]},"note":{"type":"string","maxLength":2000},"version":{"type":"integer","minimum":1}},"required":["verdict"]},{"type":"object","properties":{"verdict":{"type":"string","enum":["reject"]},"reason":{"type":"string","minLength":1,"maxLength":2000},"version":{"type":"integer","minimum":1}},"required":["verdict","reason"]},{"type":"object","properties":{"verdict":{"type":"string","enum":["hold"]},"note":{"type":"string","minLength":1,"maxLength":2000},"question":{"type":"string","minLength":1,"maxLength":500},"label":{"type":"string","minLength":1,"maxLength":100},"version":{"type":"integer","minimum":1}},"required":["verdict","note"]},{"type":"object","properties":{"verdict":{"type":"string","enum":["correct"]},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"note":{"type":"string","minLength":1,"maxLength":2000},"version":{"type":"integer","minimum":1}},"required":["verdict","from","to","note"]}],"description":"A human decision on one relation."},"BulkDecisionResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Relation"}}},"required":["items"],"description":"The decided relations."},"BulkDecisionBody":{"type":"object","properties":{"verdict":{"type":"string","enum":["accept","reject","hold"]},"reason":{"type":"string","minLength":1,"maxLength":2000},"note":{"type":"string","minLength":1,"maxLength":2000},"question":{"type":"string","minLength":1,"maxLength":500},"label":{"type":"string","minLength":1,"maxLength":100},"tier":{"$ref":"#/components/schemas/Tier"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/RelationId"},"version":{"type":"integer","minimum":1}},"required":["id","version"]},"minItems":1,"maxItems":500},"expectedCount":{"type":"integer","minimum":1,"maximum":500}},"required":["verdict","items","expectedCount"],"description":"One verdict for many relations."},"NoteBody":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000}},"required":["text"],"description":"A note on a relation."},"ValueChainList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ValueChain"}}},"required":["items"],"description":"The live value chains of a project."},"ValueChain":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ValueChainId"},"key":{"$ref":"#/components/schemas/ValueChainKey"},"name":{"type":"string"},"headRevisionId":{"$ref":"#/components/schemas/ValueChainRevisionId"},"headRev":{"type":"integer","minimum":1},"contentHash":{"$ref":"#/components/schemas/Sha256Hex"},"structureHash":{"$ref":"#/components/schemas/Sha256Hex"},"schemaVersion":{"type":"integer","minimum":1},"updatedAt":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","key","name","headRevisionId","headRev","contentHash","structureHash","schemaVersion","updatedAt"],"description":"A value chain of a project."},"ValueChainId":{"type":"string","pattern":"^vch_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Value chain id (`vch_` + ULID).","example":"vch_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"ValueChainKey":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Value chain key (M4: `main`).","example":"main"},"ValueChainRevisionId":{"type":"string","pattern":"^vcr_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Value chain revision id (`vcr_` + ULID).","example":"vcr_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"SaveValueChainResult":{"type":"object","properties":{"dryRun":{"type":"boolean"},"outcome":{"type":"string","enum":["created","revived","revised","unchanged"]},"valueChain":{"anyOf":[{"$ref":"#/components/schemas/ValueChain"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/ValueChainRevision"},{"type":"null"}]},"impact":{"$ref":"#/components/schemas/ValueChainImpact"}},"required":["dryRun","outcome","valueChain","revision","impact"],"description":"Outcome of a value chain save."},"ValueChainRevision":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ValueChainRevisionId"},"rev":{"type":"integer","minimum":1},"contentHash":{"$ref":"#/components/schemas/Sha256Hex"},"structureHash":{"$ref":"#/components/schemas/Sha256Hex"},"schemaVersion":{"type":"integer","minimum":1},"baseRevisionId":{"anyOf":[{"$ref":"#/components/schemas/ValueChainRevisionId"},{"type":"null"}]},"principalId":{"$ref":"#/components/schemas/PrincipalId"},"handle":{"type":"string"},"seq":{"type":"integer","minimum":1},"createdAt":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","rev","contentHash","structureHash","schemaVersion","baseRevisionId","principalId","handle","seq","createdAt"],"description":"An immutable value chain revision."},"ValueChainImpact":{"type":"object","properties":{"structureChanged":{"type":"boolean"},"steps":{"type":"object","properties":{"added":{"type":"array","items":{"type":"object","properties":{"elementId":{"type":"string"},"name":{"type":"string"}},"required":["elementId","name"]}},"removed":{"type":"array","items":{"type":"object","properties":{"elementId":{"type":"string"},"generation":{"type":"integer","minimum":1},"name":{"type":"string"},"placements":{"$ref":"#/components/schemas/ImpactPlacementCounts"}},"required":["elementId","generation","name","placements"]}},"changed":{"type":"array","items":{"type":"object","properties":{"elementId":{"type":"string"},"generation":{"type":"integer","minimum":1},"before":{"type":"object","properties":{"name":{"type":"string"},"parentId":{"type":["string","null"]},"kind":{"$ref":"#/components/schemas/StepKind"}},"required":["name","parentId","kind"]},"after":{"type":"object","properties":{"name":{"type":"string"},"parentId":{"type":["string","null"]},"kind":{"$ref":"#/components/schemas/StepKind"}},"required":["name","parentId","kind"]},"fingerprintChanged":{"type":"boolean"},"placements":{"$ref":"#/components/schemas/ImpactPlacementCounts"}},"required":["elementId","generation","before","after","fingerprintChanged","placements"]}}},"required":["added","removed","changed"]},"placements":{"type":"object","properties":{"stranded":{"type":"integer","minimum":0},"toReconfirm":{"type":"integer","minimum":0},"proposalsWithdrawn":{"type":"integer","minimum":0}},"required":["stranded","toReconfirm","proposalsWithdrawn"]}},"required":["structureChanged","steps","placements"],"description":"What a value chain save does to steps and placements."},"ImpactPlacementCounts":{"type":"object","properties":{"accepted":{"type":"integer","minimum":0},"held":{"type":"integer","minimum":0},"proposed":{"type":"integer","minimum":0}},"required":["accepted","held","proposed"],"description":"Placements on a step by status."},"StepKind":{"type":"string","enum":["core","management","support","other"],"description":"Kind of a value chain step."},"CreateValueChainBody":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/ValueChainKey"},"name":{"type":"string","minLength":1,"maxLength":200},"content":{"$ref":"#/components/schemas/ValueChainDocument"}},"required":["key"],"description":"Request body to create a value chain."},"ValueChainDocument":{"type":"object","additionalProperties":{},"description":"A value chain document (`.vc.json`, @miragon/value-chain-schema-model)."},"ValueChainDetail":{"type":"object","properties":{"valueChain":{"$ref":"#/components/schemas/ValueChain"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/ValueChainStep"}},"orgUnits":{"type":"array","items":{"$ref":"#/components/schemas/ValueChainOrgUnit"}},"placements":{"type":"array","items":{"$ref":"#/components/schemas/PlacementSummary"}},"findings":{"type":"array","items":{"$ref":"#/components/schemas/ValueChainFinding"}},"pipeline":{"$ref":"#/components/schemas/ValueChainPipeline"},"unsure":{"type":"array","items":{"$ref":"#/components/schemas/ValueChainUnsure"}}},"required":["valueChain","steps","orgUnits","placements","findings","pipeline","unsure"],"description":"A value chain with steps, placements and findings."},"ValueChainStep":{"type":"object","properties":{"elementId":{"type":"string"},"generation":{"type":"integer","minimum":1},"name":{"type":"string"},"kind":{"$ref":"#/components/schemas/StepKind"},"depth":{"type":"integer","minimum":0,"maximum":2},"rank":{"type":"integer","minimum":0},"parentId":{"type":["string","null"]},"path":{"type":"array","items":{"type":"string"}},"childIds":{"type":"array","items":{"type":"string"}},"link":{"type":["string","null"]},"linkKind":{"$ref":"#/components/schemas/LinkKind"},"linkProcess":{"type":["string","null"]},"linkResolved":{"type":"boolean"},"owners":{"type":"array","items":{"type":"object","properties":{"elementId":{"type":"string"},"name":{"type":"string"}},"required":["elementId","name"]}},"fingerprint":{"type":"string"},"counts":{"$ref":"#/components/schemas/StepPlacementCounts"}},"required":["elementId","generation","name","kind","depth","rank","parentId","path","childIds","link","linkKind","linkProcess","linkResolved","owners","fingerprint","counts"],"description":"A step of the head revision."},"LinkKind":{"type":"string","enum":["none","process","url","opaque"],"description":"Kind of a step link."},"StepPlacementCounts":{"type":"object","properties":{"accepted":{"type":"integer","minimum":0},"proposed":{"type":"integer","minimum":0},"held":{"type":"integer","minimum":0}},"required":["accepted","proposed","held"],"description":"Placements of a step by status."},"ValueChainOrgUnit":{"type":"object","properties":{"elementId":{"type":"string"},"name":{"type":"string"},"stepIds":{"type":"array","items":{"type":"string"}}},"required":["elementId","name","stepIds"],"description":"An org unit and the steps it owns."},"PlacementSummary":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PlacementId"},"elementId":{"type":"string"},"generation":{"type":"integer","minimum":1},"stepLive":{"type":"boolean"},"process":{"$ref":"#/components/schemas/Ref"},"status":{"$ref":"#/components/schemas/RelationStatus"},"endpointState":{"$ref":"#/components/schemas/EndpointState"},"tier":{"$ref":"#/components/schemas/PlacementTier"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"version":{"type":"integer","minimum":1},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceKind"},{"type":"null"}]}},"required":["id","elementId","generation","stepLive","process","status","endpointState","tier","confidence","version","source"],"description":"A placement in the chain overview."},"PlacementId":{"type":"string","pattern":"^plc_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Placement id (`plc_` + ULID).","example":"plc_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"PlacementTier":{"type":"string","enum":["key","lexical","semantic","manual"],"description":"Evidence tier of a placement: `key` (rule tier: a step link or an equal name), `lexical`, `semantic`, `manual`."},"ValueChainFinding":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/ValueChainFindingKind"},"elementId":{"type":["string","null"]},"process":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"link":{"type":["string","null"]},"state":{"anyOf":[{"$ref":"#/components/schemas/UnplacedState"},{"type":"null"}]},"calledFrom":{"type":"array","items":{"type":"object","properties":{"elementId":{"type":"string"},"process":{"$ref":"#/components/schemas/Ref"}},"required":["elementId","process"]}},"detail":{"type":"string"}},"required":["kind","elementId","process","link","state","calledFrom","detail"],"description":"A deterministic finding about the value chain."},"ValueChainFindingKind":{"type":"string","enum":["process-without-step","step-without-process","unresolved-link"],"description":"Kind of a value chain finding."},"UnplacedState":{"type":"string","enum":["none","proposed","held"],"description":"Review state of a process without a home step."},"ValueChainPipeline":{"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ModelStage"},"task":{"anyOf":[{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AnalysisTaskId"},"state":{"$ref":"#/components/schemas/AnalysisTaskState"},"attempts":{"type":"integer","minimum":0},"leaseUntil":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"claimedBy":{"type":["string","null"]}},"required":["id","state","attempts","leaseUntil","claimedBy"]},{"type":"null"}]},"reviewItems":{"type":"integer","minimum":0},"heldItems":{"type":"integer","minimum":0},"due":{"type":"integer","minimum":0},"unsure":{"type":"integer","minimum":0}},"required":["stage","task","reviewItems","heldItems","due","unsure"],"description":"Stage of the chain's placement pipeline."},"AnalysisTaskId":{"type":"string","pattern":"^ana_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Analysis task id (`ana_` + ULID).","example":"ana_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"AnalysisTaskState":{"type":"string","enum":["queued","claimed","done","failed","cancelled"],"description":"State of an analysis task."},"ValueChainUnsure":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/Ref"},"name":{"type":["string","null"]},"reason":{"type":"string"},"by":{"type":"string"},"at":{"$ref":"#/components/schemas/Timestamp"},"current":{"type":"boolean"}},"required":["process","name","reason","by","at","current"],"description":"A process the agent was unsure about."},"ValueChainRevisionPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ValueChainRevision"}},"nextCursor":{"anyOf":[{"$ref":"#/components/schemas/Cursor"},{"type":"null"}]}},"required":["items","nextCursor"],"description":"A page of ValueChainRevision items."},"ValueChainStepDetail":{"type":"object","properties":{"step":{"$ref":"#/components/schemas/ValueChainStep"},"breadcrumb":{"type":"array","items":{"type":"object","properties":{"elementId":{"type":"string"},"name":{"type":"string"}},"required":["elementId","name"]}},"children":{"type":"array","items":{"$ref":"#/components/schemas/ValueChainStep"}},"placements":{"type":"object","properties":{"own":{"type":"array","items":{"$ref":"#/components/schemas/Placement"}},"subtree":{"type":"array","items":{"$ref":"#/components/schemas/Placement"}},"reachedByCall":{"type":"array","items":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/Ref"},"name":{"type":["string","null"]},"via":{"type":"array","items":{"type":"object","properties":{"relationId":{"$ref":"#/components/schemas/RelationId"},"caller":{"$ref":"#/components/schemas/Ref"}},"required":["relationId","caller"]}}},"required":["process","name","via"]}}},"required":["own","subtree","reachedByCall"]}},"required":["step","breadcrumb","children","placements"],"description":"The drill-down of one value chain step."},"Placement":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PlacementId"},"valueChainId":{"$ref":"#/components/schemas/ValueChainId"},"elementId":{"type":"string"},"generation":{"type":"integer","minimum":1},"stepName":{"type":["string","null"]},"stepLive":{"type":"boolean"},"process":{"$ref":"#/components/schemas/Ref"},"processName":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/RelationStatus"},"endpointState":{"$ref":"#/components/schemas/EndpointState"},"endpoints":{"type":"object","properties":{"step":{"$ref":"#/components/schemas/EndpointState"},"process":{"$ref":"#/components/schemas/EndpointState"}},"required":["step","process"]},"tier":{"$ref":"#/components/schemas/PlacementTier"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"version":{"type":"integer","minimum":1},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceKind"},{"type":"null"}]},"provenance":{"anyOf":[{"$ref":"#/components/schemas/PlacementProvenance"},{"type":"null"}]},"updatedAt":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","valueChainId","elementId","generation","stepName","stepLive","process","processName","status","endpointState","endpoints","tier","confidence","version","source","provenance","updatedAt"],"description":"A process placed on a value chain step."},"PlacementProvenance":{"type":"object","properties":{"assertionId":{"$ref":"#/components/schemas/PlacementAssertionId"},"kind":{"$ref":"#/components/schemas/AssertionKind"},"verdict":{"anyOf":[{"$ref":"#/components/schemas/Verdict"},{"type":"null"}]},"sourceKind":{"$ref":"#/components/schemas/SourceKind"},"principalId":{"$ref":"#/components/schemas/PrincipalId"},"handle":{"type":"string"},"clientId":{"type":["string","null"]},"procedure":{"anyOf":[{"$ref":"#/components/schemas/DeclaredProcedure"},{"type":"null"}]},"llmModel":{"type":["string","null"]},"tier":{"anyOf":[{"$ref":"#/components/schemas/PlacementTier"},{"type":"null"}]},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"rationale":{"type":["string","null"]},"question":{"type":["string","null"]},"label":{"type":["string","null"]},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["assertionId","kind","verdict","sourceKind","principalId","handle","clientId","procedure","llmModel","tier","confidence","rationale","question","label","at"],"description":"The assertion a placement status rests on."},"PlacementAssertionId":{"type":"string","pattern":"^pas_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Placement assertion id (`pas_` + ULID).","example":"pas_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"ValueChainFindingList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ValueChainFinding"}}},"required":["items"],"description":"Findings of the value chain head."},"UnplacedProcessPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UnplacedProcess"}},"nextCursor":{"anyOf":[{"$ref":"#/components/schemas/Cursor"},{"type":"null"}]}},"required":["items","nextCursor"],"description":"A page of UnplacedProcess items."},"UnplacedProcess":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/Ref"},"name":{"type":["string","null"]},"modelKey":{"$ref":"#/components/schemas/ModelKey"},"lanes":{"type":"array","items":{"type":"string"}},"starts":{"type":"array","items":{"type":"string"},"maxItems":5},"ends":{"type":"array","items":{"type":"string"},"maxItems":5},"doc":{"type":"string","maxLength":200},"neighbours":{"type":"array","items":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/Ref"},"via":{"type":"array","items":{"type":"object","properties":{"relationId":{"$ref":"#/components/schemas/RelationId"},"type":{"$ref":"#/components/schemas/RelationType"},"direction":{"type":"string","enum":["out","in"]}},"required":["relationId","type","direction"]}},"steps":{"type":"array","items":{"type":"string"}}},"required":["process","via","steps"]}},"calls":{"type":"object","properties":{"out":{"type":"array","items":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/Ref"},"relationId":{"$ref":"#/components/schemas/RelationId"},"status":{"$ref":"#/components/schemas/RelationStatus"}},"required":["process","relationId","status"]}},"in":{"type":"array","items":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/Ref"},"relationId":{"$ref":"#/components/schemas/RelationId"},"status":{"$ref":"#/components/schemas/RelationStatus"}},"required":["process","relationId","status"]}}},"required":["out","in"]},"hints":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"name":{"type":"string"},"score":{"type":"number","minimum":0}},"required":["step","name","score"]},"maxItems":3},"judged":{"type":"object","properties":{"outcome":{"$ref":"#/components/schemas/PlacementInputOutcome"},"reason":{"type":"string"},"by":{"type":"string"},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["outcome","by","at"]},"inTask":{"type":"object","properties":{"taskId":{"$ref":"#/components/schemas/AnalysisTaskId"},"claimedBy":{"type":["string","null"]},"leaseUntil":{"$ref":"#/components/schemas/Timestamp"}},"required":["taskId","claimedBy","leaseUntil"]}},"required":["process","name","modelKey","lanes","starts","ends","neighbours","calls","hints"],"description":"A process without a home step on the chain."},"PlacementInputOutcome":{"type":"string","enum":["proposed","unsure","skipped"],"description":"The agent's last verdict on a process."},"PlacementPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Placement"}},"nextCursor":{"anyOf":[{"$ref":"#/components/schemas/Cursor"},{"type":"null"}]}},"required":["items","nextCursor"],"description":"A page of Placement items."},"PostPlacementsResult":{"oneOf":[{"$ref":"#/components/schemas/ProposePlacementsResult"},{"$ref":"#/components/schemas/ManualPlacementResult"}],"discriminator":{"propertyName":"kind","mapping":{"propose":"#/components/schemas/ProposePlacementsResult","manual":"#/components/schemas/ManualPlacementResult"}},"description":"Outcome of proposed or manual placements."},"ProposePlacementsResult":{"type":"object","properties":{"kind":{"type":"string","enum":["propose"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/PlacementItemResult"}},"counts":{"type":"object","properties":{"applied":{"type":"integer","minimum":0},"duplicate":{"type":"integer","minimum":0},"suppressed":{"type":"integer","minimum":0},"reopened":{"type":"integer","minimum":0},"invalid":{"type":"integer","minimum":0}},"required":["applied","duplicate","suppressed","reopened","invalid"]}},"required":["kind","items","counts"],"description":"Outcome per proposed placement."},"PlacementItemResult":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"result":{"$ref":"#/components/schemas/PlacementOutcome"},"placementId":{"anyOf":[{"$ref":"#/components/schemas/PlacementId"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/RelationStatus"},{"type":"null"}]}},"required":["index","result","placementId","status"],"description":"Outcome of one proposed placement."},"PlacementOutcome":{"type":"string","enum":["applied","duplicate","suppressed","reopened","invalid:malformed-step","invalid:malformed-ref","invalid:confidence-out-of-range","invalid:rationale-too-long","invalid:question-too-long","invalid:too-much-evidence","invalid:control-characters","invalid:rationale-required","invalid:unknown-step","invalid:unknown-process","invalid:unknown-evidence","invalid:too-many-steps"],"description":"Outcome of one proposed placement."},"ManualPlacementResult":{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]},"result":{"type":"string","enum":["applied","duplicate"]},"placement":{"$ref":"#/components/schemas/Placement"}},"required":["kind","result","placement"],"description":"The manual placement."},"PostPlacementsBody":{"oneOf":[{"$ref":"#/components/schemas/ProposePlacementsBody"},{"$ref":"#/components/schemas/ManualPlacementBody"}],"discriminator":{"propertyName":"kind","mapping":{"propose":"#/components/schemas/ProposePlacementsBody","manual":"#/components/schemas/ManualPlacementBody"}},"description":"Propose placements, or add a manual one."},"ProposePlacementsBody":{"type":"object","properties":{"kind":{"type":"string","enum":["propose"]},"procedure":{"anyOf":[{"$ref":"#/components/schemas/DeclaredProcedure"},{"type":"null"}],"default":null},"llmModel":{"type":["string","null"],"minLength":1,"maxLength":100,"default":null},"placements":{"type":"array","items":{"$ref":"#/components/schemas/PlacementItem"},"minItems":1,"maxItems":200}},"required":["kind","placements"],"description":"Placements proposed ad hoc."},"PlacementItem":{"type":"object","properties":{"step":{"type":"string","maxLength":1000},"process":{"type":"string","maxLength":1000},"confidence":{"type":"number"},"rationale":{"type":"string","maxLength":20000,"default":""},"evidence":{"type":"array","items":{"type":"string","maxLength":1000},"maxItems":200,"default":[]},"question":{"type":["string","null"],"maxLength":20000,"default":null}},"required":["step","process","confidence"],"description":"A placement an agent proposes."},"ManualPlacementBody":{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]},"step":{"type":"string","minLength":1,"maxLength":128},"process":{"$ref":"#/components/schemas/Ref"},"rationale":{"type":"string","minLength":1,"maxLength":1000},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["kind","step","process","rationale"],"description":"A manual placement, accepted at once."},"BulkPlacementDecisionResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Placement"}}},"required":["items"],"description":"The decided placements."},"BulkPlacementDecisionBody":{"type":"object","properties":{"verdict":{"type":"string","enum":["accept","reject","hold"]},"reason":{"type":"string","minLength":1,"maxLength":2000},"note":{"type":"string","minLength":1,"maxLength":2000},"question":{"type":"string","minLength":1,"maxLength":500},"label":{"type":"string","minLength":1,"maxLength":100},"tier":{"$ref":"#/components/schemas/PlacementTier"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PlacementId"},"version":{"type":"integer","minimum":1}},"required":["id","version"]},"minItems":1,"maxItems":500},"expectedCount":{"type":"integer","minimum":1,"maximum":500}},"required":["verdict","items","expectedCount"],"description":"One verdict for many placements."},"PlacementDecisionResult":{"type":"object","properties":{"placement":{"$ref":"#/components/schemas/Placement"},"corrected":{"anyOf":[{"$ref":"#/components/schemas/Placement"},{"type":"null"}]}},"required":["placement","corrected"],"description":"The decided placement (and its correction)."},"PlacementDecisionBody":{"oneOf":[{"type":"object","properties":{"verdict":{"type":"string","enum":["accept"]},"note":{"type":"string","maxLength":2000},"version":{"type":"integer","minimum":1}},"required":["verdict"]},{"type":"object","properties":{"verdict":{"type":"string","enum":["reject"]},"reason":{"type":"string","minLength":1,"maxLength":2000},"version":{"type":"integer","minimum":1}},"required":["verdict","reason"]},{"type":"object","properties":{"verdict":{"type":"string","enum":["hold"]},"note":{"type":"string","minLength":1,"maxLength":2000},"question":{"type":"string","minLength":1,"maxLength":500},"label":{"type":"string","minLength":1,"maxLength":100},"version":{"type":"integer","minimum":1}},"required":["verdict","note"]},{"type":"object","properties":{"verdict":{"type":"string","enum":["correct"]},"step":{"type":"string","minLength":1,"maxLength":128},"note":{"type":"string","minLength":1,"maxLength":2000},"version":{"type":"integer","minimum":1}},"required":["verdict","step","note"]}],"description":"A human decision on one placement."},"PlacementAssertion":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PlacementAssertionId"},"seq":{"type":"integer","minimum":1},"kind":{"$ref":"#/components/schemas/AssertionKind"},"verdict":{"anyOf":[{"$ref":"#/components/schemas/Verdict"},{"type":"null"}]},"sourceKind":{"$ref":"#/components/schemas/SourceKind"},"principalId":{"$ref":"#/components/schemas/PrincipalId"},"handle":{"type":"string"},"clientId":{"type":["string","null"]},"procedure":{"anyOf":[{"$ref":"#/components/schemas/DeclaredProcedure"},{"type":"null"}]},"llmModel":{"type":["string","null"]},"submissionId":{"anyOf":[{"$ref":"#/components/schemas/SubmissionId"},{"type":"null"}]},"tier":{"anyOf":[{"$ref":"#/components/schemas/PlacementTier"},{"type":"null"}]},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"rationale":{"type":["string","null"]},"evidence":{"type":"array","items":{"type":"string"}},"question":{"type":["string","null"]},"label":{"type":["string","null"]},"linkedPlacementId":{"anyOf":[{"$ref":"#/components/schemas/PlacementId"},{"type":"null"}]},"stepFp":{"type":["string","null"]},"processFp":{"type":["string","null"]},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","seq","kind","verdict","sourceKind","principalId","handle","clientId","procedure","llmModel","submissionId","tier","confidence","rationale","evidence","question","label","linkedPlacementId","stepFp","processFp","at"],"description":"One assertion of a placement history."},"PlacementAssertionList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlacementAssertion"}}},"required":["items"],"description":"The history of a placement, oldest first."},"ClaimResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ClaimedAnalysis"}}},"required":["items"],"description":"Claimed tasks; empty when nothing is queued."},"ClaimedAnalysis":{"oneOf":[{"$ref":"#/components/schemas/ClaimedRelationsAnalysis"},{"$ref":"#/components/schemas/ClaimedPlacementAnalysis"}],"discriminator":{"propertyName":"kind","mapping":{"relations":"#/components/schemas/ClaimedRelationsAnalysis","placement":"#/components/schemas/ClaimedPlacementAnalysis"}},"description":"A claimed analysis task with its lease and input, by kind."},"ClaimedRelationsAnalysis":{"type":"object","properties":{"kind":{"type":"string","enum":["relations"]},"taskId":{"$ref":"#/components/schemas/AnalysisTaskId"},"projectId":{"$ref":"#/components/schemas/ProjectId"},"projectKey":{"$ref":"#/components/schemas/ProjectKey"},"modelId":{"$ref":"#/components/schemas/ModelId"},"modelKey":{"$ref":"#/components/schemas/ModelKey"},"revisionId":{"$ref":"#/components/schemas/RevisionId"},"attempt":{"type":"integer","minimum":1},"leaseToken":{"type":"string","pattern":"^analyzr_lt_[A-Za-z0-9_-]{43}$"},"leaseUntil":{"$ref":"#/components/schemas/Timestamp"},"procedure":{"$ref":"#/components/schemas/DeclaredProcedure"},"input":{"$ref":"#/components/schemas/ClaimInput"}},"required":["kind","taskId","projectId","projectKey","modelId","modelKey","revisionId","attempt","leaseToken","leaseUntil","procedure","input"],"description":"A claimed relations task with its lease and input."},"ClaimInput":{"type":"object","properties":{"format":{"type":"string","enum":["analyzr-claim/1"]},"model":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/ModelKey"},"name":{"type":["string","null"]},"revisionId":{"$ref":"#/components/schemas/RevisionId"},"rev":{"type":"integer","minimum":1},"engine":{"anyOf":[{"$ref":"#/components/schemas/Engine"},{"type":"null"}]},"processes":{"type":"array","items":{"type":"object","properties":{"processId":{"$ref":"#/components/schemas/ElementId"},"name":{"type":["string","null"]},"participantName":{"type":["string","null"]}},"required":["processId","name","participantName"]}}},"required":["key","name","revisionId","rev","engine","processes"]},"facts":{"type":"array","items":{"$ref":"#/components/schemas/ClaimFact"}},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/ClaimCandidate"}},"partners":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ClaimEndpoint"}},"partnerProcesses":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ClaimPartnerProcess"}},"relations":{"type":"array","items":{"$ref":"#/components/schemas/ClaimRelation"}},"judged":{"type":"array","items":{"$ref":"#/components/schemas/ClaimJudged"}},"skip":{"type":"array","items":{"$ref":"#/components/schemas/ClaimSkip"}},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}}},"required":["format","model","facts","candidates","partners","relations"],"description":"Input of a claimed relations task (compact)."},"ClaimFact":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/Ref"},"kind":{"$ref":"#/components/schemas/FactKind"},"eventDef":{"$ref":"#/components/schemas/EventDef"},"label":{"type":"string"},"key":{"type":"string"},"scope":{"$ref":"#/components/schemas/FactScope"},"process":{"$ref":"#/components/schemas/ElementId"},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"doc":{"type":"string"}},"required":["ref","kind","label"],"description":"A fact of the claimed model (compact)."},"ClaimCandidate":{"type":"array","prefixItems":[{"type":"string","enum":["call","message","signal","trigger"]},{"$ref":"#/components/schemas/Ref"},{"$ref":"#/components/schemas/Ref"},{"$ref":"#/components/schemas/CandidateBasis"},{"type":"number","minimum":0,"maximum":1}],"description":"[type, from, to, basis, score]"},"ClaimEndpoint":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/FactKind"},"eventDef":{"$ref":"#/components/schemas/EventDef"},"label":{"type":"string"},"key":{"type":"string"},"scope":{"$ref":"#/components/schemas/FactScope"},"process":{"$ref":"#/components/schemas/Ref"},"processName":{"type":"string"},"doc":{"type":"string"}},"required":["kind","label","process"],"description":"An endpoint in another model (compact)."},"ClaimPartnerProcess":{"type":"object","properties":{"name":{"type":"string"},"doc":{"type":"string"}},"description":"A process of another model (compact)."},"ClaimRelation":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/RelationId"},"type":{"$ref":"#/components/schemas/RelationType"},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"status":{"$ref":"#/components/schemas/RelationStatus"},"tier":{"$ref":"#/components/schemas/Tier"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceKind"},{"type":"null"}]},"endpointState":{"$ref":"#/components/schemas/EndpointState"},"decision":{"$ref":"#/components/schemas/ClaimDecision"},"question":{"type":"string"},"notes":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["text","at"]}}},"required":["id","type","from","to","status","tier","confidence","source","endpointState"],"description":"An existing relation touching the model (compact)."},"ClaimDecision":{"type":"object","properties":{"verdict":{"$ref":"#/components/schemas/Verdict"},"note":{"type":"string"},"question":{"type":"string"},"label":{"type":"string"},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["verdict","at"],"description":"A human decision (compact)."},"ClaimJudged":{"anyOf":[{"$ref":"#/components/schemas/ClaimJudgedLink"},{"$ref":"#/components/schemas/ClaimJudgedNoLink"}],"description":"A current agent judgement on a pair."},"ClaimJudgedLink":{"type":"object","properties":{"relation":{"$ref":"#/components/schemas/RelationId"},"origin":{"$ref":"#/components/schemas/ModelKey"},"by":{"type":"string"},"mine":{"type":"boolean","enum":[true]}},"required":["relation","origin","by"],"description":"A current link verdict on a pair (compact)."},"ClaimJudgedNoLink":{"type":"object","properties":{"type":{"type":"string","enum":["call","message","signal","trigger"]},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"origin":{"$ref":"#/components/schemas/ModelKey"},"by":{"type":"string"},"mine":{"type":"boolean","enum":[true]},"reason":{"type":"string"}},"required":["type","from","to","origin","by","reason"],"description":"A current no-link verdict on a pair (compact)."},"ClaimSkip":{"type":"object","properties":{"type":{"type":"string","enum":["call","message","signal","trigger"]},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"},"model":{"$ref":"#/components/schemas/ModelKey"},"reason":{"type":"string","enum":["claimed","queued"]}},"required":["type","from","to","model","reason"],"description":"A candidate pair a partner analysis judges."},"ClaimedPlacementAnalysis":{"type":"object","properties":{"kind":{"type":"string","enum":["placement"]},"taskId":{"$ref":"#/components/schemas/AnalysisTaskId"},"projectId":{"$ref":"#/components/schemas/ProjectId"},"projectKey":{"$ref":"#/components/schemas/ProjectKey"},"valueChainId":{"$ref":"#/components/schemas/ValueChainId"},"valueChainKey":{"$ref":"#/components/schemas/ValueChainKey"},"revisionId":{"$ref":"#/components/schemas/ValueChainRevisionId"},"rev":{"type":"integer","minimum":1},"attempt":{"type":"integer","minimum":1},"leaseToken":{"type":"string","pattern":"^analyzr_lt_[A-Za-z0-9_-]{43}$"},"leaseUntil":{"$ref":"#/components/schemas/Timestamp"},"procedure":{"$ref":"#/components/schemas/DeclaredProcedure"},"input":{"$ref":"#/components/schemas/PlacementClaimInput"}},"required":["kind","taskId","projectId","projectKey","valueChainId","valueChainKey","revisionId","rev","attempt","leaseToken","leaseUntil","procedure","input"],"description":"A claimed placement task with its lease and input."},"PlacementClaimInput":{"type":"object","properties":{"format":{"type":"string","enum":["analyzr-claim-placement/1"]},"valueChain":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ValueChainId"},"key":{"$ref":"#/components/schemas/ValueChainKey"},"name":{"type":"string"},"revisionId":{"$ref":"#/components/schemas/ValueChainRevisionId"},"rev":{"type":"integer","minimum":1},"contentHash":{"$ref":"#/components/schemas/Sha256Hex"},"structureHash":{"$ref":"#/components/schemas/Sha256Hex"}},"required":["id","key","name","revisionId","rev","contentHash","structureHash"]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/ClaimPlacementStep"}},"processes":{"type":"array","items":{"$ref":"#/components/schemas/ClaimPlacementProcess"},"maxItems":50},"examples":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"process":{"$ref":"#/components/schemas/Ref"},"name":{"type":["string","null"]}},"required":["step","process","name"]}},"truncated":{"type":"boolean"},"remaining":{"type":"integer","minimum":0}},"required":["format","valueChain","steps","processes","examples","truncated","remaining"],"description":"Input of a claimed placement task (compact)."},"ClaimPlacementStep":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"path":{"type":"array","items":{"type":"string"}},"kind":{"$ref":"#/components/schemas/StepKind"},"rank":{"type":"integer","minimum":0},"depth":{"type":"integer","minimum":0},"parentId":{"type":["string","null"]},"children":{"type":"array","items":{"type":"string"}},"link":{"$ref":"#/components/schemas/Ref"}},"required":["id","name","path","kind","rank","depth","parentId","children"],"description":"A value chain step in a placement claim."},"ClaimPlacementProcess":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/Ref"},"name":{"type":["string","null"]},"modelKey":{"$ref":"#/components/schemas/ModelKey"},"lanes":{"type":"array","items":{"type":"string"}},"starts":{"type":"array","items":{"type":"string"},"maxItems":5},"ends":{"type":"array","items":{"type":"string"},"maxItems":5},"doc":{"type":"string","maxLength":200},"neighbours":{"type":"array","items":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/Ref"},"via":{"type":"array","items":{"type":"object","properties":{"relationId":{"$ref":"#/components/schemas/RelationId"},"type":{"$ref":"#/components/schemas/RelationType"},"direction":{"type":"string","enum":["out","in"]}},"required":["relationId","type","direction"]}},"steps":{"type":"array","items":{"type":"string"}}},"required":["process","via","steps"]}},"calls":{"type":"object","properties":{"out":{"type":"array","items":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/Ref"},"relationId":{"$ref":"#/components/schemas/RelationId"},"status":{"$ref":"#/components/schemas/RelationStatus"}},"required":["process","relationId","status"]}},"in":{"type":"array","items":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/Ref"},"relationId":{"$ref":"#/components/schemas/RelationId"},"status":{"$ref":"#/components/schemas/RelationStatus"}},"required":["process","relationId","status"]}}},"required":["out","in"]},"hints":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"name":{"type":"string"},"score":{"type":"number","minimum":0}},"required":["step","name","score"]},"maxItems":3},"proposals":{"type":"array","items":{"$ref":"#/components/schemas/ClaimPlacementProposal"}},"decisions":{"type":"array","items":{"$ref":"#/components/schemas/ClaimPlacementDecision"}},"unsure":{"type":"object","properties":{"reason":{"type":"string"},"by":{"type":"string"},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["reason","by","at"]}},"required":["process","name","modelKey","lanes","starts","ends","neighbours","calls","hints","proposals","decisions"],"description":"A process to place (compact)."},"ClaimPlacementProposal":{"type":"object","properties":{"placementId":{"$ref":"#/components/schemas/PlacementId"},"step":{"type":"string"},"status":{"$ref":"#/components/schemas/RelationStatus"},"tier":{"$ref":"#/components/schemas/PlacementTier"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"by":{"type":"string"},"source":{"$ref":"#/components/schemas/SourceKind"},"mine":{"type":"boolean","enum":[true]},"question":{"type":"string"},"rationale":{"type":"string"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/ClaimPlacementNote"}}},"required":["placementId","step","status","tier","confidence","by","source"],"description":"A live placement proposal (compact)."},"ClaimPlacementNote":{"type":"object","properties":{"text":{"type":"string"},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["text","at"],"description":"A human note on a placement (compact)."},"ClaimPlacementDecision":{"type":"object","properties":{"placementId":{"$ref":"#/components/schemas/PlacementId"},"step":{"type":"string"},"stepLive":{"type":"boolean"},"verdict":{"$ref":"#/components/schemas/Verdict"},"note":{"type":"string"},"question":{"type":"string"},"label":{"type":"string"},"at":{"$ref":"#/components/schemas/Timestamp"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/ClaimPlacementNote"}}},"required":["placementId","step","stepLive","verdict","at"],"description":"A human placement decision (compact)."},"ClaimAnalysisBody":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"modelKey":{"$ref":"#/components/schemas/ModelKey"},"max":{"type":"integer","minimum":1,"maximum":5,"default":1},"kinds":{"type":"array","items":{"$ref":"#/components/schemas/AnalysisKind"},"minItems":1,"maxItems":2,"default":["relations"]}},"description":"Request body to claim analysis tasks."},"AnalysisKind":{"type":"string","enum":["relations","placement"],"description":"Kind of an analysis task."},"PendingAnalyses":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"projectId":{"$ref":"#/components/schemas/ProjectId"},"projectKey":{"$ref":"#/components/schemas/ProjectKey"},"pending":{"type":"integer","minimum":0}},"required":["projectId","projectKey","pending"]}}},"required":["total","items"],"description":"Claimable tasks per project."},"AnalysisSubmissionResult":{"anyOf":[{"$ref":"#/components/schemas/PlacementSubmissionResult"},{"$ref":"#/components/schemas/SubmissionResult"}],"description":"Outcome of a submission, by kind."},"PlacementSubmissionResult":{"type":"object","properties":{"kind":{"type":"string","enum":["placement"]},"taskId":{"$ref":"#/components/schemas/AnalysisTaskId"},"submissionId":{"type":"string"},"replayed":{"type":"boolean"},"placements":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"result":{"$ref":"#/components/schemas/PipelinePlacementOutcome"},"placementId":{"anyOf":[{"$ref":"#/components/schemas/PlacementId"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/RelationStatus"},{"type":"null"}]}},"required":["index","result","placementId","status"]}},"counts":{"type":"object","properties":{"applied":{"type":"integer","minimum":0},"duplicate":{"type":"integer","minimum":0},"suppressed":{"type":"integer","minimum":0},"reopened":{"type":"integer","minimum":0},"invalid":{"type":"integer","minimum":0}},"required":["applied","duplicate","suppressed","reopened","invalid"]}},"required":["items","counts"]},"unsure":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"result":{"$ref":"#/components/schemas/UnsureOutcome"}},"required":["index","result"]}},"counts":{"type":"object","properties":{"stored":{"type":"integer","minimum":0},"duplicate":{"type":"integer","minimum":0},"invalid":{"type":"integer","minimum":0}},"required":["stored","duplicate","invalid"]}},"required":["items","counts"]},"withdrawn":{"type":"integer","minimum":0},"skipped":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"processes":{"type":"array","items":{"$ref":"#/components/schemas/Ref"},"maxItems":50}},"required":["count","processes"]},"followUp":{"type":"boolean"}},"required":["kind","taskId","submissionId","replayed","placements","unsure","withdrawn","skipped","followUp"],"description":"Outcome of a placement task submission, per item."},"PipelinePlacementOutcome":{"type":"string","enum":["applied","duplicate","suppressed","reopened","invalid:malformed-step","invalid:malformed-ref","invalid:outside-task-input","invalid:confidence-out-of-range","invalid:rationale-too-long","invalid:question-too-long","invalid:too-much-evidence","invalid:control-characters","invalid:rationale-required","invalid:unknown-step","invalid:unknown-process","invalid:unknown-evidence","invalid:too-many-steps"],"description":"Outcome of one placement item of a submission."},"UnsureOutcome":{"type":"string","enum":["stored","duplicate","invalid:malformed-ref","invalid:outside-task-input","invalid:unknown-process","invalid:reason-required","invalid:reason-too-long","invalid:control-characters","invalid:also-placed"],"description":"Outcome of one unsure item."},"SubmissionResult":{"type":"object","properties":{"taskId":{"$ref":"#/components/schemas/AnalysisTaskId"},"submissionId":{"type":"string"},"replayed":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SubmissionItemResult"}},"counts":{"type":"object","properties":{"applied":{"type":"integer","minimum":0},"duplicate":{"type":"integer","minimum":0},"suppressed":{"type":"integer","minimum":0},"reopened":{"type":"integer","minimum":0},"invalid":{"type":"integer","minimum":0}},"required":["applied","duplicate","suppressed","reopened","invalid"]},"withdrawn":{"type":"integer","minimum":0},"noLinks":{"$ref":"#/components/schemas/SubmissionNoLinks"},"withdrawnNoLinks":{"type":"integer","minimum":0},"uncovered":{"$ref":"#/components/schemas/UncoveredPairs"}},"required":["taskId","submissionId","replayed","items","counts","withdrawn"],"description":"Outcome of a submission, per item."},"SubmissionItemResult":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"result":{"$ref":"#/components/schemas/ProposalOutcome"},"relationId":{"anyOf":[{"$ref":"#/components/schemas/RelationId"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/RelationStatus"},{"type":"null"}]}},"required":["index","result","relationId","status"],"description":"Outcome of one item of a submission."},"SubmissionNoLinks":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"result":{"$ref":"#/components/schemas/NoLinkOutcome"}},"required":["index","result"]}},"counts":{"type":"object","properties":{"stored":{"type":"integer","minimum":0},"duplicate":{"type":"integer","minimum":0},"invalid":{"type":"integer","minimum":0}},"required":["stored","duplicate","invalid"]}},"required":["items","counts"],"description":"Outcome of the no-links of a submission."},"NoLinkOutcome":{"type":"string","enum":["stored","duplicate","invalid:type-not-allowed","invalid:malformed-ref","invalid:control-characters","invalid:outside-task-model","invalid:unknown-ref","invalid:type-mismatch","invalid:same-process","invalid:message-flow","invalid:type-required","invalid:also-proposed"],"description":"Outcome of one no-link."},"UncoveredPairs":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"pairs":{"type":"array","items":{"$ref":"#/components/schemas/TypedPair"},"maxItems":50}},"required":["count","pairs"],"description":"Assigned pairs a submission left unjudged."},"TypedPair":{"type":"object","properties":{"type":{"type":"string","enum":["call","message","signal","trigger"]},"from":{"$ref":"#/components/schemas/Ref"},"to":{"$ref":"#/components/schemas/Ref"}},"required":["type","from","to"],"description":"A typed pair of endpoints."},"SubmitAnalysisBody":{"type":"object","properties":{"leaseToken":{"type":"string","minLength":1,"maxLength":200},"submissionId":{"type":"string","format":"uuid"},"procedure":{"$ref":"#/components/schemas/DeclaredProcedure"},"llmModel":{"type":["string","null"],"minLength":1,"maxLength":100,"default":null},"relations":{"type":"array","items":{"$ref":"#/components/schemas/ProposalItem"},"maxItems":200,"default":[]},"noLinks":{"type":"array","items":{"$ref":"#/components/schemas/NoLinkItem"},"maxItems":500,"default":[]},"placements":{"type":"array","items":{"$ref":"#/components/schemas/PlacementItem"},"maxItems":200},"unsure":{"type":"array","items":{"$ref":"#/components/schemas/UnsureItem"},"maxItems":200},"summary":{"type":["string","null"],"maxLength":500,"default":null},"costUsd":{"type":["number","null"],"minimum":0,"maximum":1000000,"default":null}},"required":["leaseToken","submissionId","procedure"],"description":"The result of an analysis task."},"ProposalItem":{"type":"object","properties":{"type":{"type":"string","maxLength":30},"from":{"type":"string","maxLength":1000},"to":{"type":"string","maxLength":1000},"confidence":{"type":"number"},"rationale":{"type":"string","maxLength":20000,"default":""},"evidence":{"type":"array","items":{"type":"string","maxLength":1000},"maxItems":200,"default":[]},"question":{"type":["string","null"],"maxLength":20000,"default":null}},"required":["type","from","to","confidence"],"description":"A relation an agent proposes."},"NoLinkItem":{"type":"object","properties":{"type":{"type":"string","maxLength":30},"from":{"type":"string","maxLength":1000},"to":{"type":"string","maxLength":1000},"reason":{"type":"string","maxLength":2000,"default":""}},"required":["from","to"],"description":"A pair judged unrelated."},"UnsureItem":{"type":"object","properties":{"process":{"type":"string","maxLength":1000},"reason":{"type":"string","maxLength":20000,"default":""}},"required":["process"],"description":"A process the agent could not place with confidence."},"ReleaseResult":{"type":"object","properties":{"taskId":{"$ref":"#/components/schemas/AnalysisTaskId"},"state":{"type":"string","enum":["queued"]}},"required":["taskId","state"],"description":"The released task is queued again."},"ReleaseAnalysisBody":{"type":"object","properties":{"leaseToken":{"type":"string","minLength":1,"maxLength":200},"reason":{"type":["string","null"],"maxLength":500,"default":null}},"required":["leaseToken"],"description":"Request body to release a claimed task."},"AnalysisTaskPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AnalysisTask"}},"nextCursor":{"anyOf":[{"$ref":"#/components/schemas/Cursor"},{"type":"null"}]}},"required":["items","nextCursor"],"description":"A page of AnalysisTask items."},"AnalysisTask":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AnalysisTaskId"},"projectId":{"$ref":"#/components/schemas/ProjectId"},"kind":{"$ref":"#/components/schemas/AnalysisKind"},"subjectKind":{"$ref":"#/components/schemas/AnalysisSubjectKind"},"modelId":{"anyOf":[{"$ref":"#/components/schemas/ModelId"},{"type":"null"}]},"modelKey":{"anyOf":[{"$ref":"#/components/schemas/ModelKey"},{"type":"null"}]},"revisionId":{"anyOf":[{"$ref":"#/components/schemas/RevisionId"},{"type":"null"}]},"valueChainId":{"anyOf":[{"$ref":"#/components/schemas/ValueChainId"},{"type":"null"}]},"valueChainKey":{"anyOf":[{"$ref":"#/components/schemas/ValueChainKey"},{"type":"null"}]},"valueChainRevisionId":{"anyOf":[{"$ref":"#/components/schemas/ValueChainRevisionId"},{"type":"null"}]},"state":{"$ref":"#/components/schemas/AnalysisTaskState"},"attempts":{"type":"integer","minimum":0},"factsHash":{"anyOf":[{"$ref":"#/components/schemas/Sha256Hex"},{"type":"null"}]},"inputHash":{"anyOf":[{"$ref":"#/components/schemas/Sha256Hex"},{"type":"null"}]},"leaseUntil":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"claimedBy":{"type":["string","null"]},"lastError":{"type":["string","null"]},"submissionId":{"type":["string","null"]},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","projectId","kind","subjectKind","modelId","modelKey","revisionId","valueChainId","valueChainKey","valueChainRevisionId","state","attempts","factsHash","inputHash","leaseUntil","claimedBy","lastError","submissionId","createdAt","updatedAt"],"description":"An analysis task of a model revision or of the value chain."},"AnalysisSubjectKind":{"type":"string","enum":["model","value_chain"],"description":"What an analysis task analyses."},"RequeueResult":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"modelKey":{"$ref":"#/components/schemas/ModelKey"},"outcome":{"type":"string","enum":["queued","open","not-found"]},"taskId":{"anyOf":[{"$ref":"#/components/schemas/AnalysisTaskId"},{"type":"null"}]}},"required":["modelKey","outcome","taskId"]}},"valueChain":{"type":"object","properties":{"outcome":{"type":"string","enum":["queued","open","nothing-due","not-found"]},"taskId":{"anyOf":[{"$ref":"#/components/schemas/AnalysisTaskId"},{"type":"null"}]}},"required":["outcome","taskId"]}},"required":["items"],"description":"Outcome per model of a requeue."},"RequeueBody":{"type":"object","properties":{"modelKeys":{"type":"array","items":{"$ref":"#/components/schemas/ModelKey"},"minItems":1,"maxItems":1000},"all":{"type":"boolean","enum":[true]},"valueChain":{"type":"boolean","enum":[true]}},"description":"Models to analyse again (e.g. after a procedure upgrade), or the value chain placement task."},"AnalysisSubmission":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/SubmissionId"},"taskId":{"$ref":"#/components/schemas/AnalysisTaskId"},"submissionId":{"type":"string"},"principalId":{"$ref":"#/components/schemas/PrincipalId"},"handle":{"type":"string"},"clientId":{"type":["string","null"]},"procedure":{"$ref":"#/components/schemas/DeclaredProcedure"},"llmModel":{"type":["string","null"]},"payload":{"type":"object","additionalProperties":{}},"result":{"$ref":"#/components/schemas/AnalysisSubmissionResult"},"createdAt":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","taskId","submissionId","principalId","handle","clientId","procedure","llmModel","payload","result","createdAt"],"description":"A stored analysis submission."},"AgentTokenList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentToken"}}},"required":["items"],"description":"A project's agent tokens."},"AgentToken":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AgentTokenId"},"principalId":{"$ref":"#/components/schemas/PrincipalId"},"name":{"type":"string","minLength":1,"maxLength":100},"prefix":{"type":"string","minLength":8,"maxLength":8},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/AgentScope"},"minItems":1},"expiresAt":{"$ref":"#/components/schemas/Timestamp"},"revokedAt":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"createdAt":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","principalId","name","prefix","scopes","expiresAt","revokedAt","lastUsedAt","createdAt"],"description":"An API key for one project, used by MCP clients and scripts."},"AgentTokenId":{"type":"string","pattern":"^agt_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Agent token id (`agt_` + ULID).","example":"agt_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"AgentScope":{"type":"string","enum":["analyzr:read","analyzr:propose","analyzr:write"],"description":"Scope of an agent token (never `analyzr:review`)."},"CreatedAgentToken":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AgentTokenId"},"principalId":{"$ref":"#/components/schemas/PrincipalId"},"name":{"type":"string","minLength":1,"maxLength":100},"prefix":{"type":"string","minLength":8,"maxLength":8},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/AgentScope"},"minItems":1},"expiresAt":{"$ref":"#/components/schemas/Timestamp"},"revokedAt":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"secret":{"type":"string"}},"required":["id","principalId","name","prefix","scopes","expiresAt","revokedAt","lastUsedAt","createdAt","secret"],"description":"A new agent token including its secret (shown once)."},"CreateAgentTokenBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/AgentScope"},"minItems":1,"default":["analyzr:read","analyzr:propose"]},"expiresInDays":{"type":"integer","minimum":1,"maximum":365,"default":90}},"required":["name"],"description":"Request body to create an agent token."},"AutoAcceptRuleList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AutoAcceptRule"}},"system":{"$ref":"#/components/schemas/AutoAcceptSystemRule"}},"required":["items","system"],"description":"A project's auto-accept rules."},"AutoAcceptRule":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AutoAcceptRuleId"},"kind":{"$ref":"#/components/schemas/AutoAcceptKind"},"revision":{"type":"integer","minimum":1},"name":{"type":"string"},"enabled":{"type":"boolean"},"note":{"type":["string","null"]},"tier":{"$ref":"#/components/schemas/AutoAcceptTier"},"minConfidence":{"type":"number","minimum":0.5,"maximum":1},"relationType":{"anyOf":[{"$ref":"#/components/schemas/AutoAcceptRelationType"},{"type":"null"}]},"agentPrincipalId":{"anyOf":[{"$ref":"#/components/schemas/PrincipalId"},{"type":"null"}]},"agent":{"anyOf":[{"$ref":"#/components/schemas/AutoAcceptAgent"},{"type":"null"}]},"llmModel":{"type":["string","null"]},"includeAdHoc":{"type":"boolean"},"author":{"$ref":"#/components/schemas/AutoAcceptPrincipal"},"authorIsOwner":{"type":"boolean"},"createdBy":{"$ref":"#/components/schemas/AutoAcceptPrincipal"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"stats":{"$ref":"#/components/schemas/AutoAcceptRuleStats"}},"required":["id","kind","revision","name","enabled","note","tier","minConfidence","relationType","agentPrincipalId","agent","llmModel","includeAdHoc","author","authorIsOwner","createdBy","createdAt","updatedAt","stats"],"description":"An auto-accept rule at its head revision."},"AutoAcceptRuleId":{"type":"string","pattern":"^aar_[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Auto-accept rule id (`aar_` + ULID).","example":"aar_01J9Z3N4X5Q6R7S8T9V0W1X2Y3"},"AutoAcceptKind":{"type":"string","enum":["relation","placement"],"description":"What an auto-accept rule accepts: agent relation or placement proposals."},"AutoAcceptTier":{"type":"string","enum":["key","lexical","semantic"],"description":"Server-computed tier of the agent proposals a rule accepts."},"AutoAcceptRelationType":{"type":"string","enum":["call","message","signal","trigger"],"description":"Relation type a relation rule is narrowed to."},"AutoAcceptAgent":{"type":"object","properties":{"principalId":{"$ref":"#/components/schemas/PrincipalId"},"handle":{"type":"string"},"tokenId":{"anyOf":[{"$ref":"#/components/schemas/AgentTokenId"},{"type":"null"}]},"revoked":{"type":"boolean"}},"required":["principalId","handle","tokenId","revoked"],"description":"An agent a rule can be narrowed to."},"AutoAcceptPrincipal":{"type":"object","properties":{"principalId":{"$ref":"#/components/schemas/PrincipalId"},"handle":{"type":"string"}},"required":["principalId","handle"],"description":"A principal and its handle."},"AutoAcceptRuleStats":{"type":"object","properties":{"inForce":{"type":"integer","minimum":0},"revoked":{"type":"integer","minimum":0},"confirmed":{"type":"integer","minimum":0},"overruled":{"type":"integer","minimum":0},"lastAcceptedAt":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]}},"required":["inForce","revoked","confirmed","overruled","lastAcceptedAt"],"description":"What a rule has accepted so far."},"AutoAcceptSystemRule":{"type":"object","properties":{"id":{"type":"string","enum":["analyzr-rules/1.0.0"]},"name":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string","enum":["relation"]},"relationType":{"type":"string","enum":["call"]},"readOnly":{"type":"boolean","enum":[true]},"accepted":{"type":"integer","minimum":0}},"required":["id","name","description","kind","relationType","readOnly","accepted"],"description":"The built-in rule of decision 9."},"SaveAutoAcceptRuleResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["created","revised","unchanged"]},"rule":{"$ref":"#/components/schemas/AutoAcceptRuleDetail"}},"required":["outcome","rule"],"description":"The rule after a create or an edit."},"AutoAcceptRuleDetail":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AutoAcceptRuleId"},"kind":{"$ref":"#/components/schemas/AutoAcceptKind"},"revision":{"type":"integer","minimum":1},"name":{"type":"string"},"enabled":{"type":"boolean"},"note":{"type":["string","null"]},"tier":{"$ref":"#/components/schemas/AutoAcceptTier"},"minConfidence":{"type":"number","minimum":0.5,"maximum":1},"relationType":{"anyOf":[{"$ref":"#/components/schemas/AutoAcceptRelationType"},{"type":"null"}]},"agentPrincipalId":{"anyOf":[{"$ref":"#/components/schemas/PrincipalId"},{"type":"null"}]},"agent":{"anyOf":[{"$ref":"#/components/schemas/AutoAcceptAgent"},{"type":"null"}]},"llmModel":{"type":["string","null"]},"includeAdHoc":{"type":"boolean"},"author":{"$ref":"#/components/schemas/AutoAcceptPrincipal"},"authorIsOwner":{"type":"boolean"},"createdBy":{"$ref":"#/components/schemas/AutoAcceptPrincipal"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"stats":{"$ref":"#/components/schemas/AutoAcceptRuleStats"},"revisions":{"type":"array","items":{"$ref":"#/components/schemas/AutoAcceptRuleRevision"}}},"required":["id","kind","revision","name","enabled","note","tier","minConfidence","relationType","agentPrincipalId","agent","llmModel","includeAdHoc","author","authorIsOwner","createdBy","createdAt","updatedAt","stats","revisions"],"description":"An auto-accept rule with its revisions."},"AutoAcceptRuleRevision":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"name":{"type":"string"},"enabled":{"type":"boolean"},"note":{"type":["string","null"]},"kind":{"$ref":"#/components/schemas/AutoAcceptKind"},"tier":{"$ref":"#/components/schemas/AutoAcceptTier"},"minConfidence":{"type":"number","minimum":0.5,"maximum":1},"relationType":{"anyOf":[{"$ref":"#/components/schemas/AutoAcceptRelationType"},{"type":"null"}]},"agentPrincipalId":{"anyOf":[{"$ref":"#/components/schemas/PrincipalId"},{"type":"null"}]},"llmModel":{"type":["string","null"]},"includeAdHoc":{"type":"boolean"},"author":{"$ref":"#/components/schemas/AutoAcceptPrincipal"},"clientId":{"type":["string","null"]},"at":{"$ref":"#/components/schemas/Timestamp"}},"required":["revision","name","enabled","note","kind","tier","minConfidence","relationType","agentPrincipalId","llmModel","includeAdHoc","author","clientId","at"],"description":"One immutable revision of a rule."},"AutoAcceptRuleDraft":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"enabled":{"type":"boolean","default":false},"note":{"type":["string","null"],"maxLength":500,"default":null},"kind":{"$ref":"#/components/schemas/AutoAcceptKind"},"tier":{"$ref":"#/components/schemas/AutoAcceptTier"},"minConfidence":{"type":"number","minimum":0.5,"maximum":1},"relationType":{"anyOf":[{"$ref":"#/components/schemas/AutoAcceptRelationType"},{"type":"null"}],"default":null},"agentPrincipalId":{"anyOf":[{"$ref":"#/components/schemas/PrincipalId"},{"type":"null"}],"default":null},"llmModel":{"type":["string","null"],"minLength":1,"maxLength":100,"default":null},"includeAdHoc":{"type":"boolean","default":false}},"required":["name","kind","tier","minConfidence"],"description":"An auto-accept rule as the owner writes it."},"AutoAcceptPreview":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/AutoAcceptKind"},"history":{"$ref":"#/components/schemas/AutoAcceptPreviewHistory"},"open":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"items":{"type":"array","items":{"$ref":"#/components/schemas/AutoAcceptItem"}},"blocked":{"type":"array","items":{"$ref":"#/components/schemas/AutoAcceptBlockedCount"}}},"required":["count","items","blocked"]},"curve":{"type":"array","items":{"$ref":"#/components/schemas/AutoAcceptCurvePoint"}},"agents":{"type":"array","items":{"$ref":"#/components/schemas/AutoAcceptAgent"}},"llmModels":{"type":"array","items":{"type":"string"}}},"required":["kind","history","open","curve","agents","llmModels"],"description":"What a rule would accept, so far and now."},"AutoAcceptPreviewHistory":{"type":"object","properties":{"decided":{"type":"integer","minimum":0},"wouldAccept":{"type":"integer","minimum":0},"accepted":{"type":"integer","minimum":0},"rejected":{"type":"integer","minimum":0},"corrected":{"type":"integer","minimum":0},"held":{"type":"integer","minimum":0},"autoUnreviewed":{"type":"integer","minimum":0},"undecided":{"type":"integer","minimum":0},"precision":{"type":["number","null"],"minimum":0,"maximum":1}},"required":["decided","wouldAccept","accepted","rejected","corrected","held","autoUnreviewed","undecided","precision"],"description":"What a rule would have accepted so far."},"AutoAcceptItem":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/AutoAcceptKind"},"id":{"anyOf":[{"$ref":"#/components/schemas/RelationId"},{"$ref":"#/components/schemas/PlacementId"}]},"status":{"$ref":"#/components/schemas/RelationStatus"},"endpointState":{"$ref":"#/components/schemas/EndpointState"},"type":{"anyOf":[{"$ref":"#/components/schemas/AutoAcceptRelationType"},{"type":"null"}]},"from":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"to":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"valueChainKey":{"type":["string","null"]},"step":{"type":["string","null"]},"process":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"triggerId":{"anyOf":[{"$ref":"#/components/schemas/AssertionId"},{"$ref":"#/components/schemas/PlacementAssertionId"}]},"agent":{"$ref":"#/components/schemas/AutoAcceptPrincipal"},"llmModel":{"type":["string","null"]},"tier":{"$ref":"#/components/schemas/Tier"},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["kind","id","status","endpointState","type","from","to","valueChainKey","step","process","triggerId","agent","llmModel","tier","confidence"],"description":"An open proposal a rule accepts."},"AutoAcceptBlockedCount":{"type":"object","properties":{"reason":{"$ref":"#/components/schemas/AutoAcceptBlockReason"},"count":{"type":"integer","minimum":1}},"required":["reason","count"],"description":"Open proposals one reason blocked."},"AutoAcceptBlockReason":{"type":"string","enum":["not-agent","no-matching-rule","stale-proposal","not-open","endpoint-not-ok","outside","step-removed","has-home-step","competing-step","competing-call","human-involved","agent-question","no-link","agent-unsure"],"description":"Why a rule did not accept a proposal."},"AutoAcceptCurvePoint":{"type":"object","properties":{"minConfidence":{"type":"number","minimum":0.5,"maximum":1},"wouldAccept":{"type":"integer","minimum":0},"accepted":{"type":"integer","minimum":0},"rejected":{"type":"integer","minimum":0},"corrected":{"type":"integer","minimum":0},"held":{"type":"integer","minimum":0},"precision":{"type":["number","null"],"minimum":0,"maximum":1},"open":{"type":"integer","minimum":0}},"required":["minConfidence","wouldAccept","accepted","rejected","corrected","held","precision","open"],"description":"The preview at one minimum confidence."},"AutoAcceptCriteria":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/AutoAcceptKind"},"tier":{"$ref":"#/components/schemas/AutoAcceptTier"},"minConfidence":{"type":"number","minimum":0.5,"maximum":1},"relationType":{"anyOf":[{"$ref":"#/components/schemas/AutoAcceptRelationType"},{"type":"null"}],"default":null},"agentPrincipalId":{"anyOf":[{"$ref":"#/components/schemas/PrincipalId"},{"type":"null"}],"default":null},"llmModel":{"type":["string","null"],"minLength":1,"maxLength":100,"default":null},"includeAdHoc":{"type":"boolean","default":false}},"required":["kind","tier","minConfidence"],"description":"What an auto-accept rule matches: kind, tier, minimum confidence, narrowing."},"ApplyAutoAcceptResult":{"type":"object","properties":{"dryRun":{"type":"boolean"},"ruleId":{"$ref":"#/components/schemas/AutoAcceptRuleId"},"revision":{"type":"integer","minimum":1},"enabled":{"type":"boolean"},"authorIsOwner":{"type":"boolean"},"count":{"type":"integer","minimum":0},"items":{"type":"array","items":{"$ref":"#/components/schemas/AutoAcceptItem"}},"truncated":{"type":"boolean"},"blocked":{"type":"array","items":{"$ref":"#/components/schemas/AutoAcceptBlockedCount"}}},"required":["dryRun","ruleId","revision","enabled","authorIsOwner","count","items","truncated","blocked"],"description":"What applying a rule did or would do."},"ApplyAutoAcceptBody":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"expectedCount":{"type":"integer","minimum":0}},"description":"Apply a rule to the open proposals."},"AutoAcceptRevocationResult":{"type":"object","properties":{"dryRun":{"type":"boolean"},"count":{"type":"integer","minimum":0},"toProposed":{"type":"integer","minimum":0},"toObsolete":{"type":"integer","minimum":0},"humanDecidedSince":{"type":"integer","minimum":0},"alreadyRevoked":{"type":"integer","minimum":0},"items":{"type":"array","items":{"$ref":"#/components/schemas/AutoAcceptRevocationItem"}},"truncated":{"type":"boolean"}},"required":["dryRun","count","toProposed","toObsolete","humanDecidedSince","alreadyRevoked","items","truncated"],"description":"What a revocation did or would do."},"AutoAcceptRevocationItem":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/AutoAcceptKind"},"id":{"anyOf":[{"$ref":"#/components/schemas/RelationId"},{"$ref":"#/components/schemas/PlacementId"}]},"status":{"$ref":"#/components/schemas/RelationStatus"},"endpointState":{"$ref":"#/components/schemas/EndpointState"},"type":{"anyOf":[{"$ref":"#/components/schemas/AutoAcceptRelationType"},{"type":"null"}]},"from":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"to":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"valueChainKey":{"type":["string","null"]},"step":{"type":["string","null"]},"process":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"decisionId":{"anyOf":[{"$ref":"#/components/schemas/AssertionId"},{"$ref":"#/components/schemas/PlacementAssertionId"}]},"triggerId":{"anyOf":[{"$ref":"#/components/schemas/AssertionId"},{"$ref":"#/components/schemas/PlacementAssertionId"}]},"ruleId":{"$ref":"#/components/schemas/AutoAcceptRuleId"},"revision":{"type":"integer","minimum":1},"ruleName":{"type":"string"},"decidedBy":{"$ref":"#/components/schemas/AutoAcceptPrincipal"},"agent":{"$ref":"#/components/schemas/AutoAcceptPrincipal"},"llmModel":{"type":["string","null"]},"tier":{"anyOf":[{"$ref":"#/components/schemas/Tier"},{"type":"null"}]},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"at":{"$ref":"#/components/schemas/Timestamp"},"state":{"$ref":"#/components/schemas/AutoAcceptLedgerState"},"laterVerdict":{"type":["string","null"],"enum":["accept","reject","hold","correct",null]},"laterAt":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"revocationId":{"anyOf":[{"$ref":"#/components/schemas/AssertionId"},{"$ref":"#/components/schemas/PlacementAssertionId"},{"type":"null"}]},"revokedAt":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"outcome":{"type":"string","enum":["proposed","obsolete"]}},"required":["kind","id","status","endpointState","type","from","to","valueChainKey","step","process","decisionId","triggerId","ruleId","revision","ruleName","decidedBy","agent","llmModel","tier","confidence","at","state","laterVerdict","laterAt","revocationId","revokedAt","outcome"],"description":"One revoked auto-acceptance."},"AutoAcceptLedgerState":{"type":"string","enum":["in-force","revoked","human-decided"],"description":"In force, revoked by an owner, or decided by a human since (a human decision always wins)."},"AutoAcceptRevocationBody":{"type":"object","properties":{"ruleId":{"$ref":"#/components/schemas/AutoAcceptRuleId"},"revision":{"type":"integer","minimum":1},"agentPrincipalId":{"$ref":"#/components/schemas/PrincipalId"},"kind":{"$ref":"#/components/schemas/AutoAcceptKind"},"ids":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RelationId"},{"$ref":"#/components/schemas/PlacementId"}]},"minItems":1,"maxItems":1000},"reason":{"type":"string","minLength":1,"maxLength":500},"expectedCount":{"type":"integer","minimum":0}},"description":"Revoke auto-acceptances in bulk."},"AutoAcceptLedger":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AutoAcceptLedgerEntry"}}},"required":["items"],"description":"A project's auto-acceptances."},"AutoAcceptLedgerEntry":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/AutoAcceptKind"},"id":{"anyOf":[{"$ref":"#/components/schemas/RelationId"},{"$ref":"#/components/schemas/PlacementId"}]},"status":{"$ref":"#/components/schemas/RelationStatus"},"endpointState":{"$ref":"#/components/schemas/EndpointState"},"type":{"anyOf":[{"$ref":"#/components/schemas/AutoAcceptRelationType"},{"type":"null"}]},"from":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"to":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"valueChainKey":{"type":["string","null"]},"step":{"type":["string","null"]},"process":{"anyOf":[{"$ref":"#/components/schemas/Ref"},{"type":"null"}]},"decisionId":{"anyOf":[{"$ref":"#/components/schemas/AssertionId"},{"$ref":"#/components/schemas/PlacementAssertionId"}]},"triggerId":{"anyOf":[{"$ref":"#/components/schemas/AssertionId"},{"$ref":"#/components/schemas/PlacementAssertionId"}]},"ruleId":{"$ref":"#/components/schemas/AutoAcceptRuleId"},"revision":{"type":"integer","minimum":1},"ruleName":{"type":"string"},"decidedBy":{"$ref":"#/components/schemas/AutoAcceptPrincipal"},"agent":{"$ref":"#/components/schemas/AutoAcceptPrincipal"},"llmModel":{"type":["string","null"]},"tier":{"anyOf":[{"$ref":"#/components/schemas/Tier"},{"type":"null"}]},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"at":{"$ref":"#/components/schemas/Timestamp"},"state":{"$ref":"#/components/schemas/AutoAcceptLedgerState"},"laterVerdict":{"type":["string","null"],"enum":["accept","reject","hold","correct",null]},"laterAt":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"revocationId":{"anyOf":[{"$ref":"#/components/schemas/AssertionId"},{"$ref":"#/components/schemas/PlacementAssertionId"},{"type":"null"}]},"revokedAt":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]}},"required":["kind","id","status","endpointState","type","from","to","valueChainKey","step","process","decisionId","triggerId","ruleId","revision","ruleName","decidedBy","agent","llmModel","tier","confidence","at","state","laterVerdict","laterAt","revocationId","revokedAt"],"description":"One auto-acceptance and its state."}},"parameters":{}},"paths":{"/health":{"get":{"operationId":"getHealth","tags":["system"],"summary":"Liveness and database ping","security":[],"responses":{"200":{"description":"Server health","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"503":{"description":"Database unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/api/v1/session":{"post":{"operationId":"createSession","tags":["system"],"summary":"Local mode: open an owner session (HttpOnly cookie) for the web UI or the CLI","description":"Local mode only (`ANALYZR_AUTH=local`). Sets the `analyzr_session` cookie (HttpOnly, SameSite=Strict); requests carrying it act as the single owner on an interactive client. The server accepts it only from localhost (Host and Origin checks). On a read-only demo (`ANALYZR_DEMO=readonly`, `Health.demo`) the session is a viewer with scope `analyzr:read` instead, accepted from the demo's public origins. A body over 4096 bytes answers 413 `payload-too-large` before it is read.","security":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionBody"}}}},"responses":{"200":{"description":"The owner","headers":{"Set-Cookie":{"schema":{"type":"string","description":"`analyzr_session=…`"},"required":true,"description":"`analyzr_session=…`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"403":{"description":"Problem: `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"413":{"description":"Problem: `payload-too-large`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"415":{"description":"Problem: `unsupported-media-type`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"delete":{"operationId":"deleteSession","tags":["system"],"summary":"Local mode: end the owner session (clears the cookie)","security":[],"responses":{"204":{"description":"Session cookie cleared"}}}},"/api/v1/me":{"get":{"operationId":"getMe","tags":["system"],"summary":"The authenticated caller","responses":{"200":{"description":"The caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects":{"get":{"operationId":"listProjects","tags":["projects"],"summary":"Projects the caller is a member of","parameters":[{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"Opaque pagination cursor.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of projects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectPage"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"post":{"operationId":"createProject","tags":["projects"],"summary":"Create a project; the caller becomes its owner","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectBody"}}}},"responses":{"201":{"description":"The new project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}":{"get":{"operationId":"getProject","tags":["projects"],"summary":"One project","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"responses":{"200":{"description":"The project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/models":{"get":{"operationId":"listModels","tags":["models"],"summary":"Models of a project, optionally filtered by pipeline stage","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"Opaque pagination cursor.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"$ref":"#/components/schemas/ModelStage"},"required":false,"description":"Pipeline stage of a model.","name":"stage","in":"query"}],"responses":{"200":{"description":"A page of models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelPage"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/models/{model}":{"get":{"operationId":"getModel","tags":["models"],"summary":"One model","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ModelId"},"required":true,"description":"Model id (`mdl_` + ULID).","name":"model","in":"path"}],"responses":{"200":{"description":"The model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"delete":{"operationId":"deleteModel","tags":["models"],"summary":"Delete a model; partner relations become `missing`","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ModelId"},"required":true,"description":"Model id (`mdl_` + ULID).","name":"model","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/models/by-key/{key}":{"put":{"operationId":"putModelByKey","tags":["models"],"summary":"Upload raw BPMN: 201 new model, 200 new revision or unchanged","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ModelKey"},"required":true,"description":"Immutable model key: lowercase slug segments separated by `/`.","name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/BpmnXml"}},"text/xml":{"schema":{"$ref":"#/components/schemas/BpmnXml"}}}},"responses":{"200":{"description":"New revision, or `unchanged` for identical content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutModelResult"}}}},"201":{"description":"New model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutModelResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"413":{"description":"Problem: `payload-too-large`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"415":{"description":"Problem: `unsupported-media-type`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`, `bpmn-invalid`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/models/{model}/revisions":{"get":{"operationId":"listRevisions","tags":["models"],"summary":"Revisions of a model, newest first","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ModelId"},"required":true,"description":"Model id (`mdl_` + ULID).","name":"model","in":"path"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"Opaque pagination cursor.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of revisions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionPage"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/models/{model}/revisions/{revision}/content":{"get":{"operationId":"getRevisionContent","tags":["models"],"summary":"The verbatim BPMN bytes of a revision","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ModelId"},"required":true,"description":"Model id (`mdl_` + ULID).","name":"model","in":"path"},{"schema":{"$ref":"#/components/schemas/RevisionId"},"required":true,"description":"Model revision id (`rev_` + ULID).","name":"revision","in":"path"}],"responses":{"200":{"description":"BPMN XML","content":{"application/xml":{"schema":{"$ref":"#/components/schemas/BpmnXml"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/models/{model}/revisions/{revision}/facts":{"get":{"operationId":"getRevisionFacts","tags":["models"],"summary":"Facts extracted from a revision","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ModelId"},"required":true,"description":"Model id (`mdl_` + ULID).","name":"model","in":"path"},{"schema":{"$ref":"#/components/schemas/RevisionId"},"required":true,"description":"Model revision id (`rev_` + ULID).","name":"revision","in":"path"}],"responses":{"200":{"description":"Facts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionFacts"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/imports":{"post":{"operationId":"importModels","tags":["models"],"summary":"Import up to 50 BPMN files; the model key is the slugified path","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ImportModelsBody"}}}},"responses":{"200":{"description":"Outcome per file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"413":{"description":"Problem: `payload-too-large`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"415":{"description":"Problem: `unsupported-media-type`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/landscape":{"get":{"operationId":"getLandscape","tags":["relations"],"summary":"The project head: models, processes, relations, findings (ETag `\"s<seq>\"`)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"responses":{"200":{"description":"The landscape","headers":{"ETag":{"schema":{"type":"string","description":"`\"s<seq>\"`"},"required":true,"description":"`\"s<seq>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Landscape"}}}},"304":{"description":"Not modified (`If-None-Match` matched)"},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/relations":{"get":{"operationId":"listRelations","tags":["relations"],"summary":"Relations, filtered by type, status, tier or model","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/RelationType"},"required":false,"description":"Type of a relation between two processes.","name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/RelationStatus"},"required":false,"description":"Review status of a relation.","name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/Tier"},"required":false,"description":"Evidence tier of a relation.","name":"tier","in":"query"},{"schema":{"$ref":"#/components/schemas/ModelKey"},"required":false,"description":"Immutable model key: lowercase slug segments separated by `/`.","name":"modelKey","in":"query"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"Opaque pagination cursor.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of relations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationPage"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"post":{"operationId":"proposeRelation","tags":["review"],"summary":"Propose a relation ad hoc (analyzr:propose), or add an accepted manual relation (humans)","description":"Agents and humans propose `call`, `message`, `signal` and `trigger` relations; the server computes the tier. An invalid proposal (unknown ref, wrong endpoint kinds, same process) is 422 with `reason`. `manual` relations are for humans only and are accepted at once.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposeRelationBody"}}}},"responses":{"200":{"description":"The outcome and the relation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposeRelationResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/relations/{relation}":{"get":{"operationId":"getRelation","tags":["relations"],"summary":"One relation","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/RelationId"},"required":true,"description":"Relation id (`rel_` + ULID).","name":"relation","in":"path"}],"responses":{"200":{"description":"The relation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relation"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/findings":{"get":{"operationId":"listFindings","tags":["relations"],"summary":"Deterministic findings of the project head","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"responses":{"200":{"description":"Findings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindingList"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/no-links":{"get":{"operationId":"listNoLinks","tags":["relations"],"summary":"Agents' live, current no-links (pairs judged unrelated), also on pairs without a relation","description":"Every live no-link whose basis is still current (both models unchanged, the procedure claims name now), oldest first; `modelKey` keeps those with an endpoint in that model. A no-link on a pair that also has a relation shows there too (`Relation.noLinks`).","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ModelKey"},"required":false,"description":"Immutable model key: lowercase slug segments separated by `/`.","name":"modelKey","in":"query"}],"responses":{"200":{"description":"No-links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoLinkList"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/relations/{relation}/assertions":{"get":{"operationId":"getRelationAssertions","tags":["relations"],"summary":"The history (timeline) of a relation: every assertion, oldest first","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/RelationId"},"required":true,"description":"Relation id (`rel_` + ULID).","name":"relation","in":"path"}],"responses":{"200":{"description":"The assertions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationAssertionList"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/relations/{relation}/proposal":{"delete":{"operationId":"withdrawProposal","tags":["review"],"summary":"Withdraw the caller's own live proposal of a relation","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/RelationId"},"required":true,"description":"Relation id (`rel_` + ULID).","name":"relation","in":"path"}],"responses":{"200":{"description":"The relation after the withdrawal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relation"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/relations/{relation}/decision":{"post":{"operationId":"decideRelation","tags":["review"],"summary":"Decide a relation: accept, reject, hold or correct (humans only)","description":"Owner on an interactive client (local mode: the web UI or the CLI). Agent tokens get 403 `human-decision-required` with `reviewUrl`. `If-Match: \"<version>\"` (or `version` in the body) makes the decision conditional: 412 `precondition-failed` (409 `conflict` for the body field) if the relation changed.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/RelationId"},"required":true,"description":"Relation id (`rel_` + ULID).","name":"relation","in":"path"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"if-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionBody"}}}},"responses":{"200":{"description":"The decided relation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"412":{"description":"Problem: `precondition-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/decisions":{"post":{"operationId":"decideRelations","tags":["review"],"summary":"Bulk decision with ids, versions and expectedCount (all or nothing)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDecisionBody"}}}},"responses":{"200":{"description":"The decided relations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDecisionResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/relations/{relation}/notes":{"post":{"operationId":"addRelationNote","tags":["review"],"summary":"Add a note to a relation, e.g. the answer to a held question (humans only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/RelationId"},"required":true,"description":"Relation id (`rel_` + ULID).","name":"relation","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteBody"}}}},"responses":{"201":{"description":"The note","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationAssertion"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains":{"get":{"operationId":"listValueChains","tags":["value-chains"],"summary":"The value chains of a project (M4: at most one, key `main`)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"responses":{"200":{"description":"Value chains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueChainList"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"post":{"operationId":"createValueChain","tags":["value-chains"],"summary":"Create the value chain from a name or a document (humans only)","description":"Creates the chain `main` (the only key in M4) with its first revision: an empty document named `name`, or `content`, validated with schema-model and the analyzr rules. A deleted chain is revived (same id, `rev` continues, outcome `revived`). 409 `conflict` if a live chain has the key.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateValueChainBody"}}}},"responses":{"201":{"description":"The new chain","headers":{"ETag":{"schema":{"type":"string","description":"`\"r<rev>\"`"},"required":true,"description":"`\"r<rev>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveValueChainResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"413":{"description":"Problem: `payload-too-large`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`, `value-chain-invalid`, `value-chain-unsupported-version`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}":{"get":{"operationId":"getValueChain","tags":["value-chains"],"summary":"The value chain: head structure (steps with kinds, ranks, owners), placements","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"}],"responses":{"200":{"description":"The chain with steps and placements","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueChainDetail"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"delete":{"operationId":"deleteValueChain","tags":["value-chains"],"summary":"Delete the value chain; its placements turn `missing` (humans only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/content":{"get":{"operationId":"getValueChainContent","tags":["value-chains"],"summary":"The head document: canonical `.vc.json` bytes (ETag `\"r<rev>\"`)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"if-none-match","in":"header"}],"responses":{"200":{"description":"The canonical document","headers":{"ETag":{"schema":{"type":"string","description":"`\"r<rev>\"`"},"required":true,"description":"`\"r<rev>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueChainDocument"}}}},"304":{"description":"Not modified (`If-None-Match` names the head revision)"},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"put":{"operationId":"putValueChainContent","tags":["value-chains"],"summary":"Save a revision: `If-Match: \"r<rev>\"` required; `?dryRun=true` returns the impact only","description":"Saves the document as the next revision (humans only). `If-Match: \"r<rev>\"` must name the head revision: without it 428 `precondition-required`, a stale one 412 `revision-conflict` with `headRev`; content equal to the head answers 200 `unchanged` whatever the `If-Match`. `If-None-Match: *` creates (or revives) the chain instead: 201, or 412 `revision-conflict` if it exists. `dryRun=true` checks the same and returns the impact (removed and changed steps with their placements) without writing anything. The body is the `.vc.json` document as `application/json`, at most 2 MiB; its canonical form may have at most 1 MiB (`document-too-large`).","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"dryRun","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"if-match","in":"header"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"if-none-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueChainDocument"}}}},"responses":{"200":{"description":"`revised`, `unchanged`, or a dry run","headers":{"ETag":{"schema":{"type":"string","description":"`\"r<rev>\"`"},"required":true,"description":"`\"r<rev>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveValueChainResult"}}}},"201":{"description":"`created` or `revived` (`If-None-Match: *`)","headers":{"ETag":{"schema":{"type":"string","description":"`\"r<rev>\"`"},"required":true,"description":"`\"r<rev>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveValueChainResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"412":{"description":"Problem: `revision-conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"413":{"description":"Problem: `payload-too-large`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"415":{"description":"Problem: `unsupported-media-type`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`, `value-chain-invalid`, `value-chain-unsupported-version`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"428":{"description":"Problem: `precondition-required`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/revisions":{"get":{"operationId":"listValueChainRevisions","tags":["value-chains"],"summary":"Revisions of the value chain, newest first","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"Opaque pagination cursor.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of revisions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueChainRevisionPage"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/revisions/{rev}/content":{"get":{"operationId":"getValueChainRevisionContent","tags":["value-chains"],"summary":"The canonical document of one revision (ETag `\"r<rev>\"`)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":999999999},"required":true,"name":"rev","in":"path"}],"responses":{"200":{"description":"The canonical document","headers":{"ETag":{"schema":{"type":"string","description":"`\"r<rev>\"`"},"required":true,"description":"`\"r<rev>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueChainDocument"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/steps/{elementId}":{"get":{"operationId":"getValueChainStep","tags":["value-chains"],"summary":"The drill-down of a step: breadcrumb, sub-steps (up to level 2), processes","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"elementId","in":"path"}],"responses":{"200":{"description":"The step","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueChainStepDetail"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/findings":{"get":{"operationId":"getValueChainFindings","tags":["value-chains"],"summary":"Findings of the value chain: processes without a step, steps without a process, unresolved links","description":"Deterministic, recomputed on read, never blocking (M4 §3.4): `process-without-step` for a head process without an accepted placement on a live step (`@outside` counts), with `state` (pending or held) and the steps of accepted callers; `step-without-process` at the topmost step without an accepted placement on it or below it; `unresolved-link` for a link that is neither `analyzr:process/<ref>` of a head process nor an http(s) URL.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"}],"responses":{"200":{"description":"The findings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueChainFindingList"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/unplaced-processes":{"get":{"operationId":"listUnplacedProcesses","tags":["value-chains"],"summary":"Processes without a home step and without a placement waiting for review, with hints","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"Opaque pagination cursor.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of unplaced processes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnplacedProcessPage"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/placements":{"get":{"operationId":"listPlacements","tags":["value-chains"],"summary":"Placements, filtered by step, process, model, status, tier or endpoint state","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"elementId","in":"query"},{"schema":{"$ref":"#/components/schemas/Ref"},"required":false,"description":"Reference to a BPMN element: `<model_key>#<element_id>`, or `<model_key>#<process_id>` for a process.","name":"process","in":"query"},{"schema":{"$ref":"#/components/schemas/ModelKey"},"required":false,"description":"Immutable model key: lowercase slug segments separated by `/`.","name":"modelKey","in":"query"},{"schema":{"$ref":"#/components/schemas/RelationStatus"},"required":false,"description":"Review status of a relation.","name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/PlacementTier"},"required":false,"description":"Evidence tier of a placement: `key` (rule tier: a step link or an equal name), `lexical`, `semantic`, `manual`.","name":"tier","in":"query"},{"schema":{"$ref":"#/components/schemas/EndpointState"},"required":false,"description":"State of the relation endpoints in the head revisions.","name":"endpointState","in":"query"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"Opaque pagination cursor.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of placements","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementPage"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"post":{"operationId":"postPlacements","tags":["value-chains"],"summary":"Propose placements ad hoc (analyzr:propose), or add an accepted manual one (humans)","description":"`kind: \"propose\"`: up to 200 items, each answered `applied`, `duplicate`, `suppressed`, `reopened` or `invalid:<reason>`; the server computes the tier. `kind: \"manual\"`: a human accepts a process on a step at once (agents get `human-decision-required`).","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostPlacementsBody"}}}},"responses":{"200":{"description":"The outcome","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostPlacementsResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/placements/decisions":{"post":{"operationId":"decidePlacements","tags":["value-chains"],"summary":"Bulk decision on placements with ids, versions and expectedCount (all or nothing)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPlacementDecisionBody"}}}},"responses":{"200":{"description":"The decided placements","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPlacementDecisionResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/placements/{placement}":{"get":{"operationId":"getPlacement","tags":["value-chains"],"summary":"One placement (ETag `\"<version>\"`)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"$ref":"#/components/schemas/PlacementId"},"required":true,"description":"Placement id (`plc_` + ULID).","name":"placement","in":"path"}],"responses":{"200":{"description":"The placement","headers":{"ETag":{"schema":{"type":"string","description":"`\"<version>\"`"},"required":true,"description":"`\"<version>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Placement"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/placements/{placement}/proposal":{"delete":{"operationId":"withdrawPlacementProposal","tags":["value-chains"],"summary":"Withdraw the caller's own live proposal of a placement","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"$ref":"#/components/schemas/PlacementId"},"required":true,"description":"Placement id (`plc_` + ULID).","name":"placement","in":"path"}],"responses":{"200":{"description":"The placement after the withdrawal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Placement"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/placements/{placement}/decision":{"post":{"operationId":"decidePlacement","tags":["value-chains"],"summary":"Decide a placement: accept, reject, hold or correct (humans only)","description":"Agents get 403 `human-decision-required` with `reviewUrl`. `If-Match: \"<version>\"` (or `version` in the body) makes the decision conditional: 412 `precondition-failed` (409 `conflict` for the body field) if the placement changed. A placement on a removed step can only be rejected or corrected (422 `unknown-step`).","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"$ref":"#/components/schemas/PlacementId"},"required":true,"description":"Placement id (`plc_` + ULID).","name":"placement","in":"path"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"if-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementDecisionBody"}}}},"responses":{"200":{"description":"The decided placement","headers":{"ETag":{"schema":{"type":"string","description":"`\"<version>\"`"},"required":true,"description":"`\"<version>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementDecisionResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"412":{"description":"Problem: `precondition-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/placements/{placement}/notes":{"post":{"operationId":"addPlacementNote","tags":["value-chains"],"summary":"Add a note to a placement, e.g. the answer to a held question (humans only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"$ref":"#/components/schemas/PlacementId"},"required":true,"description":"Placement id (`plc_` + ULID).","name":"placement","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteBody"}}}},"responses":{"201":{"description":"The note","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementAssertion"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `human-decision-required`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/value-chains/{key}/placements/{placement}/assertions":{"get":{"operationId":"getPlacementAssertions","tags":["value-chains"],"summary":"The history (timeline) of a placement: every assertion, oldest first","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/ValueChainKey"},"required":true,"description":"Value chain key (M4: `main`).","name":"key","in":"path"},{"schema":{"$ref":"#/components/schemas/PlacementId"},"required":true,"description":"Placement id (`plc_` + ULID).","name":"placement","in":"path"}],"responses":{"200":{"description":"The assertions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementAssertionList"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/analyses/claim":{"post":{"operationId":"claimAnalyses","tags":["analyses"],"summary":"Claim up to 5 queued analysis tasks (15-minute lease, analyzr:propose)","description":"Claims queued tasks (and tasks whose lease expired with attempts left), oldest first, in the projects where the caller may propose (`projectId` narrows it), of the kinds the caller handles (`kinds`, default `[\"relations\"]`), with `FOR UPDATE SKIP LOCKED`. Each item carries its `kind`, a lease token (shown once, bound to the task and the caller) and the compact claim input, rendered in the claim transaction. A `relations` item: the current agent judgements on pairs touching the model (`judged`) and the pairs a partner analysis judges (`skip`), both left out of `candidates`; the remaining `rule`, `key` and `lexical` candidates and the relations in neither list, accepted pairs, unchanged rejections and missing ends aside, are the task’s assignment, and the other `compatible` candidates the search space for missing partners. A `placement` item (`analyzr-claim-placement/1`): the chain’s steps, the open processes whose input changed since an agent last judged them (at most 50, `truncated` when more are due) with their proposals and the human decisions, and accepted placements as examples. Empty when nothing is claimable.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimAnalysisBody"}}}},"responses":{"200":{"description":"The claimed tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/analyses/pending":{"get":{"operationId":"getPendingAnalyses","tags":["analyses"],"summary":"Claimable tasks per project; `wait=1..30` long-polls until work arrives","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":false,"description":"Project id (`prj_…`) or project key.","name":"projectId","in":"query"},{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnalysisKind"},{"type":"array","items":{"$ref":"#/components/schemas/AnalysisKind"},"minItems":1,"maxItems":2}],"default":"relations"},"required":false,"name":"kinds","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":30,"default":0},"required":false,"name":"wait","in":"query"}],"responses":{"200":{"description":"Claimable tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingAnalyses"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/analyses/{analysis}/submission":{"post":{"operationId":"submitAnalysis","tags":["analyses"],"summary":"Submit the result of a claimed task (idempotent by submissionId)","description":"A `relations` task: validates every item (refs in the head facts, one endpoint in the task model, endpoint kinds, limits) and answers per relation `applied`, `duplicate`, `suppressed`, `reopened` or `invalid:<reason>`, per no-link `stored`, `duplicate` or `invalid:<reason>`, and the assigned pairs left unjudged (`uncovered`). Earlier pipeline proposals and no-links on pairs touching the model that were judged on another version of the model or under another procedure are withdrawn; current judgements stay. A `placement` task (`kind: \"placement\"` in the result): per placement and unsure item an outcome, the withdrawn stale or replaced pipeline proposals, the input processes left without a verdict (`skipped`) and whether a follow-up task was queued. 422 `wrong-task-kind` (items of the other kind); 409 `lease-lost` (another holder, a release, a wrong token), `task-cancelled` (new revision), `already-submitted` (another submissionId).","parameters":[{"schema":{"$ref":"#/components/schemas/AnalysisTaskId"},"required":true,"description":"Analysis task id (`ana_` + ULID).","name":"analysis","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitAnalysisBody"}}}},"responses":{"200":{"description":"The outcome per item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisSubmissionResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `lease-lost`, `task-cancelled`, `already-submitted`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"413":{"description":"Problem: `payload-too-large`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`, `wrong-task-kind`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/analyses/{analysis}/release":{"post":{"operationId":"releaseAnalysis","tags":["analyses"],"summary":"Hand a claimed task back; it is queued again","parameters":[{"schema":{"$ref":"#/components/schemas/AnalysisTaskId"},"required":true,"description":"Analysis task id (`ana_` + ULID).","name":"analysis","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseAnalysisBody"}}}},"responses":{"200":{"description":"The task is queued again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `lease-lost`, `task-cancelled`, `already-submitted`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/analyses":{"get":{"operationId":"listAnalyses","tags":["analyses"],"summary":"Analysis tasks of a project, newest first","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/AnalysisTaskState"},"required":false,"description":"State of an analysis task.","name":"state","in":"query"},{"schema":{"$ref":"#/components/schemas/AnalysisKind"},"required":false,"description":"Kind of an analysis task.","name":"kind","in":"query"},{"schema":{"$ref":"#/components/schemas/ModelKey"},"required":false,"description":"Immutable model key: lowercase slug segments separated by `/`.","name":"modelKey","in":"query"},{"schema":{"$ref":"#/components/schemas/Cursor"},"required":false,"description":"Opaque pagination cursor.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisTaskPage"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/analyses/requeue":{"post":{"operationId":"requeueAnalyses","tags":["analyses"],"summary":"Queue models again, e.g. after a procedure upgrade, or the value chain placement task (analyzr:write)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequeueBody"}}}},"responses":{"200":{"description":"Outcome per model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequeueResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/analyses/{analysis}/submission":{"get":{"operationId":"getAnalysisSubmission","tags":["analyses"],"summary":"The stored submission of a done task: verbatim payload and result","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/AnalysisTaskId"},"required":true,"description":"Analysis task id (`ana_` + ULID).","name":"analysis","in":"path"}],"responses":{"200":{"description":"The submission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisSubmission"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/agent-tokens":{"get":{"operationId":"listAgentTokens","tags":["agent-tokens"],"summary":"A project's agent tokens (owner only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"responses":{"200":{"description":"Agent tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTokenList"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"post":{"operationId":"createAgentToken","tags":["agent-tokens"],"summary":"Create an agent token; the secret is shown once (owner, interactive client)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentTokenBody"}}}},"responses":{"201":{"description":"The new token with its secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAgentToken"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/agent-tokens/{token}":{"delete":{"operationId":"revokeAgentToken","tags":["agent-tokens"],"summary":"Revoke an agent token (owner, interactive client)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/AgentTokenId"},"required":true,"description":"Agent token id (`agt_` + ULID).","name":"token","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/auto-accept-rules":{"get":{"operationId":"listAutoAcceptRules","tags":["auto-accept"],"summary":"The project's auto-accept rules with their statistics, and the system rule (owner)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"responses":{"200":{"description":"The rules in creation order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAcceptRuleList"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"post":{"operationId":"createAutoAcceptRule","tags":["auto-accept"],"summary":"Create an auto-accept rule (owner, interactive client; off unless `enabled`)","description":"Revision 1 of a new rule, authored by the caller: while it is enabled, agent proposals recorded afterwards that meet it are accepted as decisions of the author (never retroactive: open proposals need `apply`). 422 `validation-failed` with `reason` `unknown-agent` or `name-taken`; a draft the schema refuses (a tier of another kind, a type on a placement rule, a confidence outside 0.5–1, control characters) is 422 `validation-failed` with `errors` naming the fields instead.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAcceptRuleDraft"}}}},"responses":{"201":{"description":"The new rule","headers":{"ETag":{"schema":{"type":"string","description":"`\"r<revision>\"`"},"required":true,"description":"`\"r<revision>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAutoAcceptRuleResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/auto-accept-rules/preview":{"post":{"operationId":"previewAutoAcceptRule","tags":["auto-accept"],"summary":"What a rule (saved or not) would have accepted so far and would accept now","description":"Replays the project history: the agent proposals humans decided that the rule would have accepted, with the humans’ verdicts (an empirical precision; acceptances by auto-accept rules are no ground truth and counted apart), the open proposals it would accept now (what `apply` would do) with the blocked ones per reason, and a curve over minimum confidences. Nothing is written.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAcceptCriteria"}}}},"responses":{"200":{"description":"The preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAcceptPreview"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/auto-accept-rules/{rule}":{"get":{"operationId":"getAutoAcceptRule","tags":["auto-accept"],"summary":"One auto-accept rule with every revision (ETag `\"r<revision>\"`)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/AutoAcceptRuleId"},"required":true,"description":"Auto-accept rule id (`aar_` + ULID).","name":"rule","in":"path"}],"responses":{"200":{"description":"The rule","headers":{"ETag":{"schema":{"type":"string","description":"`\"r<revision>\"`"},"required":true,"description":"`\"r<revision>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAcceptRuleDetail"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"put":{"operationId":"reviseAutoAcceptRule","tags":["auto-accept"],"summary":"Edit, enable or disable a rule: a new revision (`If-Match: \"r<revision>\"` required)","description":"Writes the draft as the next immutable revision, authored by the caller (decisions already recorded keep their revision). `If-Match` must name the head revision: without it 428 `precondition-required`, a stale one 412 `revision-conflict` with `headRev`. A draft equal to the head answers `unchanged`, unless the head’s author is no longer an owner: then the caller takes the rule over (a new revision with the same fields). The kind of a rule never changes (422 `validation-failed` with `reason` `kind-changed`); otherwise the reasons and `errors` of the create route.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/AutoAcceptRuleId"},"required":true,"description":"Auto-accept rule id (`aar_` + ULID).","name":"rule","in":"path"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"if-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAcceptRuleDraft"}}}},"responses":{"200":{"description":"The rule","headers":{"ETag":{"schema":{"type":"string","description":"`\"r<revision>\"`"},"required":true,"description":"`\"r<revision>\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAutoAcceptRuleResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"412":{"description":"Problem: `revision-conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"428":{"description":"Problem: `precondition-required`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/auto-accept-rules/{rule}/apply":{"post":{"operationId":"applyAutoAcceptRule","tags":["auto-accept"],"summary":"Apply an enabled rule to the open proposals (`?dryRun=true` first)","description":"Evaluates the head revision against every open proposal of its kind, with every safeguard. `dryRun=true` lists what it would accept and what is blocked. The real call needs the head `revision`, an enabled rule whose author is still an owner, and `expectedCount` equal to the fresh count: 409 `conflict` with `count`, `revision` and `reason` (`rule-disabled`, `author-not-owner`, `revision-changed`, `count-changed`) otherwise; 422 `validation-failed` with `reason` `expected-count-required` without `revision` and `expectedCount`. The result says whether the head is enabled and its author still an owner.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/AutoAcceptRuleId"},"required":true,"description":"Auto-accept rule id (`aar_` + ULID).","name":"rule","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"dryRun","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyAutoAcceptBody"}}}},"responses":{"200":{"description":"What it did or would do","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyAutoAcceptResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/auto-accept-revocations":{"post":{"operationId":"revokeAutoAccepted","tags":["auto-accept"],"summary":"Revoke auto-acceptances by rule, agent, kind or ids (`?dryRun=true` first)","description":"Each acceptance still in force is withdrawn (a human withdrawal under the decision’s principal): its item returns to `proposed` while a live proposal remains, else it turns `obsolete` and the agents judge it again. Items a human decided since are never touched. The real call needs `expectedCount` equal to the fresh count (409 `conflict`; 422 `validation-failed` with `reason` `expected-count-required` without it).","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"dryRun","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAcceptRevocationBody"}}}},"responses":{"200":{"description":"What it did or would do","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAcceptRevocationResult"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `demo-readonly`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"409":{"description":"Problem: `conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}},"/api/v1/projects/{project}/auto-accepted":{"get":{"operationId":"listAutoAccepted","tags":["auto-accept"],"summary":"The auto-acceptances of the project and their state (every human reviewer: the review UI marks)","description":"One entry per acceptance an auto-accept rule recorded: the item, the rule’s name and revision, the decider, the triggering agent proposal and the state (`in-force`, `revoked`, `human-decided`). Readable by editors and owners on an interactive client (permission `review`), so every reviewer sees which acceptances were made by a rule; agent tokens get 403 `human-decision-required`. The rules themselves stay owner-only.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^(?:prj_[0-7][0-9A-HJKMNP-TV-Z]{25}|[a-z0-9]+(?:-[a-z0-9]+)*)$","description":"Project id (`prj_…`) or project key.","example":"nordwind-handel"},"required":true,"description":"Project id (`prj_…`) or project key.","name":"project","in":"path"},{"schema":{"$ref":"#/components/schemas/AutoAcceptKind"},"required":false,"description":"What an auto-accept rule accepts: agent relation or placement proposals.","name":"kind","in":"query"},{"schema":{"$ref":"#/components/schemas/AutoAcceptRuleId"},"required":false,"description":"Auto-accept rule id (`aar_` + ULID).","name":"ruleId","in":"query"},{"schema":{"$ref":"#/components/schemas/AutoAcceptLedgerState"},"required":false,"description":"In force, revoked by an owner, or decided by a human since (a human decision always wins).","name":"state","in":"query"},{"schema":{"$ref":"#/components/schemas/PrincipalId"},"required":false,"description":"Principal id (`prn_` + ULID).","name":"agentPrincipalId","in":"query"}],"responses":{"200":{"description":"The auto-acceptances, oldest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAcceptLedger"}}}},"401":{"description":"Problem: `unauthorized`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"403":{"description":"Problem: `insufficient-scope`, `forbidden`, `human-decision-required`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"404":{"description":"Problem: `not-found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"422":{"description":"Problem: `validation-failed`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}}}},"webhooks":{}}