@agentvault/agentvault 0.15.3 → 0.17.0
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/channel.d.ts +10 -1
- package/dist/channel.d.ts.map +1 -1
- package/dist/cli.js +423 -89
- package/dist/cli.js.map +4 -4
- package/dist/gateway-send.d.ts +34 -0
- package/dist/gateway-send.d.ts.map +1 -1
- package/dist/http-handlers.d.ts +10 -0
- package/dist/http-handlers.d.ts.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +623 -89
- package/dist/index.js.map +4 -4
- package/dist/mcp-server.d.ts +18 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/openclaw-entry.d.ts.map +1 -1
- package/dist/openclaw-entry.js +132 -77
- package/dist/openclaw-entry.js.map +4 -4
- package/dist/policy-enforcer.d.ts +78 -0
- package/dist/policy-enforcer.d.ts.map +1 -0
- package/dist/skill-manifest.d.ts.map +1 -1
- package/dist/types.d.ts +116 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/mcp-server.d.ts
CHANGED
|
@@ -11,6 +11,24 @@ export interface SkillDefinition {
|
|
|
11
11
|
slaDefinition?: Record<string, unknown>;
|
|
12
12
|
/** Tags for categorisation. */
|
|
13
13
|
tags?: string[];
|
|
14
|
+
/** Tools/capabilities explicitly allowed for this skill. */
|
|
15
|
+
toolsAllowed?: string[];
|
|
16
|
+
/** Tools/capabilities explicitly denied for this skill. */
|
|
17
|
+
toolsDenied?: string[];
|
|
18
|
+
/** JSON Schema for skill output validation. */
|
|
19
|
+
outputSchema?: Record<string, unknown>;
|
|
20
|
+
/** Model routing strategy: "auto" | "round-robin" | "least-latency". */
|
|
21
|
+
modelRouting?: string;
|
|
22
|
+
/** Allowed LLM models for this skill. */
|
|
23
|
+
allowedModels?: string[];
|
|
24
|
+
/** Default LLM model for this skill. */
|
|
25
|
+
defaultModel?: string;
|
|
26
|
+
/** AgentVault certification tier: "verified" | "certified" | "enterprise". */
|
|
27
|
+
certificationTier?: string;
|
|
28
|
+
/** Integrity configuration (algorithm, hashChain). */
|
|
29
|
+
integrity?: Record<string, unknown>;
|
|
30
|
+
/** Required policy presets (e.g., ["network: agentvault"]). */
|
|
31
|
+
requiredPolicies?: string[];
|
|
14
32
|
}
|
|
15
33
|
export interface McpServerOpts {
|
|
16
34
|
agentName: string;
|
package/dist/mcp-server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMjE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMjE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAIhB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACnF;AAMD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,MAAM,CAA2C;IACzD,OAAO,CAAC,IAAI,CAAgB;IAC5B,OAAO,CAAC,WAAW,CAAS;gBAEhB,IAAI,EAAE,aAAa;IAU/B;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAI3C;;;OAGG;IACH,UAAU,IAAI,IAAI;IA2DlB;;;;;;;;;;;OAWG;IACG,aAAa,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAuC7E;;;;;;;OAOG;IACH,OAAO,CAAC,oBAAoB;IA6B5B;;OAEG;YACW,WAAW;IAwBzB,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,aAAa,IAAI,OAAO,CAE3B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-entry.d.ts","sourceRoot":"","sources":["../src/openclaw-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"openclaw-entry.d.ts","sourceRoot":"","sources":["../src/openclaw-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,OAAO,KAAK,EACV,iBAAiB,EASlB,MAAM,qBAAqB,CAAC;AAsD7B,gFAAgF;AAChF,eAAO,IAAI,oBAAoB,SAAQ,CAAC;AA+CxC,uEAAuE;AACvE,iBAAS,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAS9C;AAED,qFAAqF;AACrF,iBAAS,yBAAyB,CAChC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAcT;AAED,sFAAsF;AACtF,iBAAS,cAAc,CACrB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,CAiBR;AA00BD,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,cAAc,EAAE,CAAC;;;;;kBAQrD,iBAAiB;;AAJjC,wBA8RE"}
|
package/dist/openclaw-entry.js
CHANGED
|
@@ -296,32 +296,55 @@ async function handleSendRequest(parsed, channel) {
|
|
|
296
296
|
return { status: 400, body: { ok: false, error: "Missing 'text' field" } };
|
|
297
297
|
}
|
|
298
298
|
try {
|
|
299
|
+
let target;
|
|
299
300
|
let a2aTarget = parsed.hub_address ?? parsed.a2a_address ?? parsed.a2aAddress;
|
|
300
301
|
if (!a2aTarget && parsed.channel_id && typeof parsed.channel_id === "string") {
|
|
301
302
|
const hubAddr = channel.resolveA2AChannelHub(parsed.channel_id);
|
|
302
303
|
if (hubAddr) a2aTarget = hubAddr;
|
|
303
304
|
}
|
|
304
|
-
const roomId = (typeof parsed.room_id === "string" ? parsed.room_id : void 0) ?? channel.lastInboundRoomId;
|
|
305
305
|
if (a2aTarget && typeof a2aTarget === "string") {
|
|
306
|
-
|
|
307
|
-
} else if (
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
metadata: parsed.metadata
|
|
312
|
-
});
|
|
306
|
+
target = { kind: "a2a", hubAddress: a2aTarget };
|
|
307
|
+
} else if (typeof parsed.room_id === "string") {
|
|
308
|
+
target = { kind: "room", roomId: parsed.room_id };
|
|
309
|
+
} else if (parsed.target === "context") {
|
|
310
|
+
target = { kind: "context" };
|
|
313
311
|
} else if (parsed.file_path && typeof parsed.file_path === "string") {
|
|
314
|
-
await channel.
|
|
315
|
-
|
|
316
|
-
|
|
312
|
+
const receipt2 = await channel.deliver(
|
|
313
|
+
{ kind: "owner" },
|
|
314
|
+
{ type: "attachment", text, filePath: parsed.file_path },
|
|
315
|
+
{ topicId: parsed.topicId }
|
|
316
|
+
);
|
|
317
|
+
return {
|
|
318
|
+
status: receipt2.ok ? 200 : 500,
|
|
319
|
+
body: {
|
|
320
|
+
ok: receipt2.ok,
|
|
321
|
+
destination: receipt2.destination,
|
|
322
|
+
...receipt2.error ? { error: receipt2.error } : {}
|
|
323
|
+
}
|
|
324
|
+
};
|
|
317
325
|
} else {
|
|
318
|
-
|
|
319
|
-
topicId: parsed.topicId,
|
|
320
|
-
messageType: parsed.message_type,
|
|
321
|
-
metadata: parsed.metadata
|
|
322
|
-
});
|
|
326
|
+
target = { kind: "owner" };
|
|
323
327
|
}
|
|
324
|
-
|
|
328
|
+
const receipt = await channel.deliver(
|
|
329
|
+
target,
|
|
330
|
+
{ type: "text", text },
|
|
331
|
+
{
|
|
332
|
+
topicId: parsed.topicId,
|
|
333
|
+
priority: parsed.priority,
|
|
334
|
+
metadata: {
|
|
335
|
+
...parsed.metadata,
|
|
336
|
+
...parsed.message_type ? { message_type: parsed.message_type } : {}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
);
|
|
340
|
+
return {
|
|
341
|
+
status: receipt.ok ? 200 : 500,
|
|
342
|
+
body: {
|
|
343
|
+
ok: receipt.ok,
|
|
344
|
+
destination: receipt.destination,
|
|
345
|
+
...receipt.error ? { error: receipt.error } : {}
|
|
346
|
+
}
|
|
347
|
+
};
|
|
325
348
|
} catch (err) {
|
|
326
349
|
return { status: 500, body: { ok: false, error: String(err) } };
|
|
327
350
|
}
|
|
@@ -338,12 +361,19 @@ async function handleActionRequest(parsed, channel) {
|
|
|
338
361
|
detail: parsed.detail,
|
|
339
362
|
estimated_cost: parsed.estimated_cost
|
|
340
363
|
};
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
return {
|
|
364
|
+
const target = parsed.room_id && typeof parsed.room_id === "string" ? { kind: "room", roomId: parsed.room_id } : { kind: "owner" };
|
|
365
|
+
const receipt = await channel.deliver(
|
|
366
|
+
target,
|
|
367
|
+
{ type: "action_confirmation", confirmation }
|
|
368
|
+
);
|
|
369
|
+
return {
|
|
370
|
+
status: receipt.ok ? 200 : 500,
|
|
371
|
+
body: {
|
|
372
|
+
ok: receipt.ok,
|
|
373
|
+
destination: receipt.destination,
|
|
374
|
+
...receipt.error ? { error: receipt.error } : {}
|
|
375
|
+
}
|
|
376
|
+
};
|
|
347
377
|
} catch (err) {
|
|
348
378
|
return { status: 500, body: { ok: false, error: String(err) } };
|
|
349
379
|
}
|
|
@@ -387,9 +417,49 @@ function handleStatusRequest(channel) {
|
|
|
387
417
|
}
|
|
388
418
|
};
|
|
389
419
|
}
|
|
420
|
+
function handleTargetsRequest(channel) {
|
|
421
|
+
return {
|
|
422
|
+
status: 200,
|
|
423
|
+
body: {
|
|
424
|
+
ok: true,
|
|
425
|
+
targets: channel.listTargets(),
|
|
426
|
+
context: channel.lastInboundRoomId ? { kind: "room", roomId: channel.lastInboundRoomId } : { kind: "owner" }
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
}
|
|
390
430
|
|
|
391
431
|
// src/openclaw-entry.ts
|
|
392
432
|
init_openclaw_compat();
|
|
433
|
+
|
|
434
|
+
// src/types.ts
|
|
435
|
+
function parseTarget(raw) {
|
|
436
|
+
let target = raw;
|
|
437
|
+
if (target.startsWith("agentvault:")) {
|
|
438
|
+
target = target.slice("agentvault:".length);
|
|
439
|
+
}
|
|
440
|
+
if (target.startsWith("agent:")) {
|
|
441
|
+
target = "a2a:" + target.slice("agent:".length);
|
|
442
|
+
}
|
|
443
|
+
if (target === "owner" || target === "default") {
|
|
444
|
+
return { kind: "owner" };
|
|
445
|
+
}
|
|
446
|
+
if (target === "context") {
|
|
447
|
+
return { kind: "context" };
|
|
448
|
+
}
|
|
449
|
+
if (target.startsWith("room:")) {
|
|
450
|
+
const roomId = target.slice("room:".length);
|
|
451
|
+
if (!roomId) throw new Error(`Invalid room target: "${raw}" \u2014 missing room ID`);
|
|
452
|
+
return { kind: "room", roomId };
|
|
453
|
+
}
|
|
454
|
+
if (target.startsWith("a2a:")) {
|
|
455
|
+
const hubAddress = target.slice("a2a:".length);
|
|
456
|
+
if (!hubAddress) throw new Error(`Invalid A2A target: "${raw}" \u2014 missing hub address`);
|
|
457
|
+
return { kind: "a2a", hubAddress };
|
|
458
|
+
}
|
|
459
|
+
throw new Error(`Unrecognized delivery target: "${raw}". Use "owner", "room:<id>", "a2a:<addr>", or "context".`);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// src/openclaw-entry.ts
|
|
393
463
|
var _ocRuntime = null;
|
|
394
464
|
var _channels = /* @__PURE__ */ new Map();
|
|
395
465
|
var _messageQueue = [];
|
|
@@ -772,24 +842,26 @@ async function handleInbound(params) {
|
|
|
772
842
|
replyCount++;
|
|
773
843
|
totalReplyChars += text.length;
|
|
774
844
|
if (!firstReplyTime) firstReplyTime = replyStart;
|
|
845
|
+
let replyTarget;
|
|
775
846
|
if (isA2AMessage) {
|
|
776
847
|
if (!_a2aCanReply(metadata.a2aChannelId)) {
|
|
777
848
|
console.warn(`[AgentVault] A2A reply suppressed (rate limit) for channel ${metadata.a2aChannelId?.slice(0, 8)}...`);
|
|
778
849
|
return;
|
|
779
850
|
}
|
|
780
|
-
|
|
781
|
-
parentSpanId: inferenceSpanId
|
|
782
|
-
});
|
|
783
|
-
_a2aRecordReply(metadata.a2aChannelId);
|
|
851
|
+
replyTarget = { kind: "a2a", hubAddress: metadata.fromHubAddress };
|
|
784
852
|
} else if (isRoomMessage) {
|
|
785
|
-
|
|
786
|
-
metadata: { content_length: text.length }
|
|
787
|
-
});
|
|
853
|
+
replyTarget = { kind: "room", roomId: metadata.roomId };
|
|
788
854
|
} else {
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
855
|
+
replyTarget = { kind: "owner" };
|
|
856
|
+
}
|
|
857
|
+
await channel.deliver(replyTarget, { type: "text", text }, {
|
|
858
|
+
conversationId: metadata.conversationId,
|
|
859
|
+
topicId: metadata.topicId,
|
|
860
|
+
parentSpanId: inferenceSpanId,
|
|
861
|
+
metadata: isRoomMessage ? { content_length: text.length } : void 0
|
|
862
|
+
});
|
|
863
|
+
if (isA2AMessage) {
|
|
864
|
+
_a2aRecordReply(metadata.a2aChannelId);
|
|
793
865
|
}
|
|
794
866
|
const replyEnd = Date.now();
|
|
795
867
|
replySpans.push({ startTime: replyStart, endTime: replyEnd, chars: text.length, index: replyCount });
|
|
@@ -1150,50 +1222,28 @@ var agentVaultPlugin = {
|
|
|
1150
1222
|
// Register valid send targets so OpenClaw's `message` tool can route
|
|
1151
1223
|
// proactive (agent-initiated) sends — not just replies to inbound messages.
|
|
1152
1224
|
targets: _outboundTargets,
|
|
1153
|
-
sendText: async ({ to, text, accountId }) => {
|
|
1225
|
+
sendText: async ({ to: rawTo, text, accountId }) => {
|
|
1154
1226
|
const resolvedId = accountId ?? "default";
|
|
1155
1227
|
const ch = _channels.get(resolvedId);
|
|
1156
1228
|
if (!ch) return { ok: false, error: "AgentVault channel not connected" };
|
|
1157
1229
|
try {
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
} else if (to.startsWith("room:")) {
|
|
1162
|
-
await ch.sendToRoom(to.slice(5), text);
|
|
1163
|
-
} else {
|
|
1164
|
-
const roomId = ch.lastInboundRoomId;
|
|
1165
|
-
if (roomId) {
|
|
1166
|
-
await ch.sendToRoom(roomId, text);
|
|
1167
|
-
} else {
|
|
1168
|
-
await ch.send(text);
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
return { ok: true, queued: !wasReady };
|
|
1230
|
+
const target = parseTarget(rawTo);
|
|
1231
|
+
const receipt = await ch.deliver(target, { type: "text", text });
|
|
1232
|
+
return { ok: receipt.ok, queued: receipt.queued, error: receipt.error };
|
|
1172
1233
|
} catch (err) {
|
|
1173
1234
|
return { ok: false, error: String(err) };
|
|
1174
1235
|
}
|
|
1175
1236
|
},
|
|
1176
|
-
sendMedia: async ({ to, text, mediaUrl, accountId }) => {
|
|
1237
|
+
sendMedia: async ({ to: rawTo, text, mediaUrl, accountId }) => {
|
|
1177
1238
|
const resolvedId = accountId ?? "default";
|
|
1178
1239
|
const ch = _channels.get(resolvedId);
|
|
1179
1240
|
if (!ch) return { ok: false, error: "AgentVault channel not connected" };
|
|
1180
1241
|
try {
|
|
1181
1242
|
const message = text ? `${text}
|
|
1182
1243
|
${mediaUrl}` : mediaUrl;
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
} else if (to.startsWith("room:")) {
|
|
1187
|
-
await ch.sendToRoom(to.slice(5), message);
|
|
1188
|
-
} else {
|
|
1189
|
-
const roomId = ch.lastInboundRoomId;
|
|
1190
|
-
if (roomId) {
|
|
1191
|
-
await ch.sendToRoom(roomId, message);
|
|
1192
|
-
} else {
|
|
1193
|
-
await ch.send(message);
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
return { ok: true, queued: !wasReady };
|
|
1244
|
+
const target = parseTarget(rawTo);
|
|
1245
|
+
const receipt = await ch.deliver(target, { type: "text", text: message });
|
|
1246
|
+
return { ok: receipt.ok, queued: receipt.queued, error: receipt.error };
|
|
1197
1247
|
} catch (err) {
|
|
1198
1248
|
return { ok: false, error: String(err) };
|
|
1199
1249
|
}
|
|
@@ -1210,20 +1260,15 @@ ${mediaUrl}` : mediaUrl;
|
|
|
1210
1260
|
});
|
|
1211
1261
|
const text = (payload.text ?? "").trim();
|
|
1212
1262
|
if (!text && !payload.mediaUrls?.length) return { ok: true };
|
|
1263
|
+
const rawTarget = ctx.to;
|
|
1264
|
+
let target;
|
|
1265
|
+
if (rawTarget && typeof rawTarget === "string") {
|
|
1266
|
+
target = parseTarget(rawTarget);
|
|
1267
|
+
} else {
|
|
1268
|
+
target = { kind: "owner" };
|
|
1269
|
+
}
|
|
1213
1270
|
const _send = async (msg) => {
|
|
1214
|
-
|
|
1215
|
-
if (target && typeof target === "string" && target.startsWith("a2a:")) {
|
|
1216
|
-
await ch.sendToAgent(target.slice(4), msg);
|
|
1217
|
-
} else if (target && typeof target === "string" && target.startsWith("room:")) {
|
|
1218
|
-
await ch.sendToRoom(target.slice(5), msg);
|
|
1219
|
-
} else {
|
|
1220
|
-
const roomId = ch.lastInboundRoomId;
|
|
1221
|
-
if (roomId) {
|
|
1222
|
-
await ch.sendToRoom(roomId, msg);
|
|
1223
|
-
} else {
|
|
1224
|
-
await ch.send(msg);
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1271
|
+
await ch.deliver(target, { type: "text", text: msg });
|
|
1227
1272
|
};
|
|
1228
1273
|
if (text) {
|
|
1229
1274
|
await _send(text);
|
|
@@ -1344,6 +1389,16 @@ var openclaw_entry_default = {
|
|
|
1344
1389
|
return { status: result.status, body: result.body };
|
|
1345
1390
|
}
|
|
1346
1391
|
});
|
|
1392
|
+
api.registerHttpRoute({
|
|
1393
|
+
path: "/agentvault/targets",
|
|
1394
|
+
method: "GET",
|
|
1395
|
+
handler: async () => {
|
|
1396
|
+
const ch = _channels.values().next().value;
|
|
1397
|
+
if (!ch) return { status: 503, body: { ok: false, error: "Channel not started" } };
|
|
1398
|
+
const result = handleTargetsRequest(ch);
|
|
1399
|
+
return { status: result.status, body: result.body };
|
|
1400
|
+
}
|
|
1401
|
+
});
|
|
1347
1402
|
isUsingManagedRoutes = true;
|
|
1348
1403
|
} catch {
|
|
1349
1404
|
}
|