kinds/

directory
v0.0.0-...-2769864 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: Apache-2.0

README

kinds — the registered memory Kinds

32 Kinds, one package each. A Kind declares its name, ID prefix, retention, content schema, indexed fields, write authority, and optional ScopeHooks. Registration is init()-time via memory.RegisterKind.

Every kind package exports a KindName constant. Use it — never spell a kind name as a string literal at a call site.

Package KindName Purpose Append-only
approval/ approval Approval-flow request + outcome events, linked to their tool call by toolUseID yes
artifact/ artifact Mutable head per logical artifact: name, renderer kind, revision count, movable tag refs no
artifactrevision/ artifact_revision One immutable rendered revision of an artifact no
authz_session_config/ authz_session_config Per-session authz config snapshot; authzd's cold-start policy and extraction worker read it no
authzdecision/ authz_decision Every authz.Check outcome, linked to resource + subject yes
channel_msg_ref/ channel_msg_ref Sparse index: a kind-scoped message reference → the turn index it landed at no
coldstarttask/ cold_start_task The approver's decision on a new session's cold-start scope proposal no
contentguardaudit/ contentguard_audit Per-call content-inspection findings (pass / block / approve) yes
extracted_entity/ extracted_entity Raw LLM-extracted entity candidates from authzd — unchecked no
extraction_state/ extraction_state authzd's per-turn extraction lifecycle: pending → complete | failed no
infoleakageaudit/ infoleakage_audit One record per info-leakage gate event yes
infoleakagedecision/ infoleakage_decision Per-session approve/deny of a (resourceType, resourceID) for this audience yes
infoleakagetaint/ infoleakage_taint One record per resource read via a tool call — what flowed into this session's context yes
kgingestion/ kg_ingestion Not a stored record: its ScopeHooks reacts to lifecycle/turn.completed and calls KGProvider.Ingest no
label/ label (resourceType, id) → display label from MCP tool responses. Every entry is trust:untrusted no
lifecycle/ lifecycle The session/scope lifecycle timeline yes
lineage/ lineage Bidirectional fork edges — parent ↔ child, two entries per fork no
metaagentaudit/ metaagent_audit One entry per @metaagent invocation yes
metaagentthread/ metaagent_thread Messages in the metaagent's sub-thread no
parkedprompt/ parked_prompt Durable record of a render-ready prompt a session is parked on no
preferenceaccess/ preference_access One entry per ?user-ref= subject-named preferences read, resolved or not yes
preferencewrite/ preference_write One entry per first-party user preference write (e.g., Slack App Home edit) into the user's own scope yes
relwritesaudit/ relwrites_audit Tuples pkg/authz/relwrites emitted after a successful tool call yes
scopeaudit/ scope_audit One entry per applied ScopeDelta yes
sessionscope/ session_scope The dynamic session scope (Layer 2). One entry per session, ID scp-config no
tool_dispatch_snapshot/ tool_dispatch_snapshot A workspace snapshot committed before a readwrite/external tool dispatch yes
toolchainaudit/ toolchain_audit Toolchain selection, carrying the frozen image digests of what actually ran yes
toolguardaudit/ toolguard_audit Breaker trips/recoveries, rate-limit hits, denials, halts yes
toolsession/ tool_session One entry per parsed event from an interactive tool's stream yes
turn/ turn The LLM transcript. ID turn-<index>-<role> makes re-append idempotent yes
uiaction/ ui_action One agent-UI action's lifecycle, rewritten in place as it progresses no
uiviewmodel/ ui_view_model Agent-UI Tier-1 view model per (session, ui, slot), rewritten in place no
uiviewparams/ ui_view_params The agent's binding-parameter choices per (session, ui), rewritten in place no
Support package What it holds
all/ Blank-imports every Kind above. One import wires the whole framework into a binary
internal/ Shared accessor boilerplate and the undecodable-entry report

