@deepagents/context 4.0.0 → 4.2.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 +25 -16
- package/dist/browser.js +18 -8
- package/dist/browser.js.map +2 -2
- package/dist/index.js +2551 -1596
- package/dist/index.js.map +4 -4
- package/dist/lib/agent.d.ts.map +1 -1
- package/dist/lib/engine.d.ts +11 -4
- package/dist/lib/engine.d.ts.map +1 -1
- package/dist/lib/fragments/message/user.d.ts +28 -14
- package/dist/lib/fragments/message/user.d.ts.map +1 -1
- package/dist/lib/sandbox/agent-os-sandbox.d.ts +2 -2
- package/dist/lib/sandbox/agent-os-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/apple-container-sandbox-errors.d.ts +44 -0
- package/dist/lib/sandbox/apple-container-sandbox-errors.d.ts.map +1 -0
- package/dist/lib/sandbox/apple-container-sandbox.d.ts +130 -0
- package/dist/lib/sandbox/apple-container-sandbox.d.ts.map +1 -0
- package/dist/lib/sandbox/bash-meta.d.ts +0 -3
- package/dist/lib/sandbox/bash-meta.d.ts.map +1 -1
- package/dist/lib/sandbox/bash-tool.d.ts +3 -3
- package/dist/lib/sandbox/bash-tool.d.ts.map +1 -1
- package/dist/lib/sandbox/cli-process.d.ts +24 -0
- package/dist/lib/sandbox/cli-process.d.ts.map +1 -0
- package/dist/lib/sandbox/container-engine.d.ts +150 -0
- package/dist/lib/sandbox/container-engine.d.ts.map +1 -0
- package/dist/lib/sandbox/container-sandbox-errors.d.ts +10 -0
- package/dist/lib/sandbox/container-sandbox-errors.d.ts.map +1 -0
- package/dist/lib/sandbox/container-sandbox.d.ts +90 -0
- package/dist/lib/sandbox/container-sandbox.d.ts.map +1 -0
- package/dist/lib/sandbox/daytona-sandbox.d.ts +2 -2
- package/dist/lib/sandbox/daytona-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/docker-sandbox-errors.d.ts +2 -2
- package/dist/lib/sandbox/docker-sandbox-errors.d.ts.map +1 -1
- package/dist/lib/sandbox/docker-sandbox.d.ts +122 -218
- package/dist/lib/sandbox/docker-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/index.d.ts +5 -0
- package/dist/lib/sandbox/index.d.ts.map +1 -1
- package/dist/lib/sandbox/microsandbox-sandbox.d.ts +93 -0
- package/dist/lib/sandbox/microsandbox-sandbox.d.ts.map +1 -0
- package/dist/lib/sandbox/shell-quote.d.ts +2 -2
- package/dist/lib/sandbox/strace/index.d.ts +6 -21
- package/dist/lib/sandbox/strace/index.d.ts.map +1 -1
- package/dist/lib/sandbox/strace/index.js +18 -7
- package/dist/lib/sandbox/strace/index.js.map +2 -2
- package/dist/lib/sandbox/types.d.ts +22 -3
- package/dist/lib/sandbox/types.d.ts.map +1 -1
- package/dist/lib/sandbox/virtual-sandbox.d.ts +2 -2
- package/dist/lib/sandbox/virtual-sandbox.d.ts.map +1 -1
- package/package.json +14 -8
package/dist/lib/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/lib/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,MAAM,EACN,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,OAAO,EAMZ,YAAY,EAKb,MAAM,IAAI,CAAC;AAIZ,OAAO,EAAE,KAAK,aAAa,EAAe,MAAM,aAAa,CAAC;AAC9D,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,gBAAgB,EAMtB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG,CAC9B,MAAM,EAAE,kBAAkB,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,CAAC,OAAO,CAAC,GAAG,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;KAC3E,GACA,OAAO,CACR,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CACpE,CAAC;CACH;AAED,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,cAAc,EAC7D,OAAO,EAAE,uBAAuB,CAAC,OAAO,CAAC,GACxC,sBAAsB,CAAC,OAAO,CAAC,CAoFjC"}
|
package/dist/lib/engine.d.ts
CHANGED
|
@@ -254,16 +254,23 @@ export declare class ContextEngine {
|
|
|
254
254
|
* Evaluate `target: 'tool-output'` reminders against a tool's raw result and
|
|
255
255
|
* return the (possibly wrapped) output.
|
|
256
256
|
*
|
|
257
|
-
* Called by the agent's tool wrapper right after each `execute()` resolves
|
|
258
|
-
*
|
|
259
|
-
*
|
|
257
|
+
* Called by the agent's tool wrapper right after each `execute()` resolves.
|
|
258
|
+
* The wrapper passes the executing `call`, surfaced as
|
|
259
|
+
* {@link WhenContext.executingTool}, so a predicate can gate on the live
|
|
260
|
+
* tool's name/input/result — the only point at which the call being wrapped
|
|
261
|
+
* is observable.
|
|
262
|
+
* The store keeps the wrapped value with a host-only marker; the model-facing
|
|
263
|
+
* projection strips that marker while preserving `result` + `systemReminder`.
|
|
260
264
|
*
|
|
261
265
|
* Returns the output unchanged when no tool-output reminder fires. Without a
|
|
262
266
|
* persisted user message there is no turn context to evaluate against
|
|
263
267
|
* (e.g. asTool forks that set a pending user without saving), so the output
|
|
264
268
|
* passes through untouched.
|
|
265
269
|
*/
|
|
266
|
-
applyToolOutputReminders(output: unknown
|
|
270
|
+
applyToolOutputReminders(output: unknown, call?: {
|
|
271
|
+
toolName: string;
|
|
272
|
+
input: unknown;
|
|
273
|
+
}): Promise<unknown>;
|
|
267
274
|
/**
|
|
268
275
|
* Estimate token count and cost for the full context.
|
|
269
276
|
*
|
package/dist/lib/engine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/lib/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,mBAAmB,EACxB,KAAK,IAAI,EACT,KAAK,SAAS,EAIf,MAAM,IAAI,CAAC;AAGZ,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,eAAe,EAKrB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/lib/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,mBAAmB,EACxB,KAAK,IAAI,EACT,KAAK,SAAS,EAIf,MAAM,IAAI,CAAC;AAGZ,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,eAAe,EAKrB,MAAM,gBAAgB,CAAC;AAYxB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAEL,KAAK,UAAU,EAGf,KAAK,cAAc,EACnB,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAI1B,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,MA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O,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC,GAC3D,OAAO,CAAC,IAAI,CAAC;IAmBhB;;;;;;;;;;;;OAYG;IACU,UAAU,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBjE;;;;;;;OAOG;IACI,WAAW,IAAI,IAAI;IAI1B;;;;;;;;OAQG;IACI,IAAI,IAAI,aAAa;IAU5B;;;;;;;;;;;;;;;OAeG;IACI,cAAc;;;IAcrB;;;;;;;;;;;;;;;;;;OAkBG;IACU,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA0CtE"}
|
|
@@ -33,6 +33,18 @@ export interface WhenContext {
|
|
|
33
33
|
messageCount: number;
|
|
34
34
|
lastAssistantMessage?: UIMessage;
|
|
35
35
|
lastAssistantMessages?: UIMessage[];
|
|
36
|
+
/**
|
|
37
|
+
* The tool call whose result is being wrapped, populated only during
|
|
38
|
+
* `target: 'tool-output'` evaluation — the live call in flight, which the
|
|
39
|
+
* finalized message chain cannot yet contain (`lastAssistantMessage` holds
|
|
40
|
+
* prior, already-completed calls). Read it directly in a predicate to gate on
|
|
41
|
+
* the executing tool's name/input/result. Undefined for `user` / `steer`.
|
|
42
|
+
*/
|
|
43
|
+
executingTool?: {
|
|
44
|
+
name: string;
|
|
45
|
+
input: unknown;
|
|
46
|
+
output: unknown;
|
|
47
|
+
};
|
|
36
48
|
/**
|
|
37
49
|
* Ids that a fire-once latch has already fired for in this conversation
|
|
38
50
|
* (persisted synth onceIds ∪ this stream's fires). Populated only during
|
|
@@ -69,16 +81,6 @@ export interface ReminderOptions {
|
|
|
69
81
|
asPart?: boolean;
|
|
70
82
|
target?: ReminderTarget;
|
|
71
83
|
}
|
|
72
|
-
/**
|
|
73
|
-
* A resolved reminder ready to bake into a user message. Internal to the save
|
|
74
|
-
* fold — callers declare reminders with {@link reminder} + `engine.set()`.
|
|
75
|
-
*/
|
|
76
|
-
export interface UserReminder {
|
|
77
|
-
text: SyncReminderText;
|
|
78
|
-
asPart: boolean;
|
|
79
|
-
target: 'user';
|
|
80
|
-
metadata?: Record<string, unknown>;
|
|
81
|
-
}
|
|
82
84
|
export interface ConditionalReminder {
|
|
83
85
|
text: ReminderText;
|
|
84
86
|
when: WhenPredicate;
|
|
@@ -126,9 +128,6 @@ export declare function stripReminders(message: UIMessage): UIMessage;
|
|
|
126
128
|
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
127
129
|
export declare function applyInlineReminder(message: UIMessage, value: string): UserReminderMetadata;
|
|
128
130
|
export declare function applyPartReminder(message: UIMessage, value: string): UserReminderMetadata;
|
|
129
|
-
export declare function resolveReminderText(item: {
|
|
130
|
-
text: SyncReminderText;
|
|
131
|
-
}, ctx: ReminderContext): string;
|
|
132
131
|
export declare function resolveReminder(item: {
|
|
133
132
|
text: SyncReminderText;
|
|
134
133
|
metadata?: Record<string, unknown>;
|
|
@@ -153,6 +152,17 @@ export declare function applyReminderToMessage(message: UIMessage, item: {
|
|
|
153
152
|
* metadata bookkeeping.
|
|
154
153
|
*/
|
|
155
154
|
export declare function applyRemindersToToolOutput(output: unknown, texts: string[]): unknown;
|
|
155
|
+
/**
|
|
156
|
+
* Project a tool-output reminder envelope to its model-facing form: run the
|
|
157
|
+
* wrapped tool's own projection over the inner `result` (so a tool's host-only
|
|
158
|
+
* `meta` channel is still stripped), then re-attach the `systemReminder`. The
|
|
159
|
+
* envelope's own host-only `meta` marker is dropped. Returns null for anything
|
|
160
|
+
* that is not one of our envelopes, so the caller can project the raw output.
|
|
161
|
+
*/
|
|
162
|
+
export declare function toToolReminderModelOutput(output: unknown, projectResult: (result: unknown) => unknown): {
|
|
163
|
+
type: 'json';
|
|
164
|
+
value: unknown;
|
|
165
|
+
} | null;
|
|
156
166
|
export declare function mergeReminderMetadata(message: UIMessage, addedReminders: UserReminderMetadata[]): void;
|
|
157
167
|
/**
|
|
158
168
|
* Create a reminder fragment, set on the engine via `engine.set()`. The engine
|
|
@@ -188,7 +198,11 @@ export declare function user(content: string | (UIMessage & {
|
|
|
188
198
|
* `metadata.reminders` so `stripReminders` can reverse it. The save fold is the
|
|
189
199
|
* only caller — user reminders are declared on the engine, not on `user()`.
|
|
190
200
|
*/
|
|
191
|
-
export declare function applyUserRemindersToMessage(message: UIMessage, reminders:
|
|
201
|
+
export declare function applyUserRemindersToMessage(message: UIMessage, reminders: Array<{
|
|
202
|
+
text: SyncReminderText;
|
|
203
|
+
asPart: boolean;
|
|
204
|
+
metadata?: Record<string, unknown>;
|
|
205
|
+
}>): void;
|
|
192
206
|
/**
|
|
193
207
|
* Build the hidden synthetic user message injected mid-loop for steer reminders.
|
|
194
208
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../src/lib/fragments/message/user.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,SAAS,EAGf,MAAM,IAAI,CAAC;AAEZ,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,eAAe,EAErB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,SAAS,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,IA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GACjB,OAAO,IAAI,SAAS,GAAG;IACxB,QAAQ,EAAE;QAAE,SAAS,EAAE,sBAAsB,CAAA;KAAE,CAAC;CACjD,CAMA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DisposableSandbox } from './types.ts';
|
|
1
|
+
import type { DisposableSandbox, SandboxReadinessOptions } from './types.ts';
|
|
2
2
|
export declare class AgentOsSandboxError extends Error {
|
|
3
3
|
constructor(message: string);
|
|
4
4
|
}
|
|
@@ -8,7 +8,7 @@ export declare class AgentOsNotAvailableError extends AgentOsSandboxError {
|
|
|
8
8
|
export declare class AgentOsCreationError extends AgentOsSandboxError {
|
|
9
9
|
constructor(message: string, cause?: Error);
|
|
10
10
|
}
|
|
11
|
-
export interface AgentOsSandboxOptions {
|
|
11
|
+
export interface AgentOsSandboxOptions extends SandboxReadinessOptions {
|
|
12
12
|
/** WASM software packages (e.g., @rivet-dev/agent-os-common) */
|
|
13
13
|
software?: unknown[];
|
|
14
14
|
/** Filesystem mounts inside the VM */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-os-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/agent-os-sandbox.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,
|
|
1
|
+
{"version":3,"file":"agent-os-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/agent-os-sandbox.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EAGjB,uBAAuB,EAExB,MAAM,YAAY,CAAC;AA8BpB,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,wBAAyB,SAAQ,mBAAmB;gBACnD,KAAK,CAAC,EAAE,KAAK;CAO1B;AAED,qBAAa,oBAAqB,SAAQ,mBAAmB;gBAC/C,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAK3C;AAED,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;IACpE,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,sCAAsC;IACtC,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACtE,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAwFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,iBAAiB,CAAC,CAiI5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,OAAO,EAAE,qBAAqB,EAC9B,EAAE,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,GAC7C,OAAO,CAAC,CAAC,CAAC,CAOZ"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ContainerSandboxError } from './container-sandbox-errors.ts';
|
|
2
|
+
export declare class AppleContainerSandboxError extends ContainerSandboxError {
|
|
3
|
+
constructor(message: string, containerId?: string);
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Raised when the `container` apiserver is not running. Unlike Docker's
|
|
7
|
+
* always-on daemon, Apple's service is started on demand with
|
|
8
|
+
* `container system start` (and needs a guest kernel configured via
|
|
9
|
+
* `container system kernel set --recommended`).
|
|
10
|
+
*/
|
|
11
|
+
export declare class ContainerServiceNotRunningError extends AppleContainerSandboxError {
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
14
|
+
export declare class AppleContainerCreationError extends AppleContainerSandboxError {
|
|
15
|
+
readonly image: string;
|
|
16
|
+
cause?: Error;
|
|
17
|
+
constructor(message: string, image: string, cause?: Error);
|
|
18
|
+
}
|
|
19
|
+
export declare class AppleContainerImageBuildError extends AppleContainerSandboxError {
|
|
20
|
+
readonly stderr: string;
|
|
21
|
+
constructor(stderr: string);
|
|
22
|
+
}
|
|
23
|
+
export declare class AppleContainerVolumePathError extends AppleContainerSandboxError {
|
|
24
|
+
readonly source: string;
|
|
25
|
+
readonly containerPath: string;
|
|
26
|
+
readonly reason: string;
|
|
27
|
+
constructor(source: string, containerPath: string, reason: string);
|
|
28
|
+
}
|
|
29
|
+
export declare class AppleContainerVolumeInspectError extends AppleContainerSandboxError {
|
|
30
|
+
readonly volume: string;
|
|
31
|
+
readonly reason: string;
|
|
32
|
+
constructor(volume: string, reason: string);
|
|
33
|
+
}
|
|
34
|
+
export declare class AppleContainerVolumeCreateError extends AppleContainerSandboxError {
|
|
35
|
+
readonly volume: string;
|
|
36
|
+
readonly reason: string;
|
|
37
|
+
constructor(volume: string, reason: string);
|
|
38
|
+
}
|
|
39
|
+
export declare class AppleContainerVolumeRemoveError extends AppleContainerSandboxError {
|
|
40
|
+
readonly volume: string;
|
|
41
|
+
readonly reason: string;
|
|
42
|
+
constructor(volume: string, reason: string);
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=apple-container-sandbox-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-container-sandbox-errors.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/apple-container-sandbox-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,qBAAa,0BAA2B,SAAQ,qBAAqB;gBACvD,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;CAIlD;AAED;;;;;GAKG;AACH,qBAAa,+BAAgC,SAAQ,0BAA0B;;CAQ9E;AAED,qBAAa,2BAA4B,SAAQ,0BAA0B;IACzE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC;gBAEX,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM1D;AAED,qBAAa,6BAA8B,SAAQ,0BAA0B;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM;CAK3B;AAED,qBAAa,6BAA8B,SAAQ,0BAA0B;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CASlE;AAED,qBAAa,gCAAiC,SAAQ,0BAA0B;IAC9E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAM3C;AAED,qBAAa,+BAAgC,SAAQ,0BAA0B;IAC7E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAM3C;AAED,qBAAa,+BAAgC,SAAQ,0BAA0B;IAC7E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAM3C"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { ContainerEngine } from './container-engine.ts';
|
|
2
|
+
import { type Installer } from './installers/installer.ts';
|
|
3
|
+
import type { DisposableSandbox } from './types.ts';
|
|
4
|
+
export { AppleContainerCreationError, AppleContainerImageBuildError, AppleContainerSandboxError, AppleContainerVolumeCreateError, AppleContainerVolumeInspectError, AppleContainerVolumePathError, AppleContainerVolumeRemoveError, ContainerServiceNotRunningError, } from './apple-container-sandbox-errors.ts';
|
|
5
|
+
export interface AppleContainerBindVolume {
|
|
6
|
+
type: 'bind';
|
|
7
|
+
hostPath: string;
|
|
8
|
+
containerPath: string;
|
|
9
|
+
/** Default: `true`. */
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface AppleContainerNamedVolume {
|
|
13
|
+
type: 'volume';
|
|
14
|
+
name: string;
|
|
15
|
+
containerPath: string;
|
|
16
|
+
/** Default: `true`. */
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
/** Default: `'external'`. */
|
|
19
|
+
lifecycle?: 'external' | 'managed';
|
|
20
|
+
/** Default: `true` for managed volumes created by this sandbox. */
|
|
21
|
+
removeOnDispose?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Apple `container` volumes are always local ext4 disk images — there is no
|
|
25
|
+
* pluggable driver model (unlike Docker's `--driver`). Back a volume with
|
|
26
|
+
* remote storage by bind-mounting a host directory instead.
|
|
27
|
+
*/
|
|
28
|
+
export type AppleContainerVolume = AppleContainerBindVolume | AppleContainerNamedVolume;
|
|
29
|
+
export interface AppleContainerResources {
|
|
30
|
+
/** `--memory` — e.g. `'1024M'`, `'2G'` (MB granularity). */
|
|
31
|
+
memory?: string;
|
|
32
|
+
/** `--cpus` — number of CPUs. */
|
|
33
|
+
cpus?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Stable identity suffix for the container. When provided, the container is
|
|
37
|
+
* named `sandbox-<name>` instead of a randomized `sandbox-<8hex>`. If a
|
|
38
|
+
* container with that name already exists, the sandbox attaches to it:
|
|
39
|
+
* installers, volume preparation, and env are skipped. If it exists but is
|
|
40
|
+
* stopped, it is started first. Otherwise it is created fresh.
|
|
41
|
+
*
|
|
42
|
+
* This is get-or-create for SEQUENTIAL callers. Creating the same name from
|
|
43
|
+
* two callers concurrently is not supported — the `container` runtime races on
|
|
44
|
+
* duplicate-name `run` (it can leave a container mid-transition and fail with
|
|
45
|
+
* an internal error); serialize creation of a given name.
|
|
46
|
+
*
|
|
47
|
+
* Must match `/^[A-Za-z0-9_.-]+$/`.
|
|
48
|
+
*/
|
|
49
|
+
type StableContainerName = string;
|
|
50
|
+
export interface AppleContainerCommonOptions {
|
|
51
|
+
volumes?: AppleContainerVolume[];
|
|
52
|
+
resources?: AppleContainerResources;
|
|
53
|
+
env?: Record<string, string>;
|
|
54
|
+
name?: StableContainerName;
|
|
55
|
+
/**
|
|
56
|
+
* Args appended after the image at `container run` time.
|
|
57
|
+
* - `undefined` (default): `['tail', '-f', '/dev/null']` keep-alive so a bare
|
|
58
|
+
* image stays up for installers and `executeCommand`.
|
|
59
|
+
* - `[]` or `null`: nothing appended; the image's own `CMD`/`ENTRYPOINT` runs.
|
|
60
|
+
* - A non-empty array: appended verbatim, overriding the image command.
|
|
61
|
+
*/
|
|
62
|
+
command?: readonly string[] | null;
|
|
63
|
+
/**
|
|
64
|
+
* `-a, --arch` — `'arm64'` (native on Apple silicon) or `'amd64'` (emulated
|
|
65
|
+
* via Rosetta). Replaces the Docker backend's `--platform`.
|
|
66
|
+
*/
|
|
67
|
+
arch?: 'arm64' | 'amd64';
|
|
68
|
+
}
|
|
69
|
+
export interface AppleContainerRuntimeOptions extends AppleContainerCommonOptions {
|
|
70
|
+
/** Image to run (default: `'docker.io/library/alpine:latest'`). */
|
|
71
|
+
image?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Ordered installers run after the container starts. Use `pkg([...])`,
|
|
74
|
+
* `urlBinary({...})`, `npm(...)`, `pip(...)`, `githubRelease({...})`, or any
|
|
75
|
+
* custom `Installer` — the same installers the Docker backend accepts.
|
|
76
|
+
*/
|
|
77
|
+
installers?: Installer[];
|
|
78
|
+
}
|
|
79
|
+
export interface AppleContainerfileOptions extends AppleContainerCommonOptions {
|
|
80
|
+
/** Inline Dockerfile content (contains `\n`) or a path to one. */
|
|
81
|
+
dockerfile: string;
|
|
82
|
+
/** Build context directory (default: `'.'`). */
|
|
83
|
+
context?: string;
|
|
84
|
+
/** Stream `container build` output instead of buffering it. Default `false`. */
|
|
85
|
+
showBuildLogs?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export type AppleContainerSandboxOptions = AppleContainerRuntimeOptions | AppleContainerfileOptions;
|
|
88
|
+
export declare function isAppleContainerfileOptions(opts: AppleContainerSandboxOptions): opts is AppleContainerfileOptions;
|
|
89
|
+
/**
|
|
90
|
+
* The Apple `container` CLI dialect, plugged into the shared
|
|
91
|
+
* `ContainerSandboxStrategy` skeleton. Mirrors `dockerEngine` but for the
|
|
92
|
+
* micro-VM runtime: `--cwd`/`--env` exec flags, JSON `inspect` parsing,
|
|
93
|
+
* virtiofs mounts, `apiserver`-down detection, and Apple error classes.
|
|
94
|
+
*/
|
|
95
|
+
export declare const appleEngine: ContainerEngine<AppleContainerCommonOptions>;
|
|
96
|
+
/**
|
|
97
|
+
* Create a sandbox backed by Apple's `container` CLI — Linux containers run as
|
|
98
|
+
* lightweight per-container virtual machines on Apple silicon (macOS 26+).
|
|
99
|
+
*
|
|
100
|
+
* Requires the `container` service to be running (`container system start`)
|
|
101
|
+
* with a guest kernel configured (`container system kernel set --recommended`).
|
|
102
|
+
*
|
|
103
|
+
* @example Runtime with installers
|
|
104
|
+
* ```ts
|
|
105
|
+
* import { createAppleContainerSandbox, pkg } from '@deepagents/context';
|
|
106
|
+
*
|
|
107
|
+
* await using sandbox = await createAppleContainerSandbox({
|
|
108
|
+
* image: 'docker.io/library/alpine:latest',
|
|
109
|
+
* installers: [pkg(['curl', 'jq'])],
|
|
110
|
+
* });
|
|
111
|
+
* const { stdout } = await sandbox.executeCommand('echo hello');
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @example Dockerfile
|
|
115
|
+
* ```ts
|
|
116
|
+
* await using sandbox = await createAppleContainerSandbox({
|
|
117
|
+
* dockerfile: `
|
|
118
|
+
* FROM docker.io/library/alpine:latest
|
|
119
|
+
* RUN apk add --no-cache curl
|
|
120
|
+
* `,
|
|
121
|
+
* });
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
export declare function createAppleContainerSandbox(options?: AppleContainerSandboxOptions): Promise<DisposableSandbox>;
|
|
125
|
+
/**
|
|
126
|
+
* Run a function with an Apple container sandbox; the container is disposed on
|
|
127
|
+
* completion (success or thrown).
|
|
128
|
+
*/
|
|
129
|
+
export declare function useAppleContainerSandbox<T>(options: AppleContainerSandboxOptions, fn: (sandbox: DisposableSandbox) => Promise<T>): Promise<T>;
|
|
130
|
+
//# sourceMappingURL=apple-container-sandbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-container-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/apple-container-sandbox.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,eAAe,EAGhB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,EAC1B,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,qCAAqC,CAAC;AAO7C,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,M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AE9B,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,4BAA4B,GACjC,IAAI,IAAI,yBAAyB,CAEnC;AAuDD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,2BAA2B,CAmKpE,CAAC;AAkJF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,iBAAiB,CAAC,CAa5B;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,CAAC,EAC9C,OAAO,EAAE,4BAA4B,EACrC,EAAE,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,GAC7C,OAAO,CAAC,CAAC,CAAC,CAOZ"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
export interface BashMetaState {
|
|
2
2
|
hidden: Record<string, unknown>;
|
|
3
|
-
reminder?: string;
|
|
4
3
|
}
|
|
5
4
|
export declare function runWithBashMeta<T>(fn: () => Promise<T>): Promise<T>;
|
|
6
5
|
export interface BashMetaHandle {
|
|
7
6
|
setHidden(patch: Record<string, unknown>): void;
|
|
8
|
-
setReminder(text: string): void;
|
|
9
|
-
clearReminder(): void;
|
|
10
7
|
}
|
|
11
8
|
export declare function useBashMeta(): BashMetaHandle | null;
|
|
12
9
|
export declare function readBashMeta(): BashMetaState | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash-meta.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/bash-meta.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"bash-meta.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/bash-meta.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAID,wBAAgB,eAAe,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEnE;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACjD;AAED,wBAAgB,WAAW,IAAI,cAAc,GAAG,IAAI,CAQnD;AAED,wBAAgB,YAAY,IAAI,aAAa,GAAG,SAAS,CAExD"}
|
|
@@ -36,9 +36,9 @@ export interface CreateBashToolWithSkillsOptions extends Omit<CreateBashToolOpti
|
|
|
36
36
|
* the decorated methods. The outer `bash` tool adds:
|
|
37
37
|
*
|
|
38
38
|
* - `reasoning` input on the schema.
|
|
39
|
-
* -
|
|
40
|
-
*
|
|
41
|
-
*
|
|
39
|
+
* - Host-only meta channel (`useBashMeta().setHidden(patch)`): attaches
|
|
40
|
+
* metadata that `toModelOutput` strips from the model-facing result.
|
|
41
|
+
* Model-visible nudges are declared as `target: 'tool-output'` reminders.
|
|
42
42
|
* - Single-shot `skills` upload populating `sandbox.skills`.
|
|
43
43
|
*/
|
|
44
44
|
export declare function createBashTool(options: CreateBashToolWithSkillsOptions): Promise<AgentSandbox>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash-tool.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/bash-tool.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,WAAW,CAAC;AAMnB,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAEjB,MAAM,YAAY,CAAC;AA+BpB,MAAM,WAAW,+BAAgC,SAAQ,IAAI,CAC3D,qBAAqB,EACrB,SAAS,CACV;IACC;;;;;OAKG;IACH,OAAO,EAAE,iBAAiB,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"bash-tool.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/bash-tool.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,WAAW,CAAC;AAMnB,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAEjB,MAAM,YAAY,CAAC;AA+BpB,MAAM,WAAW,+BAAgC,SAAQ,IAAI,CAC3D,qBAAqB,EACrB,SAAS,CACV;IACC;;;;;OAKG;IACH,OAAO,EAAE,iBAAiB,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,YAAY,CAAC,CAkHvB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ChildProcess } from 'node:child_process';
|
|
2
|
+
import type { SandboxProcess } from './types.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Bridge a Node `child_process` — a `docker exec` / `container exec` child —
|
|
5
|
+
* into the backend-neutral {@link SandboxProcess} shape: web `ReadableStream`
|
|
6
|
+
* stdio plus an `exit` promise that resolves with the child's exit code.
|
|
7
|
+
*
|
|
8
|
+
* Aborting `abortSignal` sends `SIGKILL`. Both the `docker` and Apple
|
|
9
|
+
* `container` CLIs trap `SIGTERM` in their client wrapper and exit cleanly with
|
|
10
|
+
* code 0, so `SIGTERM` would look like a successful run; only `SIGKILL`
|
|
11
|
+
* reliably tears the child down and surfaces as a non-success exit.
|
|
12
|
+
*/
|
|
13
|
+
export declare function toSandboxProcess(child: ChildProcess, abortSignal: AbortSignal | undefined): SandboxProcess;
|
|
14
|
+
/**
|
|
15
|
+
* Build the shell commands that decode `content` into `path`, for sandbox
|
|
16
|
+
* backends whose only channel is `executeCommand` (no native file copy). The
|
|
17
|
+
* payload is split into independently-decodable base64 chunks so large files
|
|
18
|
+
* don't blow ARG_MAX, and every argument is shell-quoted. Always returns at
|
|
19
|
+
* least one command (an empty file is created by the final fallback).
|
|
20
|
+
*/
|
|
21
|
+
export declare function base64WriteCommands(path: string, content: string | Buffer): string[];
|
|
22
|
+
/** Build the command that base64-encodes `path` for reading back to the host. */
|
|
23
|
+
export declare function base64ReadCommand(path: string): string;
|
|
24
|
+
//# sourceMappingURL=cli-process.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-process.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/cli-process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD,OAAO,KAAK,EAAY,cAAc,EAAE,MAAM,YAAY,CAAC;AAE3D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,WAAW,GAAG,SAAS,GACnC,cAAc,CAoChB;AASD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GAAG,MAAM,GACvB,MAAM,EAAE,CAeV;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { ContainerSandboxError } from './container-sandbox-errors.ts';
|
|
2
|
+
import type { InstallerContext } from './installers/installer.ts';
|
|
3
|
+
import type { SandboxReadinessOptions } from './types.ts';
|
|
4
|
+
export interface ContainerErrorFactory {
|
|
5
|
+
serviceNotAvailable(): ContainerSandboxError;
|
|
6
|
+
creation(message: string, image: string, cause?: Error): ContainerSandboxError;
|
|
7
|
+
generic(message: string, containerId?: string): ContainerSandboxError;
|
|
8
|
+
volumePath(source: string, containerPath: string, reason: string): ContainerSandboxError;
|
|
9
|
+
volumeInspect(name: string, reason: string): ContainerSandboxError;
|
|
10
|
+
volumeCreate(name: string, reason: string): ContainerSandboxError;
|
|
11
|
+
volumeRemove(name: string, reason: string): ContainerSandboxError;
|
|
12
|
+
}
|
|
13
|
+
/** Resolved build request handed to {@link ContainerEngine.buildImage}. */
|
|
14
|
+
export interface ImageBuildSpec {
|
|
15
|
+
/** Precomputed content-hash image tag the engine must build. */
|
|
16
|
+
tag: string;
|
|
17
|
+
/** Inline Dockerfile content (contains `\n`) or a path to one. */
|
|
18
|
+
dockerfile: string;
|
|
19
|
+
/** Build context directory. */
|
|
20
|
+
context: string;
|
|
21
|
+
/** Stream build output to the parent stdio instead of buffering it. */
|
|
22
|
+
showBuildLogs: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Platform (Docker `--platform`) / arch (Apple `--arch`). Already folded into
|
|
25
|
+
* `tag` by the strategy; the engine re-reads it for the build flag.
|
|
26
|
+
*/
|
|
27
|
+
identity?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SandboxBindVolume {
|
|
30
|
+
type: 'bind';
|
|
31
|
+
hostPath: string;
|
|
32
|
+
containerPath: string;
|
|
33
|
+
/** Default: `true`. */
|
|
34
|
+
readOnly?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A named volume mount. The superset shape across engines — `driver`/
|
|
38
|
+
* `driverOptions`/`subPath`/`noCopy` are read only by engines that support them
|
|
39
|
+
* (Docker); engines without a pluggable driver model (Apple) ignore them.
|
|
40
|
+
*/
|
|
41
|
+
export interface SandboxNamedVolume {
|
|
42
|
+
type: 'volume';
|
|
43
|
+
name: string;
|
|
44
|
+
containerPath: string;
|
|
45
|
+
/** Default: `true`. */
|
|
46
|
+
readOnly?: boolean;
|
|
47
|
+
/** Default: `'external'`. */
|
|
48
|
+
lifecycle?: 'external' | 'managed';
|
|
49
|
+
/** Volume driver used when `lifecycle` is `'managed'` (Docker `--driver`). */
|
|
50
|
+
driver?: string;
|
|
51
|
+
/** Volume driver options used when `lifecycle` is `'managed'`. */
|
|
52
|
+
driverOptions?: Record<string, string>;
|
|
53
|
+
subPath?: string;
|
|
54
|
+
noCopy?: boolean;
|
|
55
|
+
/** Default: `true` for managed volumes created by this sandbox. */
|
|
56
|
+
removeOnDispose?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export type SandboxVolume = SandboxBindVolume | SandboxNamedVolume;
|
|
59
|
+
/** Resource limits common to every engine. Engines extend with their own knobs. */
|
|
60
|
+
export interface SandboxResources {
|
|
61
|
+
/** `--memory` — e.g. `'1g'`, `'1024M'`. */
|
|
62
|
+
memory?: string;
|
|
63
|
+
/** `--cpus` — number of CPUs. */
|
|
64
|
+
cpus?: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The options the shared skeleton is allowed to read. Each engine extends this
|
|
68
|
+
* with its own dialect knobs (Docker's security/network/…; Apple's `arch`),
|
|
69
|
+
* which only its own engine methods see — the skeleton is typed to this common
|
|
70
|
+
* subset and physically cannot read them.
|
|
71
|
+
*/
|
|
72
|
+
export interface CommonSandboxOptions extends SandboxReadinessOptions {
|
|
73
|
+
volumes?: SandboxVolume[];
|
|
74
|
+
resources?: SandboxResources;
|
|
75
|
+
env?: Record<string, string>;
|
|
76
|
+
/**
|
|
77
|
+
* Stable identity suffix. When provided, the container is named
|
|
78
|
+
* `sandbox-<name>` instead of a randomized `sandbox-<8hex>`. If a container
|
|
79
|
+
* with that name already exists, the sandbox attaches to it (installers,
|
|
80
|
+
* volume preparation, and env are skipped); if it exists but is stopped, it is
|
|
81
|
+
* started first; otherwise it is created fresh. Must match `/^[A-Za-z0-9_.-]+$/`.
|
|
82
|
+
*
|
|
83
|
+
* Warning: `dispose()` stops (and `--rm` removes) the container regardless of
|
|
84
|
+
* whether it was created or attached to. If two callers in the same process
|
|
85
|
+
* share a name, the first `dispose()` destroys the container the other is
|
|
86
|
+
* still using.
|
|
87
|
+
*/
|
|
88
|
+
name?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Args appended after the image at run time.
|
|
91
|
+
* - `undefined` (default): `['tail', '-f', '/dev/null']` keep-alive so a bare
|
|
92
|
+
* image stays up for installers and `executeCommand`.
|
|
93
|
+
* - `[]` or `null`: nothing is appended; the image's own `CMD`/`ENTRYPOINT`
|
|
94
|
+
* runs as declared.
|
|
95
|
+
* - A non-empty array: appended verbatim, overriding the image `CMD`.
|
|
96
|
+
*/
|
|
97
|
+
command?: readonly string[] | null;
|
|
98
|
+
/** Working directory inside the container (default `'/workspace'`). */
|
|
99
|
+
workdir?: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The CLI dialect seam. Captures everything that differs between container
|
|
103
|
+
* runtimes (binary, run/exec arg flags, status parsing, error-string detection,
|
|
104
|
+
* workdir bootstrap, image build) so one shared strategy can orchestrate any
|
|
105
|
+
* engine. Generic over `TOpts` so each engine reads its own dialect-specific run
|
|
106
|
+
* knobs off the resolved options while the skeleton only ever supplies the
|
|
107
|
+
* common subset. Implemented by `dockerEngine` (docker-sandbox.ts) and
|
|
108
|
+
* `appleEngine` (apple-container-sandbox.ts).
|
|
109
|
+
*/
|
|
110
|
+
export interface ContainerEngine<TOpts extends CommonSandboxOptions = CommonSandboxOptions> {
|
|
111
|
+
readonly cli: string;
|
|
112
|
+
/**
|
|
113
|
+
* Build the `<cli> run` argv from resolved options. The shared skeleton
|
|
114
|
+
* supplies `image`, `containerId`, and `workdir`; every other flag is the
|
|
115
|
+
* engine's own dialect read off `opts`.
|
|
116
|
+
*/
|
|
117
|
+
runArgs(image: string, containerId: string, opts: TOpts, workdir: string): string[];
|
|
118
|
+
execArgs(containerId: string, command: string, options?: {
|
|
119
|
+
cwd?: string;
|
|
120
|
+
env?: Record<string, string>;
|
|
121
|
+
}): string[];
|
|
122
|
+
inspectArgs(containerId: string): string[];
|
|
123
|
+
mountArg(volume: SandboxVolume): string;
|
|
124
|
+
parseStatus(status: string): 'running' | 'stopped' | 'absent';
|
|
125
|
+
volumeCreateArgs(volume: SandboxNamedVolume): string[];
|
|
126
|
+
errorMessage(error: unknown): string;
|
|
127
|
+
isServiceDown(message: string): boolean;
|
|
128
|
+
isMissingContainer(message: string): boolean;
|
|
129
|
+
isMissingVolume(message: string): boolean;
|
|
130
|
+
isNameConflict(message: string): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Ensure `workdir` exists before any `exec` runs in it. Docker's `run -w`
|
|
133
|
+
* auto-creates the workdir (no-op here); Apple's per-exec `--cwd` fails on a
|
|
134
|
+
* missing dir, so its engine bootstraps it with `mkdir -p`.
|
|
135
|
+
*/
|
|
136
|
+
ensureWorkdir(containerId: string, workdir: string): Promise<void>;
|
|
137
|
+
/** Image used when no `image` option is given. */
|
|
138
|
+
readonly defaultImage: string;
|
|
139
|
+
/**
|
|
140
|
+
* Build the installer context that drives this engine's post-start installer
|
|
141
|
+
* phase (`pkg`/`npm`/`pip`/…) over the engine's own `exec`.
|
|
142
|
+
*/
|
|
143
|
+
createInstallerContext(containerId: string, image: string): InstallerContext;
|
|
144
|
+
/** Whether image `tag` already exists locally (so the build can be skipped). */
|
|
145
|
+
imageExists(tag: string): Promise<boolean>;
|
|
146
|
+
/** Build the image described by `spec`. The engine owns the build dialect. */
|
|
147
|
+
buildImage(spec: ImageBuildSpec): Promise<void>;
|
|
148
|
+
readonly errors: ContainerErrorFactory;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=container-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-engine.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/container-engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,q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C;IAC3C,8EAA8E;IAC9E,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;CACxC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared base for every container-sandbox error across engines (Docker, Apple
|
|
3
|
+
* `container`). Catch this to handle any backend's failure uniformly; catch a
|
|
4
|
+
* specific subclass (e.g. {@link DockerSandboxError}) for engine-specific cases.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ContainerSandboxError extends Error {
|
|
7
|
+
readonly containerId?: string;
|
|
8
|
+
constructor(message: string, containerId?: string);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=container-sandbox-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-sandbox-errors.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/container-sandbox-errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;gBAElB,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;CAKlD"}
|