@haex-space/vault-sdk 4.2.0 → 4.4.0

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.
Files changed (55) hide show
  1. package/README.md +69 -0
  2. package/dist/cli/index.js +2 -1
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/cli/index.mjs +2 -1
  5. package/dist/cli/index.mjs.map +1 -1
  6. package/dist/{client-7bZyiRwE.d.mts → client-BCUfRZvU.d.mts} +261 -13
  7. package/dist/{client-BPwsH1so.d.ts → client-C44dqakd.d.ts} +261 -13
  8. package/dist/haex_bundle_bg.wasm +0 -0
  9. package/dist/index.d.mts +45 -6
  10. package/dist/index.d.ts +45 -6
  11. package/dist/index.js +342 -3
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +339 -4
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/node.d.mts +1 -1
  16. package/dist/node.d.ts +1 -1
  17. package/dist/node.js +2 -1
  18. package/dist/node.js.map +1 -1
  19. package/dist/node.mjs +2 -1
  20. package/dist/node.mjs.map +1 -1
  21. package/dist/nuxt.js +10 -2
  22. package/dist/nuxt.js.map +1 -1
  23. package/dist/nuxt.mjs +10 -2
  24. package/dist/nuxt.mjs.map +1 -1
  25. package/dist/react.d.mts +2 -2
  26. package/dist/react.d.ts +2 -2
  27. package/dist/react.js +318 -3
  28. package/dist/react.js.map +1 -1
  29. package/dist/react.mjs +318 -3
  30. package/dist/react.mjs.map +1 -1
  31. package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
  32. package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
  33. package/dist/runtime/nuxt.plugin.client.js +308 -3
  34. package/dist/runtime/nuxt.plugin.client.js.map +1 -1
  35. package/dist/runtime/nuxt.plugin.client.mjs +308 -3
  36. package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
  37. package/dist/svelte.d.mts +2 -2
  38. package/dist/svelte.d.ts +2 -2
  39. package/dist/svelte.js +318 -3
  40. package/dist/svelte.js.map +1 -1
  41. package/dist/svelte.mjs +318 -3
  42. package/dist/svelte.mjs.map +1 -1
  43. package/dist/{types-BwFKGH70.d.mts → types-DoNvKiW_.d.mts} +75 -1
  44. package/dist/{types-BwFKGH70.d.ts → types-DoNvKiW_.d.ts} +75 -1
  45. package/dist/vite.js +8 -1
  46. package/dist/vite.js.map +1 -1
  47. package/dist/vite.mjs +8 -1
  48. package/dist/vite.mjs.map +1 -1
  49. package/dist/vue.d.mts +2 -2
  50. package/dist/vue.d.ts +2 -2
  51. package/dist/vue.js +318 -3
  52. package/dist/vue.js.map +1 -1
  53. package/dist/vue.mjs +318 -3
  54. package/dist/vue.mjs.map +1 -1
  55. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { b as HaexHubEvent, c as EXTERNAL_EVENTS, D as DatabaseQueryResult, M as Migration, d as MigrationResult, W as WebRequestOptions, e as WebResponse, f as EventCallback, H as HaexHubConfig, E as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, R as RequestOptions } from './types-BwFKGH70.js';
1
+ import { b as HaexHubEvent, c as EXTERNAL_EVENTS, D as DatabaseQueryResult, M as Migration, d as MigrationResult, W as WebRequestOptions, e as WebResponse, f as EventCallback, a as ExtensionManifest, H as HaexHubConfig, E as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, R as RequestOptions } from './types-DoNvKiW_.js';
2
2
  import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
3
3
 
4
4
  /**
@@ -544,18 +544,25 @@ interface S3PublicConfig {
544
544
  /** Bucket name */
545
545
  bucket: string;
546
546
  }
547
- /**
548
- * A storage the extension may use, as the host lists it: names only, never
549
- * credentials, endpoint or region.
550
- */
551
- interface StorageBackendInfo {
547
+ /** The protocol of a storage. */
548
+ type StorageBackendType = "s3" | "webdav" | "sftp";
549
+ interface StorageBackendInfoBase {
552
550
  id: string;
553
- /** Backend type (e.g., "s3") */
554
- type: string;
555
551
  /** Name of the storage */
556
552
  name: string;
557
553
  /** Name of the provider the user gave the connection (e.g., "Hetzner") */
558
554
  providerName: string;
555
+ }
556
+ /**
557
+ * A storage the extension may use, as the host lists it: names only, never
558
+ * credentials, endpoint, host, port, host key or region. An S3 storage names
559
+ * its bucket; a WebDAV or SFTP storage names its folder on the server (empty
560
+ * for the root). Check `type` before reading `bucket` or `folder`.
561
+ */
562
+ type StorageBackendInfo = S3BackendInfo | FolderBackendInfo;
563
+ /** An S3 storage, as the host lists it. */
564
+ interface S3BackendInfo extends StorageBackendInfoBase {
565
+ type: "s3";
559
566
  /** Bucket of the storage */
560
567
  bucket: string;
561
568
  /** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
@@ -565,6 +572,51 @@ interface StorageBackendInfo {
565
572
  /** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
566
573
  config?: S3PublicConfig;
567
574
  }
575
+ /** A WebDAV or SFTP storage, as the host lists it. */
576
+ interface FolderBackendInfo extends StorageBackendInfoBase {
577
+ type: "webdav" | "sftp";
578
+ /** Folder of the storage on the server, without `/` at the start or end; empty for the root */
579
+ folder: string;
580
+ }
581
+ /** Fields that would carry a login; the host enters it in its own window and refuses them. */
582
+ interface NoLogin {
583
+ /** Entered by the host and never accepted in a proposal. */
584
+ username?: never;
585
+ /** Entered by the host and never accepted in a proposal. */
586
+ password?: never;
587
+ /** Entered by the host and never accepted in a proposal. */
588
+ privateKey?: never;
589
+ /** Entered by the host and never accepted in a proposal. */
590
+ passphrase?: never;
591
+ /** Confirmed by the user in the host and never accepted in a proposal. */
592
+ hostKey?: never;
593
+ /** Confirmed by the user in the host and never accepted in a proposal. */
594
+ fingerprint?: never;
595
+ }
596
+ /**
597
+ * What an extension proposes for a new WebDAV storage. The host asks for a
598
+ * permission for host and port of `url` (the port of the scheme when absent),
599
+ * shows the proposal to the user and asks for the login in its own window.
600
+ */
601
+ interface WebDavProposal extends NoLogin {
602
+ /** Address of the WebDAV server: `https`, or `http` only in the local network */
603
+ url: string;
604
+ /** Folder of the storage on the server; empty for the root */
605
+ folder: string;
606
+ }
607
+ /**
608
+ * What an extension proposes for a new SFTP storage. The host asks for a
609
+ * permission for `host:port`, shows the server's host key to the user to
610
+ * confirm, and asks for the login in its own window.
611
+ */
612
+ interface SftpProposal extends NoLogin {
613
+ /** Name or IP address of the server, without a scheme */
614
+ host: string;
615
+ /** Port of the server (1–65535); 22 when absent */
616
+ port?: number;
617
+ /** Folder of the storage on the server; empty for the root */
618
+ folder: string;
619
+ }
568
620
  /**
569
621
  * What an extension proposes for a new S3 storage. The host shows it to the
570
622
  * user and asks for credentials in its own window; an extension never sends
@@ -613,9 +665,13 @@ interface S3Config {
613
665
  interface AddBackendRequestBase {
614
666
  /** Display name for the storage */
615
667
  name: string;
616
- /** Backend type (currently only "s3") */
668
+ /** Backend type */
617
669
  type: "s3";
618
670
  }
671
+ interface AddFolderBackendRequestBase {
672
+ /** Display name for the storage */
673
+ name: string;
674
+ }
619
675
  /**
620
676
  * Request to add a new storage on a new connection. The host asks the user to
621
677
  * confirm it and enters credentials in its own window.
@@ -645,6 +701,31 @@ type AddBackendRequest = (AddBackendRequestBase & {
645
701
  };
646
702
  /** A storage the extension may read. */
647
703
  sameProviderAs: string;
704
+ })
705
+ /** Request to add a WebDAV storage on a new connection. */
706
+ | (AddFolderBackendRequestBase & {
707
+ type: "webdav";
708
+ config: WebDavProposal;
709
+ sameProviderAs?: never;
710
+ })
711
+ /** Request to add an SFTP storage on a new connection. */
712
+ | (AddFolderBackendRequestBase & {
713
+ type: "sftp";
714
+ config: SftpProposal;
715
+ sameProviderAs?: never;
716
+ })
717
+ /**
718
+ * Request to add a folder on the connection of an existing WebDAV or SFTP
719
+ * storage of the same type.
720
+ */
721
+ | (AddFolderBackendRequestBase & {
722
+ type: "webdav" | "sftp";
723
+ /** With an existing provider, only the folder may be proposed. */
724
+ config: {
725
+ folder: string;
726
+ } & NoLogin;
727
+ /** A storage of the same type the extension may read. */
728
+ sameProviderAs: string;
648
729
  });
