fix(coding): resolve packaged Pi Agent Server dependencies

This commit is contained in:
2026-09-01 11:11:00 +08:00
parent 7f0e9310a7
commit 7df245af5a
3 changed files with 123 additions and 2 deletions

View File

@@ -514,7 +514,13 @@ export class PiAgentServerProcess {
const generation = ++this.generation;
const child = spawn(
this.options.executablePath,
[this.options.serverPath, '--runtime-root', this.options.runtimeRoot],
[
// Enables the parent URL used to resolve dependencies from the packaged Pi runtime root.
'--experimental-import-meta-resolve',
this.options.serverPath,
'--runtime-root',
this.options.runtimeRoot,
],
{
cwd: this.options.runtimeRoot,
env: buildPiWorkerEnvironment(this.options.configDir),