Make sqlite.NewMemoryDatabase side-effect-free again: the constructor now records the path only, and the database is opened/migrated lazily from the first ctx-bearing operation. This keeps memory.CreateToolSet as a pure constructor and removes its context.Background root while preserving retry behavior if initialization fails.
Thread context through related DB setup helpers and keep shutdown checkpointing detached via CheckpointAndClose.
Thread context through sqlite/session/RAG/memory DB setup so constructors and migrations no longer mint fresh roots. Fake proxy cleanup and askpass connection handling now use context providers derived from their startup context. LocalRuntime stores a context provider for tool-change refresh callbacks.
The remaining suppressions are intentionally detached event hooks/MCP supervisor callbacks or compatibility fallbacks.
- Add search_memories tool (keyword search with AND logic, optional category filter)
- Add update_memory tool (edit existing memories by ID)
- Add optional category field to memories for organization
- Default memory path to ~/.cagent/memory/<config-name>/memory.db (per-user, per-agent-config)
- Make path optional in config validation (was required, now defaults)
- Add configName parameter to ToolsetCreator for per-config-file identity
- SQLite migration adds category column transparently to existing databases
- Expand tool instructions with guidance on search vs get_all, update vs create
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updates SQLite connection strings to use _pragma query parameters for busy_timeout and journal_mode configuration in both memory database and session store.
Removes redundant manual file cleanup in sqlite tests.
Assisted-By: cagent