mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-05-19 07:43:09 +00:00
- Adds support for Pi (pi.ai) as a new session provider. - Pi sessions are stored as JSONL files under `~/.pi/agent/sessions/<project-dir>/` and use OpenAI-compatible model IDs (gpt-5, gpt-5.4, gpt-4o, etc.). - `src/providers/pi.ts` (new): Pi provider - discovers JSONL session files, parses assistant turns, extracts token counts, tool calls, and bash commands, deduplicates via response ID with line-index fallback - `src/providers/types.ts`: added bashCommands field to `ParsedProviderCall` so all providers carry extracted bash command lists - `src/providers/index.ts`: registered Pi as a core provider alongside Claude and Codex - `src/providers/codex.ts`, `cursor.ts`: added `bashCommands: []` to satisfy the new required field on `ParsedProviderCall` - `src/parser.ts`: fixed bug where `providerCallToTurn` always emitted an empty bashCommands array instead of passing through the parsed commands - `src/classifier.ts`: added lowercase tool name variants (bash, edit, read, write) to match Pi's tool naming convention in JSONL output - `src/bash-utils.ts`: exclude `true`, `false`, and shell variable assignments from extracted commands; scan past leading `NAME=val` tokens so `FOO=bar ls` correctly records `ls` rather than being dropped - `package.json`: added pi to keywords - `tests/providers/pi.test.ts` (new): 16 unit tests covering session discovery, multi-turn parsing, tool/bash extraction, deduplication, zero-token filtering, and display name mapping - `tests/provider-registry.test.ts`: updated core provider list to include pi - [X] Unit tests pass (`npx vitest run`, 56 tests across 6 files); - [X] Manually verified via `npx tsx src/cli.ts` report and showing Pi sessions alongside Claude and Codex in the dashboard.
53 lines
1 KiB
JSON
53 lines
1 KiB
JSON
{
|
|
"name": "codeburn",
|
|
"version": "0.5.6",
|
|
"description": "See where your AI coding tokens go - by task, tool, model, and project",
|
|
"type": "module",
|
|
"main": "./dist/cli.js",
|
|
"bin": {
|
|
"codeburn": "dist/cli.js"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsup",
|
|
"dev": "tsx src/cli.ts",
|
|
"test": "vitest",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"keywords": [
|
|
"claude-code",
|
|
"cursor",
|
|
"codex",
|
|
"opencode",
|
|
"pi",
|
|
"ai-coding",
|
|
"token-usage",
|
|
"cost-tracking",
|
|
"observability",
|
|
"developer-tools"
|
|
],
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"author": "AgentSeal <hello@agentseal.org>",
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"chalk": "^5.4.1",
|
|
"commander": "^13.1.0",
|
|
"ink": "^7.0.0",
|
|
"react": "^19.2.5"
|
|
},
|
|
"optionalDependencies": {
|
|
"better-sqlite3": "^12.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/better-sqlite3": "^7.6.0",
|
|
"@types/react": "^19.2.14",
|
|
"tsup": "^8.4.0",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.8.0",
|
|
"vitest": "^3.1.0"
|
|
}
|
|
}
|