649
730
  /**
650
731
  * Request to change a storage. The host asks the user to confirm it; new
@@ -656,11 +737,13 @@ interface UpdateBackendRequest {
656
737
  /** New display name (optional) */
657
738
  name?: string;
658
739
  /**
659
- * Only the bucket can be changed through the extension request. Credentials
660
- * and connection details never cross the bridge.
740
+ * Only the bucket (S3) or the folder (WebDAV, SFTP) can be changed through
741
+ * the extension request. Credentials and connection details never cross the
742
+ * bridge.
661
743
  */
662
744
  config?: {
663
745
  bucket?: string;
746
+ folder?: string;
664
747
  endpoint?: never;
665
748
  region?: never;
666
749
  pathStyle?: never;
@@ -681,7 +764,8 @@ interface StorageObjectInfo {
681
764
  lastModified?: string;
682
765
  }
683
766
  /**
684
- * Remote Storage API for S3-compatible (and future WebDAV, FTP) backends.
767
+ * Remote Storage API for S3-compatible, WebDAV and SFTP backends. Object calls
768
+ * work alike on every type.
685
769
  *
686
770
  * This API provides access to external storage backends configured centrally
687
771
  * in haex-vault. Extensions can upload/download files without CORS issues.
@@ -768,6 +852,107 @@ declare class BackendManagement {
768
852
  test(backendId: string): Promise<void>;
769
853
  }
770
854
 
855
+ /** Access to an encrypted folder: `readWrite` includes `read`. */
856
+ type EncryptedFolderAccess = "read" | "readWrite";
857
+ /** The encrypted folder the user chose and granted access to. */
858
+ interface EncryptedFolderChoice {
859
+ /** Identifier of the folder, used in every further call (part of the permission target). */
860
+ folderId: string;
861
+ /** Name of the folder as the user sees it. */
862
+ name: string;
863
+ }
864
+ /** An entry of a folder inside an encrypted folder, with its decrypted name. */
865
+ interface EncryptedFolderEntry {
866
+ name: string;
867
+ kind: "file" | "folder";
868
+ /** Size of a file's decrypted content in bytes */
869
+ size?: number;
870
+ /** Last modification, in milliseconds since 1970-01-01 UTC */
871
+ modified?: number;
872
+ }
873
+ /**
874
+ * `details.kind` of a provider error (code {@link HostErrorCode.HTTP}, 2002):
875
+ * the kind of the provider's refusal, never its text.
876
+ */
877
+ type EncryptedFolderProviderErrorKind = "accessDenied" | "network" | "bucketMissing";
878
+ /**
879
+ * Encrypted folders in a remote storage.
880
+ *
881
+ * The host encrypts and decrypts: the extension sees names and decrypted
882
+ * bytes only. No function ever returns object keys, keys, sidecar files or
883
+ * the raw bytes stored at the provider.
884
+ *
885
+ * Access is the runtime-only permission kind `encryptedFolder` (target
886
+ * `<storageId>/<folderId>`, actions `read` and `readWrite`). It can never be
887
+ * declared in a manifest: the host refuses such a bundle. The user grants it
888
+ * in {@link EncryptedFoldersAPI.choose}, or the host asks when a call needs it;
889
+ * the SDK waits for the answer (1004) and retries like for every other kind.
890
+ *
891
+ * Errors (`{ code, message, details? }`, see {@link HostErrorCode}):
892
+ * - 1002 access denied, or no `remoteStorage` permission for the storage
893
+ * - 2002 provider error, `details.kind` is an {@link EncryptedFolderProviderErrorKind}
894
+ * - 3001 invalid `path` or unknown `folderId`
895
+ * - 3010 the entry is damaged ({@link HostErrorCode.ENCRYPTED_DATA_DAMAGED})
896
+ * - 7000 limit exceeded (data too large, run time)
897
+ *
898
+ * @example
899
+ * ```typescript
900
+ * const folder = await sdk.encryptedFolders.choose(storageId, "readWrite");
901
+ * if (folder) {
902
+ * await sdk.encryptedFolders.upload(storageId, folder.folderId, "notes/a.txt",
903
+ * new TextEncoder().encode("Hello"));
904
+ * const entries = await sdk.encryptedFolders.list(storageId, folder.folderId, "notes");
905
+ * const bytes = await sdk.encryptedFolders.download(storageId, folder.folderId, "notes/a.txt");
906
+ * }
907
+ * ```
908
+ */
909
+ declare class EncryptedFoldersAPI {
910
+ private client;
911
+ constructor(client: HaexVaultSdk);
912
+ /**
913
+ * Let the user choose one of the storage's encrypted folders and grant
914
+ * access to it. The host shows its own window and waits for the answer.
915
+ * Needs the `remoteStorage` permission for the storage (else 1002 without
916
+ * asking); 1002 as well when the user refuses.
917
+ * @param storageId - Storage the folder lies in
918
+ * @param access - Access the extension asks for
919
+ * @returns The chosen folder, or `null` when the user closed the chooser without choosing
920
+ */
921
+ choose(storageId: string, access: EncryptedFolderAccess): Promise<EncryptedFolderChoice | null>;
922
+ /**
923
+ * List a folder inside an encrypted folder (permission `read`).
924
+ * @param storageId - Storage the folder lies in
925
+ * @param folderId - Folder from {@link EncryptedFoldersAPI.choose}
926
+ * @param path - Path relative to the encrypted folder; `''` (default) for its root
927
+ * @returns The entries with their decrypted names
928
+ */
929
+ list(storageId: string, folderId: string, path?: string): Promise<EncryptedFolderEntry[]>;
930
+ /**
931
+ * Download and decrypt a file (permission `read`).
932
+ * @param storageId - Storage the folder lies in
933
+ * @param folderId - Folder from {@link EncryptedFoldersAPI.choose}
934
+ * @param path - Path of the file, relative to the encrypted folder
935
+ * @returns The decrypted content
936
+ */
937
+ download(storageId: string, folderId: string, path: string): Promise<Uint8Array>;
938
+ /**
939
+ * Encrypt and upload a file (permission `readWrite`). Missing parent
940
+ * folders are created.
941
+ * @param storageId - Storage the folder lies in
942
+ * @param folderId - Folder from {@link EncryptedFoldersAPI.choose}
943
+ * @param path - Path of the file, relative to the encrypted folder
944
+ * @param data - Content of the file
945
+ */
946
+ upload(storageId: string, folderId: string, path: string, data: Uint8Array): Promise<void>;
947
+ /**
948
+ * Delete a file or folder (permission `readWrite`).
949
+ * @param storageId - Storage the folder lies in
950
+ * @param folderId - Folder from {@link EncryptedFoldersAPI.choose}
951
+ * @param path - Path relative to the encrypted folder
952
+ */
953
+ delete(storageId: string, folderId: string, path: string): Promise<void>;
954
+ }
955
+
771
956
  /**
772
957
  * Device type classification (for UI icons)
773
958
  */
@@ -1715,6 +1900,64 @@ declare class DialogAPI {
1715
1900
  confirm(options: ConfirmOptions): Promise<boolean>;
1716
1901
  }
1717
1902
 
1903
+ /**
1904
+ * A minimal MCP server for the tools an extension offers to the agent of its host (holzi spec 018,
1905
+ * `contracts/mcp-port.md`). It speaks the part of MCP a host needs to list and call tools:
1906
+ * `initialize`, `notifications/initialized`, `ping`, `tools/list`, `tools/call` and
1907
+ * `notifications/cancelled`; every other request is answered with "method not found". It sends no
1908
+ * request of its own, so it never asks the host for anything.
1909
+ *
1910
+ * Titles, descriptions and schemas come from the signed manifest; the extension's code only names a
1911
+ * handler per tool. A tool runs only when it is declared and has a handler, and only with input
1912
+ * that fits its schema.
1913
+ */
1914
+
1915
+ type JsonRpcMessage = Record<string, unknown>;
1916
+ /** What a handler gets besides its input. */
1917
+ interface ToolContext {
1918
+ /** Aborted when the host cancels the call, for example because the user stopped the turn. */
1919
+ signal: AbortSignal;
1920
+ }
1921
+ /**
1922
+ * Runs one tool. A string is returned as text, anything else as JSON text; a thrown error becomes
1923
+ * a tool error the agent sees.
1924
+ */
1925
+ type ToolHandler = (input: Record<string, unknown>, context: ToolContext) => unknown | Promise<unknown>;
1926
+
1927
+ /**
1928
+ * `sdk.tools`: tools an extension offers to the agent of its host (holzi spec 018). Each tool is
1929
+ * declared in the signed manifest (`tools`) with its title, description, input schema and effect;
1930
+ * the extension's code only registers the function that runs it:
1931
+ *
1932
+ * ```ts
1933
+ * sdk.tools.register("count_unread", async (input, { signal }) => countUnread(input.role, signal));
1934
+ * ```
1935
+ *
1936
+ * The host lists and calls the tools over MCP on the extension's port (`ToolsServer`). A call runs
1937
+ * only for a declared tool with input that fits its schema; the host's approval of the call
1938
+ * follows the declared effect.
1939
+ */
1940
+
1941
+ interface ToolsApiOptions {
1942
+ /** The manifest the SDK was built with; its `tools` are what may be registered. */
1943
+ manifest: () => ExtensionManifest | undefined;
1944
+ /** Sends one MCP message to the host on the extension's port. */
1945
+ send: (message: JsonRpcMessage) => void;
1946
+ }
1947
+ declare class ToolsAPI {
1948
+ private readonly options;
1949
+ private readonly handlers;
1950
+ private readonly server;
1951
+ constructor(options: ToolsApiOptions);
1952
+ /**
1953
+ * Runs `handler` when the host calls the tool `name`. The tool must be declared in the manifest.
1954
+ * Returns a function that unregisters the handler; the host then no longer sees the tool.
1955
+ */
1956
+ register(name: string, handler: ToolHandler): () => void;
1957
+ /** Handles one MCP message from the host. Called by the SDK for `haexspace:mcp` port messages. */
1958
+ receive(message: unknown): Promise<void>;
1959
+ }
1960
+
1718
1961
  /**
1719
1962
  * HaexVault Client
1720
1963
  *
@@ -1755,6 +1998,7 @@ declare class HaexVaultSdk {
1755
1998
  readonly web: WebAPI;
1756
1999
  readonly permissions: PermissionsAPI;
1757
2000
  readonly remoteStorage: RemoteStorageAPI;
2001
+ readonly encryptedFolders: EncryptedFoldersAPI;
1758
2002
  readonly localsend: LocalSendAPI;
1759
2003
  readonly spaces: SpacesAPI;
1760
2004
  readonly shell: ShellAPI;
@@ -1763,6 +2007,8 @@ declare class HaexVaultSdk {
1763
2007
  readonly notifications: NotificationsAPI;
1764
2008
  readonly tab: TabAPI;
1765
2009
  readonly dialog: DialogAPI;
2010
+ /** Tools the extension offers to the agent of its host (holzi spec 018). */
2011
+ readonly tools: ToolsAPI;
1766
2012
  /** Unified action system - register handlers that work for both Bridge and AI requests */
1767
2013
  readonly actions: {
1768
2014
  register: (action: string, handler: ExternalRequestHandler) => (() => void);
@@ -1804,6 +2050,8 @@ declare class HaexVaultSdk {
1804
2050
  private initNative;
1805
2051
  private initIframe;
1806
2052
  private handleEvent;
2053
+ /** Sends one MCP message of the tool connection to the host on the port. */
2054
+ private sendMcpMessage;
1807
2055
  private handleExternalRequestInternal;
1808
2056
  private handleActionRequestInternal;
1809
2057
  private runSetupAsync;
@@ -1811,4 +2059,4 @@ declare class HaexVaultSdk {
1811
2059
  private log;
1812
2060
  }
1813
2061
 
1814
- export { PasswordsAPI as $, type AuthorizedClient as A, type BlockedClient as B, type ConfirmOptions as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type MailMessage as G, HaexVaultSdk as H, type ImapConfig as I, type MailNewMessagesEvent as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type MailboxInfo as N, type MessageEnvelope as O, type NotificationAction as P, type NotificationClickEvent as Q, type NotificationOptions as R, StorageAPI as S, NotificationsAPI as T, type OutgoingAttachment as U, type OutgoingMessage as V, type PasswordInput as W, type PasswordItemFull as X, type PasswordItemSummary as Y, type PasswordKeyValue as Z, type PasswordKeyValueInput as _, type ConnectionSecurity as a, type PendingAuthorization as a0, type PendingTransfer as a1, PermissionsAPI as a2, type AddBackendRequest as a3, type S3Config as a4, type S3Proposal as a5, type S3PublicConfig as a6, RemoteStorageAPI as a7, type StorageBackendInfo as a8, type StorageObjectInfo as a9, WebAPI as aA, canExternalClientSendRequests as aB, isExternalClientConnected as aC, type UpdateBackendRequest as aa, type RequestedExtension as ab, type SelectFileOptions as ac, type SelectFolderOptions as ad, type ServerInfo as ae, type ServerStatus as af, type SessionAuthorization as ag, type SharedSpace as ah, ShellAPI as ai, type ShellCreateOptions as aj, type ShellCreateResponse as ak, type ShellExitEvent as al, type ShellOutputEvent as am, type SmtpConfig as an, type SpaceAccessTokenInfo as ao, type SpaceAssignment as ap, type SpaceInvite as aq, type SpaceKeyGrantInfo as ar, type SpaceMember as as, type SpaceMemberInfo as at, SpacesAPI as au, type SyncBackendInfo as av, TabAPI as aw, type TransferDirection as ax, type TransferProgress as ay, type TransferState as az, type DecryptedSpace as b, type DeepLink as c, type Device as d, type DeviceInfo as e, type DeviceType as f, DialogAPI as g, type DirEntry as h, type ExternalConnection as i, ExternalConnectionErrorCode as j, ExternalConnectionState as k, type ExternalRequest as l, type ExternalRequestEvent as m, type ExternalRequestHandler as n, type ExternalRequestPayload as o, type ExternalResponse as p, FilesystemAPI as q, type KnownPaths as r, LocalSendAPI as s, type LocalSendEvent as t, type FileInfo as u, type LocalSendSettings as v, type MailAccount as w, type MailAddress as x, type Attachment as y, type FetchRange as z };
2062
+ export { type PasswordInput as $, type AuthorizedClient as A, type BlockedClient as B, type ConfirmOptions as C, DatabaseAPI as D, type EncryptedFolderAccess as E, type FileStat as F, type LocalSendSettings as G, HaexVaultSdk as H, type ImapConfig as I, type MailAccount as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type MailAddress as N, type Attachment as O, type FetchRange as P, type MailMessage as Q, type MailNewMessagesEvent as R, StorageAPI as S, type MailboxInfo as T, type MessageEnvelope as U, type NotificationAction as V, type NotificationClickEvent as W, type NotificationOptions as X, NotificationsAPI as Y, type OutgoingAttachment as Z, type OutgoingMessage as _, type ConnectionSecurity as a, type PasswordItemFull as a0, type PasswordItemSummary as a1, type PasswordKeyValue as a2, type PasswordKeyValueInput as a3, PasswordsAPI as a4, type PendingAuthorization as a5, type PendingTransfer as a6, PermissionsAPI as a7, type AddBackendRequest as a8, type FolderBackendInfo as a9, type SpaceInvite as aA, type SpaceKeyGrantInfo as aB, type SpaceMember as aC, type SpaceMemberInfo as aD, SpacesAPI as aE, type SyncBackendInfo as aF, TabAPI as aG, type ToolContext as aH, type ToolHandler as aI, ToolsAPI as aJ, type TransferDirection as aK, type TransferProgress as aL, type TransferState as aM, WebAPI as aN, canExternalClientSendRequests as aO, isExternalClientConnected as aP, type S3BackendInfo as aa, type S3Config as ab, type S3Proposal as ac, type S3PublicConfig as ad, type SftpProposal as ae, RemoteStorageAPI as af, type StorageBackendInfo as ag, type StorageBackendType as ah, type StorageObjectInfo as ai, type UpdateBackendRequest as aj, type WebDavProposal as ak, type RequestedExtension as al, type SelectFileOptions as am, type SelectFolderOptions as an, type ServerInfo as ao, type ServerStatus as ap, type SessionAuthorization as aq, type SharedSpace as ar, ShellAPI as as, type ShellCreateOptions as at, type ShellCreateResponse as au, type ShellExitEvent as av, type ShellOutputEvent as aw, type SmtpConfig as ax, type SpaceAccessTokenInfo as ay, type SpaceAssignment as az, type DecryptedSpace as b, type DeepLink as c, type Device as d, type DeviceInfo as e, type DeviceType as f, DialogAPI as g, type DirEntry as h, type EncryptedFolderChoice as i, type EncryptedFolderEntry as j, type EncryptedFolderProviderErrorKind as k, EncryptedFoldersAPI as l, type ExternalAuthDecision as m, type ExternalConnection as n, ExternalConnectionErrorCode as o, ExternalConnectionState as p, type ExternalRequest as q, type ExternalRequestEvent as r, type ExternalRequestHandler as s, type ExternalRequestPayload as t, type ExternalResponse as u, FilesystemAPI as v, type KnownPaths as w, LocalSendAPI as x, type LocalSendEvent as y, type FileInfo as z };
Binary file
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { H as HaexVaultSdk } from './client-7bZyiRwE.mjs';
2
- export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, D as DatabaseAPI, b as DecryptedSpace, c as DeepLink, d as Device, e as DeviceInfo, f as DeviceType, g as DialogAPI, h as DirEntry, E as ExternalAuthDecision, i as ExternalConnection, j as ExternalConnectionErrorCode, k as ExternalConnectionState, l as ExternalRequest, m as ExternalRequestEvent, n as ExternalRequestHandler, o as ExternalRequestPayload, p as ExternalResponse, F as FileStat, q as FilesystemAPI, I as ImapConfig, K as KnownPath, r as KnownPaths, L as LOCALSEND_EVENTS, s as LocalSendAPI, t as LocalSendEvent, u as LocalSendFileInfo, v as LocalSendSettings, M as MailAPI, w as MailAccount, x as MailAddress, y as MailAttachment, z as MailFetchRange, G as MailMessage, J as MailNewMessagesEvent, N as MailboxInfo, O as MessageEnvelope, P as NotificationAction, Q as NotificationClickEvent, R as NotificationOptions, T as NotificationsAPI, U as OutgoingAttachment, V as OutgoingMessage, W as PasswordInput, X as PasswordItemFull, Y as PasswordItemSummary, Z as PasswordKeyValue, _ as PasswordKeyValueInput, $ as PasswordsAPI, a0 as PendingAuthorization, a1 as PendingTransfer, a2 as PermissionsAPI, a3 as RemoteAddBackendRequest, a4 as RemoteS3Config, a5 as RemoteS3Proposal, a6 as RemoteS3PublicConfig, a7 as RemoteStorageAPI, a8 as RemoteStorageBackendInfo, a9 as RemoteStorageObjectInfo, aa as RemoteUpdateBackendRequest, ab as RequestedExtension, ac as SelectFileOptions, ad as SelectFolderOptions, ae as ServerInfo, af as ServerStatus, ag as SessionAuthorization, ah as SharedSpace, ai as ShellAPI, aj as ShellCreateOptions, ak as ShellCreateResponse, al as ShellExitEvent, am as ShellOutputEvent, an as SmtpConfig, ao as SpaceAccessTokenInfo, ap as SpaceAssignment, aq as SpaceInvite, ar as SpaceKeyGrantInfo, as as SpaceMember, at as SpaceMemberInfo, au as SpacesAPI, av as SyncBackendInfo, aw as TabAPI, ax as TransferDirection, ay as TransferProgress, az as TransferState, aA as WebAPI, aB as canExternalClientSendRequests, aC as isExternalClientConnected } from './client-7bZyiRwE.mjs';
3
- import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-BwFKGH70.mjs';
4
- export { A as ApplicationContext, C as ClaimRequirement, i as ContextChangedEvent, j as DEFAULT_TIMEOUT, k as DatabaseColumnInfo, l as DatabaseExecuteParams, m as DatabasePermission, g as DatabasePermissionRequest, n as DatabaseQueryParams, D as DatabaseQueryResult, o as DatabaseTableInfo, c as EXTERNAL_EVENTS, p as ErrorCode, f as EventCallback, E as ExtensionInfo, a as ExtensionManifest, q as ExtensionRuntimeMode, r as ExternalEvent, F as FileChangeEvent, s as FileChangePayload, t as FileChangeType, u as FilteredSyncTablesResult, v as HAEXTENSION_EVENTS, b as HaexHubEvent, w as HaexHubRequest, x as HaexHubResponse, y as HaexVaultSdkError, z as HaextensionEvent, I as IdentityClaim, B as MAIL_EVENTS, G as MailEvent, J as ManifestI18nEntry, N as NOTIFICATION_EVENTS, K as NotificationEvent, L as PermissionDeniedError, O as PermissionErrorBase, Q as PermissionErrorCode, T as PermissionPromptError, P as PermissionResponse, U as PermissionStatus, R as RequestOptions, V as SHELL_EVENTS, X as SearchQuery, Y as SearchRequestEvent, S as SearchResult, Z as ShellEvent, _ as SyncTablesUpdatedEvent, $ as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a0 as getTableName, a1 as isPermissionDeniedError, a2 as isPermissionError, a3 as isPermissionPromptError } from './types-BwFKGH70.mjs';
1
+ import { H as HaexVaultSdk } from './client-BCUfRZvU.mjs';
2
+ export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, D as DatabaseAPI, b as DecryptedSpace, c as DeepLink, d as Device, e as DeviceInfo, f as DeviceType, g as DialogAPI, h as DirEntry, E as EncryptedFolderAccess, i as EncryptedFolderChoice, j as EncryptedFolderEntry, k as EncryptedFolderProviderErrorKind, l as EncryptedFoldersAPI, m as ExternalAuthDecision, n as ExternalConnection, o as ExternalConnectionErrorCode, p as ExternalConnectionState, q as ExternalRequest, r as ExternalRequestEvent, s as ExternalRequestHandler, t as ExternalRequestPayload, u as ExternalResponse, F as FileStat, v as FilesystemAPI, I as ImapConfig, K as KnownPath, w as KnownPaths, L as LOCALSEND_EVENTS, x as LocalSendAPI, y as LocalSendEvent, z as LocalSendFileInfo, G as LocalSendSettings, M as MailAPI, J as MailAccount, N as MailAddress, O as MailAttachment, P as MailFetchRange, Q as MailMessage, R as MailNewMessagesEvent, T as MailboxInfo, U as MessageEnvelope, V as NotificationAction, W as NotificationClickEvent, X as NotificationOptions, Y as NotificationsAPI, Z as OutgoingAttachment, _ as OutgoingMessage, $ as PasswordInput, a0 as PasswordItemFull, a1 as PasswordItemSummary, a2 as PasswordKeyValue, a3 as PasswordKeyValueInput, a4 as PasswordsAPI, a5 as PendingAuthorization, a6 as PendingTransfer, a7 as PermissionsAPI, a8 as RemoteAddBackendRequest, a9 as RemoteFolderBackendInfo, aa as RemoteS3BackendInfo, ab as RemoteS3Config, ac as RemoteS3Proposal, ad as RemoteS3PublicConfig, ae as RemoteSftpProposal, af as RemoteStorageAPI, ag as RemoteStorageBackendInfo, ah as RemoteStorageBackendType, ai as RemoteStorageObjectInfo, aj as RemoteUpdateBackendRequest, ak as RemoteWebDavProposal, al as RequestedExtension, am as SelectFileOptions, an as SelectFolderOptions, ao as ServerInfo, ap as ServerStatus, aq as SessionAuthorization, ar as SharedSpace, as as ShellAPI, at as ShellCreateOptions, au as ShellCreateResponse, av as ShellExitEvent, aw as ShellOutputEvent, ax as SmtpConfig, ay as SpaceAccessTokenInfo, az as SpaceAssignment, aA as SpaceInvite, aB as SpaceKeyGrantInfo, aC as SpaceMember, aD as SpaceMemberInfo, aE as SpacesAPI, aF as SyncBackendInfo, aG as TabAPI, aH as ToolContext, aI as ToolHandler, aJ as ToolsAPI, aK as TransferDirection, aL as TransferProgress, aM as TransferState, aN as WebAPI, aO as canExternalClientSendRequests, aP as isExternalClientConnected } from './client-BCUfRZvU.mjs';
3
+ import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-DoNvKiW_.mjs';
4
+ export { A as ApplicationContext, C as ClaimRequirement, i as ContextChangedEvent, j as DEFAULT_TIMEOUT, k as DatabaseColumnInfo, l as DatabaseExecuteParams, m as DatabasePermission, g as DatabasePermissionRequest, n as DatabaseQueryParams, D as DatabaseQueryResult, o as DatabaseTableInfo, c as EXTERNAL_EVENTS, p as ErrorCode, f as EventCallback, E as ExtensionInfo, a as ExtensionManifest, q as ExtensionRuntimeMode, r as ExternalEvent, F as FileChangeEvent, s as FileChangePayload, t as FileChangeType, u as FilteredSyncTablesResult, v as HAEXTENSION_EVENTS, b as HaexHubEvent, w as HaexHubRequest, x as HaexHubResponse, y as HaexVaultSdkError, z as HaextensionEvent, B as HostErrorCode, I as IdentityClaim, G as MAIL_EVENTS, J as MailEvent, K as ManifestI18nEntry, L as ManifestTool, N as ManifestToolEffect, O as NOTIFICATION_EVENTS, Q as NotificationEvent, T as PermissionDeniedError, U as PermissionErrorBase, V as PermissionErrorCode, X as PermissionPromptError, P as PermissionResponse, Y as PermissionStatus, R as RequestOptions, Z as SHELL_EVENTS, _ as SearchQuery, $ as SearchRequestEvent, S as SearchResult, a0 as ShellEvent, a1 as SyncTablesUpdatedEvent, a2 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a3 as getTableName, a4 as isPermissionDeniedError, a5 as isPermissionError, a6 as isPermissionPromptError } from './types-DoNvKiW_.mjs';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
6
6
  import 'drizzle-orm/sqlite-proxy';
7
7
 
@@ -82,6 +82,31 @@ declare function installBaseTag(): void;
82
82
  */
83
83
  declare function installPolyfills(): void;
84
84
 
85
+ /**
86
+ * Encrypted Folder Commands
87
+ *
88
+ * Commands for encrypted folders in a remote storage. The host encrypts and
89
+ * decrypts; an extension only ever sees names and decrypted bytes.
90
+ * These commands are used for both:
91
+ * - Tauri invoke (WebView extensions)
92
+ * - postMessage (iframe extensions)
93
+ *
94
+ * Naming convention: `extension_encrypted_folder_<action>`
95
+ */
96
+ declare const ENCRYPTED_FOLDER_COMMANDS: {
97
+ /** Let the user pick an encrypted folder of a storage and grant access to it */
98
+ readonly choose: "extension_encrypted_folder_choose";
99
+ /** List the entries of a folder inside an encrypted folder */
100
+ readonly list: "extension_encrypted_folder_list";
101
+ /** Download and decrypt a file */
102
+ readonly download: "extension_encrypted_folder_download";
103
+ /** Encrypt and upload a file */
104
+ readonly upload: "extension_encrypted_folder_upload";
105
+ /** Delete a file or folder */
106
+ readonly delete: "extension_encrypted_folder_delete";
107
+ };
108
+ type EncryptedFolderCommand = (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS];
109
+
85
110
  /**
86
111
  * Passwords Commands
87
112
  *
@@ -325,6 +350,13 @@ declare const HAEXSPACE_MESSAGE_TYPES: {
325
350
  * Payload: `{ type: PORT_READY }` — no data.
326
351
  */
327
352
  readonly PORT_READY: "haexspace:port:ready";
353
+ /**
354
+ * One MCP message of the tool connection (holzi spec 018), in both directions over the
355
+ * MessagePort: the host calls the extension's tools, `sdk.tools` answers.
356
+ *
357
+ * Payload: `{ type: MCP, message }`, where `message` is a JSON-RPC 2.0 object.
358
+ */
359
+ readonly MCP: "haexspace:mcp";
328
360
  };
