@tangle-network/sandbox 0.30.1 → 0.30.2-solve.20260820075055.6e03f65

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,5 +1,5 @@
1
1
  import { a as NetworkError, c as QuotaError, f as TimeoutError, l as SandboxError, m as parseErrorResponse, n as CapabilityError, p as ValidationError, u as ServerError } from "./errors-C6kn-3zt.js";
2
- import { AgentExactRunControlRefSchema, agentProfileSchema, harnessTypeSchema } from "@tangle-network/agent-interface";
2
+ import { AgentExactRunControlRefSchema, AgentExecutionOutcomeSchema, DurablePlanSchema, InteractionRequestSchema, agentProfileSchema, harnessTypeSchema } from "@tangle-network/agent-interface";
3
3
  import { z } from "zod";
4
4
  //#region ../../../packages/runtime-contracts/dist/backend-types.js
5
5
  /**
@@ -57,6 +57,392 @@ function parseBackendType(value) {
57
57
  return value;
58
58
  }
59
59
  //#endregion
60
+ //#region src/agent-run-outcome-inspection.ts
61
+ const HUB_APPROVAL_REQUIRED = "HUB_APPROVAL_REQUIRED";
62
+ const MAX_SERIALIZED_TOOL_VALUE_BYTES = 4 * 1024 * 1024;
63
+ function parseInteraction(value) {
64
+ const parsed = InteractionRequestSchema.safeParse(value);
65
+ return parsed.success ? parsed.data : void 0;
66
+ }
67
+ function parsePlan(value) {
68
+ const parsed = DurablePlanSchema.safeParse(value);
69
+ return parsed.success ? parsed.data : void 0;
70
+ }
71
+ function parseToolInvocations(value) {
72
+ if (!Array.isArray(value)) return void 0;
73
+ const result = [];
74
+ for (const entry of value) {
75
+ const tool = plainRecord(entry);
76
+ const toolName = readString(tool?.toolName);
77
+ if (!tool || !toolName || tool.isError !== void 0 && typeof tool.isError !== "boolean") return;
78
+ const invocation = { toolName };
79
+ const input = tool.input ?? tool.arguments;
80
+ if (input !== void 0) {
81
+ const copied = copyJsonValue(input);
82
+ if (!copied.success) return void 0;
83
+ invocation.input = copied.value;
84
+ }
85
+ if (tool.result !== void 0) {
86
+ const copied = copyJsonValue(tool.result);
87
+ if (!copied.success) return void 0;
88
+ invocation.result = copied.value;
89
+ }
90
+ if (typeof tool.isError === "boolean") invocation.isError = tool.isError;
91
+ result.push(invocation);
92
+ }
93
+ return result;
94
+ }
95
+ function inspectToolOutcomes(toolInvocations) {
96
+ let approval;
97
+ for (const tool of toolInvocations ?? []) {
98
+ if (tool.isError !== true) continue;
99
+ const inspection = inspectToolResult(tool.result);
100
+ if (!inspection.approvalCode) continue;
101
+ if (approval) return { malformed: true };
102
+ approval = { message: inspection.message ?? "Hub action requires approval" };
103
+ if (inspection.approvalId) approval.approvalId = inspection.approvalId;
104
+ if (inspection.connectionId) approval.connectionId = inspection.connectionId;
105
+ }
106
+ const result = { malformed: false };
107
+ if (approval) result.approval = approval;
108
+ return result;
109
+ }
110
+ function inspectToolResult(value) {
111
+ let root = value;
112
+ if (typeof value === "string") try {
113
+ root = JSON.parse(value);
114
+ } catch {
115
+ return { approvalCode: false };
116
+ }
117
+ const record = plainRecord(root);
118
+ if (!record) return { approvalCode: false };
119
+ const structuredContent = plainRecord(record.structuredContent);
120
+ const envelope = record.code === HUB_APPROVAL_REQUIRED ? record : structuredContent?.code === HUB_APPROVAL_REQUIRED ? structuredContent : void 0;
121
+ if (!envelope) return { approvalCode: false };
122
+ const approval = plainRecord(plainRecord(envelope.details)?.approval) ?? plainRecord(envelope.approval);
123
+ const result = { approvalCode: true };
124
+ const message = readString(envelope.message);
125
+ const approvalId = readString(approval?.id);
126
+ const connectionId = readString(approval?.connectionId);
127
+ if (message) result.message = message;
128
+ if (approvalId) result.approvalId = approvalId;
129
+ if (connectionId) result.connectionId = connectionId;
130
+ return result;
131
+ }
132
+ /** Copy a provider value into a bounded JSON-only value safe for public output. */
133
+ function copyJsonValue(value) {
134
+ try {
135
+ const serialized = JSON.stringify(value);
136
+ if (serialized === void 0 || new TextEncoder().encode(serialized).byteLength > MAX_SERIALIZED_TOOL_VALUE_BYTES) return { success: false };
137
+ return {
138
+ success: true,
139
+ value: JSON.parse(serialized)
140
+ };
141
+ } catch {
142
+ return { success: false };
143
+ }
144
+ }
145
+ function questionFromInteraction(request) {
146
+ return {
147
+ questionId: request.id,
148
+ questions: request.answerSpec.fields.map((field) => field.type === "select" ? {
149
+ question: field.label,
150
+ options: field.options.map((option) => {
151
+ const value = { label: option.label };
152
+ if (option.description) value.description = option.description;
153
+ return value;
154
+ }),
155
+ multiSelect: field.multi === true
156
+ } : { question: field.label })
157
+ };
158
+ }
159
+ function normalizeStatus(value) {
160
+ return readString(value)?.toLowerCase().replaceAll("-", "_");
161
+ }
162
+ function readString(value) {
163
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
164
+ }
165
+ function readError(value) {
166
+ if (!value) return void 0;
167
+ const direct = readString(value.error);
168
+ if (direct) return direct;
169
+ return readString(plainRecord(value.error)?.message) ?? readString(value.message);
170
+ }
171
+ function plainRecord(value) {
172
+ return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
173
+ }
174
+ //#endregion
175
+ //#region src/agent-run-outcome.ts
176
+ const FAILURE_STATUSES = new Set([
177
+ "canceled",
178
+ "cancelled",
179
+ "error",
180
+ "errored",
181
+ "failed",
182
+ "failure",
183
+ "timed_out",
184
+ "timeout"
185
+ ]);
186
+ const SUCCESS_STATUSES = new Set([
187
+ "completed",
188
+ "done",
189
+ "ok",
190
+ "success"
191
+ ]);
192
+ const WAIT_STATUSES = new Map([
193
+ ["awaiting_interaction", "interaction"],
194
+ ["awaiting_plan_decision", "plan"],
195
+ ["awaiting_question", "question"],
196
+ ["blocked_on_approval", "approval"]
197
+ ]);
198
+ /** Track one run and settle its outcome only after its event stream ends. */
199
+ function createAgentRunOutcomeTracker() {
200
+ const state = createOutcomeState();
201
+ let result;
202
+ return {
203
+ observe(event) {
204
+ if (result) throw new Error("Agent run outcome tracker is already finished");
205
+ observeEvent(state, event);
206
+ },
207
+ finish() {
208
+ result ??= settleOutcome(state);
209
+ return result;
210
+ }
211
+ };
212
+ }
213
+ /** Settle a complete in-memory event sequence with the streaming tracker. */
214
+ function deriveAgentRunOutcome(events) {
215
+ const tracker = createAgentRunOutcomeTracker();
216
+ for (const event of events) tracker.observe(event);
217
+ return tracker.finish();
218
+ }
219
+ /** Settle one completed result record without treating live result frames as terminal. */
220
+ function deriveAgentResultOutcome(result) {
221
+ const state = createOutcomeState();
222
+ observeOutcomeFrame(state, "result", result, true);
223
+ return settleOutcome(state);
224
+ }
225
+ function createOutcomeState() {
226
+ return {
227
+ terminalReached: false,
228
+ terminalStatuses: /* @__PURE__ */ new Set(),
229
+ malformed: false
230
+ };
231
+ }
232
+ function observeEvent(state, event) {
233
+ try {
234
+ if (!event || typeof event !== "object") {
235
+ state.malformed = true;
236
+ return;
237
+ }
238
+ const type = typeof event.type === "string" ? event.type : "";
239
+ const data = plainRecord(event.data);
240
+ if (!type || !data) {
241
+ state.malformed = true;
242
+ return;
243
+ }
244
+ if (type === "error") {
245
+ state.runError ??= readError(data) ?? "Agent execution failed";
246
+ state.runErrorCode ??= readString(data.code);
247
+ }
248
+ if (type === "interaction") observeInteraction(state, data);
249
+ if (type === "interaction.cancel") observeInteractionCancel(state, data);
250
+ if (type === "plan.submitted") observePlan(state, data);
251
+ if (type === "result") observeOutcomeFrame(state, type, data, false);
252
+ if (type === "done") observeOutcomeFrame(state, type, data, true);
253
+ } catch {
254
+ state.malformed = true;
255
+ }
256
+ }
257
+ function observeInteraction(state, data) {
258
+ const request = parseInteraction(data.request);
259
+ if (!request) {
260
+ state.malformed = true;
261
+ return;
262
+ }
263
+ retainInteraction(state, request);
264
+ }
265
+ function observeInteractionCancel(state, data) {
266
+ const id = readString(data.id);
267
+ if (!id) {
268
+ state.malformed = true;
269
+ return;
270
+ }
271
+ if (state.interaction?.id === id) state.interaction = void 0;
272
+ }
273
+ function observePlan(state, data) {
274
+ const plan = parsePlan(data.plan);
275
+ if (!plan) {
276
+ state.malformed = true;
277
+ return;
278
+ }
279
+ retainPlan(state, plan);
280
+ }
281
+ function observeOutcomeFrame(state, type, data, terminal) {
282
+ if (terminal) state.terminalReached = true;
283
+ if (data.success !== void 0 && typeof data.success !== "boolean") state.malformed = true;
284
+ if (typeof data.success === "boolean") {
285
+ if (state.terminalSuccess !== void 0 && state.terminalSuccess !== data.success) state.malformed = true;
286
+ state.terminalSuccess = data.success;
287
+ }
288
+ if (type === "done" || data.outcome !== void 0) {
289
+ if (!AgentExecutionOutcomeSchema.safeParse(data.outcome).success) state.malformed = true;
290
+ }
291
+ const outcome = plainRecord(data.outcome);
292
+ const nestedResult = plainRecord(data.result);
293
+ for (const value of [
294
+ data.status,
295
+ outcome?.type,
296
+ outcome?.status,
297
+ nestedResult?.status
298
+ ]) {
299
+ if (value === void 0) continue;
300
+ const status = normalizeStatus(value);
301
+ if (status) state.terminalStatuses.add(status);
302
+ else state.malformed = true;
303
+ }
304
+ state.terminalError ??= readError(data) ?? readError(outcome) ?? readError(nestedResult);
305
+ state.terminalErrorCode ??= readString(data.errorCode) ?? readString(data.code) ?? readString(outcome?.errorCode) ?? readString(outcome?.code) ?? readString(nestedResult?.errorCode) ?? readString(nestedResult?.code);
306
+ const interactionCandidate = data.interaction ?? nestedResult?.interaction;
307
+ if (interactionCandidate !== void 0) {
308
+ const interaction = parseInteraction(interactionCandidate);
309
+ if (interaction) retainInteraction(state, interaction);
310
+ else state.malformed = true;
311
+ }
312
+ const planCandidate = data.plan ?? (outcome?.type === "awaiting_plan_decision" ? outcome.plan : void 0) ?? (nestedResult?.status === "awaiting_plan_decision" ? nestedResult.plan : void 0);
313
+ if (planCandidate !== void 0) {
314
+ const plan = parsePlan(planCandidate);
315
+ if (plan) retainPlan(state, plan);
316
+ else state.malformed = true;
317
+ }
318
+ const invocationCandidate = data.toolInvocations ?? nestedResult?.toolInvocations;
319
+ if (invocationCandidate !== void 0) {
320
+ const invocations = parseToolInvocations(invocationCandidate);
321
+ if (invocations) retainToolInvocations(state, invocations);
322
+ else state.malformed = true;
323
+ }
324
+ const toolOutcome = inspectToolOutcomes(state.toolInvocations);
325
+ if (toolOutcome.malformed) state.malformed = true;
326
+ state.approval = toolOutcome.approval;
327
+ }
328
+ function settleOutcome(state) {
329
+ const common = outcomeDetails(state);
330
+ if (state.runError) return failed(state.runError, state.runErrorCode, common);
331
+ const statusGroups = classifyStatuses(state.terminalStatuses);
332
+ if (statusGroups.failure) return failed(state.terminalError ?? `Agent execution ended with status ${statusGroups.failure}`, state.terminalErrorCode, common);
333
+ if (!state.terminalReached) return failed("Agent stream ended without a terminal event", void 0, common);
334
+ if (state.malformed || statusGroups.unknown || statusGroups.conflicting) return failed("Agent terminal outcome is malformed", void 0, common);
335
+ const wait = selectWait(state);
336
+ if (wait.error) return failed(wait.error, void 0, common);
337
+ if (statusGroups.wait && statusGroups.wait !== wait.kind) return failed("Agent terminal wait does not match its response request", void 0, common);
338
+ if (state.terminalSuccess === false && !wait.kind) return failed(state.terminalError ?? "Agent execution failed", state.terminalErrorCode, common);
339
+ if (state.terminalError && !statusGroups.wait) return failed(state.terminalError, state.terminalErrorCode, common);
340
+ if (wait.kind) return waitingOutcome(wait.kind, state, common);
341
+ return {
342
+ success: true,
343
+ status: "success",
344
+ ...common
345
+ };
346
+ }
347
+ function classifyStatuses(statuses) {
348
+ let failure;
349
+ let wait;
350
+ let success = false;
351
+ let unknown = false;
352
+ let conflicting = false;
353
+ for (const status of statuses) if (FAILURE_STATUSES.has(status)) failure ??= status;
354
+ else if (SUCCESS_STATUSES.has(status)) success = true;
355
+ else if (WAIT_STATUSES.has(status)) {
356
+ const next = WAIT_STATUSES.get(status);
357
+ if (!next) continue;
358
+ if (wait && wait !== next) conflicting = true;
359
+ wait = next;
360
+ } else unknown = true;
361
+ if (failure && (wait || success)) conflicting = true;
362
+ return {
363
+ failure,
364
+ wait,
365
+ success,
366
+ unknown,
367
+ conflicting
368
+ };
369
+ }
370
+ function selectWait(state) {
371
+ const kinds = [];
372
+ if (state.plan) kinds.push("plan");
373
+ if (state.approval) kinds.push("approval");
374
+ if (state.interaction) kinds.push(state.interaction.kind === "question" ? "question" : "interaction");
375
+ if (kinds.length > 1) return { error: "Agent terminal outcome contains conflicting response requests" };
376
+ return { kind: kinds[0] };
377
+ }
378
+ function waitingOutcome(kind, state, common) {
379
+ if (kind === "plan") return {
380
+ success: false,
381
+ status: "awaiting_plan_decision",
382
+ error: "Agent is awaiting a durable plan decision",
383
+ ...common
384
+ };
385
+ if (kind === "approval") return {
386
+ success: false,
387
+ status: "blocked_on_approval",
388
+ error: state.approval?.message ?? "Agent is awaiting approval",
389
+ ...common
390
+ };
391
+ if (kind === "question") return {
392
+ success: false,
393
+ status: "awaiting_question",
394
+ error: "Agent is awaiting an answer",
395
+ ...common
396
+ };
397
+ return {
398
+ success: false,
399
+ status: "awaiting_interaction",
400
+ error: "Agent is awaiting a response",
401
+ ...common
402
+ };
403
+ }
404
+ function outcomeDetails(state) {
405
+ const question = state.interaction?.kind === "question" ? questionFromInteraction(state.interaction) : void 0;
406
+ const details = {};
407
+ if (state.toolInvocations) details.toolInvocations = state.toolInvocations;
408
+ if (state.approval) details.approval = state.approval;
409
+ if (state.interaction) details.interaction = state.interaction;
410
+ if (question) details.question = question;
411
+ if (state.plan) details.plan = state.plan;
412
+ return details;
413
+ }
414
+ function failed(error, errorCode, common) {
415
+ const outcome = {
416
+ success: false,
417
+ status: "failed",
418
+ error,
419
+ ...common
420
+ };
421
+ if (errorCode) outcome.errorCode = errorCode;
422
+ return outcome;
423
+ }
424
+ function retainPlan(state, plan) {
425
+ if (state.plan && (state.plan.id !== plan.id || state.plan.revision !== plan.revision || state.plan.title !== plan.title || state.plan.body !== plan.body || state.plan.submittedAt !== plan.submittedAt)) {
426
+ state.malformed = true;
427
+ return;
428
+ }
429
+ state.plan = plan;
430
+ }
431
+ function retainInteraction(state, interaction) {
432
+ if (state.interaction && state.interaction.requestDigest !== interaction.requestDigest) {
433
+ state.malformed = true;
434
+ return;
435
+ }
436
+ state.interaction = interaction;
437
+ }
438
+ function retainToolInvocations(state, invocations) {
439
+ if (state.toolInvocations && JSON.stringify(state.toolInvocations) !== JSON.stringify(invocations)) {
440
+ state.malformed = true;
441
+ return;
442
+ }
443
+ state.toolInvocations = invocations;
444
+ }
445
+ //#endregion
60
446
  //#region src/backend-config.ts
