mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-05-20 00:57:09 +00:00
Adds the Codebuff provider (formerly Manicode) as a single-file plugin under src/providers/codebuff.ts, following the conventions used by the pi and opencode providers. Data source: - Walks ~/.config/manicode/projects/<project>/chats/<chatId>/ - chat-messages.json holds the serialized ChatMessage[] - run-state.json is consulted to recover the real cwd so sessions group by the originating project directory - manicode-dev and manicode-staging channels are walked automatically - Honors CODEBUFF_DATA_DIR for a custom root Cost model: - Codebuff bills in credits, not tokens. Each completed assistant message records credits on message.credits; CodeBurn approximates cost using the public PAYG rate ($0.01 / credit) as a conservative upper bound. - When Codebuff routes a call through an upstream provider and the stashed RunState records real token totals (providerOptions.usage or providerOptions.codebuff.usage in messageHistory), the LiteLLM-based calculation takes precedence. Tool normalization maps Codebuff-native names (read_files, str_replace, run_terminal_command, spawn_agents, etc.) to the canonical set used by the classifier (Read, Edit, Bash, Agent, TodoWrite, ...). Tests: - 18 provider tests covering discovery, parsing, multi-turn sessions, providerOptions fallback, dedup, malformed files, display names - provider-registry.test.ts updated to assert codebuff is registered and its tool/model display names Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| fixtures/security | ||
| providers | ||
| security | ||
| bash-commands.test.ts | ||
| cli-plan.test.ts | ||
| compare-stats.test.ts | ||
| daily-cache.test.ts | ||
| dashboard.test.ts | ||
| date-range-filter.test.ts | ||
| day-aggregator.test.ts | ||
| export.test.ts | ||
| fs-utils.test.ts | ||
| menubar-json.test.ts | ||
| minimax.test.ts | ||
| models.test.ts | ||
| optimize-fs.test.ts | ||
| optimize.test.ts | ||
| parser-filter.test.ts | ||
| plan-usage.test.ts | ||
| plans.test.ts | ||
| provider-registry.test.ts | ||