@agentvault/agentvault 0.17.4 → 0.17.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/cli.js +19 -21
- package/dist/cli.js.map +4 -4
- package/dist/index.js +52 -54
- package/dist/index.js.map +4 -4
- package/dist/openclaw-entry.js +396 -16184
- package/dist/openclaw-entry.js.map +4 -4
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/dist/_cp.d.ts +0 -10
- package/dist/_cp.d.ts.map +0 -1
- package/dist/account-config.d.ts +0 -20
- package/dist/account-config.d.ts.map +0 -1
- package/dist/channel.d.ts +0 -358
- package/dist/channel.d.ts.map +0 -1
- package/dist/cli.d.ts +0 -2
- package/dist/cli.d.ts.map +0 -1
- package/dist/create-agent.d.ts +0 -28
- package/dist/create-agent.d.ts.map +0 -1
- package/dist/crypto-helpers.d.ts +0 -2
- package/dist/crypto-helpers.d.ts.map +0 -1
- package/dist/doctor.d.ts +0 -41
- package/dist/doctor.d.ts.map +0 -1
- package/dist/fetch-interceptor.d.ts +0 -32
- package/dist/fetch-interceptor.d.ts.map +0 -1
- package/dist/gateway-send.d.ts +0 -98
- package/dist/gateway-send.d.ts.map +0 -1
- package/dist/http-handlers.d.ts +0 -49
- package/dist/http-handlers.d.ts.map +0 -1
- package/dist/index.d.ts +0 -25
- package/dist/index.d.ts.map +0 -1
- package/dist/mcp-handlers.d.ts +0 -26
- package/dist/mcp-handlers.d.ts.map +0 -1
- package/dist/mcp-proxy-helpers.d.ts +0 -9
- package/dist/mcp-proxy-helpers.d.ts.map +0 -1
- package/dist/mcp-server.d.ts +0 -90
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/openclaw-compat.d.ts +0 -33
- package/dist/openclaw-compat.d.ts.map +0 -1
- package/dist/openclaw-entry.d.ts +0 -27
- package/dist/openclaw-entry.d.ts.map +0 -1
- package/dist/openclaw-plugin.d.ts +0 -102
- package/dist/openclaw-plugin.d.ts.map +0 -1
- package/dist/openclaw-types.d.ts +0 -155
- package/dist/openclaw-types.d.ts.map +0 -1
- package/dist/policy-enforcer.d.ts +0 -78
- package/dist/policy-enforcer.d.ts.map +0 -1
- package/dist/setup.d.ts +0 -27
- package/dist/setup.d.ts.map +0 -1
- package/dist/skill-invoker.d.ts +0 -30
- package/dist/skill-invoker.d.ts.map +0 -1
- package/dist/skill-manifest.d.ts +0 -25
- package/dist/skill-manifest.d.ts.map +0 -1
- package/dist/skill-telemetry.d.ts +0 -36
- package/dist/skill-telemetry.d.ts.map +0 -1
- package/dist/skills-publish.d.ts +0 -8
- package/dist/skills-publish.d.ts.map +0 -1
- package/dist/state.d.ts +0 -32
- package/dist/state.d.ts.map +0 -1
- package/dist/transport.d.ts +0 -24
- package/dist/transport.d.ts.map +0 -1
- package/dist/types.d.ts +0 -379
- package/dist/types.d.ts.map +0 -1
- package/dist/workspace-handlers.d.ts +0 -62
- package/dist/workspace-handlers.d.ts.map +0 -1
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/dist/_cp.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lazy shell wrapper for CLI-only commands (setup, doctor, create).
|
|
3
|
-
*
|
|
4
|
-
* Loads the underlying module lazily at first call so the OpenClaw
|
|
5
|
-
* plugin entry point never references it. Type declarations use
|
|
6
|
-
* generic signatures to keep the .d.ts clean for the scanner too.
|
|
7
|
-
*/
|
|
8
|
-
export declare function execSync(command: string, options?: any): any;
|
|
9
|
-
export declare function spawnSync(command: string, args?: string[], options?: any): any;
|
|
10
|
-
//# sourceMappingURL=_cp.d.ts.map
|
package/dist/_cp.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_cp.d.ts","sourceRoot":"","sources":["../src/_cp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,CAE5D;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,CAE9E"}
|
package/dist/account-config.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared multi-account config resolution for AgentVault OpenClaw plugin.
|
|
3
|
-
*
|
|
4
|
-
* Supports two config shapes:
|
|
5
|
-
* 1. Legacy single-agent: channels.agentvault.dataDir (returns ["default"])
|
|
6
|
-
* 2. Multi-agent: channels.agentvault.accounts.{id}.dataDir (returns account keys)
|
|
7
|
-
*
|
|
8
|
-
* When `accounts` key is present, it takes precedence over top-level dataDir.
|
|
9
|
-
*/
|
|
10
|
-
export interface ResolvedAccount {
|
|
11
|
-
accountId: string;
|
|
12
|
-
dataDir: string;
|
|
13
|
-
apiUrl: string;
|
|
14
|
-
agentName: string;
|
|
15
|
-
httpPort: number;
|
|
16
|
-
configured: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare function listAccountIds(cfg: any): string[];
|
|
19
|
-
export declare function resolveAccount(cfg: any, accountId?: string): ResolvedAccount;
|
|
20
|
-
//# sourceMappingURL=account-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-config.d.ts","sourceRoot":"","sources":["../src/account-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,CAOjD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,CA0C5E"}
|
package/dist/channel.d.ts
DELETED
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from "node:events";
|
|
2
|
-
import { TelemetryReporter } from "@agentvault/crypto";
|
|
3
|
-
import type { SecureChannelConfig, ChannelState, SendOptions, DecisionRequest, DecisionResponse, HeartbeatStatus, StatusAlert, RoomMemberInfo, RoomConversationInfo, RoomInfo, A2AChannel, DeliveryTarget, DeliveryContent, DeliveryOptions, DeliveryReceipt, TargetInfo } from "./types.js";
|
|
4
|
-
export declare class SecureChannel extends EventEmitter {
|
|
5
|
-
private config;
|
|
6
|
-
private _state;
|
|
7
|
-
private _deviceId;
|
|
8
|
-
private _fingerprint;
|
|
9
|
-
private _primaryConversationId;
|
|
10
|
-
private _deviceJwt;
|
|
11
|
-
private _sessions;
|
|
12
|
-
private _ws;
|
|
13
|
-
private _pollTimer;
|
|
14
|
-
private _reconnectAttempt;
|
|
15
|
-
private _reconnectTimer;
|
|
16
|
-
private _rapidDisconnects;
|
|
17
|
-
private _lastWsOpenTime;
|
|
18
|
-
private _pingTimer;
|
|
19
|
-
private _lastServerMessage;
|
|
20
|
-
private _pendingAcks;
|
|
21
|
-
private _ackTimer;
|
|
22
|
-
private _stopped;
|
|
23
|
-
private _persisted;
|
|
24
|
-
private _httpServer;
|
|
25
|
-
private _mcpServer;
|
|
26
|
-
private _pollFallbackTimer;
|
|
27
|
-
private _heartbeatTimer;
|
|
28
|
-
private _heartbeatCallback;
|
|
29
|
-
private _heartbeatIntervalSeconds;
|
|
30
|
-
private _wakeDetectorTimer;
|
|
31
|
-
private _lastWakeTick;
|
|
32
|
-
private _pendingPollTimer;
|
|
33
|
-
private _syncMessageIds;
|
|
34
|
-
/** Sender Key chains — own chain per room for O(1) encryption */
|
|
35
|
-
private _senderKeyChains;
|
|
36
|
-
/** Sender Key peer state — peer chains per room for decryption */
|
|
37
|
-
private _senderKeyStates;
|
|
38
|
-
/** Queued A2A messages for responder channels not yet activated (no first initiator message received). */
|
|
39
|
-
private _a2aPendingQueue;
|
|
40
|
-
/** Dedup buffer for A2A message IDs (prevents double-delivery via direct + Redis) */
|
|
41
|
-
private _a2aSeenMessageIds;
|
|
42
|
-
private static readonly A2A_SEEN_MAX;
|
|
43
|
-
private _scanEngine;
|
|
44
|
-
private _scanRuleSetVersion;
|
|
45
|
-
private _telemetryReporter;
|
|
46
|
-
/** Topic ID from the most recent inbound message — used as fallback for replies. */
|
|
47
|
-
private _lastIncomingTopicId;
|
|
48
|
-
/** Room ID from the most recent inbound room message — used as fallback for HTTP /send replies. */
|
|
49
|
-
private _lastInboundRoomId;
|
|
50
|
-
/** Rate-limit: last resync_request timestamp per conversation (5-min cooldown). */
|
|
51
|
-
private _lastResyncRequest;
|
|
52
|
-
/** Debounce timer for server backup uploads (60s). */
|
|
53
|
-
private _serverBackupTimer;
|
|
54
|
-
private _serverBackupRunning;
|
|
55
|
-
private static readonly PING_INTERVAL_MS;
|
|
56
|
-
private static readonly SILENCE_TIMEOUT_MS;
|
|
57
|
-
private static readonly POLL_FALLBACK_INTERVAL_MS;
|
|
58
|
-
private static readonly POLL_FALLBACK_IDLE_MS;
|
|
59
|
-
constructor(config: SecureChannelConfig);
|
|
60
|
-
get state(): ChannelState;
|
|
61
|
-
get deviceId(): string | null;
|
|
62
|
-
get fingerprint(): string | null;
|
|
63
|
-
/** Returns the primary conversation ID (backward-compatible). */
|
|
64
|
-
get conversationId(): string | null;
|
|
65
|
-
/** Returns all active conversation IDs. */
|
|
66
|
-
get conversationIds(): string[];
|
|
67
|
-
/** Returns the number of active sessions. */
|
|
68
|
-
get sessionCount(): number;
|
|
69
|
-
/** Room ID from the most recent inbound room message (for HTTP /send fallback). */
|
|
70
|
-
get lastInboundRoomId(): string | undefined;
|
|
71
|
-
/** Returns all persisted room IDs and names (for outbound target registration). */
|
|
72
|
-
get roomIds(): Array<{
|
|
73
|
-
roomId: string;
|
|
74
|
-
name: string;
|
|
75
|
-
}>;
|
|
76
|
-
/** Returns hub addresses of all persisted A2A peer channels. */
|
|
77
|
-
get a2aPeerAddresses(): string[];
|
|
78
|
-
/** Resolves an A2A channel ID to the peer's hub address, or null if not found. */
|
|
79
|
-
resolveA2AChannelHub(channelId: string): string | null;
|
|
80
|
-
/** Returns the TelemetryReporter instance (available after WebSocket connect). */
|
|
81
|
-
get telemetry(): TelemetryReporter | null;
|
|
82
|
-
/**
|
|
83
|
-
* Check if a skill is in shadow mode. Returns the shadow config if active, undefined otherwise.
|
|
84
|
-
*/
|
|
85
|
-
getShadowConfig(skillName: string): {
|
|
86
|
-
sessionId: string;
|
|
87
|
-
autonomyLevel: string;
|
|
88
|
-
decisionClass: string;
|
|
89
|
-
} | undefined;
|
|
90
|
-
start(): Promise<void>;
|
|
91
|
-
/**
|
|
92
|
-
* Fetch scan rules from the server and load them into the ScanEngine.
|
|
93
|
-
*/
|
|
94
|
-
private _fetchScanRules;
|
|
95
|
-
/**
|
|
96
|
-
* Append a message to persistent history for cross-device replay.
|
|
97
|
-
*/
|
|
98
|
-
private _appendHistory;
|
|
99
|
-
/**
|
|
100
|
-
* Encrypt and send a message to ALL owner devices (fanout).
|
|
101
|
-
* Each session gets the same plaintext encrypted independently.
|
|
102
|
-
*/
|
|
103
|
-
send(plaintext: string, options?: SendOptions): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Send a typing indicator to all owner devices.
|
|
106
|
-
* Ephemeral (unencrypted metadata), no ratchet advancement.
|
|
107
|
-
*/
|
|
108
|
-
sendTyping(): void;
|
|
109
|
-
/**
|
|
110
|
-
* Send an activity span to all owner devices via WS.
|
|
111
|
-
* Ephemeral (unencrypted metadata, like typing), no ratchet advancement.
|
|
112
|
-
*/
|
|
113
|
-
sendActivitySpan(spanData: Record<string, unknown>): void;
|
|
114
|
-
/**
|
|
115
|
-
* Send a decision request to the owner.
|
|
116
|
-
* Builds a structured envelope with decision metadata and sends it
|
|
117
|
-
* as a high-priority message. Returns the generated decision_id.
|
|
118
|
-
*/
|
|
119
|
-
sendDecisionRequest(request: DecisionRequest): Promise<string>;
|
|
120
|
-
/**
|
|
121
|
-
* Wait for a decision response matching the given decisionId.
|
|
122
|
-
* Listens on the "message" event for messages where
|
|
123
|
-
* metadata.messageType === "decision_response" and the parsed plaintext
|
|
124
|
-
* contains a matching decision.decision_id.
|
|
125
|
-
* Optional timeout rejects with an Error.
|
|
126
|
-
*/
|
|
127
|
-
waitForDecision(decisionId: string, timeoutMs?: number): Promise<DecisionResponse>;
|
|
128
|
-
/**
|
|
129
|
-
* Join a room by performing X3DH key exchange with each member
|
|
130
|
-
* for the pairwise conversations involving this device.
|
|
131
|
-
*/
|
|
132
|
-
joinRoom(roomData: {
|
|
133
|
-
roomId: string;
|
|
134
|
-
name: string;
|
|
135
|
-
members: RoomMemberInfo[];
|
|
136
|
-
conversations: RoomConversationInfo[];
|
|
137
|
-
forceRekey?: boolean;
|
|
138
|
-
}): Promise<void>;
|
|
139
|
-
/**
|
|
140
|
-
* Send an encrypted message to all members of a room.
|
|
141
|
-
* Uses Sender Key (O(1)) if available, otherwise pairwise fan-out.
|
|
142
|
-
*/
|
|
143
|
-
sendToRoom(roomId: string, plaintext: string, opts?: {
|
|
144
|
-
messageType?: string;
|
|
145
|
-
priority?: string;
|
|
146
|
-
metadata?: Record<string, unknown>;
|
|
147
|
-
}): Promise<void>;
|
|
148
|
-
/**
|
|
149
|
-
* Leave a room: remove sessions and persisted room state.
|
|
150
|
-
*/
|
|
151
|
-
leaveRoom(roomId: string): Promise<void>;
|
|
152
|
-
/**
|
|
153
|
-
* Return info for all joined rooms.
|
|
154
|
-
*/
|
|
155
|
-
getRooms(): RoomInfo[];
|
|
156
|
-
startHeartbeat(intervalSeconds: number, statusCallback: () => HeartbeatStatus): void;
|
|
157
|
-
stopHeartbeat(): Promise<void>;
|
|
158
|
-
sendStatusAlert(alert: StatusAlert): Promise<void>;
|
|
159
|
-
sendArtifact(artifact: {
|
|
160
|
-
filePath: string;
|
|
161
|
-
filename: string;
|
|
162
|
-
mimeType: string;
|
|
163
|
-
description?: string;
|
|
164
|
-
}): Promise<void>;
|
|
165
|
-
sendActionConfirmation(confirmation: {
|
|
166
|
-
action: string;
|
|
167
|
-
status: "completed" | "failed" | "partial";
|
|
168
|
-
decisionId?: string;
|
|
169
|
-
detail?: string;
|
|
170
|
-
}): Promise<void>;
|
|
171
|
-
sendActionConfirmationToRoom(roomId: string, confirmation: {
|
|
172
|
-
action: string;
|
|
173
|
-
status: "completed" | "failed" | "partial";
|
|
174
|
-
decisionId?: string;
|
|
175
|
-
detail?: string;
|
|
176
|
-
estimated_cost?: number;
|
|
177
|
-
}): Promise<void>;
|
|
178
|
-
/**
|
|
179
|
-
* Canonical message dispatcher. ALL outbound messages should flow through this method.
|
|
180
|
-
* Routes based on explicit target — never silently falls back to a room.
|
|
181
|
-
*/
|
|
182
|
-
deliver(target: DeliveryTarget, content: DeliveryContent, options?: DeliveryOptions): Promise<DeliveryReceipt>;
|
|
183
|
-
/**
|
|
184
|
-
* Returns all available delivery destinations with availability status.
|
|
185
|
-
*/
|
|
186
|
-
listTargets(): TargetInfo[];
|
|
187
|
-
private _sendHeartbeat;
|
|
188
|
-
stop(): Promise<void>;
|
|
189
|
-
startHttpServer(port: number): void;
|
|
190
|
-
private _stopHttpServer;
|
|
191
|
-
/**
|
|
192
|
-
* Attach an MCP server instance to this channel.
|
|
193
|
-
* The MCP server will be served at /mcp on the local HTTP server.
|
|
194
|
-
*/
|
|
195
|
-
setMcpServer(mcpServer: import("./mcp-server.js").AgentVaultMcpServer): void;
|
|
196
|
-
/** The attached MCP server, if any. */
|
|
197
|
-
get mcpServer(): import("./mcp-server.js").AgentVaultMcpServer | null;
|
|
198
|
-
/**
|
|
199
|
-
* Create a new topic within the conversation group.
|
|
200
|
-
* Requires the channel to be initialized with a groupId (from activation).
|
|
201
|
-
*/
|
|
202
|
-
createTopic(name: string): Promise<{
|
|
203
|
-
id: string;
|
|
204
|
-
name: string;
|
|
205
|
-
isDefault: boolean;
|
|
206
|
-
}>;
|
|
207
|
-
/**
|
|
208
|
-
* List all topics in the conversation group.
|
|
209
|
-
* Requires the channel to be initialized with a groupId (from activation).
|
|
210
|
-
*/
|
|
211
|
-
listTopics(): Promise<Array<{
|
|
212
|
-
id: string;
|
|
213
|
-
name: string;
|
|
214
|
-
isDefault: boolean;
|
|
215
|
-
}>>;
|
|
216
|
-
/**
|
|
217
|
-
* Request a new A2A channel with another agent by their hub address.
|
|
218
|
-
* Returns the channel_id from the server response.
|
|
219
|
-
*/
|
|
220
|
-
requestA2AChannel(responderHubAddress: string): Promise<string>;
|
|
221
|
-
/**
|
|
222
|
-
* Send a message to another agent via an active A2A channel.
|
|
223
|
-
* Looks up the A2A conversation by hub address and sends via WS.
|
|
224
|
-
*
|
|
225
|
-
* If the channel has an established E2E session, the message is encrypted
|
|
226
|
-
* with the Double Ratchet. If the responder hasn't received the initiator's
|
|
227
|
-
* first message yet (ratchet not activated), the message is queued locally
|
|
228
|
-
* and flushed when the first inbound message arrives.
|
|
229
|
-
*
|
|
230
|
-
* Falls back to plaintext for channels without a session (legacy/pre-encryption).
|
|
231
|
-
*/
|
|
232
|
-
sendToAgent(hubAddress: string, text: string, opts?: {
|
|
233
|
-
parentSpanId?: string;
|
|
234
|
-
}): Promise<void>;
|
|
235
|
-
/**
|
|
236
|
-
* List all A2A channels for this agent.
|
|
237
|
-
* Fetches from the server and updates local persisted state.
|
|
238
|
-
*/
|
|
239
|
-
listA2AChannels(): Promise<A2AChannel[]>;
|
|
240
|
-
private _enroll;
|
|
241
|
-
private _poll;
|
|
242
|
-
private _activate;
|
|
243
|
-
private _connect;
|
|
244
|
-
/**
|
|
245
|
-
* Handle an incoming encrypted message from a specific conversation.
|
|
246
|
-
* Decrypts using the appropriate session ratchet, emits to the agent,
|
|
247
|
-
* and relays as sync messages to sibling sessions.
|
|
248
|
-
*/
|
|
249
|
-
private _handleIncomingMessage;
|
|
250
|
-
/**
|
|
251
|
-
* Download an encrypted attachment blob, decrypt it, verify integrity,
|
|
252
|
-
* and save the plaintext file to disk.
|
|
253
|
-
*/
|
|
254
|
-
private _downloadAndDecryptAttachment;
|
|
255
|
-
/**
|
|
256
|
-
* Upload an attachment file: encrypt, upload to server, return metadata
|
|
257
|
-
* for inclusion in the message envelope.
|
|
258
|
-
*/
|
|
259
|
-
private _uploadAttachment;
|
|
260
|
-
/**
|
|
261
|
-
* Send a message with an attached file. Encrypts the file, uploads it,
|
|
262
|
-
* then sends the envelope with attachment metadata via Double Ratchet.
|
|
263
|
-
*/
|
|
264
|
-
sendWithAttachment(plaintext: string, filePath: string, options?: {
|
|
265
|
-
topicId?: string;
|
|
266
|
-
}): Promise<void>;
|
|
267
|
-
/**
|
|
268
|
-
* Relay an owner's message to all sibling sessions as encrypted sync messages.
|
|
269
|
-
* This allows all owner devices to see messages from any single device.
|
|
270
|
-
*/
|
|
271
|
-
private _relaySyncToSiblings;
|
|
272
|
-
/**
|
|
273
|
-
* Resolve the agent's workspace directory.
|
|
274
|
-
* Looks for OpenClaw workspace config, falls back to default path.
|
|
275
|
-
*/
|
|
276
|
-
private _resolveWorkspaceDir;
|
|
277
|
-
/**
|
|
278
|
-
* Send a structured JSON reply to a specific conversation.
|
|
279
|
-
* Encrypts the payload via the conversation's ratchet and sends via WebSocket.
|
|
280
|
-
*/
|
|
281
|
-
private _sendStructuredReply;
|
|
282
|
-
/**
|
|
283
|
-
* Send stored message history to a newly-activated session.
|
|
284
|
-
* Batches all history into a single encrypted message.
|
|
285
|
-
*/
|
|
286
|
-
private _replayHistoryToSession;
|
|
287
|
-
/**
|
|
288
|
-
* Handle a device_linked event: a new owner device has joined.
|
|
289
|
-
* Fetches the new device's public keys, performs X3DH, and initializes
|
|
290
|
-
* a new ratchet session.
|
|
291
|
-
*/
|
|
292
|
-
private _handleDeviceLinked;
|
|
293
|
-
/**
|
|
294
|
-
* Handle a resync_request from the owner (owner-initiated ratchet re-establishment).
|
|
295
|
-
* Re-derives shared secret via X3DH as responder, initializes fresh receiver ratchet,
|
|
296
|
-
* and sends resync_ack back with agent's public keys.
|
|
297
|
-
*/
|
|
298
|
-
private _handleResyncRequest;
|
|
299
|
-
/**
|
|
300
|
-
* Handle an incoming room message. Finds the pairwise conversation
|
|
301
|
-
* for the sender, decrypts, and emits a room_message event.
|
|
302
|
-
*/
|
|
303
|
-
private _handleRoomMessage;
|
|
304
|
-
/**
|
|
305
|
-
* Find the pairwise conversation ID for a given sender in a room.
|
|
306
|
-
*/
|
|
307
|
-
private _findConversationForSender;
|
|
308
|
-
/**
|
|
309
|
-
* Distribute own sender key to all pairwise sessions in a room.
|
|
310
|
-
* Each distribution is encrypted via the pairwise ratchet and sent
|
|
311
|
-
* as a `sender_key_distribution` WS event.
|
|
312
|
-
*/
|
|
313
|
-
private _distributeSenderKey;
|
|
314
|
-
/**
|
|
315
|
-
* Handle an incoming sender_key_distribution event.
|
|
316
|
-
* Decrypts using the pairwise ratchet and ingests the peer's sender key.
|
|
317
|
-
*/
|
|
318
|
-
private _handleSenderKeyDistribution;
|
|
319
|
-
/**
|
|
320
|
-
* Handle an incoming room_message_sk event (Sender Key encrypted message).
|
|
321
|
-
*/
|
|
322
|
-
private _handleRoomMessageSK;
|
|
323
|
-
/**
|
|
324
|
-
* Sync missed messages across ALL sessions.
|
|
325
|
-
* For each conversation, fetches messages since last sync and decrypts.
|
|
326
|
-
*/
|
|
327
|
-
/**
|
|
328
|
-
* Paginated sync: fetch missed messages in pages of 200, up to 5 pages (1000 messages).
|
|
329
|
-
* Tracks message IDs in _syncMessageIds to prevent duplicate processing from concurrent WS messages.
|
|
330
|
-
*/
|
|
331
|
-
private _syncMissedMessages;
|
|
332
|
-
private _sendAck;
|
|
333
|
-
private _flushAcks;
|
|
334
|
-
private _flushOutboundQueue;
|
|
335
|
-
private _startPing;
|
|
336
|
-
private _stopPing;
|
|
337
|
-
private _startWakeDetector;
|
|
338
|
-
private _stopWakeDetector;
|
|
339
|
-
private _startPendingPoll;
|
|
340
|
-
private _stopPendingPoll;
|
|
341
|
-
private _checkPendingMessages;
|
|
342
|
-
private _scheduleReconnect;
|
|
343
|
-
private _setState;
|
|
344
|
-
private _startPollFallback;
|
|
345
|
-
private _stopPollFallback;
|
|
346
|
-
private _handleError;
|
|
347
|
-
/**
|
|
348
|
-
* Persist all ratchet session states to disk.
|
|
349
|
-
* Syncs live ratchet states back into the persisted sessions map.
|
|
350
|
-
*/
|
|
351
|
-
private _persistState;
|
|
352
|
-
/**
|
|
353
|
-
* Debounced server backup upload (60s after last state change).
|
|
354
|
-
* Only runs when backupCode is configured.
|
|
355
|
-
*/
|
|
356
|
-
private _scheduleServerBackup;
|
|
357
|
-
}
|
|
358
|
-
//# sourceMappingURL=channel.d.ts.map
|
package/dist/channel.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;IAmEjC,OAAO,CAAC,MAAM;IAlE1B,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,sBAAsB,CAAc;IAC5C,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,SAAS,CAGH;IACd,OAAO,CAAC,GAAG,CAA0B;IACrC,OAAO,CAAC,UAAU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jC;;;;OAIG;YACW,oBAAoB;IA8ElC;;;OAGG;YACW,kBAAkB;IAyNhC;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAiBlC;;;;OAIG;YACW,oBAAoB;IAuClC;;;OAGG;YACW,4BAA4B;IA2F1C;;OAEG;YACW,oBAAoB;IAqGlC;;;OAGG;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.d.ts
DELETED
package/dist/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/create-agent.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AgentVault "create" command — spin up a brand new OpenClaw peer agent.
|
|
3
|
-
*
|
|
4
|
-
* Ports the logic from ~/.openclaw/workspace/scripts/create-agent.sh into
|
|
5
|
-
* TypeScript, eliminating the jq dependency.
|
|
6
|
-
*
|
|
7
|
-
* Usage: npx @agentvault/agentvault create <name> --token=av_tok_...
|
|
8
|
-
*/
|
|
9
|
-
export interface CreateAgentOptions {
|
|
10
|
-
name: string;
|
|
11
|
-
token: string;
|
|
12
|
-
port?: number;
|
|
13
|
-
apiUrl: string;
|
|
14
|
-
force?: boolean;
|
|
15
|
-
}
|
|
16
|
-
/** Resolve the OpenClaw home directory (~/.openclaw) */
|
|
17
|
-
export declare function openclawHome(): string;
|
|
18
|
-
/** Parse openclaw.json and return its contents. */
|
|
19
|
-
export declare function readOpenClawConfig(home: string): any;
|
|
20
|
-
/**
|
|
21
|
-
* Scan all accounts in openclaw.json for httpPort values and return next free port.
|
|
22
|
-
* Minimum port is `startPort` (default 18790).
|
|
23
|
-
*/
|
|
24
|
-
export declare function findNextPort(config: any, startPort?: number): number;
|
|
25
|
-
/** Generate workspace template files for a new agent. */
|
|
26
|
-
export declare function generateWorkspaceFiles(name: string): Record<string, string>;
|
|
27
|
-
export declare function runCreateCommand(options: CreateAgentOptions): Promise<void>;
|
|
28
|
-
//# sourceMappingURL=create-agent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-agent.d.ts","sourceRoot":"","sources":["../src/create-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,wDAAwD;AACxD,wBAAgB,YAAY,IAAI,MAAM,CAGrC;AAED,mDAAmD;AACnD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAIpD;AA4BD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,SAAQ,GAAG,MAAM,CAInE;AAOD,yDAAyD;AACzD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA8C3E;AAID,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqOjF"}
|
package/dist/crypto-helpers.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { hexToBytes, bytesToHex, base64ToBytes, bytesToBase64, encryptedMessageToTransport, transportToEncryptedMessage, encryptedMessageToTransportV2Full, type TransportMessage, type TransportMessageV2, SenderKeyChain, SenderKeyState, type SenderKeyDistribution, type SenderKeyMessage, } from "@agentvault/crypto";
|
|
2
|
-
//# sourceMappingURL=crypto-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crypto-helpers.d.ts","sourceRoot":"","sources":["../src/crypto-helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,EACb,2BAA2B,EAC3B,2BAA2B,EAC3B,iCAAiC,EACjC,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,cAAc,EACd,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,oBAAoB,CAAC"}
|
package/dist/doctor.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AgentVault "doctor" command — diagnostic checks and plist fixer.
|
|
3
|
-
*
|
|
4
|
-
* Detects stale macOS LaunchAgent plist paths (common after pnpm updates)
|
|
5
|
-
* and offers to install a stable wrapper script so future updates don't
|
|
6
|
-
* break the gateway.
|
|
7
|
-
*
|
|
8
|
-
* Usage: npx @agentvault/agentvault doctor [--fix]
|
|
9
|
-
*/
|
|
10
|
-
export type CheckStatus = "pass" | "warn" | "fail" | "skip";
|
|
11
|
-
export interface CheckResult {
|
|
12
|
-
name: string;
|
|
13
|
-
status: CheckStatus;
|
|
14
|
-
message: string;
|
|
15
|
-
}
|
|
16
|
-
export interface PlistInfo {
|
|
17
|
-
plistPath: string;
|
|
18
|
-
programArgs: string[];
|
|
19
|
-
stalePaths: string[];
|
|
20
|
-
}
|
|
21
|
-
export interface PlistValidationResult {
|
|
22
|
-
status: "ok" | "stale" | "missing" | "skip" | "already-fixed";
|
|
23
|
-
plistPath?: string;
|
|
24
|
-
stalePaths?: string[];
|
|
25
|
-
}
|
|
26
|
-
export declare function checkOpenClawInstalled(): CheckResult;
|
|
27
|
-
export declare function checkConfigExists(home: string): CheckResult;
|
|
28
|
-
export declare function checkAgentVaultChannel(config: any): CheckResult;
|
|
29
|
-
export declare function checkPluginsAllow(config: any): CheckResult;
|
|
30
|
-
export declare function checkPlist(): CheckResult;
|
|
31
|
-
export declare function checkGatewayPort(): CheckResult;
|
|
32
|
-
export declare function checkAgentDataDirs(config: any): CheckResult;
|
|
33
|
-
export declare function checkPm2Status(): CheckResult;
|
|
34
|
-
export declare function plistPath(): string;
|
|
35
|
-
export declare function parsePlist(plistFile: string): PlistInfo | null;
|
|
36
|
-
export declare function validatePlist(): PlistValidationResult;
|
|
37
|
-
export declare function applyPlistFix(info: PlistInfo): boolean;
|
|
38
|
-
export declare function runDoctorCommand(options?: {
|
|
39
|
-
fix?: boolean;
|
|
40
|
-
}): Promise<void>;
|
|
41
|
-
//# sourceMappingURL=doctor.d.ts.map
|
package/dist/doctor.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,eAAe,CAAC;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAOD,wBAAgB,sBAAsB,IAAI,WAAW,CAYpD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAmB3D;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,GAAG,GAAG,WAAW,CAgB/D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,WAAW,CAoB1D;AAED,wBAAgB,UAAU,IAAI,WAAW,CAyBxC;AAED,wBAAgB,gBAAgB,IAAI,WAAW,CAW9C;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,WAAW,CAsC3D;AAED,wBAAgB,cAAc,IAAI,WAAW,CAoB5C;AAID,wBAAgB,SAAS,IAAI,MAAM,CAGlC;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CA2B9D;AAED,wBAAgB,aAAa,IAAI,qBAAqB,CA2BrD;AAID,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAsEtD;AAID,wBAAsB,gBAAgB,CAAC,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoGjF"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export interface HttpCallReport {
|
|
2
|
-
method: string;
|
|
3
|
-
url: string;
|
|
4
|
-
statusCode: number;
|
|
5
|
-
latencyMs: number;
|
|
6
|
-
traceId?: string;
|
|
7
|
-
parentSpanId?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface TraceContext {
|
|
10
|
-
traceId: string;
|
|
11
|
-
parentSpanId: string;
|
|
12
|
-
}
|
|
13
|
-
export interface FetchInterceptorOptions {
|
|
14
|
-
onHttpCall: (report: HttpCallReport) => void;
|
|
15
|
-
skipPatterns?: RegExp[];
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Install HTTP interceptor using both undici diagnostics channels and
|
|
19
|
-
* globalThis.fetch monkey-patching. Idempotent.
|
|
20
|
-
*/
|
|
21
|
-
export declare function installFetchInterceptor(opts: FetchInterceptorOptions): void;
|
|
22
|
-
/**
|
|
23
|
-
* Uninstall all interceptors. Safe to call even if not installed.
|
|
24
|
-
*/
|
|
25
|
-
export declare function uninstallFetchInterceptor(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Run an async function with trace context attached via AsyncLocalStorage.
|
|
28
|
-
* Any HTTP calls made within `fn` (via undici or fetch) will include
|
|
29
|
-
* traceId/parentSpanId in their HttpCallReport.
|
|
30
|
-
*/
|
|
31
|
-
export declare function runWithTraceContext<T>(ctx: TraceContext, fn: () => T | Promise<T>): Promise<T>;
|
|
32
|
-
//# sourceMappingURL=fetch-interceptor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-interceptor.d.ts","sourceRoot":"","sources":["../src/fetch-interceptor.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AA0CD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAmK3E;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAkBhD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,GAAG,EAAE,YAAY,EACjB,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GACvB,OAAO,CAAC,CAAC,CAAC,CAEZ"}
|
package/dist/gateway-send.d.ts
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gateway send helper — lets agents send messages to their owner
|
|
3
|
-
* via the plugin's local HTTP server (port 18790) or OpenClaw managed routes.
|
|
4
|
-
*
|
|
5
|
-
* Delivery path: sendToOwner() → plugin HTTP /send → SecureChannel.send()
|
|
6
|
-
* → Double Ratchet encrypt → WebSocket → backend → owner's app
|
|
7
|
-
*/
|
|
8
|
-
export interface GatewaySendOptions {
|
|
9
|
-
/** Override the gateway port (default: env GATEWAY_SEND_PORT or 18790) */
|
|
10
|
-
port?: number;
|
|
11
|
-
/** Override the gateway host (default: 127.0.0.1) */
|
|
12
|
-
host?: string;
|
|
13
|
-
/** AbortSignal for cancellation */
|
|
14
|
-
signal?: AbortSignal;
|
|
15
|
-
}
|
|
16
|
-
export interface GatewaySendResult {
|
|
17
|
-
ok: boolean;
|
|
18
|
-
error?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface GatewayStatusResult {
|
|
21
|
-
ok: boolean;
|
|
22
|
-
state?: string;
|
|
23
|
-
deviceId?: string;
|
|
24
|
-
sessions?: number;
|
|
25
|
-
error?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Send a plaintext message to the agent's owner via the gateway HTTP server.
|
|
29
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
30
|
-
*/
|
|
31
|
-
export declare function sendToOwner(text: string, options?: GatewaySendOptions): Promise<GatewaySendResult>;
|
|
32
|
-
/**
|
|
33
|
-
* Send a decision request to the agent's owner via the gateway HTTP server.
|
|
34
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
35
|
-
*/
|
|
36
|
-
export declare function sendDecisionToOwner(request: {
|
|
37
|
-
title: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
options: Array<{
|
|
40
|
-
option_id: string;
|
|
41
|
-
label: string;
|
|
42
|
-
risk_level?: string;
|
|
43
|
-
is_default?: boolean;
|
|
44
|
-
}>;
|
|
45
|
-
context_refs?: Array<{
|
|
46
|
-
type: string;
|
|
47
|
-
uri: string;
|
|
48
|
-
label: string;
|
|
49
|
-
}>;
|
|
50
|
-
deadline?: string;
|
|
51
|
-
auto_action?: {
|
|
52
|
-
option_id: string;
|
|
53
|
-
trigger: string;
|
|
54
|
-
description?: string;
|
|
55
|
-
};
|
|
56
|
-
}, options?: GatewaySendOptions): Promise<GatewaySendResult & {
|
|
57
|
-
decision_id?: string;
|
|
58
|
-
}>;
|
|
59
|
-
/**
|
|
60
|
-
* Send a plaintext message to a specific room via the gateway HTTP server.
|
|
61
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
62
|
-
*/
|
|
63
|
-
export declare function sendToRoom(roomId: string, text: string, options?: GatewaySendOptions): Promise<GatewaySendResult>;
|
|
64
|
-
/**
|
|
65
|
-
* Send a plaintext message to any target via the gateway HTTP server.
|
|
66
|
-
* Accepts target strings: "owner", "room:<id>", "a2a:<addr>", "context".
|
|
67
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
68
|
-
*/
|
|
69
|
-
export declare function sendToTarget(target: string, text: string, options?: GatewaySendOptions): Promise<GatewaySendResult & {
|
|
70
|
-
destination?: {
|
|
71
|
-
kind: string;
|
|
72
|
-
id?: string;
|
|
73
|
-
};
|
|
74
|
-
}>;
|
|
75
|
-
/**
|
|
76
|
-
* Discover available delivery targets from the gateway.
|
|
77
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
78
|
-
*/
|
|
79
|
-
export declare function listTargets(options?: GatewaySendOptions): Promise<{
|
|
80
|
-
ok: boolean;
|
|
81
|
-
targets?: Array<{
|
|
82
|
-
kind: string;
|
|
83
|
-
id: string;
|
|
84
|
-
label: string;
|
|
85
|
-
available: boolean;
|
|
86
|
-
}>;
|
|
87
|
-
context?: {
|
|
88
|
-
kind: string;
|
|
89
|
-
roomId?: string;
|
|
90
|
-
};
|
|
91
|
-
error?: string;
|
|
92
|
-
}>;
|
|
93
|
-
/**
|
|
94
|
-
* Check gateway health / status.
|
|
95
|
-
* Never throws — returns `{ ok: false, error }` on failure.
|
|
96
|
-
*/
|
|
97
|
-
export declare function checkGateway(options?: GatewaySendOptions): Promise<GatewayStatusResult>;
|
|
98
|
-
//# sourceMappingURL=gateway-send.d.ts.map
|