Commit 21f963f
StackMemory Bot (CLI)
feat(conductor): add trace-based evidence system with SQLite logging
- Add conductor_traces SQLite table for per-turn conversation logging
- TraceCollector records tool calls, tokens, phases, content previews
- Pre-extracted TurnData avoids double content-block iteration in hot path
- stringifyEventTruncated with JSON replacer for single-pass truncation
- classifyErrorText shared classifier unifies trace + heuristic analysis
- withDb helper eliminates try/finally boilerplate across query functions
- SQL json_each for server-side tool frequency aggregation
- Evidence display on by default (--no-evidence to disable)
- CLI: conductor traces, replay, trace-stats commands
- 22 tests covering collector, queries, classifier, and truncation1 parent 40a2802 commit 21f963f
File tree
5 files changed
+1438
-41
lines changed- src/cli/commands
- __tests__
5 files changed
+1438
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| |||
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| 167 | + | |
164 | 168 | | |
165 | 169 | | |
166 | 170 | | |
| |||
0 commit comments