@livx.cc/agentx 0.99.61 → 0.99.63
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/README.md +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +106 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10184,7 +10184,7 @@ Another agent just implemented the above. Independently check the CURRENT state
|
|
|
10184
10184
|
const rec = this.tasks.get(id);
|
|
10185
10185
|
if (res.finishReason === "aborted" || rec.status === "cancelled") {
|
|
10186
10186
|
rec.status = "cancelled";
|
|
10187
|
-
this.notify("task_cancelled", `task ${id} (${rec.label}) cancelled
|
|
10187
|
+
this.notify("task_cancelled", `task ${id} (${rec.label}) cancelled`, { id });
|
|
10188
10188
|
return;
|
|
10189
10189
|
}
|
|
10190
10190
|
if (res.finishReason === "error") {
|
|
@@ -10236,7 +10236,7 @@ Another agent just implemented the above. Independently check the CURRENT state
|
|
|
10236
10236
|
rec.status = "error";
|
|
10237
10237
|
rec.result = msg;
|
|
10238
10238
|
log21.warn(`task ${rec.id} failed: ${msg}`);
|
|
10239
|
-
this.notify("task_error", `task ${rec.id} (${rec.label}) failed: ${msg}
|
|
10239
|
+
this.notify("task_error", `task ${rec.id} (${rec.label}) failed: ${msg}`, { id: rec.id });
|
|
10240
10240
|
if (this.foldIfSuperseded(rec, `The "${rec.label}" task failed: ${msg}`)) return;
|
|
10241
10241
|
this.dropParked(rec);
|
|
10242
10242
|
this.queueRevoice(this.integrationPrompt(rec, "error", msg, "error"), true);
|
|
@@ -10461,7 +10461,12 @@ Another agent just implemented the above. Independently check the CURRENT state
|
|
|
10461
10461
|
name: "CancelTask",
|
|
10462
10462
|
description: "Cancel a running background task by id.",
|
|
10463
10463
|
parameters: { type: "object", required: ["id"], properties: { id: { type: "string" } } },
|
|
10464
|
-
|
|
10464
|
+
// Cancel-and-redirect ("stop — do Y instead") is ONE user line: live, the reflex cancelled, said "fetching Y now" and
|
|
10465
|
+
// never dispatched (2/5 Bare voice runs). The tool result is where it looks next — tell it the redirect needs Act.
|
|
10466
|
+
run: async ({ id }) => {
|
|
10467
|
+
const r = this.cancelTask(String(id));
|
|
10468
|
+
return this.tasks.get(String(id))?.status === "cancelled" && r.endsWith("cancelled.") ? `${r} If the user's message ALSO asked for different work (a redirect \u2014 "instead\u2026", "actually\u2026", "do Y"), call Act NOW with that new brief: saying you are on it without calling Act does nothing. If they only asked to stop, just acknowledge in a few words.` : r;
|
|
10469
|
+
}
|
|
10465
10470
|
};
|
|
10466
10471
|
}
|
|
10467
10472
|
};
|