@haex-space/vault-sdk 2.5.74 → 2.5.76

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.
@@ -17,6 +17,8 @@ declare const HAEXTENSION_EVENTS: {
17
17
  readonly CONTEXT_CHANGED: "haextension:context:changed";
18
18
  /** Search request from HaexHub */
19
19
  readonly SEARCH_REQUEST: "haextension:search:request";
20
+ /** File system change detected (from native file watcher) */
21
+ readonly FILE_CHANGED: "filesync:file-changed";
20
22
  };
21
23
  type HaextensionEvent = typeof HAEXTENSION_EVENTS[keyof typeof HAEXTENSION_EVENTS];
22
24
  /**
@@ -167,6 +169,22 @@ interface SearchRequestEvent extends HaexHubEvent {
167
169
  requestId: string;
168
170
  };
169
171
  }
172
+ /**
173
+ * File change type from native file watcher
174
+ */
175
+ type FileChangeType = 'created' | 'modified' | 'removed' | 'any';
176
+ /**
177
+ * File change event from native file watcher
178
+ */
179
+ interface FileChangeEvent extends HaexHubEvent {
180
+ type: typeof HAEXTENSION_EVENTS.FILE_CHANGED;
181
+ /** The sync rule ID that was affected */
182
+ ruleId: string;
183
+ /** Type of change */
184
+ changeType: FileChangeType;
185
+ /** Relative path of the changed file (if available) */
186
+ path?: string;
187
+ }
170
188
  /**
171
189
  * External request from an authorized client (browser extension, CLI, server, etc.)
172
190
  * These requests come through the WebSocket bridge and are routed to the appropriate extension.
@@ -417,4 +435,4 @@ declare class HaexVaultSdkError extends Error {
417
435
  };
418
436
  }
419
437
 
420
- export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, DEFAULT_TIMEOUT as F, getTableName as G, type HaexHubConfig as H, ExternalConnectionState as I, ExternalConnectionErrorCode as J, isExternalClientConnected as K, canExternalClientSendRequests as L, type Migration as M, HaexVaultSdkError as N, HAEXTENSION_EVENTS as O, type PermissionResponse as P, type HaextensionEvent as Q, type RequestedExtension as R, type SearchResult as S, TABLE_SEPARATOR as T, EXTERNAL_EVENTS as U, type ExternalEvent as V, type WebRequestOptions as W, type ExtensionInfo as a, type MigrationResult as b, type WebResponse as c, type DatabasePermissionRequest as d, type ExternalRequestHandler as e, type ExternalResponse as f, type EventCallback as g, type HaexHubRequest as h, type HaexHubResponse as i, type HaexHubEvent as j, type DatabasePermission as k, type DatabaseQueryParams as l, type DatabaseExecuteParams as m, type DatabaseTableInfo as n, type DatabaseColumnInfo as o, type SearchQuery as p, type SearchRequestEvent as q, type ExternalRequestEvent as r, type ExternalRequest as s, type AuthorizedClient as t, type PendingAuthorization as u, type ExternalAuthDecision as v, type SessionAuthorization as w, type ExternalConnection as x, PermissionStatus as y, ErrorCode as z };
438
+ export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, DEFAULT_TIMEOUT as F, getTableName as G, type HaexHubConfig as H, ExternalConnectionState as I, ExternalConnectionErrorCode as J, isExternalClientConnected as K, canExternalClientSendRequests as L, type Migration as M, HaexVaultSdkError as N, type FileChangeEvent as O, type PermissionResponse as P, type FileChangeType as Q, type RequestedExtension as R, type SearchResult as S, TABLE_SEPARATOR as T, HAEXTENSION_EVENTS as U, type HaextensionEvent as V, type WebRequestOptions as W, EXTERNAL_EVENTS as X, type ExternalEvent as Y, type ExtensionInfo as a, type MigrationResult as b, type WebResponse as c, type DatabasePermissionRequest as d, type ExternalRequestHandler as e, type ExternalResponse as f, type EventCallback as g, type HaexHubRequest as h, type HaexHubResponse as i, type HaexHubEvent as j, type DatabasePermission as k, type DatabaseQueryParams as l, type DatabaseExecuteParams as m, type DatabaseTableInfo as n, type DatabaseColumnInfo as o, type SearchQuery as p, type SearchRequestEvent as q, type ExternalRequestEvent as r, type ExternalRequest as s, type AuthorizedClient as t, type PendingAuthorization as u, type ExternalAuthDecision as v, type SessionAuthorization as w, type ExternalConnection as x, PermissionStatus as y, ErrorCode as z };
@@ -17,6 +17,8 @@ declare const HAEXTENSION_EVENTS: {
17
17
  readonly CONTEXT_CHANGED: "haextension:context:changed";
18
18
  /** Search request from HaexHub */
