Skip to content

Commit 13aedbc

Browse files
dcramercodex
andcommitted
fix(next): Externalize Pi SDK packages in server runtime
Add @mariozechner/pi-agent-core and @mariozechner/pi-ai to withJunior serverExternalPackages so Next dev does not bundle their dynamic module resolution path. This avoids MODULE_NOT_FOUND errors from Turbopack while keeping the behavior centralized in the shared helper and covered by next-config tests. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
1 parent fd3230c commit 13aedbc

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/junior/src/next-config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ function applyJuniorConfig(nextConfig: NextConfig | undefined, options?: JuniorC
103103
"@vercel/sandbox",
104104
"bash-tool",
105105
"just-bash",
106+
"@mariozechner/pi-agent-core",
107+
"@mariozechner/pi-ai",
106108
"@chat-adapter/slack",
107109
"@slack/web-api"
108110
])),

packages/junior/tests/next-config.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ describe("withJunior", () => {
3232
"@vercel/sandbox",
3333
"bash-tool",
3434
"just-bash",
35+
"@mariozechner/pi-agent-core",
36+
"@mariozechner/pi-ai",
3537
"@chat-adapter/slack",
3638
"@slack/web-api"
3739
])
@@ -69,6 +71,8 @@ describe("withJunior", () => {
6971
"@vercel/sandbox",
7072
"bash-tool",
7173
"just-bash",
74+
"@mariozechner/pi-agent-core",
75+
"@mariozechner/pi-ai",
7276
"@chat-adapter/slack",
7377
"@slack/web-api"
7478
])
@@ -113,6 +117,8 @@ describe("withJunior", () => {
113117
"@vercel/sandbox",
114118
"bash-tool",
115119
"just-bash",
120+
"@mariozechner/pi-agent-core",
121+
"@mariozechner/pi-ai",
116122
"@chat-adapter/slack",
117123
"@slack/web-api",
118124
"custom-package"

0 commit comments

Comments
 (0)