@agentvault/agentvault 0.15.3 → 0.16.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 +337 -33
- 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 +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +364 -32
- package/dist/index.js.map +4 -4
- 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/types.d.ts +76 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/channel.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from "node:events";
|
|
2
2
|
import { TelemetryReporter } from "@agentvault/crypto";
|
|
3
|
-
import type { SecureChannelConfig, ChannelState, SendOptions, DecisionRequest, DecisionResponse, HeartbeatStatus, StatusAlert, RoomMemberInfo, RoomConversationInfo, RoomInfo, A2AChannel } from "./types.js";
|
|
3
|
+
import type { SecureChannelConfig, ChannelState, SendOptions, DecisionRequest, DecisionResponse, HeartbeatStatus, StatusAlert, RoomMemberInfo, RoomConversationInfo, RoomInfo, A2AChannel, DeliveryTarget, DeliveryContent, DeliveryOptions, DeliveryReceipt, TargetInfo } from "./types.js";
|
|
4
4
|
export declare class SecureChannel extends EventEmitter {
|
|
5
5
|
private config;
|
|
6
6
|
private _state;
|
|
@@ -166,6 +166,15 @@ export declare class SecureChannel extends EventEmitter {
|
|
|
166
166
|
detail?: string;
|
|
167
167
|
estimated_cost?: number;
|
|
168
168
|
}): Promise<void>;
|
|
169
|
+
/**
|
|
170
|
+
* Canonical message dispatcher. ALL outbound messages should flow through this method.
|
|
171
|
+
* Routes based on explicit target — never silently falls back to a room.
|
|
172
|
+
*/
|
|
173
|
+
deliver(target: DeliveryTarget, content: DeliveryContent, options?: DeliveryOptions): Promise<DeliveryReceipt>;
|
|
174
|
+
/**
|
|
175
|
+
* Returns all available delivery destinations with availability status.
|
|
176
|
+
*/
|
|
177
|
+
listTargets(): TargetInfo[];
|
|
169
178
|
private _sendHeartbeat;
|
|
170
179
|
stop(): Promise<void>;
|
|
171
180
|
startHttpServer(port: number): void;
|
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQ3C,OAAO,EAWL,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EAMZ,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,QAAQ,EAER,UAAU,
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQ3C,OAAO,EAWL,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EAMZ,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,QAAQ,EAER,UAAU,EAEV,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,UAAU,EACX,MAAM,YAAY,CAAC;AA6DpB,qBAAa,aAAc,SAAQ,YAAY;IAkEjC,OAAO,CAAC,MAAM;IAjE1B,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,C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GG;IACH;;;OAGG;YACW,mBAAmB;IAsKjC,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,UAAU;YAMJ,mBAAmB;IAmCjC,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,kBAAkB;IAe1B,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,gBAAgB;YAOV,qBAAqB;IAuCnC,OAAO,CAAC,kBAAkB;IA4C1B,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,kBAAkB;IA2H1B,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,YAAY;IAKpB;;;OAGG;YACW,aAAa;IAyB3B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;CAqB9B"}
|
package/dist/cli.js
CHANGED
|
@@ -46463,7 +46463,8 @@ __export(http_handlers_exports, {
|
|
|
46463
46463
|
handleActionRequest: () => handleActionRequest,
|
|
46464
46464
|
handleDecisionRequest: () => handleDecisionRequest,
|
|
46465
46465
|
handleSendRequest: () => handleSendRequest,
|
|
46466
|
-
handleStatusRequest: () => handleStatusRequest
|
|
46466
|
+
handleStatusRequest: () => handleStatusRequest,
|
|
46467
|
+
handleTargetsRequest: () => handleTargetsRequest
|
|
46467
46468
|
});
|
|
46468
46469
|
async function handleSendRequest(parsed, channel2) {
|
|
46469
46470
|
const text = parsed.text;
|
|
@@ -46471,32 +46472,55 @@ async function handleSendRequest(parsed, channel2) {
|
|
|
46471
46472
|
return { status: 400, body: { ok: false, error: "Missing 'text' field" } };
|
|
46472
46473
|
}
|
|
46473
46474
|
try {
|
|
46475
|
+
let target;
|
|
46474
46476
|
let a2aTarget = parsed.hub_address ?? parsed.a2a_address ?? parsed.a2aAddress;
|
|
46475
46477
|
if (!a2aTarget && parsed.channel_id && typeof parsed.channel_id === "string") {
|
|
46476
46478
|
const hubAddr = channel2.resolveA2AChannelHub(parsed.channel_id);
|
|
46477
46479
|
if (hubAddr) a2aTarget = hubAddr;
|
|
46478
46480
|
}
|
|
46479
|
-
const roomId = (typeof parsed.room_id === "string" ? parsed.room_id : void 0) ?? channel2.lastInboundRoomId;
|
|
46480
46481
|
if (a2aTarget && typeof a2aTarget === "string") {
|
|
46481
|
-
|
|
46482
|
-
} else if (
|
|
46483
|
-
|
|
46484
|
-
|
|
46485
|
-
|
|
46486
|
-
metadata: parsed.metadata
|
|
46487
|
-
});
|
|
46482
|
+
target = { kind: "a2a", hubAddress: a2aTarget };
|
|
46483
|
+
} else if (typeof parsed.room_id === "string") {
|
|
46484
|
+
target = { kind: "room", roomId: parsed.room_id };
|
|
46485
|
+
} else if (parsed.target === "context") {
|
|
46486
|
+
target = { kind: "context" };
|
|
46488
46487
|
} else if (parsed.file_path && typeof parsed.file_path === "string") {
|
|
46489
|
-
await channel2.
|
|
46490
|
-
|
|
46491
|
-
|
|
46488
|
+
const receipt2 = await channel2.deliver(
|
|
46489
|
+
{ kind: "owner" },
|
|
46490
|
+
{ type: "attachment", text, filePath: parsed.file_path },
|
|
46491
|
+
{ topicId: parsed.topicId }
|
|
46492
|
+
);
|
|
46493
|
+
return {
|
|
46494
|
+
status: receipt2.ok ? 200 : 500,
|
|
46495
|
+
body: {
|
|
46496
|
+
ok: receipt2.ok,
|
|
46497
|
+
destination: receipt2.destination,
|
|
46498
|
+
...receipt2.error ? { error: receipt2.error } : {}
|
|
46499
|
+
}
|
|
46500
|
+
};
|
|
46492
46501
|
} else {
|
|
46493
|
-
|
|
46494
|
-
topicId: parsed.topicId,
|
|
46495
|
-
messageType: parsed.message_type,
|
|
46496
|
-
metadata: parsed.metadata
|
|
46497
|
-
});
|
|
46502
|
+
target = { kind: "owner" };
|
|
46498
46503
|
}
|
|
46499
|
-
|
|
46504
|
+
const receipt = await channel2.deliver(
|
|
46505
|
+
target,
|
|
46506
|
+
{ type: "text", text },
|
|
46507
|
+
{
|
|
46508
|
+
topicId: parsed.topicId,
|
|
46509
|
+
priority: parsed.priority,
|
|
46510
|
+
metadata: {
|
|
46511
|
+
...parsed.metadata,
|
|
46512
|
+
...parsed.message_type ? { message_type: parsed.message_type } : {}
|
|
46513
|
+
}
|
|
46514
|
+
}
|
|
46515
|
+
);
|
|
46516
|
+
return {
|
|
46517
|
+
status: receipt.ok ? 200 : 500,
|
|
46518
|
+
body: {
|
|
46519
|
+
ok: receipt.ok,
|
|
46520
|
+
destination: receipt.destination,
|
|
46521
|
+
...receipt.error ? { error: receipt.error } : {}
|
|
46522
|
+
}
|
|
46523
|
+
};
|
|
46500
46524
|
} catch (err) {
|
|
46501
46525
|
return { status: 500, body: { ok: false, error: String(err) } };
|
|
46502
46526
|
}
|
|
@@ -46513,12 +46537,19 @@ async function handleActionRequest(parsed, channel2) {
|
|
|
46513
46537
|
detail: parsed.detail,
|
|
46514
46538
|
estimated_cost: parsed.estimated_cost
|
|
46515
46539
|
};
|
|
46516
|
-
|
|
46517
|
-
|
|
46518
|
-
|
|
46519
|
-
|
|
46520
|
-
|
|
46521
|
-
return {
|
|
46540
|
+
const target = parsed.room_id && typeof parsed.room_id === "string" ? { kind: "room", roomId: parsed.room_id } : { kind: "owner" };
|
|
46541
|
+
const receipt = await channel2.deliver(
|
|
46542
|
+
target,
|
|
46543
|
+
{ type: "action_confirmation", confirmation }
|
|
46544
|
+
);
|
|
46545
|
+
return {
|
|
46546
|
+
status: receipt.ok ? 200 : 500,
|
|
46547
|
+
body: {
|
|
46548
|
+
ok: receipt.ok,
|
|
46549
|
+
destination: receipt.destination,
|
|
46550
|
+
...receipt.error ? { error: receipt.error } : {}
|
|
46551
|
+
}
|
|
46552
|
+
};
|
|
46522
46553
|
} catch (err) {
|
|
46523
46554
|
return { status: 500, body: { ok: false, error: String(err) } };
|
|
46524
46555
|
}
|
|
@@ -46562,6 +46593,16 @@ function handleStatusRequest(channel2) {
|
|
|
46562
46593
|
}
|
|
46563
46594
|
};
|
|
46564
46595
|
}
|
|
46596
|
+
function handleTargetsRequest(channel2) {
|
|
46597
|
+
return {
|
|
46598
|
+
status: 200,
|
|
46599
|
+
body: {
|
|
46600
|
+
ok: true,
|
|
46601
|
+
targets: channel2.listTargets(),
|
|
46602
|
+
context: channel2.lastInboundRoomId ? { kind: "room", roomId: channel2.lastInboundRoomId } : { kind: "owner" }
|
|
46603
|
+
}
|
|
46604
|
+
};
|
|
46605
|
+
}
|
|
46565
46606
|
var init_http_handlers = __esm({
|
|
46566
46607
|
"src/http-handlers.ts"() {
|
|
46567
46608
|
"use strict";
|
|
@@ -47541,6 +47582,171 @@ var init_channel = __esm({
|
|
|
47541
47582
|
metadata
|
|
47542
47583
|
});
|
|
47543
47584
|
}
|
|
47585
|
+
// --- Unified Delivery Protocol ---
|
|
47586
|
+
/**
|
|
47587
|
+
* Canonical message dispatcher. ALL outbound messages should flow through this method.
|
|
47588
|
+
* Routes based on explicit target — never silently falls back to a room.
|
|
47589
|
+
*/
|
|
47590
|
+
async deliver(target, content, options) {
|
|
47591
|
+
const ts = (/* @__PURE__ */ new Date()).toISOString();
|
|
47592
|
+
if (this._state === "idle" || this._state === "error") {
|
|
47593
|
+
return {
|
|
47594
|
+
ok: false,
|
|
47595
|
+
destination: { kind: "owner" },
|
|
47596
|
+
error: `Channel is in ${this._state} state`,
|
|
47597
|
+
timestamp: ts
|
|
47598
|
+
};
|
|
47599
|
+
}
|
|
47600
|
+
let resolved;
|
|
47601
|
+
if (target.kind === "context") {
|
|
47602
|
+
if (this._lastInboundRoomId) {
|
|
47603
|
+
resolved = { kind: "room", id: this._lastInboundRoomId };
|
|
47604
|
+
console.log(`[deliver] target=context\u2192room:${this._lastInboundRoomId.slice(0, 8)}...`);
|
|
47605
|
+
} else {
|
|
47606
|
+
resolved = { kind: "owner" };
|
|
47607
|
+
console.log(`[deliver] target=context\u2192owner`);
|
|
47608
|
+
}
|
|
47609
|
+
} else if (target.kind === "owner") {
|
|
47610
|
+
resolved = { kind: "owner" };
|
|
47611
|
+
} else if (target.kind === "room") {
|
|
47612
|
+
if (!this._persisted?.rooms?.[target.roomId]) {
|
|
47613
|
+
const err = `Room ${target.roomId} not found`;
|
|
47614
|
+
console.log(`[deliver] target=room:${target.roomId.slice(0, 8)}... content=${content.type} result=FAIL: ${err}`);
|
|
47615
|
+
return { ok: false, destination: { kind: "room", id: target.roomId }, error: err, timestamp: ts };
|
|
47616
|
+
}
|
|
47617
|
+
resolved = { kind: "room", id: target.roomId };
|
|
47618
|
+
} else if (target.kind === "a2a") {
|
|
47619
|
+
const channelEntry = this._persisted?.a2aChannels ? Object.values(this._persisted.a2aChannels).find((ch) => ch.hubAddress === target.hubAddress) : void 0;
|
|
47620
|
+
if (!channelEntry) {
|
|
47621
|
+
const err = `No A2A channel found for hub address: ${target.hubAddress}`;
|
|
47622
|
+
console.log(`[deliver] target=a2a:${target.hubAddress} content=${content.type} result=FAIL: ${err}`);
|
|
47623
|
+
return { ok: false, destination: { kind: "a2a", id: target.hubAddress }, error: err, timestamp: ts };
|
|
47624
|
+
}
|
|
47625
|
+
resolved = { kind: "a2a", id: target.hubAddress };
|
|
47626
|
+
} else {
|
|
47627
|
+
return { ok: false, destination: { kind: "owner" }, error: "Unknown target kind", timestamp: ts };
|
|
47628
|
+
}
|
|
47629
|
+
try {
|
|
47630
|
+
let decisionId;
|
|
47631
|
+
if (content.type === "text") {
|
|
47632
|
+
if (resolved.kind === "room") {
|
|
47633
|
+
await this.sendToRoom(resolved.id, content.text, {
|
|
47634
|
+
messageType: options?.metadata?.message_type,
|
|
47635
|
+
priority: options?.priority,
|
|
47636
|
+
metadata: options?.metadata
|
|
47637
|
+
});
|
|
47638
|
+
} else if (resolved.kind === "a2a") {
|
|
47639
|
+
await this.sendToAgent(resolved.id, content.text, {
|
|
47640
|
+
parentSpanId: options?.parentSpanId
|
|
47641
|
+
});
|
|
47642
|
+
} else {
|
|
47643
|
+
await this.send(content.text, {
|
|
47644
|
+
conversationId: options?.conversationId,
|
|
47645
|
+
topicId: options?.topicId,
|
|
47646
|
+
messageType: options?.metadata?.message_type,
|
|
47647
|
+
priority: options?.priority,
|
|
47648
|
+
metadata: options?.metadata
|
|
47649
|
+
});
|
|
47650
|
+
}
|
|
47651
|
+
} else if (content.type === "decision_request") {
|
|
47652
|
+
if (resolved.kind !== "owner") {
|
|
47653
|
+
const err = "Decision requests can only be sent to owner";
|
|
47654
|
+
console.log(`[deliver] target=${resolved.kind}:${resolved.id} content=decision_request result=FAIL: ${err}`);
|
|
47655
|
+
return { ok: false, destination: resolved, error: err, timestamp: ts };
|
|
47656
|
+
}
|
|
47657
|
+
decisionId = await this.sendDecisionRequest(content.request);
|
|
47658
|
+
} else if (content.type === "status_alert") {
|
|
47659
|
+
if (resolved.kind === "room") {
|
|
47660
|
+
const envelope = {
|
|
47661
|
+
title: content.alert.title,
|
|
47662
|
+
message: content.alert.message,
|
|
47663
|
+
severity: content.alert.severity,
|
|
47664
|
+
timestamp: ts
|
|
47665
|
+
};
|
|
47666
|
+
if (content.alert.detail !== void 0) envelope.detail = content.alert.detail;
|
|
47667
|
+
if (content.alert.detailFormat !== void 0) envelope.detail_format = content.alert.detailFormat;
|
|
47668
|
+
if (content.alert.category !== void 0) envelope.category = content.alert.category;
|
|
47669
|
+
await this.sendToRoom(resolved.id, JSON.stringify(envelope), {
|
|
47670
|
+
messageType: "status_alert",
|
|
47671
|
+
priority: content.alert.severity === "error" || content.alert.severity === "critical" ? "high" : "normal",
|
|
47672
|
+
metadata: { severity: content.alert.severity }
|
|
47673
|
+
});
|
|
47674
|
+
} else if (resolved.kind === "owner") {
|
|
47675
|
+
await this.sendStatusAlert(content.alert);
|
|
47676
|
+
} else {
|
|
47677
|
+
return { ok: false, destination: resolved, error: "Status alerts cannot be sent to A2A targets", timestamp: ts };
|
|
47678
|
+
}
|
|
47679
|
+
} else if (content.type === "action_confirmation") {
|
|
47680
|
+
if (resolved.kind === "room") {
|
|
47681
|
+
await this.sendActionConfirmationToRoom(resolved.id, content.confirmation);
|
|
47682
|
+
} else if (resolved.kind === "owner") {
|
|
47683
|
+
await this.sendActionConfirmation(content.confirmation);
|
|
47684
|
+
} else {
|
|
47685
|
+
return { ok: false, destination: resolved, error: "Action confirmations cannot be sent to A2A targets", timestamp: ts };
|
|
47686
|
+
}
|
|
47687
|
+
} else if (content.type === "artifact") {
|
|
47688
|
+
if (resolved.kind !== "owner") {
|
|
47689
|
+
return { ok: false, destination: resolved, error: "Artifacts can only be sent to owner", timestamp: ts };
|
|
47690
|
+
}
|
|
47691
|
+
await this.sendArtifact(content.artifact);
|
|
47692
|
+
} else if (content.type === "attachment") {
|
|
47693
|
+
if (resolved.kind !== "owner") {
|
|
47694
|
+
return { ok: false, destination: resolved, error: "Attachments can only be sent to owner", timestamp: ts };
|
|
47695
|
+
}
|
|
47696
|
+
await this.sendWithAttachment(content.text, content.filePath, {
|
|
47697
|
+
topicId: options?.topicId
|
|
47698
|
+
});
|
|
47699
|
+
}
|
|
47700
|
+
const targetLabel = resolved.kind === "owner" ? "owner" : `${resolved.kind}:${resolved.id?.slice(0, 8)}...`;
|
|
47701
|
+
console.log(`[deliver] target=${targetLabel} content=${content.type} result=ok`);
|
|
47702
|
+
return {
|
|
47703
|
+
ok: true,
|
|
47704
|
+
destination: resolved,
|
|
47705
|
+
queued: this._state !== "ready",
|
|
47706
|
+
decisionId,
|
|
47707
|
+
timestamp: ts
|
|
47708
|
+
};
|
|
47709
|
+
} catch (err) {
|
|
47710
|
+
const targetLabel = resolved.kind === "owner" ? "owner" : `${resolved.kind}:${resolved.id?.slice(0, 8)}...`;
|
|
47711
|
+
const errMsg = err instanceof Error ? err.message : String(err);
|
|
47712
|
+
console.log(`[deliver] target=${targetLabel} content=${content.type} result=FAIL: ${errMsg}`);
|
|
47713
|
+
return { ok: false, destination: resolved, error: errMsg, timestamp: ts };
|
|
47714
|
+
}
|
|
47715
|
+
}
|
|
47716
|
+
/**
|
|
47717
|
+
* Returns all available delivery destinations with availability status.
|
|
47718
|
+
*/
|
|
47719
|
+
listTargets() {
|
|
47720
|
+
const targets = [
|
|
47721
|
+
{
|
|
47722
|
+
kind: "owner",
|
|
47723
|
+
id: "owner",
|
|
47724
|
+
label: "Owner (direct)",
|
|
47725
|
+
available: this._state === "ready" && this._sessions.size > 0
|
|
47726
|
+
}
|
|
47727
|
+
];
|
|
47728
|
+
if (this._persisted?.rooms) {
|
|
47729
|
+
for (const room of Object.values(this._persisted.rooms)) {
|
|
47730
|
+
targets.push({
|
|
47731
|
+
kind: "room",
|
|
47732
|
+
id: room.roomId,
|
|
47733
|
+
label: room.name || `Room ${room.roomId.slice(0, 8)}`,
|
|
47734
|
+
available: this._state === "ready" && room.conversationIds.length > 0
|
|
47735
|
+
});
|
|
47736
|
+
}
|
|
47737
|
+
}
|
|
47738
|
+
if (this._persisted?.a2aChannels) {
|
|
47739
|
+
for (const ch of Object.values(this._persisted.a2aChannels)) {
|
|
47740
|
+
targets.push({
|
|
47741
|
+
kind: "a2a",
|
|
47742
|
+
id: ch.hubAddress,
|
|
47743
|
+
label: `A2A: ${ch.hubAddress}`,
|
|
47744
|
+
available: this._state === "ready" && !!ch.session?.ratchetState
|
|
47745
|
+
});
|
|
47746
|
+
}
|
|
47747
|
+
}
|
|
47748
|
+
return targets;
|
|
47749
|
+
}
|
|
47544
47750
|
_sendHeartbeat() {
|
|
47545
47751
|
if (this._state !== "ready" || !this._heartbeatCallback) return;
|
|
47546
47752
|
const status = this._heartbeatCallback();
|
|
@@ -47659,9 +47865,13 @@ var init_channel = __esm({
|
|
|
47659
47865
|
const result = handlers.handleStatusRequest(this);
|
|
47660
47866
|
res.writeHead(result.status, { "Content-Type": "application/json" });
|
|
47661
47867
|
res.end(JSON.stringify(result.body));
|
|
47868
|
+
} else if (req.method === "GET" && req.url === "/targets") {
|
|
47869
|
+
const result = handlers.handleTargetsRequest(this);
|
|
47870
|
+
res.writeHead(result.status, { "Content-Type": "application/json" });
|
|
47871
|
+
res.end(JSON.stringify(result.body));
|
|
47662
47872
|
} else {
|
|
47663
47873
|
res.writeHead(404, { "Content-Type": "application/json" });
|
|
47664
|
-
res.end(JSON.stringify({ ok: false, error: "Not found. Use POST /send, POST /decision, POST /action, or GET /
|
|
47874
|
+
res.end(JSON.stringify({ ok: false, error: "Not found. Use POST /send, POST /decision, POST /action, GET /status, or GET /targets" }));
|
|
47665
47875
|
}
|
|
47666
47876
|
});
|
|
47667
47877
|
this._httpServer.listen(port, "127.0.0.1", () => {
|
|
@@ -50001,6 +50211,13 @@ var init_cp = __esm({
|
|
|
50001
50211
|
}
|
|
50002
50212
|
});
|
|
50003
50213
|
|
|
50214
|
+
// src/types.ts
|
|
50215
|
+
var init_types = __esm({
|
|
50216
|
+
"src/types.ts"() {
|
|
50217
|
+
"use strict";
|
|
50218
|
+
}
|
|
50219
|
+
});
|
|
50220
|
+
|
|
50004
50221
|
// src/account-config.ts
|
|
50005
50222
|
var init_account_config = __esm({
|
|
50006
50223
|
"src/account-config.ts"() {
|
|
@@ -50022,8 +50239,11 @@ var init_openclaw_plugin = __esm({
|
|
|
50022
50239
|
var gateway_send_exports = {};
|
|
50023
50240
|
__export(gateway_send_exports, {
|
|
50024
50241
|
checkGateway: () => checkGateway,
|
|
50242
|
+
listTargets: () => listTargets,
|
|
50025
50243
|
sendDecisionToOwner: () => sendDecisionToOwner,
|
|
50026
|
-
sendToOwner: () => sendToOwner
|
|
50244
|
+
sendToOwner: () => sendToOwner,
|
|
50245
|
+
sendToRoom: () => sendToRoom,
|
|
50246
|
+
sendToTarget: () => sendToTarget
|
|
50027
50247
|
});
|
|
50028
50248
|
function resolveBaseUrl(options) {
|
|
50029
50249
|
const host = options?.host ?? "127.0.0.1";
|
|
@@ -50091,6 +50311,88 @@ async function sendDecisionToOwner(request, options) {
|
|
|
50091
50311
|
return { ok: false, error: friendlyError(err) };
|
|
50092
50312
|
}
|
|
50093
50313
|
}
|
|
50314
|
+
async function sendToRoom(roomId, text, options) {
|
|
50315
|
+
if (typeof text !== "string" || text.trim().length === 0) {
|
|
50316
|
+
return { ok: false, error: "Message text must be a non-empty string" };
|
|
50317
|
+
}
|
|
50318
|
+
if (!roomId) {
|
|
50319
|
+
return { ok: false, error: "Room ID is required" };
|
|
50320
|
+
}
|
|
50321
|
+
requestHeartbeatNow({ reason: "proactive-room-send" }).catch(() => {
|
|
50322
|
+
});
|
|
50323
|
+
try {
|
|
50324
|
+
const base = resolveBaseUrl(options);
|
|
50325
|
+
const sendPath = process.env.OPENCLAW_GATEWAY_URL ? "/agentvault/send" : "/send";
|
|
50326
|
+
const res = await fetch(`${base}${sendPath}`, {
|
|
50327
|
+
method: "POST",
|
|
50328
|
+
headers: { "Content-Type": "application/json" },
|
|
50329
|
+
body: JSON.stringify({ text, room_id: roomId }),
|
|
50330
|
+
signal: options?.signal
|
|
50331
|
+
});
|
|
50332
|
+
if (!res.ok) {
|
|
50333
|
+
const body = await res.text().catch(() => "");
|
|
50334
|
+
return { ok: false, error: `HTTP ${res.status}${body ? `: ${body}` : ""}` };
|
|
50335
|
+
}
|
|
50336
|
+
const data = await res.json();
|
|
50337
|
+
return { ok: data.ok ?? true };
|
|
50338
|
+
} catch (err) {
|
|
50339
|
+
return { ok: false, error: friendlyError(err) };
|
|
50340
|
+
}
|
|
50341
|
+
}
|
|
50342
|
+
async function sendToTarget(target, text, options) {
|
|
50343
|
+
if (typeof text !== "string" || text.trim().length === 0) {
|
|
50344
|
+
return { ok: false, error: "Message text must be a non-empty string" };
|
|
50345
|
+
}
|
|
50346
|
+
requestHeartbeatNow({ reason: "proactive-target-send" }).catch(() => {
|
|
50347
|
+
});
|
|
50348
|
+
try {
|
|
50349
|
+
const base = resolveBaseUrl(options);
|
|
50350
|
+
const sendPath = process.env.OPENCLAW_GATEWAY_URL ? "/agentvault/send" : "/send";
|
|
50351
|
+
const body = { text };
|
|
50352
|
+
if (target.startsWith("room:")) {
|
|
50353
|
+
body.room_id = target.slice(5);
|
|
50354
|
+
} else if (target.startsWith("a2a:")) {
|
|
50355
|
+
body.hub_address = target.slice(4);
|
|
50356
|
+
} else if (target === "context") {
|
|
50357
|
+
body.target = "context";
|
|
50358
|
+
}
|
|
50359
|
+
const res = await fetch(`${base}${sendPath}`, {
|
|
50360
|
+
method: "POST",
|
|
50361
|
+
headers: { "Content-Type": "application/json" },
|
|
50362
|
+
body: JSON.stringify(body),
|
|
50363
|
+
signal: options?.signal
|
|
50364
|
+
});
|
|
50365
|
+
if (!res.ok) {
|
|
50366
|
+
const respBody = await res.text().catch(() => "");
|
|
50367
|
+
return { ok: false, error: `HTTP ${res.status}${respBody ? `: ${respBody}` : ""}` };
|
|
50368
|
+
}
|
|
50369
|
+
const data = await res.json();
|
|
50370
|
+
return {
|
|
50371
|
+
ok: data.ok ?? true,
|
|
50372
|
+
destination: data.destination
|
|
50373
|
+
};
|
|
50374
|
+
} catch (err) {
|
|
50375
|
+
return { ok: false, error: friendlyError(err) };
|
|
50376
|
+
}
|
|
50377
|
+
}
|
|
50378
|
+
async function listTargets(options) {
|
|
50379
|
+
try {
|
|
50380
|
+
const base = resolveBaseUrl(options);
|
|
50381
|
+
const targetsPath = process.env.OPENCLAW_GATEWAY_URL ? "/agentvault/targets" : "/targets";
|
|
50382
|
+
const res = await fetch(`${base}${targetsPath}`, { signal: options?.signal });
|
|
50383
|
+
if (!res.ok) {
|
|
50384
|
+
return { ok: false, error: `HTTP ${res.status}` };
|
|
50385
|
+
}
|
|
50386
|
+
const data = await res.json();
|
|
50387
|
+
return {
|
|
50388
|
+
ok: true,
|
|
50389
|
+
targets: data.targets,
|
|
50390
|
+
context: data.context
|
|
50391
|
+
};
|
|
50392
|
+
} catch (err) {
|
|
50393
|
+
return { ok: false, error: friendlyError(err) };
|
|
50394
|
+
}
|
|
50395
|
+
}
|
|
50094
50396
|
async function checkGateway(options) {
|
|
50095
50397
|
try {
|
|
50096
50398
|
const base = resolveBaseUrl(options);
|
|
@@ -50135,6 +50437,7 @@ var init_openclaw_entry = __esm({
|
|
|
50135
50437
|
init_fetch_interceptor();
|
|
50136
50438
|
init_http_handlers();
|
|
50137
50439
|
init_openclaw_compat();
|
|
50440
|
+
init_types();
|
|
50138
50441
|
}
|
|
50139
50442
|
});
|
|
50140
50443
|
|
|
@@ -50816,7 +51119,7 @@ function createZodEnum(values, params) {
|
|
|
50816
51119
|
});
|
|
50817
51120
|
}
|
|
50818
51121
|
var ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType;
|
|
50819
|
-
var
|
|
51122
|
+
var init_types2 = __esm({
|
|
50820
51123
|
"../../node_modules/zod/v3/types.js"() {
|
|
50821
51124
|
init_ZodError();
|
|
50822
51125
|
init_errors();
|
|
@@ -54068,7 +54371,7 @@ var init_external = __esm({
|
|
|
54068
54371
|
init_parseUtil();
|
|
54069
54372
|
init_typeAliases();
|
|
54070
54373
|
init_util();
|
|
54071
|
-
|
|
54374
|
+
init_types2();
|
|
54072
54375
|
init_ZodError();
|
|
54073
54376
|
}
|
|
54074
54377
|
});
|
|
@@ -61568,7 +61871,7 @@ var init_v4 = __esm({
|
|
|
61568
61871
|
|
|
61569
61872
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
61570
61873
|
var RELATED_TASK_META_KEY, JSONRPC_VERSION, AssertObjectSchema, ProgressTokenSchema, CursorSchema, TaskCreationParamsSchema, TaskMetadataSchema, RelatedTaskMetadataSchema, RequestMetaSchema, BaseRequestParamsSchema, TaskAugmentedRequestParamsSchema, RequestSchema, NotificationsParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResultResponseSchema, ErrorCode, JSONRPCErrorResponseSchema, JSONRPCMessageSchema, JSONRPCResponseSchema, EmptyResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, FormElicitationCapabilitySchema, ElicitationCapabilitySchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema, ClientCapabilitiesSchema, InitializeRequestParamsSchema, InitializeRequestSchema, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, TaskStatusSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, RoleSchema, AnnotationsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ResourceRequestParamsSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, ToolUseContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolExecutionSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestParamsSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, ListChangedOptionsBaseSchema, LoggingLevelSchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, ToolChoiceSchema, ToolResultContentSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema;
|
|
61571
|
-
var
|
|
61874
|
+
var init_types3 = __esm({
|
|
61572
61875
|
"../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js"() {
|
|
61573
61876
|
init_v4();
|
|
61574
61877
|
RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
@@ -63410,7 +63713,7 @@ var init_zod_json_schema_compat = __esm({
|
|
|
63410
63713
|
var init_protocol = __esm({
|
|
63411
63714
|
"../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js"() {
|
|
63412
63715
|
init_zod_compat();
|
|
63413
|
-
|
|
63716
|
+
init_types3();
|
|
63414
63717
|
init_interfaces();
|
|
63415
63718
|
init_zod_json_schema_compat();
|
|
63416
63719
|
}
|
|
@@ -70209,7 +70512,7 @@ var init_helpers = __esm({
|
|
|
70209
70512
|
var init_server2 = __esm({
|
|
70210
70513
|
"../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js"() {
|
|
70211
70514
|
init_protocol();
|
|
70212
|
-
|
|
70515
|
+
init_types3();
|
|
70213
70516
|
init_ajv_provider();
|
|
70214
70517
|
init_zod_compat();
|
|
70215
70518
|
init_server();
|
|
@@ -70251,7 +70554,7 @@ var init_mcp = __esm({
|
|
|
70251
70554
|
init_server2();
|
|
70252
70555
|
init_zod_compat();
|
|
70253
70556
|
init_zod_json_schema_compat();
|
|
70254
|
-
|
|
70557
|
+
init_types3();
|
|
70255
70558
|
init_completable();
|
|
70256
70559
|
init_uriTemplate();
|
|
70257
70560
|
init_toolNameValidation();
|
|
@@ -70473,7 +70776,7 @@ var init_dist2 = __esm({
|
|
|
70473
70776
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
|
|
70474
70777
|
var init_webStandardStreamableHttp = __esm({
|
|
70475
70778
|
"../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js"() {
|
|
70476
|
-
|
|
70779
|
+
init_types3();
|
|
70477
70780
|
}
|
|
70478
70781
|
});
|
|
70479
70782
|
|
|
@@ -70633,6 +70936,7 @@ var init_index = __esm({
|
|
|
70633
70936
|
async "src/index.ts"() {
|
|
70634
70937
|
"use strict";
|
|
70635
70938
|
await init_channel();
|
|
70939
|
+
init_types();
|
|
70636
70940
|
init_account_config();
|
|
70637
70941
|
await init_openclaw_plugin();
|
|
70638
70942
|
init_gateway_send();
|