aamp-openclaw-plugin 0.1.44 → 0.1.46
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/index.js +17 -12
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3458,10 +3458,11 @@ async function ensureTaskStream(task) {
|
|
|
3458
3458
|
});
|
|
3459
3459
|
await aampClient.appendStreamEvent({
|
|
3460
3460
|
streamId: created.streamId,
|
|
3461
|
-
type: "
|
|
3461
|
+
type: "tool_call",
|
|
3462
3462
|
payload: {
|
|
3463
|
-
|
|
3464
|
-
|
|
3463
|
+
toolCallId: "openclaw-queue",
|
|
3464
|
+
label: "Task queued in OpenClaw",
|
|
3465
|
+
status: "running"
|
|
3465
3466
|
}
|
|
3466
3467
|
});
|
|
3467
3468
|
activeTaskStreams.set(task.taskId, created.streamId);
|
|
@@ -4737,9 +4738,10 @@ ${task.bodyText}` : "",
|
|
|
4737
4738
|
content: readBinaryFile(a.path)
|
|
4738
4739
|
}));
|
|
4739
4740
|
}
|
|
4740
|
-
await appendTaskStream(task.taskId, "
|
|
4741
|
-
|
|
4742
|
-
|
|
4741
|
+
await appendTaskStream(task.taskId, "tool_call", {
|
|
4742
|
+
toolCallId: "openclaw-result",
|
|
4743
|
+
label: `Sending ${p.status} result`,
|
|
4744
|
+
status: "completed"
|
|
4743
4745
|
});
|
|
4744
4746
|
if (p.output) {
|
|
4745
4747
|
await appendTaskStream(task.taskId, "text.delta", { text: p.output });
|
|
@@ -4818,9 +4820,10 @@ ${task.bodyText}` : "",
|
|
|
4818
4820
|
if (!aampClient?.isConnected()) {
|
|
4819
4821
|
return { content: [{ type: "text", text: "Error: AAMP client is not connected." }] };
|
|
4820
4822
|
}
|
|
4821
|
-
await appendTaskStream(task.taskId, "
|
|
4822
|
-
|
|
4823
|
-
|
|
4823
|
+
await appendTaskStream(task.taskId, "tool_call", {
|
|
4824
|
+
toolCallId: "openclaw-help",
|
|
4825
|
+
label: p.blockedReason,
|
|
4826
|
+
status: "completed"
|
|
4824
4827
|
});
|
|
4825
4828
|
try {
|
|
4826
4829
|
await aampClient.sendHelp({
|
|
@@ -4833,9 +4836,11 @@ ${task.bodyText}` : "",
|
|
|
4833
4836
|
});
|
|
4834
4837
|
} catch (err) {
|
|
4835
4838
|
const message = err instanceof Error ? err.message : String(err);
|
|
4836
|
-
await appendTaskStream(task.taskId, "
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
+
await appendTaskStream(task.taskId, "tool_call", {
|
|
4840
|
+
toolCallId: "openclaw-help",
|
|
4841
|
+
label: "Help request failed; task still needs a reply",
|
|
4842
|
+
status: "failed",
|
|
4843
|
+
output: `Failed to send help request: ${message}`
|
|
4839
4844
|
});
|
|
4840
4845
|
api.logger.error(`[AAMP] aamp_send_help failed for ${task.taskId}: ${message}`);
|
|
4841
4846
|
return {
|