Conversation
4 tasks
…pending Standalone Codenotch plugin (SwiftPM, no deps) that registers two providers in the Codenotch macOS notch app from the user's existing CodeMie CLI setup — no separate sign-in: - codemie-budget: every budget bucket on the account with a Total headline summing them (spent / remaining / reset) - codemie-claude: per-bucket session spending (CLI / platform / premium) shaped like Codenotch's usual Claude provider, plus live session activity via a claudeSessions monitor on ~/.claude Reads ~/.codemie config and decrypts CodeMie's own SSO credential store (AES-256-GCM + legacy CBC, key from hostname+platform+arch exactly as the statusline — os.hostname(), not ProcessInfo.hostName), then calls the same /v1/analytics/budget_usage endpoint the statusline uses, with a 60s on-disk cache to spare the backend. Registration is one command — 'codemie-codenotch register' writes the plugin manifests Codenotch watches for; 'unregister' removes them. Lives outside the npm build by design so any distribution channel (npm wrapper, brew, direct download) can ship it untouched. 49 swift-testing tests cover config parsing, GCM+CBC round-trips, row matching, payload shapes, cache behaviour, exit codes and register idempotency. Verified live against a real CodeMie SSO account: rings, tooltip money rows, settings rows, disable/enable and unregister→register all without an app restart.
8nevil8
force-pushed
the
feat/codenotch-plugin
branch
from
September 18, 2026 10:03
e55da48 to
ccbfedd
Compare
Replaces the standalone Swift package with an integration that ships in the regular CLI build: - codemie install codenotch downloads the latest Codenotch release from GitHub and installs it to /Applications; codemie uninstall codenotch removes it again. - codemie install codenotch --budget-plugin additionally registers the CodeMie Budget and CodeMie Claude providers with Codenotch, which picks them up live (no app restart). Both render natively and can be toggled, reordered or removed like built-in providers. - The providers' exec target is the CLI itself: a hidden, internal 'codemie codenotch snapshot --provider <id>' bridge reads the active profile and the CLI's own SSO credential store, calls the same budget_usage endpoint the statusline uses (60s on-disk cache, raw rows re-parsed on read so caches stay interchangeable), and prints the plugin-protocol JSON. Protocol exit codes: 3 auth, 4 rate-limited, 5 nothing metered. No separate binary, no npm package of its own, no Swift toolchain — every CLI release carries the bridge. Verified end-to-end on a real CodeMie SSO account: both bridge payloads (totals and per-bucket windows), the full install flow, and a running Codenotch rendering fresh data through the bridge.
…r command changes - tips.json gains three entries for the codenotch integration (install, --budget-plugin, manage/uninstall) so the feature is discoverable through session tips and 'codemie tips' — all validated against the live command tree. - docs/COMMANDS.md documents 'codemie install/uninstall codenotch' with the --budget-plugin flag. - AGENTS.md codifies the rule: any change to a user-visible command or flag updates src/utils/tips.json and docs/COMMANDS.md (plus docs/AGENTS.md for installable agents) in the same PR — a command change without its tips and docs is an incomplete change.
…e provider Registers one provider instead of two: the budget-only "CodeMie Budget" manifest is gone and "CodeMie Usage" (codemie-claude) now carries every budget bucket, led by the CLI bucket, plus live session activity. Register and unregister both prune the retired codemie-budget plugin directory, so an earlier registration stops polling a provider id the bridge now rejects. Docs, tips and install output follow the new name. Generated with AI Co-Authored-By: codemie-ai <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codemie install codenotchinstalls Codenotch (the macOS notch app for AI usage) from its latest GitHub release, andcodemie install codenotch --budget-pluginadditionally registers CodeMie Budget and CodeMie Claude as native providers in it — fed by the user's existing CodeMie profile, with no separate sign-in and no separate binary to install.The companion Codenotch PR (vinzdg/codenotch#255) adds the runtime plugin system this integrates with; the contract is
docs/design/plugin-protocol.mdthere.Changes
codemie install codenotchdownloads the latestCodenotch.dmgfrom GitHub releases and installs it to/Applications(stops a running instance first);codemie uninstall codenotchremoves the app and unregisters the providers. macOS-only, with a clear error elsewhere.--budget-plugin— writes the two provider manifests + glyphs into~/Library/Application Support/Codenotch/Plugins/(idempotent). Codenotch watches that directory and picks the providers up live; both render natively and can be toggled, reordered, or deleted like built-in providers.codemie codenotch snapshot --provider <id>command. It reads the active profile and the CLI's own SSO credential store (first-partyCredentialStore/ConfigLoader), calls the sameGET {baseUrl}/v1/analytics/budget_usagethe statusline uses, and prints the protocol JSON on stdout with protocol exit codes (3 auth / 4 rate-limited / 5 nothing metered). A 60 s on-disk cache keeps Codenotch's polling off the backend; raw rows are re-parsed on read so caches stay interchangeable.codemie-budget: every budget bucket on the account with a synthesized Total headline (spent / remaining / reset).codemie-claude: the same buckets shaped like Codenotch's usual Claude provider (headline = the CLI bucket sessions spend from) plus live session activity via Codenotch'sclaudeSessionsmonitor on~/.claude.@codemieai/codenpm package; no Swift toolchain, no separate package, nothing to clone. (This supersedes the earlier standalone Swift plugin draft on this branch, which is removed.)Testing
npm run ci(lint, build, unit + cli projects) green; the 4 failures intests/integration/sso-claude-plugin.test.tsare pre-existing onorigin/main(verified identical failure set on a pristine main worktree).install codenotch --budget-pluginflow (release download, app install, registration), and a running Codenotch rendering fresh data through the bridge — including disable/enable and unregister→register without an app restart.Checklist
docs/CODENOTCH.md,docs/AGENTS.mdentry,docs/COMMANDS.mdentry, three newtips.jsonentries; AGENTS.md now codifies tips+docs with every command change)install/uninstallgain a codenotch case)