Repository navigation
feat(pi): move Pi SDK packages to optionalDependencies in @botiverse/oar - #1098
Merged
Merged
Conversation
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> from open-agent-runtime opened this pull request through Stamp</sup><br><sup>opened from existing branch <code>agent/cindy/release-0.127.0</code> @ <code>b15d311f509d</code>, which the agent did not push</sup><br><sup><a href="https://stamp.build/review?receipt=prc_73c76ce0b5c49eb86a194fb0d706127f"><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 in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> ## OAR 0.127.0 ### Behavior changes hosts should know - **Pi is an optional dependency of `@botiverse/oar`** (#1098). A default install still includes `@earendil-works/pi-ai` and `@earendil-works/pi-coding-agent`, so nothing changes unless you opt out. `npm install --omit=optional` (or `pnpm install --no-optional`) leaves both out; note that these flags drop every optional dependency in the tree, not only Pi's. Pi stays in `defaultRuntimes` either way. `@botiverse/oar-cli` keeps both packages as direct dependencies. - Without the packages, `installation()` reports `unsupported` with code `dependency_missing` in a normal Node host for every Pi mode. In-process Pi SDK used to report `not_found` here, so hosts that branch on `not_found` should handle the new code. - Pi RPC with an explicit `command` now also checks the host packages, because the host process needs them for session lookup, project-package checks and context-overflow detection. Its command check runs first, so a missing or too-old `pi` still reports `not_found` or `version_unsupported`. Default Pi RPC in a single-file or Electron host still reports `unsupported_host` first. - The declarations of every entry point except `@botiverse/oar/pi-durable` no longer import Pi, so TypeScript hosts with `skipLibCheck: false` compile without it. `pi-durable` still needs `@earendil-works/pi-ai`. - **Ending a process through stdin EOF takes one kill grace, not two** (#1097). When OAR closes stdin to end an idle Claude or Codex session, Codex's login process after a completed login, or a Qoder or Qwen session or model list, and the process is still alive after the kill grace (10 s by default, `OAR_KILL_GRACE_MS`), OAR now force-ends the process tree at once. Before, it sent SIGTERM and waited a second grace, so this could take up to 20 s. Processes that already ended after one grace are unchanged: Claude and Codex model, inventory and account queries, DSH, Factory and Pi RPC. A session with an active turn is still stopped at once. - **Explicit context overflow is `input_too_large` on more paths** (#1093). The generic error-text rules now check for an explicit overflow first ("This model's maximum context length is N tokens. However, ...", "Your input exceeds the context window of this model", "Prompt is too long", with an optional `Internal error: ` prefix) and keep the original reason. A specific native category or provider code still takes precedence. - OpenCode 2.2.7 and 2.3.2 report an overflow and other invalid requests with the same JSON-RPC code (`-32603`) and native name (`provider.invalid-request`); an explicit overflow there is now `input_too_large`. On OpenCode, a rejected summary request still reports `kind: "failed"` with `failure: "provider"`. - The same rules cover the ACP fallback (every ACP runtime), Cursor, Factory, Grok, Pi in-process, Pi Durable and Morph, Claude's generic invalid-request fallback, and `invalid_request_error` provider bodies on Pi and Codex. An Anthropic-style "prompt is too long" body that used to be `invalid_request` is now `input_too_large`. - The runtime matrix gains "Recovery after automatic compaction fails": after a measured failed automatic compaction, Claude, Pi, DSH, OpenCode v2 and threshold-triggered Codex returned to `idle` and completed the next prompt on the same session. The failed turn stays readable from `turn_ended.outcome` and `status().value.lastTurnOutcome`. ### New - **Codex MCP startup per server** (#1092). From Codex 0.169.0 (executable installs, stable versions), `sessionCapabilities(installation).mcpStartup` is `{ kind: "per_server", firstModelRequest: "may_start_pending" }`: Codex can send the first model request while an MCP server is still listing tools, and that tool is then missing from turn one. A missing declaration means unknown. - Native startup reports that carry a thread ID become `mcp_server_startup` events with the server name and `pending`, `ready`, `failed` or `cancelled` (native `starting` is `pending`). This is a new `RuntimeEventBody` variant, so code that switches exhaustively on event kinds needs a case for it. - `mcpStartupOf(records, sessionId)` (from `@botiverse/oar` and `@botiverse/oar/observe`, with type `McpStartupStatus`) returns the latest state per server for the root agent. - A host that needs a server on turn one can subscribe with `session.events(observer, { cursor: { sessionId: session.id, afterSeq: -1 } })`, which replays startup reports, and wait for its `ready` before the first input. A server that never reports stays unknown, so set your own time limit. ### Tests and CI - The release workflow's dispatch, tag-push and `release_only` paths all require the commit to be the merge commit of exactly one merged `chore: release vX.Y.Z` pull request (#1095, #1096). `ci.yml` cancels superseded runs per ref (#1091). Tests check a fixture process's identity before cleanup (#1089), and DSH's `lastInput` and `requestsForTurn` share one trailing synthetic-context check (#1090). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]> Co-authored-by: xxchan <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 23, 2026
…nd CI (#1140) <!-- 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_78c75ec72882c291476828337858f0d7"><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 --> Weekly maintenance pass (2026-11-23): fix factual doc/CI drift, Kimi KAP details, and broken test links across `docs/development.md` and `docs/runtimes/*`. - `docs/development.md`: document `OAR_COMMUNITY_TESTS=1` / `pnpm run check` scoping for `tests/community/**`, update `ci-select.mjs` inert paths and `shared/acp/` reachability, align `clean-install` description with Pi `optionalDependencies` (`#1098`), and document community runtimes under `packages/oar/src/community/<id>/`. - `docs/runtimes/kimi.md`: address `#core:#408` non-blocking wording note (`steer()` rejects `busy` only on unresolved manual compaction, not active root turns); clarify `sessionCapabilities(installation)` differences between `>= 2.7.2-botiverse.1`, `>= 2.7.3`, and `<= 2.7.2-botiverse.0` plus KAP `launchArgs`/`additionalDirectories`; update CI matrix refs after `#1100`; replace deleted `tests/acp/acp-vendor-snapshot.test.ts` link. - `docs/runtimes/grok.md`, `antigravity.md`, `qoder.md`, `opencode.md`, `codex.md`, `install.md`: align CI workflow/matrix descriptions with `#1100` (`ci.yml` vs `platform-matrix.yml` / `runtime-latest.yml`) and remove broken `tests/acp/acp-vendor-snapshot.test.ts` link in `grok.md`. - `docs/runtimes/README.md`, `steer-delivery.md`, `resume-cwd.md`, `inventory.md`, `devin.md`, `pi.md`, `update.md`: add Kimi KAP and Cybion mappings, clarify Devin's verified live turn, clarify Pi SDK `optionalDependencies` and `PI_RPC_MINIMUM_VERSION` explicit command check, and update `inventory.md` baseline vs shipped `skills` readers. Verification: `python3 tools/check-md-links.py projects/oar` (0 broken links in edited files), 0 em/en dashes in diff, verified against code and `.github/workflows/`. --------- 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.
Summary
Makes
@earendil-works/pi-aiand@earendil-works/pi-coding-agentoptional in@botiverse/oarviaoptionalDependenciesso hosts that want a slim install can opt out withnpm install --omit=optional(pnpm install --no-optional), while keeping Pi installed by default for all existing hosts and as direct dependencies of@botiverse/oar-cli.@earendil-works/pi-ai(^1.5.2) and@earendil-works/pi-coding-agent(^1.5.2) fromdependenciestooptionalDependenciesinpackages/oar/package.json.dependenciesinpackages/cli/package.jsonso@botiverse/oar-clialways ships Pi regardless of how its host installs optional dependencies.pnpm-lock.yaml,.github/scripts/runtime-sdk-candidate.mjs(includeoptionalDependencieswhen rewriting SDK candidate manifests),.github/scripts/runtime-ci.test.mjs, andtests/fixtures/clean-install-pins.ts(checkPublishedRangesincludesoptionalDependencies).packages/oar/src/runtimes/pi/installation.ts):commandRPC) checks both@earendil-works/pi-coding-agentand@earendil-works/pi-aiand reports{ kind: "unsupported", code: "dependency_missing", reason }(nevernot_found) naming the missing package(s).commandRPC explains in its refusal reason that the host process still requires both packages for session lookup, project-package checks, and context-overflow detection even whenpiitself runs fromcommand.packages/oar/src/runtimes/pi/auth.ts,options.ts,facade-runtime.ts,catalog.ts):PiModelRuntimePathstooptions.tsand replaced exportedModelRuntime-derived parameter types ontoLoginEvent/toLoginPromptwith structural slices (toPiInteractionstill checks assignability againstModelRuntime["login"]at build time), sodist/runtimes/pi/auth.d.tsemits zero@earendil-works/pi-coding-agentimports and TypeScript hosts withskipLibCheck: falsecompile cleanly under--omit=optional.tests/clean-install.ts,tests/fixtures/pi-clean-install.ts):npm install --omit=optional) phase verifying no@earendil-works/*packages are installed, every default runtime probes without throwing, Pi SDK and Pi RPC both reportunsupported/dependency_missing,tsc(skipLibCheck: false) passes on all public entries,@botiverse/oar/pi-durableworks once its peers (pi-durable,chord,pi-ai,pi-ai-durable) are added withoutpi-coding-agent, and@botiverse/oar-cliinstalled with--omit=optionalstill lists both Cursor and Pi models.npm install) checks verifying Pi installs automatically with one sharedpi-aicopy.docs/runtimes/pi.md,docs/spec/install.md,packages/oar/README.md):optionalDependencies,--omit=optional/--no-optional(and that those flags drop all optional dependencies in the tree, not only Pi's),dependency_missingacross all Pi modes, why explicit-commandRPC needs both host packages, and the verified finding that Pi's extension loader serves its own bundled@earendil-works/pi-coding-agentand@earendil-works/pi-aitorpc/extension.ts(dist/core/extensions/loader.js:66,dist/core/extensions/virtual-modules.js:32).Release notes (non-breaking opt-out)
@earendil-works/pi-aiand@earendil-works/pi-coding-agentare now declared underoptionalDependenciesin@botiverse/oar(and remain directdependenciesof@botiverse/oar-cli). Existing hosts keep Pi installed by default with no behavior change; hosts that want a slim install without Pi can install withnpm install --omit=optional(pnpm install --no-optional). Note that--omit=optionalomits every optional dependency in the dependency tree, not only Pi's. Without Pi installed, every Pi mode reports{ kind: "unsupported", code: "dependency_missing" }.Call-site audit
packages/oar/package.json: changed (dependencies->optionalDependencies).packages/cli/package.json: changed (added both as directdependencies).packages/oar/src/runtimes/pi/installation.ts: changed (all Pi modes check both packages and reportunsupported/dependency_missing; explicit-commandreason explains why).packages/oar/src/runtimes/pi/auth.ts,options.ts,facade-runtime.ts,catalog.ts: changed (removed@earendil-works/pi-coding-agenttype leak from emittedauth.d.ts).packages/oar/src/runtimes/pi/rpc/extension.ts: unchanged (verified live withpi --mode rpc --no-session -ein/tmpoutsidenode_modulesand in Pi'sloader.js:66/virtual-modules.js:32that Pi's extension loader aliases both packages to Pi's own bundle).packages/oar/src/runtimes/pi/rpc/{open,session,readers,launch,version}.ts&packages/oar/src/runtimes/pi/{open,session,list-models,inventory,project,mcp,theme,static-modules}.ts: unchanged (all already lazy dynamicimport()s or type-only imports; host-side Pi RPC stays on Option A per#core:#391).packages/oar/src/runtimes/pi-durable/{index,options}.ts: unchanged (static@earendil-works/pi-ai/modelsimports verified to load and run cleanly inclean-installwhen a slim host addspi-durable+pi-aiwithoutpi-coding-agent)..github/scripts/runtime-sdk-candidate.mjs&tests/fixtures/clean-install-pins.ts: changed (addedoptionalDependenciesalongsidedependenciesandpeerDependencies).Verification
pnpm install --frozen-lockfile: passed.pnpm run clean-install -- --mode=gate: passed (both slim--omit=optionalhost and default host, pluspi-durable,@cursor/sdk, and--omit=optionalCLI install).node --test .github/scripts/runtime-ci.test.mjs: 38 passed, 0 failed.CI=1 pnpm run check: passed locally (full typecheck,oxlint --type-aware --deny-warnings, vitest suite, and mock sea-trial).pi --mode rpc --no-session -e /tmp/.../ext.mjsoutside anynode_modulesimporting all 6 symbols used byrpc/extension.ts; exited 0 with all symbols resolved.