Repository navigation
perf(pi): register Bedrock lazily with native Pi 1.5.2 - #812
Merged
Merged
Conversation
stamp-build Bot
added a commit
that referenced
this pull request
Nov 16, 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><a href="https://stamp.build/review?receipt=prc_8dfa731a8e23786654323b85a287b9b9"><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 --> Weekly docs pass (November 16), runtime pages, part 1 of 4 (design, packages and spec follow). Each page now states its current behavior once and agrees with the adapter code: - Stacked version-check paragraphs are collapsed into the newest statement with one report link; older reports stay linked (Cursor, CodeBuddy, Kimi, Qwen, Grok, Antigravity, OpenCode). - Drift fixed against the code: - Grok and Antigravity: login, status and usage readers now exist (`grok models`, `agy models`, `/usage`, `/credits` only when every group is exhausted). Neither is `localOnly`. - Cursor: the refusal list after MCP mapping (#729), in both execution modes. - Devin: `listModels` is `unsupported` without a native `model` option. - OpenCode: no native runtime is admitted to shared placement. Only the disabled experimental adapter accepts 2.2.3 and 2.2.5. - Claude: limit resets are described once (Linux only, startup rules, cost warning), and the spec keeps the detail. - Pi: wording only. The Pi AI and Bedrock paragraphs are left to #812. Every area had one writer and one adversarial verifier. The verifiers restored scope qualifiers and facts the condensation had dropped. No headings were renamed or removed; inbound anchors and the link checker are clean. `CI=1 pnpm run check` passed (4,372 tests, 18 mock cases). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
Merged
stamp-build Bot
added a commit
that referenced
this pull request
Nov 16, 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><a href="https://stamp.build/review?receipt=prc_5d496023b4702e9a5fee60a6f0f44453"><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 --> Pi Durable moves to native 1.5.2 (breaking: back up storage first), the `oar` CLI is regrouped (breaking: renamed commands), too-old runtimes are refused with a structured `version_unsupported`, Codex usage counts credits, Cursor moves to SDK 1.4.0, and the bundled Pi SDK moves to 1.5.2 with Bedrock loaded only on first use. ## Breaking: Pi Durable 1.5.2 (#807) The adapter now observes conversations through Durable 1.5's `observeConversation` instead of the removed 1.4 event API. **Before upgrading, back up host storage.** Once new work is committed under 1.5, Durable 1.4 can no longer open that storage (it writes `pi.live` document version 3). Rolling back means restoring the backup. **What hosts need to change:** 1. Install `@earendil-works/[email protected]` and `@earendil-works/[email protected]` (peer range `~1.5.2`), resolved to exactly the same version. The `pi-ai-durable` alias is Pi AI 1.5.2. 2. Move `@earendil-works/pi-ai` under its normal name to 1.5.2 as well (0.109 told hosts to keep it at 1.5.0); a different version can split registration instances and break OAuth in single-file hosts. 3. Pi AI 1.5.2 no longer exports `Type`: tool parameter schemas are plain JSON Schema objects. 4. A custom Storage driver must implement native group commit, and host extensions follow Durable 1.5's task, hook and document contracts. **What hosts will see:** 1. Native view records are one snapshot when the session opens or resumes, then only the changes (`ops`, `retired`). Rebuilding Pi's own view needs that snapshot plus every later change, so a host that needs it must persist records from the start; `retainedBytes` clears the oldest payloads first, so the snapshot can be discarded early. OAR's own events are unaffected. 2. Nested tool calls no longer carry exit codes: Durable 1.5 does not report them. 3. A request interrupted repeatedly is recorded by Durable as `unanswered` / `interrupted`; 1.4's parked retry is gone. 4. A tool slot that Durable removes now gets its `tool_call_ended`, before the turn ends. 5. A failed queued run no longer turns the outcome of the run queued after it into a failure. ## Cursor SDK 1.4.0 (#811, #813) The optional peer is now `@cursor/[email protected]`. SDK 1.4 can answer a steer with `{ outcome: "queued" }`: OAR reports it as accepted with `native: { ack: "queued" }`, meaning Cursor owns the follow-up; do not resend it. OAR does not observe the optional cloud run that may come with it. An acknowledgement OAR does not recognise is reported as an error, never as accepted. Login, logout and status messages now name the required version from one place. ## Pi (#808, #810, #812) - The bundled Pi SDK and Pi AI are 1.5.2 (dependency range `^1.5.2`). - Opening a Pi session or reading sign-in status no longer loads Bedrock and the AWS SDK; Bedrock loads on its first request, also in single-file hosts. A failed Bedrock import now shows as that request's native error, not an `OAR_PI_MODULES` warning. - In SDK mode (the default), an extension run that starts while a Pi session opens is now visible: a prompt sent while it settles gets `busy` instead of losing its answer, and queued input waits through settlement and compaction. In RPC mode Pi itself cannot report this window yet (earendil-works/pi#12196): such a prompt gets an `error` refusal after 30 seconds and the child process exits, ending the session. ## Breaking: `oar` CLI commands (#819) The CLI now has eight top-level commands: `install`, `upgrade`, `installation`, `account`, `models`, `run`, `mcp` and `inventory`. Old names are removed without aliases: | Before | Now | | --- | --- | | `oar login <runtime>` | `oar account login <runtime>` | | `oar logout <runtime>` | `oar account logout <runtime>` | | `oar login --status [runtime]` | `oar account status [runtime]` | | `oar usage [runtime]` | `oar account usage [runtime]` | | `oar skills\|commands\|mcps\|tools [runtime]` | `oar inventory <kind> [runtime]` | | `oar detect [runtime]` | `oar installation [runtime] --json` | | `oar list`, `oar orient` | removed, no CLI replacement (the library's `orient()` is unchanged) | New: `oar install <runtime>` runs the vendor's official installer (`--plan` only prints the steps). `oar installation` and `oar account usage` now print readable tables by default; `--json` gives JSON in the previous shape, except that usage omits `accountUsage` (previously `null`) for a runtime that is not available. `oar --help` explains what OAR is, with examples and links. ## Version minimums reported in a structured way (#820) A too-old Antigravity, DSH or Pi (subprocess) runtime is now refused with a typed result, even when the host calls a reader directly without `installation()` first, so a host can show which version is required instead of a generic failure. - `Runtime.minVersion` declares the adapter's minimum native version where it has one: Antigravity `1.5.0`, DSH `0.2.1-rc.5`, and Pi in subprocess mode with an explicit `command` `1.4.0` (the default RPC entry must match the bundled Pi exactly, which `requiredVersion` then reports). Single capabilities may need newer versions; absence means no declared floor. Reads through the bundled Pi SDK are not governed by it. - Readers that check: Antigravity `installation()`, `listModels`, `authStatus` and account usage; DSH `installation()` and `listModels`; Pi RPC `listModels`, skills and commands. - `installation()`, `listModels` and inventories answer `unsupported` with `code: "version_unsupported"`, `requiredVersion` and, when readable, `installedVersion`. For Pi RPC this changes behavior: `listModels` used to reject and now resolves `unsupported`, and inventories used to answer `unavailable` (`query_failed`). Account usage answers `unsupported` with `reason: "version_unsupported"` and the same version fields. `authStatus` stays `unknown`, never `logged_out`, with the same code and fields. - **Type change:** `AccountUsageUnsupportedReason` and the inventory `unsupported.code` union gain `"version_unsupported"`. A host with an exhaustive `switch` over either needs a new branch. ## Codex account usage counts credits (#821) When the plan's usage is used up, Codex keeps running on the account's credits. Account usage now says so: - `rateLimited` follows Codex's own limit flag and is false while credits are available. A window at 100% no longer makes it true on its own; unreadable credits are not assumed available. - New optional `credits: { available, unlimited?, balance? }` on available snapshots (Codex today, from the account bucket). `balance` is the runtime's own string, with no unit conversion; an absent field means unknown. - Codex 0.169.0 has no native switch to stop spending credits after the plan is used up; OAR reports it and does not control it. ## Also - Weekly docs pass (#814, #816, #817): runtime pages, spec, READMEs and design lists match the code, including Factory and Devin in the runtime lists. - Codex: the idle model-catalog refresh and how a host can pin a static catalog are documented (#818); OAR's default is unchanged. - Windows cancellation cleanup tests keep phase timing for diagnosis (#815); no product behavior change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 19, 2026
…980) <!-- 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><a href="https://stamp.build/review?receipt=prc_bb2ca3c7653b327234dd638927614bf4"><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 --> Runtime pages listed the `OAR_<RUNTIME>_BIN` override first in a lookup order ("checks `OAR_X_BIN`, PATH, then ..."), which reads as a fallback chain. The shared `executableInstallation` probe uses the override alone when it is set, as docs/spec/install.md already says. Nine pages now state it the same way. Also from the DSH and Pi page audits run on the real DeepSeek harbors: - dsh.md: the refusal list adds `mcpServerCredentials` (options.ts refuses it); Node 24.9 is the npm package's declared engine, which OAR does not check. - pi.md: `subscription` comes from `checkAuth` plus the provider's OAuth `isSubscription` flag (auth.ts), not from calling pi's `isUsingSubscription`; the bundled SDK chronology adds 1.5.2 on 11-16 (#812). Docs only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]> Co-authored-by: xxchan <[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.
Opening a Pi session or querying provider auth currently evaluates the Bedrock implementation and AWS SDK. Register Pi AI 1.5.2's native lazy loader instead, preserving its literal import for single-file hosts and loading Bedrock on the first request. Upgrade the normal coding SDK and Pi AI to 1.5.2 together; undici stays at 8.12.3 and OAuth registration is unchanged.
A fresh-process control catches eager loading and now records zero Bedrock/AWS modules after open and auth. A bundled host's first native Bedrock request reaches a loopback server and retains its deliberate HTTP 400 response. Packed OAuth checks pass before and after installing the same-version Durable alias; a 1.5.0 session also resumes under 1.5.2 with its transcript. These are local-provider controls, without AWS inference or real sign-in. No numerical memory or latency claim is made.
Rebased onto the actual Durable migration merge
a6206bba. Full type/lint gate, 4,384 tests and 18 mock behavior cases passed, as did final package builds and packed installation. Earlier native SDK 124 cases and RPC 115 cases, plus 18 behavior cases each, passed with the same implementation. Reproduction and selected evidence retain the eager-loader failure and validation fingerprints.