@tangle-network/sandbox 0.57.0 → 0.58.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +3 -2
  2. package/dist/agent/index.d.ts +4 -4
  3. package/dist/agent/index.js +36 -74
  4. package/dist/agent/preview.d.ts +1 -1
  5. package/dist/agent/preview.js +2 -2
  6. package/dist/{agent-run-outcome-B8PjRMLE.d.ts → agent-run-outcome-CJP18Ip8.d.ts} +1 -1
  7. package/dist/auth/index.d.ts +1 -1
  8. package/dist/auth/index.js +1 -1
  9. package/dist/{browser-interactive-control-controller-knjCl8Zp.d.ts → browser-interactive-control-controller-1m7jgLeg.d.ts} +1 -1
  10. package/dist/{client-CdbHGWiu.js → client-BHItHEg0.js} +19 -5
  11. package/dist/{client-BHGieo06.d.ts → client-BI0_ZUUS.d.ts} +6 -4
  12. package/dist/collaboration/index.d.ts +1 -1
  13. package/dist/core.d.ts +6 -5
  14. package/dist/core.js +5 -3
  15. package/dist/{index-C1sVorE5.d.ts → index-BitiSmBp.d.ts} +2 -2
  16. package/dist/index.d.ts +12 -11
  17. package/dist/index.js +6 -4
  18. package/dist/interactive-control.d.ts +1 -1
  19. package/dist/line-application-DOg7jrnA.js +100 -0
  20. package/dist/lines-DLIo-NTB.d.ts +556 -0
  21. package/dist/lines.d.ts +2 -0
  22. package/dist/lines.js +273 -0
  23. package/dist/{local-cli-auth-DfuFJCcs.js → local-cli-auth-N1IYywxf.js} +1 -1
  24. package/dist/{mcp-local-DUT2U_y8.js → mcp-local-BWsftreI.js} +27 -16
  25. package/dist/{preview-wJJxG42-.d.ts → preview-CVrjEPgk.d.ts} +3 -3
  26. package/dist/runtime.d.ts +3 -3
  27. package/dist/{sandbox-C9VLoJAb.js → sandbox-B2kuUBn6.js} +84 -228
  28. package/dist/{sandbox-DWDqWnsJ.d.ts → sandbox-DyPRgt1M.d.ts} +10 -411
  29. package/dist/tangle/index.d.ts +1 -1
  30. package/dist/tangle/index.js +1 -1
  31. package/dist/{tangle-Bm6H-xIM.js → tangle-DCjIsZI0.js} +1 -1
  32. package/dist/{types-CFmeauzy.d.ts → types-_Gn4d93t.d.ts} +72 -2
  33. package/package.json +9 -4
  34. /package/dist/{cli-auth-bundle-bRJOyaJO.js → cli-auth-bundle-0VjPAtKt.js} +0 -0
  35. /package/dist/{errors-CNsmhCen.d.ts → errors-AVpynVrG.d.ts} +0 -0
  36. /package/dist/{index-BN7zNEUB.d.ts → index-C48z7K4r.d.ts} +0 -0
  37. /package/dist/{index-X4EEZlMi.d.ts → index-D4u-vv87.d.ts} +0 -0
  38. /package/dist/{preview-operations-Dgbi46FH.js → preview-operations-BhQ4_CF7.js} +0 -0
  39. /package/dist/{terminal-stream-BW4veIsI.d.ts → terminal-stream-Bf2stNDX.d.ts} +0 -0
