@haex-space/vault-sdk 2.5.68 → 2.5.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -223,41 +223,37 @@ declare const FILESYSTEM_COMMANDS: {
223
223
  *
224
224
  * Commands for the external bridge (browser extension communication).
225
225
  *
226
- * Uses two prefixes:
227
- * - `webview_extension_external_` - WebView-specific (respond to requests)
228
- * - `external_` - Bridge management commands
229
- *
230
- * TODO: Migrate all to `extension_external_bridge_` prefix for consistency.
226
+ * Naming convention: `external_bridge_<action>`
231
227
  */
232
228
  declare const EXTERNAL_BRIDGE_COMMANDS: {
233
229
  /** Respond to an external request */
234
- readonly respond: "webview_extension_external_respond";
230
+ readonly respond: "external_bridge_respond";
235
231
  /** Start the external bridge server */
236
- readonly bridgeStart: "external_bridge_start";
232
+ readonly start: "external_bridge_start";
237
233
  /** Stop the external bridge server */
238
- readonly bridgeStop: "external_bridge_stop";
234
+ readonly stop: "external_bridge_stop";
239
235
  /** Get bridge server status */
240
- readonly bridgeGetStatus: "external_bridge_get_status";
236
+ readonly getStatus: "external_bridge_get_status";
241
237
  /** Allow a client connection */
242
- readonly clientAllow: "external_client_allow";
238
+ readonly clientAllow: "external_bridge_client_allow";
243
239
  /** Block a client connection */
244
- readonly clientBlock: "external_client_block";
240
+ readonly clientBlock: "external_bridge_client_block";
245
241
  /** Get list of authorized clients */
246
- readonly getAuthorizedClients: "external_get_authorized_clients";
242
+ readonly getAuthorizedClients: "external_bridge_get_authorized_clients";
247
243
  /** Revoke client authorization */
248
- readonly revokeClient: "external_revoke_client";
244
+ readonly revokeClient: "external_bridge_revoke_client";
249
245
  /** Get session authorizations */
250
- readonly getSessionAuthorizations: "external_get_session_authorizations";
246
+ readonly getSessionAuthorizations: "external_bridge_get_session_authorizations";
251
247
  /** Revoke session authorization */
252
- readonly revokeSessionAuthorization: "external_revoke_session_authorization";
248
+ readonly revokeSessionAuthorization: "external_bridge_revoke_session_authorization";
253
249
  /** Get list of blocked clients */
254
- readonly getBlockedClients: "external_get_blocked_clients";
250
+ readonly getBlockedClients: "external_bridge_get_blocked_clients";
255
251
  /** Unblock a client */
256
- readonly unblockClient: "external_unblock_client";
252
+ readonly unblockClient: "external_bridge_unblock_client";
257
253
  /** Check if client is blocked */
258
- readonly isClientBlocked: "external_is_client_blocked";
254
+ readonly isClientBlocked: "external_bridge_is_client_blocked";
259
255
  /** Get pending authorization requests */
260
- readonly getPendingAuthorizations: "external_get_pending_authorizations";
256
+ readonly getPendingAuthorizations: "external_bridge_get_pending_authorizations";
261
257
  };
262
258
 
263
259
  /**
@@ -274,7 +270,7 @@ declare const EXTENSION_COMMANDS: {
274
270
  /** Get extension info (manifest, id, etc.) */
275
271
  readonly getInfo: "extension_get_info";
276
272
  /** Get application context (theme, locale, etc.) */
277
- readonly getContext: "extension_get_context";
273
+ readonly getContext: "extension_context_get";
278
274
  };
279
275
 
