openclaw-remote 0.5.3 → 0.5.5
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 +31 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3101,6 +3101,15 @@ function createRemotePlugin() {
|
|
|
3101
3101
|
},
|
|
3102
3102
|
agentTools: ((params) => {
|
|
3103
3103
|
const cfg = params.cfg;
|
|
3104
|
+
const resolveToolAccount = () => {
|
|
3105
|
+
if (params.accountId) return resolveAccount(cfg ?? {}, params.accountId);
|
|
3106
|
+
const ids = listAccountIds(cfg ?? {});
|
|
3107
|
+
for (const id of ids) {
|
|
3108
|
+
const acct = resolveAccount(cfg ?? {}, id);
|
|
3109
|
+
if (acct.enabled && acct.apiKey) return acct;
|
|
3110
|
+
}
|
|
3111
|
+
return resolveAccount(cfg ?? {});
|
|
3112
|
+
};
|
|
3104
3113
|
return [
|
|
3105
3114
|
// 1. remote_create_task
|
|
3106
3115
|
{
|
|
@@ -3124,7 +3133,7 @@ function createRemotePlugin() {
|
|
|
3124
3133
|
)
|
|
3125
3134
|
}),
|
|
3126
3135
|
execute: async (_toolCallId, args) => {
|
|
3127
|
-
const account =
|
|
3136
|
+
const account = resolveToolAccount();
|
|
3128
3137
|
const result = await createTask(account, {
|
|
3129
3138
|
title: args.title,
|
|
3130
3139
|
description: args.description,
|
|
@@ -3158,11 +3167,11 @@ function createRemotePlugin() {
|
|
|
3158
3167
|
{
|
|
3159
3168
|
name: "remote_update_task",
|
|
3160
3169
|
label: "Update a task on the Remote project board",
|
|
3161
|
-
description: "Update an existing task on the Remote project board. Specify the task_id and any fields to change: status (todo/in_progress/review/done), priority, assigned_to, title, description, type, epic_id, or assigned_role_id.",
|
|
3170
|
+
description: "Update an existing task on the Remote project board. Specify the task_id and any fields to change: status (todo/in_progress/blocked/review/done), priority, assigned_to, title, description, type, epic_id, or assigned_role_id.",
|
|
3162
3171
|
parameters: Type.Object({
|
|
3163
3172
|
task_id: Type.String({ description: "ID of the task to update" }),
|
|
3164
|
-
status: optionalStringEnum(["todo", "in_progress", "review", "done"], {
|
|
3165
|
-
description: "New status: todo, in_progress, review, or done"
|
|
3173
|
+
status: optionalStringEnum(["todo", "in_progress", "blocked", "review", "done"], {
|
|
3174
|
+
description: "New status: todo, in_progress, blocked, review, or done"
|
|
3166
3175
|
}),
|
|
3167
3176
|
priority: optionalStringEnum(["low", "medium", "high", "urgent"], {
|
|
3168
3177
|
description: "New priority: low, medium, high, or urgent"
|
|
@@ -3183,7 +3192,7 @@ function createRemotePlugin() {
|
|
|
3183
3192
|
)
|
|
3184
3193
|
}),
|
|
3185
3194
|
execute: async (_toolCallId, args) => {
|
|
3186
|
-
const account =
|
|
3195
|
+
const account = resolveToolAccount();
|
|
3187
3196
|
const { task_id, ...updates } = args;
|
|
3188
3197
|
const result = await updateTask(account, task_id, updates);
|
|
3189
3198
|
if (!result.ok) {
|
|
@@ -3210,17 +3219,17 @@ function createRemotePlugin() {
|
|
|
3210
3219
|
{
|
|
3211
3220
|
name: "remote_list_tasks",
|
|
3212
3221
|
label: "List tasks on the Remote project board",
|
|
3213
|
-
description: "List tasks on the Remote project board. Optionally filter by status (todo/in_progress/review/done) and assigned_to (use 'me' for tasks assigned to the agent).",
|
|
3222
|
+
description: "List tasks on the Remote project board. Optionally filter by status (todo/in_progress/blocked/review/done) and assigned_to (use 'me' for tasks assigned to the agent).",
|
|
3214
3223
|
parameters: Type.Object({
|
|
3215
|
-
status: optionalStringEnum(["todo", "in_progress", "review", "done"], {
|
|
3216
|
-
description: "Filter by status: todo, in_progress, review, or done"
|
|
3224
|
+
status: optionalStringEnum(["todo", "in_progress", "blocked", "review", "done"], {
|
|
3225
|
+
description: "Filter by status: todo, in_progress, blocked, review, or done"
|
|
3217
3226
|
}),
|
|
3218
3227
|
assigned_to: Type.Optional(
|
|
3219
3228
|
Type.String({ description: "Filter by assignee. Use 'me' for self." })
|
|
3220
3229
|
)
|
|
3221
3230
|
}),
|
|
3222
3231
|
execute: async (_toolCallId, args) => {
|
|
3223
|
-
const account =
|
|
3232
|
+
const account = resolveToolAccount();
|
|
3224
3233
|
const result = await listTasks(account, {
|
|
3225
3234
|
status: args.status,
|
|
3226
3235
|
assigned_to: args.assigned_to
|
|
@@ -3269,7 +3278,7 @@ function createRemotePlugin() {
|
|
|
3269
3278
|
description: "Get board health and statistics from the Remote project board: pending tasks, in-progress tasks, unassigned tasks, recent activity, and your roles.",
|
|
3270
3279
|
parameters: Type.Object({}),
|
|
3271
3280
|
execute: async (_toolCallId, _args) => {
|
|
3272
|
-
const account =
|
|
3281
|
+
const account = resolveToolAccount();
|
|
3273
3282
|
const result = await getBoardHealth(account);
|
|
3274
3283
|
if (!result.ok) {
|
|
3275
3284
|
const legacyResult = await getHeartbeat(account);
|
|
@@ -3300,7 +3309,7 @@ function createRemotePlugin() {
|
|
|
3300
3309
|
`\u{1F4CA} **Board Health \u2014 ${h.project.name}**`,
|
|
3301
3310
|
"",
|
|
3302
3311
|
`**Tasks** (${s.total_tasks} total):`,
|
|
3303
|
-
` todo: ${s.by_status.todo} | in_progress: ${s.by_status.in_progress} | review: ${s.by_status.review} | done: ${s.by_status.done}`,
|
|
3312
|
+
` todo: ${s.by_status.todo} | in_progress: ${s.by_status.in_progress} | blocked: ${s.by_status.blocked || 0} | review: ${s.by_status.review} | done: ${s.by_status.done}`,
|
|
3304
3313
|
` unassigned: ${s.unassigned}`,
|
|
3305
3314
|
"",
|
|
3306
3315
|
`**By priority**: urgent: ${s.by_priority.urgent} | high: ${s.by_priority.high} | medium: ${s.by_priority.medium} | low: ${s.by_priority.low}`
|
|
@@ -3338,7 +3347,7 @@ function createRemotePlugin() {
|
|
|
3338
3347
|
description: "List project roles with assignment info. Use to find valid assigned_role_id values for task creation.",
|
|
3339
3348
|
parameters: Type.Object({}),
|
|
3340
3349
|
execute: async (_toolCallId, _args) => {
|
|
3341
|
-
const account =
|
|
3350
|
+
const account = resolveToolAccount();
|
|
3342
3351
|
const result = await listRoles(account);
|
|
3343
3352
|
if (!result.ok) {
|
|
3344
3353
|
return {
|
|
@@ -3372,7 +3381,7 @@ function createRemotePlugin() {
|
|
|
3372
3381
|
description: "List epics for the project. Use to find valid epic_id values for task grouping.",
|
|
3373
3382
|
parameters: Type.Object({}),
|
|
3374
3383
|
execute: async (_toolCallId, _args) => {
|
|
3375
|
-
const account =
|
|
3384
|
+
const account = resolveToolAccount();
|
|
3376
3385
|
const result = await listEpics(account);
|
|
3377
3386
|
if (!result.ok) {
|
|
3378
3387
|
return {
|
|
@@ -3412,7 +3421,7 @@ function createRemotePlugin() {
|
|
|
3412
3421
|
color: Type.Optional(Type.String({ description: "Epic color (hex, e.g. #6366f1)" }))
|
|
3413
3422
|
}),
|
|
3414
3423
|
execute: async (_toolCallId, args) => {
|
|
3415
|
-
const account =
|
|
3424
|
+
const account = resolveToolAccount();
|
|
3416
3425
|
const result = await createEpic(account, {
|
|
3417
3426
|
name: args.name,
|
|
3418
3427
|
description: args.description,
|
|
@@ -3444,7 +3453,7 @@ function createRemotePlugin() {
|
|
|
3444
3453
|
description: "List all team members (humans and agents) with their roles and @mention handles. Use to find who to tag in comments or assign tasks to.",
|
|
3445
3454
|
parameters: Type.Object({}),
|
|
3446
3455
|
execute: async (_toolCallId, _args) => {
|
|
3447
|
-
const account =
|
|
3456
|
+
const account = resolveToolAccount();
|
|
3448
3457
|
const result = await getTeam(account);
|
|
3449
3458
|
if (!result.ok) {
|
|
3450
3459
|
return {
|
|
@@ -3461,10 +3470,15 @@ function createRemotePlugin() {
|
|
|
3461
3470
|
}
|
|
3462
3471
|
const lines = [`\u{1F465} **Team** (${total} members: ${humans} human, ${agents} agent)`, ""];
|
|
3463
3472
|
for (const m of team) {
|
|
3464
|
-
const
|
|
3473
|
+
const roleDetails = m.project_roles.length > 0 ? m.project_roles.map((r) => {
|
|
3474
|
+
let detail = r.name;
|
|
3475
|
+
if (r.manager) detail += ` (reports to: ${r.manager.name})`;
|
|
3476
|
+
if (r.direct_reports?.length > 0) detail += ` [${r.direct_reports.length} direct report(s)]`;
|
|
3477
|
+
return detail;
|
|
3478
|
+
}).join(", ") : "no role";
|
|
3465
3479
|
const me = m.is_me ? " \u2B50 (you)" : "";
|
|
3466
3480
|
const status = m.type === "agent" && m.status ? ` [${m.status}]` : "";
|
|
3467
|
-
lines.push(`- **${m.name}** (${m.type}${status}) \u2014 ${
|
|
3481
|
+
lines.push(`- **${m.name}** (${m.type}${status}) \u2014 ${roleDetails} \u2014 mention: \`${m.mention}\`${me}`);
|
|
3468
3482
|
}
|
|
3469
3483
|
return {
|
|
3470
3484
|
content: [{ type: "text", text: lines.join("\n") }],
|