@deepseek-ai/dsh-e2b 0.0.1-rc.1
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/LICENSE +28 -0
- package/README.i18n.yaml +6 -0
- package/README.md +44 -0
- package/README.zh.md +44 -0
- package/lib/index.js +117 -0
- package/lib/invariant.js +23 -0
- package/lib/types/index.d.ts +62 -0
- package/lib/types/invariant.d.ts +16 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, DeepSeek
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/e2b/e2b/README.md
|
|
5
|
+
README.md: 7ade7c3d6522d8fa6d54d7011766238451b17c9a
|
|
6
|
+
README.zh.md: b683f33d2211106cf422e780b2b37904b0c640ad
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @deepseek-ai/dsh-e2b
|
|
2
|
+
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
Shared lifecycle owner for one E2B sandbox. The filesystem and subprocess adapters inject `ctx.e2b`, await its single SDK handle, and therefore inhabit the same remote Linux working tree and process world. The package pins `e2b@2.29.1`; the [family map](../README.md) lists the opt-in composition.
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
- id: e2b
|
|
11
|
+
name: '@deepseek-ai/dsh-e2b'
|
|
12
|
+
config:
|
|
13
|
+
cwd: /home/user/workspace
|
|
14
|
+
timeoutMs: 300000
|
|
15
|
+
|
|
16
|
+
- id: subprocess-e2b
|
|
17
|
+
name: '@deepseek-ai/dsh-subprocess-e2b'
|
|
18
|
+
|
|
19
|
+
- id: fs-e2b
|
|
20
|
+
name: '@deepseek-ai/dsh-fs-e2b'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`apiKey` is optional and otherwise reads `E2B_API_KEY`; the key configures the host SDK connection and is never installed in the sandbox. `cwd` defaults to `/home/user/workspace` and must be an absolute POSIX path. `timeoutMs` defaults to five minutes and controls the sandbox lifetime; expiry deletes the sandbox.
|
|
24
|
+
|
|
25
|
+
## Lifecycle and ownership
|
|
26
|
+
|
|
27
|
+
Construction starts one sandbox creation. Before resolving `getSandbox()`, the service creates `cwd` and the private `cwd/.dsh-e2b` adapter-state directory, verifies that the reserved path is a real directory rather than a symlink or another file type, then sets it to mode `0700`. Each adapter-internal E2B command shell receives a fresh randomized root-level `HOME`, so the SDK's fixed login shell does not resolve profile files from the mutable user home before the control command.
|
|
28
|
+
|
|
29
|
+
Disposal first prevents new handle acquisition, then awaits setup and deletes the sandbox. A `SandboxNotFoundError` means expiry or another owner already deleted it and is accepted as quiescence. Initial directory setup failure makes one deletion attempt; the configured E2B timeout bounds a second failure. Provider plugins must load after this owner and dispose before it.
|
|
30
|
+
|
|
31
|
+
## Model Experience
|
|
32
|
+
|
|
33
|
+
None, as this shared runtime owner registers no model-visible context; provider adapters and their consumers own any rendered effects.
|
|
34
|
+
|
|
35
|
+
#### KV Cache effect
|
|
36
|
+
|
|
37
|
+
No direct invalidation; this package does not contribute request tokens.
|
|
38
|
+
|
|
39
|
+
## Known Limitations and Deferred Work
|
|
40
|
+
|
|
41
|
+
- **This is not a whole-harness runtime** — Cordis services, agent/session state, session logs, LLM requests, skills, and SDK-side buffers stay in the host process.
|
|
42
|
+
- **Sandbox state is ephemeral** — disposal and timeout delete the sandbox; reconnect, pause/leave retention, templates, volumes, and snapshots are outside this POC.
|
|
43
|
+
- **No deployment platform is configured** — network policy, host-workspace synchronization, and sandbox discovery are outside this POC.
|
|
44
|
+
- **`cwd` is a resolution convention, not containment** — adapters and commands can address other sandbox paths; E2B network access retains the base image's policy.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @deepseek-ai/dsh-e2b
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
一个 E2B 沙箱的共享生命周期所有者。文件系统与进程管理适配器注入 `ctx.e2b`,等待其唯一的 SDK 句柄,因此处于同一个远程 Linux 工作树与进程环境中。本包固定使用 `e2b@2.29.1`;可选组合见[包族索引](../README.md)。
|
|
6
|
+
|
|
7
|
+
## 配置
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
- id: e2b
|
|
11
|
+
name: '@deepseek-ai/dsh-e2b'
|
|
12
|
+
config:
|
|
13
|
+
cwd: /home/user/workspace
|
|
14
|
+
timeoutMs: 300000
|
|
15
|
+
|
|
16
|
+
- id: subprocess-e2b
|
|
17
|
+
name: '@deepseek-ai/dsh-subprocess-e2b'
|
|
18
|
+
|
|
19
|
+
- id: fs-e2b
|
|
20
|
+
name: '@deepseek-ai/dsh-fs-e2b'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`apiKey` 可省略;省略时读取 `E2B_API_KEY`。该密钥只配置宿主 SDK 连接,绝不会安装进沙箱。`cwd` 默认为 `/home/user/workspace`,并且必须是绝对 POSIX 路径。`timeoutMs` 默认为 5 分钟并控制沙箱生命周期;超时会删除沙箱。
|
|
24
|
+
|
|
25
|
+
## 生命周期与所有权
|
|
26
|
+
|
|
27
|
+
构造阶段会启动一次沙箱创建。服务在 `getSandbox()` 结算前创建 `cwd` 和私有的 `cwd/.dsh-e2b` 适配器状态目录,验证该预留路径是真实目录而非符号链接或其他文件类型,再把该目录的 mode 设为 `0700`。每个适配器内部的 E2B 命令 shell 都会获得一个位于根目录下、全新随机生成的 `HOME`,因此 SDK 固定使用的登录 shell 不会在控制命令之前解析可变用户主目录中的配置文件。
|
|
28
|
+
|
|
29
|
+
资源释放会先阻止继续获取新句柄,再等待初始化完成,然后删除沙箱。`SandboxNotFoundError` 表示沙箱已因超时或被另一个所有者删除,因此可视为完全停稳。初始目录设置失败时会尝试删除一次;若该尝试也失败,则由已配置的 E2B 超时约束沙箱的存活时间。提供方插件必须在该所有者之后加载,并在其之前 dispose(资源释放)。
|
|
30
|
+
|
|
31
|
+
## 模型体验
|
|
32
|
+
|
|
33
|
+
无。本共享运行时所有者不注册模型可见上下文;提供方适配器及其消费方拥有所有渲染效果。
|
|
34
|
+
|
|
35
|
+
#### KV Cache 影响
|
|
36
|
+
|
|
37
|
+
不会直接失效;本包不会贡献请求 token。
|
|
38
|
+
|
|
39
|
+
## 已知限制与延后工作
|
|
40
|
+
|
|
41
|
+
- **这不是完整的 harness 运行时**:Cordis 服务、agent(智能体)/会话状态、会话日志、LLM(大语言模型)请求、skill(技能)和 SDK 侧缓冲仍留在宿主进程中。
|
|
42
|
+
- **沙箱状态是短暂的**:资源释放和超时都会删除沙箱;重新连接、pause/leave 保留、模板、卷和快照均不在本 POC 范围内。
|
|
43
|
+
- **没有配置部署平台**:网络策略、宿主工作区同步和沙箱发现均不在本 POC 范围内。
|
|
44
|
+
- **`cwd` 是解析约定,而不是包含边界**:适配器和命令可以访问沙箱中的其他路径;E2B 网络访问也继续采用基础镜像的策略。
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { posix } from "node:path";
|
|
3
|
+
import { Service } from "@deepseek-ai/cordis";
|
|
4
|
+
import z from "@deepseek-ai/schemastery";
|
|
5
|
+
import { CommandExitError, FileNotFoundError, FileType, FileType as FileType$1, Sandbox, Sandbox as Sandbox$1, SandboxNotFoundError, SandboxNotFoundError as SandboxNotFoundError$1 } from "e2b";
|
|
6
|
+
//#region lib/types/index.js
|
|
7
|
+
/**
|
|
8
|
+
* Shared ownership of one E2B sandbox. Capability adapters await the same SDK
|
|
9
|
+
* handle, so filesystem and process operations inhabit one remote Linux world.
|
|
10
|
+
* @module @deepseek-ai/dsh-e2b
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Quote one opaque argument for the SDK's unavoidable `/bin/bash -l -c` layer.
|
|
14
|
+
* @param value - Exact argument value to preserve.
|
|
15
|
+
* @returns A single shell word with no interpolation.
|
|
16
|
+
*/
|
|
17
|
+
function quoteE2BShellArg(value) {
|
|
18
|
+
return `'${value.replaceAll("'", "'\"'\"'")}'`;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Isolate E2B's hard-coded login shell behind a fresh randomized home path.
|
|
22
|
+
* @param overrides - Additional environment entries for the internal command.
|
|
23
|
+
* @returns A fresh mutable map that the E2B SDK may extend.
|
|
24
|
+
*/
|
|
25
|
+
function e2bControlEnvs(overrides = {}) {
|
|
26
|
+
return {
|
|
27
|
+
...overrides,
|
|
28
|
+
HOME: `/.dsh-e2b-control-${randomUUID()}`
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates one lazily consumable E2B SDK handle and deletes the sandbox at
|
|
33
|
+
* timeout or disposal. Creation begins at plugin construction; adapters await
|
|
34
|
+
* {@link getSandbox} before their first operation.
|
|
35
|
+
*/
|
|
36
|
+
var E2BSandboxService = class extends Service {
|
|
37
|
+
static Config = z.object({
|
|
38
|
+
apiKey: z.string(),
|
|
39
|
+
cwd: z.string().default("/home/user/workspace"),
|
|
40
|
+
timeoutMs: z.number().default(3e5)
|
|
41
|
+
});
|
|
42
|
+
/** Validated remote working directory shared by provider adapters. */
|
|
43
|
+
cwd;
|
|
44
|
+
/** Remote directory reserved for adapter-owned process and terminal state. */
|
|
45
|
+
runtimeRoot;
|
|
46
|
+
config;
|
|
47
|
+
ready;
|
|
48
|
+
disposed = false;
|
|
49
|
+
constructor(ctx, config) {
|
|
50
|
+
super(ctx, "e2b");
|
|
51
|
+
const resolved = config;
|
|
52
|
+
const apiKey = config.apiKey ?? process.env.E2B_API_KEY;
|
|
53
|
+
this.config = {
|
|
54
|
+
apiKey: apiKey ?? "",
|
|
55
|
+
cwd: resolved.cwd,
|
|
56
|
+
timeoutMs: resolved.timeoutMs
|
|
57
|
+
};
|
|
58
|
+
this.validate();
|
|
59
|
+
this.cwd = this.config.cwd;
|
|
60
|
+
this.runtimeRoot = posix.join(this.cwd, ".dsh-e2b");
|
|
61
|
+
this.ready = this.open();
|
|
62
|
+
this.ready.catch(() => {});
|
|
63
|
+
ctx.effect(() => async () => {
|
|
64
|
+
this.disposed = true;
|
|
65
|
+
let sandbox;
|
|
66
|
+
try {
|
|
67
|
+
sandbox = await this.ready;
|
|
68
|
+
} catch (_sandboxSetupFailure) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
try {
|
|
72
|
+
await sandbox.kill();
|
|
73
|
+
} catch (error) {
|
|
74
|
+
if (!(error instanceof SandboxNotFoundError$1)) throw error;
|
|
75
|
+
}
|
|
76
|
+
}, "e2b sandbox teardown");
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Return the shared live SDK handle.
|
|
80
|
+
* @returns the created sandbox after the configured cwd exists.
|
|
81
|
+
* @throws when E2B rejects creation or the service is disposing.
|
|
82
|
+
*/
|
|
83
|
+
async getSandbox() {
|
|
84
|
+
if (this.disposed) throw new Error("E2B sandbox service is disposing");
|
|
85
|
+
const sandbox = await this.ready;
|
|
86
|
+
if (this.disposed) throw new Error("E2B sandbox service is disposing");
|
|
87
|
+
return sandbox;
|
|
88
|
+
}
|
|
89
|
+
validate() {
|
|
90
|
+
if (this.config.apiKey.length === 0) throw new Error("dsh-e2b: configure apiKey or set E2B_API_KEY");
|
|
91
|
+
if (!posix.isAbsolute(this.config.cwd)) throw new Error(`dsh-e2b: cwd must be an absolute Linux path: ${this.config.cwd}`);
|
|
92
|
+
if (!Number.isFinite(this.config.timeoutMs) || this.config.timeoutMs <= 0) throw new Error("dsh-e2b: timeoutMs must be a positive finite number");
|
|
93
|
+
}
|
|
94
|
+
async open() {
|
|
95
|
+
const sandbox = await Sandbox$1.create({
|
|
96
|
+
apiKey: this.config.apiKey,
|
|
97
|
+
timeoutMs: this.config.timeoutMs,
|
|
98
|
+
secure: true,
|
|
99
|
+
lifecycle: { onTimeout: "kill" }
|
|
100
|
+
});
|
|
101
|
+
try {
|
|
102
|
+
await sandbox.files.makeDir(this.cwd);
|
|
103
|
+
await sandbox.files.makeDir(this.runtimeRoot);
|
|
104
|
+
const runtimeRoot = await sandbox.files.getInfo(this.runtimeRoot);
|
|
105
|
+
if (runtimeRoot.type !== FileType$1.DIR || runtimeRoot.symlinkTarget !== void 0) throw new Error(`dsh-e2b: runtime root must be a real directory: ${this.runtimeRoot}`);
|
|
106
|
+
await sandbox.commands.run(`chmod 700 -- ${quoteE2BShellArg(this.runtimeRoot)}`, { envs: e2bControlEnvs() });
|
|
107
|
+
return sandbox;
|
|
108
|
+
} catch (error) {
|
|
109
|
+
try {
|
|
110
|
+
await sandbox.kill();
|
|
111
|
+
} catch (_sandboxSetupRollbackFailure) {}
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
//#endregion
|
|
117
|
+
export { CommandExitError, E2BSandboxService, E2BSandboxService as default, FileNotFoundError, FileType, Sandbox, SandboxNotFoundError, e2bControlEnvs, quoteE2BShellArg };
|
package/lib/invariant.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region lib/types/invariant.js
|
|
2
|
+
/**
|
|
3
|
+
* Package-owned invariant companion for `@deepseek-ai/dsh-e2b`.
|
|
4
|
+
* @module @deepseek-ai/dsh-e2b/invariant
|
|
5
|
+
*/
|
|
6
|
+
const PACKAGE_NAME = "@deepseek-ai/dsh-e2b";
|
|
7
|
+
/** Cordis companion plugin name. */
|
|
8
|
+
const name = "e2b-invariant";
|
|
9
|
+
/** Service required before the companion can reserve package ownership. */
|
|
10
|
+
const inject = ["invariants"];
|
|
11
|
+
/**
|
|
12
|
+
* No runtime invariant: sandbox creation and teardown have one SDK promise and
|
|
13
|
+
* no independent event or mutable-data relationship to cross-check.
|
|
14
|
+
*/
|
|
15
|
+
const install = () => {};
|
|
16
|
+
/**
|
|
17
|
+
* Register this package's invariant companion.
|
|
18
|
+
* @param ctx - Cordis context carrying the invariant service.
|
|
19
|
+
* @returns the installed registration's disposer after setup succeeds.
|
|
20
|
+
*/
|
|
21
|
+
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
22
|
+
//#endregion
|
|
23
|
+
export { apply, inject, name };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared ownership of one E2B sandbox. Capability adapters await the same SDK
|
|
3
|
+
* handle, so filesystem and process operations inhabit one remote Linux world.
|
|
4
|
+
* @module @deepseek-ai/dsh-e2b
|
|
5
|
+
*/
|
|
6
|
+
import { Context, Service } from '@deepseek-ai/cordis';
|
|
7
|
+
import z from '@deepseek-ai/schemastery';
|
|
8
|
+
import { Sandbox } from 'e2b';
|
|
9
|
+
export { CommandExitError, FileNotFoundError, FileType, Sandbox, SandboxNotFoundError, } from 'e2b';
|
|
10
|
+
export type { CommandHandle, CommandResult, EntryInfo } from 'e2b';
|
|
11
|
+
/**
|
|
12
|
+
* Quote one opaque argument for the SDK's unavoidable `/bin/bash -l -c` layer.
|
|
13
|
+
* @param value - Exact argument value to preserve.
|
|
14
|
+
* @returns A single shell word with no interpolation.
|
|
15
|
+
*/
|
|
16
|
+
export declare function quoteE2BShellArg(value: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Isolate E2B's hard-coded login shell behind a fresh randomized home path.
|
|
19
|
+
* @param overrides - Additional environment entries for the internal command.
|
|
20
|
+
* @returns A fresh mutable map that the E2B SDK may extend.
|
|
21
|
+
*/
|
|
22
|
+
export declare function e2bControlEnvs(overrides?: Readonly<Record<string, string>>): Record<string, string>;
|
|
23
|
+
/** Configuration for the shared E2B sandbox owner. */
|
|
24
|
+
export interface Config {
|
|
25
|
+
/** API key; omission reads `E2B_API_KEY`. It is never forwarded into the sandbox. */
|
|
26
|
+
apiKey?: string;
|
|
27
|
+
/** Shared remote working directory, created before adapters receive the sandbox. */
|
|
28
|
+
cwd?: string;
|
|
29
|
+
/** E2B sandbox lifetime in milliseconds; expiry always deletes the sandbox. */
|
|
30
|
+
timeoutMs?: number;
|
|
31
|
+
}
|
|
32
|
+
declare module '@deepseek-ai/cordis' {
|
|
33
|
+
interface Context {
|
|
34
|
+
e2b: E2BSandboxService;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Creates one lazily consumable E2B SDK handle and deletes the sandbox at
|
|
39
|
+
* timeout or disposal. Creation begins at plugin construction; adapters await
|
|
40
|
+
* {@link getSandbox} before their first operation.
|
|
41
|
+
*/
|
|
42
|
+
export declare class E2BSandboxService extends Service {
|
|
43
|
+
static Config: z<Config>;
|
|
44
|
+
/** Validated remote working directory shared by provider adapters. */
|
|
45
|
+
readonly cwd: string;
|
|
46
|
+
/** Remote directory reserved for adapter-owned process and terminal state. */
|
|
47
|
+
readonly runtimeRoot: string;
|
|
48
|
+
private readonly config;
|
|
49
|
+
private readonly ready;
|
|
50
|
+
private disposed;
|
|
51
|
+
constructor(ctx: Context, config: Config);
|
|
52
|
+
/**
|
|
53
|
+
* Return the shared live SDK handle.
|
|
54
|
+
* @returns the created sandbox after the configured cwd exists.
|
|
55
|
+
* @throws when E2B rejects creation or the service is disposing.
|
|
56
|
+
*/
|
|
57
|
+
getSandbox(): Promise<Sandbox>;
|
|
58
|
+
private validate;
|
|
59
|
+
private open;
|
|
60
|
+
}
|
|
61
|
+
export default E2BSandboxService;
|
|
62
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package-owned invariant companion for `@deepseek-ai/dsh-e2b`.
|
|
3
|
+
* @module @deepseek-ai/dsh-e2b/invariant
|
|
4
|
+
*/
|
|
5
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
6
|
+
/** Cordis companion plugin name. */
|
|
7
|
+
export declare const name = "e2b-invariant";
|
|
8
|
+
/** Service required before the companion can reserve package ownership. */
|
|
9
|
+
export declare const inject: string[];
|
|
10
|
+
/**
|
|
11
|
+
* Register this package's invariant companion.
|
|
12
|
+
* @param ctx - Cordis context carrying the invariant service.
|
|
13
|
+
* @returns the installed registration's disposer after setup succeeds.
|
|
14
|
+
*/
|
|
15
|
+
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
16
|
+
//# sourceMappingURL=invariant.d.ts.map
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deepseek-ai/dsh-e2b",
|
|
3
|
+
"description": "Shared E2B sandbox lifecycle for DeepSeek Harness provider adapters",
|
|
4
|
+
"version": "0.0.1-rc.1",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "restricted"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
|
11
|
+
"directory": "packages/e2b/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
|
+
"./invariant": {
|
|
22
|
+
"types": "./lib/types/invariant.d.ts",
|
|
23
|
+
"default": "./lib/invariant.js"
|
|
24
|
+
},
|
|
25
|
+
"./src/*": "./src/*",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"lib/index.js",
|
|
30
|
+
"lib/invariant.js",
|
|
31
|
+
"lib/types/**/*.d.ts"
|
|
32
|
+
],
|
|
33
|
+
"license": "BSD-3-Clause",
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
|
|
36
|
+
"@deepseek-ai/cordis": "^4.0.1-rc.1"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"e2b": "2.29.1",
|
|
40
|
+
"@deepseek-ai/schemastery": "^3.18.1-rc.1"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
|
|
44
|
+
"@deepseek-ai/dsh-loader-smoke": "^0.0.1-rc.1",
|
|
45
|
+
"@deepseek-ai/dsh-sandbox-policy": "^0.0.1-rc.1",
|
|
46
|
+
"@deepseek-ai/cordis": "^4.0.1-rc.1"
|
|
47
|
+
}
|
|
48
|
+
}
|