329
361
  type HaexspaceMessageType = (typeof HAEXSPACE_MESSAGE_TYPES)[keyof typeof HAEXSPACE_MESSAGE_TYPES];
330
362
 
@@ -756,6 +788,13 @@ declare const TAURI_COMMANDS: {
756
788
  readonly delete: "extension_remote_storage_delete";
757
789
  readonly list: "extension_remote_storage_list";
758
790
  };
791
+ readonly encryptedFolders: {
792
+ readonly choose: "extension_encrypted_folder_choose";
793
+ readonly list: "extension_encrypted_folder_list";
794
+ readonly download: "extension_encrypted_folder_download";
795
+ readonly upload: "extension_encrypted_folder_upload";
796
+ readonly delete: "extension_encrypted_folder_delete";
797
+ };
759
798
  readonly localsend: {
760
799
  readonly init: "localsend_init";
761
800
  readonly getDeviceInfo: "localsend_get_device_info";
@@ -818,7 +857,7 @@ declare const TAURI_COMMANDS: {
818
857
  readonly dismiss: "extension_notifications_dismiss";
819
858
  };
820
859
  };
821
- type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
860
+ type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
822
861
 
823
862
  /**
824
863
  * Crypto utilities for Vault Key Management
@@ -1085,4 +1124,4 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
1085
1124
 
1086
1125
  declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
1087
1126
 
1088
- export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, type ExportedPasskeyKeyPair, type ExportedUserKeypair, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, type MailCommand, NOTIFICATION_COMMANDS, type NotificationCommand, PASSWORD_COMMANDS, type PasskeyKeyPair, type PasswordCommand, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand, type StorageConfig, type ErrorResponse as SyncServerErrorResponse, type ServerInfo as SyncServerInfo, type LoginRequest as SyncServerLoginRequest, type LoginResponse as SyncServerLoginResponse, type RefreshRequest as SyncServerRefreshRequest, TAURI_COMMANDS, type TauriCommand, type UserKeypair, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, unwrapKey, verifyClaimPresentationAsync, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
1127
+ export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, ENCRYPTED_FOLDER_COMMANDS, type EncryptedFolderCommand, type ExportedPasskeyKeyPair, type ExportedUserKeypair, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, type MailCommand, NOTIFICATION_COMMANDS, type NotificationCommand, PASSWORD_COMMANDS, type PasskeyKeyPair, type PasswordCommand, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand, type StorageConfig, type ErrorResponse as SyncServerErrorResponse, type ServerInfo as SyncServerInfo, type LoginRequest as SyncServerLoginRequest, type LoginResponse as SyncServerLoginResponse, type RefreshRequest as SyncServerRefreshRequest, TAURI_COMMANDS, type TauriCommand, type UserKeypair, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, unwrapKey, verifyClaimPresentationAsync, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { H as HaexVaultSdk } from './client-BPwsH1so.js';
2
- export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, D as DatabaseAPI, b as DecryptedSpace, c as DeepLink, d as Device, e as DeviceInfo, f as DeviceType, g as DialogAPI, h as DirEntry, E as ExternalAuthDecision, i as ExternalConnection, j as ExternalConnectionErrorCode, k as ExternalConnectionState, l as ExternalRequest, m as ExternalRequestEvent, n as ExternalRequestHandler, o as ExternalRequestPayload, p as ExternalResponse, F as FileStat, q as FilesystemAPI, I as ImapConfig, K as KnownPath, r as KnownPaths, L as LOCALSEND_EVENTS, s as LocalSendAPI, t as LocalSendEvent, u as LocalSendFileInfo, v as LocalSendSettings, M as MailAPI, w as MailAccount, x as MailAddress, y as MailAttachment, z as MailFetchRange, G as MailMessage, J as MailNewMessagesEvent, N as MailboxInfo, O as MessageEnvelope, P as NotificationAction, Q as NotificationClickEvent, R as NotificationOptions, T as NotificationsAPI, U as OutgoingAttachment, V as OutgoingMessage, W as PasswordInput, X as PasswordItemFull, Y as PasswordItemSummary, Z as PasswordKeyValue, _ as PasswordKeyValueInput, $ as PasswordsAPI, a0 as PendingAuthorization, a1 as PendingTransfer, a2 as PermissionsAPI, a3 as RemoteAddBackendRequest, a4 as RemoteS3Config, a5 as RemoteS3Proposal, a6 as RemoteS3PublicConfig, a7 as RemoteStorageAPI, a8 as RemoteStorageBackendInfo, a9 as RemoteStorageObjectInfo, aa as RemoteUpdateBackendRequest, ab as RequestedExtension, ac as SelectFileOptions, ad as SelectFolderOptions, ae as ServerInfo, af as ServerStatus, ag as SessionAuthorization, ah as SharedSpace, ai as ShellAPI, aj as ShellCreateOptions, ak as ShellCreateResponse, al as ShellExitEvent, am as ShellOutputEvent, an as SmtpConfig, ao as SpaceAccessTokenInfo, ap as SpaceAssignment, aq as SpaceInvite, ar as SpaceKeyGrantInfo, as as SpaceMember, at as SpaceMemberInfo, au as SpacesAPI, av as SyncBackendInfo, aw as TabAPI, ax as TransferDirection, ay as TransferProgress, az as TransferState, aA as WebAPI, aB as canExternalClientSendRequests, aC as isExternalClientConnected } from './client-BPwsH1so.js';
3
- import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-BwFKGH70.js';
4
- export { A as ApplicationContext, C as ClaimRequirement, i as ContextChangedEvent, j as DEFAULT_TIMEOUT, k as DatabaseColumnInfo, l as DatabaseExecuteParams, m as DatabasePermission, g as DatabasePermissionRequest, n as DatabaseQueryParams, D as DatabaseQueryResult, o as DatabaseTableInfo, c as EXTERNAL_EVENTS, p as ErrorCode, f as EventCallback, E as ExtensionInfo, a as ExtensionManifest, q as ExtensionRuntimeMode, r as ExternalEvent, F as FileChangeEvent, s as FileChangePayload, t as FileChangeType, u as FilteredSyncTablesResult, v as HAEXTENSION_EVENTS, b as HaexHubEvent, w as HaexHubRequest, x as HaexHubResponse, y as HaexVaultSdkError, z as HaextensionEvent, I as IdentityClaim, B as MAIL_EVENTS, G as MailEvent, J as ManifestI18nEntry, N as NOTIFICATION_EVENTS, K as NotificationEvent, L as PermissionDeniedError, O as PermissionErrorBase, Q as PermissionErrorCode, T as PermissionPromptError, P as PermissionResponse, U as PermissionStatus, R as RequestOptions, V as SHELL_EVENTS, X as SearchQuery, Y as SearchRequestEvent, S as SearchResult, Z as ShellEvent, _ as SyncTablesUpdatedEvent, $ as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a0 as getTableName, a1 as isPermissionDeniedError, a2 as isPermissionError, a3 as isPermissionPromptError } from './types-BwFKGH70.js';
1
+ import { H as HaexVaultSdk } from './client-C44dqakd.js';
2
+ export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, D as DatabaseAPI, b as DecryptedSpace, c as DeepLink, d as Device, e as DeviceInfo, f as DeviceType, g as DialogAPI, h as DirEntry, E as EncryptedFolderAccess, i as EncryptedFolderChoice, j as EncryptedFolderEntry, k as EncryptedFolderProviderErrorKind, l as EncryptedFoldersAPI, m as ExternalAuthDecision, n as ExternalConnection, o as ExternalConnectionErrorCode, p as ExternalConnectionState, q as ExternalRequest, r as ExternalRequestEvent, s as ExternalRequestHandler, t as ExternalRequestPayload, u as ExternalResponse, F as FileStat, v as FilesystemAPI, I as ImapConfig, K as KnownPath, w as KnownPaths, L as LOCALSEND_EVENTS, x as LocalSendAPI, y as LocalSendEvent, z as LocalSendFileInfo, G as LocalSendSettings, M as MailAPI, J as MailAccount, N as MailAddress, O as MailAttachment, P as MailFetchRange, Q as MailMessage, R as MailNewMessagesEvent, T as MailboxInfo, U as MessageEnvelope, V as NotificationAction, W as NotificationClickEvent, X as NotificationOptions, Y as NotificationsAPI, Z as OutgoingAttachment, _ as OutgoingMessage, $ as PasswordInput, a0 as PasswordItemFull, a1 as PasswordItemSummary, a2 as PasswordKeyValue, a3 as PasswordKeyValueInput, a4 as PasswordsAPI, a5 as PendingAuthorization, a6 as PendingTransfer, a7 as PermissionsAPI, a8 as RemoteAddBackendRequest, a9 as RemoteFolderBackendInfo, aa as RemoteS3BackendInfo, ab as RemoteS3Config, ac as RemoteS3Proposal, ad as RemoteS3PublicConfig, ae as RemoteSftpProposal, af as RemoteStorageAPI, ag as RemoteStorageBackendInfo, ah as RemoteStorageBackendType, ai as RemoteStorageObjectInfo, aj as RemoteUpdateBackendRequest, ak as RemoteWebDavProposal, al as RequestedExtension, am as SelectFileOptions, an as SelectFolderOptions, ao as ServerInfo, ap as ServerStatus, aq as SessionAuthorization, ar as SharedSpace, as as ShellAPI, at as ShellCreateOptions, au as ShellCreateResponse, av as ShellExitEvent, aw as ShellOutputEvent, ax as SmtpConfig, ay as SpaceAccessTokenInfo, az as SpaceAssignment, aA as SpaceInvite, aB as SpaceKeyGrantInfo, aC as SpaceMember, aD as SpaceMemberInfo, aE as SpacesAPI, aF as SyncBackendInfo, aG as TabAPI, aH as ToolContext, aI as ToolHandler, aJ as ToolsAPI, aK as TransferDirection, aL as TransferProgress, aM as TransferState, aN as WebAPI, aO as canExternalClientSendRequests, aP as isExternalClientConnected } from './client-C44dqakd.js';
3
+ import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-DoNvKiW_.js';
4
+ export { A as ApplicationContext, C as ClaimRequirement, i as ContextChangedEvent, j as DEFAULT_TIMEOUT, k as DatabaseColumnInfo, l as DatabaseExecuteParams, m as DatabasePermission, g as DatabasePermissionRequest, n as DatabaseQueryParams, D as DatabaseQueryResult, o as DatabaseTableInfo, c as EXTERNAL_EVENTS, p as ErrorCode, f as EventCallback, E as ExtensionInfo, a as ExtensionManifest, q as ExtensionRuntimeMode, r as ExternalEvent, F as FileChangeEvent, s as FileChangePayload, t as FileChangeType, u as FilteredSyncTablesResult, v as HAEXTENSION_EVENTS, b as HaexHubEvent, w as HaexHubRequest, x as HaexHubResponse, y as HaexVaultSdkError, z as HaextensionEvent, B as HostErrorCode, I as IdentityClaim, G as MAIL_EVENTS, J as MailEvent, K as ManifestI18nEntry, L as ManifestTool, N as ManifestToolEffect, O as NOTIFICATION_EVENTS, Q as NotificationEvent, T as PermissionDeniedError, U as PermissionErrorBase, V as PermissionErrorCode, X as PermissionPromptError, P as PermissionResponse, Y as PermissionStatus, R as RequestOptions, Z as SHELL_EVENTS, _ as SearchQuery, $ as SearchRequestEvent, S as SearchResult, a0 as ShellEvent, a1 as SyncTablesUpdatedEvent, a2 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a3 as getTableName, a4 as isPermissionDeniedError, a5 as isPermissionError, a6 as isPermissionPromptError } from './types-DoNvKiW_.js';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.js';
6
6
  import 'drizzle-orm/sqlite-proxy';
7
7
 
@@ -82,6 +82,31 @@ declare function installBaseTag(): void;
82
82
  */
