Skip to content

feat: vendor @bastani/pi-ai as packages/ai - #2552

Merged
flora131 merged 2 commits into
mainfrom
feat/vendored-pi-ai
Aug 20, 2026
Merged

feat: vendor @bastani/pi-ai as packages/ai#2552
flora131 merged 2 commits into
mainfrom
feat/vendored-pi-ai

Conversation

@flora131

@flora131 flora131 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Vendors @earendil-works/pi-ai v0.84.2 into this monorepo as packages/ai (@bastani/pi-ai), matching Pi's packages/ai layout. First-party code, docs, shrinkwrap, and the release publisher now use @bastani/pi-ai.

The standalone bastani-inc/pi-ai repo was the wrong shape and is archived.

Changes

  • Add packages/ai as a versionless workspace package forked from earendil-works/pi@v0.84.2
  • Switch @bastani/atomic onto @bastani/pi-ai@0.0.0; MCP and subagents take it as an optional peer
  • Keep extension compatibility: the loader still aliases @earendil-works/pi-ai and @mariozechner/pi-ai onto the workspace package
  • Alias node_modules/@earendil-works/pi-ai onto packages/ai after install (scripts/alias-pi-ai.mjs) so pi-agent-core and Atomic share one copy
  • Publish @bastani/pi-ai from publish.yml (eleven packages: natives leaves, natives root, pi-ai, then atomic)
  • Build packages/ai in CI and in build-binaries.sh

Breaking Changes

Callers of Atomic's published types should import from @bastani/pi-ai instead of @earendil-works/pi-ai. Extensions that still import the old name keep working through the loader.

Notes

  • Do not npm-publish from this PR. The first @bastani/pi-ai version must be published by hand so npm trusted publishing can be attached. After that, tagged Atomic releases publish it from CI.
  • Local: npm ci --ignore-scripts && node scripts/alias-pi-ai.mjs && npm run build --workspace=@bastani/pi-ai
  • Pre-commit npm run check and npm run test:unit passed

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Fork @earendil-works/pi-ai v0.84.2 into the monorepo as a workspace
package, switch first-party imports onto @bastani/pi-ai, and publish it
from the existing trusted-publishing pipeline. The first npm version
must still be published by hand.

Assistant-model: Grok 4.6
@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Too many files changed for review (766 files, 100 file limit).

@mintlify

mintlify Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
bastani 🟢 Ready View Preview Aug 20, 2026, 9:05 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Comment thread packages/ai/src/api/openai-completions.ts Dismissed
Comment thread packages/ai/src/api/openai-completions.ts Dismissed
Comment thread packages/ai/src/api/openai-completions.ts Dismissed
Comment thread packages/ai/src/api/openai-completions.ts Dismissed
Comment thread packages/ai/src/api/openai-completions.ts Dismissed
Comment thread packages/ai/src/api/openai-completions.ts Dismissed
Comment thread packages/ai/src/auth/oauth/openrouter.ts Dismissed
Replace the freshly generated model data with the exact catalog snapshot
from the published @earendil-works/pi-ai@0.84.2 tarball and restore the
generated sources from the v0.84.2 tag, so coding-agent catalog
contracts keep passing. Also order the workspace selector before the
run verb in the root typecheck script and update the eleven-tarball
release contract.

Assistant-model: Grok 4.6
@flora131
flora131 merged commit 30772b7 into main Aug 20, 2026
17 checks passed
@flora131
flora131 deleted the feat/vendored-pi-ai branch August 20, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants