Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterTool(server *mcp.Server, root string)
- func RenderAgentsBridge(records []Record) ([]byte, string, error)
- func RunRecall(ctx context.Context, root string, in RecallInput) capabilityruntime.Result
- func RunSave(ctx context.Context, root string, in Input) capabilityruntime.Result
- type BackendMetrics
- type BridgeResult
- type BridgeStatus
- type Input
- type Lint
- type MemoryBackend
- type RecallInput
- type RecallResult
- type Record
- type SaveResult
- type Scored
- type SearchQuery
- type Store
Constants ¶
const ( BridgeStart = "<!-- JACU MEMORY START -->" BridgeEnd = "<!-- JACU MEMORY END -->" )
const ( SaveToolName = "jacu_memory_save" RecallToolName = "jacu_memory_recall" )
Variables ¶
var ( ErrBridgeChecksumMismatch = errors.New("JACU memory bridge checksum mismatch") ErrBridgeChecksumMissing = errors.New("JACU memory bridge checksum missing") ErrBridgeMalformed = errors.New("JACU memory bridge region is malformed") ErrBridgeSecretContent = errors.New("JACU memory bridge contains secret content") )
Functions ¶
func RegisterTool ¶
func RenderAgentsBridge ¶
RenderAgentsBridge returns the complete managed region and its source hash. The source hash covers normalized active conventions, not timestamps.
func RunRecall ¶ added in v0.4.0
func RunRecall(ctx context.Context, root string, in RecallInput) capabilityruntime.Result
Types ¶
type BackendMetrics ¶
type BridgeResult ¶
type BridgeResult struct {
Status BridgeStatus `json:"status"`
SourceHash string `json:"source_hash"`
RecordCount int `json:"record_count"`
Changed bool `json:"changed"`
}
func SyncAgentsFile ¶
func SyncAgentsFile(path string, records []Record) (BridgeResult, error)
SyncAgentsFile appends or replaces only the managed memory region. A region whose checksum cannot be verified is never rewritten.
func SyncProjectAgents ¶
func SyncProjectAgents(store Store, projectID, agentsPath string) (BridgeResult, error)
SyncProjectAgents renders all current project conventions through the same normal memory flow used by the save tool.
type BridgeStatus ¶
type BridgeStatus string
const ( BridgeCreated BridgeStatus = "created" BridgeAppended BridgeStatus = "appended" BridgeUpdated BridgeStatus = "updated" BridgeUnchanged BridgeStatus = "unchanged" )
type MemoryBackend ¶
type MemoryBackend string
MemoryBackend names the storage strategy selected by the documented trigger. BackendFTS5 is a future migration target; this package still ships JSON only.
const ( BackendJSON MemoryBackend = "json" BackendFTS5 MemoryBackend = "fts5" )
func SelectMemoryBackend ¶
func SelectMemoryBackend(metrics BackendMetrics) MemoryBackend
SelectMemoryBackend is deliberately a pure policy decision. Unknown recall is not a failure measurement and therefore cannot trigger a dependency.
type RecallInput ¶
type RecallResult ¶
type RecallResult struct {
Results []Scored `json:"results"`
}
type Record ¶
type Record struct {
MemoryID string `json:"memory_id"`
ProjectID string `json:"project_id"`
Kind string `json:"kind"`
Title string `json:"title"`
Body string `json:"body"`
Evidence []string `json:"evidence"`
Source string `json:"source"`
Status string `json:"status"`
SupersededBy string `json:"superseded_by"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}