@love-moon/conductor-cli 0.2.4 → 0.2.5

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.
@@ -256,6 +256,7 @@ async function main() {
256
256
 
257
257
  const signals = new AbortController();
258
258
  let shutdownSignal = null;
259
+ const launchedByDaemon = Boolean(process.env.CONDUCTOR_CLI_COMMAND);
259
260
  const onSigint = () => {
260
261
  shutdownSignal = shutdownSignal || "SIGINT";
261
262
  signals.abort();
@@ -272,6 +273,16 @@ async function main() {
272
273
  } finally {
273
274
  process.off("SIGINT", onSigint);
274
275
  process.off("SIGTERM", onSigterm);
276
+ if (shutdownSignal && !launchedByDaemon) {
277
+ try {
278
+ await conductor.sendTaskStatus(taskContext.taskId, {
279
+ status: "KILLED",
280
+ summary: `terminated by ${shutdownSignal}`,
281
+ });
282
+ } catch (error) {
283
+ log(`Failed to report task status (KILLED): ${error?.message || error}`);
284
+ }
285
+ }
275
286
  if (typeof backendSession.close === "function") {
276
287
  await backendSession.close();
277
288
  }
@@ -481,6 +492,7 @@ async function ensureTaskContext(conductor, opts) {
481
492
  const payload = {
482
493
  project_id: projectId,
483
494
  task_title: deriveTaskTitle(opts.initialPrompt, opts.requestedTitle, opts.backend),
495
+ backend_type: opts.backend,
484
496
  };
485
497
  if (opts.initialPrompt) {
486
498
  payload.prefill = opts.initialPrompt;
@@ -1029,6 +1041,13 @@ class ConductorClient {
1029
1041
  });
1030
1042
  }
1031
1043
 
1044
+ async sendTaskStatus(taskId, payload) {
1045
+ return this.callTool("send_task_status", {
1046
+ task_id: taskId,
1047
+ ...(payload || {}),
1048
+ });
1049
+ }
1050
+
1032
1051
  async sendRuntimeStatus(taskId, payload) {
1033
1052
  return this.callTool("send_runtime_status", {
1034
1053
  task_id: taskId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@love-moon/conductor-cli",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
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.4",
20
- "@love-moon/conductor-sdk": "0.2.4",
19
+ "@love-moon/tui-driver": "0.2.5",
20
+ "@love-moon/conductor-sdk": "0.2.5",
21
21
  "@modelcontextprotocol/sdk": "^1.20.2",
22
22
  "dotenv": "^16.4.5",
23
23
  "enquirer": "^2.4.1",