19
19
  readonly SEARCH_REQUEST: "haextension:search:request";
20
+ /** File system change detected (from native file watcher) */
21
+ readonly FILE_CHANGED: "filesync:file-changed";
20
22
  };
21
23
  type HaextensionEvent = typeof HAEXTENSION_EVENTS[keyof typeof HAEXTENSION_EVENTS];
22
24
  /**
@@ -167,6 +169,22 @@ interface SearchRequestEvent extends HaexHubEvent {
167
169
  requestId: string;
168
170
  };
169
171
  }
172
+ /**
173
+ * File change type from native file watcher
174
+ */
175
+ type FileChangeType = 'created' | 'modified' | 'removed' | 'any';
176
+ /**
177
+ * File change event from native file watcher
178
+ */
179
+ interface FileChangeEvent extends HaexHubEvent {
180
+ type: typeof HAEXTENSION_EVENTS.FILE_CHANGED;
181
+ /** The sync rule ID that was affected */
182
+ ruleId: string;
183
+ /** Type of change */
184
+ changeType: FileChangeType;
185
+ /** Relative path of the changed file (if available) */
186
+ path?: string;
187
+ }
170
188
  /**
171
189
  * External request from an authorized client (browser extension, CLI, server, etc.)
172
190
  * These requests come through the WebSocket bridge and are routed to the appropriate extension.
@@ -417,4 +435,4 @@ declare class HaexVaultSdkError extends Error {
417
435
  };
418
436
  }
419
437
 
420
- export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, DEFAULT_TIMEOUT as F, getTableName as G, type HaexHubConfig as H, ExternalConnectionState as I, ExternalConnectionErrorCode as J, isExternalClientConnected as K, canExternalClientSendRequests as L, type Migration as M, HaexVaultSdkError as N, HAEXTENSION_EVENTS as O, type PermissionResponse as P, type HaextensionEvent as Q, type RequestedExtension as R, type SearchResult as S, TABLE_SEPARATOR as T, EXTERNAL_EVENTS as U, type ExternalEvent as V, type WebRequestOptions as W, type ExtensionInfo as a, type MigrationResult as b, type WebResponse as c, type DatabasePermissionRequest as d, type ExternalRequestHandler as e, type ExternalResponse as f, type EventCallback as g, type HaexHubRequest as h, type HaexHubResponse as i, type HaexHubEvent as j, type DatabasePermission as k, type DatabaseQueryParams as l, type DatabaseExecuteParams as m, type DatabaseTableInfo as n, type DatabaseColumnInfo as o, type SearchQuery as p, type SearchRequestEvent as q, type ExternalRequestEvent as r, type ExternalRequest as s, type AuthorizedClient as t, type PendingAuthorization as u, type ExternalAuthDecision as v, type SessionAuthorization as w, type ExternalConnection as x, PermissionStatus as y, ErrorCode as z };
438
+ export { type ApplicationContext as A, type BlockedClient as B, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, DEFAULT_TIMEOUT as F, getTableName as G, type HaexHubConfig as H, ExternalConnectionState as I, ExternalConnectionErrorCode as J, isExternalClientConnected as K, canExternalClientSendRequests as L, type Migration as M, HaexVaultSdkError as N, type FileChangeEvent as O, type PermissionResponse as P, type FileChangeType as Q, type RequestedExtension as R, type SearchResult as S, TABLE_SEPARATOR as T, HAEXTENSION_EVENTS as U, type HaextensionEvent as V, type WebRequestOptions as W, EXTERNAL_EVENTS as X, type ExternalEvent as Y, type ExtensionInfo as a, type MigrationResult as b, type WebResponse as c, type DatabasePermissionRequest as d, type ExternalRequestHandler as e, type ExternalResponse as f, type EventCallback as g, type HaexHubRequest as h, type HaexHubResponse as i, type HaexHubEvent as j, type DatabasePermission as k, type DatabaseQueryParams as l, type DatabaseExecuteParams as m, type DatabaseTableInfo as n, type DatabaseColumnInfo as o, type SearchQuery as p, type SearchRequestEvent as q, type ExternalRequestEvent as r, type ExternalRequest as s, type AuthorizedClient as t, type PendingAuthorization as u, type ExternalAuthDecision as v, type SessionAuthorization as w, type ExternalConnection as x, PermissionStatus as y, ErrorCode as z };
package/dist/vue.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { H as HaexVaultSdk, S as StorageAPI } from './client-DTXGxFqD.mjs';
1
+ import { H as HaexVaultSdk, S as StorageAPI } from './client-C0fkm4FE.mjs';
2
2
  import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
3
3
  import { Ref } from 'vue';
4
- import { H as HaexHubConfig } from './types-DiXJ5SF6.mjs';
4
+ import { H as HaexHubConfig } from './types-CS-ggsXY.mjs';
5
5
 
6
6
  /**
7
7
  * Vue 3 composable for HaexVault SDK
package/dist/vue.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { H as HaexVaultSdk, S as StorageAPI } from './client-C_0ajqhQ.js';
1
+ import { H as HaexVaultSdk, S as StorageAPI } from './client-C8JtjQzm.js';
2
2
  import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
3
3
  import { Ref } from 'vue';
4
- import { H as HaexHubConfig } from './types-DiXJ5SF6.js';
4
+ import { H as HaexHubConfig } from './types-CS-ggsXY.js';
5
5
 
6
6
  /**
7
7
  * Vue 3 composable for HaexVault SDK
package/dist/vue.js CHANGED
@@ -337,7 +337,9 @@ var HAEXTENSION_EVENTS = {
337
337
  /** Context (theme, locale, platform) has changed */