61
447
  function assertCurrentBackendType(value, field = "backend.type") {
62
448
  const parsed = backendTypeSchema.safeParse(value);
@@ -825,4 +1211,4 @@ function normalizeSessionInfo(raw) {
825
1211
  };
826
1212
  }
827
1213
  //#endregion
828
- export { uploadChunked as a, combineAbortSignals as c, applyRequestedModel as d, assertCurrentBackendType as f, parseBackendType as h, sessionHeaders as i, encodePromptForWire as l, backendTypeSchema as m, normalizeSessionInfo as n, SANDBOX_PROXY_REQUEST_MAX_BYTES as o, normalizeRuntimeBackendConfig as p, appendSessionIdQuery as r, FILE_DECODED_WRITE_MAX_BYTES as s, SandboxRuntimeApi as t, encodeTextForWire as u };
1214
+ export { backendTypeSchema as _, uploadChunked as a, combineAbortSignals as c, applyRequestedModel as d, assertCurrentBackendType as f, deriveAgentRunOutcome as g, deriveAgentResultOutcome as h, sessionHeaders as i, encodePromptForWire as l, createAgentRunOutcomeTracker as m, normalizeSessionInfo as n, SANDBOX_PROXY_REQUEST_MAX_BYTES as o, normalizeRuntimeBackendConfig as p, appendSessionIdQuery as r, FILE_DECODED_WRITE_MAX_BYTES as s, SandboxRuntimeApi as t, encodeTextForWire as u, parseBackendType as v };
package/dist/runtime.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { Fi as TaskSessionInfo, Gr as SandboxTerminalCreateOptions, Hr as SandboxRuntimeHealth, Jr as SandboxTerminalRequestOptions, Kr as SandboxTerminalInfo, Lr as SandboxPortBinding, Mi as TaskSessionChanges, N as CreateSessionOptions, Ni as TaskSessionCommitResult, P as CreateTaskSessionOptions, Qi as WriteFileOptions, Vn as RenameOptions, _i as SessionMessage, _t as FileWriteResult, ci as SendSessionMessageRequest, gt as FileUsageResult, ht as FileUsageOptions, li as SentSessionMessage, mi as SessionInfo, mt as FileTreeResult, nn as ListMessagesOptions, ot as FileReadBatchOptions, pt as FileTreeOptions, qi as UploadProgress, qr as SandboxTerminalManager, si as SendSessionMessageOptions, st as FileReadBatchResult, ut as FileRenameResult, v as ChunkedUploadOptions, w as CommitTaskSessionOptions, y as ChunkedUploadResult } from "./types-Qn3x7R8O.js";
1
+ import { $r as SandboxTerminalRequestOptions, Bi as TaskSessionInfo, C as ChunkedUploadResult, Hr as SandboxPortBinding, Kn as RenameOptions, L as CreateSessionOptions, Li as TaskSessionChanges, O as CommitTaskSessionOptions, Qi as UploadProgress, Qr as SandboxTerminalManager, R as CreateTaskSessionOptions, Ri as TaskSessionCommitResult, S as ChunkedUploadOptions, Si as SessionMessage, St as FileWriteResult, Xr as SandboxTerminalCreateOptions, Zr as SandboxTerminalInfo, bt as FileUsageOptions, dt as FileReadBatchOptions, fi as SendSessionMessageOptions, ft as FileReadBatchResult, ht as FileRenameResult, mi as SentSessionMessage, pi as SendSessionMessageRequest, qr as SandboxRuntimeHealth, ra as WriteFileOptions, sn as ListMessagesOptions, vt as FileTreeOptions, xt as FileUsageResult, yi as SessionInfo, yt as FileTreeResult } from "./types-D_ykdqn6.js";
2
2
  import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-Bdy5jXzc.js";
