Repository navigation
feat: pi file-free injection (#535 phase 1) - #536
Conversation
…es + extension compaction cancel, overlay/PI_CODING_AGENT_DIR removed for pi
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-536Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr536.tgz
npm install -g packageThis comment is automatically updated on each push. |
[bot] 🏷 Reviewing #536 now — checking out the branch ( |
[bot] 🏷 Review of #536 (pi file-free injection, #535 phase 1) — verified locally on Verification (this machine)
Conformance to the #535 design — all good
|
…iew) buildPiEnv now takes httpsRewrites and emits RAW https values into the BILI_PROVIDER_REWRITES manifest — a hand-wrapped `<origin>/bili/https://...` baseUrl (README Option 2) gets repointed off the stale embedded origin onto the cert-MITM path, matching what every other client branch already did. The pre-spawn refusal now fires for https-only rewrites too, and the extension warns loudly when BILI_PROVIDER_REWRITES is set but the running pi build has no registerProvider API (stale installed plugin).
|
Review fix pushed (f93d5ca):
The stacked PR #538 was rebased onto this fix (8a86fd3) — still incremental on top of this branch. |
[bot] 🏷 Re-verified Checked the fix commit line-by-line against the review:
New tests are exactly the right shape: Local run on LGTM — ready for merge once you say so (merge itself stays yours per house rules). Noted stacked PR #538 rebased to |
…tension API > generated files hermes/dsh one-liners, per-client redirect table, discovery table and temp-config bullets updated in EN+ZH; injection-priority note added next to 'Two compression modes'. pi/omp doc lines intentionally left to PR ranxianglei#536.
#535 phase 1 (pi). Closes nothing yet — the issue tracks all four phases.
What changes
bili pino longer creates the~/.pi/agent-bilioverlay and no longer setsPI_CODING_AGENT_DIR. pi always runs on its real home; every in-session write (settings edits,models-store.json,run-history.jsonl,auth.json,sessions/) lands in the real home, so nothing is ever silently lost (#531 root fix for pi).Injection becomes file-free:
BILI_PROVIDER_REWRITES(JSON{providerKey: wrapUpstream(...)}for http upstreams) through the child env; the bili pi extension consumes it at load and callspi.registerProvider(key, { baseUrl })(queued at extension load, applied before any model traffic). HTTPS upstreams keep their real baseUrls and rideHTTPS_PROXYcert-MITM as before.settings.json(compaction.enabled=false) with an in-extensionsession_before_compacthandler returning{cancel:true}only forreason==="threshold"||"overflow"(manual/compactstays user-owned — exact parity with the old setting). Armed only whenBILLION_CONTEXT_PROXYis present, so a plainpiwith the plugin installed stays fully native. omp is untouched: its event has noreasonfield yet (upstream PR pending).Safety
dist/agent/pi.jsmissing and plugin not installed) — without this the rewrites would silently vanish and traffic would go direct.PI_CODING_AGENT_DIR(e.g. launching from inside a legacy overlay shell) is stripped from the child env and ignored for discovery + plugin detection.Verification
npm run typecheckclean;npm test1041/1043 (the 2 known env-dependent fails in plugin-agent.test.ts, fail only when the runner itself sits behind a liveBILLION_CONTEXT_PROXY);npm run buildok.buildPiEnvmanifest (3), pluginregisterProviderfrom env (3),session_before_compactcancel semantics (2), launcher refusal + no-overlay-dir (1).node dist/index.js pi -- --model vllm/glm-5.3 -p '...'→ proxy log showsforward POST → …:8199/v1/chat/completionsthrough the/bili/route;~/.pi/agent-biliand real home untouched (mtime check); child env carries the manifest and noPI_CODING_AGENT_DIR.