280
276
  /**
@@ -368,24 +364,24 @@ declare const TAURI_COMMANDS: {
368
364
  readonly copy: "extension_filesystem_copy";
369
365
  };
370
366
  readonly externalBridge: {
371
- readonly respond: "webview_extension_external_respond";
372
- readonly bridgeStart: "external_bridge_start";
373
- readonly bridgeStop: "external_bridge_stop";
374
- readonly bridgeGetStatus: "external_bridge_get_status";
375
- readonly clientAllow: "external_client_allow";
376
- readonly clientBlock: "external_client_block";
377
- readonly getAuthorizedClients: "external_get_authorized_clients";
378
- readonly revokeClient: "external_revoke_client";
379
- readonly getSessionAuthorizations: "external_get_session_authorizations";
380
- readonly revokeSessionAuthorization: "external_revoke_session_authorization";
381
- readonly getBlockedClients: "external_get_blocked_clients";
382
- readonly unblockClient: "external_unblock_client";
383
- readonly isClientBlocked: "external_is_client_blocked";
384
- readonly getPendingAuthorizations: "external_get_pending_authorizations";
367
+ readonly respond: "external_bridge_respond";
368
+ readonly start: "external_bridge_start";
369
+ readonly stop: "external_bridge_stop";
370
+ readonly getStatus: "external_bridge_get_status";
371
+ readonly clientAllow: "external_bridge_client_allow";
372
+ readonly clientBlock: "external_bridge_client_block";
373
+ readonly getAuthorizedClients: "external_bridge_get_authorized_clients";
374
+ readonly revokeClient: "external_bridge_revoke_client";
375
+ readonly getSessionAuthorizations: "external_bridge_get_session_authorizations";
376
+ readonly revokeSessionAuthorization: "external_bridge_revoke_session_authorization";
377
+ readonly getBlockedClients: "external_bridge_get_blocked_clients";
378
+ readonly unblockClient: "external_bridge_unblock_client";
379
+ readonly isClientBlocked: "external_bridge_is_client_blocked";
380
+ readonly getPendingAuthorizations: "external_bridge_get_pending_authorizations";
385
381
  };
386
382
  readonly extension: {
387
383
  readonly getInfo: "extension_get_info";
388
- readonly getContext: "extension_get_context";
384
+ readonly getContext: "extension_context_get";
389
385
  };
390
386
  readonly remoteStorage: {
391
387
  readonly listBackends: "extension_remote_storage_list_backends";
package/dist/index.d.ts CHANGED
@@ -223,41 +223,37 @@ declare const FILESYSTEM_COMMANDS: {
223
223
  *
224
224
  * Commands for the external bridge (browser extension communication).
225
225
  *
226
- * Uses two prefixes:
227
- * - `webview_extension_external_` - WebView-specific (respond to requests)
228
- * - `external_` - Bridge management commands
229
- *
230
- * TODO: Migrate all to `extension_external_bridge_` prefix for consistency.
226
+ * Naming convention: `external_bridge_<action>`
231
227
  */
232
228
  declare const EXTERNAL_BRIDGE_COMMANDS: {
233
229
  /** Respond to an external request */
234
- readonly respond: "webview_extension_external_respond";
230
+ readonly respond: "external_bridge_respond";
235
231
  /** Start the external bridge server */
236
- readonly bridgeStart: "external_bridge_start";
232
+ readonly start: "external_bridge_start";
237
233
  /** Stop the external bridge server */
238
- readonly bridgeStop: "external_bridge_stop";
234
+ readonly stop: "external_bridge_stop";
239
235
  /** Get bridge server status */
240
- readonly bridgeGetStatus: "external_bridge_get_status";
236
+ readonly getStatus: "external_bridge_get_status";
241
237
  /** Allow a client connection */
242
- readonly clientAllow: "external_client_allow";
238
+ readonly clientAllow: "external_bridge_client_allow";
243
239
  /** Block a client connection */
244
- readonly clientBlock: "external_client_block";
240
+ readonly clientBlock: "external_bridge_client_block";
245
241
  /** Get list of authorized clients */
246
- readonly getAuthorizedClients: "external_get_authorized_clients";
242
+ readonly getAuthorizedClients: "external_bridge_get_authorized_clients";
247
243
  /** Revoke client authorization */
248
- readonly revokeClient: "external_revoke_client";
244
+ readonly revokeClient: "external_bridge_revoke_client";
249
245
  /** Get session authorizations */
250
- readonly getSessionAuthorizations: "external_get_session_authorizations";
246
+ readonly getSessionAuthorizations: "external_bridge_get_session_authorizations";
251
247
  /** Revoke session authorization */
252
- readonly revokeSessionAuthorization: "external_revoke_session_authorization";
248
+ readonly revokeSessionAuthorization: "external_bridge_revoke_session_authorization";
253
249
  /** Get list of blocked clients */
254
- readonly getBlockedClients: "external_get_blocked_clients";
250
+ readonly getBlockedClients: "external_bridge_get_blocked_clients";
255
251
  /** Unblock a client */
256
- readonly unblockClient: "external_unblock_client";
252
+ readonly unblockClient: "external_bridge_unblock_client";
257
253
  /** Check if client is blocked */
258
- readonly isClientBlocked: "external_is_client_blocked";
254
+ readonly isClientBlocked: "external_bridge_is_client_blocked";
259
255
  /** Get pending authorization requests */
260
- readonly getPendingAuthorizations: "external_get_pending_authorizations";
256
+ readonly getPendingAuthorizations: "external_bridge_get_pending_authorizations";
261
257
  };
