diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..c3f26cbe --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +[*.swift] +indent_size = 4 + +[Makefile] +indent_style = tab diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index eeccf713..f2e9c657 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -github: agentseal +github: iamtoruk diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 00000000..b135c7e4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,57 @@ +name: Bug report +description: Something is broken or a session is parsed wrong. +labels: + - bug +body: + - type: textarea + id: what-happened + attributes: + label: What happened + validations: + required: true + - type: textarea + id: what-expected + attributes: + label: What you expected + validations: + required: true + - type: input + id: version + attributes: + label: Output of `codeburn --version` + validations: + required: true + - type: input + id: os + attributes: + label: OS + placeholder: e.g. macOS 15.1, Ubuntu 24.04, Windows 11 + validations: + required: true + - type: input + id: provider + attributes: + label: Provider involved + placeholder: e.g. Claude Code, Codex, Cursor + validations: + required: true + - type: textarea + id: steps + attributes: + label: Steps to reproduce + validations: + required: true + - type: textarea + id: snippet + attributes: + label: Redacted JSONL or SQLite snippet + description: For parsing bugs, a redacted snippet that reproduces the issue. + validations: + required: false + - type: textarea + id: debug + attributes: + label: DEBUG=1 output + description: Output of the failing command with `DEBUG=1`, if applicable. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..08c5a22f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Discord + url: https://discord.gg/w2sw8mCqep + about: Chat with maintainers and other users. + - name: Discussions + url: https://github.com/getagentseal/codeburn/discussions + about: Ask questions that aren't bugs or feature requests. diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 00000000..30895874 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,24 @@ +name: Feature request +description: Propose a change or a new capability. +labels: + - enhancement +body: + - type: textarea + id: problem + attributes: + label: The problem, in your words + validations: + required: true + - type: textarea + id: tried + attributes: + label: What you tried + description: Existing commands, flags, or workarounds you already tried. + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed change + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/provider.yml b/.github/ISSUE_TEMPLATE/provider.yml new file mode 100644 index 00000000..386c8221 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/provider.yml @@ -0,0 +1,47 @@ +name: New provider +description: Track a new AI coding tool for codeburn to support. +labels: + - provider +body: + - type: markdown + attributes: + value: | + Read "Adding a New Provider" in CONTRIBUTING.md first. New providers have the highest bar because broken parsing silently produces wrong data for users. Do not rely on AI-generated guesses about storage paths or schemas — install the tool and inspect the actual files on disk. + - type: input + id: tool + attributes: + label: Tool name and link + validations: + required: true + - type: input + id: storage-path + attributes: + label: Where it stores sessions on disk + description: The path, e.g. `~/.tool/sessions/`. + validations: + required: true + - type: textarea + id: sample + attributes: + label: Redacted sample of one session file + validations: + required: true + - type: dropdown + id: pricing-public + attributes: + label: Is pricing public + options: + - "Yes" + - "No" + - "Not sure" + validations: + required: true + - type: dropdown + id: can-help-test + attributes: + label: Can you help test + options: + - "Yes" + - "No" + validations: + required: true diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..5430a4fb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,74 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: / + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + labels: + - dependencies + groups: + minor-and-patch: + update-types: + - minor + - patch + + - package-ecosystem: npm + directory: /app + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + labels: + - dependencies + groups: + minor-and-patch: + update-types: + - minor + - patch + + - package-ecosystem: npm + directory: /dash + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + labels: + - dependencies + groups: + minor-and-patch: + update-types: + - minor + - patch + + - package-ecosystem: npm + directory: /windows + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + labels: [dependencies] + groups: + minor-and-patch: + update-types: [minor, patch] + + - package-ecosystem: cargo + directory: /windows/src-tauri + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + labels: [dependencies] + groups: + minor-and-patch: + update-types: [minor, patch] + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + labels: + - dependencies diff --git a/.github/workflows/firstlook.yml b/.github/workflows/firstlook.yml index c5db24c8..e45a4c57 100644 --- a/.github/workflows/firstlook.yml +++ b/.github/workflows/firstlook.yml @@ -16,7 +16,7 @@ jobs: pull-requests: write contents: read steps: - - uses: getagentseal/firstlook@main + - uses: getagentseal/firstlook@e88f257908a23e857ad717b6bb35a6829cd2b120 # main 2026-09-14 with: pr-number: ${{ inputs.pr-number }} skip-users: 'dependabot[bot],renovate[bot]' diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..86802963 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,134 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic +status, nationality, personal appearance, race, caste, color, religion, or +sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances + of any kind +* Trolling, insulting or derogatory comments, and personal or political + attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards +of acceptable behavior and will take appropriate and fair corrective action +in response to any behavior that they deem inappropriate, threatening, +offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, and will communicate reasons +for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies +when an individual is officially representing the community in public +spaces. Examples of representing our community include using an official +e-mail address, posting via an official social media account, or acting as an +appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +hello@agentseal.org. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of +the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in +determining the consequences for any action they deem in violation of this +Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external +channels like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited +interaction with those enforcing the Code of Conduct, is allowed during this +period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/README.md b/README.md index f106c66a..04739cd5 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ CodeBurn does. It reads the session files your tools already write to disk and b Everything runs locally. No wrapper, no proxy, no API keys, nothing leaves your machine. Pricing comes from [LiteLLM](https://github.com/BerriAI/litellm), refreshed daily. The optional desktop app can send an anonymous, bucketed usage report if you say yes to it; see [Telemetry](#telemetry).

