Repository navigation
Upgrade Pi SDK 0.80.6 → 0.85.1 - #11
Merged
Merged
Conversation
The three @earendil-works packages move together across all four manifests. The break lands in the credential layer, which type checking does not cover end to end: - AuthStorage / AuthStorageBackend / AuthCredential are no longer exported (removed in 0.80.8). OAuthSyncAuthStorageBackend is replaced by OAuthSyncCredentialStore, which extends pi-ai's InMemoryCredentialStore and overrides modify() — the SDK's only write path — to diff and emit oauth_credential_update. Injected credentials go straight to the base class so they are not mirrored back to the main process. - ModelRegistry.inMemory(authStorage) is gone; the registry is now a facade over ModelRuntime. createAuthenticatedRegistry() became async and memoizes the runtime at module scope, resetting it on re-init. - CreateAgentSessionOptions.authStorage / .modelRegistry collapse into modelRuntime. - ResourceLoader gained getSystemPromptSource() and getAppendSystemPromptSources(), implemented by delegation. - Agent.streamFn is now Agent.streamFunction. - pi-ai's KnownProvider and the compat catalog's BuiltinProvider have diverged; models-pi.ts narrows to BuiltinProvider. Verified: validate:dev passes, the pi-agent-server bundle builds, and a subprocess smoke run reaches a live session through the new credential chain. The OAuth subscription paths still need the manual checklist in docs/pi-sdk-upgrade.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0.85.1's system-prompt builder resolves the skill-file-read tool as ["read", "bash"].find(...) instead of requiring `read`, and emits <available_skills> with bash-flavoured wording when `read` is absent. PiSkillBridge.assertCatalogVisible() mirrored the old read-only rule and over-reported, so it now matches upstream. No behavioural effect on Bitlab: the built-in tool set always includes `read`, and no production caller withholds it. Also records the upgrade's verification results in docs/pi-sdk-upgrade.md — full suite, Pi session integration, MCP on 0.85.1, and a WebUI end-to-end run confirming Claude Opus 5 reaches the model picker and persists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The docs said Bitlab supports a Claude Pro/Max OAuth subscription flow (including a `claude-max` connection example). No such code exists: the only subscription flow is ChatGPT Plus via `openai-codex`, and the codebase has no `claude-max` slug, no Anthropic OAuth module, and no onboarding option for it. The claim was inherited from Craft upstream and never implemented. Corrects README, features, connections and the Bitlab-vs-Craft comparison (now ❌ for Bitlab), in both languages, plus the upgrade verification checklist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…dling
pi-ai 0.85.x loads each OAuth flow (Codex, Anthropic, Copilot, …) through
a variable-specifier dynamic import so bundlers cannot follow it. After
bun collapses the SDK into dist/index.js the import target no longer
exists, and every OAuth-backed request fails with:
OAuth auth derivation failed for openai-codex: Cannot find module
'./openai-codex.js' from '.../pi-agent-server/dist/index.js'
The SDK ships `registerBunOAuthFlows()` (`pi-ai/bun-oauth`) for exactly
this case; call it at startup next to the Bedrock pre-registration, which
solves the same problem for a different lazy module.
Verified with a subprocess smoke that injects an openai-codex OAuth
credential and sends a prompt: before, module-resolution error; after,
the flow runs and rejects the fake token ("Failed to extract accountId").
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
Moves
@earendil-works/pi-ai,pi-coding-agentandpi-agent-corefrom 0.80.6 to 0.85.1 across all four manifests, and adapts the credential layer to the SDK's newModelRuntime/CredentialStoreAPI.Why now: the 0.80.6 catalog predates Claude Opus 5, GPT-6 and GPT-5.6 — users could not select current flagship models. 0.85.1 adds ~300 models and 4 providers.
What changed
AuthStoragefamily removed upstream →OAuthSyncCredentialStore extends InMemoryCredentialStore, overridingmodify()(the SDK's only write path) to mirror OAuth rotations back to the main process.ModelRegistry.inMemory()→new ModelRegistry(await ModelRuntime.create(...));createAuthenticatedRegistry()is async and memoizes the runtime.CreateAgentSessionOptions.authStorage/modelRegistry→modelRuntime.ResourceLoadergained two methods (delegated);Agent.streamFn→streamFunction;KnownProvider/BuiltinProviderdivergence narrowed.registerBunOAuthFlows()is now called at startup so ChatGPT sign-in works in the packaged agent.readorbashto match upstream.Full record with file:line links:
docs/pi-sdk-upgrade.md.Verification
bun run validate:devandbun run test: 3784 pass / 0 fail, incl. the Pi session integration harness (real subprocess + SSE fixture).bun run lint, i18n parity/usage/sorted: clean.pi-mcp-adapter's^0.84.1peer range is stale metadata).Not covered
MCP initialization failed: This extension ctx is stale after session replacement— is not addressed here and is tracked separately.🤖 Generated with Claude Code