262
258
 
263
259
  /**
@@ -274,7 +270,7 @@ declare const EXTENSION_COMMANDS: {
274
270
  /** Get extension info (manifest, id, etc.) */
275
271
  readonly getInfo: "extension_get_info";
276
272
  /** Get application context (theme, locale, etc.) */
277
- readonly getContext: "extension_get_context";
273
+ readonly getContext: "extension_context_get";
278
274
  };
279
275
 
280
276
  /**
@@ -368,24 +364,24 @@ declare const TAURI_COMMANDS: {
368
364
  readonly copy: "extension_filesystem_copy";
369
365
  };
370
366
  readonly externalBridge: {
371
- readonly respond: "webview_extension_external_respond";
372
- readonly bridgeStart: "external_bridge_start";
373
- readonly bridgeStop: "external_bridge_stop";
374
- readonly bridgeGetStatus: "external_bridge_get_status";
375
- readonly clientAllow: "external_client_allow";
376
- readonly clientBlock: "external_client_block";
377
- readonly getAuthorizedClients: "external_get_authorized_clients";
378
- readonly revokeClient: "external_revoke_client";
379
- readonly getSessionAuthorizations: "external_get_session_authorizations";
380
- readonly revokeSessionAuthorization: "external_revoke_session_authorization";
381
- readonly getBlockedClients: "external_get_blocked_clients";
382
- readonly unblockClient: "external_unblock_client";
383
- readonly isClientBlocked: "external_is_client_blocked";
384
- readonly getPendingAuthorizations: "external_get_pending_authorizations";
367
+ readonly respond: "external_bridge_respond";
368
+ readonly start: "external_bridge_start";
369
+ readonly stop: "external_bridge_stop";
370
+ readonly getStatus: "external_bridge_get_status";
371
+ readonly clientAllow: "external_bridge_client_allow";
372
+ readonly clientBlock: "external_bridge_client_block";
373
+ readonly getAuthorizedClients: "external_bridge_get_authorized_clients";
374
+ readonly revokeClient: "external_bridge_revoke_client";
375
+ readonly getSessionAuthorizations: "external_bridge_get_session_authorizations";
376
+ readonly revokeSessionAuthorization: "external_bridge_revoke_session_authorization";
377
+ readonly getBlockedClients: "external_bridge_get_blocked_clients";
378
+ readonly unblockClient: "external_bridge_unblock_client";
379
+ readonly isClientBlocked: "external_bridge_is_client_blocked";
380
+ readonly getPendingAuthorizations: "external_bridge_get_pending_authorizations";
385
381
  };
386
382
  readonly extension: {
387
383
  readonly getInfo: "extension_get_info";
388
- readonly getContext: "extension_get_context";
384
+ readonly getContext: "extension_context_get";
389
385
  };
390
386
  readonly remoteStorage: {
391
387
  readonly listBackends: "extension_remote_storage_list_backends";
package/dist/index.js CHANGED
@@ -553,41 +553,41 @@ var FILESYSTEM_COMMANDS = {
553
553
 
554
554
  // src/commands/externalBridge.ts
555
555
  var EXTERNAL_BRIDGE_COMMANDS = {
556
- // Response handling (called by extensions running in WebView)
556
+ // Response handling (called by extensions)
557
557
  /** Respond to an external request */
