@haex-space/vault-sdk 2.5.65 → 2.5.68

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.
@@ -70,6 +70,16 @@ var DATABASE_COMMANDS = {
70
70
  registerMigrations: "extension_database_register_migrations"
71
71
  };
72
72
 
73
+ // src/commands/permissions.ts
74
+ var PERMISSIONS_COMMANDS = {
75
+ /** Check web/fetch permission */
76
+ checkWeb: "extension_permissions_check_web",
77
+ /** Check database permission */
78
+ checkDatabase: "extension_permissions_check_database",
79
+ /** Check filesystem permission */
80
+ checkFilesystem: "extension_permissions_check_filesystem"
81
+ };
82
+
73
83
  // src/commands/web.ts
74
84
  var WEB_COMMANDS = {
75
85
  /** Open URL in external browser */
@@ -126,6 +136,12 @@ var FILESYSTEM_COMMANDS = {
126
136
  copy: "extension_filesystem_copy"
127
137
  };
128
138
 
139
+ // src/commands/externalBridge.ts
140
+ var EXTERNAL_BRIDGE_COMMANDS = {
141
+ // Response handling (called by extensions running in WebView)
142
+ /** Respond to an external request */
143
+ respond: "webview_extension_external_respond"};
144
+
129
145
  // src/commands/extension.ts
130
146
  var EXTENSION_COMMANDS = {
131
147
  /** Get application context (theme, locale, etc.) */
@@ -607,7 +623,7 @@ var PermissionsAPI = class {
607
623
  */
608
624
  async checkDatabaseAsync(resource, operation) {
609
625
  const response = await this.client.request(
610
- "permissions.database.check",
626
+ PERMISSIONS_COMMANDS.checkDatabase,
611
627
  {
612
628
  resource,
613
629
  operation
@@ -623,7 +639,7 @@ var PermissionsAPI = class {
623
639
  */
624
640
  async checkWebAsync(url) {
625
641
  const response = await this.client.request(
626
- "permissions.web.check",
642
+ PERMISSIONS_COMMANDS.checkWeb,
627
643
  {
628
644
  url
629
645
  }
@@ -638,7 +654,7 @@ var PermissionsAPI = class {
638
654
  */
639
655
  async checkFilesystemAsync(path, operation) {
640
656
  const response = await this.client.request(
641
- "permissions.filesystem.check",
657
+ PERMISSIONS_COMMANDS.checkFilesystem,
642
658
  {
643
659
  path,
644
660
  operation
@@ -1287,7 +1303,7 @@ async function handleExternalRequest(request, handlers, respond, log) {
1287
1303
  }
1288
1304
  async function respondToExternalRequest(response, request) {
1289
1305
  console.log("[SDK Debug] respondToExternalRequest called with:", JSON.stringify(response, null, 2));
1290
- await request("external.respond", response);
1306
+ await request(EXTERNAL_BRIDGE_COMMANDS.respond, response);
1291
1307
  }
1292
1308
 
1293
1309
  // src/client.ts