83
83
  declare function installPolyfills(): void;
84
84
 
85
+ /**
86
+ * Encrypted Folder Commands
87
+ *
88
+ * Commands for encrypted folders in a remote storage. The host encrypts and
89
+ * decrypts; an extension only ever sees names and decrypted bytes.
90
+ * These commands are used for both:
91
+ * - Tauri invoke (WebView extensions)
92
+ * - postMessage (iframe extensions)
93
+ *
94
+ * Naming convention: `extension_encrypted_folder_<action>`
95
+ */
96
+ declare const ENCRYPTED_FOLDER_COMMANDS: {
97
+ /** Let the user pick an encrypted folder of a storage and grant access to it */
98
+ readonly choose: "extension_encrypted_folder_choose";
99
+ /** List the entries of a folder inside an encrypted folder */
100
+ readonly list: "extension_encrypted_folder_list";
101
+ /** Download and decrypt a file */
102
+ readonly download: "extension_encrypted_folder_download";
103
+ /** Encrypt and upload a file */
104
+ readonly upload: "extension_encrypted_folder_upload";
105
+ /** Delete a file or folder */
106
+ readonly delete: "extension_encrypted_folder_delete";
107
+ };
108
+ type EncryptedFolderCommand = (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS];
109
+
85
110
  /**
86
111
  * Passwords Commands
87
112
  *
@@ -325,6 +350,13 @@ declare const HAEXSPACE_MESSAGE_TYPES: {
325
350
  * Payload: `{ type: PORT_READY }` — no data.
326
351
  */
