managed-deepagents 0.5.4-dev.11 → 0.5.4-dev.12

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.
@@ -1,17 +1,36 @@
1
1
  import { createHash, randomBytes } from "node:crypto";
2
+ import { LangSmithSandbox } from "deepagents";
3
+ import { Sandbox, SandboxClient } from "langsmith/sandbox";
2
4
  import { hasSandboxConnectors, runConnectorSandboxHooks, } from "./connector.js";
3
- import { runSetupScript } from "./setup-script.js";
4
- import { isSandboxStreamError } from "./sandbox-stream-retry.js";
5
+ /** Deployment secret naming the recipe snapshot baked at `mda deploy`. */
6
+ export const RECIPE_SNAPSHOT_ENV = "MDA_SANDBOX_RECIPE_SNAPSHOT";
5
7
  /**
6
- * Created sandboxes, keyed by scope, reused for the lifetime of this runtime
7
- * process. Storing the in-flight promise dedupes concurrent runs and guarantees
8
- * `setup.sh` is executed only once per newly created sandbox.
8
+ * Env var naming the workspace the CLI baked the recipe snapshot into.
9
+ *
10
+ * `mda deploy` sets it on the deployment and `mda dev` stages it into the local
11
+ * `.env`. Sandboxes and snapshots are workspace-scoped, so the runtime must
12
+ * send it too — an API key whose default workspace differs from this one
13
+ * resolves `snapshotName` in the wrong workspace and 404s on the recipe.
14
+ */
15
+ export const WORKSPACE_ID_ENV = "LANGSMITH_WORKSPACE_ID";
16
+ /** Header the LangSmith APIs use to scope a request to one workspace. */
17
+ const TENANT_HEADER = "X-Tenant-Id";
18
+ /**
19
+ * Created sandboxes, keyed by thread, reused for the lifetime of this runtime
20
+ * process. Storing the in-flight promise dedupes concurrent runs. Provisioning
21
+ * (`setup.sh`) happens at deploy bake, not on thread create.
9
22
  */
10
23
  const managedSandboxes = new Map();
11
24
  /** Host box names that must not be re-adopted after invalidate until recreate. */
12
25
  const invalidatedSandboxNames = new Set();
13
26
  /** Host box name for a resolved backend instance (survives cache replacement). */
14
27
  const backendHostNames = new WeakMap();
