merge main
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Mark generated files as linguist-generated to exclude from language statistics
|
||||
entry.js linguist-generated
|
||||
|
||||
@@ -11,7 +11,7 @@ GitHub Action for running Claude Code and other agents via Pullfrog.
|
||||
pnpm install
|
||||
```
|
||||
|
||||
## Testing with play.ts
|
||||
## Testing with `play.ts`
|
||||
|
||||
```bash
|
||||
pnpm play # Uses fixtures/play.txt
|
||||
|
||||
@@ -12,6 +12,7 @@ export const jules = agent({
|
||||
packageName: "@google/jules",
|
||||
version: "latest",
|
||||
executablePath: "run.cjs",
|
||||
installDependencies: true,
|
||||
});
|
||||
},
|
||||
run: async ({
|
||||
|
||||
@@ -37,10 +37,12 @@ export async function installFromNpmTarball({
|
||||
packageName,
|
||||
version,
|
||||
executablePath,
|
||||
installDependencies,
|
||||
}: {
|
||||
packageName: string;
|
||||
version: string;
|
||||
executablePath: string;
|
||||
installDependencies?: boolean;
|
||||
}): Promise<string> {
|
||||
// Resolve version if it's a range or "latest"
|
||||
let resolvedVersion = version;
|
||||
@@ -119,6 +121,22 @@ export async function installFromNpmTarball({
|
||||
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
|
||||
chmodSync(cliPath, 0o755);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user