palmier 0.9.31 → 0.9.32

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Daemon-owned supervisors for command-triggered tasks. A command task's shell
2
+ * Daemon-owned supervisors for command-output tasks. A command task's shell
3
3
  * command is a long-running trigger source — the daemon spawns it while the task
4
4
  * is enabled, reads its stdout, and feeds each line into the shared per-task
5
5
  * event queue (the same one the NATS notification/SMS subscriptions populate).
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Daemon-owned supervisors for command-triggered tasks. A command task's shell
2
+ * Daemon-owned supervisors for command-output tasks. A command task's shell
3
3
  * command is a long-running trigger source — the daemon spawns it while the task
4
4
  * is enabled, reads its stdout, and feeds each line into the shared per-task
5
5
  * event queue (the same one the NATS notification/SMS subscriptions populate).
@@ -212,7 +212,7 @@ export async function runCommand(taskId) {
212
212
  agent, task, taskDir, runId, guiEnv, nc, config, taskId,
213
213
  transientPermissions: [],
214
214
  };
215
- // Command-triggered and on_new_* tasks share the same trigger machinery: the
215
+ // Command-output and on_new_* tasks share the same trigger machinery: the
216
216
  // daemon owns the trigger source (the shell command's stdout / a NATS
217
217
  // subscription) and feeds the shared per-task queue, while this run drains
218
218
  // that queue one invocation at a time.
@@ -270,8 +270,6 @@ async function runEventTriggeredMode(ctx) {
270
270
  const port = ctx.config.httpPort ?? 7256;
271
271
  const popUrl = `http://localhost:${port}/task-event/pop?taskId=${encodeURIComponent(ctx.taskId)}`;
272
272
  console.log(`[triggered] Draining ${label} queue`);
273
- appendRunMessage(ctx.taskDir, ctx.runId, { role: "status", time: Date.now(), content: "", type: "monitoring" });
274
- await publishHostEvent(ctx.nc, ctx.config.hostId, ctx.taskId, { event_type: "result-updated", run_id: ctx.runId });
275
273
  let eventsProcessed = 0;
276
274
  let lastOutcome = "finished";
277
275
  try {
@@ -296,8 +294,6 @@ async function runEventTriggeredMode(ctx) {
296
294
  };
297
295
  const result = await invokeAgentWithRetries(ctx, perEventTask);
298
296
  lastOutcome = result.outcome;
299
- appendRunMessage(ctx.taskDir, ctx.runId, { role: "status", time: Date.now(), content: "", type: "monitoring" });
300
- await publishHostEvent(ctx.nc, ctx.config.hostId, ctx.taskId, { event_type: "result-updated", run_id: ctx.runId });
301
297
  }
302
298
  }
303
299
  catch (err) {