@deepagents/context 0.39.0 → 2.1.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/README.md +44 -11
- package/dist/browser.js +171 -15
- package/dist/browser.js.map +3 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3037 -1573
- package/dist/index.js.map +4 -4
- package/dist/lib/agent.d.ts +6 -0
- package/dist/lib/agent.d.ts.map +1 -1
- package/dist/lib/chain-summary.d.ts +18 -0
- package/dist/lib/chain-summary.d.ts.map +1 -0
- package/dist/lib/engine.d.ts +25 -6
- package/dist/lib/engine.d.ts.map +1 -1
- package/dist/lib/fragments/message/user.d.ts +21 -2
- package/dist/lib/fragments/message/user.d.ts.map +1 -1
- package/dist/lib/fragments.d.ts +8 -3
- package/dist/lib/fragments.d.ts.map +1 -1
- package/dist/lib/resolvers/async-resolver.d.ts +8 -0
- package/dist/lib/resolvers/async-resolver.d.ts.map +1 -0
- package/dist/lib/resolvers/function-resolver.d.ts +8 -0
- package/dist/lib/resolvers/function-resolver.d.ts.map +1 -0
- package/dist/lib/resolvers/generator-resolver.d.ts +13 -0
- package/dist/lib/resolvers/generator-resolver.d.ts.map +1 -0
- package/dist/lib/resolvers/index.d.ts +10 -0
- package/dist/lib/resolvers/index.d.ts.map +1 -0
- package/dist/lib/resolvers/iterable-resolver.d.ts +12 -0
- package/dist/lib/resolvers/iterable-resolver.d.ts.map +1 -0
- package/dist/lib/resolvers/loader-resolver.d.ts +13 -0
- package/dist/lib/resolvers/loader-resolver.d.ts.map +1 -0
- package/dist/lib/resolvers/promise-resolver.d.ts +7 -0
- package/dist/lib/resolvers/promise-resolver.d.ts.map +1 -0
- package/dist/lib/resolvers/types.d.ts +45 -0
- package/dist/lib/resolvers/types.d.ts.map +1 -0
- package/dist/lib/sandbox/abort.d.ts +24 -0
- package/dist/lib/sandbox/abort.d.ts.map +1 -0
- package/dist/lib/sandbox/agent-os-sandbox.d.ts +3 -6
- package/dist/lib/sandbox/agent-os-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/ast-utils.d.ts +5 -2
- package/dist/lib/sandbox/ast-utils.d.ts.map +1 -1
- package/dist/lib/sandbox/bash-tool.d.ts +29 -16
- package/dist/lib/sandbox/bash-tool.d.ts.map +1 -1
- package/dist/lib/sandbox/container-tool.d.ts +47 -21
- package/dist/lib/sandbox/container-tool.d.ts.map +1 -1
- package/dist/lib/sandbox/docker-sandbox-errors.d.ts +74 -0
- package/dist/lib/sandbox/docker-sandbox-errors.d.ts.map +1 -0
- package/dist/lib/sandbox/docker-sandbox.d.ts +148 -371
- package/dist/lib/sandbox/docker-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/file-events.d.ts +24 -38
- package/dist/lib/sandbox/file-events.d.ts.map +1 -1
- package/dist/lib/sandbox/index.d.ts +3 -7
- package/dist/lib/sandbox/index.d.ts.map +1 -1
- package/dist/lib/sandbox/installers/github-release.d.ts +46 -0
- package/dist/lib/sandbox/installers/github-release.d.ts.map +1 -0
- package/dist/lib/sandbox/installers/index.d.ts +7 -0
- package/dist/lib/sandbox/installers/index.d.ts.map +1 -0
- package/dist/lib/sandbox/installers/installer.d.ts +44 -0
- package/dist/lib/sandbox/installers/installer.d.ts.map +1 -0
- package/dist/lib/sandbox/installers/npm.d.ts +32 -0
- package/dist/lib/sandbox/installers/npm.d.ts.map +1 -0
- package/dist/lib/sandbox/installers/package-manager.d.ts +19 -0
- package/dist/lib/sandbox/installers/package-manager.d.ts.map +1 -0
- package/dist/lib/sandbox/installers/pip.d.ts +37 -0
- package/dist/lib/sandbox/installers/pip.d.ts.map +1 -0
- package/dist/lib/sandbox/installers/url-binary.d.ts +41 -0
- package/dist/lib/sandbox/installers/url-binary.d.ts.map +1 -0
- package/dist/lib/sandbox/subcommand.d.ts +11 -11
- package/dist/lib/sandbox/subcommand.d.ts.map +1 -1
- package/dist/lib/sandbox/types.d.ts +51 -6
- package/dist/lib/sandbox/types.d.ts.map +1 -1
- package/dist/lib/sandbox/upload-skills.d.ts +6 -0
- package/dist/lib/sandbox/upload-skills.d.ts.map +1 -1
- package/dist/lib/sandbox/virtual-sandbox.d.ts +10 -0
- package/dist/lib/sandbox/virtual-sandbox.d.ts.map +1 -0
- package/dist/lib/save/reminder-target-handler.d.ts +36 -0
- package/dist/lib/save/reminder-target-handler.d.ts.map +1 -0
- package/dist/lib/save/save-pipeline.d.ts +28 -0
- package/dist/lib/save/save-pipeline.d.ts.map +1 -0
- package/dist/lib/save/tool-output-target-handler.d.ts +7 -0
- package/dist/lib/save/tool-output-target-handler.d.ts.map +1 -0
- package/dist/lib/save/user-target-handler.d.ts +7 -0
- package/dist/lib/save/user-target-handler.d.ts.map +1 -0
- package/dist/lib/stream/change-source.d.ts +11 -0
- package/dist/lib/stream/change-source.d.ts.map +1 -0
- package/dist/lib/stream/ddl.stream.postgres-notify.d.ts +3 -0
- package/dist/lib/stream/ddl.stream.postgres-notify.d.ts.map +1 -0
- package/dist/lib/stream/ddl.stream.postgres.d.ts +2 -0
- package/dist/lib/stream/ddl.stream.postgres.d.ts.map +1 -0
- package/dist/lib/stream/polling-change-source.d.ts +27 -0
- package/dist/lib/stream/polling-change-source.d.ts.map +1 -0
- package/dist/lib/stream/polling-policy.d.ts +0 -1
- package/dist/lib/stream/polling-policy.d.ts.map +1 -1
- package/dist/lib/stream/postgres-notify-change-source.d.ts +15 -0
- package/dist/lib/stream/postgres-notify-change-source.d.ts.map +1 -0
- package/dist/lib/stream/postgres.stream-store.d.ts +29 -0
- package/dist/lib/stream/postgres.stream-store.d.ts.map +1 -0
- package/dist/lib/stream/stream-manager.d.ts +8 -27
- package/dist/lib/stream/stream-manager.d.ts.map +1 -1
- package/dist/lib/ui-message-guards.d.ts +10 -0
- package/dist/lib/ui-message-guards.d.ts.map +1 -0
- package/package.json +4 -17
- package/dist/lib/sandbox/extension.d.ts +0 -39
- package/dist/lib/sandbox/extension.d.ts.map +0 -1
- package/dist/lib/sandbox/openapi/demo.d.ts +0 -2
- package/dist/lib/sandbox/openapi/demo.d.ts.map +0 -1
- package/dist/lib/sandbox/openapi/extension.d.ts +0 -19
- package/dist/lib/sandbox/openapi/extension.d.ts.map +0 -1
- package/dist/lib/sandbox/openapi/format.d.ts +0 -11
- package/dist/lib/sandbox/openapi/format.d.ts.map +0 -1
- package/dist/lib/sandbox/openapi/schema.d.ts +0 -9
- package/dist/lib/sandbox/openapi/schema.d.ts.map +0 -1
- package/dist/lib/sandbox/openapi/skill/index.d.ts +0 -6
- package/dist/lib/sandbox/openapi/skill/index.d.ts.map +0 -1
- package/dist/lib/sandbox/openapi/skill/index.js +0 -14
- package/dist/lib/sandbox/openapi/skill/index.js.map +0 -7
- package/dist/lib/sandbox/openapi/skill/openapi-cli/SKILL.md +0 -109
- package/dist/lib/sandbox/openapi/validate.d.ts +0 -7
- package/dist/lib/sandbox/openapi/validate.d.ts.map +0 -1
- package/dist/lib/sandbox/routing-sandbox.d.ts +0 -28
- package/dist/lib/sandbox/routing-sandbox.d.ts.map +0 -1
- package/dist/lib/sandboxes/openai.d.ts +0 -6
- package/dist/lib/sandboxes/openai.d.ts.map +0 -1
|
@@ -1,476 +1,253 @@
|
|
|
1
|
-
import { type CommandResult
|
|
1
|
+
import { type CommandResult } from 'bash-tool';
|
|
2
|
+
import { type Installer } from './installers/installer.ts';
|
|
3
|
+
import type { DisposableSandbox, ExecuteCommandOptions, SandboxProcess, SpawnOptions } from './types.ts';
|
|
2
4
|
export type { CommandResult as ExecResult, Sandbox } from 'bash-tool';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare class DockerSandboxError extends Error {
|
|
7
|
-
readonly containerId?: string;
|
|
8
|
-
constructor(message: string, containerId?: string);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Thrown when Docker daemon is not available.
|
|
12
|
-
*/
|
|
13
|
-
export declare class DockerNotAvailableError extends DockerSandboxError {
|
|
14
|
-
constructor();
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Thrown when container creation fails.
|
|
18
|
-
*/
|
|
19
|
-
export declare class ContainerCreationError extends DockerSandboxError {
|
|
20
|
-
readonly image: string;
|
|
21
|
-
cause?: Error;
|
|
22
|
-
constructor(message: string, image: string, cause?: Error);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Thrown when package installation fails.
|
|
26
|
-
*/
|
|
27
|
-
export declare class PackageInstallError extends DockerSandboxError {
|
|
28
|
-
readonly packages: string[];
|
|
29
|
-
readonly image: string;
|
|
30
|
-
readonly packageManager: 'apk' | 'apt-get';
|
|
31
|
-
readonly stderr: string;
|
|
32
|
-
constructor(packages: string[], image: string, packageManager: 'apk' | 'apt-get', stderr: string, containerId?: string);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Thrown when a binary installation from URL fails.
|
|
36
|
-
*/
|
|
37
|
-
export declare class BinaryInstallError extends DockerSandboxError {
|
|
38
|
-
readonly binaryName: string;
|
|
39
|
-
readonly url: string;
|
|
40
|
-
readonly reason: string;
|
|
41
|
-
constructor(binaryName: string, url: string, reason: string, containerId?: string);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Thrown when a mount path doesn't exist on the host.
|
|
45
|
-
*/
|
|
46
|
-
export declare class MountPathError extends DockerSandboxError {
|
|
47
|
-
readonly hostPath: string;
|
|
48
|
-
readonly containerPath: string;
|
|
49
|
-
constructor(hostPath: string, containerPath: string);
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Thrown when Dockerfile build fails.
|
|
53
|
-
*/
|
|
54
|
-
export declare class DockerfileBuildError extends DockerSandboxError {
|
|
55
|
-
readonly stderr: string;
|
|
56
|
-
constructor(stderr: string);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Thrown when docker compose up fails.
|
|
60
|
-
*/
|
|
61
|
-
export declare class ComposeStartError extends DockerSandboxError {
|
|
62
|
-
readonly composeFile: string;
|
|
63
|
-
readonly stderr: string;
|
|
64
|
-
constructor(composeFile: string, stderr: string);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Configuration for mounting a host directory into the container.
|
|
68
|
-
*/
|
|
69
|
-
export interface DockerMount {
|
|
70
|
-
/** Absolute path on the host machine */
|
|
5
|
+
export { ComposeStartError, ContainerCreationError, DockerNotAvailableError, DockerSandboxError, DockerfileBuildError, type InstallErrorOptions, type InstallSource, InstallError, MissingRuntimeError, PackageInstallError, VolumeCreateError, VolumeInspectError, VolumePathError, VolumeRemoveError, } from './docker-sandbox-errors.ts';
|
|
6
|
+
export interface DockerBindVolume {
|
|
7
|
+
type: 'bind';
|
|
71
8
|
hostPath: string;
|
|
72
|
-
/** Path inside the container */
|
|
73
9
|
containerPath: string;
|
|
74
|
-
/**
|
|
10
|
+
/** Default: `true`. */
|
|
75
11
|
readOnly?: boolean;
|
|
76
12
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
13
|
+
export interface DockerNamedVolume {
|
|
14
|
+
type: 'volume';
|
|
15
|
+
name: string;
|
|
16
|
+
containerPath: string;
|
|
17
|
+
/** Default: `true`. */
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
/** Default: `'external'`. */
|
|
20
|
+
lifecycle?: 'external' | 'managed';
|
|
21
|
+
/** Docker volume driver used when `lifecycle` is `'managed'`. */
|
|
22
|
+
driver?: string;
|
|
23
|
+
/** Docker volume driver options used when `lifecycle` is `'managed'`. */
|
|
24
|
+
driverOptions?: Record<string, string>;
|
|
25
|
+
subPath?: string;
|
|
26
|
+
noCopy?: boolean;
|
|
27
|
+
/** Default: `true` for managed volumes created by this sandbox. */
|
|
28
|
+
removeOnDispose?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export type DockerSandboxVolume = DockerBindVolume | DockerNamedVolume;
|
|
80
31
|
export interface DockerResources {
|
|
81
|
-
/**
|
|
32
|
+
/** e.g. `'1g'`, `'512m'`. */
|
|
82
33
|
memory?: string;
|
|
83
|
-
/**
|
|
34
|
+
/** Number of CPUs. */
|
|
84
35
|
cpus?: number;
|
|
85
36
|
}
|
|
86
37
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
aarch64?: string;
|
|
95
|
-
/** URL for ARMv7 architecture */
|
|
96
|
-
armv7l?: string;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Configuration for installing a binary from a URL.
|
|
38
|
+
* Stable identity suffix for the container. When provided, the container
|
|
39
|
+
* is named `sandbox-<name>` instead of getting a randomized
|
|
40
|
+
* `sandbox-<8hex>`. If a container with that name already exists on the
|
|
41
|
+
* host, the sandbox attaches to it: installers, volume preparation, and
|
|
42
|
+
* env are skipped (the pre-existing container is assumed already
|
|
43
|
+
* configured). If it exists but is stopped, it is started first.
|
|
44
|
+
* Otherwise the container is created fresh and installers run as usual.
|
|
100
45
|
*
|
|
101
|
-
*
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
* - If ArchitectureUrls, selects based on container architecture
|
|
110
|
-
*/
|
|
111
|
-
url: string | ArchitectureUrls;
|
|
112
|
-
/**
|
|
113
|
-
* Optional: The binary filename inside the archive if different from `name`.
|
|
114
|
-
* Useful when the archive contains versioned binaries like "presenterm-0.15.1".
|
|
115
|
-
*/
|
|
116
|
-
binaryPath?: string;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Options for RuntimeStrategy - installs packages/binaries at container runtime.
|
|
46
|
+
* Must match `/^[A-Za-z0-9_.-]+$/`. The full Docker container name
|
|
47
|
+
* (`sandbox-<name>`) is always legal because the prefix begins with an
|
|
48
|
+
* alphanumeric character.
|
|
49
|
+
*
|
|
50
|
+
* Warning: `dispose()` stops (and `--rm` removes) the container regardless
|
|
51
|
+
* of whether it was created or attached to. If two callers in the same
|
|
52
|
+
* process share a name, the first `dispose()` destroys the container the
|
|
53
|
+
* other one is still using.
|
|
120
54
|
*/
|
|
55
|
+
type StableContainerName = string;
|
|
121
56
|
export interface RuntimeSandboxOptions {
|
|
122
|
-
/** Docker image to use (default: 'alpine:latest') */
|
|
57
|
+
/** Docker image to use (default: `'alpine:latest'`). */
|
|
123
58
|
image?: string;
|
|
124
|
-
/**
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Ordered list of installers run after the container starts. Use
|
|
61
|
+
* `pkg([...])`, `urlBinary({...})`, `npm(...)`, `pip(...)`,
|
|
62
|
+
* `githubRelease({...})`, or any custom `Installer` subclass.
|
|
63
|
+
*/
|
|
64
|
+
installers?: Installer[];
|
|
65
|
+
volumes?: DockerSandboxVolume[];
|
|
131
66
|
resources?: DockerResources;
|
|
132
|
-
/** Environment variables to set in the container */
|
|
133
67
|
env?: Record<string, string>;
|
|
68
|
+
name?: StableContainerName;
|
|
134
69
|
}
|
|
135
|
-
/**
|
|
136
|
-
* Options for DockerfileStrategy - builds custom image from Dockerfile.
|
|
137
|
-
*/
|
|
138
70
|
export interface DockerfileSandboxOptions {
|
|
139
|
-
/** Dockerfile content (
|
|
71
|
+
/** Inline Dockerfile content (contains `\n`) or a path. */
|
|
140
72
|
dockerfile: string;
|
|
141
|
-
/** Build context directory (default: '.') */
|
|
73
|
+
/** Build context directory (default: `'.'`). */
|
|
142
74
|
context?: string;
|
|
143
|
-
|
|
144
|
-
mounts?: DockerMount[];
|
|
145
|
-
/** Resource limits */
|
|
75
|
+
volumes?: DockerSandboxVolume[];
|
|
146
76
|
resources?: DockerResources;
|
|
147
|
-
/** Environment variables to set in the container */
|
|
148
77
|
env?: Record<string, string>;
|
|
78
|
+
name?: StableContainerName;
|
|
149
79
|
}
|
|
150
|
-
/**
|
|
151
|
-
* Options for ComposeStrategy - manages multi-container environments.
|
|
152
|
-
*/
|
|
153
80
|
export interface ComposeSandboxOptions {
|
|
154
|
-
/** Path to docker-compose.yml file */
|
|
155
81
|
compose: string;
|
|
156
|
-
/** Service name to execute commands in (required) */
|
|
157
82
|
service: string;
|
|
158
|
-
/** Resource limits (applied to target service only) */
|
|
159
83
|
resources?: DockerResources;
|
|
160
84
|
}
|
|
161
|
-
/**
|
|
162
|
-
* Union type for Docker sandbox options.
|
|
163
|
-
* - RuntimeSandboxOptions: Runtime package/binary installation
|
|
164
|
-
* - DockerfileSandboxOptions: Pre-built images from Dockerfile
|
|
165
|
-
* - ComposeSandboxOptions: Multi-container environments via Docker Compose
|
|
166
|
-
*/
|
|
167
85
|
export type DockerSandboxOptions = RuntimeSandboxOptions | DockerfileSandboxOptions | ComposeSandboxOptions;
|
|
168
|
-
/**
|
|
169
|
-
* Extended sandbox interface with disposal method.
|
|
170
|
-
*/
|
|
171
|
-
export interface DockerSandbox extends Sandbox {
|
|
172
|
-
/** Stop and remove the container */
|
|
173
|
-
dispose(): Promise<void>;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Type guard to determine if options are for DockerfileStrategy.
|
|
177
|
-
*/
|
|
178
86
|
export declare function isDockerfileOptions(opts: DockerSandboxOptions): opts is DockerfileSandboxOptions;
|
|
179
|
-
/**
|
|
180
|
-
* Type guard to determine if options are for ComposeStrategy.
|
|
181
|
-
*/
|
|
182
87
|
export declare function isComposeOptions(opts: DockerSandboxOptions): opts is ComposeSandboxOptions;
|
|
183
|
-
/**
|
|
184
|
-
* Internal context shared across strategy methods.
|
|
185
|
-
*/
|
|
186
88
|
interface StrategyContext {
|
|
187
89
|
containerId: string;
|
|
188
90
|
image: string;
|
|
189
91
|
}
|
|
92
|
+
export interface DockerSandboxStrategyArgs {
|
|
93
|
+
volumes?: DockerSandboxVolume[];
|
|
94
|
+
resources?: DockerResources;
|
|
95
|
+
env?: Record<string, string>;
|
|
96
|
+
name?: StableContainerName;
|
|
97
|
+
}
|
|
190
98
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
* creation algorithm, deferring specific steps to subclasses.
|
|
195
|
-
*
|
|
196
|
-
* @example Extending the strategy
|
|
197
|
-
* ```typescript
|
|
198
|
-
* class CustomStrategy extends DockerSandboxStrategy {
|
|
199
|
-
* protected async getImage(): Promise<string> {
|
|
200
|
-
* // Custom image resolution logic
|
|
201
|
-
* return 'my-custom-image:latest';
|
|
202
|
-
* }
|
|
203
|
-
*
|
|
204
|
-
* protected async configure(): Promise<void> {
|
|
205
|
-
* // Custom configuration after container starts
|
|
206
|
-
* }
|
|
207
|
-
* }
|
|
208
|
-
* ```
|
|
99
|
+
* Template Method base for sandbox creation strategies. Subclasses choose
|
|
100
|
+
* the image and define post-start configuration; the base owns container
|
|
101
|
+
* lifecycle, exec, and file I/O.
|
|
209
102
|
*/
|
|
210
103
|
export declare abstract class DockerSandboxStrategy {
|
|
211
104
|
protected context: StrategyContext;
|
|
212
|
-
protected
|
|
105
|
+
protected volumes: DockerSandboxVolume[];
|
|
213
106
|
protected resources: DockerResources;
|
|
214
107
|
protected env: Record<string, string>;
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
protected
|
|
231
|
-
|
|
232
|
-
* Builds the docker run command arguments.
|
|
233
|
-
*/
|
|
108
|
+
protected name?: StableContainerName;
|
|
109
|
+
private createdVolumes;
|
|
110
|
+
constructor(args?: DockerSandboxStrategyArgs);
|
|
111
|
+
create(): Promise<DisposableSandbox>;
|
|
112
|
+
private namedContainerId;
|
|
113
|
+
protected defaultContainerId(): string;
|
|
114
|
+
protected acquireContainer(image: string): Promise<{
|
|
115
|
+
containerId: string;
|
|
116
|
+
attached: boolean;
|
|
117
|
+
}>;
|
|
118
|
+
private startStoppedContainer;
|
|
119
|
+
protected inspectContainer(containerId: string): Promise<'running' | 'stopped' | 'absent'>;
|
|
120
|
+
private isMissingContainerError;
|
|
121
|
+
private isNameConflictError;
|
|
122
|
+
protected prepareVolumes(): Promise<void>;
|
|
123
|
+
protected validateVolumes(): void;
|
|
124
|
+
private validateMountValue;
|
|
234
125
|
protected buildDockerArgs(image: string, containerId: string): string[];
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
126
|
+
protected buildVolumeMountArg(volume: DockerSandboxVolume): string;
|
|
127
|
+
private inspectVolume;
|
|
128
|
+
private volumeExists;
|
|
129
|
+
private createVolume;
|
|
130
|
+
private cleanupCreatedVolumes;
|
|
131
|
+
private cleanupCreatedVolumesAfterFailure;
|
|
132
|
+
private getDockerErrorMessage;
|
|
133
|
+
private isDockerUnavailableError;
|
|
134
|
+
private isMissingVolumeInspectError;
|
|
135
|
+
protected startContainer(image: string, containerId: string): Promise<void>;
|
|
242
136
|
protected stopContainer(containerId: string): Promise<void>;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
protected exec(command: string): Promise<CommandResult>;
|
|
247
|
-
/**
|
|
248
|
-
* Creates the DockerSandbox interface with all methods.
|
|
249
|
-
*/
|
|
250
|
-
protected createSandboxMethods(): DockerSandbox;
|
|
251
|
-
/**
|
|
252
|
-
* Returns the Docker image to use for the container.
|
|
253
|
-
* For RuntimeStrategy: returns the image name directly.
|
|
254
|
-
* For DockerfileStrategy: builds the image and returns the tag.
|
|
255
|
-
*/
|
|
137
|
+
protected exec(command: string, options?: ExecuteCommandOptions): Promise<CommandResult>;
|
|
138
|
+
protected spawnProcess(command: string, options?: SpawnOptions): SandboxProcess;
|
|
139
|
+
protected createSandboxMethods(): DisposableSandbox;
|
|
256
140
|
protected abstract getImage(): Promise<string>;
|
|
257
|
-
/**
|
|
258
|
-
* Configures the container after it starts.
|
|
259
|
-
* For RuntimeStrategy: installs packages and binaries.
|
|
260
|
-
* For DockerfileStrategy: no-op (Dockerfile already configured).
|
|
261
|
-
*/
|
|
262
141
|
protected abstract configure(): Promise<void>;
|
|
263
142
|
}
|
|
143
|
+
export interface RuntimeStrategyArgs extends DockerSandboxStrategyArgs {
|
|
144
|
+
image?: string;
|
|
145
|
+
installers?: Installer[];
|
|
146
|
+
}
|
|
264
147
|
/**
|
|
265
|
-
*
|
|
266
|
-
* at container runtime.
|
|
267
|
-
*
|
|
268
|
-
* This is the "configure-on-demand" approach - starts a vanilla image and
|
|
269
|
-
* customizes it by executing installation commands.
|
|
148
|
+
* Starts a vanilla image and runs the supplied installers in order.
|
|
270
149
|
*
|
|
271
150
|
* @example
|
|
272
|
-
* ```
|
|
273
|
-
*
|
|
274
|
-
* 'alpine:latest',
|
|
275
|
-
* [
|
|
276
|
-
*
|
|
277
|
-
* )
|
|
278
|
-
*
|
|
151
|
+
* ```ts
|
|
152
|
+
* new RuntimeStrategy({
|
|
153
|
+
* image: 'alpine:latest',
|
|
154
|
+
* installers: [
|
|
155
|
+
* pkg(['curl', 'jq']),
|
|
156
|
+
* urlBinary({ name: 'presenterm', url: {...} }),
|
|
157
|
+
* npm('prettier', { ensureRuntime: true }),
|
|
158
|
+
* ],
|
|
159
|
+
* });
|
|
279
160
|
* ```
|
|
280
161
|
*/
|
|
281
162
|
export declare class RuntimeStrategy extends DockerSandboxStrategy {
|
|
282
163
|
private image;
|
|
283
|
-
private
|
|
284
|
-
|
|
285
|
-
constructor(image?: string, packages?: string[], binaries?: BinaryInstall[], mounts?: DockerMount[], resources?: DockerResources, env?: Record<string, string>);
|
|
164
|
+
private installers;
|
|
165
|
+
constructor(args?: RuntimeStrategyArgs);
|
|
286
166
|
protected getImage(): Promise<string>;
|
|
287
167
|
protected configure(): Promise<void>;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Installs binaries from URLs.
|
|
294
|
-
*/
|
|
295
|
-
private installBinaries;
|
|
296
|
-
/**
|
|
297
|
-
* Ensures curl is installed in the container.
|
|
298
|
-
*/
|
|
299
|
-
private ensureCurl;
|
|
300
|
-
/**
|
|
301
|
-
* Detects the container's CPU architecture.
|
|
302
|
-
*/
|
|
303
|
-
private detectArchitecture;
|
|
304
|
-
/**
|
|
305
|
-
* Installs a single binary from URL.
|
|
306
|
-
*/
|
|
307
|
-
private installBinary;
|
|
168
|
+
}
|
|
169
|
+
export interface DockerfileStrategyArgs extends DockerSandboxStrategyArgs {
|
|
170
|
+
dockerfile: string;
|
|
171
|
+
context?: string;
|
|
308
172
|
}
|
|
309
173
|
/**
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
* This is the "build-once, run-many" approach - builds the image upfront
|
|
313
|
-
* (with caching) and runs containers from the pre-configured image.
|
|
314
|
-
*
|
|
315
|
-
* Image caching: Uses a deterministic tag based on Dockerfile content hash.
|
|
316
|
-
* If the same Dockerfile is used, the existing image is reused (cache hit).
|
|
317
|
-
*
|
|
318
|
-
* @example Inline Dockerfile
|
|
319
|
-
* ```typescript
|
|
320
|
-
* const strategy = new DockerfileStrategy(`
|
|
321
|
-
* FROM alpine:latest
|
|
322
|
-
* RUN apk add --no-cache curl jq
|
|
323
|
-
* `);
|
|
324
|
-
* const sandbox = await strategy.create();
|
|
325
|
-
* ```
|
|
326
|
-
*
|
|
327
|
-
* @example Dockerfile path
|
|
328
|
-
* ```typescript
|
|
329
|
-
* const strategy = new DockerfileStrategy(
|
|
330
|
-
* './Dockerfile.sandbox',
|
|
331
|
-
* './docker', // build context
|
|
332
|
-
* );
|
|
333
|
-
* const sandbox = await strategy.create();
|
|
334
|
-
* ```
|
|
174
|
+
* Builds a custom image from a Dockerfile (with content-hash caching).
|
|
175
|
+
* Runs no post-start configuration — the Dockerfile defines the image.
|
|
335
176
|
*/
|
|
336
177
|
export declare class DockerfileStrategy extends DockerSandboxStrategy {
|
|
337
178
|
private imageTag;
|
|
338
179
|
private dockerfile;
|
|
339
180
|
private dockerContext;
|
|
340
|
-
constructor(
|
|
341
|
-
/**
|
|
342
|
-
* Computes a deterministic image tag based on Dockerfile content.
|
|
343
|
-
* Same Dockerfile → same tag → Docker skips rebuild if image exists.
|
|
344
|
-
*/
|
|
181
|
+
constructor(args: DockerfileStrategyArgs);
|
|
345
182
|
private computeImageTag;
|
|
346
|
-
/**
|
|
347
|
-
* Checks if the dockerfile property is inline content or a file path.
|
|
348
|
-
*/
|
|
349
183
|
private isInlineDockerfile;
|
|
350
184
|
protected getImage(): Promise<string>;
|
|
351
185
|
protected configure(): Promise<void>;
|
|
352
|
-
/**
|
|
353
|
-
* Checks if the image already exists locally.
|
|
354
|
-
*/
|
|
355
186
|
private imageExists;
|
|
356
|
-
/**
|
|
357
|
-
* Builds the Docker image from the Dockerfile.
|
|
358
|
-
*/
|
|
359
187
|
private buildImage;
|
|
360
188
|
}
|
|
189
|
+
export interface ComposeStrategyArgs {
|
|
190
|
+
compose: string;
|
|
191
|
+
service: string;
|
|
192
|
+
resources?: DockerResources;
|
|
193
|
+
}
|
|
361
194
|
/**
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
* Unlike other strategies that manage a single container, ComposeStrategy
|
|
365
|
-
* orchestrates multiple services as a unit using docker compose commands.
|
|
366
|
-
*
|
|
367
|
-
* @example
|
|
368
|
-
* ```typescript
|
|
369
|
-
* const strategy = new ComposeStrategy(
|
|
370
|
-
* './docker-compose.yml',
|
|
371
|
-
* 'app', // Service to execute commands in
|
|
372
|
-
* );
|
|
373
|
-
* const sandbox = await strategy.create();
|
|
374
|
-
*
|
|
375
|
-
* // Commands run in the 'app' service
|
|
376
|
-
* await sandbox.executeCommand('node --version');
|
|
377
|
-
*
|
|
378
|
-
* // Can communicate with other services via service names
|
|
379
|
-
* await sandbox.executeCommand('curl http://api:3000/health');
|
|
380
|
-
*
|
|
381
|
-
* // Stops ALL services
|
|
382
|
-
* await sandbox.dispose();
|
|
383
|
-
* ```
|
|
195
|
+
* Manages multi-container environments via `docker compose`.
|
|
196
|
+
* Commands run inside the named service; `dispose()` brings the whole stack down.
|
|
384
197
|
*/
|
|
385
198
|
export declare class ComposeStrategy extends DockerSandboxStrategy {
|
|
386
199
|
private projectName;
|
|
387
200
|
private composeFile;
|
|
388
201
|
private service;
|
|
389
|
-
constructor(
|
|
390
|
-
/**
|
|
391
|
-
* Deterministic project name based on compose file content for caching.
|
|
392
|
-
* Same compose file → same project name → faster subsequent startups.
|
|
393
|
-
*/
|
|
202
|
+
constructor(args: ComposeStrategyArgs);
|
|
394
203
|
private computeProjectName;
|
|
395
|
-
/**
|
|
396
|
-
* Override: No image to get - compose manages its own images.
|
|
397
|
-
*/
|
|
398
204
|
protected getImage(): Promise<string>;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
*/
|
|
402
|
-
protected startContainer(_image: string): Promise<string>;
|
|
205
|
+
protected startContainer(_image: string, _containerId: string): Promise<void>;
|
|
206
|
+
protected defaultContainerId(): string;
|
|
403
207
|
protected configure(): Promise<void>;
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
*/
|
|
407
|
-
protected exec(command: string): Promise<CommandResult>;
|
|
408
|
-
/**
|
|
409
|
-
* Override: Stop all services with docker compose down.
|
|
410
|
-
*/
|
|
208
|
+
protected exec(command: string, options?: ExecuteCommandOptions): Promise<CommandResult>;
|
|
209
|
+
protected spawnProcess(command: string, options?: SpawnOptions): SandboxProcess;
|
|
411
210
|
protected stopContainer(_containerId: string): Promise<void>;
|
|
412
211
|
}
|
|
413
212
|
/**
|
|
414
|
-
*
|
|
213
|
+
* Create a Docker-backed sandbox.
|
|
415
214
|
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
* - **ComposeStrategy**: Multi-container environments via Docker Compose
|
|
215
|
+
* @example Runtime with installers
|
|
216
|
+
* ```ts
|
|
217
|
+
* import { createDockerSandbox, pkg, urlBinary, npm } from '@deepagents/context';
|
|
420
218
|
*
|
|
421
|
-
* @example RuntimeStrategy (default)
|
|
422
|
-
* ```typescript
|
|
423
219
|
* const sandbox = await createDockerSandbox({
|
|
424
220
|
* image: 'alpine:latest',
|
|
425
|
-
*
|
|
426
|
-
*
|
|
221
|
+
* installers: [
|
|
222
|
+
* pkg(['curl', 'jq']),
|
|
223
|
+
* urlBinary({ name: 'presenterm', url: {...} }),
|
|
224
|
+
* npm('prettier', { ensureRuntime: true }),
|
|
225
|
+
* ],
|
|
427
226
|
* });
|
|
428
|
-
* await sandbox.executeCommand('curl --version');
|
|
429
|
-
* await sandbox.dispose();
|
|
430
227
|
* ```
|
|
431
228
|
*
|
|
432
|
-
* @example
|
|
433
|
-
* ```
|
|
229
|
+
* @example Dockerfile
|
|
230
|
+
* ```ts
|
|
434
231
|
* const sandbox = await createDockerSandbox({
|
|
435
232
|
* dockerfile: `
|
|
436
233
|
* FROM alpine:latest
|
|
437
234
|
* RUN apk add --no-cache curl jq
|
|
438
235
|
* `,
|
|
439
|
-
* context: '.',
|
|
440
236
|
* });
|
|
441
|
-
* await sandbox.executeCommand('curl --version');
|
|
442
|
-
* await sandbox.dispose();
|
|
443
237
|
* ```
|
|
444
238
|
*
|
|
445
|
-
* @example
|
|
446
|
-
* ```
|
|
239
|
+
* @example Compose
|
|
240
|
+
* ```ts
|
|
447
241
|
* const sandbox = await createDockerSandbox({
|
|
448
242
|
* compose: './docker-compose.yml',
|
|
449
243
|
* service: 'app',
|
|
450
244
|
* });
|
|
451
|
-
* // Commands run in the 'app' service
|
|
452
|
-
* await sandbox.executeCommand('node --version');
|
|
453
|
-
* // Can reach other services by name
|
|
454
|
-
* await sandbox.executeCommand('curl http://db:5432');
|
|
455
|
-
* await sandbox.dispose(); // Stops ALL services
|
|
456
245
|
* ```
|
|
457
246
|
*/
|
|
458
|
-
export declare function createDockerSandbox(options?: DockerSandboxOptions): Promise<
|
|
247
|
+
export declare function createDockerSandbox(options?: DockerSandboxOptions): Promise<DisposableSandbox>;
|
|
459
248
|
/**
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
* @example
|
|
464
|
-
* ```typescript
|
|
465
|
-
* const output = await useSandbox(
|
|
466
|
-
* { packages: ['curl', 'jq'] },
|
|
467
|
-
* async (sandbox) => {
|
|
468
|
-
* const result = await sandbox.executeCommand('curl --version');
|
|
469
|
-
* return result.stdout;
|
|
470
|
-
* },
|
|
471
|
-
* );
|
|
472
|
-
* // Container is automatically disposed - no try/finally needed
|
|
473
|
-
* ```
|
|
249
|
+
* Run a function with a Docker sandbox; the container is disposed on
|
|
250
|
+
* completion (success or thrown).
|
|
474
251
|
*/
|
|
475
|
-
export declare function useSandbox<T>(options: DockerSandboxOptions, fn: (sandbox:
|
|
252
|
+
export declare function useSandbox<T>(options: DockerSandboxOptions, fn: (sandbox: DisposableSandbox) => Promise<T>): Promise<T>;
|
|
476
253
|
//# sourceMappingURL=docker-sandbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/docker-sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"docker-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/docker-sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAkB/C,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EAErB,cAAc,EACd,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,aAAa,IAAI,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EA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