Data model

Every core type and field — what it means, and which are required vs optional.

A complete reference for the types you'll touch. Short version: on the source-facing types, only artifact_id is required.

Chunk

A piece of retrieved evidence your Retriever returns.

FieldRequiredDefaultMeaning
artifact_idYesThe source's natural id (document id, row key, URL, tool identity).
textYesThe content.
versionNo""A native revision (Confluence version, git sha, ETag…).
content_hashNo""Hash of the content; computed for you when absent.

Synthesis

What a Synthesizer returns.

FieldRequiredDefaultMeaning
understandingYesStructured dict (summary, claims, entities, facts).
usedNo[]Indices of the chunks actually used → precise provenance.
okNoTrueFalse = synthesis failed; the cache degrades instead of caching garbage.

ChangeEvent

A "this source changed" signal. Usually produced by source_changed / a connector.

FieldRequiredDefaultMeaning
artifact_idYesWhich source changed (must match provenance).
versionNo""New revision.
content_hashNo""Hash of new content (most precise skip-no-op check).
kindNo"update""delete" evicts the unit.

FreshnessPolicy

FieldDefaultMeaning
max_ageNoneSeconds before a unit is revalidated on read.
revalidateNone`(artifact_id) -> (text, version)

ContextStrategy

CONTEXT_FIRST (default — raw only when escalated) · CONTEXT_RAW (always) · CONTEXT_ONLY (never). Raw is always reachable via Result.evidence regardless.

See get() & Result for the full Result fields. A Related has unit_id, understanding, evidence, relation ("shared_entity" | "shared_source"), and score.

InvalidationResult

Returned by source_changed / invalidate: dirtied, skipped_unchanged, deleted (lists of unit ids), and matched_units (int — 0 means the change matched nothing).

Next