327
352
  readonly PORT_READY: "haexspace:port:ready";
353
+ /**
354
+ * One MCP message of the tool connection (holzi spec 018), in both directions over the
355
+ * MessagePort: the host calls the extension's tools, `sdk.tools` answers.
356
+ *
357
+ * Payload: `{ type: MCP, message }`, where `message` is a JSON-RPC 2.0 object.
358
+ */
359
+ readonly MCP: "haexspace:mcp";
328
360
  };
329
361
  type HaexspaceMessageType = (typeof HAEXSPACE_MESSAGE_TYPES)[keyof typeof HAEXSPACE_MESSAGE_TYPES];
330
362
 
@@ -756,6 +788,13 @@ declare const TAURI_COMMANDS: {
756
788
  readonly delete: "extension_remote_storage_delete";
757
789
  readonly list: "extension_remote_storage_list";
758
790
  };
791
+ readonly encryptedFolders: {
792
+ readonly choose: "extension_encrypted_folder_choose";
793
+ readonly list: "extension_encrypted_folder_list";
794
+ readonly download: "extension_encrypted_folder_download";
795
+ readonly upload: "extension_encrypted_folder_upload";
796
+ readonly delete: "extension_encrypted_folder_delete";
797
+ };
759
798
  readonly localsend: {
760
799
  readonly init: "localsend_init";
761
800
  readonly getDeviceInfo: "localsend_get_device_info";
@@ -818,7 +857,7 @@ declare const TAURI_COMMANDS: {
818
857
  readonly dismiss: "extension_notifications_dismiss";
819
858
  };
820
859
  };
821
- type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
860
+ type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
822
861
 
823
862
  /**
824
863
  * Crypto utilities for Vault Key Management
@@ -1085,4 +1124,4 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
1085
1124
 
1086
1125
  declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
1087
1126
 
1088
- export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, type ExportedPasskeyKeyPair, type ExportedUserKeypair, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, type MailCommand, NOTIFICATION_COMMANDS, type NotificationCommand, PASSWORD_COMMANDS, type PasskeyKeyPair, type PasswordCommand, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand, type StorageConfig, type ErrorResponse as SyncServerErrorResponse, type ServerInfo as SyncServerInfo, type LoginRequest as SyncServerLoginRequest, type LoginResponse as SyncServerLoginResponse, type RefreshRequest as SyncServerRefreshRequest, TAURI_COMMANDS, type TauriCommand, type UserKeypair, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, unwrapKey, verifyClaimPresentationAsync, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
1127
+ export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, ENCRYPTED_FOLDER_COMMANDS, type EncryptedFolderCommand, type ExportedPasskeyKeyPair, type ExportedUserKeypair, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, type MailCommand, NOTIFICATION_COMMANDS, type NotificationCommand, PASSWORD_COMMANDS, type PasskeyKeyPair, type PasswordCommand, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand, type StorageConfig, type ErrorResponse as SyncServerErrorResponse, type ServerInfo as SyncServerInfo, type LoginRequest as SyncServerLoginRequest, type LoginResponse as SyncServerLoginResponse, type RefreshRequest as SyncServerRefreshRequest, TAURI_COMMANDS, type TauriCommand, type UserKeypair, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, unwrapKey, verifyClaimPresentationAsync, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };