clawdock 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +25 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -405,6 +405,31 @@ program.command("run <bundle>").description("Pull and run an agent locally").opt
405
405
  console.error(" Run without --no-pull to download first.");
406
406
  process.exit(1);
407
407
  }
408
+ const postInstallScript = path.join(workspaceDir, "scripts", "post-install.sh");
409
+ const postInstallScriptWin = path.join(workspaceDir, "scripts", "post-install.bat");
410
+ const scriptToRun = isWindows ? fs.existsSync(postInstallScriptWin) ? postInstallScriptWin : fs.existsSync(postInstallScript) ? postInstallScript : null : fs.existsSync(postInstallScript) ? postInstallScript : null;
411
+ if (scriptToRun) {
412
+ console.log(`\u{1F4E6} Running post-install script...`);
413
+ try {
414
+ const scriptCmd = isWindows && scriptToRun.endsWith(".bat") ? `"${scriptToRun}"` : `bash "${scriptToRun}"`;
415
+ execSync(scriptCmd, {
416
+ stdio: "inherit",
417
+ cwd: workspaceDir,
418
+ env: {
419
+ ...process.env,
420
+ CLAWDOCK_WORKSPACE: workspaceDir,
421
+ CLAWDOCK_AGENT: agentName,
422
+ CLAWDOCK_OWNER: owner,
423
+ CLAWDOCK_SLUG: slug
424
+ },
425
+ shell: isWindows ? "cmd.exe" : void 0
426
+ });
427
+ console.log(` \u2705 Post-install complete`);
428
+ } catch (err) {
429
+ console.warn(` \u26A0\uFE0F Post-install script failed: ${err.message}`);
430
+ console.warn(` Continuing anyway...`);
431
+ }
432
+ }
408
433
  const resolvedModel = model || (provider ? `${provider}/claude-sonnet-4` : null);
409
434
  console.log(`
410
435
  \u{1F980} Starting ${owner}/${slug}...`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawdock",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "CLI for ClawDock — the agent registry",
5
5
  "bin": {
6
6
  "clawdock": "./dist/index.js"