@haex-space/vault-sdk 4.1.0 → 4.3.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.
- package/README.md +69 -0
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +2 -1
- package/dist/cli/index.mjs.map +1 -1
- package/dist/{client-Cx4ZyQFL.d.mts → client-CDox5_KH.d.mts} +263 -27
- package/dist/{client-CD5QZi7F.d.ts → client-pppDo5Q3.d.ts} +263 -27
- package/dist/haex_bundle_bg.wasm +0 -0
- package/dist/index.d.mts +45 -6
- package/dist/index.d.ts +45 -6
- package/dist/index.js +363 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +360 -15
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +2 -1
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +2 -1
- package/dist/node.mjs.map +1 -1
- package/dist/nuxt.js +10 -2
- package/dist/nuxt.js.map +1 -1
- package/dist/nuxt.mjs +10 -2
- package/dist/nuxt.mjs.map +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +339 -14
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +339 -14
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
- package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
- package/dist/runtime/nuxt.plugin.client.js +329 -14
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +329 -14
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +339 -14
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +339 -14
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-BwFKGH70.d.mts → types-DoNvKiW_.d.mts} +75 -1
- package/dist/{types-BwFKGH70.d.ts → types-DoNvKiW_.d.ts} +75 -1
- package/dist/vite.js +8 -1
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +8 -1
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +339 -14
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +339 -14
- package/dist/vue.mjs.map +1 -1
- 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-
|
|
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
|
/**
|
|
@@ -545,20 +545,54 @@ interface S3PublicConfig {
|
|
|
545
545
|
bucket: string;
|
|
546
546
|
}
|
|
547
547
|
/**
|
|
548
|
-
*
|
|
548
|
+
* A storage the extension may use, as the host lists it: names only, never
|
|
549
|
+
* credentials, endpoint or region.
|
|
549
550
|
*/
|
|
550
551
|
interface StorageBackendInfo {
|
|
551
552
|
id: string;
|
|
552
553
|
/** Backend type (e.g., "s3") */
|
|
553
554
|
type: string;
|
|
555
|
+
/** Name of the storage */
|
|
554
556
|
name: string;
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
/**
|
|
557
|
+
/** Name of the provider the user gave the connection (e.g., "Hetzner") */
|
|
558
|
+
providerName: string;
|
|
559
|
+
/** Bucket of the storage */
|
|
560
|
+
bucket: string;
|
|
561
|
+
/** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
|
|
562
|
+
enabled?: boolean;
|
|
563
|
+
/** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
|
|
564
|
+
createdAt?: string;
|
|
565
|
+
/** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
|
|
558
566
|
config?: S3PublicConfig;
|
|
559
567
|
}
|
|
560
568
|
/**
|
|
561
|
-
* S3
|
|
569
|
+
* What an extension proposes for a new S3 storage. The host shows it to the
|
|
570
|
+
* user and asks for credentials in its own window; an extension never sends
|
|
571
|
+
* or sees them.
|
|
572
|
+
*/
|
|
573
|
+
interface S3Proposal {
|
|
574
|
+
/** Custom endpoint URL (for non-AWS S3-compatible services); the host may ask for a permission for its host */
|
|
575
|
+
endpoint?: string;
|
|
576
|
+
/** Region; required unless `sameProviderAs` is given */
|
|
577
|
+
region?: string;
|
|
578
|
+
/** Bucket name */
|
|
579
|
+
bucket: string;
|
|
580
|
+
/** Use path-style URLs instead of virtual-hosted-style */
|
|
581
|
+
pathStyle?: boolean;
|
|
582
|
+
/** Credentials are entered by the host and are never accepted in a proposal. */
|
|
583
|
+
accessKeyId?: never;
|
|
584
|
+
/** Credentials are entered by the host and are never accepted in a proposal. */
|
|
585
|
+
secretAccessKey?: never;
|
|
586
|
+
/** Credentials are entered by the host and are never accepted in a proposal. */
|
|
587
|
+
sessionToken?: never;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* S3-compatible backend configuration with credentials.
|
|
591
|
+
*
|
|
592
|
+
* @deprecated Credentials are entered in the host, never passed by an
|
|
593
|
+
* extension: holzi refuses a request that carries `accessKeyId`,
|
|
594
|
+
* `secretAccessKey` or `sessionToken`. Use {@link S3Proposal}. Removed in the
|
|
595
|
+
* next major version.
|
|
562
596
|
*/
|
|
563
597
|
interface S3Config {
|
|
564
598
|
/** Custom endpoint URL (for non-AWS S3-compatible services) */
|
|
@@ -567,37 +601,73 @@ interface S3Config {
|
|
|
567
601
|
region: string;
|
|
568
602
|
/** Bucket name */
|
|
569
603
|
bucket: string;
|
|
570
|
-
/**
|
|
571
|
-
accessKeyId
|
|
572
|
-
/**
|
|
573
|
-
secretAccessKey
|
|
574
|
-
/**
|
|
604
|
+
/** @deprecated Entered in the host. */
|
|
605
|
+
accessKeyId?: string;
|
|
606
|
+
/** @deprecated Entered in the host. */
|
|
607
|
+
secretAccessKey?: string;
|
|
608
|
+
/** @deprecated Entered in the host. */
|
|
575
609
|
sessionToken?: string;
|
|
576
610
|
/** Use path-style URLs instead of virtual-hosted-style */
|
|
577
611
|
pathStyle?: boolean;
|
|
578
612
|
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
*/
|
|
582
|
-
interface AddBackendRequest {
|
|
583
|
-
/** Display name for the backend */
|
|
613
|
+
interface AddBackendRequestBase {
|
|
614
|
+
/** Display name for the storage */
|
|
584
615
|
name: string;
|
|
585
616
|
/** Backend type (currently only "s3") */
|
|
586
617
|
type: "s3";
|
|
587
|
-
/** Configuration (structure depends on type) */
|
|
588
|
-
config: S3Config | Record<string, unknown>;
|
|
589
618
|
}
|
|
590
619
|
/**
|
|
591
|
-
* Request to
|
|
592
|
-
*
|
|
620
|
+
* Request to add a new storage on a new connection. The host asks the user to
|
|
621
|
+
* confirm it and enters credentials in its own window.
|
|
622
|
+
*/
|
|
623
|
+
type AddBackendRequest = (AddBackendRequestBase & {
|
|
624
|
+
/** A credential-free proposal for a new connection; region is required. */
|
|
625
|
+
config: S3Proposal & {
|
|
626
|
+
region: string;
|
|
627
|
+
};
|
|
628
|
+
/** A new connection cannot reuse an existing provider. */
|
|
629
|
+
sameProviderAs?: never;
|
|
630
|
+
})
|
|
631
|
+
/**
|
|
632
|
+
* Request to add a bucket on an existing connection. Endpoint, region and
|
|
633
|
+
* addressing are taken from the referenced storage.
|
|
634
|
+
*/
|
|
635
|
+
| (AddBackendRequestBase & {
|
|
636
|
+
/** With an existing provider, only the bucket may be proposed. */
|
|
637
|
+
config: {
|
|
638
|
+
bucket: string;
|
|
639
|
+
endpoint?: never;
|
|
640
|
+
region?: never;
|
|
641
|
+
pathStyle?: never;
|
|
642
|
+
accessKeyId?: never;
|
|
643
|
+
secretAccessKey?: never;
|
|
644
|
+
sessionToken?: never;
|
|
645
|
+
};
|
|
646
|
+
/** A storage the extension may read. */
|
|
647
|
+
sameProviderAs: string;
|
|
648
|
+
});
|
|
649
|
+
/**
|
|
650
|
+
* Request to change a storage. The host asks the user to confirm it; new
|
|
651
|
+
* credentials are entered only in the host's own window.
|
|
593
652
|
*/
|
|
594
653
|
interface UpdateBackendRequest {
|
|
595
654
|
/** Backend ID to update */
|
|
596
655
|
backendId: string;
|
|
597
656
|
/** New display name (optional) */
|
|
598
657
|
name?: string;
|
|
599
|
-
/**
|
|
600
|
-
|
|
658
|
+
/**
|
|
659
|
+
* Only the bucket can be changed through the extension request. Credentials
|
|
660
|
+
* and connection details never cross the bridge.
|
|
661
|
+
*/
|
|
662
|
+
config?: {
|
|
663
|
+
bucket?: string;
|
|
664
|
+
endpoint?: never;
|
|
665
|
+
region?: never;
|
|
666
|
+
pathStyle?: never;
|
|
667
|
+
accessKeyId?: never;
|
|
668
|
+
secretAccessKey?: never;
|
|
669
|
+
sessionToken?: never;
|
|
670
|
+
};
|
|
601
671
|
}
|
|
602
672
|
/**
|
|
603
673
|
* Object info from list operation
|
|
@@ -672,14 +742,16 @@ declare class BackendManagement {
|
|
|
672
742
|
*/
|
|
673
743
|
list(): Promise<StorageBackendInfo[]>;
|
|
674
744
|
/**
|
|
675
|
-
*
|
|
676
|
-
*
|
|
745
|
+
* Propose a new storage. The host asks the user; credentials are entered
|
|
746
|
+
* only there. Resolves with the new storage, which the extension may then
|
|
747
|
+
* read and write.
|
|
748
|
+
* @param request - The proposal, without credentials
|
|
677
749
|
* @returns Created backend info
|
|
678
750
|
*/
|
|
679
751
|
add(request: AddBackendRequest): Promise<StorageBackendInfo>;
|
|
680
752
|
/**
|
|
681
|
-
*
|
|
682
|
-
* Only provided fields are updated
|
|
753
|
+
* Change a storage after the user confirms it in the host.
|
|
754
|
+
* Only provided fields are updated; new credentials are entered in the host.
|
|
683
755
|
* @param request - Update request with backendId and fields to update
|
|
684
756
|
* @returns Updated backend info
|
|
685
757
|
*/
|
|
@@ -696,6 +768,107 @@ declare class BackendManagement {
|
|
|
696
768
|
test(backendId: string): Promise<void>;
|
|
697
769
|
}
|
|
698
770
|
|
|
771
|
+
/** Access to an encrypted folder: `readWrite` includes `read`. */
|
|
772
|
+
type EncryptedFolderAccess = "read" | "readWrite";
|
|
773
|
+
/** The encrypted folder the user chose and granted access to. */
|
|
774
|
+
interface EncryptedFolderChoice {
|
|
775
|
+
/** Identifier of the folder, used in every further call (part of the permission target). */
|
|
776
|
+
folderId: string;
|
|
777
|
+
/** Name of the folder as the user sees it. */
|
|
778
|
+
name: string;
|
|
779
|
+
}
|
|
780
|
+
/** An entry of a folder inside an encrypted folder, with its decrypted name. */
|
|
781
|
+
interface EncryptedFolderEntry {
|
|
782
|
+
name: string;
|
|
783
|
+
kind: "file" | "folder";
|
|
784
|
+
/** Size of a file's decrypted content in bytes */
|
|
785
|
+
size?: number;
|
|
786
|
+
/** Last modification, in milliseconds since 1970-01-01 UTC */
|
|
787
|
+
modified?: number;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* `details.kind` of a provider error (code {@link HostErrorCode.HTTP}, 2002):
|
|
791
|
+
* the kind of the provider's refusal, never its text.
|
|
792
|
+
*/
|
|
793
|
+
type EncryptedFolderProviderErrorKind = "accessDenied" | "network" | "bucketMissing";
|
|
794
|
+
/**
|
|
795
|
+
* Encrypted folders in a remote storage.
|
|
796
|
+
*
|
|
797
|
+
* The host encrypts and decrypts: the extension sees names and decrypted
|
|
798
|
+
* bytes only. No function ever returns object keys, keys, sidecar files or
|
|
799
|
+
* the raw bytes stored at the provider.
|
|
800
|
+
*
|
|
801
|
+
* Access is the runtime-only permission kind `encryptedFolder` (target
|
|
802
|
+
* `<storageId>/<folderId>`, actions `read` and `readWrite`). It can never be
|
|
803
|
+
* declared in a manifest: the host refuses such a bundle. The user grants it
|
|
804
|
+
* in {@link EncryptedFoldersAPI.choose}, or the host asks when a call needs it;
|
|
805
|
+
* the SDK waits for the answer (1004) and retries like for every other kind.
|
|
806
|
+
*
|
|
807
|
+
* Errors (`{ code, message, details? }`, see {@link HostErrorCode}):
|
|
808
|
+
* - 1002 access denied, or no `remoteStorage` permission for the storage
|
|
809
|
+
* - 2002 provider error, `details.kind` is an {@link EncryptedFolderProviderErrorKind}
|
|
810
|
+
* - 3001 invalid `path` or unknown `folderId`
|
|
811
|
+
* - 3010 the entry is damaged ({@link HostErrorCode.ENCRYPTED_DATA_DAMAGED})
|
|
812
|
+
* - 7000 limit exceeded (data too large, run time)
|
|
813
|
+
*
|
|
814
|
+
* @example
|
|
815
|
+
* ```typescript
|
|
816
|
+
* const folder = await sdk.encryptedFolders.choose(storageId, "readWrite");
|
|
817
|
+
* if (folder) {
|
|
818
|
+
* await sdk.encryptedFolders.upload(storageId, folder.folderId, "notes/a.txt",
|
|
819
|
+
* new TextEncoder().encode("Hello"));
|
|
820
|
+
* const entries = await sdk.encryptedFolders.list(storageId, folder.folderId, "notes");
|
|
821
|
+
* const bytes = await sdk.encryptedFolders.download(storageId, folder.folderId, "notes/a.txt");
|
|
822
|
+
* }
|
|
823
|
+
* ```
|
|
824
|
+
*/
|
|
825
|
+
declare class EncryptedFoldersAPI {
|
|
826
|
+
private client;
|
|
827
|
+
constructor(client: HaexVaultSdk);
|
|
828
|
+
/**
|
|
829
|
+
* Let the user choose one of the storage's encrypted folders and grant
|
|
830
|
+
* access to it. The host shows its own window and waits for the answer.
|
|
831
|
+
* Needs the `remoteStorage` permission for the storage (else 1002 without
|
|
832
|
+
* asking); 1002 as well when the user refuses.
|
|
833
|
+
* @param storageId - Storage the folder lies in
|
|
834
|
+
* @param access - Access the extension asks for
|
|
835
|
+
* @returns The chosen folder, or `null` when the user closed the chooser without choosing
|
|
836
|
+
*/
|
|
837
|
+
choose(storageId: string, access: EncryptedFolderAccess): Promise<EncryptedFolderChoice | null>;
|
|
838
|
+
/**
|
|
839
|
+
* List a folder inside an encrypted folder (permission `read`).
|
|
840
|
+
* @param storageId - Storage the folder lies in
|
|
841
|
+
* @param folderId - Folder from {@link EncryptedFoldersAPI.choose}
|
|
842
|
+
* @param path - Path relative to the encrypted folder; `''` (default) for its root
|
|
843
|
+
* @returns The entries with their decrypted names
|
|
844
|
+
*/
|
|
845
|
+
list(storageId: string, folderId: string, path?: string): Promise<EncryptedFolderEntry[]>;
|
|
846
|
+
/**
|
|
847
|
+
* Download and decrypt a file (permission `read`).
|
|
848
|
+
* @param storageId - Storage the folder lies in
|
|
849
|
+
* @param folderId - Folder from {@link EncryptedFoldersAPI.choose}
|
|
850
|
+
* @param path - Path of the file, relative to the encrypted folder
|
|
851
|
+
* @returns The decrypted content
|
|
852
|
+
*/
|
|
853
|
+
download(storageId: string, folderId: string, path: string): Promise<Uint8Array>;
|
|
854
|
+
/**
|
|
855
|
+
* Encrypt and upload a file (permission `readWrite`). Missing parent
|
|
856
|
+
* folders are created.
|
|
857
|
+
* @param storageId - Storage the folder lies in
|
|
858
|
+
* @param folderId - Folder from {@link EncryptedFoldersAPI.choose}
|
|
859
|
+
* @param path - Path of the file, relative to the encrypted folder
|
|
860
|
+
* @param data - Content of the file
|
|
861
|
+
*/
|
|
862
|
+
upload(storageId: string, folderId: string, path: string, data: Uint8Array): Promise<void>;
|
|
863
|
+
/**
|
|
864
|
+
* Delete a file or folder (permission `readWrite`).
|
|
865
|
+
* @param storageId - Storage the folder lies in
|
|
866
|
+
* @param folderId - Folder from {@link EncryptedFoldersAPI.choose}
|
|
867
|
+
* @param path - Path relative to the encrypted folder
|
|
868
|
+
*/
|
|
869
|
+
delete(storageId: string, folderId: string, path: string): Promise<void>;
|
|
870
|
+
}
|
|
871
|
+
|
|
699
872
|
/**
|
|
700
873
|
* Device type classification (for UI icons)
|
|
701
874
|
*/
|
|
@@ -1643,6 +1816,64 @@ declare class DialogAPI {
|
|
|
1643
1816
|
confirm(options: ConfirmOptions): Promise<boolean>;
|
|
1644
1817
|
}
|
|
1645
1818
|
|
|
1819
|
+
/**
|
|
1820
|
+
* A minimal MCP server for the tools an extension offers to the agent of its host (holzi spec 018,
|
|
1821
|
+
* `contracts/mcp-port.md`). It speaks the part of MCP a host needs to list and call tools:
|
|
1822
|
+
* `initialize`, `notifications/initialized`, `ping`, `tools/list`, `tools/call` and
|
|
1823
|
+
* `notifications/cancelled`; every other request is answered with "method not found". It sends no
|
|
1824
|
+
* request of its own, so it never asks the host for anything.
|
|
1825
|
+
*
|
|
1826
|
+
* Titles, descriptions and schemas come from the signed manifest; the extension's code only names a
|
|
1827
|
+
* handler per tool. A tool runs only when it is declared and has a handler, and only with input
|
|
1828
|
+
* that fits its schema.
|
|
1829
|
+
*/
|
|
1830
|
+
|
|
1831
|
+
type JsonRpcMessage = Record<string, unknown>;
|
|
1832
|
+
/** What a handler gets besides its input. */
|
|
1833
|
+
interface ToolContext {
|
|
1834
|
+
/** Aborted when the host cancels the call, for example because the user stopped the turn. */
|
|
1835
|
+
signal: AbortSignal;
|
|
1836
|
+
}
|
|
1837
|
+
/**
|
|
1838
|
+
* Runs one tool. A string is returned as text, anything else as JSON text; a thrown error becomes
|
|
1839
|
+
* a tool error the agent sees.
|
|
1840
|
+
*/
|
|
1841
|
+
type ToolHandler = (input: Record<string, unknown>, context: ToolContext) => unknown | Promise<unknown>;
|
|
1842
|
+
|
|
1843
|
+
/**
|
|
1844
|
+
* `sdk.tools`: tools an extension offers to the agent of its host (holzi spec 018). Each tool is
|
|
1845
|
+
* declared in the signed manifest (`tools`) with its title, description, input schema and effect;
|
|
1846
|
+
* the extension's code only registers the function that runs it:
|
|
1847
|
+
*
|
|
1848
|
+
* ```ts
|
|
1849
|
+
* sdk.tools.register("count_unread", async (input, { signal }) => countUnread(input.role, signal));
|
|
1850
|
+
* ```
|
|
1851
|
+
*
|
|
1852
|
+
* The host lists and calls the tools over MCP on the extension's port (`ToolsServer`). A call runs
|
|
1853
|
+
* only for a declared tool with input that fits its schema; the host's approval of the call
|
|
1854
|
+
* follows the declared effect.
|
|
1855
|
+
*/
|
|
1856
|
+
|
|
1857
|
+
interface ToolsApiOptions {
|
|
1858
|
+
/** The manifest the SDK was built with; its `tools` are what may be registered. */
|
|
1859
|
+
manifest: () => ExtensionManifest | undefined;
|
|
1860
|
+
/** Sends one MCP message to the host on the extension's port. */
|
|
1861
|
+
send: (message: JsonRpcMessage) => void;
|
|
1862
|
+
}
|
|
1863
|
+
declare class ToolsAPI {
|
|
1864
|
+
private readonly options;
|
|
1865
|
+
private readonly handlers;
|
|
1866
|
+
private readonly server;
|
|
1867
|
+
constructor(options: ToolsApiOptions);
|
|
1868
|
+
/**
|
|
1869
|
+
* Runs `handler` when the host calls the tool `name`. The tool must be declared in the manifest.
|
|
1870
|
+
* Returns a function that unregisters the handler; the host then no longer sees the tool.
|
|
1871
|
+
*/
|
|
1872
|
+
register(name: string, handler: ToolHandler): () => void;
|
|
1873
|
+
/** Handles one MCP message from the host. Called by the SDK for `haexspace:mcp` port messages. */
|
|
1874
|
+
receive(message: unknown): Promise<void>;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1646
1877
|
/**
|
|
1647
1878
|
* HaexVault Client
|
|
1648
1879
|
*
|
|
@@ -1683,6 +1914,7 @@ declare class HaexVaultSdk {
|
|
|
1683
1914
|
readonly web: WebAPI;
|
|
1684
1915
|
readonly permissions: PermissionsAPI;
|
|
1685
1916
|
readonly remoteStorage: RemoteStorageAPI;
|
|
1917
|
+
readonly encryptedFolders: EncryptedFoldersAPI;
|
|
1686
1918
|
readonly localsend: LocalSendAPI;
|
|
1687
1919
|
readonly spaces: SpacesAPI;
|
|
1688
1920
|
readonly shell: ShellAPI;
|
|
@@ -1691,6 +1923,8 @@ declare class HaexVaultSdk {
|
|
|
1691
1923
|
readonly notifications: NotificationsAPI;
|
|
1692
1924
|
readonly tab: TabAPI;
|
|
1693
1925
|
readonly dialog: DialogAPI;
|
|
1926
|
+
/** Tools the extension offers to the agent of its host (holzi spec 018). */
|
|
1927
|
+
readonly tools: ToolsAPI;
|
|
1694
1928
|
/** Unified action system - register handlers that work for both Bridge and AI requests */
|
|
1695
1929
|
readonly actions: {
|
|
1696
1930
|
register: (action: string, handler: ExternalRequestHandler) => (() => void);
|
|
@@ -1732,6 +1966,8 @@ declare class HaexVaultSdk {
|
|
|
1732
1966
|
private initNative;
|
|
1733
1967
|
private initIframe;
|
|
1734
1968
|
private handleEvent;
|
|
1969
|
+
/** Sends one MCP message of the tool connection to the host on the port. */
|
|
1970
|
+
private sendMcpMessage;
|
|
1735
1971
|
private handleExternalRequestInternal;
|
|
1736
1972
|
private handleActionRequestInternal;
|
|
1737
1973
|
private runSetupAsync;
|
|
@@ -1739,4 +1975,4 @@ declare class HaexVaultSdk {
|
|
|
1739
1975
|
private log;
|
|
1740
1976
|
}
|
|
1741
1977
|
|
|
1742
|
-
export {
|
|
1978
|
+
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 S3Config as a9, type SyncBackendInfo as aA, TabAPI as aB, type ToolContext as aC, type ToolHandler as aD, ToolsAPI as aE, type TransferDirection as aF, type TransferProgress as aG, type TransferState as aH, WebAPI as aI, canExternalClientSendRequests as aJ, isExternalClientConnected as aK, type S3Proposal as aa, type S3PublicConfig as ab, RemoteStorageAPI as ac, type StorageBackendInfo as ad, type StorageObjectInfo as ae, type UpdateBackendRequest as af, type RequestedExtension as ag, type SelectFileOptions as ah, type SelectFolderOptions as ai, type ServerInfo as aj, type ServerStatus as ak, type SessionAuthorization as al, type SharedSpace as am, ShellAPI as an, type ShellCreateOptions as ao, type ShellCreateResponse as ap, type ShellExitEvent as aq, type ShellOutputEvent as ar, type SmtpConfig as as, type SpaceAccessTokenInfo as at, type SpaceAssignment as au, type SpaceInvite as av, type SpaceKeyGrantInfo as aw, type SpaceMember as ax, type SpaceMemberInfo as ay, SpacesAPI 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 };
|
package/dist/haex_bundle_bg.wasm
CHANGED
|
Binary file
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultSdk } from './client-
|
|
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
|
|
3
|
-
import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-
|
|
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,
|
|
1
|
+
import { H as HaexVaultSdk } from './client-CDox5_KH.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 RemoteS3Config, aa as RemoteS3Proposal, ab as RemoteS3PublicConfig, ac as RemoteStorageAPI, ad as RemoteStorageBackendInfo, ae as RemoteStorageObjectInfo, af as RemoteUpdateBackendRequest, ag as RequestedExtension, ah as SelectFileOptions, ai as SelectFolderOptions, aj as ServerInfo, ak as ServerStatus, al as SessionAuthorization, am as SharedSpace, an as ShellAPI, ao as ShellCreateOptions, ap as ShellCreateResponse, aq as ShellExitEvent, ar as ShellOutputEvent, as as SmtpConfig, at as SpaceAccessTokenInfo, au as SpaceAssignment, av as SpaceInvite, aw as SpaceKeyGrantInfo, ax as SpaceMember, ay as SpaceMemberInfo, az as SpacesAPI, aA as SyncBackendInfo, aB as TabAPI, aC as ToolContext, aD as ToolHandler, aE as ToolsAPI, aF as TransferDirection, aG as TransferProgress, aH as TransferState, aI as WebAPI, aJ as canExternalClientSendRequests, aK as isExternalClientConnected } from './client-CDox5_KH.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-
|
|
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
|
|
3
|
-
import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-
|
|
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,
|
|
1
|
+
import { H as HaexVaultSdk } from './client-pppDo5Q3.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 RemoteS3Config, aa as RemoteS3Proposal, ab as RemoteS3PublicConfig, ac as RemoteStorageAPI, ad as RemoteStorageBackendInfo, ae as RemoteStorageObjectInfo, af as RemoteUpdateBackendRequest, ag as RequestedExtension, ah as SelectFileOptions, ai as SelectFolderOptions, aj as ServerInfo, ak as ServerStatus, al as SessionAuthorization, am as SharedSpace, an as ShellAPI, ao as ShellCreateOptions, ap as ShellCreateResponse, aq as ShellExitEvent, ar as ShellOutputEvent, as as SmtpConfig, at as SpaceAccessTokenInfo, au as SpaceAssignment, av as SpaceInvite, aw as SpaceKeyGrantInfo, ax as SpaceMember, ay as SpaceMemberInfo, az as SpacesAPI, aA as SyncBackendInfo, aB as TabAPI, aC as ToolContext, aD as ToolHandler, aE as ToolsAPI, aF as TransferDirection, aG as TransferProgress, aH as TransferState, aI as WebAPI, aJ as canExternalClientSendRequests, aK as isExternalClientConnected } from './client-pppDo5Q3.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 };
|