3
+ import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-TwIC-Ccd.js";
3
4
 
4
5
  //#region src/lib/chunked-upload.d.ts
5
6
  /** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
@@ -103,4 +104,4 @@ declare class SandboxRuntimeClient extends SandboxRuntimeApi {
103
104
  }
104
105
  declare function createSandboxRuntimeClient(config: SandboxRuntimeClientConfig): SandboxRuntimeClient;
105
106
  //#endregion
106
- export { AuthError, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, ServerError, type SessionMessage, StateError, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, createSandboxRuntimeClient, uploadChunked };
107
+ export { type AgentRunOutcome, type AgentRunOutcomeTracker, AuthError, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, ServerError, type SessionMessage, StateError, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
package/dist/runtime.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as uploadChunked, c as combineAbortSignals, t as SandboxRuntimeApi } from "./runtime-api-CK-4S7oA.js";
1
+ import { a as uploadChunked, c as combineAbortSignals, g as deriveAgentRunOutcome, h as deriveAgentResultOutcome, m as createAgentRunOutcomeTracker, t as SandboxRuntimeApi } from "./runtime-api-TVLbV10b.js";
2
2
  import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-C6kn-3zt.js";
3
3
  //#region src/runtime-client.ts
4
4
  const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
@@ -80,4 +80,4 @@ function createSandboxRuntimeClient(config) {
80
80
  return new SandboxRuntimeClient(config);
81
81
  }
82
82
  //#endregion
83
- export { AuthError, CapabilityError, FileWriteConflictError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxError, SandboxRuntimeClient, ServerError, StateError, TimeoutError, ValidationError, createSandboxRuntimeClient, uploadChunked };
83
+ export { AuthError, CapabilityError, FileWriteConflictError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxError, SandboxRuntimeClient, ServerError, StateError, TimeoutError, ValidationError, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };