@agentvault/agentvault 0.13.5 → 0.13.6

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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=install-plugin.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-plugin.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/install-plugin.test.ts"],"names":[],"mappings":""}
@@ -14,6 +14,7 @@ export interface ResolvedAccount {
14
14
  agentName: string;
15
15
  httpPort: number;
16
16
  configured: boolean;
17
+ inviteToken: string;
17
18
  }
18
19
  export declare function listAccountIds(cfg: any): string[];
19
20
  export declare function resolveAccount(cfg: any, accountId?: string): ResolvedAccount;
@@ -1 +1 @@
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"}
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;IACpB,WAAW,EAAE,MAAM,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,CA6C5E"}
package/dist/channel.d.ts CHANGED
@@ -105,8 +105,6 @@ export declare class SecureChannel extends EventEmitter {
105
105
  */
106
106
  sendToRoom(roomId: string, plaintext: string, opts?: {
107
107
  messageType?: string;
108
- priority?: string;
109
- metadata?: Record<string, unknown>;
110
108
  }): Promise<void>;
111
109
  /**
112
110
  * Leave a room: remove sessions and persisted room state.
@@ -131,13 +129,6 @@ export declare class SecureChannel extends EventEmitter {
131
129
  decisionId?: string;
132
130
  detail?: string;
133
131
  }): Promise<void>;
134
- sendActionConfirmationToRoom(roomId: string, confirmation: {
135
- action: string;
136
- status: "completed" | "failed" | "partial";
137
- decisionId?: string;
138
- detail?: string;
139
- estimated_cost?: number;
140
- }): Promise<void>;
141
132
  private _sendHeartbeat;
142
133
  stop(): Promise<void>;
143
134
  startHttpServer(port: number): void;
@@ -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,EAEX,MAAM,YAAY,CAAC;AAoDpB,qBAAa,aAAc,SAAQ,YAAY;IA8CjC,OAAO,CAAC,MAAM;IA7C1B,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,YAAY,CAAu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AAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAkHpG;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YAoDhC,OAAO;IAgDrB,OAAO,CAAC,KAAK;YAsCC,SAAS;IAyIvB,OAAO,CAAC,QAAQ;IAwhBhB;;;;OAIG;YACW,sBAAsB;IAoKpC;;;OAGG;YACW,6BAA6B;IA6C3C;;;OAGG;YACW,iBAAiB;IAwD/B;;;OAGG;IACG,kBAAkB,CACtB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC7B,OAAO,CAAC,IAAI,CAAC;IA8ChB;;;OAGG;YACW,oBAAoB;IAqClC;;;OAGG;YACW,uBAAuB;IAkCrC;;;;OAIG;YACW,mBAAmB;IAkEjC;;;OAGG;YACW,kBAAkB;IAqMhC;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAiBlC;;;OAGG;IACH;;;OAGG;YACW,mBAAmB;IAsHjC,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;IAoB1B,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,kBAAkB;IAmH1B,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,YAAY;IAKpB;;;OAGG;YACW,aAAa;CAmB5B"}
package/dist/cli.js CHANGED
@@ -44897,7 +44897,6 @@ var init_ratchet = __esm({
44897
44897
  serialize() {
44898
44898
  const s2 = this.state;
44899
44899
  return JSON.stringify({
44900
- version: 1,
44901
44900
  rootKey: libsodium_wrappers_default.to_hex(s2.rootKey),
44902
44901
  sendingChain: s2.sendingChain ? {
44903
44902
  chainKey: libsodium_wrappers_default.to_hex(s2.sendingChain.chainKey),
@@ -44925,59 +44924,33 @@ var init_ratchet = __esm({
44925
44924
  });
44926
44925
  }
44927
44926
  static deserialize(json) {
44928
- let d2;
44929
- try {
44930
- d2 = JSON.parse(json);
44931
- } catch {
44932
- throw new Error("Ratchet state: corrupt JSON");
44933
- }
44934
- if (d2.version !== void 0 && d2.version !== 1) {
44935
- throw new Error(`Ratchet state version ${d2.version} not supported`);
44936
- }
44937
- if (typeof d2.rootKey !== "string") {
44938
- throw new Error("Ratchet state: missing required field rootKey");
44939
- }
44940
- const dhSend = d2.dhSendingKeypair;
44941
- if (!dhSend || typeof dhSend.publicKey !== "string" || typeof dhSend.privateKey !== "string") {
44942
- throw new Error("Ratchet state: missing required field dhSendingKeypair");
44943
- }
44944
- const idKp = d2.identityKeypair;
44945
- if (!idKp || typeof idKp.publicKey !== "string" || typeof idKp.privateKey !== "string") {
44946
- throw new Error("Ratchet state: missing required field identityKeypair");
44947
- }
44948
- try {
44949
- return new _DoubleRatchet({
44950
- rootKey: libsodium_wrappers_default.from_hex(d2.rootKey),
44951
- sendingChain: d2.sendingChain ? {
44952
- chainKey: libsodium_wrappers_default.from_hex(d2.sendingChain.chainKey),
44953
- messageNumber: d2.sendingChain.messageNumber
44954
- } : null,
44955
- receivingChain: d2.receivingChain ? {
44956
- chainKey: libsodium_wrappers_default.from_hex(d2.receivingChain.chainKey),
44957
- messageNumber: d2.receivingChain.messageNumber
44958
- } : null,
44959
- dhSendingKeypair: {
44960
- publicKey: libsodium_wrappers_default.from_hex(dhSend.publicKey),
44961
- privateKey: libsodium_wrappers_default.from_hex(dhSend.privateKey)
44962
- },
44963
- dhReceivingPublicKey: d2.dhReceivingPublicKey ? libsodium_wrappers_default.from_hex(d2.dhReceivingPublicKey) : null,
44964
- identityKeypair: {
44965
- publicKey: libsodium_wrappers_default.from_hex(idKp.publicKey),
44966
- privateKey: libsodium_wrappers_default.from_hex(idKp.privateKey)
44967
- },
44968
- previousSendingChainLength: d2.previousSendingChainLength,
44969
- skippedKeys: d2.skippedKeys.map((sk) => ({
44970
- dhPub: sk.dhPub,
44971
- n: sk.n,
44972
- messageKey: libsodium_wrappers_default.from_hex(sk.messageKey)
44973
- }))
44974
- });
44975
- } catch (err) {
44976
- if (err instanceof Error && err.message.startsWith("Ratchet state")) {
44977
- throw err;
44978
- }
44979
- throw new Error(`Ratchet state: corrupt hex data \u2014 ${err instanceof Error ? err.message : String(err)}`);
44980
- }
44927
+ const d2 = JSON.parse(json);
44928
+ return new _DoubleRatchet({
44929
+ rootKey: libsodium_wrappers_default.from_hex(d2.rootKey),
44930
+ sendingChain: d2.sendingChain ? {
44931
+ chainKey: libsodium_wrappers_default.from_hex(d2.sendingChain.chainKey),
44932
+ messageNumber: d2.sendingChain.messageNumber
44933
+ } : null,
44934
+ receivingChain: d2.receivingChain ? {
44935
+ chainKey: libsodium_wrappers_default.from_hex(d2.receivingChain.chainKey),
44936
+ messageNumber: d2.receivingChain.messageNumber
44937
+ } : null,
44938
+ dhSendingKeypair: {
44939
+ publicKey: libsodium_wrappers_default.from_hex(d2.dhSendingKeypair.publicKey),
44940
+ privateKey: libsodium_wrappers_default.from_hex(d2.dhSendingKeypair.privateKey)
44941
+ },
44942
+ dhReceivingPublicKey: d2.dhReceivingPublicKey ? libsodium_wrappers_default.from_hex(d2.dhReceivingPublicKey) : null,
44943
+ identityKeypair: {
44944
+ publicKey: libsodium_wrappers_default.from_hex(d2.identityKeypair.publicKey),
44945
+ privateKey: libsodium_wrappers_default.from_hex(d2.identityKeypair.privateKey)
44946
+ },
44947
+ previousSendingChainLength: d2.previousSendingChainLength,
44948
+ skippedKeys: d2.skippedKeys.map((sk) => ({
44949
+ dhPub: sk.dhPub,
44950
+ n: sk.n,
44951
+ messageKey: libsodium_wrappers_default.from_hex(sk.messageKey)
44952
+ }))
44953
+ });
44981
44954
  }
44982
44955
  };
44983
44956
  }
@@ -46149,9 +46122,7 @@ var init_channel = __esm({
46149
46122
  data: {
46150
46123
  room_id: roomId,
46151
46124
  recipients,
46152
- message_type: messageType,
46153
- priority: opts?.priority ?? "normal",
46154
- metadata: opts?.metadata
46125
+ message_type: messageType
46155
46126
  }
46156
46127
  })
46157
46128
  );
@@ -46165,12 +46136,7 @@ var init_channel = __esm({
46165
46136
  "Content-Type": "application/json",
46166
46137
  Authorization: `Bearer ${this._deviceJwt}`
46167
46138
  },
46168
- body: JSON.stringify({
46169
- recipients,
46170
- message_type: messageType,
46171
- priority: opts?.priority ?? "normal",
46172
- metadata: opts?.metadata
46173
- })
46139
+ body: JSON.stringify({ recipients, message_type: messageType })
46174
46140
  }
46175
46141
  );
46176
46142
  if (!res.ok) {
@@ -46315,27 +46281,6 @@ var init_channel = __esm({
46315
46281
  }
46316
46282
  );
46317
46283
  }
46318
- async sendActionConfirmationToRoom(roomId, confirmation) {
46319
- const envelope = {
46320
- type: "action_confirmation",
46321
- action: confirmation.action,
46322
- status: confirmation.status
46323
- };
46324
- if (confirmation.decisionId !== void 0) envelope.decision_id = confirmation.decisionId;
46325
- if (confirmation.detail !== void 0) envelope.detail = confirmation.detail;
46326
- const metadata = {
46327
- action: confirmation.action,
46328
- status: confirmation.status
46329
- };
46330
- if (confirmation.estimated_cost !== void 0) {
46331
- metadata.estimated_cost = confirmation.estimated_cost;
46332
- }
46333
- await this.sendToRoom(roomId, JSON.stringify(envelope), {
46334
- messageType: "action_confirmation",
46335
- priority: "high",
46336
- metadata
46337
- });
46338
- }
46339
46284
  _sendHeartbeat() {
46340
46285
  if (this._state !== "ready" || !this._heartbeatCallback) return;
46341
46286
  const status = this._heartbeatCallback();
@@ -46410,52 +46355,10 @@ var init_channel = __esm({
46410
46355
  res.end(JSON.stringify({ ok: false, error: "Missing 'text' field" }));
46411
46356
  return;
46412
46357
  }
46413
- if (parsed.room_id && typeof parsed.room_id === "string") {
46414
- await this.sendToRoom(parsed.room_id, text, {
46415
- messageType: parsed.message_type,
46416
- priority: parsed.priority,
46417
- metadata: parsed.metadata
46418
- });
46419
- } else if (parsed.file_path && typeof parsed.file_path === "string") {
46358
+ if (parsed.file_path && typeof parsed.file_path === "string") {
46420
46359
  await this.sendWithAttachment(text, parsed.file_path, { topicId: parsed.topicId });
46421
46360
  } else {
46422
- await this.send(text, {
46423
- topicId: parsed.topicId,
46424
- messageType: parsed.message_type,
46425
- metadata: parsed.metadata
46426
- });
46427
- }
46428
- res.writeHead(200, { "Content-Type": "application/json" });
46429
- res.end(JSON.stringify({ ok: true }));
46430
- } catch (err) {
46431
- res.writeHead(500, { "Content-Type": "application/json" });
46432
- res.end(JSON.stringify({ ok: false, error: String(err) }));
46433
- }
46434
- });
46435
- } else if (req.method === "POST" && req.url === "/action") {
46436
- let body = "";
46437
- req.on("data", (chunk) => {
46438
- body += chunk.toString();
46439
- });
46440
- req.on("end", async () => {
46441
- try {
46442
- const parsed = JSON.parse(body);
46443
- if (!parsed.action || typeof parsed.action !== "string") {
46444
- res.writeHead(400, { "Content-Type": "application/json" });
46445
- res.end(JSON.stringify({ ok: false, error: "Missing 'action' field" }));
46446
- return;
46447
- }
46448
- const confirmation = {
46449
- action: parsed.action,
46450
- status: parsed.status ?? "completed",
46451
- decisionId: parsed.decision_id,
46452
- detail: parsed.detail,
46453
- estimated_cost: parsed.estimated_cost
46454
- };
46455
- if (parsed.room_id && typeof parsed.room_id === "string") {
46456
- await this.sendActionConfirmationToRoom(parsed.room_id, confirmation);
46457
- } else {
46458
- await this.sendActionConfirmation(confirmation);
46361
+ await this.send(text, { topicId: parsed.topicId });
46459
46362
  }
46460
46363
  res.writeHead(200, { "Content-Type": "application/json" });
46461
46364
  res.end(JSON.stringify({ ok: true }));
@@ -46474,7 +46377,7 @@ var init_channel = __esm({
46474
46377
  }));
46475
46378
  } else {
46476
46379
  res.writeHead(404, { "Content-Type": "application/json" });
46477
- res.end(JSON.stringify({ ok: false, error: "Not found. Use POST /send, POST /action, or GET /status" }));
46380
+ res.end(JSON.stringify({ ok: false, error: "Not found. Use POST /send or GET /status" }));
46478
46381
  }
46479
46382
  });
46480
46383
  this._httpServer.listen(port, "127.0.0.1", () => {
@@ -47268,15 +47171,7 @@ var init_channel = __esm({
47268
47171
  nonce: hexToBytes(msgData.nonce)
47269
47172
  };
47270
47173
  const ratchet = DoubleRatchet.deserialize(channelEntry.session.ratchetState);
47271
- const ratchetSnapshot = channelEntry.session.ratchetState;
47272
- let a2aPlaintext;
47273
- try {
47274
- a2aPlaintext = ratchet.decrypt(encryptedMessage);
47275
- } catch (decryptErr) {
47276
- console.error(`[SecureChannel] A2A decrypt failed \u2014 restoring ratchet state:`, decryptErr);
47277
- channelEntry.session.ratchetState = ratchetSnapshot;
47278
- return;
47279
- }
47174
+ const plaintext = ratchet.decrypt(encryptedMessage);
47280
47175
  channelEntry.session.ratchetState = ratchet.serialize();
47281
47176
  if (channelEntry.role === "responder" && !channelEntry.session.activated) {
47282
47177
  channelEntry.session.activated = true;
@@ -47299,7 +47194,7 @@ var init_channel = __esm({
47299
47194
  }
47300
47195
  await this._persistState();
47301
47196
  const a2aMsg = {
47302
- text: a2aPlaintext,
47197
+ text: plaintext,
47303
47198
  fromHubAddress: msgData.from_hub_address || msgData.hub_address || "",
47304
47199
  channelId,
47305
47200
  conversationId: msgData.conversation_id || "",
@@ -47370,19 +47265,7 @@ var init_channel = __esm({
47370
47265
  header_blob: msgData.header_blob,
47371
47266
  ciphertext: msgData.ciphertext
47372
47267
  });
47373
- const ratchetSnapshot = session.ratchet.serialize();
47374
- let plaintext;
47375
- try {
47376
- plaintext = session.ratchet.decrypt(encrypted);
47377
- } catch (decryptErr) {
47378
- console.error(`[SecureChannel] Decrypt failed for conv ${convId.slice(0, 8)}... \u2014 restoring ratchet:`, decryptErr);
47379
- try {
47380
- session.ratchet = DoubleRatchet.deserialize(ratchetSnapshot);
47381
- } catch (restoreErr) {
47382
- console.error("[SecureChannel] Ratchet restore failed:", restoreErr);
47383
- }
47384
- return;
47385
- }
47268
+ const plaintext = session.ratchet.decrypt(encrypted);
47386
47269
  this._sendAck(msgData.message_id);
47387
47270
  if (!session.activated) {
47388
47271
  session.activated = true;
@@ -47770,14 +47653,9 @@ ${messageText}`;
47770
47653
  ciphertext: msgData.ciphertext
47771
47654
  });
47772
47655
  let plaintext;
47773
- const ratchetSnapshot = session.ratchet.serialize();
47774
47656
  try {
47775
47657
  plaintext = session.ratchet.decrypt(encrypted);
47776
47658
  } catch (decryptErr) {
47777
- try {
47778
- session.ratchet = DoubleRatchet.deserialize(ratchetSnapshot);
47779
- } catch {
47780
- }
47781
47659
  console.warn(
47782
47660
  `[SecureChannel] Room decrypt failed for conv ${convId.slice(0, 8)}...: ${String(decryptErr)}, re-initializing ratchet`
47783
47661
  );
@@ -47923,20 +47801,7 @@ ${messageText}`;
47923
47801
  header_blob: msg.header_blob,
47924
47802
  ciphertext: msg.ciphertext
47925
47803
  });
47926
- const ratchetSnapshot = session.ratchet.serialize();
47927
- let plaintext;
47928
- try {
47929
- plaintext = session.ratchet.decrypt(encrypted);
47930
- } catch (decryptErr) {
47931
- console.error(`[SecureChannel] Sync decrypt failed for ${msg.conversation_id.slice(0, 8)}... \u2014 restoring ratchet:`, decryptErr);
47932
- try {
47933
- session.ratchet = DoubleRatchet.deserialize(ratchetSnapshot);
47934
- } catch {
47935
- }
47936
- this._persisted.lastMessageTimestamp = msg.created_at;
47937
- since = msg.created_at;
47938
- continue;
47939
- }
47804
+ const plaintext = session.ratchet.decrypt(encrypted);
47940
47805
  this._sendAck(msg.id);
47941
47806
  if (!session.activated) {
47942
47807
  session.activated = true;
@@ -47971,7 +47836,7 @@ ${messageText}`;
47971
47836
  totalProcessed++;
47972
47837
  } catch (err) {
47973
47838
  console.warn(
47974
- `[SecureChannel] Sync failed for msg ${msg.id.slice(0, 8)}... in conv ${msg.conversation_id.slice(0, 8)}...: ${String(err)}`
47839
+ `[SecureChannel] Sync decrypt failed for msg ${msg.id.slice(0, 8)}... in conv ${msg.conversation_id.slice(0, 8)}...: ${String(err)}`
47975
47840
  );
47976
47841
  this._persisted.lastMessageTimestamp = msg.created_at;
47977
47842
  since = msg.created_at;
@@ -48167,18 +48032,7 @@ ${messageText}`;
48167
48032
  header_blob: msg.header_blob,
48168
48033
  ciphertext: msg.ciphertext
48169
48034
  });
48170
- const ratchetSnapshot = session.ratchet.serialize();
48171
- let plaintext;
48172
- try {
48173
- plaintext = session.ratchet.decrypt(encrypted);
48174
- } catch (decryptErr) {
48175
- console.error(`[SecureChannel] Room sync decrypt failed for ${msg.conversation_id.slice(0, 8)}... \u2014 restoring ratchet:`, decryptErr);
48176
- try {
48177
- session.ratchet = DoubleRatchet.deserialize(ratchetSnapshot);
48178
- } catch {
48179
- }
48180
- continue;
48181
- }
48035
+ const plaintext = session.ratchet.decrypt(encrypted);
48182
48036
  if (!session.activated) {
48183
48037
  session.activated = true;
48184
48038
  }
@@ -48283,7 +48137,6 @@ var init_openclaw_plugin = __esm({
48283
48137
  var gateway_send_exports = {};
48284
48138
  __export(gateway_send_exports, {
48285
48139
  checkGateway: () => checkGateway,
48286
- sendAction: () => sendAction,
48287
48140
  sendToOwner: () => sendToOwner
48288
48141
  });
48289
48142
  function resolveBaseUrl(options) {
@@ -48318,27 +48171,6 @@ async function sendToOwner(text, options) {
48318
48171
  return { ok: false, error: friendlyError(err) };
48319
48172
  }
48320
48173
  }
48321
- async function sendAction(report, options) {
48322
- if (typeof report.action !== "string" || report.action.trim().length === 0) {
48323
- return { ok: false, error: "Action must be a non-empty string" };
48324
- }
48325
- try {
48326
- const base = resolveBaseUrl(options);
48327
- const res = await fetch(`${base}/action`, {
48328
- method: "POST",
48329
- headers: { "Content-Type": "application/json" },
48330
- body: JSON.stringify(report),
48331
- signal: options?.signal
48332
- });
48333
- if (!res.ok) {
48334
- const body = await res.text().catch(() => "");
48335
- return { ok: false, error: `HTTP ${res.status}${body ? `: ${body}` : ""}` };
48336
- }
48337
- return { ok: true };
48338
- } catch (err) {
48339
- return { ok: false, error: friendlyError(err) };
48340
- }
48341
- }
48342
48174
  async function checkGateway(options) {
48343
48175
  try {
48344
48176
  const base = resolveBaseUrl(options);
@@ -48372,7 +48204,7 @@ var init_index = __esm({
48372
48204
  init_account_config();
48373
48205
  await init_openclaw_plugin();
48374
48206
  init_gateway_send();
48375
- VERSION = "0.12.0";
48207
+ VERSION = "0.11.0";
48376
48208
  }
48377
48209
  });
48378
48210