@haex-space/vault-sdk 2.6.5 → 2.7.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/dist/{client-BzH5VGzL.d.ts → client-COvneDz1.d.mts} +14 -3
- package/dist/{client-B1X-GsnG.d.mts → client-DQbCPz57.d.ts} +14 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +61 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -3
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +52 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +52 -2
- 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 +52 -2
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +52 -2
- 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 +52 -2
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +52 -2
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-B1O6KckK.d.mts → types-DmCSegdY.d.mts} +2 -0
- package/dist/{types-B1O6KckK.d.ts → types-DmCSegdY.d.ts} +2 -0
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +52 -2
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +52 -2
- 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, a as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult } 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, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult } from './types-DmCSegdY.mjs';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -939,7 +939,13 @@ declare class LocalSendAPI {
|
|
|
939
939
|
cancelSend(sessionId: string): Promise<void>;
|
|
940
940
|
}
|
|
941
941
|
|
|
942
|
-
|
|
942
|
+
declare const SpaceRoles: {
|
|
943
|
+
readonly OWNER: "owner";
|
|
944
|
+
readonly ADMIN: "admin";
|
|
945
|
+
readonly MEMBER: "member";
|
|
946
|
+
readonly READER: "reader";
|
|
947
|
+
};
|
|
948
|
+
type SpaceRole = (typeof SpaceRoles)[keyof typeof SpaceRoles];
|
|
943
949
|
interface SharedSpace {
|
|
944
950
|
id: string;
|
|
945
951
|
ownerId: string;
|
|
@@ -1205,6 +1211,10 @@ declare class HaexVaultSdk {
|
|
|
1205
1211
|
readonly localsend: LocalSendAPI;
|
|
1206
1212
|
readonly spaces: SpacesAPI;
|
|
1207
1213
|
readonly shell: ShellAPI;
|
|
1214
|
+
/** Unified action system - register handlers that work for both Bridge and AI requests */
|
|
1215
|
+
readonly actions: {
|
|
1216
|
+
register: (action: string, handler: ExternalRequestHandler) => (() => void);
|
|
1217
|
+
};
|
|
1208
1218
|
constructor(config?: HaexHubConfig);
|
|
1209
1219
|
ready(): Promise<void>;
|
|
1210
1220
|
get setupCompleted(): boolean;
|
|
@@ -1243,9 +1253,10 @@ declare class HaexVaultSdk {
|
|
|
1243
1253
|
private initIframe;
|
|
1244
1254
|
private handleEvent;
|
|
1245
1255
|
private handleExternalRequestInternal;
|
|
1256
|
+
private handleActionRequestInternal;
|
|
1246
1257
|
private runSetupAsync;
|
|
1247
1258
|
private notifySubscribersInternal;
|
|
1248
1259
|
private log;
|
|
1249
1260
|
}
|
|
1250
1261
|
|
|
1251
|
-
export { type SpaceMemberInfo as $, type AuthorizedClient as A, type BlockedClient as B, type RequestedExtension as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type SelectFileOptions as G, HaexVaultSdk as H, type SelectFolderOptions as I, type ServerInfo as J, type ServerStatus as K, LOCALSEND_EVENTS as L, type SessionAuthorization as M, type SharedSpace as N, ShellAPI as O, type PendingAuthorization as P, type ShellCreateOptions as Q, RemoteStorageAPI as R, StorageAPI as S, type ShellCreateResponse as T, type UpdateBackendRequest as U, type ShellExitEvent as V, type ShellOutputEvent as W, type SpaceAccessTokenInfo as X, type SpaceAssignment as Y, type SpaceInvite as Z, type SpaceKeyGrantInfo as _, type SpaceRole as a,
|
|
1262
|
+
export { type SpaceMemberInfo as $, type AuthorizedClient as A, type BlockedClient as B, type RequestedExtension as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type SelectFileOptions as G, HaexVaultSdk as H, type SelectFolderOptions as I, type ServerInfo as J, type ServerStatus as K, LOCALSEND_EVENTS as L, type SessionAuthorization as M, type SharedSpace as N, ShellAPI as O, type PendingAuthorization as P, type ShellCreateOptions as Q, RemoteStorageAPI as R, StorageAPI as S, type ShellCreateResponse as T, type UpdateBackendRequest as U, type ShellExitEvent as V, type ShellOutputEvent as W, type SpaceAccessTokenInfo as X, type SpaceAssignment as Y, type SpaceInvite as Z, type SpaceKeyGrantInfo as _, type SpaceRole as a, SpaceRoles as a0, SpacesAPI as a1, type SyncBackendInfo as a2, type TransferDirection as a3, type TransferProgress as a4, type TransferState as a5, WebAPI as a6, canExternalClientSendRequests as a7, isExternalClientConnected as a8, type DecryptedSpace as b, type Device as c, type DeviceInfo as d, type DeviceType as e, type DirEntry as f, type ExternalConnection as g, ExternalConnectionErrorCode as h, ExternalConnectionState as i, type ExternalRequest as j, type ExternalRequestEvent as k, type ExternalRequestHandler as l, type ExternalRequestPayload as m, type ExternalResponse as n, FilesystemAPI as o, LocalSendAPI as p, type LocalSendEvent as q, type FileInfo as r, type LocalSendSettings as s, type PendingTransfer as t, PermissionsAPI as u, type AddBackendRequest as v, type S3Config as w, type S3PublicConfig as x, type StorageBackendInfo as y, type StorageObjectInfo as z };
|
|
@@ -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, a as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult } 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, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult } from './types-DmCSegdY.js';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -939,7 +939,13 @@ declare class LocalSendAPI {
|
|
|
939
939
|
cancelSend(sessionId: string): Promise<void>;
|
|
940
940
|
}
|
|
941
941
|
|
|
942
|
-
|
|
942
|
+
declare const SpaceRoles: {
|
|
943
|
+
readonly OWNER: "owner";
|
|
944
|
+
readonly ADMIN: "admin";
|
|
945
|
+
readonly MEMBER: "member";
|
|
946
|
+
readonly READER: "reader";
|
|
947
|
+
};
|
|
948
|
+
type SpaceRole = (typeof SpaceRoles)[keyof typeof SpaceRoles];
|
|
943
949
|
interface SharedSpace {
|
|
944
950
|
id: string;
|
|
945
951
|
ownerId: string;
|
|
@@ -1205,6 +1211,10 @@ declare class HaexVaultSdk {
|
|
|
1205
1211
|
readonly localsend: LocalSendAPI;
|
|
1206
1212
|
readonly spaces: SpacesAPI;
|
|
1207
1213
|
readonly shell: ShellAPI;
|
|
1214
|
+
/** Unified action system - register handlers that work for both Bridge and AI requests */
|
|
1215
|
+
readonly actions: {
|
|
1216
|
+
register: (action: string, handler: ExternalRequestHandler) => (() => void);
|
|
1217
|
+
};
|
|
1208
1218
|
constructor(config?: HaexHubConfig);
|
|
1209
1219
|
ready(): Promise<void>;
|
|
1210
1220
|
get setupCompleted(): boolean;
|
|
@@ -1243,9 +1253,10 @@ declare class HaexVaultSdk {
|
|
|
1243
1253
|
private initIframe;
|
|
1244
1254
|
private handleEvent;
|
|
1245
1255
|
private handleExternalRequestInternal;
|
|
1256
|
+
private handleActionRequestInternal;
|
|
1246
1257
|
private runSetupAsync;
|
|
1247
1258
|
private notifySubscribersInternal;
|
|
1248
1259
|
private log;
|
|
1249
1260
|
}
|
|
1250
1261
|
|
|
1251
|
-
export { type SpaceMemberInfo as $, type AuthorizedClient as A, type BlockedClient as B, type RequestedExtension as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type SelectFileOptions as G, HaexVaultSdk as H, type SelectFolderOptions as I, type ServerInfo as J, type ServerStatus as K, LOCALSEND_EVENTS as L, type SessionAuthorization as M, type SharedSpace as N, ShellAPI as O, type PendingAuthorization as P, type ShellCreateOptions as Q, RemoteStorageAPI as R, StorageAPI as S, type ShellCreateResponse as T, type UpdateBackendRequest as U, type ShellExitEvent as V, type ShellOutputEvent as W, type SpaceAccessTokenInfo as X, type SpaceAssignment as Y, type SpaceInvite as Z, type SpaceKeyGrantInfo as _, type SpaceRole as a,
|
|
1262
|
+
export { type SpaceMemberInfo as $, type AuthorizedClient as A, type BlockedClient as B, type RequestedExtension as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type SelectFileOptions as G, HaexVaultSdk as H, type SelectFolderOptions as I, type ServerInfo as J, type ServerStatus as K, LOCALSEND_EVENTS as L, type SessionAuthorization as M, type SharedSpace as N, ShellAPI as O, type PendingAuthorization as P, type ShellCreateOptions as Q, RemoteStorageAPI as R, StorageAPI as S, type ShellCreateResponse as T, type UpdateBackendRequest as U, type ShellExitEvent as V, type ShellOutputEvent as W, type SpaceAccessTokenInfo as X, type SpaceAssignment as Y, type SpaceInvite as Z, type SpaceKeyGrantInfo as _, type SpaceRole as a, SpaceRoles as a0, SpacesAPI as a1, type SyncBackendInfo as a2, type TransferDirection as a3, type TransferProgress as a4, type TransferState as a5, WebAPI as a6, canExternalClientSendRequests as a7, isExternalClientConnected as a8, type DecryptedSpace as b, type Device as c, type DeviceInfo as d, type DeviceType as e, type DirEntry as f, type ExternalConnection as g, ExternalConnectionErrorCode as h, ExternalConnectionState as i, type ExternalRequest as j, type ExternalRequestEvent as k, type ExternalRequestHandler as l, type ExternalRequestPayload as m, type ExternalResponse as n, FilesystemAPI as o, LocalSendAPI as p, type LocalSendEvent as q, type FileInfo as r, type LocalSendSettings as s, type PendingTransfer as t, PermissionsAPI as u, type AddBackendRequest as v, type S3Config as w, type S3PublicConfig as x, type StorageBackendInfo as y, type StorageObjectInfo as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as SpaceRole, H as HaexVaultSdk } from './client-
|
|
2
|
-
export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI, b as DecryptedSpace, c as Device, d as DeviceInfo, e as DeviceType, f as DirEntry, E as ExternalAuthDecision, g as ExternalConnection, h as ExternalConnectionErrorCode, i as ExternalConnectionState, j as ExternalRequest, k as ExternalRequestEvent, l as ExternalRequestHandler, m as ExternalRequestPayload, n as ExternalResponse, F as FileStat, o as FilesystemAPI, L as LOCALSEND_EVENTS, p as LocalSendAPI, q as LocalSendEvent, r as LocalSendFileInfo, s as LocalSendSettings, P as PendingAuthorization, t as PendingTransfer, u as PermissionsAPI, v as RemoteAddBackendRequest, w as RemoteS3Config, x as RemoteS3PublicConfig, R as RemoteStorageAPI, y as RemoteStorageBackendInfo, z as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, C as RequestedExtension, G as SelectFileOptions, I as SelectFolderOptions, J as ServerInfo, K as ServerStatus, M as SessionAuthorization, N as SharedSpace, O as ShellAPI, Q as ShellCreateOptions, T as ShellCreateResponse, V as ShellExitEvent, W as ShellOutputEvent, X as SpaceAccessTokenInfo, Y as SpaceAssignment, Z as SpaceInvite, _ as SpaceKeyGrantInfo, $ as SpaceMemberInfo, a0 as
|
|
3
|
-
import { E as ExtensionManifest, 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, a as ExtensionInfo, 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 ManifestI18nEntry, G as PermissionDeniedError, J as PermissionErrorBase, K as PermissionErrorCode, L as PermissionPromptError, P as PermissionResponse, N as PermissionStatus, O as SHELL_EVENTS, Q as SearchQuery, R as SearchRequestEvent, S as SearchResult, T as ShellEvent, U as SyncTablesUpdatedEvent, V as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, X as getTableName, Y as isPermissionDeniedError, Z as isPermissionError, _ as isPermissionPromptError } from './types-
|
|
1
|
+
import { a as SpaceRole, H as HaexVaultSdk } from './client-COvneDz1.mjs';
|
|
2
|
+
export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI, b as DecryptedSpace, c as Device, d as DeviceInfo, e as DeviceType, f as DirEntry, E as ExternalAuthDecision, g as ExternalConnection, h as ExternalConnectionErrorCode, i as ExternalConnectionState, j as ExternalRequest, k as ExternalRequestEvent, l as ExternalRequestHandler, m as ExternalRequestPayload, n as ExternalResponse, F as FileStat, o as FilesystemAPI, L as LOCALSEND_EVENTS, p as LocalSendAPI, q as LocalSendEvent, r as LocalSendFileInfo, s as LocalSendSettings, P as PendingAuthorization, t as PendingTransfer, u as PermissionsAPI, v as RemoteAddBackendRequest, w as RemoteS3Config, x as RemoteS3PublicConfig, R as RemoteStorageAPI, y as RemoteStorageBackendInfo, z as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, C as RequestedExtension, G as SelectFileOptions, I as SelectFolderOptions, J as ServerInfo, K as ServerStatus, M as SessionAuthorization, N as SharedSpace, O as ShellAPI, Q as ShellCreateOptions, T as ShellCreateResponse, V as ShellExitEvent, W as ShellOutputEvent, X as SpaceAccessTokenInfo, Y as SpaceAssignment, Z as SpaceInvite, _ as SpaceKeyGrantInfo, $ as SpaceMemberInfo, a0 as SpaceRoles, a1 as SpacesAPI, a2 as SyncBackendInfo, a3 as TransferDirection, a4 as TransferProgress, a5 as TransferState, a6 as WebAPI, a7 as canExternalClientSendRequests, a8 as isExternalClientConnected } from './client-COvneDz1.mjs';
|
|
3
|
+
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-DmCSegdY.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, a as ExtensionInfo, 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 ManifestI18nEntry, G as PermissionDeniedError, J as PermissionErrorBase, K as PermissionErrorCode, L as PermissionPromptError, P as PermissionResponse, N as PermissionStatus, O as SHELL_EVENTS, Q as SearchQuery, R as SearchRequestEvent, S as SearchResult, T as ShellEvent, U as SyncTablesUpdatedEvent, V as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, X as getTableName, Y as isPermissionDeniedError, Z as isPermissionError, _ as isPermissionPromptError } from './types-DmCSegdY.mjs';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as SpaceRole, H as HaexVaultSdk } from './client-
|
|
2
|
-
export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI, b as DecryptedSpace, c as Device, d as DeviceInfo, e as DeviceType, f as DirEntry, E as ExternalAuthDecision, g as ExternalConnection, h as ExternalConnectionErrorCode, i as ExternalConnectionState, j as ExternalRequest, k as ExternalRequestEvent, l as ExternalRequestHandler, m as ExternalRequestPayload, n as ExternalResponse, F as FileStat, o as FilesystemAPI, L as LOCALSEND_EVENTS, p as LocalSendAPI, q as LocalSendEvent, r as LocalSendFileInfo, s as LocalSendSettings, P as PendingAuthorization, t as PendingTransfer, u as PermissionsAPI, v as RemoteAddBackendRequest, w as RemoteS3Config, x as RemoteS3PublicConfig, R as RemoteStorageAPI, y as RemoteStorageBackendInfo, z as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, C as RequestedExtension, G as SelectFileOptions, I as SelectFolderOptions, J as ServerInfo, K as ServerStatus, M as SessionAuthorization, N as SharedSpace, O as ShellAPI, Q as ShellCreateOptions, T as ShellCreateResponse, V as ShellExitEvent, W as ShellOutputEvent, X as SpaceAccessTokenInfo, Y as SpaceAssignment, Z as SpaceInvite, _ as SpaceKeyGrantInfo, $ as SpaceMemberInfo, a0 as
|
|
3
|
-
import { E as ExtensionManifest, 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, a as ExtensionInfo, 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 ManifestI18nEntry, G as PermissionDeniedError, J as PermissionErrorBase, K as PermissionErrorCode, L as PermissionPromptError, P as PermissionResponse, N as PermissionStatus, O as SHELL_EVENTS, Q as SearchQuery, R as SearchRequestEvent, S as SearchResult, T as ShellEvent, U as SyncTablesUpdatedEvent, V as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, X as getTableName, Y as isPermissionDeniedError, Z as isPermissionError, _ as isPermissionPromptError } from './types-
|
|
1
|
+
import { a as SpaceRole, H as HaexVaultSdk } from './client-DQbCPz57.js';
|
|
2
|
+
export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI, b as DecryptedSpace, c as Device, d as DeviceInfo, e as DeviceType, f as DirEntry, E as ExternalAuthDecision, g as ExternalConnection, h as ExternalConnectionErrorCode, i as ExternalConnectionState, j as ExternalRequest, k as ExternalRequestEvent, l as ExternalRequestHandler, m as ExternalRequestPayload, n as ExternalResponse, F as FileStat, o as FilesystemAPI, L as LOCALSEND_EVENTS, p as LocalSendAPI, q as LocalSendEvent, r as LocalSendFileInfo, s as LocalSendSettings, P as PendingAuthorization, t as PendingTransfer, u as PermissionsAPI, v as RemoteAddBackendRequest, w as RemoteS3Config, x as RemoteS3PublicConfig, R as RemoteStorageAPI, y as RemoteStorageBackendInfo, z as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, C as RequestedExtension, G as SelectFileOptions, I as SelectFolderOptions, J as ServerInfo, K as ServerStatus, M as SessionAuthorization, N as SharedSpace, O as ShellAPI, Q as ShellCreateOptions, T as ShellCreateResponse, V as ShellExitEvent, W as ShellOutputEvent, X as SpaceAccessTokenInfo, Y as SpaceAssignment, Z as SpaceInvite, _ as SpaceKeyGrantInfo, $ as SpaceMemberInfo, a0 as SpaceRoles, a1 as SpacesAPI, a2 as SyncBackendInfo, a3 as TransferDirection, a4 as TransferProgress, a5 as TransferState, a6 as WebAPI, a7 as canExternalClientSendRequests, a8 as isExternalClientConnected } from './client-DQbCPz57.js';
|
|
3
|
+
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-DmCSegdY.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, a as ExtensionInfo, 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 ManifestI18nEntry, G as PermissionDeniedError, J as PermissionErrorBase, K as PermissionErrorCode, L as PermissionPromptError, P as PermissionResponse, N as PermissionStatus, O as SHELL_EVENTS, Q as SearchQuery, R as SearchRequestEvent, S as SearchResult, T as ShellEvent, U as SyncTablesUpdatedEvent, V as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, X as getTableName, Y as isPermissionDeniedError, Z as isPermissionError, _ as isPermissionPromptError } from './types-DmCSegdY.js';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.js';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
package/dist/index.js
CHANGED
|
@@ -684,6 +684,8 @@ var HAEXTENSION_EVENTS = {
|
|
|
684
684
|
var EXTERNAL_EVENTS = {
|
|
685
685
|
/** External request from authorized client */
|
|
686
686
|
REQUEST: "haextension:external:request",
|
|
687
|
+
/** AI action request (tool calls from AI assistant) */
|
|
688
|
+
ACTION_REQUEST: "haextension:action:request",
|
|
687
689
|
/** New external client requesting authorization */
|
|
688
690
|
AUTHORIZATION_REQUEST: "external:authorization-request"
|
|
689
691
|
};
|
|
@@ -2120,6 +2122,24 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
|
|
|
2120
2122
|
} catch (error) {
|
|
2121
2123
|
log("Failed to setup external request listener:", error);
|
|
2122
2124
|
}
|
|
2125
|
+
try {
|
|
2126
|
+
await listen(EXTERNAL_EVENTS.ACTION_REQUEST, (event) => {
|
|
2127
|
+
log("====== AI ACTION REQUEST RECEIVED ======");
|
|
2128
|
+
log("Payload:", JSON.stringify(event.payload));
|
|
2129
|
+
if (event.payload) {
|
|
2130
|
+
onEvent({
|
|
2131
|
+
type: EXTERNAL_EVENTS.ACTION_REQUEST,
|
|
2132
|
+
data: event.payload,
|
|
2133
|
+
timestamp: Date.now()
|
|
2134
|
+
});
|
|
2135
|
+
} else {
|
|
2136
|
+
log("AI action request event has no payload!");
|
|
2137
|
+
}
|
|
2138
|
+
});
|
|
2139
|
+
log("AI action request listener registered successfully");
|
|
2140
|
+
} catch (error) {
|
|
2141
|
+
log("Failed to setup AI action request listener:", error);
|
|
2142
|
+
}
|
|
2123
2143
|
log("Registering file change listener for:", HAEXTENSION_EVENTS.FILE_CHANGED);
|
|
2124
2144
|
try {
|
|
2125
2145
|
await listen(HAEXTENSION_EVENTS.FILE_CHANGED, (event) => {
|
|
@@ -2439,7 +2459,7 @@ function createMessageHandler(config, pendingRequests, extensionInfo, onEvent) {
|
|
|
2439
2459
|
}
|
|
2440
2460
|
};
|
|
2441
2461
|
}
|
|
2442
|
-
function processEvent(event, log, eventListeners, onContextChanged, onExternalRequest) {
|
|
2462
|
+
function processEvent(event, log, eventListeners, onContextChanged, onExternalRequest, onActionRequest) {
|
|
2443
2463
|
if (event.type === HAEXTENSION_EVENTS.CONTEXT_CHANGED) {
|
|
2444
2464
|
const contextEvent = event;
|
|
2445
2465
|
onContextChanged(contextEvent.data.context);
|
|
@@ -2450,6 +2470,13 @@ function processEvent(event, log, eventListeners, onContextChanged, onExternalRe
|
|
|
2450
2470
|
onExternalRequest(externalEvent);
|
|
2451
2471
|
return;
|
|
2452
2472
|
}
|
|
2473
|
+
if (event.type === EXTERNAL_EVENTS.ACTION_REQUEST) {
|
|
2474
|
+
const actionEvent = event;
|
|
2475
|
+
if (onActionRequest) {
|
|
2476
|
+
onActionRequest(actionEvent);
|
|
2477
|
+
}
|
|
2478
|
+
return;
|
|
2479
|
+
}
|
|
2453
2480
|
emitEvent(event, log, eventListeners);
|
|
2454
2481
|
}
|
|
2455
2482
|
function emitEvent(event, log, eventListeners) {
|
|
@@ -2586,6 +2613,12 @@ async function respondToExternalRequest(response, request) {
|
|
|
2586
2613
|
await request(EXTERNAL_BRIDGE_COMMANDS.respond, response);
|
|
2587
2614
|
}
|
|
2588
2615
|
|
|
2616
|
+
// src/commands/ai.ts
|
|
2617
|
+
var AI_COMMANDS = {
|
|
2618
|
+
/** Respond to an AI action request */
|
|
2619
|
+
actionRespond: "ai_action_respond"
|
|
2620
|
+
};
|
|
2621
|
+
|
|
2589
2622
|
// src/client.ts
|
|
2590
2623
|
var HaexVaultSdk = class {
|
|
2591
2624
|
constructor(config = {}) {
|
|
@@ -2607,6 +2640,12 @@ var HaexVaultSdk = class {
|
|
|
2607
2640
|
this.setupHook = null;
|
|
2608
2641
|
// Public APIs
|
|
2609
2642
|
this.orm = null;
|
|
2643
|
+
/** Unified action system - register handlers that work for both Bridge and AI requests */
|
|
2644
|
+
this.actions = {
|
|
2645
|
+
register: (action, handler) => {
|
|
2646
|
+
return this.onExternalRequest(action, handler);
|
|
2647
|
+
}
|
|
2648
|
+
};
|
|
2610
2649
|
this.config = {
|
|
2611
2650
|
debug: config.debug ?? false,
|
|
2612
2651
|
timeout: config.timeout ?? DEFAULT_TIMEOUT,
|
|
@@ -2896,12 +2935,23 @@ var HaexVaultSdk = class {
|
|
|
2896
2935
|
this._context = ctx;
|
|
2897
2936
|
this.notifySubscribersInternal();
|
|
2898
2937
|
},
|
|
2899
|
-
(extEvent) => this.handleExternalRequestInternal(extEvent.data)
|
|
2938
|
+
(extEvent) => this.handleExternalRequestInternal(extEvent.data),
|
|
2939
|
+
(actionEvent) => this.handleActionRequestInternal(actionEvent.data)
|
|
2900
2940
|
);
|
|
2901
2941
|
}
|
|
2902
2942
|
async handleExternalRequestInternal(request) {
|
|
2903
2943
|
await handleExternalRequest(request, this.externalRequestHandlers, this.respondToExternalRequest.bind(this), this.log.bind(this));
|
|
2904
2944
|
}
|
|
2945
|
+
async handleActionRequestInternal(request) {
|
|
2946
|
+
await handleExternalRequest(
|
|
2947
|
+
request,
|
|
2948
|
+
this.externalRequestHandlers,
|
|
2949
|
+
async (response) => {
|
|
2950
|
+
await this.request(AI_COMMANDS.actionRespond, response);
|
|
2951
|
+
},
|
|
2952
|
+
this.log.bind(this)
|
|
2953
|
+
);
|
|
2954
|
+
}
|
|
2905
2955
|
// ==========================================================================
|
|
2906
2956
|
// Private: Setup
|
|
2907
2957
|
// ==========================================================================
|
|
@@ -2959,6 +3009,14 @@ function canExternalClientSendRequests(state) {
|
|
|
2959
3009
|
return state === "paired" /* PAIRED */;
|
|
2960
3010
|
}
|
|
2961
3011
|
|
|
3012
|
+
// src/types/spaces.ts
|
|
3013
|
+
var SpaceRoles = {
|
|
3014
|
+
OWNER: "owner",
|
|
3015
|
+
ADMIN: "admin",
|
|
3016
|
+
MEMBER: "member",
|
|
3017
|
+
READER: "reader"
|
|
3018
|
+
};
|
|
3019
|
+
|
|
2962
3020
|
// src/crypto/verify.ts
|
|
2963
3021
|
function sortObjectKeysRecursively(obj) {
|
|
2964
3022
|
if (typeof obj !== "object" || obj === null) {
|
|
@@ -3597,6 +3655,7 @@ exports.RemoteStorageAPI = RemoteStorageAPI;
|
|
|
3597
3655
|
exports.SHELL_EVENTS = SHELL_EVENTS;
|
|
3598
3656
|
exports.SPACE_COMMANDS = SPACE_COMMANDS;
|
|
3599
3657
|
exports.ShellAPI = ShellAPI;
|
|
3658
|
+
exports.SpaceRoles = SpaceRoles;
|
|
3600
3659
|
exports.SpacesAPI = SpacesAPI;
|
|
3601
3660
|
exports.TABLE_SEPARATOR = TABLE_SEPARATOR;
|
|
3602
3661
|
exports.TAURI_COMMANDS = TAURI_COMMANDS;
|