Expand description
Vault knowledge: the ctxpkg.research-context.v1 document, its
revisions, and draft proposals streamed from engine sessions.
-
GET /v1/vaults/{vault_id}/knowledge(If-None-Match: "<revision>") →KnowledgeRevisionV1withETag: "<revision>", or 304 -
GET /v1/vaults/{vault_id}/knowledge/revisions?after=&limit=→RevisionListV1 -
POST /v1/vaults/{vault_id}/proposalsDraftProposalV1→ProposalAckV1;Idempotency-Key= the engine’s outbox item id. A draft whose content is identical to an existing engine draft of the vault maps to that proposal (samenumber), whichever instance sent it first. -
GET /v1/vaults/{vault_id}/proposals?state=&mine=1→ProposalListV1 -
1.6:
GET /v1/vaults/{vault_id}/proposals/{number}→ProposalV1: the draft exactly as its engine sent it (a sealed patch stays sealed), for engine-side review of sealed vaults -
PUT /v1/vaults/{vault_id}/knowledgeKnowledgePutRequestV1→KnowledgeRevisionV1, or 409revision_conflict; needsknowledge.merge. The new revision is alwaysexpected_revision + 1(a sealed revision is sealed for that number). 1.6:merged_proposalsmarks those proposals merged at the new revision in the same transaction -
1.9:
GET /v1/vaults/{vault_id}/knowledge/diff?from=&to=→RevisionDiffV1: the ops from one released revision to another, so an engine with a large document fetches deltas (in the clear only; a sealed vault answers409 invalid_statereasonsealed)
Revision 0 is the empty document. A draft becomes a revision only after review in Hive.
Quarantine (1.9, owner O3): a revision that an auto-merge threshold
produced (no person reviewed it) starts quarantined. GET …/knowledge
delivers the newest released revision (revision is that delivered
head) and counts the quarantined revisions after it in
quarantined_after; ?revision=N reads a quarantined one for review
(right knowledge.merge). An engine never hands quarantined content to
any agent except for that review. A person releases it, or rolls it back,
within 24 hours; otherwise Hive proposes a task (origin
quarantine_timeout). A rollback appends a new revision with the document
of an earlier one (rolls_back). In a sealed vault an engine performs
it, because only an engine can re-seal for the new number.
Structs§
- Context
Patch V1 - Patch of a proposal against
base_revision:opsin the clear, orsealed(the encryptedopsarray) for sealed vaults. - Draft
Proposal V1 POST /v1/vaults/{vault_id}/proposals: a draft from one session.- Engine
Screening V1 - What the engine’s screening removed before the draft was queued.
- FactV1
- One fact.
- Knowledge
Event V1 - 1.9
knowledge.event(service → client), on the vault channel: the engine fetches the delivered head (or the quarantined revision, to review it) over HTTP. - Knowledge
PutRequest V1 PUT /v1/vaults/{vault_id}/knowledge: compare-and-set a whole revision.- Knowledge
Revision V1 - One revision of a vault’s knowledge; exactly one of
document/sealed. - PageV1
- 1.9: a readable wiki page built from facts (the “tree” of the ctxpkg mapping). Pages are part of the reviewed document.
- Proposal
AckV1 - Response of
POST /v1/vaults/{vault_id}/proposals. - Proposal
List V1 - Response of
GET /v1/vaults/{vault_id}/proposals. - Proposal
Summary V1 - One proposal in a listing.
- Proposal
V1 - Response of
GET /v1/vaults/{vault_id}/proposals/{number}(1.6). - Relation
V1 - A typed edge between two facts.
- Research
Context Document V1 - The knowledge document of one vault.
- Revision
Diff V1 - 1.9:
GET /v1/vaults/{vault_id}/knowledge/diff?from=&to=. - Revision
List V1 - Response of
GET /v1/vaults/{vault_id}/knowledge/revisions. - Revision
Summary V1 - One entry of the revision history.
Enums§
- Draft
Origin - 1.9: the origin of a draft. Every origin passes the same engine admission filter before upload.
- Knowledge
Event Kind - Page
Item V1 - 1.9: one item of a wiki page.
- Patch
OpV1 - One edit of a proposal patch.
- Proposal
State - Review state of a proposal.
- Revision
State - 1.9: whether a revision is delivered to agents.
Constants§
- DRAFT_
PROPOSAL_ SCHEMA - FACT_
KINDS - 1.9 adds
gotcha,dead_end,experienceandconvention. - KNOWLEDGE_
PUT_ REQUEST_ SCHEMA - KNOWLEDGE_
REVISION_ SCHEMA - MAX_
DOCUMENT_ CHARS - Characters of the serialized document.
- MAX_
FACTS - 1.9: 5,000 facts (wiki scale); engines fetch deltas with
RevisionDiffV1. - MAX_
KNOWLEDGE_ BODY_ BYTES - Largest knowledge request/response body (a full document fits).
- MAX_
MERGED_ PROPOSALS - Most proposals one revision may merge.
- MAX_
PAGES - 1.9: wiki pages per document, items per page, characters of a prose item.
- MAX_
PAGE_ ITEMS - MAX_
PATCH_ OPS - Ops per proposal patch.
- MAX_
PROSE_ CHARS - MAX_
REFERENCES - MAX_
RELATIONS - MAX_
REVISIONS_ PAGE - Revisions per page.
- PROPOSAL_
ACK_ SCHEMA - PROPOSAL_
LIST_ SCHEMA - PROPOSAL_
VIEW_ SCHEMA - 1.6: one proposal with its draft.
- RELATION_
TYPES - Edges between facts; 1.9 adds
explains. Edges to code, work and actors belong to the graph view (super::graph), not to the document. - RESEARCH_
CONTEXT_ FORMAT - Format id of the knowledge document (the package format keeps its name).
- REVISION_
DIFF_ SCHEMA - REVISION_
LIST_ SCHEMA
Functions§
- import_
source_ ok - 1.9: an import source,
import:docs:<path>#<slug>(repo-relative path, slug of[a-z0-9-]) orimport:git:<sha>(40 or 64 lowercase hex).