Documentation
¶
Overview ¶
Package memory provides the memory_manage and memory_capture MCP tools. Recall (reading memory back) is served by the unified search tool.
Index ¶
- type RecallChecker
- type RecallQuery
- type ThreadLinker
- type Toolkit
- func (*Toolkit) Close() error
- func (*Toolkit) Connection() string
- func (*Toolkit) Kind() string
- func (t *Toolkit) Name() string
- func (t *Toolkit) RegisterTools(s *mcp.Server)
- func (*Toolkit) SetQueryProvider(_ query.Provider)
- func (t *Toolkit) SetRecallChecker(rc RecallChecker)
- func (*Toolkit) SetSemanticProvider(_ semantic.Provider)
- func (t *Toolkit) SetThreadLinker(tl ThreadLinker)
- func (*Toolkit) Tools() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecallChecker ¶ added in v1.87.0
type RecallChecker interface {
ExistingMatch(ctx context.Context, q RecallQuery) (id string, score float64, err error)
}
RecallChecker finds an existing record a new capture restates, so the write path can supersede instead of appending (recall-first, #633). Implemented by the platform over the memory store; declared here so this package does not import pkg/knowledge.
type RecallQuery ¶ added in v1.87.0
type RecallQuery struct {
Embedding []float32
EntityURNs []string
CallerEmail string
MinScore float64
}
RecallQuery is the recall-first lookup: the precomputed embedding of the candidate content, the entities it concerns, and the caller's email, plus the cosine threshold above which a prior record counts as a restatement. Embedding is empty when no embedder is configured; in that case recall is skipped (no reliable similarity, so the capture simply appends).
type ThreadLinker ¶ added in v1.87.0
type ThreadLinker interface {
LinkInsight(ctx context.Context, threadIDs []string, insightID, actorID, actorEmail string) ([]string, error)
}
ThreadLinker bridges a reviewed capture back to the feedback thread(s) it resolves (#602). Satisfied by the portal thread store; a minimal interface so the memory toolkit does not depend on the portal package.
type Toolkit ¶
type Toolkit struct {
// contains filtered or unexported fields
}
Toolkit implements the memory management toolkit. Recall is handled by the unified search tool (#632); this toolkit owns only the memory_manage write path.
func (*Toolkit) Connection ¶
Connection returns the connection name for audit logging.
func (*Toolkit) RegisterTools ¶
RegisterTools registers memory_manage with the MCP server. Recall moved to the unified search tool (#632).
func (*Toolkit) SetQueryProvider ¶
SetQueryProvider is a no-op; memory toolkit does not use query execution.
func (*Toolkit) SetRecallChecker ¶ added in v1.87.0
func (t *Toolkit) SetRecallChecker(rc RecallChecker)
SetRecallChecker wires the recall-first checker.
func (*Toolkit) SetSemanticProvider ¶
SetSemanticProvider is a no-op: recall (which used lineage) moved to search, so the memory toolkit no longer needs the semantic provider.
func (*Toolkit) SetThreadLinker ¶ added in v1.87.0
func (t *Toolkit) SetThreadLinker(tl ThreadLinker)
SetThreadLinker wires the feedback-thread bridge.