clawdock 0.2.7 → 0.2.8

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 +21 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -439,15 +439,20 @@ program.command("run <bundle>").description("Pull and run an agent locally").opt
439
439
  fs.writeFileSync(authProfilesPath, JSON.stringify(authProfiles, null, 2));
440
440
  }
441
441
  const introMessage = "Hello! I just pulled you from ClawDock. Introduce yourself.";
442
- const child = spawn(
443
- runtimeBin,
444
- ["agent", "--agent", agentName, "--local", "-m", introMessage],
445
- {
442
+ let child;
443
+ if (isWindows) {
444
+ const cmd = `"${runtimeBin}" agent --agent ${agentName} --local -m "${introMessage}"`;
445
+ child = spawn(cmd, [], {
446
446
  stdio: "inherit",
447
447
  env: { ...process.env },
448
- shell: isWindows
449
- }
450
- );
448
+ shell: true
449
+ });
450
+ } else {
451
+ child = spawn(runtimeBin, ["agent", "--agent", agentName, "--local", "-m", introMessage], {
452
+ stdio: "inherit",
453
+ env: { ...process.env }
454
+ });
455
+ }
451
456
  child.on("error", (err) => {
452
457
  console.error(`\u274C Failed to start: ${err.message}`);
453
458
  process.exit(1);
@@ -477,18 +482,21 @@ program.command("run <bundle>").description("Pull and run an agent locally").opt
477
482
  }
478
483
  };
479
484
  fs.writeFileSync(configPath, JSON.stringify(nullclawConfig, null, 2));
480
- const child = spawn(runtimeBin, ["--config", configPath, "--workspace", workspaceDir], {
485
+ const nullChild = isWindows ? spawn(`"${runtimeBin}" --config "${configPath}" --workspace "${workspaceDir}"`, [], {
481
486
  stdio: "inherit",
482
487
  cwd: workspaceDir,
483
- shell: isWindows
488
+ shell: true
489
+ }) : spawn(runtimeBin, ["--config", configPath, "--workspace", workspaceDir], {
490
+ stdio: "inherit",
491
+ cwd: workspaceDir
484
492
  });
485
- child.on("error", (err) => {
493
+ nullChild.on("error", (err) => {
486
494
  console.error(`\u274C Failed to start NullClaw: ${err.message}`);
487
495
  process.exit(1);
488
496
  });
489
- child.on("exit", (code) => process.exit(code || 0));
490
- process.on("SIGINT", () => child.kill("SIGINT"));
491
- process.on("SIGTERM", () => child.kill("SIGTERM"));
497
+ nullChild.on("exit", (code) => process.exit(code || 0));
498
+ process.on("SIGINT", () => nullChild.kill("SIGINT"));
499
+ process.on("SIGTERM", () => nullChild.kill("SIGTERM"));
492
500
  }
493
501
  });
494
502
  program.command("update").description("Update clawdock CLI to the latest version").action(async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawdock",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "CLI for ClawDock — the agent registry",
5
5
  "bin": {
6
6
  "clawdock": "./dist/index.js"