Non-obvious constraints

  • A Kind omitted from all/ is unregistered in the operator, which serves the memory API and decides whether a Put is storable — so every write of it is answered 400 unknown Kind. parked_prompt shipped that way once; all_test.go now fails on any omission.
  • Append-only is not just "do not overwrite". It means: content-changing Put returns ErrAppendOnlyConflict, per-entry Delete is refused, and every entry is Ed25519-signed into a per-(scope, publisher) hash chain. See the group README.
  • Mutable is sometimes the point. ui_action, ui_view_model and ui_view_params are rewritten in place by design; append-only would reject the second write and let the agent compose a slot exactly once. That is not an audit gap — the underlying tool call is already in the tamper-evident transcript.
  • parked_prompt is deliberately not append-only either: a resolved prompt must be overwritable with its tombstone. It is working state, not evidence.
  • WriteAuthority() is an interface method, not a table in a consumer, so a new Kind cannot be registered without answering "which credential class may author this?"
  • IndexedFields() names JSON tags, not Go field names. FieldFilter.Path draws from the same vocabulary; a Go name here is misinformation that reappears as a predicate matching nothing.

Directories

Path Synopsis
Package all is a convenience: blank-importing it from a binary triggers the init() registration of every memory Kind.
Package all is a convenience: blank-importing it from a binary triggers the init() registration of every memory Kind.
Package approval is the memory Kind for approval-flow events (request + outcome).
Package approval is the memory Kind for approval-flow events (request + outcome).
Package artifact registers the logical-artifact head Kind.
Package artifact registers the logical-artifact head Kind.
Package artifactrevision registers the immutable per-revision Kind of the artifact-versioning system.
Package artifactrevision registers the immutable per-revision Kind of the artifact-versioning system.
Package auditkey implements the "audit_key" memory Kind: the operator's durable witness of which Ed25519 key an AgentSession instance signs its append-only records with.
Package auditkey implements the "audit_key" memory Kind: the operator's durable witness of which Ed25519 key an AgentSession instance signs its append-only records with.
Package authz_session_config is the memory Kind for the per-session authz config snapshot: the entity-extraction config plus the two fields authzd derives this session's cold-start authorization policy from.
Package authz_session_config is the memory Kind for the per-session authz config snapshot: the entity-extraction config plus the two fields authzd derives this session's cold-start authorization policy from.
Package authzdecision is the memory Kind for authz.Check outcomes.
Package authzdecision is the memory Kind for authz.Check outcomes.
Package channel_msg_ref implements the "channel_msg_ref" memory kind: a sparse index that maps a channel-kind-scoped message reference (Slack: channel_id:thread_ts:message_ts; future kinds: their own) to the turn index where the inbound message was recorded.
Package channel_msg_ref implements the "channel_msg_ref" memory kind: a sparse index that maps a channel-kind-scoped message reference (Slack: channel_id:thread_ts:message_ts; future kinds: their own) to the turn index where the inbound message was recorded.
Package coldstarttask is the memory Kind recording the approver's decision for a new session's cold-start scope proposal: which task (cleaned / original / none) the runner should run as the first turn, and whether scope was applied.
Package coldstarttask is the memory Kind recording the approver's decision for a new session's cold-start scope proposal: which task (cleaned / original / none) the runner should run as the first turn, and whether scope was applied.
Package contentguardaudit is the memory Kind for the audit log of content-guard enforcement: per-call content-inspection findings (pass/block/approve), one entry per firing.
Package contentguardaudit is the memory Kind for the audit log of content-guard enforcement: per-call content-inspection findings (pass/block/approve), one entry per firing.
Package envelopefact is the memory Kind for a fact derived by platform code from a VERIFIED inbound delivery — the signed webhook body that opened or advanced a session.
Package envelopefact is the memory Kind for a fact derived by platform code from a VERIFIED inbound delivery — the signed webhook body that opened or advanced a session.
Package extracted_entity is the memory Kind for raw LLM-extracted entity candidates produced by internal/cmd/authzd.
Package extracted_entity is the memory Kind for raw LLM-extracted entity candidates produced by internal/cmd/authzd.
Package extraction_state is the memory Kind tracking authzd's per-turn extraction lifecycle: pending → complete | failed.
Package extraction_state is the memory Kind tracking authzd's per-turn extraction lifecycle: pending → complete | failed.
Package factcontent holds the content shape the two fact Kinds share.
Package factcontent holds the content shape the two fact Kinds share.
Package infoleakageaudit is the memory Kind for information-leakage audit events.
Package infoleakageaudit is the memory Kind for information-leakage audit events.
Package infoleakagedecision is the memory Kind for per-session information- leakage approval decisions.
Package infoleakagedecision is the memory Kind for per-session information- leakage approval decisions.
Package infoleakagetaint is the memory Kind for per-session taint records.
Package infoleakagetaint is the memory Kind for per-session taint records.
internal
auditaccessor
Package auditaccessor holds the shared append-one / list-all accessor boilerplate for the simple per-scope audit Kinds.
Package auditaccessor holds the shared append-one / list-all accessor boilerplate for the simple per-scope audit Kinds.
undecodable
Package undecodable holds the one operator-facing report every Kind accessor owes when a stored Entry will not decode.
Package undecodable holds the one operator-facing report every Kind accessor owes when a stored Entry will not decode.
Package label is the memory Kind for (resourceType, id) → display label tuples extracted from MCP tool responses.
Package label is the memory Kind for (resourceType, id) → display label tuples extracted from MCP tool responses.
Package lifecycle is the canonical Kind for session/scope-lifecycle signals.
Package lifecycle is the canonical Kind for session/scope-lifecycle signals.
Package lineage implements the "lineage" memory kind: bidirectional fork edges that record parent ↔ child relationships between AgentSessions when a user triggers Restart-from-here.
Package lineage implements the "lineage" memory kind: bidirectional fork edges that record parent ↔ child relationships between AgentSessions when a user triggers Restart-from-here.
Package metaagentaudit is the memory Kind for the per-invocation audit log of metaagent decisions.
Package metaagentaudit is the memory Kind for the per-invocation audit log of metaagent decisions.
Package metaagentthread is the memory Kind for messages in the metaagent's sub-thread (user mentions + metaagent responses).
Package metaagentthread is the memory Kind for messages in the metaagent's sub-thread (user mentions + metaagent responses).
Package observation is the memory Kind for a note an agent session writes into a resource-scoped memory pool: free text one session concluded about a resource (a customer, a repo, whatever the resource type is), durable for a later session holding a slot on the same pool to read.
Package observation is the memory Kind for a note an agent session writes into a resource-scoped memory pool: free text one session concluded about a resource (a customer, a repo, whatever the resource type is), durable for a later session holding a slot on the same pool to read.
Package observedfact is the memory Kind for a fact derived from a tool RESULT by a declared `observes` block.
Package observedfact is the memory Kind for a fact derived from a tool RESULT by a declared `observes` block.
Package parkedprompt implements the "parked_prompt" memory kind: the durable record of a render-ready prompt a session is parked on, so it can be re-surfaced to a surface that attaches later, or after a restart.
Package parkedprompt implements the "parked_prompt" memory kind: the durable record of a render-ready prompt a session is parked on, so it can be re-surfaced to a surface that attaches later, or after a restart.
Package plangateaudit is the memory Kind for the plan gate's authorization record: which plan was approved, which phase was active, and what the gate decided for each permissioned call.
Package plangateaudit is the memory Kind for the plan gate's authorization record: which plan was approved, which phase was active, and what the gate decided for each permissioned call.
Package preferenceaccess is the memory Kind for the audit log of subject-named preference reads: every GET /memory/_preferences?user-ref= request, resolved or not.
Package preferenceaccess is the memory Kind for the audit log of subject-named preference reads: every GET /memory/_preferences?user-ref= request, resolved or not.
Package preferencewrite is the memory Kind for the audit log of first-party human writes to user preferences: every direct edit via the Slack App Home (or other UI surfaces) into the acting user's own user_preference scope.
Package preferencewrite is the memory Kind for the audit log of first-party human writes to user preferences: every direct edit via the Slack App Home (or other UI surfaces) into the acting user's own user_preference scope.
Package pttag is the memory Kind for per-datum provenance tags.
Package pttag is the memory Kind for per-datum provenance tags.
Package pttagcontent is the memory Kind for redacted content held behind a provenance tag.
Package pttagcontent is the memory Kind for redacted content held behind a provenance tag.
Package relwritesaudit is the memory Kind for tuples written by pkg/authz/relwrites after a successful tool call.
Package relwritesaudit is the memory Kind for tuples written by pkg/authz/relwrites after a successful tool call.
Package scopeaudit is the memory Kind for the audit log of applied ScopeDeltas — one entry per applied delta.
Package scopeaudit is the memory Kind for the audit log of applied ScopeDeltas — one entry per applied delta.
Package sessionscope is the memory Kind for the dynamic session scope (Layer 2).
Package sessionscope is the memory Kind for the dynamic session scope (Layer 2).
Package systemprompt is the memory Kind for the append-only record of the system prompt an agent actually ran under.
Package systemprompt is the memory Kind for the append-only record of the system prompt an agent actually ran under.
Package tool_dispatch_snapshot implements the "tool_dispatch_snapshot" memory kind: a record that the runner requested — and the controller committed — a workspace snapshot immediately before a specific tool dispatch with stateImpact ∈ {readwrite, external}.
Package tool_dispatch_snapshot implements the "tool_dispatch_snapshot" memory kind: a record that the runner requested — and the controller committed — a workspace snapshot immediately before a specific tool dispatch with stateImpact ∈ {readwrite, external}.
Package toolcatalog is the memory Kind for the append-only record of which tools an agent was OFFERED, and from which turn.
Package toolcatalog is the memory Kind for the append-only record of which tools an agent was OFFERED, and from which turn.
Package toolchainaudit is the memory Kind for the append-only record of toolchain selection.
Package toolchainaudit is the memory Kind for the append-only record of toolchain selection.
Package toolguardaudit is the memory Kind for the audit log of tool-guard enforcement events: breaker trips/recoveries, rate-limit hits, denials and halts.
Package toolguardaudit is the memory Kind for the audit log of tool-guard enforcement events: breaker trips/recoveries, rate-limit hits, denials and halts.
Package toolsession registers the tool_session Kind — one Entry per parsed event from an interactive tool's stream (e.g.
Package toolsession registers the tool_session Kind — one Entry per parsed event from an interactive tool's stream (e.g.
Package triggerdelivery is the memory Kind for the append-only record of the signed webhook delivery that STARTED a session.
Package triggerdelivery is the memory Kind for the append-only record of the signed webhook delivery that STARTED a session.
Package turn registers the LLM-transcript Kind.
Package turn registers the LLM-transcript Kind.
Package uiaction is the memory Kind for an agent-UI action's lifecycle record: one entry per request ID, rewritten in place as the call progresses (submitted -> awaiting_approval -> running -> settled).
Package uiaction is the memory Kind for an agent-UI action's lifecycle record: one entry per request ID, rewritten in place as the call progresses (submitted -> awaiting_approval -> running -> settled).
Package uiviewmodel is the memory Kind for an agent-UI Tier-1 view-model: one record per (session, ui, hook), rewritten in place each time the agent calls update_view for that hook.
Package uiviewmodel is the memory Kind for an agent-UI Tier-1 view-model: one record per (session, ui, hook), rewritten in place each time the agent calls update_view for that hook.
Package uiviewparams is the memory Kind for the agent's own binding-parameter choices on an agent-defined UI: one record per (session, ui), rewritten in place each time the agent calls set_view_params.
Package uiviewparams is the memory Kind for the agent's own binding-parameter choices on an agent-defined UI: one record per (session, ui), rewritten in place each time the agent calls set_view_params.
Package userpreference is the memory Kind for one user's saved preference values, keyed per (classNamespace, className, key) in the user's own scope (memory.UserScope).
Package userpreference is the memory Kind for one user's saved preference values, keyed per (classNamespace, className, key) in the user's own scope (memory.UserScope).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL