palmier 0.5.7 → 0.5.9
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.
- package/dist/commands/run.js +3 -0
- package/dist/rpc-handler.js +4 -1
- package/package.json +1 -1
- package/src/commands/run.ts +4 -0
- package/src/rpc-handler.ts +3 -1
package/dist/commands/run.js
CHANGED
|
@@ -307,6 +307,9 @@ async function runCommandTriggeredMode(ctx) {
|
|
|
307
307
|
invocationsFailed++;
|
|
308
308
|
}
|
|
309
309
|
appendLog(line, "", result.outcome);
|
|
310
|
+
// Append monitoring status so the UI shows the task is waiting for more input
|
|
311
|
+
appendRunMessage(ctx.taskDir, ctx.runId, { role: "status", time: Date.now(), content: "", type: "monitoring" });
|
|
312
|
+
await publishHostEvent(ctx.nc, ctx.config.hostId, ctx.taskId, { event_type: "result-updated", run_id: ctx.runId });
|
|
310
313
|
}
|
|
311
314
|
async function drainQueue() {
|
|
312
315
|
if (processing)
|
package/dist/rpc-handler.js
CHANGED
|
@@ -41,7 +41,10 @@ function parseResultFrontmatter(raw) {
|
|
|
41
41
|
// determine if it's a task run or follow-up
|
|
42
42
|
const activeStates = ["started", "monitoring", "confirmation"];
|
|
43
43
|
let runningState;
|
|
44
|
-
if (
|
|
44
|
+
if (lastStatus?.type === "monitoring") {
|
|
45
|
+
runningState = "monitoring";
|
|
46
|
+
}
|
|
47
|
+
else if (activeStates.includes(lastStatus?.type ?? "")) {
|
|
45
48
|
runningState = terminalMsg ? "followup" : "started";
|
|
46
49
|
}
|
|
47
50
|
else {
|
package/package.json
CHANGED
package/src/commands/run.ts
CHANGED
|
@@ -375,6 +375,10 @@ async function runCommandTriggeredMode(
|
|
|
375
375
|
invocationsFailed++;
|
|
376
376
|
}
|
|
377
377
|
appendLog(line, "", result.outcome);
|
|
378
|
+
|
|
379
|
+
// Append monitoring status so the UI shows the task is waiting for more input
|
|
380
|
+
appendRunMessage(ctx.taskDir, ctx.runId, { role: "status", time: Date.now(), content: "", type: "monitoring" });
|
|
381
|
+
await publishHostEvent(ctx.nc, ctx.config.hostId, ctx.taskId, { event_type: "result-updated", run_id: ctx.runId });
|
|
378
382
|
}
|
|
379
383
|
|
|
380
384
|
async function drainQueue(): Promise<void> {
|
package/src/rpc-handler.ts
CHANGED
|
@@ -51,7 +51,9 @@ function parseResultFrontmatter(raw: string): Record<string, unknown> {
|
|
|
51
51
|
// determine if it's a task run or follow-up
|
|
52
52
|
const activeStates = ["started", "monitoring", "confirmation"];
|
|
53
53
|
let runningState: string | undefined;
|
|
54
|
-
if (
|
|
54
|
+
if (lastStatus?.type === "monitoring") {
|
|
55
|
+
runningState = "monitoring";
|
|
56
|
+
} else if (activeStates.includes(lastStatus?.type ?? "")) {
|
|
55
57
|
runningState = terminalMsg ? "followup" : "started";
|
|
56
58
|
} else {
|
|
57
59
|
runningState = lastStatus?.type;
|