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