338
338
  CONTEXT_CHANGED: "haextension:context:changed",
339
339
  /** Search request from HaexHub */
340
- SEARCH_REQUEST: "haextension:search:request"
340
+ SEARCH_REQUEST: "haextension:search:request",
341
+ /** File system change detected (from native file watcher) */
342
+ FILE_CHANGED: "filesync:file-changed"
341
343
  };
342
344
  var EXTERNAL_EVENTS = {
343
345
  /** External request from authorized client */
@@ -461,7 +463,14 @@ var FILESYSTEM_COMMANDS = {
461
463
  /** Rename file or directory */
462
464
  rename: "extension_filesystem_rename",
463
465
  /** Copy file or directory */
464
- copy: "extension_filesystem_copy"
466
+ copy: "extension_filesystem_copy",
467
+ // File watcher operations
468
+ /** Start watching a directory for changes */
469
+ watch: "extension_filesystem_watch",
470
+ /** Stop watching a directory */
471
+ unwatch: "extension_filesystem_unwatch",
472
+ /** Check if a directory is being watched */
473
+ isWatching: "extension_filesystem_is_watching"
465
474
  };
466
475
 
467
476
  // src/commands/externalBridge.ts
@@ -828,6 +837,42 @@ var FilesystemAPI = class {
828
837
  { from, to }
829
838
  );
830
839
  }
840
+ // ==========================================================================
841
+ // File Watcher Operations
842
+ // ==========================================================================
843
+ /**
844
+ * Start watching a directory for file changes
845
+ * When files change, the "filesync:file-changed" event is emitted
846
+ * @param ruleId Unique identifier for this watch (e.g., sync rule ID)
847
+ * @param path Absolute path to the directory to watch
848
+ */
849
+ async watch(ruleId, path) {
850
+ await this.client.request(
851
+ FILESYSTEM_COMMANDS.watch,
852
+ { ruleId, path }
853
+ );
854
+ }
855
+ /**
856
+ * Stop watching a directory
857
+ * @param ruleId The rule ID that was used when starting the watch
858
+ */
859
+ async unwatch(ruleId) {
860
+ await this.client.request(
861
+ FILESYSTEM_COMMANDS.unwatch,
862
+ { ruleId }
863
+ );
864
+ }
865
+ /**
866
+ * Check if a directory is currently being watched
867
+ * @param ruleId The rule ID to check
868
+ * @returns True if the directory is being watched
869
+ */
870
+ async isWatching(ruleId) {
871
+ return this.client.request(
872
+ FILESYSTEM_COMMANDS.isWatching,
873
+ { ruleId }
874
+ );
875
+ }
831
876
  };
832
877
 
833
878
  // src/api/web.ts