Skip to content

Append per-model tool and trip history to its own SQLite file - #18

Merged
SoryAK merged 1 commit into
mainfrom
feat/model-history-db
Sep 9, 2026
Merged

Append per-model tool and trip history to its own SQLite file#18
SoryAK merged 1 commit into
mainfrom
feat/model-history-db

Conversation

@SoryAK

@SoryAK SoryAK commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add mba-model-history.db (append-only tools + breaker trips), separate from kill-state.
  • Write last-turn tools and trips from the chat proxy. Kill still resets the fuse; history rows stay.
  • A failed history write does not break serving. No suggestion UI yet.

Test plan

  • systemctl --user restart mba so the daemon opens the new file
  • Chat a model through the proxy with a tool call; confirm ~/.config/mba/mba-model-history.db gets a tool row
  • Trip a breaker (eofOverflow / kill); confirm a trip row remains after kill-state resets
  • npx vitest run packages/core/src/service/model-history.test.ts packages/core/src/service/model-proxy.test.ts

Made with Cursor

Kill-state stays a resettable fuse. The new ledger keeps last-turn tools and breaker trips for later analysis.

Co-authored-by: Cursor <cursoragent@cursor.com>
@SoryAK
SoryAK merged commit af6a286 into main Sep 9, 2026
3 checks passed
SoryAK added a commit that referenced this pull request Sep 10, 2026
Append per-model tool and trip history to its own SQLite file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant