{"openapi":"3.1.0","info":{"title":"HiveBase Platform API","version":"1.0.0","description":"Every agent starts caught up—and leaves the company smarter for the next one.","contact":{"email":"api@hivebase.ai"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://mcp.hivebase.ai","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"hb_sk_* or hb_oat_*","description":"HiveBase API key or OAuth access token."}},"schemas":{"Problem":{"type":"object","required":["type","title","status","detail","code","retryable"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"code":{"type":"string"},"retryable":{"type":"boolean"},"receipt_id":{"type":"string","format":"uuid"},"details":{"type":"object"}}}}},"paths":{"/v1/context/brief":{"get":{"operationId":"context_brief","summary":"Get Company Brief","description":"Preferred entry point for external agents. Returns a warm, visibility-scoped and source-cited company capsule. Use lens=handoff for a continuity brief covering responsibilities, commitments, positioning, relationships, and unresolved decisions. Free (0 WU).","tags":["context"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"description":"Optional question or topic to focus the company brief.","default":"What should an agent know about this company right now?","type":"string","minLength":1,"maxLength":2000}},{"name":"limit","in":"query","required":false,"schema":{"description":"Maximum number of matching decisions to include.","default":10,"type":"integer","minimum":1,"maximum":20}},{"name":"lens","in":"query","required":false,"schema":{"description":"Use handoff for an evidence-linked “If I disappear” continuity brief covering responsibilities, commitments, positioning, relationships, and unresolved decisions.","type":"string","enum":["handoff"]}}],"responses":{"200":{"description":"Operation completed or receipt retrieved","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"markdown":{"type":"string"},"generated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"lens":{"type":"string","enum":["handoff"]},"citations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"],"additionalProperties":false}]}},"required":["type","provenance"],"additionalProperties":false}},"conflicts":{"default":[],"type":"array","items":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"],"additionalProperties":false}]}},"required":["type","provenance"],"additionalProperties":false},"superseded_by":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"],"additionalProperties":false}]}},"required":["type","provenance"],"additionalProperties":false},"message":{"type":"string","minLength":1,"maxLength":2000}},"required":["source","superseded_by","message"],"additionalProperties":false}},"decisions":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"work":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"open_questions":{"description":"Bounded, subject-scoped uncertainties material to this brief. Raise them with the human rather than guessing; resolve via context.resolve so answers change corpus state.","default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string","minLength":1,"maxLength":200,"description":"Stable id for context.resolve. Prefer fact:<uuid>; judgment:<uuid> and clarification:<key> are also accepted."},"claim":{"type":"string","minLength":1,"maxLength":2000},"priority":{"type":"string","enum":["blocking","tracking","watching"]},"confidence":{"type":"number","minimum":0,"maximum":1},"reason":{"type":"string","enum":["explicit_question","low_confidence","contradiction","ambiguous_identity","high_grade_supersession","single_source","loss_ledger_gap","pending_judgment"]},"score":{"description":"Consequence ranking score (0–1). Higher = ask first.","type":"number","minimum":0,"maximum":1},"subject":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"query":{"type":"string","minLength":1,"maxLength":500},"entity_kind":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300}},"required":["kind"],"additionalProperties":false}},"required":["question_id","claim","priority","confidence"],"additionalProperties":false}},"trust":{"type":"object","properties":{"confidence":{"type":"number","minimum":0,"maximum":1},"freshness":{"type":"number","minimum":0,"maximum":1},"is_stale":{"type":"boolean"},"contradiction_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"contradictions":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"fact_id":{"type":"string","minLength":1,"maxLength":100},"claim":{"type":"string","minLength":1,"maxLength":2000}},"required":["fact_id","claim"],"additionalProperties":false}},"evidence_mix":{"type":"object","properties":{"primary_observation":{"type":"number","minimum":0,"maximum":1},"synthesis":{"type":"number","minimum":0,"maximum":1},"speculation":{"type":"number","minimum":0,"maximum":1},"decision_directive":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false},"confirmation_urgency":{"type":"string","enum":["low","medium","high"]},"clarification_triggers":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":2000},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["question"],"additionalProperties":false}},"quarantined_held_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["confidence","freshness","is_stale","contradiction_count","contradictions"],"additionalProperties":false},"diagnostics":{"type":"object","properties":{"empty_corpus":{"type":"boolean"},"degraded":{"type":"boolean"},"brownout":{"type":"boolean"},"failure_reasons":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"redacted_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"primary_relevance":{"type":"string","enum":["matched","weak","none","unscoped","unknown"]}},"required":["empty_corpus","degraded","failure_reasons"],"additionalProperties":false}},"required":["markdown","generated_at","citations"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Idempotency or revision conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-hivebase-operation":"context.brief","x-hivebase-contract-version":"1.0.0","x-required-scope":"context:read","x-effect":{"class":"E0","reversibility":"none","idempotency":"none"}}},"/v1/context/search":{"post":{"operationId":"context_search","summary":"Search Context","description":"Search workspace context for source-backed snippets on a topic, or hydrate exact references returned by context.brief. Returns extractive evidence with resolvable source metadata; it does not generate an answer. Free (0 WU).","tags":["context"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"q":{"description":"Free-text query for workspace context.","type":"string","minLength":1,"maxLength":2000},"query":{"description":"Alias for q.","type":"string","minLength":1,"maxLength":2000},"references":{"description":"Exact citations to hydrate. Pass references returned by context.brief or another context.search call.","minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300,"description":"Exact source ID copied from a HiveBase citation."},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"]},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"]}]}},"required":["type","id"]}},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50},"as_of":{"description":"ISO timestamp for point-in-time retrieval (bitemporal facts/decisions valid at this instant).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}}}}}},"responses":{"200":{"description":"Operation completed or receipt retrieved","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"snippet":{"type":"string","minLength":1},"score":{"type":"number","minimum":0,"maximum":1},"source":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"],"additionalProperties":false}]}},"required":["type","provenance"],"additionalProperties":false}},"required":["id","snippet","source"],"additionalProperties":false}},"conflicts":{"description":"Visible source conflicts resolved by a newer recorded decision. Do not rely on the older source without reviewing the replacement decision.","default":[],"type":"array","items":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"],"additionalProperties":false}]}},"required":["type","provenance"],"additionalProperties":false},"superseded_by":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"],"additionalProperties":false}]}},"required":["type","provenance"],"additionalProperties":false},"message":{"type":"string","minLength":1,"maxLength":2000}},"required":["source","superseded_by","message"],"additionalProperties":false}},"open_questions":{"description":"Bounded, subject-scoped uncertainties material to this search. Raise them with the human rather than guessing; resolve via context.resolve.","default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string","minLength":1,"maxLength":200,"description":"Stable id for context.resolve. Prefer fact:<uuid>; judgment:<uuid> and clarification:<key> are also accepted."},"claim":{"type":"string","minLength":1,"maxLength":2000},"priority":{"type":"string","enum":["blocking","tracking","watching"]},"confidence":{"type":"number","minimum":0,"maximum":1},"reason":{"type":"string","enum":["explicit_question","low_confidence","contradiction","ambiguous_identity","high_grade_supersession","single_source","loss_ledger_gap","pending_judgment"]},"score":{"description":"Consequence ranking score (0–1). Higher = ask first.","type":"number","minimum":0,"maximum":1},"subject":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"query":{"type":"string","minLength":1,"maxLength":500},"entity_kind":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300}},"required":["kind"],"additionalProperties":false}},"required":["question_id","claim","priority","confidence"],"additionalProperties":false}},"next_cursor":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque durable cursor. Persist and return it unchanged."}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Idempotency or revision conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-hivebase-operation":"context.search","x-hivebase-contract-version":"1.0.0","x-required-scope":"context:read","x-effect":{"class":"E0","reversibility":"none","idempotency":"none"}}},"/v1/context/sync":{"post":{"operationId":"context_sync","summary":"Sync Company Context","description":"Return visibility-scoped knowledge, decision, and work references changed since an opaque durable cursor, then issue the next cursor for another agent or session. Free (0 WU).","tags":["context"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"cursor":{"description":"Last cursor returned by context.sync. Omit only for the initial sync.","type":"string","minLength":1,"maxLength":4096},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200}}}}}},"responses":{"200":{"description":"Operation completed or receipt retrieved","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"cursor":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque durable cursor. Persist and return it unchanged."},"has_more":{"type":"boolean"},"generated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"reset_required":{"description":"When true, discard the prior local cache before applying this response because the caller's visibility envelope changed.","type":"boolean"},"changes":{"type":"object","properties":{"knowledge":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":300},"kind":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":500},"changed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"change_type":{"type":"string","enum":["upsert","superseded","invalidated"],"description":"Apply an upsert, evict a superseded entity, or drop an invalidated entity (e.g. quarantined without a replacement)."},"replacement_id":{"description":"Entity that replaces a superseded item, when known.","type":"string","minLength":1,"maxLength":300},"supersedes":{"description":"Older entity IDs invalidated by this upsert.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"supersession_reason":{"description":"Why the prior claim or decision was superseded, when recorded on the old row.","type":"string","minLength":1,"maxLength":2000},"source":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"],"additionalProperties":false}]}},"required":["type","provenance"],"additionalProperties":false}},"required":["id","kind","title","changed_at","change_type"],"additionalProperties":false}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":300},"kind":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":500},"changed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"change_type":{"type":"string","enum":["upsert","superseded","invalidated"],"description":"Apply an upsert, evict a superseded entity, or drop an invalidated entity (e.g. quarantined without a replacement)."},"replacement_id":{"description":"Entity that replaces a superseded item, when known.","type":"string","minLength":1,"maxLength":300},"supersedes":{"description":"Older entity IDs invalidated by this upsert.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"supersession_reason":{"description":"Why the prior claim or decision was superseded, when recorded on the old row.","type":"string","minLength":1,"maxLength":2000},"source":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"],"additionalProperties":false}]}},"required":["type","provenance"],"additionalProperties":false}},"required":["id","kind","title","changed_at","change_type"],"additionalProperties":false}},"work":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":300},"kind":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":500},"changed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"change_type":{"type":"string","enum":["upsert","superseded","invalidated"],"description":"Apply an upsert, evict a superseded entity, or drop an invalidated entity (e.g. quarantined without a replacement)."},"replacement_id":{"description":"Entity that replaces a superseded item, when known.","type":"string","minLength":1,"maxLength":300},"supersedes":{"description":"Older entity IDs invalidated by this upsert.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"supersession_reason":{"description":"Why the prior claim or decision was superseded, when recorded on the old row.","type":"string","minLength":1,"maxLength":2000},"source":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"],"additionalProperties":false}]}},"required":["type","provenance"],"additionalProperties":false}},"required":["id","kind","title","changed_at","change_type"],"additionalProperties":false}}},"required":["knowledge","decisions","work"],"additionalProperties":false}},"required":["cursor","has_more","generated_at","changes"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Idempotency or revision conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-hivebase-operation":"context.sync","x-hivebase-contract-version":"1.0.0","x-required-scope":"context:read","x-effect":{"class":"E0","reversibility":"none","idempotency":"none"}}},"/v1/context/memories":{"post":{"operationId":"context_remember","summary":"Remember Company Context","description":"Preserve one durable fact, constraint, commitment, correction, or session outcome so future agents start with the same company context. Requires a caller-stable idempotency_key and returns a truthful write receipt.","tags":["context"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Caller-stable retry key. The JSON idempotency_key field is also accepted for MCP/SDK parity; when both are present they must match.","schema":{"type":"string","minLength":8,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotency_key":{"type":"string","minLength":8,"maxLength":200,"description":"Required caller-stable retry key. Reusing it with changed input returns a conflict."},"kind":{"type":"string","enum":["fact","constraint","commitment","correction","session_outcome"]},"content":{"type":"string","minLength":1,"maxLength":200000},"title":{"type":"string","minLength":1,"maxLength":300},"topics":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"visibility":{"description":"Omit to use the workspace root: private for personal workspaces and shared for company workspaces.","oneOf":[{"type":"object","properties":{"scope":{"type":"string","const":"workspace"}},"required":["scope"]},{"type":"object","properties":{"scope":{"type":"string","const":"private"}},"required":["scope"]},{"type":"object","properties":{"scope":{"type":"string","const":"team"},"team_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["scope","team_id"]}]},"sources":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"]},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"]}]}},"required":["type"]}},"corrects_memory_id":{"description":"Required when kind is correction.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","content"]}}}},"responses":{"200":{"description":"Operation completed or receipt retrieved","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"operation":{"type":"string","pattern":"^[a-z][a-z0-9]*(\\.[a-z][a-z0-9_-]*)+$"},"state":{"type":"string","enum":["accepted","processing","applied","failed","rejected","expired"]},"accepted_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"retryable":{"default":false,"type":"boolean"},"entity":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":300},"label":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["type","id"],"additionalProperties":false},"approval_url":{"type":"string","maxLength":2000,"format":"uri"},"correction":{"type":"object","properties":{"available":{"type":"boolean"},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["available"],"additionalProperties":false},"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","description":"Stable domain error code; never a JSON-RPC error number."},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"},"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["receipt_id","operation","state","accepted_at","updated_at","retryable"],"additionalProperties":false}}}},"202":{"description":"Write accepted or still processing","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"operation":{"type":"string","pattern":"^[a-z][a-z0-9]*(\\.[a-z][a-z0-9_-]*)+$"},"state":{"type":"string","enum":["accepted","processing","applied","failed","rejected","expired"]},"accepted_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"retryable":{"default":false,"type":"boolean"},"entity":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":300},"label":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["type","id"],"additionalProperties":false},"approval_url":{"type":"string","maxLength":2000,"format":"uri"},"correction":{"type":"object","properties":{"available":{"type":"boolean"},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["available"],"additionalProperties":false},"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","description":"Stable domain error code; never a JSON-RPC error number."},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"},"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["receipt_id","operation","state","accepted_at","updated_at","retryable"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Idempotency or revision conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-hivebase-operation":"context.remember","x-hivebase-contract-version":"1.0.0","x-required-scope":"context:write","x-effect":{"class":"E1","reversibility":"manual","idempotency":"supported"}}},"/v1/context/resolve":{"post":{"operationId":"context_resolve","summary":"Resolve Open Question","description":"Answer a material open_questions[] item from context.brief or context.search. Routes through Track D materialization (correct / observe / resolvePendingJudgment) so the answer changes corpus state. Requires a caller-stable idempotency_key and returns a truthful write receipt.","tags":["context"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Caller-stable retry key. The JSON idempotency_key field is also accepted for MCP/SDK parity; when both are present they must match.","schema":{"type":"string","minLength":8,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotency_key":{"type":"string","minLength":8,"maxLength":200,"description":"Required caller-stable retry key. Reusing it with changed input returns a conflict."},"question_id":{"type":"string","minLength":1,"maxLength":200,"description":"question_id from open_questions[] (fact:<uuid>, judgment:<uuid>, or clarification:<key>)."},"resolution":{"type":"string","enum":["confirm","correct","dismiss","answer"],"description":"confirm reaffirms the current claim; correct/answer supersede with note; dismiss drops a non-material question or rejects a held judgment."},"note":{"description":"Required for correct/answer. Optional clarification text for confirm/dismiss.","type":"string","minLength":1,"maxLength":20000}},"required":["question_id","resolution"]}}}},"responses":{"200":{"description":"Operation completed or receipt retrieved","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"operation":{"type":"string","pattern":"^[a-z][a-z0-9]*(\\.[a-z][a-z0-9_-]*)+$"},"state":{"type":"string","enum":["accepted","processing","applied","failed","rejected","expired"]},"accepted_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"retryable":{"default":false,"type":"boolean"},"entity":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":300},"label":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["type","id"],"additionalProperties":false},"approval_url":{"type":"string","maxLength":2000,"format":"uri"},"correction":{"type":"object","properties":{"available":{"type":"boolean"},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["available"],"additionalProperties":false},"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","description":"Stable domain error code; never a JSON-RPC error number."},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"},"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["receipt_id","operation","state","accepted_at","updated_at","retryable"],"additionalProperties":false}}}},"202":{"description":"Write accepted or still processing","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"operation":{"type":"string","pattern":"^[a-z][a-z0-9]*(\\.[a-z][a-z0-9_-]*)+$"},"state":{"type":"string","enum":["accepted","processing","applied","failed","rejected","expired"]},"accepted_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"retryable":{"default":false,"type":"boolean"},"entity":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":300},"label":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["type","id"],"additionalProperties":false},"approval_url":{"type":"string","maxLength":2000,"format":"uri"},"correction":{"type":"object","properties":{"available":{"type":"boolean"},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["available"],"additionalProperties":false},"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","description":"Stable domain error code; never a JSON-RPC error number."},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"},"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["receipt_id","operation","state","accepted_at","updated_at","retryable"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Idempotency or revision conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-hivebase-operation":"context.resolve","x-hivebase-contract-version":"1.0.0","x-required-scope":"context:write","x-effect":{"class":"E1","reversibility":"manual","idempotency":"supported"}}},"/v1/decisions/search":{"post":{"operationId":"decision_search","summary":"Search Decisions","description":"Find previous decisions or hydrate known decisions before making a new call. Returns current, visibility-scoped precedent with source references, never invented synthesis. Free (0 WU).","tags":["decision"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"q":{"description":"Natural language search query (required unless `ids` is provided)","type":"string","minLength":1,"maxLength":2000},"ids":{"description":"Hydrate specific decisions by ID (skips semantic search; up to 50)","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"limit":{"default":10,"description":"Max results (1-50)","type":"integer","minimum":1,"maximum":50},"threshold":{"default":0.5,"description":"Minimum similarity threshold (ignored when `ids` provided)","type":"number","minimum":0,"maximum":1},"category":{"description":"Filter by category","type":"string","enum":["architecture","compliance","customer","domain","engineering","finance","go_to_market","hiring","legal","market","operations","partnership","people","policy","pricing","process","product","research","sales","security","strategy","strategic","support","technical"]},"significance":{"description":"Filter by significance level","type":"string","enum":["routine","significant","strategic"]},"surface":{"description":"Filter by source surface","type":"string","enum":["substrate","supervisor","supervisor_decision","triage","correction","strategy","marketing","meeting","account","manual","session_debrief","backfill","code","adr","mcp"]},"entity_type":{"description":"Filter by entity ref type (e.g. 'competitor')","type":"string"},"since":{"description":"Only decisions after this ISO 8601 timestamp","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}}}}}},"responses":{"200":{"description":"Operation completed or receipt retrieved","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"judgment":{"type":"string"},"context":{"type":"string"},"rationale":{"type":"string"},"decided_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"category":{"type":"string"},"significance":{"type":"string"},"superseded_by_decision_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sources":{"default":[],"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"],"additionalProperties":false},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"],"additionalProperties":false}]}},"required":["type","provenance"],"additionalProperties":false}},"prior_positions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"judgment":{"type":"string"},"decided_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"supersession_reason":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"history":{"type":"string"}},"required":["id","title","judgment","context","decided_at"],"additionalProperties":{}}},"next_cursor":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque durable cursor. Persist and return it unchanged."}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Idempotency or revision conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-hivebase-operation":"decision.search","x-hivebase-contract-version":"1.0.0","x-required-scope":"decision:read","x-effect":{"class":"E0","reversibility":"none","idempotency":"none"}}},"/v1/decisions":{"post":{"operationId":"decision_record","summary":"Record Decision","description":"Record an immutable decision with its context, judgment, rationale, evidence, and optional superseded decision so every future agent can retrieve the current precedent. Visibility defaults to private in a personal workspace and company-wide in a company workspace. Requires a caller-stable idempotency_key and returns a truthful write receipt.","tags":["decision"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Caller-stable retry key. The JSON idempotency_key field is also accepted for MCP/SDK parity; when both are present they must match.","schema":{"type":"string","minLength":8,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotency_key":{"type":"string","minLength":8,"maxLength":200,"description":"Required caller-stable retry key. Reusing it with the same input returns the original receipt."},"surface":{"description":"Surface where the decision was made","default":"mcp","type":"string","enum":["substrate","supervisor","supervisor_decision","triage","correction","strategy","marketing","meeting","account","manual","session_debrief","backfill","code","adr","mcp"]},"title":{"type":"string","minLength":1,"maxLength":500,"description":"Short descriptive title"},"context":{"type":"string","minLength":1,"maxLength":10000,"description":"Background context for the decision"},"judgment":{"type":"string","minLength":1,"maxLength":5000,"description":"The decision itself — what was decided and why"},"rationale":{"description":"Optional explicit rationale when it is separate from judgment","type":"string","maxLength":5000},"evidence":{"description":"Source references that support the decision","default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"]},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"]}]}},"required":["type"]}},"supersedes_sources":{"description":"Sources this decision explicitly replaces. Use this when a newer decision contradicts a document, conversation, meeting, or external source rather than another decision record.","default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"provenance":{"default":{"class":"external"},"oneOf":[{"type":"object","properties":{"class":{"type":"string","const":"repo"},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"Repository-qualified file path, for example owner/repo/README.md."}},"required":["class","path"]},{"type":"object","properties":{"class":{"type":"string","const":"conversation"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"meeting"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"decision"}},"required":["class"]},{"type":"object","properties":{"class":{"type":"string","const":"external"}},"required":["class"]}]}},"required":["type"]}},"superseded_decision_id":{"description":"Prior decision this new immutable decision supersedes","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"decided_at":{"description":"ISO 8601 timestamp (defaults to now)","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"source_type":{"description":"Source type (e.g. 'agent_session', 'meeting')","type":"string","maxLength":100},"source_id":{"description":"Source record ID","type":"string","maxLength":200},"context_sources":{"description":"Provenance pointers to source records","type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"]}},"category":{"description":"Decision category","type":"string","enum":["architecture","compliance","customer","domain","engineering","finance","go_to_market","hiring","legal","market","operations","partnership","people","policy","pricing","process","product","research","sales","security","strategy","strategic","support","technical"]},"significance":{"default":"routine","description":"routine | significant | strategic","type":"string","enum":["routine","significant","strategic"]},"entity_refs":{"description":"Entity references (competitors, accounts, products, people)","type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["type","id","name"]}},"visibility":{"description":"company | team (requires team_id) | leadership (admin-only) | private (decided_by only). Defaults to company in company workspaces and private in personal workspaces.","type":"string","enum":["company","team","leadership","private"]},"team_id":{"description":"Required team ID when visibility=team","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visibility_tags":{"description":"Additional restrictive visibility labels already granted to this connection and user role","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"module_id":{"description":"Module/department this decision belongs to","type":"string","maxLength":200},"depends_on":{"description":"UUIDs of decisions this one depends on","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["title","context","judgment"]}}}},"responses":{"200":{"description":"Operation completed or receipt retrieved","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"operation":{"type":"string","pattern":"^[a-z][a-z0-9]*(\\.[a-z][a-z0-9_-]*)+$"},"state":{"type":"string","enum":["accepted","processing","applied","failed","rejected","expired"]},"accepted_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"retryable":{"default":false,"type":"boolean"},"entity":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":300},"label":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["type","id"],"additionalProperties":false},"approval_url":{"type":"string","maxLength":2000,"format":"uri"},"correction":{"type":"object","properties":{"available":{"type":"boolean"},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["available"],"additionalProperties":false},"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","description":"Stable domain error code; never a JSON-RPC error number."},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"},"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["receipt_id","operation","state","accepted_at","updated_at","retryable"],"additionalProperties":false}}}},"202":{"description":"Write accepted or still processing","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"operation":{"type":"string","pattern":"^[a-z][a-z0-9]*(\\.[a-z][a-z0-9_-]*)+$"},"state":{"type":"string","enum":["accepted","processing","applied","failed","rejected","expired"]},"accepted_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"retryable":{"default":false,"type":"boolean"},"entity":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":300},"label":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["type","id"],"additionalProperties":false},"approval_url":{"type":"string","maxLength":2000,"format":"uri"},"correction":{"type":"object","properties":{"available":{"type":"boolean"},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["available"],"additionalProperties":false},"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","description":"Stable domain error code; never a JSON-RPC error number."},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"},"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["receipt_id","operation","state","accepted_at","updated_at","retryable"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Idempotency or revision conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-hivebase-operation":"decision.record","x-hivebase-contract-version":"1.0.0","x-required-scope":"decision:write","x-effect":{"class":"E1","reversibility":"manual","idempotency":"supported"}}},"/v1/receipts/{receiptId}":{"get":{"operationId":"receipt_get","summary":"Get Write Receipt","description":"Read the truthful accepted, processing, applied, failed, rejected, or expired state of a context or decision write and its safe resulting entity reference. Free (0 WU).","tags":["receipt"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"receiptId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Receipt identifier returned by a HiveBase write operation."}}],"responses":{"200":{"description":"Operation completed or receipt retrieved","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"operation":{"type":"string","pattern":"^[a-z][a-z0-9]*(\\.[a-z][a-z0-9_-]*)+$"},"state":{"type":"string","enum":["accepted","processing","applied","failed","rejected","expired"]},"accepted_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"retryable":{"default":false,"type":"boolean"},"entity":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":300},"label":{"type":"string","minLength":1,"maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["type","id"],"additionalProperties":false},"approval_url":{"type":"string","maxLength":2000,"format":"uri"},"correction":{"type":"object","properties":{"available":{"type":"boolean"},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["available"],"additionalProperties":false},"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","description":"Stable domain error code; never a JSON-RPC error number."},"message":{"type":"string","minLength":1,"maxLength":2000},"retryable":{"type":"boolean"},"receipt_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["receipt_id","operation","state","accepted_at","updated_at","retryable"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Idempotency or revision conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-hivebase-operation":"receipt.get","x-hivebase-contract-version":"1.0.0","x-required-scope":"context:read","x-effect":{"class":"E0","reversibility":"none","idempotency":"none"}}},"/v1/activity":{"get":{"operationId":"activity_list","summary":"List Agent Activity","description":"List continuity writes and decisions with truthful receipt state and source attribution.","tags":["activity"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"before","in":"query","required":false,"description":"Opaque pagination cursor returned as next_cursor. Persist and return it unchanged.","schema":{"type":"string"}},{"name":"since","in":"query","required":false,"description":"Mark activity newer than this timestamp as changed.","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Continuity activity","content":{"application/json":{"schema":{"type":"object","required":["items","next_cursor"],"properties":{"items":{"type":"array","items":{"type":"object","required":["receipt","summary","source","source_references","changed_since_last_look"],"properties":{"receipt":{"type":"object"},"summary":{"type":"string"},"source":{"type":"object","required":["token_kind"],"properties":{"token_kind":{"type":"string"},"client_id":{"type":["string","null"]},"agent_name":{"type":["string","null"]}}},"source_references":{"type":"array","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string","format":"uri","pattern":"^https?://"}}}},"changed_since_last_look":{"type":"boolean"}}}},"next_cursor":{"type":["string","null"]}}}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-required-scope":"context:read"}},"/mcp":{"post":{"operationId":"mcp_call","summary":"HiveBase MCP endpoint","description":"Official stateless MCP endpoint exposing the eight context-continuity operations and two default resources.","tags":["mcp"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"method":{"type":"string"},"params":{"type":"object"},"id":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"JSON-RPC response","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"type":"object"},"error":{"type":"object"},"id":{}}}}}},"202":{"description":"Notification accepted"},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-mcp-tools":["context.brief","context.search","context.sync","context.remember","context.resolve","decision.search","decision.record","receipt.get"],"x-mcp-resources":["hivebase://context/company-primer","hivebase://capabilities"]}}},"x-tool-count":8,"x-oauth-protected-resource-metadata":"https://mcp.hivebase.ai/.well-known/oauth-protected-resource"}