From 37027632e042159f27556ed6033c8d2060525755 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Wed, 1 Jul 2026 10:37:44 -0700 Subject: [PATCH] FN-7378: upgrade pi SDK dependencies Upgrade the bundled pi SDK packages and compatibility imports for the 0.80.3 release. - Bump @earendil-works/pi-ai and @earendil-works/pi-coding-agent consumers to ^0.80.3. - Update pi SDK import paths for the new compatibility and API export map layout. - Refresh dependency contract tests and add a patch changeset for the published CLI package. Files changed: .changeset/fn-7378-pi-sdk-upgrade.md | 7 ++ packages/cli/package.json | 4 +- packages/cli/src/__tests__/package-config.test.ts | 8 +- packages/dashboard/package.json | 2 +- packages/engine/package.json | 4 +- .../custom-providers-openai-completions.test.ts | 8 +- pnpm-lock.yaml | 108 ++++++++++----------- 7 files changed, 72 insertions(+), 69 deletions(-) Fusion-Task-Id: FN-7378 Fusion-Task-Lineage: ed8847dc-2adf-4ede-aa75-045f2e2436a0 Co-authored-by: Fusion (runfusion.ai) --- .changeset/fn-7378-pi-sdk-upgrade.md | 7 ++ packages/cli/package.json | 4 +- .../cli/src/__tests__/package-config.test.ts | 8 +- packages/dashboard/package.json | 2 +- packages/engine/package.json | 4 +- ...ustom-providers-openai-completions.test.ts | 8 +- pnpm-lock.yaml | 108 +++++++++--------- 7 files changed, 72 insertions(+), 69 deletions(-) create mode 100644 .changeset/fn-7378-pi-sdk-upgrade.md diff --git a/.changeset/fn-7378-pi-sdk-upgrade.md b/.changeset/fn-7378-pi-sdk-upgrade.md new file mode 100644 index 0000000000..36bd328266 --- /dev/null +++ b/.changeset/fn-7378-pi-sdk-upgrade.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Upgrade Fusion's bundled pi SDK dependencies to 0.80.3. +category: internal +dev: Upgrades @earendil-works/pi-ai and @earendil-works/pi-coding-agent to ^0.80.3. diff --git a/packages/cli/package.json b/packages/cli/package.json index 9dcbc0ea02..a7eda94d85 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -58,8 +58,8 @@ "test:pre-release": "pnpm test:slow-cli && pnpm test:build-exe" }, "dependencies": { - "@earendil-works/pi-ai": "^0.79.9", - "@earendil-works/pi-coding-agent": "^0.79.9", + "@earendil-works/pi-ai": "^0.80.3", + "@earendil-works/pi-coding-agent": "^0.80.3", "dockerode": "^4.0.12", "express": "^5.1.0", "i18next": "^26.3.1", diff --git a/packages/cli/src/__tests__/package-config.test.ts b/packages/cli/src/__tests__/package-config.test.ts index 0b65b63cdc..14649dce87 100644 --- a/packages/cli/src/__tests__/package-config.test.ts +++ b/packages/cli/src/__tests__/package-config.test.ts @@ -48,7 +48,7 @@ function assertRuntimeDepsAreNotOptionalPeers(pkg: any, label: string): void { for (const dependencyName of ["@earendil-works/pi-coding-agent", "@earendil-works/pi-ai"]) { expect(dependencies, `${label}: ${dependencyName} must remain a required runtime dependency`).toHaveProperty( dependencyName, - "^0.79.9", + "^0.80.3", ); expect(peerDependencies, `${label}: ${dependencyName} must not be a peer dependency`).not.toHaveProperty( dependencyName, @@ -323,10 +323,8 @@ describe("Workspace bootstrap script contract", () => { expect(buildIdx).toBeGreaterThan(testIdx); }); - it("keeps default build CLI-first by excluding desktop/mobile", () => { - expect(rootPkg.scripts?.build).toBe( - "pnpm -r --filter=!@fusion/desktop --filter=!@fusion/mobile build", - ); + it("keeps default build routed through workspace builder", () => { + expect(rootPkg.scripts?.build).toBe("node scripts/build-workspace.mjs"); }); it("keeps explicit opt-in scripts for full, desktop, and mobile builds", () => { diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index bfac69fa44..1f14f10c5f 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -102,7 +102,7 @@ "@codemirror/state": "^6.5.2", "@codemirror/theme-one-dark": "^6.1.2", "@codemirror/view": "^6.36.4", - "@earendil-works/pi-coding-agent": "^0.79.9", + "@earendil-works/pi-coding-agent": "^0.80.3", "@fusion-plugin-examples/cli-printing-press": "workspace:*", "@fusion-plugin-examples/compound-engineering": "workspace:*", "@fusion-plugin-examples/cursor-runtime": "workspace:*", diff --git a/packages/engine/package.json b/packages/engine/package.json index 69f9e3ebdf..cbca50b2fc 100644 --- a/packages/engine/package.json +++ b/packages/engine/package.json @@ -40,8 +40,8 @@ "dependencies": { "@fusion/core": "workspace:*", "@fusion/pi-claude-cli": "workspace:*", - "@earendil-works/pi-ai": "^0.79.9", - "@earendil-works/pi-coding-agent": "^0.79.9", + "@earendil-works/pi-ai": "^0.80.3", + "@earendil-works/pi-coding-agent": "^0.80.3", "@modelcontextprotocol/sdk": "^1.0.0", "cron-parser": "^5.5.0", "esbuild": "^0.25.12", diff --git a/packages/engine/src/__tests__/custom-providers-openai-completions.test.ts b/packages/engine/src/__tests__/custom-providers-openai-completions.test.ts index 5242903da3..41f5eed0ab 100644 --- a/packages/engine/src/__tests__/custom-providers-openai-completions.test.ts +++ b/packages/engine/src/__tests__/custom-providers-openai-completions.test.ts @@ -1,7 +1,11 @@ import { afterEach, describe, expect, it, vi } from "vitest"; import { AuthStorage, ModelRegistry } from "@earendil-works/pi-coding-agent"; -import { completeSimple } from "@earendil-works/pi-ai"; -import { convertMessages } from "@earendil-works/pi-ai/openai-completions"; +import { completeSimple } from "@earendil-works/pi-ai/compat"; +/* +FNXC:Dependencies 2026-07-01-08:16: +The pi 0.80 SDK keeps compatibility helpers under ./compat and exposes provider internals through the documented ./api/* export map instead of the previous root-level openai-completions subpath. +*/ +import { convertMessages } from "@earendil-works/pi-ai/api/openai-completions"; import { customProviderRegistryKey, type CustomProvider } from "@fusion/core"; function createSseResponse(): Response { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eaee72c2d1..95c8033f6f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,11 +46,11 @@ importers: packages/cli: dependencies: '@earendil-works/pi-ai': - specifier: ^0.79.9 - version: 0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76) + specifier: ^0.80.3 + version: 0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76) '@earendil-works/pi-coding-agent': - specifier: ^0.79.9 - version: 0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76) + specifier: ^0.80.3 + version: 0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76) dockerode: specifier: ^4.0.12 version: 4.0.12 @@ -223,8 +223,8 @@ importers: specifier: ^6.36.4 version: 6.40.0 '@earendil-works/pi-coding-agent': - specifier: ^0.79.9 - version: 0.79.9(ws@8.20.0)(zod@3.25.76) + specifier: ^0.80.3 + version: 0.80.3(ws@8.20.0)(zod@3.25.76) '@fusion-plugin-examples/cli-printing-press': specifier: workspace:* version: link:../../plugins/fusion-plugin-cli-printing-press @@ -496,11 +496,11 @@ importers: packages/engine: dependencies: '@earendil-works/pi-ai': - specifier: ^0.79.9 - version: 0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + specifier: ^0.80.3 + version: 0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) '@earendil-works/pi-coding-agent': - specifier: ^0.79.9 - version: 0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + specifier: ^0.80.3 + version: 0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) '@fusion/core': specifier: workspace:* version: link:../core @@ -1583,8 +1583,8 @@ packages: resolution: {integrity: sha512-xhWd59Qzd8yO88gYQw2S4dEQstJJEiUtxRP01//YzVJ61jCtUASMfcyAmYhgGYR4Onp7GmwEAbBBGOiV6Iwk9g==} engines: {node: '>=22.19.0'} - '@earendil-works/pi-agent-core@0.79.9': - resolution: {integrity: sha512-GsFbPR85nhncKoU9++fTKa11PzwUkAmkrKXo97dBOzi10Td72rVV6vmfxKjwPLHTzRbJMa0byr12YhODZ59yLA==} + '@earendil-works/pi-agent-core@0.80.3': + resolution: {integrity: sha512-3qw0/GeRQBU/nlGjDe5Yb7ePKTmoxefx2YxyKMFAviFUMXpFexBG/hS7mBtwFahFvzrrTPPoRT6sFIDjwoDWPQ==} engines: {node: '>=22.19.0'} '@earendil-works/pi-ai@0.77.0': @@ -1597,8 +1597,8 @@ packages: engines: {node: '>=22.19.0'} hasBin: true - '@earendil-works/pi-ai@0.79.9': - resolution: {integrity: sha512-fHmgNMONwCCE7bQAKbcz76sgm3iQuA7km1mpIc4H5xXd9+zhPh/faULz6ARkgjQE0EufHnfZPJY39+lNf8Sa9g==} + '@earendil-works/pi-ai@0.80.3': + resolution: {integrity: sha512-jPZLMeGL5kkMSEAwAklfXTMHqZvfhsJtCCpKGIr5Duk7mc0n4skjB1dugk7y0z3z8ZHIUCmPAWHdyDqgUz5vdA==} engines: {node: '>=22.19.0'} hasBin: true @@ -1612,8 +1612,8 @@ packages: engines: {node: '>=22.19.0'} hasBin: true - '@earendil-works/pi-coding-agent@0.79.9': - resolution: {integrity: sha512-8TZ796Zn0NE4vmhxG9hv4ZtJDGJzhqMjlmFg8ZkUKxfqB7LJa4ums2jSJKtnyAZfAamN6VzqzN0A82RNDqv8Ag==} + '@earendil-works/pi-coding-agent@0.80.3': + resolution: {integrity: sha512-TIggw9gCXpA+Ph7OjdTA7ka2NPwTVuPmy39KDSyUzaKq8VvHfMGR7vtRz4JB7Um/RMRblmzhu4p9tUCk6MTgGA==} engines: {node: '>=22.19.0'} hasBin: true @@ -1625,8 +1625,8 @@ packages: resolution: {integrity: sha512-3a705FnsVVUhAyceShNB3kS2rpxcxLcx+hqB0u6MMMpHwQGbW+m++MqA6r7eOzq/8FLx5e3vDh38h/SVTk2qzw==} engines: {node: '>=22.19.0'} - '@earendil-works/pi-tui@0.79.9': - resolution: {integrity: sha512-XcqfoGyoX64OSMQklMR1vG2MRi1TCPSUERRCmPDvYKCK6LtZoBqJ6idNCLRklNYveCj4gHDOzOsLhGqn04jmYw==} + '@earendil-works/pi-tui@0.80.3': + resolution: {integrity: sha512-2BJI6qwRQfnM0Q7seL1+SbacU/jRRjBnN7Hu3n9BjAn7/s5FaBNnvdD1qBQYRsFTHfjqMaDsjYqanPyqwXj99w==} engines: {node: '>=22.19.0'} '@electron/asar@3.4.1': @@ -5387,10 +5387,6 @@ packages: engines: {node: '>=10'} hasBin: true - jiti@2.6.1: - resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} - hasBin: true - jiti@2.7.0: resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} hasBin: true @@ -8451,9 +8447,9 @@ snapshots: - ws - zod - '@earendil-works/pi-agent-core@0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76)': + '@earendil-works/pi-agent-core@0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76)': dependencies: - '@earendil-works/pi-ai': 0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76) + '@earendil-works/pi-ai': 0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76) ignore: 7.0.5 typebox: 1.1.38 yaml: 2.9.0 @@ -8465,9 +8461,9 @@ snapshots: - ws - zod - '@earendil-works/pi-agent-core@0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': + '@earendil-works/pi-agent-core@0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': dependencies: - '@earendil-works/pi-ai': 0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + '@earendil-works/pi-ai': 0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) ignore: 7.0.5 typebox: 1.1.38 yaml: 2.9.0 @@ -8479,9 +8475,9 @@ snapshots: - ws - zod - '@earendil-works/pi-agent-core@0.79.9(ws@8.20.0)(zod@3.25.76)': + '@earendil-works/pi-agent-core@0.80.3(ws@8.20.0)(zod@3.25.76)': dependencies: - '@earendil-works/pi-ai': 0.79.9(ws@8.20.0)(zod@3.25.76) + '@earendil-works/pi-ai': 0.80.3(ws@8.20.0)(zod@3.25.76) ignore: 7.0.5 typebox: 1.1.38 yaml: 2.9.0 @@ -8573,7 +8569,7 @@ snapshots: - ws - zod - '@earendil-works/pi-ai@0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76)': + '@earendil-works/pi-ai@0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76)': dependencies: '@anthropic-ai/sdk': 0.91.1(zod@3.25.76) '@aws-sdk/client-bedrock-runtime': 3.1048.0 @@ -8594,7 +8590,7 @@ snapshots: - ws - zod - '@earendil-works/pi-ai@0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': + '@earendil-works/pi-ai@0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': dependencies: '@anthropic-ai/sdk': 0.91.1(zod@4.3.6) '@aws-sdk/client-bedrock-runtime': 3.1048.0 @@ -8615,7 +8611,7 @@ snapshots: - ws - zod - '@earendil-works/pi-ai@0.79.9(ws@8.20.0)(zod@3.25.76)': + '@earendil-works/pi-ai@0.80.3(ws@8.20.0)(zod@3.25.76)': dependencies: '@anthropic-ai/sdk': 0.91.1(zod@3.25.76) '@aws-sdk/client-bedrock-runtime': 3.1048.0 @@ -8752,11 +8748,11 @@ snapshots: - ws - zod - '@earendil-works/pi-coding-agent@0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76)': + '@earendil-works/pi-coding-agent@0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76)': dependencies: - '@earendil-works/pi-agent-core': 0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76) - '@earendil-works/pi-ai': 0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76) - '@earendil-works/pi-tui': 0.79.9 + '@earendil-works/pi-agent-core': 0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76) + '@earendil-works/pi-ai': 0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@3.25.76))(ws@8.20.0)(zod@3.25.76) + '@earendil-works/pi-tui': 0.80.3 '@silvia-odwyer/photon-node': 0.3.4 chalk: 5.6.2 cross-spawn: 7.0.6 @@ -8782,11 +8778,11 @@ snapshots: - ws - zod - '@earendil-works/pi-coding-agent@0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': + '@earendil-works/pi-coding-agent@0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': dependencies: - '@earendil-works/pi-agent-core': 0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) - '@earendil-works/pi-ai': 0.79.9(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) - '@earendil-works/pi-tui': 0.79.9 + '@earendil-works/pi-agent-core': 0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + '@earendil-works/pi-ai': 0.80.3(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + '@earendil-works/pi-tui': 0.80.3 '@silvia-odwyer/photon-node': 0.3.4 chalk: 5.6.2 cross-spawn: 7.0.6 @@ -8812,11 +8808,11 @@ snapshots: - ws - zod - '@earendil-works/pi-coding-agent@0.79.9(ws@8.20.0)(zod@3.25.76)': + '@earendil-works/pi-coding-agent@0.80.3(ws@8.20.0)(zod@3.25.76)': dependencies: - '@earendil-works/pi-agent-core': 0.79.9(ws@8.20.0)(zod@3.25.76) - '@earendil-works/pi-ai': 0.79.9(ws@8.20.0)(zod@3.25.76) - '@earendil-works/pi-tui': 0.79.9 + '@earendil-works/pi-agent-core': 0.80.3(ws@8.20.0)(zod@3.25.76) + '@earendil-works/pi-ai': 0.80.3(ws@8.20.0)(zod@3.25.76) + '@earendil-works/pi-tui': 0.80.3 '@silvia-odwyer/photon-node': 0.3.4 chalk: 5.6.2 cross-spawn: 7.0.6 @@ -8852,7 +8848,7 @@ snapshots: get-east-asian-width: 1.6.0 marked: 15.0.12 - '@earendil-works/pi-tui@0.79.9': + '@earendil-works/pi-tui@0.80.3': dependencies: get-east-asian-width: 1.6.0 marked: 18.0.5 @@ -8928,7 +8924,7 @@ snapshots: node-gyp: 11.5.0 ora: 5.4.1 read-binary-file-arch: 1.0.6 - semver: 7.7.4 + semver: 7.8.0 tar: 7.5.13 yargs: 17.7.2 transitivePeerDependencies: @@ -9791,7 +9787,7 @@ snapshots: '@npmcli/fs@4.0.0': dependencies: - semver: 7.7.4 + semver: 7.8.0 '@opentelemetry/api@1.9.0': {} @@ -10769,11 +10765,11 @@ snapshots: fs-extra: 10.1.0 hosted-git-info: 4.1.0 isbinaryfile: 5.0.7 - jiti: 2.6.1 + jiti: 2.7.0 js-yaml: 4.1.1 json5: 2.2.3 lazy-val: 1.0.5 - minimatch: 10.2.4 + minimatch: 10.2.5 plist: 3.1.0 proper-lockfile: 4.1.2 resedit: 1.7.2 @@ -12407,7 +12403,7 @@ snapshots: es6-error: 4.1.1 matcher: 3.0.0 roarr: 2.15.4 - semver: 7.7.4 + semver: 7.8.0 serialize-error: 7.0.1 optional: true @@ -12917,8 +12913,6 @@ snapshots: filelist: 1.0.6 picocolors: 1.1.1 - jiti@2.6.1: {} - jiti@2.7.0: {} jose@6.2.2: {} @@ -13145,7 +13139,7 @@ snapshots: make-dir@4.0.0: dependencies: - semver: 7.7.4 + semver: 7.8.0 make-fetch-happen@14.0.3: dependencies: @@ -13723,11 +13717,11 @@ snapshots: node-abi@3.89.0: dependencies: - semver: 7.7.4 + semver: 7.8.0 node-abi@4.28.0: dependencies: - semver: 7.7.4 + semver: 7.8.0 node-addon-api@1.7.2: optional: true @@ -13739,7 +13733,7 @@ snapshots: node-api-version@0.2.1: dependencies: - semver: 7.7.4 + semver: 7.8.0 node-domexception@1.0.0: {} @@ -13757,7 +13751,7 @@ snapshots: make-fetch-happen: 14.0.3 nopt: 8.1.0 proc-log: 5.0.0 - semver: 7.7.4 + semver: 7.8.0 tar: 7.5.13 tinyglobby: 0.2.15 which: 5.0.0 @@ -14663,7 +14657,7 @@ snapshots: simple-update-notifier@2.0.0: dependencies: - semver: 7.7.4 + semver: 7.8.0 simple-yenc@1.0.4: {}