Commit Graph
13 Commits
Author SHA1 Message Date
David Gageot 994c0806eb refactor(memory): lazy-initialize sqlite database with operation context
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.
2026-06-29 10:17:44 +02:00
David Gageot 0a87da1f97 refactor: thread context through DB and test helper setup
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.
2026-06-29 10:17:44 +02:00
David Gageot cb001a241b Remove package to github.com/docker/docker-agent
Signed-off-by: David Gageot <david.gageot@docker.com>
2026-03-09 12:04:59 +01:00
NunoandClaude Opus 4.6 c2520db0a0 Fix lint issues: paramTypeCombine, importShadow, gofumpt, testifylint
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 15:45:34 +00:00
NunoandClaude Opus 4.6 0633f9e04a Add search, update, categories, and default path to memory tool
- 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>
2026-03-06 15:26:05 +00:00
David Gageot 897fda38ff fix(sqlite): use _pragma for connection parameters
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
2026-01-05 07:42:45 +01:00
David Gageot 20cb811892 Remove useless comments
Signed-off-by: David Gageot <david.gageot@docker.com>
2025-11-06 19:59:37 +01:00
David Gageot 1c394cc871 Also lint tests
Signed-off-by: David Gageot <david.gageot@docker.com>
2025-09-30 18:35:27 +02:00
David Gageot b7d70acbdb Use t.Context()
Signed-off-by: David Gageot <david.gageot@docker.com>
2025-09-01 17:08:02 +02:00
David Gageot 9e37ffa0a1 Better assertions
Signed-off-by: David Gageot <david.gageot@docker.com>
2025-07-28 15:42:52 +02:00
David Gageot 5d1441a1af Format code
Signed-off-by: David Gageot <david.gageot@docker.com>
2025-07-18 13:37:26 +02:00
Djordje Lukic b5ae4cff7f Rename rumpl/cagent to docker/cagent
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2025-07-17 11:02:24 +02:00
Djordje Lukic 2fa0f6b696 Add tests for sqlite
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2025-06-12 22:59:03 +02:00