+ Website · Quick start · Find waste · Apply fixes · diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 00000000..44c06cf2 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,10 @@ +# Support + +Questions: [GitHub Discussions](https://github.com/getagentseal/codeburn/discussions). + +Chat: [Discord](https://discord.gg/w2sw8mCqep). + +Bugs: open an issue using the bug report form. + +Security vulnerabilities: use the private reporting link in [SECURITY.md](SECURITY.md), not a public issue. +Don't file an issue for a question, a "how do I", or a feature idea you haven't checked Discussions for first — use Discussions or Discord instead. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..7d91f355 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,87 @@ +# Docs index + +One line per file in this directory, recursively. + +## docs/ + +- [architecture.md](architecture.md) — A map of the codebase. +- [by-branch.md](by-branch.md) — The Spend view in CodeBurn Desktop has a By branch panel: pick a project and see where its AI spend went, per git branch, with the recorded worktrees and the individual sessions behind each branch. +- [compare-cohorts.md](compare-cohorts.md) — The classic Compare view answers "how do these two models differ across my whole history?" by aggregating everything each model ever did. +- [compare-periods.md](compare-periods.md) — Compare two date ranges side by side and see exactly what drove the change in usage and cost. +- [drill-through.md](drill-through.md) — CodeBurn Desktop can open any aggregate as a session list that explains exactly what composes it, without losing your place. +- [optimize.md](optimize.md) — `codeburn optimize` scans your Claude Code sessions and your `~/.claude/` setup, reports what is costing tokens without earning them, and grades the setup A to F. + +## docs/design/ + +- [design/capacity-dock.md](design/capacity-dock.md) — Status: implementation specification (Epic: Quota Intelligence #725). +- [design/codeburn-desktop-plan.md](design/codeburn-desktop-plan.md) — Goal: a standalone Electron desktop app that renders the approved v6 "indigo instrument" wireframes, fed entirely by spawning the `codeburn` CLI for JSON. +- [design/codeburn-desktop.md](design/codeburn-desktop.md) — Build CodeBurn Desktop, a standalone, resizable native desktop application (Electron) that renders the approved v6 "indigo instrument" wireframes. +- [design/codeburn-mcp-plan.md](design/codeburn-mcp-plan.md) — Goal: add a `codeburn mcp` stdio MCP server exposing CodeBurn's usage/cost data to AI agents via two tools (`get_usage`, `get_savings`). +- [design/codeburn-mcp.md](design/codeburn-mcp.md) — CodeBurn already aggregates rich AI-coding usage/cost data (by task, model, project, provider; retry tax; routing waste; optimize findings; 365-day history). +- [design/desktop-data-lifecycle.md](design/desktop-data-lifecycle.md) — Status: implementation contract for the quality/performance epic. +- [design/perf-cache-fix.md](design/perf-cache-fix.md) — `codeburn status --format menubar-json` was measured taking 25-90+ seconds per call, with no speedup on a repeat call against an unchanged, freshly-warmed cache. + +## docs/providers/ + +- [providers/README.md](providers/README.md) — One file per provider integration. +- [providers/NEW_PROVIDER.md](providers/NEW_PROVIDER.md) — Guide for adding a new session-discovery provider to codeburn. +- [providers/antigravity.md](providers/antigravity.md) — Google Antigravity (CLI and IDE). +- [providers/claude.md](providers/claude.md) — Anthropic Claude Code CLI and Claude Desktop's local agent mode. +- [providers/cline-cli.md](providers/cline-cli.md) — The Cline command-line agent (npm `cline`, 3.x). +- [providers/cline.md](providers/cline.md) — Cline VS Code extension and Cline home-data task storage. +- [providers/codebuff.md](providers/codebuff.md) — Codebuff (formerly Manicode) CLI coding agent. +- [providers/codewhale.md](providers/codewhale.md) — CodeWhale CLI saved sessions. +- [providers/codex.md](providers/codex.md) — OpenAI Codex CLI. +- [providers/copilot.md](providers/copilot.md) — GitHub Copilot Chat (CLI, VS Code core chat sessions, VS Code extension transcripts, and JetBrains IDE sessions). +- [providers/crush.md](providers/crush.md) — Charmbracelet's Crush TUI coding agent. +- [providers/cursor-agent.md](providers/cursor-agent.md) — Cursor's background agent transcripts (separate from the regular chat). +- [providers/cursor.md](providers/cursor.md) — Cursor IDE chat history. +- [providers/devin.md](providers/devin.md) — Cognition Devin CLI local usage tracking. +- [providers/droid.md](providers/droid.md) — Factory's Droid CLI. +- [providers/dsh.md](providers/dsh.md) — DeepSeek's open-source agent harness (`dsh`, npm `@deepseek-ai/dsh`). +- [providers/forge.md](providers/forge.md) — Forge agent CLI. +- [providers/gemini.md](providers/gemini.md) — Google Gemini CLI. +- [providers/goose.md](providers/goose.md) — Block's Goose CLI. +- [providers/grok.md](providers/grok.md) — Grok Build, xAI's coding CLI. +- [providers/hermes.md](providers/hermes.md) — Hermes Agent CLI profiles. +- [providers/ibm-bob.md](providers/ibm-bob.md) — IBM Bob IDE task history. +- [providers/kilo-code.md](providers/kilo-code.md) — KiloCode VS Code extension. +- [providers/kimi.md](providers/kimi.md) — Kimi Code CLI session parser. +- [providers/kimicode.md](providers/kimicode.md) — MoonshotAI Kimi Code local session usage and tool activity. +- [providers/kiro.md](providers/kiro.md) — Kiro IDE chat history. +- [providers/lingtai-tui.md](providers/lingtai-tui.md) — LingTai TUI per-agent token ledger integration. +- [providers/mistral-vibe.md](providers/mistral-vibe.md) — Mistral Vibe CLI. +- [providers/mux.md](providers/mux.md) — [coder/mux](https://github.com/coder/mux), Coder's desktop/CLI app for parallel agentic development. +- [providers/omp.md](providers/omp.md) — OMP CLI. +- [providers/open-design.md](providers/open-design.md) — Open Design coding agent. +- [providers/openclaude.md](providers/openclaude.md) — OpenClaude (npm `@gitlawb/openclaude`) is a Claude Code fork that runs the same agent loop against any LLM backend. +- [providers/openclaw.md](providers/openclaw.md) — OpenClaw, plus the older Clawdbot / Moltbot / Moldbot lineage. +- [providers/opencode.md](providers/opencode.md) — OpenCode (sst/opencode). +- [providers/pi.md](providers/pi.md) — Pi agent CLI. +- [providers/quickdesk.md](providers/quickdesk.md) — Amazon Quick Desktop local usage and session history. +- [providers/qwen.md](providers/qwen.md) — Qwen Code CLI. +- [providers/roo-code.md](providers/roo-code.md) — Roo Code VS Code extension. +- [providers/vercel-gateway.md](providers/vercel-gateway.md) — Cloud usage for [Vercel AI Gateway](https://vercel.com/docs/ai-gateway) via the reporting API. +- [providers/vscode-cline-parser.md](providers/vscode-cline-parser.md) — Shared discovery and parsing for Cline and VS Code extensions descended from Cline. +- [providers/warp.md](providers/warp.md) — Warp Oz agent sessions from Warp's local SQLite database. +- [providers/zcode.md](providers/zcode.md) — ZCode CLI coding agent (z.ai), running GLM-5.2 over the z.ai start-plan. +- [providers/zed.md](providers/zed.md) — Zed's built-in AI agent. +- [providers/zerostack.md](providers/zerostack.md) — Zerostack (gi-dellav/zerostack), a minimal Rust coding agent. + +## docs/release-acceptance/ + +- [release-acceptance/README.md](release-acceptance/README.md) — This directory turns the August 2026 dogfood audit into a repeatable release gate. +- [release-acceptance/AGENT-RUNBOOK.md](release-acceptance/AGENT-RUNBOOK.md) — Use this contract when assigning a CodeBurn candidate to an audit agent. +- [release-acceptance/cases.csv](release-acceptance/cases.csv) — CSV, columns: id, phase, persona, surface, test, method, automation, evidence, threshold, blocking, owner. +- [release-acceptance/ledger.schema.json](release-acceptance/ledger.schema.json) — JSON Schema titled "CodeBurn release acceptance run". +- [release-acceptance/ledger/history.jsonl](release-acceptance/ledger/history.jsonl) — JSON Lines log; each line is one release-acceptance run record (run_id, verdict, surfaces, findings, evidence). +- [release-acceptance/templates/accuracy.csv](release-acceptance/templates/accuracy.csv) — CSV template, columns: run_id, case_id, persona, surface, filter, provider, session_id, expected/actual token and cost fields, status, evidence, notes. +- [release-acceptance/templates/click-through.csv](release-acceptance/templates/click-through.csv) — CSV template, columns: run_id, case_id, persona, surface, destination_or_control, prerequisites, action, resulting_state, status, feedback_ms, settled_ms, screenshot, accessibility_notes, notes. +- [release-acceptance/templates/findings.csv](release-acceptance/templates/findings.csv) — CSV template, columns: run_id, id, severity, status, confidence, frequency, persona, surface, candidate_sha, version, prerequisites, repro, expected, actual, evidence, privacy_impact, owner, size, execution_lane, acceptance_condition. +- [release-acceptance/templates/residue.csv](release-acceptance/templates/residue.csv) — CSV template, columns: run_id, kind, path, active, version, bundle_id, sha256, size_bytes, process_pid, package_manager, disposition, backup_path, notes. +- [release-acceptance/templates/timings.csv](release-acceptance/templates/timings.csv) — CSV template, columns: run_id, case_id, surface, persona, operation, trial, cache_state, start_monotonic_ms, first_feedback_ms, first_useful_ms, complete_ms, cpu_peak_pct, rss_peak_bytes, calls, tokens, cost_usd, identical_totals, notes. + +## docs/sync/ + +- [sync/README.md](sync/README.md) — Push your AI usage telemetry to a shared backend so teams can track adoption, budgets, and ROI across developers. +- [sync/DEVELOPER.md](sync/DEVELOPER.md) — Architecture, protocol, server contract, and testing for `codeburn sync`.