refactor(memory): run agent recall, memory tools and the server on the memory contract (P1.5)

- Orchestrator, memory tools, context loader and pattern write-back use a
  MemoryStore and a workspace scope instead of MindDB layers; the knowledge
  graph tools, cognify, memory linker and feedback handler are gone (graph
  hidden in v1, ADR-0002).
- The server opens one mem0 store in <dataDir>/memory/, embedded by the
  in-process model on first use, and extracts facts about the user in the
  background with the model the user chose (memoryExtraction setting).
- Legacy .mind memories are copied into the store once, in the background;
  the legacy files are only read.
- Weaver consolidation, harvest, wiki, memory import, memory lanes, vector
  backfill and index reconciliation are removed; agent runs, loops, sub-agent
  results, connector fetch and the failed-turn capture write through the
  contract. Workspace sessions no longer hold a mind handle.
- FileIndexer and the install audit move to waggle.db; recall date helpers and
  the reranker are copied into core.
- The CLI REPL opens the same memory store.
This commit is contained in:
shumeiko.it
2026-10-24 11:56:26 +02:00
parent f3eb6b6652
commit 784ca770b1
86 changed files with 2520 additions and 8444 deletions

View File

@@ -1,4 +1,5 @@
export { Orchestrator, type OrchestratorConfig } from './orchestrator.js';
export { Orchestrator, type OrchestratorConfig, type RecallOptions, type ContextFrames } from './orchestrator.js';
export { toRecallFrame, type RecallFrame } from './recall-frame.js';
export {
generateTurnId,
logTurnEvent,
@@ -212,7 +213,6 @@ export { scanForInjection, type ScanResult } from './injection-scanner.js';
export { checkGrounding, extractClaimedSpecifics, type GroundingResult, type ClaimedSpecific } from './grounding-check.js';
export { CostTracker, DEFAULT_MODEL_PRICING, type ModelPricing, type UsageStats, type UsageEntry } from './cost-tracker.js';
export { extractEntities, type ExtractedEntity } from './entity-extractor.js';
export { CognifyPipeline, type CognifyConfig, type CognifyResult } from './cognify.js';
export {
TraceRecorder, truncate as truncateTraceText, scrubSecrets,
type TraceHandle, type FinalizeOptions as TraceFinalizeOptions,
@@ -250,7 +250,6 @@ export {
BUILTIN_HARNESSES, getHarnessById, matchHarness,
researchVerifyHarness, codeReviewFixHarness, documentDraftHarness,
} from './builtin-harnesses.js';
export { FeedbackHandler } from './feedback-handler.js';
export { checkResponseQuality, type QualityIssue } from './quality-controller.js';
export { HookRegistry, type HookEvent, type HookContext, type HookResult, type HookActivityEntry, type HookFn } from './hooks.js';
export { loadHooksFromConfig } from './hook-loader.js';
@@ -288,7 +287,6 @@ export { extractEntitiesWithLLM, type LLMCallFn as EntityLLMCallFn } from './ent
export { createSkillTools, type SkillToolsDeps } from './skill-tools.js';
export { SkillRecommender, type SkillRecommendation, type SkillRecommenderDeps } from './skill-recommender.js';
export { createSubAgentTools, ROLE_TOOL_PRESETS, type SubAgentToolsDeps, type SubAgentDef, type SubAgentResult } from './subagent-tools.js';
export { MemoryLinker, type MemoryLink } from './memory-linker.js';
export { CapabilityRouter, type CapabilityRoute, type CapabilitySource, type CapabilityRouterDeps, type ConnectorInfo } from './capability-router.js';
export {
searchCapabilities, validateInstallCandidate, loadStarterSkillsMeta,