28
+ /** Cold-box race: command stream died before the sandbox accepted the command. */
29
+ const STREAM_NEVER_STARTED_RE = /Command stream ended before ['"]started['"] message/i;
30
+ const STREAM_NEVER_STARTED_NAMES = new Set([
31
+ "_StreamEndedBeforeStarted",
32
+ "StreamEndedBeforeStarted",
33
+ ]);
15
34
  /**
16
35
  * Separator between the deployment name and the identity digest in a managed
17
36
  * sandbox name.
@@ -24,32 +43,30 @@ const backendHostNames = new WeakMap();
24
43
  const SANDBOX_NAME_SEPARATOR = "--";
25
44
  /** Hex characters of the identity digest kept in a sandbox name. */
26
45
  const SANDBOX_DIGEST_LENGTH = 12;
46
+ /** Host limit, with room reserved for the collision fallback suffix. */
47
+ const MAX_SANDBOX_NAME_LENGTH = 63;
48
+ const SANDBOX_FALLBACK_SUFFIX_LENGTH = 9;
49
+ const MAX_SANDBOX_DEPLOYMENT_COMPONENT_LENGTH = MAX_SANDBOX_NAME_LENGTH -
50
+ SANDBOX_NAME_SEPARATOR.length -
51
+ SANDBOX_DIGEST_LENGTH -
52
+ SANDBOX_FALLBACK_SUFFIX_LENGTH;
53
+ const SANDBOX_DEPLOYMENT_DIGEST_LENGTH = 8;
27
54
  /** Sandbox statuses that can be adopted as-is. */
28
55
  const ADOPTABLE_STATUS = new Set(["ready", "running"]);
29
56
  /** Sandbox status for one that is stopped but restartable. */
30
57
  const STOPPED_STATUS = "stopped";
31
- const defaultLangSmithSandboxClientLoader = async () => {
32
- const dynamicImport = new Function("specifier", "return import(specifier)");
33
- return (await dynamicImport("langsmith/sandbox"));
34
- };
35
- let langSmithSandboxClientLoader = defaultLangSmithSandboxClientLoader;
36
- const defaultLangSmithSandboxBackendLoader = async () => {
37
- const { LangSmithSandbox } = await import("deepagents");
38
- return LangSmithSandbox;
39
- };
40
- let langSmithSandboxBackendLoader = defaultLangSmithSandboxBackendLoader;
41
58
  /**
42
- * Resolve (and cache) the scoped LangSmith sandbox backend for this run,
43
- * provisioning it with `setup.sh` the first time it is created.
59
+ * Resolve (and cache) the per-thread LangSmith sandbox backend for this run.
60
+ * When deploy baked a recipe, new sandboxes clone it; otherwise Host supplies
61
+ * its default image.
44
62
  *
45
63
  * Connectors that implement {@link Connector.sandbox} run on create, when a
46
64
  * new thread starts against a reused sandbox (mode `"reuse"`), and on later
47
65
  * messages in an already-synced thread (mode `"credentials"`).
48
66
  */
49
- export function resolveManagedSandbox(sandbox, setupScript, config, options) {
50
- const key = sandboxScopeKey(sandbox, config);
67
+ export function resolveManagedSandbox(sandbox, config, options) {
68
+ const key = sandboxScopeKey(config);
51
69
  const hasSandbox = hasSandboxConnectors(options?.connectors);
52
- const threadKey = threadSyncKey(sandbox, config);
53
70
  let entry = managedSandboxes.get(key);
54
71
  if (!entry) {
55
72
  const created = {
@@ -57,7 +74,7 @@ export function resolveManagedSandbox(sandbox, setupScript, config, options) {
57
74
  syncChain: Promise.resolve(),
58
75
  freshlyCreated: true,
59
76
  ready: Promise.resolve().then(async () => {
60
- const { backend, hostName } = await createLangSmithSandbox(sandbox, setupScript, config, options, "create", key);
77
+ const { backend, hostName } = await createLangSmithSandbox(sandbox, config, options, "create", key);
61
78
  created.hostName = hostName;
62
79
  const id = backend.id;
63
80
  created.backendId =
@@ -65,7 +82,7 @@ export function resolveManagedSandbox(sandbox, setupScript, config, options) {
65
82
  if (hostName) {
66
83
  backendHostNames.set(backend, hostName);
67
84
  }
68
- created.syncedThreads.add(threadKey);
85
+ created.syncedThreads.add(key);
69
86
  return backend;
70
87
  }),
71
88
  };
@@ -89,7 +106,7 @@ export function resolveManagedSandbox(sandbox, setupScript, config, options) {
89
106
  cached.freshlyCreated = false;
90
107
  return;
91
108
  }
92
- if (cached.syncedThreads.has(threadKey)) {
109
+ if (cached.syncedThreads.has(key)) {
93
110
  // Same thread: refresh credentials / CLI wiring without re-cloning.
94
111
  // Otherwise redeploys that fix auth (e.g. gh wrapper) never apply mid-thread.
95
112
  await runConnectorSandboxHooks(options?.connectors, {
@@ -107,18 +124,14 @@ export function resolveManagedSandbox(sandbox, setupScript, config, options) {
107
124
  config,
108
125
  identity: options?.identity,
109
126
  });
110
- cached.syncedThreads.add(threadKey);
127
+ cached.syncedThreads.add(key);
111
128
  });
112
129
  await cached.syncChain;
113
130
  return backend;
114
131
  });
115
132
  }
116
- /** Derive the process-level reuse key from the configured sandbox scope. */
117
- export function sandboxScopeKey(sandbox, config) {
118
- const scope = sandbox.options?.scope ?? "thread";
119
- if (scope === "agent") {
120
- return `agent:${assistantIdFromConfig(config)}`;
121
- }
133
+ /** Derive the process-level reuse key (always one sandbox per thread). */
134
+ export function sandboxScopeKey(config) {
122
135
  return `thread:${threadIdFromConfig(config)}`;
123
136
  }
124
137
  /** Clear the process-level sandbox cache. Test-only. */
@@ -130,7 +143,7 @@ export function clearManagedSandboxCacheForTests() {
130
143
  * Drop a cached sandbox and delete its Host box so recreate cannot adopt it.
131
144
  *
132
145
  * Process-cache clear alone is not enough under deploy: names are deterministic
133
- * per scope, so the next resolve would re-adopt the same broken box. Mark the
146
+ * per thread, so the next resolve would re-adopt the same broken box. Mark the
134
147
  * name blocked (delete can lag) and best-effort `deleteSandbox`.
135
148
  *
136
149
  * When `expectedBackendId` / `expectedHostName` are set, only pop the cache
@@ -138,13 +151,9 @@ export function clearManagedSandboxCacheForTests() {
138
151
  * already have replaced it — deleting the replacement would strand the healthy
139
152
  * recreate.
140
153
  */
141
- export async function invalidateManagedSandbox(sandbox, config, setupScriptOrOptions) {
142
- const options = typeof setupScriptOrOptions === "string" ||
143
- setupScriptOrOptions === undefined
144
- ? { setupScript: setupScriptOrOptions }
145
- : setupScriptOrOptions;
146
- const { setupScript, expectedBackendId, expectedHostName } = options;
147
- const key = sandboxScopeKey(sandbox, config);
154
+ export async function invalidateManagedSandbox(sandbox, config, options = {}) {
155
+ const { expectedBackendId, expectedHostName } = options;
156
+ const key = sandboxScopeKey(config);
148
157
  const names = new Set();
149
158
  let popCache = true;
150
159
  let entry = managedSandboxes.get(key);
@@ -180,7 +189,7 @@ export async function invalidateManagedSandbox(sandbox, config, setupScriptOrOpt
180
189
  expectedBackendId === undefined &&
181
190
  expectedHostName === undefined) {
182
191
  try {
183
- const computed = hostSandboxNameFor(sandbox, config, setupScript);
192
+ const computed = hostSandboxNameFor(config);
184
193
  if (computed) {
185
194
  names.add(computed);
186
195
  }
@@ -201,11 +210,33 @@ export async function invalidateManagedSandbox(sandbox, config, setupScriptOrOpt
201
210
  export function managedSandboxHostName(backend) {
202
211
  return backendHostNames.get(backend);
203
212
  }
213
+ /**
214
+ * True when execute failed before the sandbox accepted the command.
215
+ *
216
+ * Matches only the cold-box readiness race (named error or message). Ambiguous
217
+ * stream/transport errors may have already started a command — those belong on
218
+ * other recreate matchers, not this classifier.
219
+ */
220
+ function isSandboxStreamError(error) {
221
+ if (error instanceof Error && STREAM_NEVER_STARTED_NAMES.has(error.name)) {
222
+ return true;
223
+ }
224
+ if (error !== null &&
225
+ typeof error === "object" &&
226
+ STREAM_NEVER_STARTED_NAMES.has(error.constructor?.name ?? "")) {
227
+ return true;
228
+ }
229
+ const message = error instanceof Error
230
+ ? `${error.name}: ${error.message}`
231
+ : typeof error === "string"
232
+ ? error
233
+ : String(error);
234
+ return STREAM_NEVER_STARTED_RE.test(message);
235
+ }
204
236
  /** True when a sandbox API error is worth invalidating + recreating once. */
205
237
  export function isTransientSandboxError(error) {
206
- // Never-started stream race is also recreate-safe (and retried in place first
207
- // by executeWithStreamRetry during provision). Truncated HTTP bodies and
208
- // peer-closed errors are recreate-only — do not replay in place.
238
+ // Never-started stream race is recreate-safe. Truncated HTTP bodies and
239
+ // peer-closed errors are recreate-only as well.
209
240
  if (isSandboxStreamError(error)) {
210
241
  return true;
211
242
  }
@@ -216,16 +247,6 @@ export function isTransientSandboxError(error) {
216
247
  : String(error);
217
248
  return /LangSmithSandboxError|HTTP 502|Bad Gateway|HTTP 503|HTTP 504|ECONNRESET|ETIMEDOUT|peer closed connection without sending complete message body|incomplete chunked read|sandbox.*(not found|gone|unavailable|terminated)/i.test(message);
218
249
  }
219
- /** Override the LangSmith SDK loader. Test-only. */
220
- export function setLangSmithSandboxClientLoaderForTests(loader) {
221
- langSmithSandboxClientLoader = loader ?? defaultLangSmithSandboxClientLoader;
222
- }
223
- /** Override the DeepAgents LangSmith backend wrapper. Test-only. */
224
- export function setLangSmithSandboxBackendForTests(backend) {
225
- langSmithSandboxBackendLoader = backend
226
- ? async () => backend
227
- : defaultLangSmithSandboxBackendLoader;
228
- }
229
250
  /**
230
251
  * Deployment this runtime belongs to, used to name the sandboxes it creates so
231
252
  * `mda delete` can find them again.
@@ -239,35 +260,36 @@ export function managedDeploymentName() {
239
260
  stringOption(process.env.MDA_DEPLOYMENT_NAME));
240
261
  }
241
262
  /**
242
- * Deterministic sandbox name for a deployment, sandbox scope, and provisioning
243
- * recipe.
244
- *
245
- * The inputs are digested rather than embedded because the scope key carries
246
- * thread and assistant UUIDs; a short digest keeps the name clear of any length
247
- * limit while staying stable across container restarts, which is what lets a
248
- * restarted deployment re-adopt its sandbox instead of leaking it.
263
+ * Deterministic sandbox name for a deployment and thread.
249
264
  *
250
- * Provisioning is part of the identity so that editing `setup.sh` or switching
251
- * snapshots produces a different name. An adopted sandbox skips provisioning, so
252
- * without this a redeploy would silently leave existing threads on the old
253
- * environment.
265
+ * The thread key is digested rather than embedded so names stay short and
266
+ * stable across container restarts. Recipe (`setup.sh` / bake base) changes do
267
+ * **not** rename live boxes new threads clone the new recipe; live threads
268
+ * keep `/workspace` until idle reclaim.
254
269
  */
255
- export function managedSandboxName(deployment, scopeKey, provisioning = {}) {
270
+ export function managedSandboxName(deployment, scopeKey) {
256
271
  const digest = createHash("sha256")
257
272
  .update(scopeKey)
258
- .update("\0")
259
- .update(provisioningFingerprint(provisioning))
260
273
  .digest("hex")
261
274
  .slice(0, SANDBOX_DIGEST_LENGTH);
262
- return `${deployment}${SANDBOX_NAME_SEPARATOR}${digest}`;
275
+ return `${sandboxDeploymentComponent(deployment)}${SANDBOX_NAME_SEPARATOR}${digest}`;
263
276
  }
264
- /** Stable string for a provisioning recipe, insensitive to option ordering. */
265
- function provisioningFingerprint(provisioning) {
266
- const createOptions = Object.entries(provisioning.createOptions ?? {}).sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0));
267
- return JSON.stringify([createOptions, provisioning.setupScript ?? ""]);
277
+ function sandboxDeploymentComponent(deployment) {
278
+ const characters = Array.from(deployment);
279
+ if (characters.length <= MAX_SANDBOX_DEPLOYMENT_COMPONENT_LENGTH) {
280
+ return deployment;
281
+ }
282
+ const digest = createHash("sha256")
283
+ .update(deployment)
284
+ .digest("hex")
285
+ .slice(0, SANDBOX_DEPLOYMENT_DIGEST_LENGTH);
286
+ const prefixLength = MAX_SANDBOX_DEPLOYMENT_COMPONENT_LENGTH -
287
+ SANDBOX_DEPLOYMENT_DIGEST_LENGTH -
288
+ 1;
289
+ return `${characters.slice(0, prefixLength).join("")}-${digest}`;
268
290
  }
269
- async function createLangSmithSandbox(sandbox, setupScript, config, options, mode, scopeKey) {
270
- const { backend, adopted, hostName } = await createLangSmithSandboxBackend(sandbox, scopeKey, setupScript);
291
+ async function createLangSmithSandbox(sandbox, config, options, mode, scopeKey) {
292
+ const { backend, adopted, hostName } = await createLangSmithSandboxBackend(sandbox, scopeKey);
271
293
  await runConnectorSandboxHooks(options?.connectors, {
272
294
  backend,
273
295
  // An adopted sandbox already ran create-time provisioning in an earlier
@@ -276,46 +298,52 @@ async function createLangSmithSandbox(sandbox, setupScript, config, options, mod
276
298
  config,
277
299
  identity: options?.identity,
278
300
  });
279
- // Only a new sandbox needs `setup.sh`: an adopted one ran this exact script
280
- // already, since a changed script yields a different sandbox name.
281
- if (!adopted && setupScript && setupScript.trim().length > 0) {
282
- await runSetupScript(backend, setupScript);
283
- }
284
301
  return { backend, hostName };
285
302
  }
286
- function sandboxCreateOptions(sandbox) {
287
- const { scope: _scope, apiKey: _apiKey, defaultTimeout: _defaultTimeout, templateName, snapshotId, ...resolvedCreateOptions } = sandbox.options ?? {};
288
- const createSandboxOptions = resolvedCreateOptions;
289
- if (snapshotId && templateName) {
290
- throw new Error("snapshotId and templateName are mutually exclusive. Pass only one creation source.");
291
- }
292
- if (templateName) {
293
- createSandboxOptions.snapshotName = templateName;
294
- }
295
- if (snapshotId) {
296
- createSandboxOptions.snapshotId = snapshotId;
303
+ /**
304
+ * Options for `createSandbox`. Thread boxes clone the deploy-baked recipe when
305
+ * present; author `snapshotName` / `snapshotId` / `dockerImage` are bake bases
306
+ * only and are not passed here.
307
+ */
308
+ export function sandboxCreateOptions(sandbox) {
309
+ const { apiKey: _apiKey, defaultTimeout: _defaultTimeout, snapshotName: _snapshotName, snapshotId: _snapshotId, dockerImage: _dockerImage, registry: _registry, ...resolvedCreateOptions } = sandbox.options ?? {};
310
+ const createSandboxOptions = {
311
+ ...resolvedCreateOptions,
312
+ };
313
+ const recipe = stringOption(process.env[RECIPE_SNAPSHOT_ENV]);
314
+ if (recipe) {
315
+ createSandboxOptions.snapshotName = recipe;
297
316
  }
298
317
  return createSandboxOptions;
299
318
  }
300
- function hostSandboxNameFor(sandbox, config, setupScript) {
319
+ function hostSandboxNameFor(config) {
301
320
  const deployment = managedDeploymentName();
302
321
  if (!deployment) {
303
322
  return undefined;
304
323
  }
305
- return managedSandboxName(deployment, sandboxScopeKey(sandbox, config), {
306
- createOptions: sandboxCreateOptions(sandbox),
307
- setupScript,
308
- });
324
+ return managedSandboxName(deployment, sandboxScopeKey(config));
309
325
  }
310
- async function sandboxClientFor(sandbox) {
311
- const { SandboxClient } = await langSmithSandboxClientLoader();
326
+ /**
327
+ * Constructor options for the LangSmith sandbox client.
328
+ *
329
+ * Both the API key and the workspace scope come from the environment `mda`
330
+ * wrote, so every sandbox call lands in the workspace holding the baked recipe.
331
+ */
332
+ export function sandboxClientOptions(sandbox) {
312
333
  const apiKey = stringOption(sandbox.options?.apiKey) ??
313
334
  stringOption(process.env.LANGSMITH_API_KEY);
314
- return new SandboxClient(apiKey ? { apiKey } : undefined);
335
+ const workspaceId = stringOption(process.env[WORKSPACE_ID_ENV]);
336
+ if (!apiKey && !workspaceId) {
337
+ return undefined;
338
+ }
339
+ return {
340
+ ...(apiKey ? { apiKey } : {}),
341
+ ...(workspaceId ? { headers: { [TENANT_HEADER]: workspaceId } } : {}),
342
+ };
315
343
  }
316
344
  async function deleteHostSandbox(sandbox, name) {
317
345
  try {
318
- const client = await sandboxClientFor(sandbox);
346
+ const client = new SandboxClient(sandboxClientOptions(sandbox));
319
347
  if (typeof client.deleteSandbox !== "function") {
320
348
  return;
321
349
  }
@@ -329,29 +357,22 @@ async function deleteHostSandbox(sandbox, name) {
329
357
  console.warn(`[mda] sandbox invalidate: delete failed name=${JSON.stringify(name)} err=${label}`);
330
358
  }
331
359
  }
332
- async function createLangSmithSandboxBackend(sandbox, scopeKey, setupScript) {
333
- const { apiKey = process.env.LANGSMITH_API_KEY, defaultTimeout } = sandbox.options ?? {};
360
+ async function createLangSmithSandboxBackend(sandbox, scopeKey) {
361
+ const { defaultTimeout } = sandbox.options ?? {};
334
362
  const createSandboxOptions = sandboxCreateOptions(sandbox);
335
- const { SandboxClient } = await langSmithSandboxClientLoader();
336
- const sdkOptions = stringOption(apiKey);
337
- const client = new SandboxClient(sdkOptions ? { apiKey: sdkOptions } : undefined);
363
+ const client = new SandboxClient(sandboxClientOptions(sandbox));
338
364
  const deployment = managedDeploymentName();
339
365
  const sandboxName = deployment
340
- ? managedSandboxName(deployment, scopeKey, {
341
- createOptions: createSandboxOptions,
342
- setupScript,
343
- })
366
+ ? managedSandboxName(deployment, scopeKey)
344
367
  : undefined;
345
368
  const { sandbox: langSmithSandbox, adopted } = await resolveSandboxInstance(client, createSandboxOptions, sandboxName);
346
- const resolved = langSmithSandbox;
347
- const hostName = stringOption(resolved.name) ?? sandboxName;
369
+ const hostName = stringOption(langSmithSandbox.name) ?? sandboxName;
348
370
  console.info(`[mda] sandbox resolve: ${adopted ? "adopted" : "created"} ` +
349
371
  `name=${JSON.stringify(hostName ?? null)} ` +
350
- `id=${JSON.stringify(resolved.id ?? null)} ` +
372
+ `id=${JSON.stringify(langSmithSandbox.id ?? null)} ` +
351
373
  `scope=${JSON.stringify(scopeKey)}`);
352
- const Backend = await langSmithSandboxBackendLoader();
353
374
  return {
354
- backend: new Backend({
375
+ backend: new LangSmithSandbox({
355
376
  sandbox: langSmithSandbox,
356
377
  defaultTimeout,
357
378
  }),
@@ -426,9 +447,6 @@ async function adoptSandbox(client, name) {
426
447
  catch {
427
448
  return undefined;
428
449
  }
429
- if (existing === undefined || existing === null) {
430
- return undefined;
431
- }
432
450
  const status = stringOption(existing.status)?.toLowerCase();
433
451
  // No status reported: assume the SDK handed back a usable sandbox.
434
452
  if (status === undefined || ADOPTABLE_STATUS.has(status)) {
@@ -452,29 +470,13 @@ function isSandboxNameConflict(error) {
452
470
  function sandboxNameSuffix() {
453
471
  return randomBytes(4).toString("hex");
454
472
  }
455
- function threadSyncKey(sandbox, config) {
456
- const scope = sandbox.options?.scope ?? "thread";
457
- if (scope === "agent") {
458
- // Agent-scoped sandboxes are shared; sync once per thread that uses them.
459
- try {
460
- return `thread:${threadIdFromConfig(config)}`;
461
- }
462
- catch {
463
- return "thread:__missing__";
464
- }
465
- }
466
- return sandboxScopeKey(sandbox, config);
467
- }
468
473
  function threadIdFromConfig(config) {
469
474
  const threadId = configValue(config, "thread_id");
470
475
  if (threadId === undefined) {
471
- throw new Error('sandbox scope "thread" requires configurable.thread_id');
476
+ throw new Error("managed sandboxes require configurable.thread_id (one sandbox per thread)");
472
477
  }
473
478
  return threadId;
474
479
  }
475
- function assistantIdFromConfig(config) {
476
- return configValue(config, "assistant_id") ?? "agent";
477
- }
478
480
  function stringOption(value) {
479
481
  if (typeof value !== "string")
480
482
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox-manager.js","sourceRoot":"","sources":["../../src/runtime/sandbox-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAMtD,OAAO,EACL,oBAAoB,EACpB,wBAAwB,GAEzB,MAAM,gBAAgB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,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;QACrC,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC,CAC1C,CAAC;AACJ,CAAC"}
@@ -45,11 +45,6 @@ export interface ManagedAgentOptions {
45
45
  hasSkills?: boolean;
46
46
  /** The `sandbox/index.ts` declaration, if the project configures a sandbox. */
47
47
  sandbox?: SandboxDefinition;
48
- /**
49
- * Contents of `sandbox/setup.sh`, embedded by the CLI. It runs exactly once,
50
- * the first time a sandbox is provisioned for a given scope.
51
- */
52
- setupScript?: string;
53
48
  /**
54
49
  * The connectors discovered under `connectors/`, already validated by
55
50
  * `collectConnectors`. Each connector's `tools` hook (if any) contributes
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/runtime/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAG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;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
package/dist/sandbox.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * A Managed Deep Agent declares its execution environment in `sandbox/index.ts`
5
5
  * with `defineSandbox`. MDA owns how the sandbox is *resolved*: construction,
6
- * scoped reuse across turns, the provisioning `setup.sh`, and lifecycle/TTL.
6
+ * per-thread reuse, deploy-time snapshot bake from `setup.sh`, and lifecycle/TTL.
7
7
  *
8
8
  * @example
9
9
  * ```ts
@@ -14,15 +14,14 @@
14
14
  * ```
15
15
  */
16
16
  import type { LangSmithSandbox } from "deepagents";
17
- /** Reuse boundary for a managed sandbox. Defaults to `"thread"`. */
18
- export type SandboxScope = "thread" | "agent";
19
17
  /**
20
18
  * Provider options MDA owns and developers must not set directly.
21
19
  *
22
20
  * MDA owns sandbox identity and managed runtime safety knobs. Use
23
- * `templateName` or `snapshotId` when an explicit LangSmith source is needed.
21
+ * `snapshotName`, `snapshotId`, or `dockerImage` when an explicit LangSmith
22
+ * bake base is needed.
24
23
  */
25
- type ManagedSandboxOptionKey = "name" | "image" | "snapshot" | "imageName";
24
+ type ManagedSandboxOptionKey = "name" | "image" | "snapshot" | "imageName" | "templateName" | "scope";
26
25
  type LangSmithCreateOptions = typeof LangSmithSandbox extends {
27
26
  create(options: infer TOptions): Promise<unknown>;
28
27
  } ? TOptions extends object ? TOptions : never : never;
@@ -30,29 +29,76 @@ type LangSmithCreateOptions = typeof LangSmithSandbox extends {
30
29
  * Developer-provided options for the managed sandbox.
31
30
  *
32
31
  * Mirrors the supported LangSmith creation options, minus the fields MDA owns,
33
- * plus the managed reuse/lifecycle knobs.
32
+ * plus bake-base and lifecycle knobs. Reuse is always one sandbox per thread.
34
33
  */
35
- export type SandboxOptions = Omit<LangSmithCreateOptions, ManagedSandboxOptionKey> & {
36
- /**
37
- * Sandbox reuse scope. Defaults to `"thread"`.
38
- *
39
- * - `"thread"`: one sandbox per durable thread/conversation.
40
- * - `"agent"`: one sandbox shared by all threads handled by this agent process.
41
- */
42
- scope?: SandboxScope;
34
+ export type SandboxOptions = SandboxSharedOptions & SandboxBakeBase;
35
+ /**
36
+ * Lifecycle and LangSmith create knobs that are always allowed, regardless of
37
+ * which bake base (if any) the author picks.
38
+ */
39
+ type SandboxSharedOptions = Omit<LangSmithCreateOptions, ManagedSandboxOptionKey> & {
43
40
  /**
44
41
  * Idle TTL in seconds. MDA may reclaim the sandbox after this period of
45
42
  * inactivity.
46
43
  */
47
44
  idleTtlSeconds?: number;
48
45
  };
46
+ /** Credentials for a private Docker registry, reconciled by MDA at bake time. */
47
+ export interface SandboxRegistry {
48
+ /** Registry host, for example `ghcr.io`. */
49
+ url: string;
50
+ /** Registry username (for GHCR, the GitHub account or organization user). */
51
+ username: string;
52
+ /**
53
+ * Name of an environment variable containing the registry password/token.
54
+ *
55
+ * MDA reads the value from the project `.env` or process environment. Only
56
+ * this variable name is compiled; the credential value never enters the
57
+ * build or recipe snapshot.
58
+ */
59
+ passwordEnv: string;
60
+ }
61
+ /**
62
+ * Deploy-time bake base. At most one of `snapshotName`, `snapshotId`, or
63
+ * `dockerImage` may be set — combining them is a type error.
64
+ *
65
+ * `registry` is only valid with `dockerImage`. MDA creates or updates a
66
+ * deployment-owned Host registry before pulling the private image.
67
+ */
68
+ export type SandboxBakeBase = {
69
+ snapshotName?: undefined;
70
+ snapshotId?: undefined;
71
+ dockerImage?: undefined;
72
+ registry?: undefined;
73
+ } | {
74
+ /** LangSmith snapshot name used as the bake base (supports tags). */
75
+ snapshotName: string;
76
+ snapshotId?: never;
77
+ dockerImage?: never;
78
+ registry?: never;
79
+ } | {
80
+ /** LangSmith snapshot id used as the bake base. */
81
+ snapshotId: string;
82
+ snapshotName?: never;
83
+ dockerImage?: never;
84
+ registry?: never;
85
+ } | {
86
+ /** Docker image used as the bake base. */
87
+ dockerImage: string;
88
+ snapshotName?: never;
89
+ snapshotId?: never;
90
+ /**
91
+ * Private registry credentials resolved and reconciled by MDA at bake.
92
+ */
93
+ registry?: SandboxRegistry;
94
+ };
49
95
  /** The object exported from `sandbox/index.ts`. */
50
96
  export interface SandboxDefinition {
51
97
  readonly kind: "sandbox";
52
98
  readonly options: SandboxOptions;
53
99
  }
54
100
  /**
55
- * Apply the default scope and reject the provider options MDA owns.
101
+ * Reject provider options MDA owns and enforce bake-base mutual exclusion.
56
102
  *
57
103
  * Used by `defineSandbox`, so runtime-owned keys never enter a definition.
58
104
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,oEAAoE;AACpE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9C;;;;;GAKG;AACH,KAAK,uBAAuB,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CAAC;AAE3E,KAAK,sBAAsB,GAAG,OAAO,gBAAgB,SAAS;IAC5D,MAAM,CAAC,OAAO,EAAE,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC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