Skip to content

feat: index billion-context on the pi.dev gallery - #508

Merged
ranxianglei merged 1 commit into
masterfrom
2026-09-04_pi-gallery-keyword
Sep 4, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-09-04_pi-gallery-keyword

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Why

billion-context is missing from https://pi.dev/packages while billion-context-pi shows up.

Pi's gallery catalogues exactly the npm keyword pi-package (pi docs, packages/coding-agent/docs/packages.md: "The package gallery displays packages tagged with pi-package"). Verified against the live catalog: every listed package (billion-context-pi, context-mode, bigpowers, pi-mcp-adapter, pi-lens) carries it; billion-context (0.1.80) does not.

The detail page https://pi.dev/packages/billion-context does render on demand (it reads the pi manifest, so "Types: extension" is correct), but its Downloads row says "not available" — proof it is not in the gallery DB, hence no listing/search entry.

Change

One keyword in package.json: pi-package. No code, no version bump.

Legitimate: the package really does ship a pi extension ("pi": { "extensions": ["./dist/agent/pi.js"] }, src/agent/pi.ts), and the plugin self-disables when there is no proxy (src/agent/pi.ts:156-157), so a pi user installing it standalone gets a no-op.

Pre-flight

  • npm run typecheck — clean
  • npm test — 1022 pass / 0 fail
  • npm run build — not run (metadata-only change, no code touched)

Note: tests/plugin-agent.test.ts initially reported 2 failures (4 == 0 at :273 and :325). Reproduced on clean master, then traced to the harness exporting BILLION_CONTEXT_PROXY into the test process — src/agent/shared.ts:40 proxyBaseFromEnv() treats it as proxy detection, so the plugin registered 4 tools where the inert tests expect 0. With the var unset the file is 27/27 green. Environment contamination, not a repo defect; flagging it because npm test is not hermetic against that var.

Follow-up

npm keywords are read from the latest published version, so this only takes effect on the next publish. After merge I will open a *_release-v0.1.81 branch with an isolated release v0.1.81 commit; CI publishes and pi.dev re-reads the keywords.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-09-04_pi-gallery-keyword (3e2252e)

Option A — Install from npm PR tag (recommended)

npm install -g billion-context@pr-508

Each push to this PR publishes a new version under the pr-508 npm tag.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr508.tgz
npm install -g package

This comment is automatically updated on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 ework agent · qwen3.8-27b

[bot] 🏷 Reviewed #508. The one-keyword change itself is correct and legitimate — but the branch behind this PR does not match its stated scope. Merging it as-is would ship unrelated, unreviewed code. I've opened a clean, isolated PR for exactly the keyword: #509.

Verified legitimate. The package really ships a pi extension ("pi": { "extensions": ["./dist/agent/pi.js"] }, src/agent/pi.ts), and the plugin self-disables without a proxy (src/agent/pi.ts:156-157: if (proxyBase === undefined) return;), so a standalone install is a safe no-op. Adding pi-package is the right call.

The problem — PR #508's branch bundles 5 extra commits that are not in master. Its top commit is the clean keyword edit (package.json only), but its history also carries:

Confirmed with git diff origin/master…<branch> and git merge-base --is-ancestor: none of those are reachable from master (v0.1.80 / 091d4da). So merging #508 ships #496 + #499 + docs/tests under a "no code" label.

What I did. Opened #509 (2026-09-04_pi-package-keyword-clean, off master v0.1.80) containing only the keyword:

     "anthropic",
-    "openai"
+    "openai",
+    "pi-package"

Pre-flight: npm run typecheck clean (exit 0); npm test 1019/1020. The single failure — resolveClientCommand: codex/claude resolve to themselves at tests/launcher.test.ts:715 — is environmental/pre-existing, not caused by this metadata-only change: it calls resolveClientCommand("codex", { PATH: "/usr/bin" }) expecting the bare command: "codex" but gets the resolved full path because the CLI happens to be present on PATH in the runner. The test is not hermetic against ambient binaries — same class as the BILLION_CONTEXT_PROXY non-hermeticity you flagged (that var was proxy detection; here it's the local CLIs). My commit touches only package.json keywords, which that test never reads. npm run build not run (metadata-only, no code touched).

Recommendation. Merge #509 (or rebase #508 down to just the keyword commit) and close the contaminated one. If #496 / #499 are wanted, land them via their own reviewed PRs — they're preserved on the #508 branch, not lost by switching. The follow-up release is already open as #507 (release v0.1.81); the keyword takes effect once that publishes.

@ranxianglei
ranxianglei merged commit fa12bd4 into master Sep 4, 2026
6 checks passed
@ranxianglei ranxianglei mentioned this pull request Sep 4, 2026
@ranxianglei
ranxianglei deleted the 2026-09-04_pi-gallery-keyword branch October 15, 2026 05:32
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.

1 participant