Commit graph

12 commits

Author SHA1 Message Date
Christian Klotz
57583617ef
fix(agent): make SQLite session operations linear 2026-08-01 02:11:22 +03:00
Christian Klotz
2b765ef529
fix(agent): restore forward session cursor reads
Document complete session store and search composition for scanning and canonical SQLite search.
2026-07-31 17:17:41 +03:00
Christian Klotz
4e81b79615
fix(agent): restrict session construction to repositories 2026-07-31 16:56:51 +03:00
Christian Klotz
2132f8f75f
fix(agent): clarify session persistence ownership 2026-07-31 16:16:42 +03:00
Cristina Poncela Cubeiro
9e7582aa03
feat: sqlite session storage (#6594)
This PR:

- Adds retainedTail to compaction entries in the new agent harness so we don't have to walk up the tree for the 2000 tokens before compaction,
- Changes getPathToRoot to getPathToRootOrCompaction to only load until last compaction, as unnecessary to access all nodes where it is called,
- Adds a SQLite storage backend, in a separate packages/session-backend-sqlite, with a migration system and schemas as per on-site discussions: sessions to match session header messages (except for metadata, which I couldn't understand what it's used for or where it gets written, so I omitted it), session_entries for shared entry types as columns plus payload as a json for what remains, session_sequences to represent the append-only, serialized nature of the jsonl files, branch_entries to attribute nodes to branches (relationship one-to-many), and session_materialized with the session info (see /session in TUI) to act as a "cache" or quick-access for costs, message count, token info, labels, session name, and model-thinking-level config (e.g. for fast resume).
- This is compatible with the new agent harness Session abstraction.
2026-07-21 11:36:31 +02:00
David Brailovsky
2fd3868401
add usage info to branch summary, compaction and tool result entries (#6671)
* add usage info to branch summary entries

* add usage to compaction entries

* allow custom tools to report llm usage in tool results

* allow observing and patching usage in tool_result hooks

* agent-harness: save usage in entries

for compaction, branch summaries and tool results
2026-07-20 16:41:43 +02:00
Mario Zechner
dd1c690f36 fix(agent): add session context entry projection 2026-07-08 14:59:16 +02:00
haoqixu
e8ede14f5d fix(agent): normalize session names 2026-06-23 19:36:13 +08:00
Mario Zechner
2e02c74dcb chore: pin dependencies and use native TypeScript 2026-05-20 12:46:17 +02:00
Mario Zechner
4f40f62b7b refactor(agent): harden harness session semantics 2026-05-16 00:32:16 +02:00
Mario Zechner
80c918c247 refactor(agent): isolate node filesystem session dependencies 2026-05-15 00:53:33 +02:00
Mario Zechner
617d8b317d refactor(agent): tighten harness environment and resources 2026-05-06 19:41:17 +02:00
Renamed from packages/agent/test/harness/session-tree.test.ts (Browse further)