merge main

This commit is contained in:
Shawn Morreau
2025-11-18 11:28:35 -05:00
4 changed files with 23 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
# Mark generated files as linguist-generated to exclude from language statistics
entry.js linguist-generated
+1 -1
View File
@@ -11,7 +11,7 @@ GitHub Action for running Claude Code and other agents via Pullfrog.
pnpm install pnpm install
``` ```
## Testing with play.ts ## Testing with `play.ts`
```bash ```bash
pnpm play # Uses fixtures/play.txt pnpm play # Uses fixtures/play.txt
+1
View File
@@ -12,6 +12,7 @@ export const jules = agent({
packageName: "@google/jules", packageName: "@google/jules",
version: "latest", version: "latest",
executablePath: "run.cjs", executablePath: "run.cjs",
installDependencies: true,
}); });
}, },
run: async ({ run: async ({
+18
View File
@@ -37,10 +37,12 @@ export async function installFromNpmTarball({
packageName, packageName,
version, version,
executablePath, executablePath,
installDependencies,
}: { }: {
packageName: string; packageName: string;
version: string; version: string;
executablePath: string; executablePath: string;
installDependencies?: boolean;
}): Promise<string> { }): Promise<string> {
// Resolve version if it's a range or "latest" // Resolve version if it's a range or "latest"
let resolvedVersion = version; let resolvedVersion = version;
@@ -119,6 +121,22 @@ export async function installFromNpmTarball({
throw new Error(`Executable not found in extracted package at ${cliPath}`); throw new Error(`Executable not found in extracted package at ${cliPath}`);
} }
// Install dependencies if requested
if (installDependencies) {
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(`✓ Dependencies installed`);
}
// Make the file executable // Make the file executable
chmodSync(cliPath, 0o755); chmodSync(cliPath, 0o755);