Skip to content

Add limits plugin (usage rings for coding plans) - #730

Merged
SawyerHood merged 2 commits into
get-bb:mainfrom
artwist-polyakov:add-limits-plugin
Oct 30, 2026
Merged

SawyerHood merged 2 commits into
get-bb:mainfrom
artwist-polyakov:add-limits-plugin

Conversation

@artwist-polyakov

Copy link
Copy Markdown
Contributor

limits — usage rings for coding plans

A floating pill in bb's bottom-right corner showing how much of each coding-plan quota is left — designed for people who run several harnesses side by side.

What it does

  • One chip per plan: Claude Code, Codex, Cursor (via bb's own system.usageLimits() collectors) plus GLM (Z.AI) Coding Plan and Kimi Code, fetched directly from the plans' own usage endpoints (credentials read only from their standard on-disk locations; the plugin keeps its own Kimi token pair in plugin storage and never touches the CLI's credential file).
  • One small ring per limit window (session/weekly, plan/on-demand, coding/MCP, 7-day/5-hour); a full green ring = everything left, shrinking amber → red as it runs out.
  • The collapsed pill follows the open thread's harness — including harnesses routed through other providers (a kimi* or glm* model is recognized and mapped to its plan).
  • Inline refresh button refreshes just that provider; clicking the chip opens a two-column popup with every plan and Refresh-all.
  • Traffic discipline: with the refresh interval set to 0 the plugin makes no background requests — providers are contacted only on explicit refresh. Self-heals expired sessions (Claude's OAuth token race, Kimi's 15-minute access tokens).

Entry details

  • Source: git ^1.0.0, subdir: limits, tagPrefix: limits/ → tag limits/v1.0.0
  • Requires BB 0.46+ (uses slots.experimental_appOverlay)
  • npm run build passes with this entry; screenshots are ≥1200px wide

Happy to adjust anything — naming, category, description wording.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-28T17:58:59.424079Z
We couldn’t complete this review. Comment @codex review to try again.
ef2f5c4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SawyerHood SawyerHood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated note from a Claude Code agent, posted on behalf of the marketplace maintainer.

The exact submitted Limits release currently has an installation blocker. The listing resolves limits/v1.0.0 in artwist-polyakov/bb-plugins to commit dafc21fe2ae16498807e960ecf44dd4608f668b2, subdirectory limits.

Installing that source on BB 0.47.1 fails with HTTP 422:

server bundle build for "limits" failed:
limits/server.ts:9:18: could not resolve "zod": this server entry imports it;
add zod to the plugin's dependencies.

limits/package.json puts zod only in devDependencies, which are omitted during plugin installation. Please move runtime dependencies such as zod into dependencies, update the lockfile, and publish a new release selected by the listing's range so we can reinstall it. This is an installation failure, not a malware finding.

@SawyerHood SawyerHood added the blocked Waiting on plugin author changes before it can be listed label Oct 29, 2026
@artwist-polyakov

Copy link
Copy Markdown
Contributor Author

Thanks for the catch! Moved zod into dependencies (the runtime deps BB needs when building the server entry from a git install) and released limits/v1.0.1 — the ^1.0.0 range in this entry picks it up. The marketplace entry itself is unchanged.

@SawyerHood
SawyerHood dismissed their stale review October 30, 2026 14:04

Automated note from a Claude Code agent, posted on behalf of the marketplace maintainer.

The listing now selects limits/v1.0.1 at d02acd901c8450918a2c07af181e250870a817dc. Re-reviewed the source and confirmed the zod runtime dependency fix with a clean production installation and successful load on isolated BB 0.48.0. The previous installation blocker is resolved.

@SawyerHood SawyerHood removed the blocked Waiting on plugin author changes before it can be listed label Oct 30, 2026

@SawyerHood SawyerHood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated note from a Claude Code agent, posted on behalf of the marketplace maintainer.

Reviewed under the maintainer admission policy. Exact selected plugin sources install and load, required marketplace format passes, and no malware or author self-addition to New and Notable was found. Current-head CI verified green.

@SawyerHood
SawyerHood merged commit 0ea4a8f into get-bb:main Oct 30, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants