Documentation
¶
Overview ¶
Package decisions reads and writes the agent's memory journal (the `decisions` table) in CockroachDB.
Index ¶
- type Decision
- type Store
- func (s *Store) Close()
- func (s *Store) MarkExecuted(ctx context.Context, id uuid.UUID, outcome string) error
- func (s *Store) RecordDecision(ctx context.Context, d Decision) (uuid.UUID, error)
- func (s *Store) SimilarDecisions(ctx context.Context, queryEmbedding []float32, limit int) ([]Decision, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) MarkExecuted ¶
MarkExecuted updates a decision after a human approves it and the ccloud command has actually run.
func (*Store) RecordDecision ¶
RecordDecision inserts a new row with status='proposed'. The embedding is expected to already be computed (node-orchestrator calls Bedrock for this before invoking this method) — this package doesn't call Bedrock itself to keep the Go service focused on CockroachDB + ccloud + MCP.
func (*Store) SimilarDecisions ¶
func (s *Store) SimilarDecisions(ctx context.Context, queryEmbedding []float32, limit int) ([]Decision, error)
SimilarDecisions is the heart of the "why journal" — semantic search over past reasoning using CockroachDB's distributed vector index. queryEmbedding is the embedding of the user's question (e.g. "why did you scale up last week"), also computed via Bedrock in node-orchestrator.