Repository navigation
fix(pi): align Pi family ranges to ~1.5.2 and enforce manifest/undici consistency - #1110
Merged
Merged
Conversation
This was referenced Nov 21, 2026
stamp-build Bot
added a commit
that referenced
this pull request
Nov 21, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/ZXll.svg" width="16" height="16" align="absmiddle" alt=""> <b>Lookout</b> (open-agent-runtime) opened via Stamp · <a href="https://stamp.build/review?receipt=prc_838eb642dbea739a8494e97ba400a650"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View →</a></sup> --- <!-- /stamp:review:v1 --> Closes #1109 (Step 2, following #1110). ## Summary - **Pi family and `undici` upgrade:** moved `@earendil-works/pi-coding-agent`, `@earendil-works/pi-ai`, `@earendil-works/pi-durable`, and `@earendil-works/chord` to `~1.6.0` (exact `1.6.0` in workspace/devDependencies, including `@earendil-works/pi-ai-durable`), moved `undici` to `8.12.4` (matching `@earendil-works/[email protected]` and carrying its 6 security advisory fixes from Pi #12200), and updated `pnpm-lock.yaml` and `pnpm-workspace.yaml` (`minimumReleaseAgeExclude`). - **Resume tool reset without private side-effect:** Pi `1.6.0` (#11996) narrowed `AgentSession.setActiveToolsByName()` so `_pendingToolNames.clear()` runs only when a deactivated tool belonged to `_restoredToolNames`, breaking the previous activate/deactivate reset workaround in `packages/oar/src/runtimes/pi/open.ts` when no currently registered tool appeared in `_restoredToolNames`. On `options.resume !== undefined`, `openPiAgentSession()` now passes Pi's public `CreateAgentSessionOptions.noTools: "builtin"` option so Pi skips `_restoreToolsFromTranscript()` completely (leaving `_pendingToolNames` and `_restoredToolNames` empty) while keeping every non-excluded builtin, extension, custom, and MCP tool registered and activating default-active load-time extensions. OAR then re-applies the current native defaults (`settingsManager.getDefaultTools() ?? createCodingTools(cwd)`) alongside `session.getActiveToolNames()` before `session_start`. Because `_pendingToolNames` is never populated, resuming with no activatable registered tools no longer fails with `UnsupportedOptionError`. - **Provider credentials:** added the four new Qwen Token Plan per-plan API key env vars from `@earendil-works/[email protected]` (`env-api-keys.js`, Pi #11773) to `packages/oar/src/runtimes/pi/credential-shape.ts`: - `QWEN_TOKEN_PLAN_TEAM_API_KEY` (`qwen-token-plan`) - `QWEN_TOKEN_PLAN_TEAM_CN_API_KEY` (`qwen-token-plan-cn`) - `QWEN_TOKEN_PLAN_INDIVIDUAL_API_KEY` (`qwen-token-plan-individual`) - `QWEN_TOKEN_PLAN_INDIVIDUAL_CN_API_KEY` (`qwen-token-plan-individual-cn`) - **Tests and docs:** updated `sea-trial/vendor/pi-resume-tools.vendor.test.ts` (all 21 cases, updating the 2 `no activatable registered tools` cases to assert clean resume with empty active/callable sets and inactive `late_probe`), `docs/runtimes/pi.md`, `docs/runtimes/pi-durable.md`, `packages/oar/README.md`, and `packages/oar/src/runtimes/pi/http.ts`. ## Call-site audit - `packages/oar/package.json`: updated `dependencies.undici` (`8.12.4`), `optionalDependencies` (`~1.6.0`), `peerDependencies` (`~1.6.0`), and `devDependencies` (`1.6.0`). - `packages/cli/package.json`: updated `dependencies` (`~1.6.0`). - `package.json`: updated `devDependencies` (`1.6.0` for all 4 Pi packages + `pi-ai-durable` alias, `8.12.4` for `undici`). - `pnpm-workspace.yaml`: updated the 10 Pi `minimumReleaseAgeExclude` entries from `@1.5.2` to `@1.6.0`. - `packages/oar/src/runtimes/pi/open.ts`: only call site of `createAgentSessionFromServices()` and `setActiveToolsByName()` in OAR; switched resume path to public `noTools: "builtin"` + `setActiveToolsByName([...defaults, ...session.getActiveToolNames()])` and removed the `UnsupportedOptionError` fallback. - `packages/oar/src/runtimes/pi/credential-shape.ts`: added the 4 Qwen Token Plan env vars matching `@earendil-works/[email protected]/dist/env-api-keys.js`. - `packages/oar/src/runtimes/pi/http.ts`: updated comment `8.12.3` -> `8.12.4`. - `docs/runtimes/pi.md`, `docs/runtimes/pi-durable.md`, `packages/oar/README.md`: updated current Pi version/range/undici lines and the resume tool-reset documentation. - `.github/runtime-versions.json` (`pi-rpc-minimum` at `1.4.0`): unchanged (intentional minimum-floor pin). - Historical version notes (1.4/1.5 upgrade warnings and dated baseline measurements in `docs/runtimes/pi.md`, `docs/runtimes/pi-durable.md`, `docs/spec/model-request.md`, `docs/spec/runtime-matrix.md`): unchanged so historical measurements remain accurately dated. ## Verification - `pnpm install --frozen-lockfile`: passed. - `CI=1 pnpm run check`: passed (`typecheck`, `lint` 0 warnings / 0 errors, 565 passed / 3 skipped test files, 5432 passed / 110 skipped unit tests, mock sea-trial 19 passed / 1 skipped). - `OAR_TEST=pi-aimock pnpm vitest run sea-trial/vendor/pi-resume-tools.vendor.test.ts`: 21/21 passed on real `@earendil-works/[email protected]`. - `OAR_TEST=pi-aimock`: behavior 18 passed / 2 skipped / 0 failed; vendor 37 files / 134 passed / 0 failed. - `OAR_TEST=pi-durable-aimock`: behavior 19 passed / 1 skipped / 0 failed; vendor 14 files / 38 passed / 0 failed. - `OAR_TEST=pi-rpc-aimock`: behavior 18 passed / 2 skipped / 0 failed; vendor 35 files / 120 passed / 0 failed. - `pnpm run clean-install -- --mode=published`: passed (fresh packed install resolves Pi `1.6.0` + single `[email protected]` + Durable `1.6.0` + bundled OAuth derivation). Holding merge until `v0.128.1` is tagged. Co-authored-by: Lookout <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 21, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> (open-agent-runtime) opened via Stamp · <a href="https://stamp.build/review?receipt=prc_2ce5096582e05d834584b22aa9756a40"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View →</a></sup> --- <!-- /stamp:review:v1 --> ## OAR 0.128.1 ### Fixes - **Pi moves to 1.6.0 as one family, with undici 8.12.4** (#1110, #1112, issue #1109). OAR 0.128.0 declared `@earendil-works/pi-ai` and `@earendil-works/pi-coding-agent` at `^1.5.2` while `pi-durable` and `chord` were `~1.5.2` and `undici` was pinned to Pi 1.5.2's exact `8.12.3`. Pi 1.6.0 (published 2026-11-20) therefore installed into fresh 0.128.0 hosts untested: a second `undici` copy, a failing resume reset of restored pending tools, and missing Qwen Token Plan credentials. - All four Pi packages are now `~1.6.0` in `@botiverse/oar` and `@botiverse/oar-cli`, and `undici` is `8.12.4`, the version Pi 1.6.0 pins, which carries the upstream security fixes. A fresh install has a single `undici` copy. - A manifest check fails if the Pi ranges differ, if one is not a tilde or exact version, or if OAR's `undici` differs from the exact `undici` Pi pins. - Resume no longer depends on a private side effect of Pi's `setActiveToolsByName`. OAR opens a resumed session with Pi's public `noTools: "builtin"`, which skips restoring the transcript's tool selection, then applies the current default tools. A resume whose registry has no activatable tools now opens with an empty loadout instead of failing with `UnsupportedOptionError("resume")`. - Pi credentials gain `QWEN_TOKEN_PLAN_TEAM_API_KEY`, `QWEN_TOKEN_PLAN_TEAM_CN_API_KEY`, `QWEN_TOKEN_PLAN_INDIVIDUAL_API_KEY` and `QWEN_TOKEN_PLAN_INDIVIDUAL_CN_API_KEY`. - Hosts that also depend on `@earendil-works/pi-durable` or `chord` need 1.6.x of those peers. ### New - **DSH reports its session log file** (#1107). From DSH 0.2.2-alpha.2, `Session.nativeSessionFile()` returns the absolute path DSH reports from `sessionPersistence.stat(id).location.path` (typically `session.v4.jsonl.zstd`), `null` before the log is on disk, and the last known path after disposal. An explicit call drains DSH's 200 ms write batch with DSH's own `sessions.flush` before reading, so a just-finished turn is on disk. `sessionCapabilities` declares `nativeSessionFile: true` from 0.2.2-alpha.2, `false` below it (0.2.1-rc.5's `stat` has no location), and leaves it absent when the version is unreadable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
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.
Part of #1109 (Step 1 for
0.128.1patch).Problem
packages/oar/package.jsonpinned"undici": "8.12.3"(exact) andpeerDependencies"@earendil-works/pi-durable": "~1.5.2"/"@earendil-works/chord": "~1.5.2", whileoptionalDependenciesinpackages/oar/package.jsonanddependenciesinpackages/cli/package.jsondeclared"@earendil-works/pi-ai": "^1.5.2"and"@earendil-works/pi-coding-agent": "^1.5.2". After Pi1.6.0shipped with"undici": "8.12.4", a freshnpm install @botiverse/[email protected]pulled Pi1.6.0alongside OAR's[email protected], splittingundiciand mixing Pi1.6.0with~1.5.2durable/chord peers.Changes
@earendil-works/pi-aiand@earendil-works/pi-coding-agentranges to~1.5.2in bothpackages/oar/package.jsonandpackages/cli/package.json(and updated the 4 importer specifiers inpnpm-lock.yaml).checkPiManifestConsistency()intests/fixtures/clean-install-pins.ts(invoked byacceptedPiVersions(), so it runs in bothpnpm run testviatests/ci-runtime-scripts.test.tsandpnpm run clean-install):packages/oar/package.json(pi-ai,pi-coding-agent,pi-durable,chord) and both Pi ranges inpackages/cli/package.json(pi-ai,pi-coding-agent) to share one identical minor-locked range (~X.Y.Zor exactX.Y.Z, rejecting caret^and any mismatch).packages/oar/package.jsondependencies.undicito equal the exactdependencies.undicipinned in@earendil-works/pi-coding-agent/package.json.tests/ci-runtime-scripts.test.tscovering matching tilde/exact manifests plus mismatched OAR/CLI ranges, caret ranges, and mismatchedundici.docs/runtimes/pi.mdandpackages/oar/README.mdfrom^1.5.2to~1.5.2.Call-site audit (Pi family ranges and
undicipins)packages/oar/package.json: changedoptionalDependencies.@earendil-works/pi-aiandoptionalDependencies.@earendil-works/pi-coding-agentto~1.5.2;peerDependencies(pi-durable,chordat~1.5.2),devDependencies(1.5.2), anddependencies.undici(8.12.3) unchanged (already aligned).packages/cli/package.json: changeddependencies.@earendil-works/pi-aianddependencies.@earendil-works/pi-coding-agentto~1.5.2.package.json: unchanged (devDependenciesalready pin exact1.5.2andundici8.12.3, enforced bycheckWorkspacePins).docs/runtimes/pi.md: changed line 11 (optionalDependenciesrange^1.5.2->~1.5.2).packages/oar/README.md: changed line 178 (^1.5.2->~1.5.2).docs/runtimes/pi-durable.md: unchanged (already documents~1.5.2and1.5.2)..github/scripts/runtime-sdk-candidate.mjs/runtime-ci.test.mjs: unchanged (rewrites all 4 Pi packages to exactX.Y.Zandundicito Pi's exact pin, whichcheckPiManifestConsistencyexplicitly accepts).Verification
pnpm run typecheck: passed.pnpm run lint: passed (0 warnings, 0 errors).pnpm vitest run tests/ci-runtime-scripts.test.ts: 16/16 passed.npm installof packedbotiverse-oar-0.128.0.tgzin an empty temp directory:npm ls undici @earendil-works/pi-coding-agent @earendil-works/pi-ai --allresolved@earendil-works/[email protected],@earendil-works/[email protected], and a single deduped[email protected].pnpm run clean-install -- --mode=published: passed (clean install published ok).