@love-moon/conductor-cli 0.2.9 → 0.2.10

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/package.json +3 -3
  2. package/src/daemon.js +14 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@love-moon/conductor-cli",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "conductor": "bin/conductor.js"
@@ -16,8 +16,8 @@
16
16
  "test": "node --test"
17
17
  },
18
18
  "dependencies": {
19
- "@love-moon/tui-driver": "0.2.9",
20
- "@love-moon/conductor-sdk": "0.2.9",
19
+ "@love-moon/tui-driver": "0.2.10",
20
+ "@love-moon/conductor-sdk": "0.2.10",
21
21
  "dotenv": "^16.4.5",
22
22
  "enquirer": "^2.4.1",
23
23
  "js-yaml": "^4.1.1",
package/src/daemon.js CHANGED
@@ -656,6 +656,20 @@ export function startDaemon(config = {}, deps = {}) {
656
656
  return;
657
657
  }
658
658
 
659
+ const existingTaskRecord = activeTaskProcesses.get(taskId);
660
+ if (existingTaskRecord?.child) {
661
+ log(
662
+ `Duplicate create_task ignored for ${taskId}: task already active (pid=${existingTaskRecord.child.pid ?? "unknown"})`,
663
+ );
664
+ sendAgentCommandAck({
665
+ requestId,
666
+ taskId,
667
+ eventType: "create_task",
668
+ accepted: true,
669
+ }).catch(() => {});
670
+ return;
671
+ }
672
+
659
673
  // Validate and get CLI command for the backend
660
674
  const effectiveBackend = backendType || SUPPORTED_BACKENDS[0];
661
675
  if (!SUPPORTED_BACKENDS.includes(effectiveBackend)) {