Documentation
¶
Overview ¶
Package store defines the composite store interface for Cortex.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrchestrationPreparationSources ¶
type OrchestrationPreparationSources interface {
PreparationSources
GetOrchestration(context.Context, id.OrchestrationConfigID) (*orchestration.Config, error)
GetByName(context.Context, string) (*agent.Config, error)
}
OrchestrationPreparationSources adds config and named participant reads to a preparation snapshot. Implementations must use the same transaction, scope and callback lifetime as PreparationSources. These reads grant no execution authority.
type PreparationSnapshotter ¶
type PreparationSnapshotter interface {
CapturePreparation(ctx context.Context, collect func(PreparationSources) error) (*run.SourceSnapshot, error)
}
PreparationSnapshotter is an optional store capability. CapturePreparation calls collect exactly once with a transactionally consistent, read-only view. All reads, including absent overlays, share one snapshot. It returns a receipt only after successful collection and transaction completion. It never retries collect or falls back to ordinary reads. External knowledge is outside this contract. Implementations must preserve cancellation and exact caller scope.
type PreparationSources ¶
type PreparationSources interface {
Get(context.Context, id.AgentID) (*agent.Config, error)
GetPersonaByName(context.Context, string) (*persona.Persona, error)
GetSkillByName(context.Context, string) (*skill.Skill, error)
GetTraitByName(context.Context, string) (*trait.Trait, error)
GetOverlayForAgentAt(context.Context, id.AgentID, cortex.Scope) (*prompt.Overlay, error)
}
PreparationSources is the read-only source set consumed by preparation. A snapshot view is scoped to its capture context and expires when its callback returns. Callers must not retain the view or use it outside that callback.
type ScopeInspector ¶
type ScopeInspector interface {
InspectScopes(ctx context.Context, visit func(ScopeIssue) error) error
}
ScopeInspector is an optional read-only administrative capability. It visits invalid rows across the entire database. Hosts must restrict access to their database operators; request scope does not limit this maintenance operation. A callback error or cancellation stops inspection. No identity is rewritten.
type ScopeIssue ¶
type ScopeIssue struct {
Resource string `json:"resource"`
ID string `json:"id"`
Canonical string `json:"canonical"`
Indexed [3]string `json:"indexed"`
Extra string `json:"extra"`
Reason string `json:"reason"`
}
ScopeIssue identifies a stored identity requiring operator reconciliation. It includes scope metadata only, never prompt, tool or conversation content.
type Store ¶
type Store interface {
agent.Store
run.Store
memory.Store
checkpoint.Store
skill.Store
trait.Store
behavior.Store
persona.Store
prompt.Store
session.Store
suspension.Store
orchestration.ConfigStore
orchestration.RunStore
a2a.Store
Migrate(ctx context.Context, opts ...cortex.MigrateOption) error
Ping(ctx context.Context) error
Close() error
}
Store is the composite persistence interface for all Cortex subsystems.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
assurance
Package assurance shares immutable evidence and report persistence rules.
|
Package assurance shares immutable evidence and report persistence rules. |
|
orchestrationstate
Package orchestrationstate shares atomic child retention across store backends.
|
Package orchestrationstate shares atomic child retention across store backends. |
|
preparation
Package preparation binds snapshot readers to a scope and callback lifetime.
|
Package preparation binds snapshot readers to a scope and callback lifetime. |
|
recipientdiscovery
Package recipientdiscovery validates bounded delivery identity projections.
|
Package recipientdiscovery validates bounded delivery identity projections. |
|
replydiscovery
Package replydiscovery validates bounded suspension identity projections.
|
Package replydiscovery validates bounded suspension identity projections. |
|
runstate
Package runstate encodes storage states that fence unsupported workers.
|
Package runstate encodes storage states that fence unsupported workers. |
|
scopeaudit
Package scopeaudit implements read-only stored-scope inventory shared by adapters.
|
Package scopeaudit implements read-only stored-scope inventory shared by adapters. |
|
Package mongo provides a MongoDB implementation of the Cortex composite store using Grove ORM with the mongodriver backend.
|
Package mongo provides a MongoDB implementation of the Cortex composite store using Grove ORM with the mongodriver backend. |
|
Package postgres provides a PostgreSQL implementation of the Cortex composite store using grove ORM with programmatic migrations.
|
Package postgres provides a PostgreSQL implementation of the Cortex composite store using grove ORM with programmatic migrations. |
|
Package scopespy provides a recording store double for asserting that every store call made by the engine carries a non-zero scope.
|
Package scopespy provides a recording store double for asserting that every store call made by the engine carries a non-zero scope. |
|
Package sqlite provides a SQLite implementation of the Cortex composite store using grove ORM with programmatic migrations.
|
Package sqlite provides a SQLite implementation of the Cortex composite store using grove ORM with programmatic migrations. |
|
Package storetest is a backend-agnostic conformance suite for store.Store implementations.
|
Package storetest is a backend-agnostic conformance suite for store.Store implementations. |