@huaweidevtools/aishell-dsh-e2b 0.0.0-stage → 0.0.1-beta.3

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.
@@ -0,0 +1,46 @@
1
+ /**
2
+ * The model-facing tools.
3
+ *
4
+ * Each one is a thin projection of an E2B SDK call: the tool's parameters are
5
+ * the SDK's own options, and its result is the SDK's own return value in a
6
+ * shape that survives JSON. That correspondence is the point — an operator who
7
+ * reads the E2B documentation should find nothing surprising here, and the
8
+ * next plugin in this family can keep the same contract.
9
+ *
10
+ * Three conventions are load-bearing and are repeated in the descriptions the
11
+ * model reads:
12
+ *
13
+ * - **One conversation, one sandbox.** No tool but `aishell__sandbox_create` takes a
14
+ * `sandboxId`. There is nothing to choose between, so there is no parameter
15
+ * to get wrong, and no way for a call to land in a different sandbox than
16
+ * the model meant.
17
+ * - **`timeoutMs` is milliseconds.** The TypeScript SDK counts milliseconds
18
+ * where the Python one counts seconds; a model that learned the Python
19
+ * spelling would ask for a five-second sandbox and get five thousand.
20
+ * - **A non-zero exit is a result, not a failure.** `aishell__sandbox_commands_run`
21
+ * reports the code and both streams, so a failing command reads as an
22
+ * outcome to reason about rather than a broken tool.
23
+ *
24
+ * @module @huaweidevtools/aishell-dsh-e2b/tools
25
+ */
26
+ import type { Context } from '@deepseek-ai/cordis';
27
+ import type { SandboxClient } from './client.ts';
28
+ import { type SandboxRegistry } from './sandbox-registry.ts';
29
+ /** What every tool needs to act. */
30
+ export interface ToolDeps {
31
+ /** The sandbox gateway connection. */
32
+ readonly client: SandboxClient;
33
+ /** The sandbox this conversation is bound to. */
34
+ readonly registry: SandboxRegistry;
35
+ /** The filesystem the local workspace is reached through, when one is mounted. */
36
+ readonly resolveFs: () => Context['fs'] | undefined;
37
+ }
38
+ /**
39
+ * Register every sandbox tool.
40
+ *
41
+ * @param ctx - the plugin context, providing the tool registry.
42
+ * @param deps - the shared dependencies.
43
+ * @returns disposers for the registrations.
44
+ */
45
+ export declare function registerSandboxTools(ctx: Context, deps: ToolDeps): Array<() => void>;
46
+ //# sourceMappingURL=tools.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,56 @@
1
1
  {
2
2
  "name": "@huaweidevtools/aishell-dsh-e2b",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Runs throwaway and preview deployments in E2B sandboxes on DSH — sandbox lifecycle, commands, and files as tools",
4
+ "version": "0.0.1-beta.3",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/yusheng-g/aishell-dsh-plugins.git",
11
+ "directory": "packages/aishell-e2b"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ }
21
+ },
22
+ "files": [
23
+ "lib/index.js",
24
+ "lib/types/**/*.d.ts",
25
+ "cordis.patch.yml"
26
+ ],
27
+ "license": "Apache-2.0",
28
+ "dependencies": {
29
+ "e2b": "2.59.0",
30
+ "@huaweidevtools/aishell-dsh-credentials-store": "0.0.1-beta.3"
31
+ },
32
+ "peerDependencies": {
33
+ "@deepseek-ai/cordis": "^4.0.4",
34
+ "@deepseek-ai/dsh-fs": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
35
+ "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
36
+ "@deepseek-ai/dsh-tools": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1"
37
+ },
38
+ "devDependencies": {
39
+ "@deepseek-ai/cordis": "^4.0.4",
40
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.5",
41
+ "@deepseek-ai/dsh-fs": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
42
+ "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
43
+ "@deepseek-ai/dsh-tools": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
44
+ "@deepseek-ai/schemastery": "3.18.4",
45
+ "tsdown": "^0.10.0",
46
+ "typescript": "^5.7.0"
47
+ },
48
+ "dsh": {
49
+ "bundle": {
50
+ "patch": "./cordis.patch.yml"
51
+ }
52
+ },
53
+ "scripts": {
54
+ "build:bundle": "tsdown"
55
+ }
6
56
  }