558
- respond: "webview_extension_external_respond",
558
+ respond: "external_bridge_respond",
559
559
  // Bridge server management
560
560
  /** Start the external bridge server */
561
- bridgeStart: "external_bridge_start",
561
+ start: "external_bridge_start",
562
562
  /** Stop the external bridge server */
563
- bridgeStop: "external_bridge_stop",
563
+ stop: "external_bridge_stop",
564
564
  /** Get bridge server status */
565
- bridgeGetStatus: "external_bridge_get_status",
565
+ getStatus: "external_bridge_get_status",
566
566
  // Client authorization (unified API with remember flag)
567
567
  /** Allow a client connection */
568
- clientAllow: "external_client_allow",
568
+ clientAllow: "external_bridge_client_allow",
569
569
  /** Block a client connection */
570
- clientBlock: "external_client_block",
570
+ clientBlock: "external_bridge_client_block",
571
571
  // Authorized clients management (permanent - stored in database)
572
572
  /** Get list of authorized clients */
573
- getAuthorizedClients: "external_get_authorized_clients",
573
+ getAuthorizedClients: "external_bridge_get_authorized_clients",
574
574
  /** Revoke client authorization */
575
- revokeClient: "external_revoke_client",
575
+ revokeClient: "external_bridge_revoke_client",
576
576
  // Session-based authorizations (temporary - cleared when haex-vault restarts)
577
577
  /** Get session authorizations */
578
- getSessionAuthorizations: "external_get_session_authorizations",
578
+ getSessionAuthorizations: "external_bridge_get_session_authorizations",
579
579
  /** Revoke session authorization */
580
- revokeSessionAuthorization: "external_revoke_session_authorization",
580
+ revokeSessionAuthorization: "external_bridge_revoke_session_authorization",
581
581
  // Blocked clients management
582
582
  /** Get list of blocked clients */
583
- getBlockedClients: "external_get_blocked_clients",
583
+ getBlockedClients: "external_bridge_get_blocked_clients",
584
584
  /** Unblock a client */
585
- unblockClient: "external_unblock_client",
585
+ unblockClient: "external_bridge_unblock_client",
586
586
  /** Check if client is blocked */
587
- isClientBlocked: "external_is_client_blocked",
587
+ isClientBlocked: "external_bridge_is_client_blocked",
588
588
  // Pending authorizations
589
589
  /** Get pending authorization requests */
590
- getPendingAuthorizations: "external_get_pending_authorizations"
590
+ getPendingAuthorizations: "external_bridge_get_pending_authorizations"
591
591
  };
592
592
 
593
593
  // src/commands/extension.ts
@@ -595,7 +595,7 @@ var EXTENSION_COMMANDS = {
595
595
  /** Get extension info (manifest, id, etc.) */
596
596
  getInfo: "extension_get_info",
597
597
  /** Get application context (theme, locale, etc.) */
598
- getContext: "extension_get_context"
598
+ getContext: "extension_context_get"
599
599
  };
600
600
 
601
601
  // src/commands/remoteStorage.ts
@@ -1529,8 +1529,8 @@ function getTauriEvent() {
1529
1529
  }
1530
1530
  async function initNativeMode(ctx, log, onEvent, onContextChange) {
1531
1531
  const { invoke } = getTauriCore();
1532
- const extensionInfo = await invoke("webview_extension_get_info");
1533
- const context = await invoke("webview_extension_context_get");
1532
+ const extensionInfo = await invoke(EXTENSION_COMMANDS.getInfo);
1533
+ const context = await invoke(EXTENSION_COMMANDS.getContext);
1534
1534
  ctx.state.isNativeWindow = true;
1535
1535
  ctx.state.initialized = true;
1536
1536
  ctx.state.extensionInfo = extensionInfo;