Skip to main content

Module models

Module models 

Source

Structs§

AgentRegistration
Approval
A single approval vote recorded on a consensus-gated pending action (Task 1.10).
CandidateCounts
v0.6.3.1 (P3): retrieval-stage candidate counts feeding RecallMeta.
CreateMemory
DuplicateCheck
Result envelope returned by db::check_duplicate.
DuplicateMatch
One nearest-neighbor result from a memory_check_duplicate lookup (Pillar 2 / Stream D). similarity is the cosine similarity in [-1.0, 1.0], rounded to three decimals at the response layer.
EntityRecord
Resolved entity record returned by db::entity_get_by_alias and embedded in the db::entity_register response (Pillar 2 / Stream B). aliases is the full alias set for the entity, ordered by created_at ASC, alias ASC for stable display.
EntityRegistration
Outcome of db::entity_register. created is true when a new entity memory was inserted, false when an existing entity was reused (idempotent re-registration that just merged new aliases into the existing record).
ForgetQuery
GovernancePolicy
Governance policy attached to a namespace’s standard memory (stored in metadata.governance).
KgQueryNode
One node returned by db::kg_query (Pillar 2 / Stream C — memory_kg_query). Each node represents a memory reachable from the query’s source through one outbound link, carrying the link’s temporal-validity columns plus the target memory’s display fields and the traversal path. depth is the actual number of hops from the source (1..=KG_QUERY_MAX_SUPPORTED_DEPTH); path is the src->mid->target chain as discovered by the recursive CTE.
KgTimelineEvent
Single row returned by db::kg_timeline (Pillar 2 / Stream C).
LinkBody
ListQuery
Memory
MemoryLink
NamespaceCount
NamespaceMetaEntry
v0.6.2 (S35): a namespace-standard metadata row the originating node wants propagated to peers. set_namespace_standard writes to namespace_meta locally; without federation, a peer sees the standard memory (fanned out via broadcast_store_quorum) but not the (namespace, standard_id, parent_namespace) tuple, so inheritance-chain walks on the peer fall back to auto_detect_parent and can miss an explicit parent link.
PendingAction
Row returned by db::list_pending_actions.
PendingDecision
v0.6.2 (S34): a pending-action decision (approve / reject) the originating node wants propagated to peers so callers on any peer see consistent state (approve/reject on node-2 → decision must reach node-1 etc.).
RecallBody
RecallMeta
v0.6.3.1 (P3): per-request observability for the recall pipeline.
RecallQuery
RecallTelemetry
v0.6.3.1 (P3): internal telemetry returned alongside recall results.
RegisterAgentBody
SearchQuery
Stats
SyncStateEntry
Phase 3 foundation: one row of the sync_state table serialised for diagnostic / API responses.
Taxonomy
Result envelope returned by db::get_taxonomy.
TaxonomyNode
One node of the hierarchical namespace tree returned by memory_get_taxonomy (Pillar 1 / Stream A).
TierCount
UpdateMemory
VectorClock
Phase 3 foundation (issue #224): vector clock tracking the latest updated_at this peer has seen from each known remote peer.

Enums§

ApproverType
Who approves actions gated by GovernanceLevel::Approve.
GovernanceDecision
The outcome of a governance check. Callers MAY execute on Allow, MUST reject on Deny, and SHOULD queue + return the pending_id on Pending.
GovernanceLevel
Who is permitted to perform a governed action.
GovernedAction
Actions that governance gates. Used as the action_type column value in pending_actions and as the discriminator for enforcement calls.
Tier
Memory tier — mirrors human memory systems.

Constants§

AGENTS_NAMESPACE
Namespace reserved for agent registrations (Task 1.3).
ENTITY_KIND
Marker written to metadata.kind on entity-typed memories. The db layer keys entity lookups off this field so the alias resolver never returns a regular memory that happens to share a title with an entity registered later.
ENTITY_TAG
Tag stamped on entity-typed memories so (title, namespace) can be shared across regular memories and entities without ambiguity (Pillar 2 / Stream B).
MAX_CONTENT_SIZE
MAX_NAMESPACE_DEPTH
Maximum number of path segments in a hierarchical namespace (Task 1.4). alphaone/engineering/platform/team/squad/pod/role/agent = 8 levels.
MID_TTL_EXTEND_SECS
PROMOTION_THRESHOLD
SHORT_TTL_EXTEND_SECS
How much to extend TTL on access (1 hour for short, 1 day for mid)
VALID_AGENT_TYPES
Closed set of agent types. Extend carefully — values are persisted.
VALID_SCOPES
Closed set of visibility scopes stamped into metadata.scope (Task 1.5). Controls which agents can see a memory via hierarchical namespace matching. Memories without a scope field are treated as private by the query layer.

Functions§

default_metadata
namespace_ancestors
Ancestors of a namespace, ordered most-specific-first (including the namespace itself as the first element).
namespace_depth
Number of /-delimited segments in a namespace path.
namespace_parent
Parent of a hierarchical namespace, or None for flat / empty inputs.