openclaw-remote 0.5.6 → 0.5.8
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 +68 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2816,6 +2816,20 @@ async function updateGoal(account, goalId, updates) {
|
|
|
2816
2816
|
}
|
|
2817
2817
|
);
|
|
2818
2818
|
}
|
|
2819
|
+
async function updateRoleBundle(account, roleId, data) {
|
|
2820
|
+
return apiFetch(
|
|
2821
|
+
buildUrl(account, `/api/v1/roles/${encodeURIComponent(roleId)}/bundle`),
|
|
2822
|
+
{
|
|
2823
|
+
method: "PATCH",
|
|
2824
|
+
headers: buildHeaders(account),
|
|
2825
|
+
body: JSON.stringify({
|
|
2826
|
+
bundle_slug: data.bundle_slug,
|
|
2827
|
+
bundle_version: data.bundle_version,
|
|
2828
|
+
status: data.generation_status
|
|
2829
|
+
})
|
|
2830
|
+
}
|
|
2831
|
+
);
|
|
2832
|
+
}
|
|
2819
2833
|
async function getTeam(account) {
|
|
2820
2834
|
return apiFetch(
|
|
2821
2835
|
buildUrl(account, "/api/v1/team"),
|
|
@@ -2907,6 +2921,15 @@ function formatWebhookEvent(payload) {
|
|
|
2907
2921
|
``,
|
|
2908
2922
|
`Acknowledge the status change if relevant to your work.`
|
|
2909
2923
|
].filter(Boolean).join("\n");
|
|
2924
|
+
case "agent.generate":
|
|
2925
|
+
return [
|
|
2926
|
+
`Generate an AI agent bundle for the role: "${task_title}" (Role ID: ${task_id}).`,
|
|
2927
|
+
``,
|
|
2928
|
+
wake_reason ? `Context: ${wake_reason}` : "",
|
|
2929
|
+
``,
|
|
2930
|
+
`Use your agent-creation skill to build a complete agent bundle for this role.`,
|
|
2931
|
+
`When done, publish it with clawpack push.`
|
|
2932
|
+
].filter(Boolean).join("\n");
|
|
2910
2933
|
default:
|
|
2911
2934
|
return `Task update on "${task_title}" (ID: ${task_id}): ${event}${wake_reason ? ` \u2014 ${wake_reason}` : ""}`;
|
|
2912
2935
|
}
|
|
@@ -3084,15 +3107,18 @@ function createRemotePlugin() {
|
|
|
3084
3107
|
ConversationLabel: payload.task_title || `Task ${payload.task_id}`,
|
|
3085
3108
|
Timestamp: Date.now()
|
|
3086
3109
|
});
|
|
3087
|
-
|
|
3110
|
+
log?.info?.(`Dispatching to agent for task ${payload.task_id}, body length=${body.length}, sessionKey=${sessionKey}`);
|
|
3111
|
+
const result = await rt.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
|
|
3088
3112
|
ctx: msgCtx,
|
|
3089
3113
|
cfg: currentCfg,
|
|
3090
3114
|
dispatcherOptions: {
|
|
3091
3115
|
deliver: async (deliverPayload) => {
|
|
3116
|
+
log?.info?.(`Deliver callback for task ${payload.task_id}: isReasoning=${deliverPayload.isReasoning}, hasText=${!!(deliverPayload?.text ?? deliverPayload?.body)}, textLen=${(deliverPayload?.text ?? deliverPayload?.body ?? "").length}`);
|
|
3092
3117
|
if (deliverPayload.isReasoning) return;
|
|
3093
3118
|
const text = deliverPayload?.text ?? deliverPayload?.body;
|
|
3094
3119
|
if (text) {
|
|
3095
3120
|
await postComment(account, payload.task_id, text);
|
|
3121
|
+
log?.info?.(`Comment posted for task ${payload.task_id}, len=${text.length}`);
|
|
3096
3122
|
}
|
|
3097
3123
|
},
|
|
3098
3124
|
onReplyStart: () => {
|
|
@@ -3100,9 +3126,10 @@ function createRemotePlugin() {
|
|
|
3100
3126
|
}
|
|
3101
3127
|
}
|
|
3102
3128
|
});
|
|
3129
|
+
log?.info?.(`Dispatch completed for task ${payload.task_id}, result=${JSON.stringify(result ?? null)}`);
|
|
3103
3130
|
} catch (err) {
|
|
3104
3131
|
log?.error?.(
|
|
3105
|
-
`Error dispatching webhook event: ${err instanceof Error ? err.message : String(err)}`
|
|
3132
|
+
`Error dispatching webhook event: ${err instanceof Error ? err.message : String(err)}, stack=${err instanceof Error ? err.stack : "N/A"}`
|
|
3106
3133
|
);
|
|
3107
3134
|
}
|
|
3108
3135
|
};
|
|
@@ -3660,6 +3687,44 @@ function createRemotePlugin() {
|
|
|
3660
3687
|
details: { ok: true, goal }
|
|
3661
3688
|
};
|
|
3662
3689
|
}
|
|
3690
|
+
},
|
|
3691
|
+
// remote_update_role — update role bundle info (agent callback)
|
|
3692
|
+
{
|
|
3693
|
+
name: "remote_update_role",
|
|
3694
|
+
label: "Update a role's agent bundle info",
|
|
3695
|
+
description: "Update a role's bundle_slug, bundle_version, and generation_status. Used by the agent-builder to report back after generating a bundle.",
|
|
3696
|
+
parameters: Type.Object({
|
|
3697
|
+
role_id: Type.String({ description: "ID of the role to update" }),
|
|
3698
|
+
bundle_slug: Type.Optional(Type.String({ description: "Published bundle slug (e.g. @org/agent-name)" })),
|
|
3699
|
+
bundle_version: Type.Optional(Type.String({ description: "Published bundle version" })),
|
|
3700
|
+
generation_status: optionalStringEnum(["published", "failed"], {
|
|
3701
|
+
description: "Generation status: published or failed"
|
|
3702
|
+
})
|
|
3703
|
+
}),
|
|
3704
|
+
execute: async (_toolCallId, args) => {
|
|
3705
|
+
const account = resolveToolAccount();
|
|
3706
|
+
const result = await updateRoleBundle(account, args.role_id, {
|
|
3707
|
+
bundle_slug: args.bundle_slug,
|
|
3708
|
+
bundle_version: args.bundle_version,
|
|
3709
|
+
generation_status: args.generation_status
|
|
3710
|
+
});
|
|
3711
|
+
if (!result.ok) {
|
|
3712
|
+
return {
|
|
3713
|
+
content: [{ type: "text", text: `\u274C Failed to update role bundle: ${result.error}` }],
|
|
3714
|
+
details: { ok: false, error: result.error }
|
|
3715
|
+
};
|
|
3716
|
+
}
|
|
3717
|
+
const text = [
|
|
3718
|
+
`\u2705 Role bundle updated!`,
|
|
3719
|
+
args.bundle_slug ? `- **Bundle**: ${args.bundle_slug}` : "",
|
|
3720
|
+
args.bundle_version ? `- **Version**: ${args.bundle_version}` : "",
|
|
3721
|
+
args.generation_status ? `- **Status**: ${args.generation_status}` : ""
|
|
3722
|
+
].filter(Boolean).join("\n");
|
|
3723
|
+
return {
|
|
3724
|
+
content: [{ type: "text", text }],
|
|
3725
|
+
details: { ok: true }
|
|
3726
|
+
};
|
|
3727
|
+
}
|
|
3663
3728
|
}
|
|
3664
3729
|
];
|
|
3665
3730
|
}),
|
|
@@ -3683,6 +3748,7 @@ function createRemotePlugin() {
|
|
|
3683
3748
|
"- `remote_list_goals` \u2014 List goals with progress (filter by status, parent_id, assigned_to)",
|
|
3684
3749
|
"- `remote_create_goal` \u2014 Create a goal (title, description, success_criteria, parent_id, owner_role_id, target_date)",
|
|
3685
3750
|
"- `remote_update_goal` \u2014 Update a goal (status, title, description, success_criteria, target_date, owner_role_id)",
|
|
3751
|
+
"- `remote_update_role` \u2014 Update a role's bundle info (bundle_slug, bundle_version, generation_status)",
|
|
3686
3752
|
"",
|
|
3687
3753
|
"**Task lifecycle**: todo \u2192 in_progress \u2192 review \u2192 done",
|
|
3688
3754
|
"**Task types**: feature, task, bug",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openclaw-remote",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "Remote project board channel plugin for OpenClaw",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"openclaw": "*"
|
|
27
27
|
}
|
|
28
|
-
}
|
|
28
|
+
}
|