diff --git a/package-lock.json b/package-lock.json index 8c616d5..d6430da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@companion-ai/feynman", - "version": "0.2.1", + "version": "0.2.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@companion-ai/feynman", - "version": "0.2.1", + "version": "0.2.2", "hasInstallScript": true, "dependencies": { "@companion-ai/alpha-hub": "^0.1.2", diff --git a/package.json b/package.json index e85ca92..aacecb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@companion-ai/feynman", - "version": "0.2.1", + "version": "0.2.2", "description": "Research-first CLI agent built on Pi and alphaXiv", "type": "module", "bin": { diff --git a/scripts/patch-embedded-pi.mjs b/scripts/patch-embedded-pi.mjs index 4bb1d1d..5dc2009 100644 --- a/scripts/patch-embedded-pi.mjs +++ b/scripts/patch-embedded-pi.mjs @@ -27,53 +27,7 @@ const settingsPath = resolve(appRoot, ".feynman", "settings.json"); const workspaceDir = resolve(appRoot, ".feynman", "npm"); const workspacePackageJsonPath = resolve(workspaceDir, "package.json"); -function ensurePackageWorkspace() { - if (!existsSync(settingsPath)) { - return; - } - - const settings = JSON.parse(readFileSync(settingsPath, "utf8")); - const packageSpecs = Array.isArray(settings.packages) - ? settings.packages - .filter((value) => typeof value === "string" && value.startsWith("npm:")) - .map((value) => value.slice(4)) - : []; - - if (packageSpecs.length === 0) { - return; - } - - mkdirSync(workspaceDir, { recursive: true }); - - writeFileSync( - workspacePackageJsonPath, - JSON.stringify( - { - name: "pi-extensions", - private: true, - dependencies: Object.fromEntries(packageSpecs.map((spec) => [spec, "latest"])), - }, - null, - 2, - ) + "\n", - "utf8", - ); - - const npmExec = process.env.npm_execpath; - const install = npmExec - ? spawnSync(process.execPath, [npmExec, "install", "--prefix", workspaceDir, ...packageSpecs], { - stdio: "inherit", - }) - : spawnSync("npm", ["install", "--prefix", workspaceDir, ...packageSpecs], { - stdio: "inherit", - }); - - if (install.status !== 0) { - console.warn("[feynman] warning: failed to preinstall default Pi packages into .feynman/npm"); - } -} - -ensurePackageWorkspace(); +// Pi handles package installation from .feynman/settings.json at runtime — no manual install needed if (existsSync(packageJsonPath)) { const pkg = JSON.parse(readFileSync(packageJsonPath, "utf8"));