@haex-space/vault-sdk 2.5.126 → 2.6.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-Bjbn7M-G.d.mts → client-B_S7ntUI.d.mts} +69 -2
- package/dist/{client--kKvwWc0.d.ts → client-Bl2s5tIZ.d.ts} +69 -2
- package/dist/index.d.mts +28 -5
- package/dist/index.d.ts +28 -5
- package/dist/index.js +88 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +87 -2
- 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 +78 -0
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +78 -0
- 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 +78 -0
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +78 -0
- 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 +78 -0
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +78 -0
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-DkB9cExr.d.mts → types-B1O6KckK.d.mts} +11 -1
- package/dist/{types-DkB9cExr.d.ts → types-B1O6KckK.d.ts} +11 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +78 -0
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +78 -0
- 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, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext,
|
|
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-B1O6KckK.mjs';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1095,6 +1095,72 @@ declare class SpacesAPI {
|
|
|
1095
1095
|
listSyncBackendsAsync(): Promise<SyncBackendInfo[]>;
|
|
1096
1096
|
}
|
|
1097
1097
|
|
|
1098
|
+
interface ShellCreateOptions {
|
|
1099
|
+
/** Shell executable (e.g., "/bin/bash"). If omitted, uses $SHELL or /bin/sh. */
|
|
1100
|
+
shell?: string;
|
|
1101
|
+
/** Working directory. If omitted, uses home directory. */
|
|
1102
|
+
cwd?: string;
|
|
1103
|
+
/** Initial terminal columns (default: 80) */
|
|
1104
|
+
cols?: number;
|
|
1105
|
+
/** Initial terminal rows (default: 24) */
|
|
1106
|
+
rows?: number;
|
|
1107
|
+
/** Environment variables to set */
|
|
1108
|
+
env?: Record<string, string>;
|
|
1109
|
+
}
|
|
1110
|
+
interface ShellCreateResponse {
|
|
1111
|
+
sessionId: string;
|
|
1112
|
+
}
|
|
1113
|
+
interface ShellOutputEvent {
|
|
1114
|
+
sessionId: string;
|
|
1115
|
+
data: string;
|
|
1116
|
+
}
|
|
1117
|
+
interface ShellExitEvent {
|
|
1118
|
+
sessionId: string;
|
|
1119
|
+
exitCode: number | null;
|
|
1120
|
+
}
|
|
1121
|
+
declare class ShellAPI {
|
|
1122
|
+
private readonly sdk;
|
|
1123
|
+
constructor(sdk: HaexVaultSdk);
|
|
1124
|
+
/**
|
|
1125
|
+
* Create a new PTY shell session.
|
|
1126
|
+
* Returns a session ID used for subsequent write/resize/close operations.
|
|
1127
|
+
* Listen for shell output via `sdk.shell.onData()`.
|
|
1128
|
+
*/
|
|
1129
|
+
create(options?: ShellCreateOptions): Promise<string>;
|
|
1130
|
+
/**
|
|
1131
|
+
* Write data to a shell session's stdin.
|
|
1132
|
+
* Typically used to forward terminal keystrokes.
|
|
1133
|
+
*/
|
|
1134
|
+
write(sessionId: string, data: string): Promise<void>;
|
|
1135
|
+
/**
|
|
1136
|
+
* Resize a shell session's terminal.
|
|
1137
|
+
* Should be called when the terminal view is resized.
|
|
1138
|
+
*/
|
|
1139
|
+
resize(sessionId: string, cols: number, rows: number): Promise<void>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Close a shell session.
|
|
1142
|
+
* This terminates the underlying PTY process.
|
|
1143
|
+
*/
|
|
1144
|
+
close(sessionId: string): Promise<void>;
|
|
1145
|
+
/**
|
|
1146
|
+
* Register a callback for shell output data.
|
|
1147
|
+
* The callback receives output from the PTY's stdout/stderr.
|
|
1148
|
+
*/
|
|
1149
|
+
onData(callback: EventCallback): void;
|
|
1150
|
+
/**
|
|
1151
|
+
* Register a callback for shell session exit.
|
|
1152
|
+
*/
|
|
1153
|
+
onExit(callback: EventCallback): void;
|
|
1154
|
+
/**
|
|
1155
|
+
* Remove a shell output callback.
|
|
1156
|
+
*/
|
|
1157
|
+
offData(callback: EventCallback): void;
|
|
1158
|
+
/**
|
|
1159
|
+
* Remove a shell exit callback.
|
|
1160
|
+
*/
|
|
1161
|
+
offExit(callback: EventCallback): void;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1098
1164
|
/**
|
|
1099
1165
|
* HaexVault Client
|
|
1100
1166
|
*
|
|
@@ -1128,6 +1194,7 @@ declare class HaexVaultSdk {
|
|
|
1128
1194
|
readonly remoteStorage: RemoteStorageAPI;
|
|
1129
1195
|
readonly localsend: LocalSendAPI;
|
|
1130
1196
|
readonly spaces: SpacesAPI;
|
|
1197
|
+
readonly shell: ShellAPI;
|
|
1131
1198
|
constructor(config?: HaexHubConfig);
|
|
1132
1199
|
ready(): Promise<void>;
|
|
1133
1200
|
get setupCompleted(): boolean;
|
|
@@ -1171,4 +1238,4 @@ declare class HaexVaultSdk {
|
|
|
1171
1238
|
private log;
|
|
1172
1239
|
}
|
|
1173
1240
|
|
|
1174
|
-
export { type
|
|
1241
|
+
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, SpacesAPI as a0, type SyncBackendInfo as a1, type TransferDirection as a2, type TransferProgress as a3, type TransferState as a4, WebAPI as a5, canExternalClientSendRequests as a6, isExternalClientConnected as a7, 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, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext,
|
|
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-B1O6KckK.js';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1095,6 +1095,72 @@ declare class SpacesAPI {
|
|
|
1095
1095
|
listSyncBackendsAsync(): Promise<SyncBackendInfo[]>;
|
|
1096
1096
|
}
|
|
1097
1097
|
|
|
1098
|
+
interface ShellCreateOptions {
|
|
1099
|
+
/** Shell executable (e.g., "/bin/bash"). If omitted, uses $SHELL or /bin/sh. */
|
|
1100
|
+
shell?: string;
|
|
1101
|
+
/** Working directory. If omitted, uses home directory. */
|
|
1102
|
+
cwd?: string;
|
|
1103
|
+
/** Initial terminal columns (default: 80) */
|
|
1104
|
+
cols?: number;
|
|
1105
|
+
/** Initial terminal rows (default: 24) */
|
|
1106
|
+
rows?: number;
|
|
1107
|
+
/** Environment variables to set */
|
|
1108
|
+
env?: Record<string, string>;
|
|
1109
|
+
}
|
|
1110
|
+
interface ShellCreateResponse {
|
|
1111
|
+
sessionId: string;
|
|
1112
|
+
}
|
|
1113
|
+
interface ShellOutputEvent {
|
|
1114
|
+
sessionId: string;
|
|
1115
|
+
data: string;
|
|
1116
|
+
}
|
|
1117
|
+
interface ShellExitEvent {
|
|
1118
|
+
sessionId: string;
|
|
1119
|
+
exitCode: number | null;
|
|
1120
|
+
}
|
|
1121
|
+
declare class ShellAPI {
|
|
1122
|
+
private readonly sdk;
|
|
1123
|
+
constructor(sdk: HaexVaultSdk);
|
|
1124
|
+
/**
|
|
1125
|
+
* Create a new PTY shell session.
|
|
1126
|
+
* Returns a session ID used for subsequent write/resize/close operations.
|
|
1127
|
+
* Listen for shell output via `sdk.shell.onData()`.
|
|
1128
|
+
*/
|
|
1129
|
+
create(options?: ShellCreateOptions): Promise<string>;
|
|
1130
|
+
/**
|
|
1131
|
+
* Write data to a shell session's stdin.
|
|
1132
|
+
* Typically used to forward terminal keystrokes.
|
|
1133
|
+
*/
|
|
1134
|
+
write(sessionId: string, data: string): Promise<void>;
|
|
1135
|
+
/**
|
|
1136
|
+
* Resize a shell session's terminal.
|
|
1137
|
+
* Should be called when the terminal view is resized.
|
|
1138
|
+
*/
|
|
1139
|
+
resize(sessionId: string, cols: number, rows: number): Promise<void>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Close a shell session.
|
|
1142
|
+
* This terminates the underlying PTY process.
|
|
1143
|
+
*/
|
|
1144
|
+
close(sessionId: string): Promise<void>;
|
|
1145
|
+
/**
|
|
1146
|
+
* Register a callback for shell output data.
|
|
1147
|
+
* The callback receives output from the PTY's stdout/stderr.
|
|
1148
|
+
*/
|
|
1149
|
+
onData(callback: EventCallback): void;
|
|
1150
|
+
/**
|
|
1151
|
+
* Register a callback for shell session exit.
|
|
1152
|
+
*/
|
|
1153
|
+
onExit(callback: EventCallback): void;
|
|
1154
|
+
/**
|
|
1155
|
+
* Remove a shell output callback.
|
|
1156
|
+
*/
|
|
1157
|
+
offData(callback: EventCallback): void;
|
|
1158
|
+
/**
|
|
1159
|
+
* Remove a shell exit callback.
|
|
1160
|
+
*/
|
|
1161
|
+
offExit(callback: EventCallback): void;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1098
1164
|
/**
|
|
1099
1165
|
* HaexVault Client
|
|
1100
1166
|
*
|
|
@@ -1128,6 +1194,7 @@ declare class HaexVaultSdk {
|
|
|
1128
1194
|
readonly remoteStorage: RemoteStorageAPI;
|
|
1129
1195
|
readonly localsend: LocalSendAPI;
|
|
1130
1196
|
readonly spaces: SpacesAPI;
|
|
1197
|
+
readonly shell: ShellAPI;
|
|
1131
1198
|
constructor(config?: HaexHubConfig);
|
|
1132
1199
|
ready(): Promise<void>;
|
|
1133
1200
|
get setupCompleted(): boolean;
|
|
@@ -1171,4 +1238,4 @@ declare class HaexVaultSdk {
|
|
|
1171
1238
|
private log;
|
|
1172
1239
|
}
|
|
1173
1240
|
|
|
1174
|
-
export { type
|
|
1241
|
+
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, SpacesAPI as a0, type SyncBackendInfo as a1, type TransferDirection as a2, type TransferProgress as a3, type TransferState as a4, WebAPI as a5, canExternalClientSendRequests as a6, isExternalClientConnected as a7, 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
|
|
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,
|
|
1
|
+
import { a as SpaceRole, H as HaexVaultSdk } from './client-B_S7ntUI.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 SpacesAPI, a1 as SyncBackendInfo, a2 as TransferDirection, a3 as TransferProgress, a4 as TransferState, a5 as WebAPI, a6 as canExternalClientSendRequests, a7 as isExternalClientConnected } from './client-B_S7ntUI.mjs';
|
|
3
|
+
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-B1O6KckK.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-B1O6KckK.mjs';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -530,6 +530,23 @@ declare const SPACE_COMMANDS: {
|
|
|
530
530
|
};
|
|
531
531
|
type SpaceCommand = (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS];
|
|
532
532
|
|
|
533
|
+
/**
|
|
534
|
+
* Shell Commands
|
|
535
|
+
*
|
|
536
|
+
* Commands for shell/PTY operations.
|
|
537
|
+
* Naming convention: `extension_shell_<action>`
|
|
538
|
+
*/
|
|
539
|
+
declare const SHELL_COMMANDS: {
|
|
540
|
+
/** Create a new PTY shell session */
|
|
541
|
+
readonly create: "extension_shell_create";
|
|
542
|
+
/** Write data to a shell session's stdin */
|
|
543
|
+
readonly write: "extension_shell_write";
|
|
544
|
+
/** Resize a shell session's terminal */
|
|
545
|
+
readonly resize: "extension_shell_resize";
|
|
546
|
+
/** Close a shell session */
|
|
547
|
+
readonly close: "extension_shell_close";
|
|
548
|
+
};
|
|
549
|
+
|
|
533
550
|
/**
|
|
534
551
|
* Tauri Command Names
|
|
535
552
|
*
|
|
@@ -656,8 +673,14 @@ declare const TAURI_COMMANDS: {
|
|
|
656
673
|
readonly create: "extension_space_create";
|
|
657
674
|
readonly listBackends: "extension_space_list_backends";
|
|
658
675
|
};
|
|
676
|
+
readonly shell: {
|
|
677
|
+
readonly create: "extension_shell_create";
|
|
678
|
+
readonly write: "extension_shell_write";
|
|
679
|
+
readonly resize: "extension_shell_resize";
|
|
680
|
+
readonly close: "extension_shell_close";
|
|
681
|
+
};
|
|
659
682
|
};
|
|
660
|
-
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];
|
|
683
|
+
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];
|
|
661
684
|
|
|
662
685
|
interface VerifyResult {
|
|
663
686
|
valid: boolean;
|
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
|
|
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,
|
|
1
|
+
import { a as SpaceRole, H as HaexVaultSdk } from './client-Bl2s5tIZ.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 SpacesAPI, a1 as SyncBackendInfo, a2 as TransferDirection, a3 as TransferProgress, a4 as TransferState, a5 as WebAPI, a6 as canExternalClientSendRequests, a7 as isExternalClientConnected } from './client-Bl2s5tIZ.js';
|
|
3
|
+
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-B1O6KckK.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-B1O6KckK.js';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.js';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -530,6 +530,23 @@ declare const SPACE_COMMANDS: {
|
|
|
530
530
|
};
|
|
531
531
|
type SpaceCommand = (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS];
|
|
532
532
|
|
|
533
|
+
/**
|
|
534
|
+
* Shell Commands
|
|
535
|
+
*
|
|
536
|
+
* Commands for shell/PTY operations.
|
|
537
|
+
* Naming convention: `extension_shell_<action>`
|
|
538
|
+
*/
|
|
539
|
+
declare const SHELL_COMMANDS: {
|
|
540
|
+
/** Create a new PTY shell session */
|
|
541
|
+
readonly create: "extension_shell_create";
|
|
542
|
+
/** Write data to a shell session's stdin */
|
|
543
|
+
readonly write: "extension_shell_write";
|
|
544
|
+
/** Resize a shell session's terminal */
|
|
545
|
+
readonly resize: "extension_shell_resize";
|
|
546
|
+
/** Close a shell session */
|
|
547
|
+
readonly close: "extension_shell_close";
|
|
548
|
+
};
|
|
549
|
+
|
|
533
550
|
/**
|
|
534
551
|
* Tauri Command Names
|
|
535
552
|
*
|
|
@@ -656,8 +673,14 @@ declare const TAURI_COMMANDS: {
|
|
|
656
673
|
readonly create: "extension_space_create";
|
|
657
674
|
readonly listBackends: "extension_space_list_backends";
|
|
658
675
|
};
|
|
676
|
+
readonly shell: {
|
|
677
|
+
readonly create: "extension_shell_create";
|
|
678
|
+
readonly write: "extension_shell_write";
|
|
679
|
+
readonly resize: "extension_shell_resize";
|
|
680
|
+
readonly close: "extension_shell_close";
|
|
681
|
+
};
|
|
659
682
|
};
|
|
660
|
-
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];
|
|
683
|
+
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];
|
|
661
684
|
|
|
662
685
|
interface VerifyResult {
|
|
663
686
|
valid: boolean;
|
package/dist/index.js
CHANGED
|
@@ -687,6 +687,12 @@ var EXTERNAL_EVENTS = {
|
|
|
687
687
|
/** New external client requesting authorization */
|
|
688
688
|
AUTHORIZATION_REQUEST: "external:authorization-request"
|
|
689
689
|
};
|
|
690
|
+
var SHELL_EVENTS = {
|
|
691
|
+
/** PTY output data from a shell session */
|
|
692
|
+
OUTPUT: "shell:output",
|
|
693
|
+
/** Shell session has exited */
|
|
694
|
+
EXIT: "shell:exit"
|
|
695
|
+
};
|
|
690
696
|
|
|
691
697
|
// src/types.ts
|
|
692
698
|
var DEFAULT_TIMEOUT = 3e4;
|
|
@@ -993,6 +999,18 @@ var SPACE_COMMANDS = {
|
|
|
993
999
|
listBackends: "extension_space_list_backends"
|
|
994
1000
|
};
|
|
995
1001
|
|
|
1002
|
+
// src/commands/shell.ts
|
|
1003
|
+
var SHELL_COMMANDS = {
|
|
1004
|
+
/** Create a new PTY shell session */
|
|
1005
|
+
create: "extension_shell_create",
|
|
1006
|
+
/** Write data to a shell session's stdin */
|
|
1007
|
+
write: "extension_shell_write",
|
|
1008
|
+
/** Resize a shell session's terminal */
|
|
1009
|
+
resize: "extension_shell_resize",
|
|
1010
|
+
/** Close a shell session */
|
|
1011
|
+
close: "extension_shell_close"
|
|
1012
|
+
};
|
|
1013
|
+
|
|
996
1014
|
// src/commands/index.ts
|
|
997
1015
|
var TAURI_COMMANDS = {
|
|
998
1016
|
database: DATABASE_COMMANDS,
|
|
@@ -1004,7 +1022,8 @@ var TAURI_COMMANDS = {
|
|
|
1004
1022
|
extension: EXTENSION_COMMANDS,
|
|
1005
1023
|
remoteStorage: REMOTE_STORAGE_COMMANDS,
|
|
1006
1024
|
localsend: LOCALSEND_COMMANDS,
|
|
1007
|
-
spaces: SPACE_COMMANDS
|
|
1025
|
+
spaces: SPACE_COMMANDS,
|
|
1026
|
+
shell: SHELL_COMMANDS
|
|
1008
1027
|
};
|
|
1009
1028
|
|
|
1010
1029
|
// src/api/storage.ts
|
|
@@ -1874,6 +1893,71 @@ var SpacesAPI = class {
|
|
|
1874
1893
|
}
|
|
1875
1894
|
};
|
|
1876
1895
|
|
|
1896
|
+
// src/api/shell.ts
|
|
1897
|
+
var ShellAPI = class {
|
|
1898
|
+
constructor(sdk) {
|
|
1899
|
+
this.sdk = sdk;
|
|
1900
|
+
}
|
|
1901
|
+
/**
|
|
1902
|
+
* Create a new PTY shell session.
|
|
1903
|
+
* Returns a session ID used for subsequent write/resize/close operations.
|
|
1904
|
+
* Listen for shell output via `sdk.shell.onData()`.
|
|
1905
|
+
*/
|
|
1906
|
+
async create(options = {}) {
|
|
1907
|
+
const result = await this.sdk.request(
|
|
1908
|
+
SHELL_COMMANDS.create,
|
|
1909
|
+
{ options }
|
|
1910
|
+
);
|
|
1911
|
+
return result.sessionId;
|
|
1912
|
+
}
|
|
1913
|
+
/**
|
|
1914
|
+
* Write data to a shell session's stdin.
|
|
1915
|
+
* Typically used to forward terminal keystrokes.
|
|
1916
|
+
*/
|
|
1917
|
+
async write(sessionId, data) {
|
|
1918
|
+
await this.sdk.request(SHELL_COMMANDS.write, { sessionId, data });
|
|
1919
|
+
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Resize a shell session's terminal.
|
|
1922
|
+
* Should be called when the terminal view is resized.
|
|
1923
|
+
*/
|
|
1924
|
+
async resize(sessionId, cols, rows) {
|
|
1925
|
+
await this.sdk.request(SHELL_COMMANDS.resize, { sessionId, cols, rows });
|
|
1926
|
+
}
|
|
1927
|
+
/**
|
|
1928
|
+
* Close a shell session.
|
|
1929
|
+
* This terminates the underlying PTY process.
|
|
1930
|
+
*/
|
|
1931
|
+
async close(sessionId) {
|
|
1932
|
+
await this.sdk.request(SHELL_COMMANDS.close, { sessionId });
|
|
1933
|
+
}
|
|
1934
|
+
/**
|
|
1935
|
+
* Register a callback for shell output data.
|
|
1936
|
+
* The callback receives output from the PTY's stdout/stderr.
|
|
1937
|
+
*/
|
|
1938
|
+
onData(callback) {
|
|
1939
|
+
this.sdk.on("shell:output", callback);
|
|
1940
|
+
}
|
|
1941
|
+
/**
|
|
1942
|
+
* Register a callback for shell session exit.
|
|
1943
|
+
*/
|
|
1944
|
+
onExit(callback) {
|
|
1945
|
+
this.sdk.on("shell:exit", callback);
|
|
1946
|
+
}
|
|
1947
|
+
/**
|
|
1948
|
+
* Remove a shell output callback.
|
|
1949
|
+
*/
|
|
1950
|
+
offData(callback) {
|
|
1951
|
+
this.sdk.off("shell:output", callback);
|
|
1952
|
+
}
|
|
1953
|
+
/**
|
|
1954
|
+
* Remove a shell exit callback.
|
|
1955
|
+
*/
|
|
1956
|
+
offExit(callback) {
|
|
1957
|
+
this.sdk.off("shell:exit", callback);
|
|
1958
|
+
}
|
|
1959
|
+
};
|
|
1960
|
+
|
|
1877
1961
|
// src/client/tableName.ts
|
|
1878
1962
|
function validatePublicKey(publicKey) {
|
|
1879
1963
|
if (!publicKey || typeof publicKey !== "string" || publicKey.trim() === "") {
|
|
@@ -2499,6 +2583,7 @@ var HaexVaultSdk = class {
|
|
|
2499
2583
|
this.remoteStorage = new RemoteStorageAPI(this);
|
|
2500
2584
|
this.localsend = new LocalSendAPI(this);
|
|
2501
2585
|
this.spaces = new SpacesAPI(this);
|
|
2586
|
+
this.shell = new ShellAPI(this);
|
|
2502
2587
|
installConsoleForwarding(this.config.debug);
|
|
2503
2588
|
this.readyPromise = new Promise((resolve) => {
|
|
2504
2589
|
this.resolveReady = resolve;
|
|
@@ -3472,7 +3557,9 @@ exports.PermissionErrorCode = PermissionErrorCode;
|
|
|
3472
3557
|
exports.PermissionStatus = PermissionStatus;
|
|
3473
3558
|
exports.PermissionsAPI = PermissionsAPI;
|
|
3474
3559
|
exports.RemoteStorageAPI = RemoteStorageAPI;
|
|
3560
|
+
exports.SHELL_EVENTS = SHELL_EVENTS;
|
|
3475
3561
|
exports.SPACE_COMMANDS = SPACE_COMMANDS;
|
|
3562
|
+
exports.ShellAPI = ShellAPI;
|
|
3476
3563
|
exports.SpacesAPI = SpacesAPI;
|
|
3477
3564
|
exports.TABLE_SEPARATOR = TABLE_SEPARATOR;
|
|
3478
3565
|
exports.TAURI_COMMANDS = TAURI_COMMANDS;
|