package/dist/lines.js ADDED
@@ -0,0 +1,273 @@
1
+ import { _ as parseErrorResponse, g as ValidationError } from "./errors-BkhlSDW-.js";
2
+ //#region src/lines.ts
3
+ /**
4
+ * Lines: give a sandbox a phone number or messaging address.
5
+ *
6
+ * A line is an address that Tangle Hub receives on, such as an Inkbox
7
+ * iMessage identity or Linq WhatsApp number. Attaching it to a sandbox makes
8
+ * Hub route each inbound message to that sandbox. Each member gets a separate
9
+ * thread in its own agent session. Hub sends the agent's answer on the same
10
+ * line. Hub owns routing, consent (STOP/START), unknown senders and
11
+ * metering, so an app only chooses who may text and in which mode.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const line = await client.lines.fromConnection({ connectionId, transport: "imessage" });
16
+ * await box.lines.attach({
17
+ * number: line.id,
18
+ * mode: "personal",
19
+ * members: [{ address: "+15550100001", role: "owner" }],
20
+ * });
21
+ * // Text `line.connect` to `line.routerAddress`, then write to the agent.
22
+ * ```
23
+ *
24
+ * A line can also give every member their own sandbox, so a public line
25
+ * serves each person from an isolated box with its own files:
26
+ *
27
+ * ```ts
28
+ * await client.lines.attach({
29
+ * number: line.id,
30
+ * mode: "shared",
31
+ * members: [{ address: "+15550100001", role: "owner" }],
32
+ * unknownSenders: "guest",
33
+ * roles: { owner: { context: "own", tools: "act" }, guest: { context: "own", tools: "act" } },
34
+ * instance: { keyPrefix: "person:", create: { idleTimeoutSeconds: 600 } },
35
+ * });
36
+ * ```
37
+ */
38
+ /**
39
+ * The instance key that serves one member: `keyPrefix` plus the first 32 hex
40
+ * characters of the SHA-256 of the member's address as Hub stores it (E.164,
41
+ * or a lowercased email). It depends only on the prefix and the address, so a
42
+ * person keeps their box across re-attaches, and your own code can reach it
43
+ * with `client.instances.ensure({ key })`. This helper applies only to
44
+ * address-bound members. Hub derives a different key for `subjectId` members.
45
+ */
46
+ async function lineInstanceKey(keyPrefix, address) {
47
+ const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(address));
48
+ return `${keyPrefix}${Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("").slice(0, 32)}`;
49
+ }
50
+ /** Stable setup retry identity. This label never grants profile or line access. */
51
+ async function profileChannelReference(profileId, input) {
52
+ if (!/^ap_[A-Za-z0-9_-]{1,61}$/.test(profileId)) throw new ValidationError("Use a stored Platform profile ID");
53
+ const identity = JSON.stringify([
54
+ input.connectionId,
55
+ input.transport,
56
+ input.phoneNumberId ?? null,
57
+ input.address?.trim().toLowerCase() ?? null
58
+ ]);
59
+ const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(identity));
60
+ return `profile:${profileId}:${Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("").slice(0, 32)}`;
61
+ }
62
+ const LINE_ID = /^ln_[A-Za-z0-9_-]+$/;
63
+ async function hubData(response) {
64
+ const body = await response.text();
65
+ if (!response.ok) throw parseErrorResponse(response.status, body, void 0, response.headers);
66
+ const parsed = JSON.parse(body);
67
+ if (parsed.success !== true || parsed.data === void 0) throw parseErrorResponse(502, body, void 0, response.headers);
68
+ return parsed.data;
69
+ }
70
+ function json(method, body) {
71
+ return {
72
+ method,
73
+ headers: { "Content-Type": "application/json" },
74
+ body: JSON.stringify(body)
75
+ };
76
+ }
77
+ /** `client.lines`: your lines, their members and their threads. */
78
+ var LinesClient = class {
79
+ constructor(http) {
80
+ this.http = http;
81
+ }
82
+ /**
83
+ * Create a line from an owned Inkbox or Linq connection, or return the line
84
+ * already pinned to that provider identity. Hub owns inbound routing and
85
+ * never re-keys the connection.
86
+ */
87
+ async fromConnection(input) {
88
+ return (await hubData(await this.http.fetch("/v1/lines", json("POST", input)))).line;
89
+ }
90
+ /** Your lines. `sandboxId` narrows to lines attached to that sandbox. */
91
+ async list(options = {}) {
92
+ const params = new URLSearchParams();
93
+ if (options.sandboxId) params.set("sandboxId", options.sandboxId);
94
+ if (options.profileId) params.set("profileId", options.profileId);
95
+ const query = params.size ? `?${params}` : "";
96
+ return (await hubData(await this.http.fetch(`/v1/lines${query}`))).lines;
97
+ }
98
+ /** Supported combinations from the maintained host channel catalog. */
99
+ async providers() {
100
+ return (await hubData(await this.http.fetch("/v1/lines/providers"))).providers;
101
+ }
102
+ /** Metadata only; no reservation and no provider credentials are returned. */
103
+ async numbers(connectionId, transport) {
104
+ const params = new URLSearchParams({
105
+ connectionId,
106
+ transport
107
+ });
108
+ return hubData(await this.http.fetch(`/v1/lines/numbers?${params}`));
109
+ }
110
+ /** Choose the payer/execution authority for a cookie-authenticated attachment. */
111
+ async executionKeys() {
112
+ return (await hubData(await this.http.fetch("/v1/lines/execution-keys"))).keys;
113
+ }
114
+ async get(lineId) {
115
+ return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}`))).line;
116
+ }
117
+ /** A line id for a line id or one of your lines' addresses. */
118
+ async resolve(number) {
119
+ if (LINE_ID.test(number)) return number;
120
+ const line = (await this.list()).find((l) => l.address === number);
121
+ if (!line) throw new ValidationError(`No line with address ${number}`);
122
+ return line.id;
123
+ }
124
+ /**
125
+ * Attach a line so each member runs in their own sandbox. Hub checks that
126
+ * your API key can run sandboxes, and each turn runs as a short-lived child
127
+ * of that key. Attaching again with the same options returns the same
128
+ * attachment. To attach a line to one sandbox, use `box.lines.attach()`.
129
+ */
130
+ async attach(options) {
131
+ const lineId = await this.resolve(options.number);
132
+ const { number: _number, ...rest } = options;
133
+ return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/attachment`, json("PUT", rest)))).attachment;
134
+ }
135
+ /**
136
+ * Detach a line (by id or address), whatever it is attached to. This is
137
+ * the way to detach a line attached with `instance`, which names no
138
+ * sandbox. Each member's own sandbox stays under its instance key. Returns
139
+ * false when the line was not attached.
140
+ */
141
+ async detach(number, options = {}) {
142
+ if (options.expectedAttachmentId !== void 0 && !/^lat_[A-Za-z0-9_-]+$/.test(options.expectedAttachmentId)) throw new ValidationError("Invalid expected attachment identity");
143
+ const lineId = await this.resolve(number);
144
+ return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/attachment`, {
145
+ method: "DELETE",
146
+ ...options.expectedAttachmentId ? { headers: { "if-match": `"${options.expectedAttachmentId}"` } } : {}
147
+ }))).detached;
148
+ }
149
+ /** Detach only this observed attachment. A replacement is left untouched.
150
+ * The distinct native route makes older hosts refuse rather than ignore
151
+ * the condition. This never falls back to unconditional line detachment.
152
+ */
153
+ async detachAttachment(number, attachmentId) {
154
+ if (!/^[A-Za-z0-9_-]{1,256}$/.test(attachmentId)) throw new ValidationError("A valid expected attachment id is required");
155
+ const lineId = await this.resolve(number);
156
+ return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/attachments/${encodeURIComponent(attachmentId)}`, { method: "DELETE" }))).detached;
157
+ }
158
+ /**
159
+ * Retire a detached line's Hub routing and free its workspace transport slot.
160
+ * Hub refuses an attached or voice-enabled line. A retry by line id returns
161
+ * false; the provider connection and message history remain.
162
+ */
163
+ async release(number) {
164
+ const lineId = await this.resolve(number);
165
+ return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}`, { method: "DELETE" }))).released;
166
+ }
167
+ /**
168
+ * Take calls on a line (Inkbox iMessage lines). Hub points the identity's
169
+ * incoming calls at itself, binds the ph0ny agent to the line and adds the
170
+ * agent's `ask_workspace` tool. Enabling again replaces every credential.
171
+ */
172
+ async enableVoice(lineId, options) {
173
+ return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}`, json("PATCH", { voice: {
174
+ enabled: true,
175
+ ph0ny: {
176
+ connectionId: options.ph0nyConnectionId,
177
+ agentId: options.ph0nyAgentId
178
+ }
179
+ } })))).line;
180
+ }
181
+ /** Stop taking calls on a line: Hub refuses them and Inkbox rejects them. */
182
+ async disableVoice(lineId) {
183
+ return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}`, json("PATCH", { voice: { enabled: false } })))).line;
184
+ }
185
+ /**
186
+ * Queue a proactive message to an active, consenting member. Hub reuses the
187
+ * member's authenticated provider conversation, rechecks STOP immediately
188
+ * before delivery, and defers delivery during the recipient's saved quiet hours.
189
+ */
190
+ async send(lineId, input) {
191
+ return hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/send`, json("POST", input)));
192
+ }
193
+ /** Read the native outbox receipt. Queued is not a delivery confirmation. */
194
+ async sentMessage(lineId, messageId) {
195
+ return hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/outbox/${encodeURIComponent(messageId)}`));
196
+ }
197
+ /** Only the recipient's proven message can enable reminders or choose quiet hours. */
198
+ async reminders(lineId, memberId) {
199
+ return hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/members/${encodeURIComponent(memberId)}/reminders`));
200
+ }
201
+ /** Members of the line's active attachment. */
202
+ members(lineId) {
203
+ const base = `/v1/lines/${encodeURIComponent(lineId)}/members`;
204
+ const http = this.http;
205
+ return {
206
+ async list() {
207
+ return (await hubData(await http.fetch(base))).members;
208
+ },
209
+ async add(spec) {
210
+ return (await hubData(await http.fetch(base, json("POST", spec)))).member;
211
+ },
212
+ async update(memberId, patch) {
213
+ return (await hubData(await http.fetch(`${base}/${encodeURIComponent(memberId)}`, json("PATCH", patch)))).member;
214
+ },
215
+ async remove(memberId) {
216
+ await hubData(await http.fetch(`${base}/${encodeURIComponent(memberId)}`, { method: "DELETE" }));
217
+ }
218
+ };
219
+ }
220
+ /** Read one retained message without depending on a recent-message page. */
221
+ async message(lineId, messageId) {
222
+ return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/messages/${encodeURIComponent(messageId)}`))).message;
223
+ }
224
+ /** Threads of a line (one per member) and their messages, newest first. */
225
+ threads(lineId) {
226
+ const base = `/v1/lines/${encodeURIComponent(lineId)}/threads`;
227
+ const http = this.http;
228
+ return {
229
+ async list() {
230
+ return (await hubData(await http.fetch(base))).threads;
231
+ },
232
+ async messages(threadId) {
233
+ return (await hubData(await http.fetch(`${base}/${encodeURIComponent(threadId)}/messages`))).messages;
234
+ }
235
+ };
236
+ }
237
+ };
238
+ /** `sandbox.lines`: attach lines to this sandbox. */
239
+ var SandboxLines = class {
240
+ lines;
241
+ constructor(http, sandboxId) {
242
+ this.http = http;
243
+ this.sandboxId = sandboxId;
244
+ this.lines = new LinesClient(http);
245
+ }
246
+ /**
247
+ * Attach a line to this sandbox. Hub checks that your API key can run this
248
+ * sandbox, and each turn runs as a short-lived child of that key. Attaching
249
+ * again with the same options returns the same attachment.
250
+ */
251
+ async attach(options) {
252
+ const lineId = await this.lines.resolve(options.number);
253
+ const { number: _number, ...rest } = options;
254
+ return (await hubData(await this.http.fetch(`/v1/lines/${encodeURIComponent(lineId)}/attachment`, json("PUT", {
255
+ ...rest,
256
+ sandboxId: this.sandboxId
257
+ })))).attachment;
258
+ }
259
+ /** Lines attached to this sandbox. */
260
+ async list() {
261
+ return this.lines.list({ sandboxId: this.sandboxId });
262
+ }
263
+ /** Detach a line (by id or address) from this sandbox. */
264
+ async detach(number) {
265
+ const lineId = await this.lines.resolve(number);
266
+ const line = await this.lines.get(lineId);
267
+ if (!line.attachment) return;
268
+ if (line.attachment.sandboxId !== this.sandboxId) throw new ValidationError(`Line ${lineId} is attached to another sandbox`);
269
+ await this.lines.detachAttachment(lineId, line.attachment.id);
270
+ }
271
+ };
272
+ //#endregion
273
+ export { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference };
@@ -1,4 +1,4 @@
1
- import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-bRJOyaJO.js";
1
+ import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-0VjPAtKt.js";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import { join } from "node:path";
@@ -1,4 +1,4 @@
1
- import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-Dgbi46FH.js";
1
+ import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-BhQ4_CF7.js";
2
2
  import { createRequire } from "node:module";
3
3
  //#region \0rolldown/runtime.js
4
4
  var __defProp = Object.defineProperty;
@@ -309,6 +309,28 @@ function serializeToolResult(value) {
309
309
  }
310
310
  }
311
311
  //#endregion
312
+ //#region src/agent/tools/_binding.ts
313
+ function bindToolSpecs(box, options) {
314
+ const context = {
315
+ box,
316
+ sessionId: options.sessionId,
317
+ previewAuthorize: options.previewAuthorize,
318
+ signal: options.signal
319
+ };
320
+ const handlers = /* @__PURE__ */ new Map();
321
+ return {
322
+ bindings: selectSpecs(options.allow).map((spec) => {
323
+ const handler = spec.makeHandler(context);
324
+ handlers.set(spec.name, handler);
325
+ return {
326
+ spec,
327
+ handler
328
+ };
329
+ }),
330
+ handlers
331
+ };
332
+ }
333
+ //#endregion
312
334
  //#region src/agent/mcp-local.ts
313
335
  /**
314
336
  * Local MCP (Model Context Protocol) server bridge.
@@ -373,23 +395,12 @@ async function createMcpServer(box, options = {}) {
373
395
  } catch {
374
396
  throw new Error("createMcpServer(): the `@modelcontextprotocol/sdk` package is not installed. Install it via `pnpm add @modelcontextprotocol/sdk`.");
375
397
  }
376
- const specs = selectSpecs(options.allow);
377
- const ctx = {
378
- box,
379
- sessionId: options.sessionId,
380
- previewAuthorize: options.previewAuthorize,
381
- signal: options.signal
382
- };
383
- const handlers = /* @__PURE__ */ new Map();
384
- for (const spec of specs) {
385
- const handler = spec.makeHandler(ctx);
386
- handlers.set(spec.name, async (args) => serializeToolResult(await handler(args)));
387
- }
398
+ const { bindings, handlers } = bindToolSpecs(box, options);
388
399
  const server = new serverModule.Server({
389
400
  name: options.name ?? "tangle-sandbox",
390
401
  version: options.version ?? SDK_VERSION
391
402
  }, { capabilities: { tools: {} } });
392
- server.setRequestHandler(typesModule.ListToolsRequestSchema, async () => ({ tools: specs.map((s) => ({
403
+ server.setRequestHandler(typesModule.ListToolsRequestSchema, async () => ({ tools: bindings.map(({ spec: s }) => ({
393
404
  name: s.name,
394
405
  description: s.description,
395
406
  inputSchema: s.inputSchema
@@ -407,7 +418,7 @@ async function createMcpServer(box, options = {}) {
407
418
  try {
408
419
  return { content: [{
409
420
  type: "text",
410
- text: await handler(r.params.arguments ?? {})
421
+ text: serializeToolResult(await handler(r.params.arguments ?? {}))
411
422
  }] };
412
423
  } catch (err) {
413
424
  return {
@@ -426,4 +437,4 @@ async function createMcpServer(box, options = {}) {
426
437
  };
427
438
  }
428
439
  //#endregion
429
- export { selectSpecs as a, TOOL_SPECS as i, mcp_local_exports as n, serializeToolResult as o, ALL_TOOL_SPECS as r, createMcpServer as t };
440
+ export { TOOL_SPECS as a, ALL_TOOL_SPECS as i, mcp_local_exports as n, serializeToolResult as o, bindToolSpecs as r, createMcpServer as t };
@@ -1,6 +1,6 @@
1
- import { r as SandboxInstance } from "./sandbox-DWDqWnsJ.js";
2
- import { Pn as PreviewLinkInfo, mt as EnsureDevServerOptions } from "./types-CFmeauzy.js";
3
- import { i as Sandbox } from "./client-BHGieo06.js";
1
+ import { r as SandboxInstance } from "./sandbox-DyPRgt1M.js";
2
+ import { Pn as PreviewLinkInfo, mt as EnsureDevServerOptions } from "./types-_Gn4d93t.js";
3
+ import { i as Sandbox } from "./client-BI0_ZUUS.js";
4
4
 
5
5
  //#region src/agent/preview-operations.d.ts
6
6
  type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
package/dist/runtime.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { A as CommitTaskSessionOptions, At as FileUsageResult, Bi as SessionExecutionInfo, Ci as SandboxTerminalManager, Dt as FileTreeOptions, Er as SandboxEvent, Fi as SendSessionMessageOptions, H as CreateTaskSessionOptions, Ii as SendSessionMessageRequest, Ji as SessionMessageAdmission, Li as SentSessionMessage, Ot as FileTreeResult, Si as SandboxTerminalInfo, Sn as ListMessagesOptions, T as ChunkedUploadResult, V as CreateSessionOptions, Vi as SessionExecutionStatus, Wi as SessionInfo, bt as FileReadBatchOptions, fa as TaskSessionInfo, hi as SandboxRuntimeHealth, jt as FileWriteResult, ka as WriteFileOptions, kt as FileUsageOptions, la as TaskSessionChanges, li as SandboxPortBinding, or as RenameOptions, qi as SessionMessage, ua as TaskSessionCommitResult, w as ChunkedUploadOptions, wa as UploadProgress, wi as SandboxTerminalRequestOptions, wt as FileRenameResult, xi as SandboxTerminalCreateOptions, xt as FileReadBatchResult, zi as SessionEventStreamOptions } from "./types-CFmeauzy.js";
2
- import { _ as TimeoutError, a as FileWriteConflictError, c as NotFoundError, f as SandboxError, g as StateError, h as ServerError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, p as SandboxErrorJson, s as NetworkError, t as AuthError, u as QuotaError, v as ValidationError } from "./errors-CNsmhCen.js";
3
- import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-B8PjRMLE.js";
1
+ import { A as CommitTaskSessionOptions, At as FileUsageResult, Bi as SessionExecutionInfo, Ci as SandboxTerminalManager, Dt as FileTreeOptions, Er as SandboxEvent, Fi as SendSessionMessageOptions, H as CreateTaskSessionOptions, Ii as SendSessionMessageRequest, Ji as SessionMessageAdmission, Li as SentSessionMessage, Ot as FileTreeResult, Si as SandboxTerminalInfo, Sn as ListMessagesOptions, T as ChunkedUploadResult, V as CreateSessionOptions, Vi as SessionExecutionStatus, Wi as SessionInfo, bt as FileReadBatchOptions, fa as TaskSessionInfo, hi as SandboxRuntimeHealth, jt as FileWriteResult, ka as WriteFileOptions, kt as FileUsageOptions, la as TaskSessionChanges, li as SandboxPortBinding, or as RenameOptions, qi as SessionMessage, ua as TaskSessionCommitResult, w as ChunkedUploadOptions, wa as UploadProgress, wi as SandboxTerminalRequestOptions, wt as FileRenameResult, xi as SandboxTerminalCreateOptions, xt as FileReadBatchResult, zi as SessionEventStreamOptions } from "./types-_Gn4d93t.js";
2
+ import { _ as TimeoutError, a as FileWriteConflictError, c as NotFoundError, f as SandboxError, g as StateError, h as ServerError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, p as SandboxErrorJson, s as NetworkError, t as AuthError, u as QuotaError, v as ValidationError } from "./errors-AVpynVrG.js";
3
+ import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-CJP18Ip8.js";
4
4
 
5
5
  //#region src/lib/chunked-upload.d.ts
6
6
  /** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}