diff --git a/agents/codex.ts b/agents/codex.ts index f7aeb59..feac6f1 100644 --- a/agents/codex.ts +++ b/agents/codex.ts @@ -11,7 +11,6 @@ export const codex = agent({ packageName: "@openai/codex", version: "latest", executablePath: "bin/codex.js", - installDependencies: true, }); }, run: async ({ prompt, mcpServers, apiKey, cliPath }) => { diff --git a/agents/shared.ts b/agents/shared.ts index 8466a03..a7a4472 100644 --- a/agents/shared.ts +++ b/agents/shared.ts @@ -39,12 +39,10 @@ export async function installFromNpmTarball({ packageName, version, executablePath, - installDependencies = false, }: { packageName: string; version: string; executablePath: string; - installDependencies?: boolean; }): Promise { // Resolve version if it's a range or "latest" let resolvedVersion = version; @@ -123,24 +121,6 @@ export async function installFromNpmTarball({ throw new Error(`Executable not found in extracted package at ${cliPath}`); } - // Install dependencies if requested and package.json exists - if (installDependencies) { - const packageJsonPath = join(extractedDir, "package.json"); - if (existsSync(packageJsonPath)) { - log.info(`Installing dependencies for ${packageName}...`); - const installResult = spawnSync("npm", ["install", "--production"], { - cwd: extractedDir, - stdio: "pipe", - encoding: "utf-8", - }); - if (installResult.status !== 0) { - throw new Error( - `Failed to install dependencies: ${installResult.stderr || installResult.stdout || "Unknown error"}` - ); - } - } - } - log.info(`✓ ${packageName} installed at ${cliPath}`); return cliPath; diff --git a/entry.js b/entry.js index 48e6d16..e52a291 100755 --- a/entry.js +++ b/entry.js @@ -41138,8 +41138,7 @@ var workflows = [ async function installFromNpmTarball({ packageName, version, - executablePath, - installDependencies = false + executablePath }) { let resolvedVersion = version; if (version.startsWith("^") || version.startsWith("~") || version === "latest") { @@ -41197,22 +41196,6 @@ async function installFromNpmTarball({ if (!existsSync2(cliPath)) { throw new Error(`Executable not found in extracted package at ${cliPath}`); } - if (installDependencies) { - const packageJsonPath = join5(extractedDir, "package.json"); - if (existsSync2(packageJsonPath)) { - log.info(`Installing dependencies for ${packageName}...`); - const installResult = spawnSync("npm", ["install", "--production"], { - cwd: extractedDir, - stdio: "pipe", - encoding: "utf-8" - }); - if (installResult.status !== 0) { - throw new Error( - `Failed to install dependencies: ${installResult.stderr || installResult.stdout || "Unknown error"}` - ); - } - } - } log.info(`\u2713 ${packageName} installed at ${cliPath}`); return cliPath; } @@ -41402,8 +41385,7 @@ var codex = agent({ return await installFromNpmTarball({ packageName: "@openai/codex", version: "latest", - executablePath: "bin/codex.js", - installDependencies: true + executablePath: "bin/codex.js" }); }, run: async ({ prompt, mcpServers, apiKey, cliPath }) => {