From c1f97f465acea76c9203b48be949b367e62043ce Mon Sep 17 00:00:00 2001 From: gustav-fff <286169375+gustav-fff@users.noreply.github.com> Date: Mon, 20 Jul 2026 10:06:56 -0700 Subject: [PATCH] fix(pi-fff): install fff-bun so bun runtimes can load the SDK (#689) PR #669 made sdk.ts dynamically import @ff-labs/fff-bun when running under bun, but only added it as an optional peer dependency. Package managers do not install optional peers by default, so `pi install npm:@ff-labs/pi-fff` on a bun-only host produced a node_modules tree without @ff-labs/fff-bun and pi crashed at session_start with "Cannot find module '@ff-labs/fff-bun'". Promote both SDKs to regular deps. Bundle size cost is minor (SDKs are TS shims over the same optional native bins) and this guarantees the dynamic import in sdk.ts always resolves regardless of runtime or installer. Closes #689 --- bun.lock | 9 +-------- packages/pi-fff/package.json | 7 +------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/bun.lock b/bun.lock index 861a623b2..93bc79fd5 100644 --- a/bun.lock +++ b/bun.lock @@ -10,10 +10,6 @@ "packages/fff-bun": { "name": "@ff-labs/fff-bun", "version": "0.1.37", - "bin": { - "fff-demo": "./examples/search.ts", - "fff-grep": "./examples/grep.ts", - }, "devDependencies": { "@types/bun": "^1.3.8", "typescript": "^5.0.0", @@ -54,6 +50,7 @@ "name": "@ff-labs/pi-fff", "version": "0.6.0", "dependencies": { + "@ff-labs/fff-bun": "*", "@ff-labs/fff-node": "*", }, "devDependencies": { @@ -63,12 +60,8 @@ "peerDependencies": { "@earendil-works/pi-coding-agent": "*", "@earendil-works/pi-tui": "*", - "@ff-labs/fff-bun": "*", "@sinclair/typebox": "*", }, - "optionalPeers": [ - "@ff-labs/fff-bun", - ], }, }, "packages": { diff --git a/packages/pi-fff/package.json b/packages/pi-fff/package.json index bf40c6928..e25fc3063 100644 --- a/packages/pi-fff/package.json +++ b/packages/pi-fff/package.json @@ -40,19 +40,14 @@ "typecheck": "tsc --noEmit" }, "dependencies": { + "@ff-labs/fff-bun": "*", "@ff-labs/fff-node": "*" }, "peerDependencies": { "@earendil-works/pi-coding-agent": "*", "@earendil-works/pi-tui": "*", - "@ff-labs/fff-bun": "*", "@sinclair/typebox": "*" }, - "peerDependenciesMeta": { - "@ff-labs/fff-bun": { - "optional": true - } - }, "devDependencies": { "@types/node": "^22.0.0", "typescript": "^5.0.0"