mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-07-10 01:29:41 +00:00
Some checks are pending
CI / semgrep (push) Waiting to run
* Add Forge provider support * Add Forge provider documentation * Avoid loading Forge contexts during discovery
1.6 KiB
1.6 KiB
Forge
Forge agent CLI.
- Source:
src/providers/forge.ts - Loading: lazy (
src/providers/index.ts:48) - Test:
tests/providers/forge.test.ts
Where it reads from
~/.forge/.forge.db (forge.ts:31).
Storage format
SQLite (forge.ts:225-252). CodeBurn reads the conversations table and parses JSON from context.messages (forge.ts:154-171).
Caching
None.
Deduplication
Per <provider>:<conversation_id>:<tool_call_id-or-message-index> (forge.ts:193).
Quirks
workspace_idis cast to text in SQL because Forge can store values larger than JavaScript's safe integer range (forge.ts:35,forge.ts:155,forge.ts:238).- Forge reports prompt tokens inclusive of cached tokens. CodeBurn subtracts cached tokens from prompt tokens before pricing (
forge.ts:185-188). - One CodeBurn call is emitted per assistant message with usage; zero-token assistant messages are skipped (
forge.ts:183-190). - Project names come from the conversation title, falling back to
workspace_id(forge.ts:244).
When fixing a bug here
- If discovery returns no sessions, confirm the SQLite schema still has
conversationswithconversation_id,workspace_id,context,created_at, andupdated_at. - If Node SQLite throws on real data, check whether a numeric field needs
CAST(... AS TEXT)likeworkspace_id. - If costs look too high, verify cached tokens are still subtracted from prompt tokens before calling
calculateCost. - If duplicate rows appear, inspect whether
tool_calls[].call_idis missing and the parser is falling back to message index.