@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
package/dist/node.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { H as HaextensionConfig, g as getExtensionDir, r as readHaextensionConfig } from './config-D_HXjsEV.mjs';
|
|
2
|
-
import { E as ExtensionManifest } from './types-
|
|
2
|
+
import { E as ExtensionManifest } from './types-B1O6KckK.mjs';
|
|
3
3
|
|
|
4
4
|
interface ReadManifestOptions {
|
|
5
5
|
/** Root directory of the project */
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { H as HaextensionConfig, g as getExtensionDir, r as readHaextensionConfig } from './config-D_HXjsEV.js';
|
|
2
|
-
import { E as ExtensionManifest } from './types-
|
|
2
|
+
import { E as ExtensionManifest } from './types-B1O6KckK.js';
|
|
3
3
|
|
|
4
4
|
interface ReadManifestOptions {
|
|
5
5
|
/** Root directory of the project */
|
package/dist/react.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HaexVaultSdk, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultSdk, S as StorageAPI } from './client-B_S7ntUI.mjs';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
|
-
import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-
|
|
3
|
+
import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-B1O6KckK.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* React hook for HaexVault SDK
|
package/dist/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HaexVaultSdk, S as StorageAPI } from './client
|
|
1
|
+
import { H as HaexVaultSdk, S as StorageAPI } from './client-Bl2s5tIZ.js';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
|
-
import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-
|
|
3
|
+
import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-B1O6KckK.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* React hook for HaexVault SDK
|
package/dist/react.js
CHANGED
|
@@ -614,6 +614,18 @@ var SPACE_COMMANDS = {
|
|
|
614
614
|
listBackends: "extension_space_list_backends"
|
|
615
615
|
};
|
|
616
616
|
|
|
617
|
+
// src/commands/shell.ts
|
|
618
|
+
var SHELL_COMMANDS = {
|
|
619
|
+
/** Create a new PTY shell session */
|
|
620
|
+
create: "extension_shell_create",
|
|
621
|
+
/** Write data to a shell session's stdin */
|
|
622
|
+
write: "extension_shell_write",
|
|
623
|
+
/** Resize a shell session's terminal */
|
|
624
|
+
resize: "extension_shell_resize",
|
|
625
|
+
/** Close a shell session */
|
|
626
|
+
close: "extension_shell_close"
|
|
627
|
+
};
|
|
628
|
+
|
|
617
629
|
// src/api/storage.ts
|
|
618
630
|
var StorageAPI = class {
|
|
619
631
|
constructor(client) {
|
|
@@ -1481,6 +1493,71 @@ var SpacesAPI = class {
|
|
|
1481
1493
|
}
|
|
1482
1494
|
};
|
|
1483
1495
|
|
|
1496
|
+
// src/api/shell.ts
|
|
1497
|
+
var ShellAPI = class {
|
|
1498
|
+
constructor(sdk) {
|
|
1499
|
+
this.sdk = sdk;
|
|
1500
|
+
}
|
|
1501
|
+
/**
|
|
1502
|
+
* Create a new PTY shell session.
|
|
1503
|
+
* Returns a session ID used for subsequent write/resize/close operations.
|
|
1504
|
+
* Listen for shell output via `sdk.shell.onData()`.
|
|
1505
|
+
*/
|
|
1506
|
+
async create(options = {}) {
|
|
1507
|
+
const result = await this.sdk.request(
|
|
1508
|
+
SHELL_COMMANDS.create,
|
|
1509
|
+
{ options }
|
|
1510
|
+
);
|
|
1511
|
+
return result.sessionId;
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Write data to a shell session's stdin.
|
|
1515
|
+
* Typically used to forward terminal keystrokes.
|
|
1516
|
+
*/
|
|
1517
|
+
async write(sessionId, data) {
|
|
1518
|
+
await this.sdk.request(SHELL_COMMANDS.write, { sessionId, data });
|
|
1519
|
+
}
|
|
1520
|
+
/**
|
|
1521
|
+
* Resize a shell session's terminal.
|
|
1522
|
+
* Should be called when the terminal view is resized.
|
|
1523
|
+
*/
|
|
1524
|
+
async resize(sessionId, cols, rows) {
|
|
1525
|
+
await this.sdk.request(SHELL_COMMANDS.resize, { sessionId, cols, rows });
|
|
1526
|
+
}
|
|
1527
|
+
/**
|
|
1528
|
+
* Close a shell session.
|
|
1529
|
+
* This terminates the underlying PTY process.
|
|
1530
|
+
*/
|
|
1531
|
+
async close(sessionId) {
|
|
1532
|
+
await this.sdk.request(SHELL_COMMANDS.close, { sessionId });
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* Register a callback for shell output data.
|
|
1536
|
+
* The callback receives output from the PTY's stdout/stderr.
|
|
1537
|
+
*/
|
|
1538
|
+
onData(callback) {
|
|
1539
|
+
this.sdk.on("shell:output", callback);
|
|
1540
|
+
}
|
|
1541
|
+
/**
|
|
1542
|
+
* Register a callback for shell session exit.
|
|
1543
|
+
*/
|
|
1544
|
+
onExit(callback) {
|
|
1545
|
+
this.sdk.on("shell:exit", callback);
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* Remove a shell output callback.
|
|
1549
|
+
*/
|
|
1550
|
+
offData(callback) {
|
|
1551
|
+
this.sdk.off("shell:output", callback);
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* Remove a shell exit callback.
|
|
1555
|
+
*/
|
|
1556
|
+
offExit(callback) {
|
|
1557
|
+
this.sdk.off("shell:exit", callback);
|
|
1558
|
+
}
|
|
1559
|
+
};
|
|
1560
|
+
|
|
1484
1561
|
// src/client/tableName.ts
|
|
1485
1562
|
function validatePublicKey(publicKey) {
|
|
1486
1563
|
if (!publicKey || typeof publicKey !== "string" || publicKey.trim() === "") {
|
|
@@ -2106,6 +2183,7 @@ var HaexVaultSdk = class {
|
|
|
2106
2183
|
this.remoteStorage = new RemoteStorageAPI(this);
|
|
2107
2184
|
this.localsend = new LocalSendAPI(this);
|
|
2108
2185
|
this.spaces = new SpacesAPI(this);
|
|
2186
|
+
this.shell = new ShellAPI(this);
|
|
2109
2187
|
installConsoleForwarding(this.config.debug);
|
|
2110
2188
|
this.readyPromise = new Promise((resolve) => {
|
|
2111
2189
|
this.resolveReady = resolve;
|