openclaw-remote 0.5.3 → 0.5.4
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 -8
- 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,
|
|
@@ -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) {
|
|
@@ -3220,7 +3229,7 @@ function createRemotePlugin() {
|
|
|
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);
|
|
@@ -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 {
|