@tangle-network/sandbox 1.0.237 → 1.0.239

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 (63) hide show
  1. package/dist/agent/index.d.ts +4 -4
  2. package/dist/agent/index.js +4 -4
  3. package/dist/agent/preview.d.ts +1 -1
  4. package/dist/agent/preview.js +2 -2
  5. package/dist/{agent-execution-preparation-BJChICex.js → agent-execution-preparation-CjKTjmJ9.js} +3 -3
  6. package/dist/{agent-execution-preparation-receipt-BIFxqyr5.js → agent-execution-preparation-receipt-AihkqLnd.js} +4 -4
  7. package/dist/{agent-run-outcome-DkEeNhH6.d.ts → agent-run-outcome-DrhA0Z4S.d.ts} +2 -2
  8. package/dist/{api-request-Cm1H_xsv.js → api-request-C7JAklv7.js} +1 -1
  9. package/dist/auth/index.d.ts +2 -2
  10. package/dist/auth/index.js +2 -2
  11. package/dist/{browser-interactive-control-controller-JSGfFeNB.d.ts → browser-interactive-control-controller-9RauUsHw.d.ts} +1 -1
  12. package/dist/{browser-interactive-control-controller-CrBx8ETe.js → browser-interactive-control-controller-bap2mKa-.js} +14 -14
  13. package/dist/cli-auth-bundle-BinY89CX.js +2 -0
  14. package/dist/{cli-auth-bundle-C6DtK7GX-mBUPER0R.js → cli-auth-bundle-C6DtK7GX-DoqlFTT-.js} +1 -1
  15. package/dist/{client-Crwo3vqo.js → client-DjgUvely.js} +18 -115
  16. package/dist/{client-Cy6Zlb3W.d.ts → client-DsXWyLrM.d.ts} +79 -114
  17. package/dist/collaboration/index.d.ts +1 -1
  18. package/dist/collaboration/index.js +1 -1
  19. package/dist/{collaboration-k3yUVGgP.js → collaboration-klNBRyda.js} +1 -1
  20. package/dist/core.d.ts +6 -6
  21. package/dist/core.js +3 -3
  22. package/dist/{file-download-DXgIe-CV.js → file-download-CihyMYH-.js} +1 -1
  23. package/dist/{harness-DMaNgn0S.js → harness-C5lXV9e5.js} +5 -5
  24. package/dist/{index-DYxmMGbU.d.ts → index-B_1aVs2B.d.ts} +7 -6
  25. package/dist/index.d.ts +12 -11
  26. package/dist/index.js +10 -10
  27. package/dist/intelligence/index.d.ts +13 -6
  28. package/dist/intelligence/index.js +60 -8
  29. package/dist/interactive-control.d.ts +1 -1
  30. package/dist/interactive-control.js +1 -1
  31. package/dist/{interactive-controller-DaBe9oR5.d.ts → interactive-controller-C2vOFe0u.d.ts} +3 -3
  32. package/dist/{interactive-controller-mqraKMkh.js → interactive-controller-CbWMfA4f.js} +5 -5
  33. package/dist/{lines-DfKFyMTA.d.ts → lines-CxWFuuJ3.d.ts} +1 -1
  34. package/dist/lines.d.ts +1 -1
  35. package/dist/{local-cli-auth-CO0byocv.js → local-cli-auth-DrNihS9-.js} +1 -1
  36. package/dist/{mcp-local-DV-BvoUI.js → mcp-local-Bfrna88t.js} +2 -2
  37. package/dist/{preview-BqicYuSJ.d.ts → preview-DFFaAZdF.d.ts} +3 -3
  38. package/dist/{profile-schema-C1KpT-wS.js → profile-schema-C0n0VgmA.js} +468 -36
  39. package/dist/{public-templates-Bk843Kqc.d.ts → public-templates-xqtPv6pg.d.ts} +2 -2
  40. package/dist/public-templates.d.ts +1 -1
  41. package/dist/{raw-evidence-archive-XEDh0VUj.js → raw-evidence-archive-DLNEUdij.js} +3 -15
  42. package/dist/raw-evidence-export-C0ieFpi2.d.ts +354 -0
  43. package/dist/raw-evidence-export-C6Xdl3nC.js +19 -0
  44. package/dist/runtime.d.ts +5 -5
  45. package/dist/runtime.js +3 -3
  46. package/dist/{sandbox-DnuEGRn4.js → sandbox-eUHRN1gu.js} +79 -72
  47. package/dist/{select-seat-CntQ4bko.js → select-seat-BHHUFoKh.js} +4 -4
  48. package/dist/select-seat-command.d.ts +2 -2
  49. package/dist/select-seat-command.js +1 -1
  50. package/dist/session-gateway/index.js +1 -1
  51. package/dist/tangle/index.d.ts +1 -1
  52. package/dist/tangle/index.js +1 -1
  53. package/dist/{tangle-DjcPKCqo.js → tangle-JTU0M4Zk.js} +2 -2
  54. package/dist/{terminal-stream-types-DBQuAsmB.d.ts → terminal-stream-types-D7dMd-NV.d.ts} +28 -20
  55. package/dist/{types-C8aazs-y.d.ts → types-ImZuAuFG.d.ts} +3 -344
  56. package/package.json +7 -7
  57. package/dist/cli-auth-bundle-BLAtE6Dc.js +0 -2
  58. /package/dist/{chunked-upload-file-JfRw6PRf.js → chunked-upload-file-DtAW52iW.js} +0 -0
  59. /package/dist/{cli-auth-bundle-B91fSxkR.d.ts → cli-auth-bundle-eUl7Sa1x.d.ts} +0 -0
  60. /package/dist/{direct-http2-Bgb2lHte.js → direct-http2-zLxsvF44.js} +0 -0
  61. /package/dist/{index-o31uwAkX.d.ts → index-BTXyTVq4.d.ts} +0 -0
  62. /package/dist/{index-C-_HY5NY.d.ts → index-ClusTWYM.d.ts} +0 -0
  63. /package/dist/{sha2-vu4U-x2L.js → sha2-BIoWepwn.js} +0 -0
@@ -0,0 +1,354 @@
1
+ import { z } from "zod";
2
+
3
+ //#region ../../../packages/runtime-contracts/dist/raw-evidence-export.d.ts
4
+ /** Wire contract for bounded native evidence archives, per session and box-wide. */
5
+ interface RawEvidencePayloadFile {
6
+ /** Safe relative path below the exported directory; never an absolute native path. */
7
+ path: string;
8
+ sizeBytes: number;
9
+ sha256: `sha256:${string}`;
10
+ }
11
+ interface RawEvidenceRecordsFile extends RawEvidencePayloadFile {
12
+ format: "ndjson";
13
+ /** Number of complete records, in original order. */
14
+ records: number;
15
+ }
16
+ interface RawEvidenceNativeMetadata {
17
+ sourceId?: string;
18
+ rootScope: "session-home" | "workspace-session";
19
+ path: string;
20
+ kind: "file" | "directory" | "symlink";
21
+ mode: number;
22
+ uid: number;
23
+ gid: number;
24
+ mtimeMs: number;
25
+ ctimeMs: number;
26
+ sizeBytes: number;
27
+ }
28
+ type RawEvidenceNativeFile = RawEvidenceNativeMetadata & {
29
+ sha256?: string;
30
+ linkTarget?: string; /** Replaces contentBase64 for regular files. Symlinks remain metadata only. */
31
+ content?: RawEvidencePayloadFile;
32
+ /**
33
+ * The request's `omitContent` names this file's directory: the file has
34
+ * its metadata and no `content` or `sha256`, and its bytes stay on the box.
35
+ */
36
+ contentOmitted?: true;
37
+ };
38
+ declare const rawEvidenceArchiveAttemptSchema: z.ZodObject<{
39
+ executionId: z.ZodString;
40
+ ordinal: z.ZodNumber;
41
+ providerSessionId: z.ZodString;
42
+ nativeSessionIds: z.ZodArray<z.ZodString>;
43
+ processIds: z.ZodArray<z.ZodString>;
44
+ outcome: z.ZodEnum<{
45
+ unknown: "unknown";
46
+ failed: "failed";
47
+ cancelled: "cancelled";
48
+ succeeded: "succeeded";
49
+ }>;
50
+ missingReasons: z.ZodArray<z.ZodString>;
51
+ launch: z.ZodOptional<z.ZodEnum<{
52
+ unknown: "unknown";
53
+ not_launched: "not_launched";
54
+ }>>;
55
+ }, z.core.$strip>;
56
+ type RawEvidenceArchiveAttempt = z.infer<typeof rawEvidenceArchiveAttemptSchema>;
57
+ interface RawEvidenceArchiveEventMetadata {
58
+ executionId: string;
59
+ sessionId: string;
60
+ status: "active" | "completed" | "failed" | "cancelled";
61
+ startedAt: number;
62
+ completedAt?: number;
63
+ eventCount: number;
64
+ lastEventId: string;
65
+ }
66
+ /** Payload references replace only inline content and aggregate record arrays. */
67
+ interface RawEvidenceArchiveManifest {
68
+ schema: "tangle.raw-evidence-archive.v1";
69
+ status: "captured" | "partial";
70
+ sessionId: string;
71
+ backendType: string;
72
+ nativeSessionId: string | null;
73
+ proofStatus: "verified" | "unverified";
74
+ containerId?: string;
75
+ sidecarImageDigest: string;
76
+ sidecarBundleRevision: string;
77
+ sidecarBundleChecksum?: string;
78
+ nativeRoots: Array<{
79
+ sourceId?: string;
80
+ rootScope: "session-home" | "workspace-session";
81
+ path: string;
82
+ }>;
83
+ /**
84
+ * The request's `omitContent` prefixes, present only when it named some.
85
+ * A prefix that covers or enters the harness's native session store is
86
+ * refused with 400, so the session store always keeps its bytes.
87
+ */
88
+ omitContent?: string[];
89
+ files: RawEvidenceNativeFile[];
90
+ excluded: Array<RawEvidenceNativeMetadata & {
91
+ reason: "credential";
92
+ }>;
93
+ skipped: Array<{
94
+ sourceId?: string;
95
+ rootScope: "session-home" | "workspace-session";
96
+ path: string;
97
+ reason: string;
98
+ }>;
99
+ inventory: Record<string, number>;
100
+ /** NDJSON rows carry the processIo record fields, with content: RawEvidencePayloadFile in place of contentBase64. */
101
+ processIo: RawEvidenceRecordsFile;
102
+ /** NDJSON rows have exactly the fields of processTerminals entries. */
103
+ processTerminals: RawEvidenceRecordsFile;
104
+ processSources: Array<{
105
+ sourceId: string;
106
+ sizeBytes: number;
107
+ sha256: string; /** Exact source spool bytes; replaces contentBase64. */
108
+ content: RawEvidencePayloadFile;
109
+ }>;
110
+ events: Array<{
111
+ metadata: RawEvidenceArchiveEventMetadata; /** Canonical reconstructed BufferedEvent rows, in original event order. */
112
+ frames: RawEvidenceRecordsFile;
113
+ }>;
114
+ attempts: RawEvidenceArchiveAttempt[];
115
+ evidenceSources: Array<{
116
+ executionId: string;
117
+ sourceId: string;
118
+ backendType: string;
119
+ runtimeHome: string;
120
+ credentialPaths: string[];
121
+ }>;
122
+ completeness: {
123
+ nativeStore: boolean;
124
+ processIo: boolean;
125
+ events: boolean;
126
+ };
127
+ coverageComplete: boolean;
128
+ missingReasons: string[];
129
+ }
130
+ /** One store file of a native session copy (harness session contract). */
131
+ interface NativeSessionCopyFile extends RawEvidencePayloadFile {
132
+ /** The store root the file belongs to, relative to the runtime HOME, e.g. `.pi/agent/sessions`. */
133
+ store: string;
134
+ /** The file's own path relative to the runtime HOME, e.g. `.pi/agent/sessions/<ts>_<id>.jsonl`. */
135
+ storePath: string;
136
+ /** A `@tangle-network/harness-sessions` SessionFormatId. */
137
+ format: string;
138
+ /** byte-prefix: append-only JSONL cut at its last complete line; atomic-file: a whole file read twice the same; sqlite-backup: VACUUM INTO. */
139
+ method: "byte-prefix" | "atomic-file" | "sqlite-backup";
140
+ /** The source was larger than the per-file bound; this is its prefix. */
141
+ truncated: boolean;
142
+ /** Source size when copied. */
143
+ sourceBytes: number;
144
+ }
145
+ /**
146
+ * One execution attempt's native session. `snapshot` was taken while the
147
+ * harness ran; `settled` after its process exited, whatever the outcome.
148
+ * Consumers find sessions here, never by matching paths in `files`.
149
+ */
150
+ interface NativeSessionCopy {
151
+ harness: string;
152
+ /** Format of the session files found (the first, when a harness has several stores). */
153
+ format: string | null;
154
+ executionId: string;
155
+ attempt: number;
156
+ nativeSessionId: string;
157
+ copy: "snapshot" | "settled";
158
+ capturedAt: string;
159
+ /** Null fields are not observed at the copy point; the archive's process records carry them. */
160
+ process: {
161
+ pid: number | null;
162
+ exitedAt: string | null;
163
+ exitCode: number | null;
164
+ signal: string | null;
165
+ outcome: "succeeded" | "failed" | "cancelled" | "unknown";
166
+ };
167
+ files: NativeSessionCopyFile[];
168
+ /**
169
+ * Store files of a settled copy whose bytes the sidecar released because a
170
+ * newer settled copy of the same store file holds them. Each is also named
171
+ * in missingReasons as `settled_copy_superseded:<storePath>`.
172
+ */
173
+ superseded?: NativeSessionCopySuperseded[];
174
+ complete: boolean;
175
+ /** native_session_id_unobserved | native_session_files_missing | over_bound:<path> | settled_copy_superseded:<path> | ... */
176
+ missingReasons: string[];
177
+ }
178
+ /** A settled store file released in favour of a newer copy of the same file. */
179
+ interface NativeSessionCopySuperseded {
180
+ storePath: string;
181
+ /** The released payload's digest and size, as settled. */
182
+ sha256: string;
183
+ sizeBytes: number;
184
+ /**
185
+ * The settled copy that held the newer copy when this one was released.
186
+ * That copy may itself be released later; following the chain ends at the
187
+ * copy that holds the store file's bytes.
188
+ */
189
+ supersededBy: {
190
+ executionId: string;
191
+ attempt: number;
192
+ };
193
+ }
194
+ /** v1 plus the per-attempt native session copies. Served when the caller asks for a copy. */
195
+ interface RawEvidenceArchiveManifestV2 extends Omit<RawEvidenceArchiveManifest, "schema"> {
196
+ schema: "tangle.raw-evidence-archive.v2";
197
+ nativeSessions: NativeSessionCopy[];
198
+ /**
199
+ * Present when the caller asked for `home=skip`: `nativeRoots`, `files`,
200
+ * `excluded`, `skipped` and `inventory` are empty because the HOME walk was
201
+ * not taken, and the harness runtime was left running.
202
+ */
203
+ homeWalk?: "skipped";
204
+ }
205
+ /**
206
+ * v2 as served to a caller that asked for `parts=native`: the manifest and the
207
+ * native session copies, nothing else. The event log and the process stream
208
+ * were left out by request, so `processIo` and `processTerminals` are absent,
209
+ * `processSources` and `events` are empty, the HOME walk is skipped, `status`
210
+ * is `partial`, and `missingReasons` names `events_not_requested` and
211
+ * `process_io_not_requested`. Each copy's own `complete` says whether that
212
+ * session was copied whole.
213
+ */
214
+ interface RawEvidenceArchiveManifestNative extends Omit<RawEvidenceArchiveManifestV2, "processIo" | "processTerminals" | "homeWalk"> {
215
+ parts: "native";
216
+ homeWalk: "skipped";
217
+ }
218
+ interface RawEvidenceUnavailable {
219
+ status: "unavailable";
220
+ sessionId: string;
221
+ backendType: string;
222
+ reason: string;
223
+ }
224
+ interface RawEvidenceExportOptions {
225
+ /** Bound all uncompressed archive member bytes, including metadata and records. */
226
+ maxBytes: number;
227
+ /**
228
+ * Request native session copies (manifest v2). `latest` returns the
229
+ * settled copy when one exists, otherwise a fresh snapshot; `settled`
230
+ * fails with 409 not_settled while the harness still runs.
231
+ */
232
+ copy?: "latest" | "settled";
233
+ /** Restrict native session copies to one sidecar execution. */
234
+ executionId?: string;
235
+ /**
236
+ * `native` asks for the native session copies alone (requires `copy`): no
237
+ * event log, process stream or HOME walk, so `maxBytes` bounds the copies
238
+ * and the manifest. The result's manifest is a
239
+ * {@link RawEvidenceArchiveManifestNative}. A sidecar older than the option
240
+ * ignores it and serves the full archive, within the same bounds.
241
+ */
242
+ parts?: "native";
243
+ /**
244
+ * Session-HOME-relative directory prefixes, each ending in `/` (for
245
+ * example `.codex/plugins/cache/`). The HOME walk names each file below
246
+ * one with its metadata and `contentOmitted: true`, and never reads its
247
+ * bytes. Use it for directories a harness downloads again, so their bytes
248
+ * do not cross the network. At most 64 prefixes of at most 512 characters;
249
+ * not with `parts`. A prefix that covers or enters the harness's native
250
+ * session store is refused. A sidecar older than the option ignores it and
251
+ * sends every file's bytes, so keep `maxBytes` sized for the whole HOME
252
+ * until every sidecar serves the option.
253
+ */
254
+ omitContent?: readonly string[];
255
+ /** Bound all archive file entries, including empty files. */
256
+ maxFiles: number;
257
+ /** Compressed transport bound; defaults to maxBytes plus bounded tar overhead. */
258
+ maxArchiveBytes?: number;
259
+ signal?: AbortSignal;
260
+ }
261
+ /**
262
+ * The declared native stores of one runtime HOME, copied box-wide. Only the
263
+ * files its harness contract's store globs match are read; nothing else in
264
+ * the HOME is opened, listed or named.
265
+ */
266
+ interface NativeStoreHomeCopy {
267
+ harness: string;
268
+ /** The HOME's absolute path inside the box. */
269
+ runtimeHome: string;
270
+ copy: "snapshot";
271
+ capturedAt: string;
272
+ /** An active execution or an interactive owner held the HOME when it was copied. */
273
+ live: boolean;
274
+ files: NativeSessionCopyFile[];
275
+ /** Store files the globs matched that the credential predicate names; never copied. */
276
+ excluded: Array<{
277
+ storePath: string;
278
+ reason: "credential";
279
+ }>;
280
+ complete: boolean;
281
+ /** home_live | over_bound:<path> | store_entries_capped:<root> | store_file_unreadable:<path> | ... */
282
+ missingReasons: string[];
283
+ }
284
+ /**
285
+ * Every native session store on one box, found by walking the runtime HOME
286
+ * roots rather than the session store, so it also serves a box whose session
287
+ * listing is empty (a snapshot-restored box whose records expired).
288
+ */
289
+ interface RawEvidenceBoxArchiveManifest {
290
+ schema: "tangle.raw-evidence-archive.box.v1";
291
+ scope: "box";
292
+ status: "captured" | "partial";
293
+ proofStatus: "verified" | "unverified";
294
+ containerId?: string;
295
+ sidecarBundleChecksum?: string;
296
+ sidecarImageDigest: string;
297
+ sidecarBundleRevision: string;
298
+ /** Every HOME root walked, with the number of HOMEs it held. */
299
+ roots: Array<{
300
+ harness: string;
301
+ path: string;
302
+ kind: "shared" | "isolated";
303
+ homes: number;
304
+ }>;
305
+ homes: NativeStoreHomeCopy[];
306
+ /** Settled copies, each with the HOME it was taken from; they outlive a reaped HOME. */
307
+ nativeSessions: Array<NativeSessionCopy & {
308
+ runtimeHome: string | null;
309
+ }>;
310
+ coverageComplete: boolean;
311
+ missingReasons: string[];
312
+ }
313
+ interface RawEvidenceBoxUnavailable {
314
+ status: "unavailable";
315
+ scope: "box";
316
+ reason: string;
317
+ }
318
+ interface RawEvidenceBoxExportOptions {
319
+ /** Bound all uncompressed archive member bytes, including the manifest. */
320
+ maxBytes: number;
321
+ /** Bound all archive file entries, including empty files. */
322
+ maxFiles: number;
323
+ /** Compressed transport bound; defaults to maxBytes plus bounded tar overhead. */
324
+ maxArchiveBytes?: number;
325
+ signal?: AbortSignal;
326
+ }
327
+ type RawEvidenceBoxDirectoryExport = RawEvidenceBoxUnavailable | {
328
+ status: "captured" | "partial";
329
+ directory: string;
330
+ manifestPath: string;
331
+ manifestSha256: `sha256:${string}`;
332
+ transfer: {
333
+ sizeBytes: number;
334
+ sha256: string;
335
+ };
336
+ manifest: RawEvidenceBoxArchiveManifest;
337
+ coverageComplete: boolean;
338
+ missingReasons: string[];
339
+ };
340
+ type RawEvidenceDirectoryExport = RawEvidenceUnavailable | {
341
+ status: "captured" | "partial";
342
+ directory: string;
343
+ manifestPath: string;
344
+ manifestSha256: `sha256:${string}`;
345
+ transfer: {
346
+ sizeBytes: number;
347
+ sha256: string;
348
+ }; /** Bounded metadata only. No inline payload or aggregate frame contents. */
349
+ manifest: RawEvidenceArchiveManifest | RawEvidenceArchiveManifestV2 | RawEvidenceArchiveManifestNative;
350
+ coverageComplete: boolean;
351
+ missingReasons: string[];
352
+ };
353
+ //#endregion
354
+ export { RawEvidenceBoxArchiveManifest as a, RawEvidenceDirectoryExport as c, RawEvidencePayloadFile as d, RawEvidenceRecordsFile as f, RawEvidenceArchiveManifestNative as i, RawEvidenceExportOptions as l, RawEvidenceArchiveAttempt as n, RawEvidenceBoxDirectoryExport as o, RawEvidenceUnavailable as p, RawEvidenceArchiveManifest as r, RawEvidenceBoxExportOptions as s, NativeStoreHomeCopy as t, RawEvidenceNativeFile as u };
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+ //#region ../../../packages/runtime-contracts/dist/raw-evidence-export.js
3
+ const rawEvidenceArchiveAttemptSchema = z.object({
4
+ executionId: z.string().min(1),
5
+ ordinal: z.number().int().min(1).max(Number.MAX_SAFE_INTEGER),
6
+ providerSessionId: z.string().min(1),
7
+ nativeSessionIds: z.array(z.string().min(1)),
8
+ processIds: z.array(z.string().min(1)),
9
+ outcome: z.enum([
10
+ "succeeded",
11
+ "failed",
12
+ "cancelled",
13
+ "unknown"
14
+ ]),
15
+ missingReasons: z.array(z.string().min(1)),
16
+ launch: z.enum(["not_launched", "unknown"]).optional()
17
+ });
18
+ //#endregion
19
+ export { rawEvidenceArchiveAttemptSchema as t };
package/dist/runtime.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { F as ProfileFileMountPathError, H as ServerError, I as QuotaError, K as TimeoutError, M as NetworkError, N as NotFoundError, O as FileWriteConflictError, P as PartialFailureError, R as SandboxError, S as AuthError, U as StateError, V as SandboxFailureDetail, q as ValidationError, u as ScopedToken, w as CapabilityError, z as SandboxErrorJson } from "./terminal-stream-types-DBQuAsmB.js";
2
- import { $i as SessionExecutionStatus, Bi as CreateSessionOptions, Cn as TerminalStream, Di as SandboxEvent, Fi as CommitTaskSessionOptions, Gi as ListMessagesOptions, Gn as ChunkedUploadResult, Ji as SendSessionMessageRequest, Qi as SessionExecutionInfo, Qn as FileReadBatchResult, Vi as CreateTaskSessionOptions, Wn as ChunkedUploadOptions, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, Zn as FileReadBatchOptions, aa as SessionMessage, ar as FileTreeResult, cr as FileWriteResult, dn as SandboxTerminalCreateOptions, dr as RenameOptions, fa as TaskSessionInfo, fn as SandboxTerminalInfo, ir as FileTreeOptions, la as TaskSessionChanges, ln as SandboxRuntimeHealth, mn as SandboxTerminalRequestOptions, mr as WriteFileOptions, na as SessionInfo, oa as SessionMessageAdmission, on as SandboxPortBinding, or as FileUsageOptions, pn as SandboxTerminalManager, pr as UploadProgress, qi as SendSessionMessageOptions, sr as FileUsageResult, tr as FileRenameResult, ua as TaskSessionCommitResult } from "./types-C8aazs-y.js";
3
- import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-JSGfFeNB.js";
4
- import { t as BrowserInteractiveSessionController } from "./interactive-controller-DaBe9oR5.js";
5
- import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-DkEeNhH6.js";
1
+ import { F as ProfileFileMountPathError, H as ServerError, I as QuotaError, K as TimeoutError, M as NetworkError, N as NotFoundError, O as FileWriteConflictError, P as PartialFailureError, R as SandboxError, S as AuthError, U as StateError, V as SandboxFailureDetail, q as ValidationError, u as ScopedToken, w as CapabilityError, z as SandboxErrorJson } from "./terminal-stream-types-D7dMd-NV.js";
2
+ import { $i as SessionExecutionStatus, Bi as CreateSessionOptions, Cn as TerminalStream, Di as SandboxEvent, Fi as CommitTaskSessionOptions, Gi as ListMessagesOptions, Gn as ChunkedUploadResult, Ji as SendSessionMessageRequest, Qi as SessionExecutionInfo, Qn as FileReadBatchResult, Vi as CreateTaskSessionOptions, Wn as ChunkedUploadOptions, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, Zn as FileReadBatchOptions, aa as SessionMessage, ar as FileTreeResult, cr as FileWriteResult, dn as SandboxTerminalCreateOptions, dr as RenameOptions, fa as TaskSessionInfo, fn as SandboxTerminalInfo, ir as FileTreeOptions, la as TaskSessionChanges, ln as SandboxRuntimeHealth, mn as SandboxTerminalRequestOptions, mr as WriteFileOptions, na as SessionInfo, oa as SessionMessageAdmission, on as SandboxPortBinding, or as FileUsageOptions, pn as SandboxTerminalManager, pr as UploadProgress, qi as SendSessionMessageOptions, sr as FileUsageResult, tr as FileRenameResult, ua as TaskSessionCommitResult } from "./types-ImZuAuFG.js";
3
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-9RauUsHw.js";
4
+ import { t as BrowserInteractiveSessionController } from "./interactive-controller-C2vOFe0u.js";
5
+ import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-DrhA0Z4S.js";
6
6
 
7
7
  //#region src/lib/chunked-upload.d.ts
8
8
  /** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
package/dist/runtime.js CHANGED
@@ -1,7 +1,7 @@
1
- import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-mqraKMkh.js";
2
- import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-CrBx8ETe.js";
1
+ import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-CbWMfA4f.js";
2
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-bap2mKa-.js";
3
3
  import { C as SandboxError, D as TimeoutError, O as ValidationError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, m as FileWriteConflictError, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-DQEu-Q7s.js";
4
- import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-Cm1H_xsv.js";
4
+ import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-C7JAklv7.js";
5
5
  import { s as uploadChunked } from "./chunked-upload-B1kuuezC.js";
6
6
  //#region src/runtime-client.ts
7
7
  function requireToken(token) {
@@ -1,23 +1,23 @@
1
- import { A as requestedPublicProfileDigest, C as runtimeFilesystemPath, D as assertCurrentBackendType, E as applyRequestedModel, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodeTextForWire, U as normalizeEffectiveBackend, _ as mintTraceId, a as assertScopedTokenActive, b as validateAcceptedDispatchRunRef, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as encodePromptForWire, y as resolveDispatchRunIdentity } from "./interactive-controller-mqraKMkh.js";
2
- import { C as boundedIdentifierSchema$1, E as boundedStringSchema$1, g as sha256DigestSchema$1, o as canonicalCandidateDigest$1, s as canonicalCandidateJson$1 } from "./harness-DMaNgn0S.js";
3
- import { t as sha256$1 } from "./sha2-vu4U-x2L.js";
4
- import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-CrBx8ETe.js";
5
- import { a as ProxySecretReceiptSchema$1, r as agentProfileSchema$1 } from "./profile-schema-C1KpT-wS.js";
6
- import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-BJChICex.js";
1
+ import { A as requestedPublicProfileDigest, C as runtimeFilesystemPath, D as assertCurrentBackendType, E as applyRequestedModel, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodeTextForWire, U as normalizeEffectiveBackend, _ as mintTraceId, a as assertScopedTokenActive, b as validateAcceptedDispatchRunRef, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as encodePromptForWire, y as resolveDispatchRunIdentity } from "./interactive-controller-CbWMfA4f.js";
2
+ import { C as boundedIdentifierSchema$1, E as boundedStringSchema$1, g as sha256DigestSchema$1, o as canonicalCandidateDigest$1, s as canonicalCandidateJson$1 } from "./harness-C5lXV9e5.js";
3
+ import { a as ProxySecretReceiptSchema$1, r as agentProfileSchema$1 } from "./profile-schema-C0n0VgmA.js";
4
+ import { t as sha256$1 } from "./sha2-BIoWepwn.js";
5
+ import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-bap2mKa-.js";
6
+ import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-CjKTjmJ9.js";
7
7
  import { C as SandboxError, D as TimeoutError, E as StreamInterruptedError, O as ValidationError, T as StateError, _ as NetworkError, a as readResponseJson, b as ProfileFileMountPathError, c as AuthError, f as EdgeNotReadyError, i as parseResponseError, n as isTransientWrite, o as responseMetadata, r as parseErrorResponse, s as retryWhen, t as TerminalStreamError, u as CapabilityError, v as NotFoundError, w as ServerError } from "./errors-DQEu-Q7s.js";
8
8
  import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-CRxC2dlT.js";
9
9
  import { a as backoffDelayMs, o as isUndelivered, r as abortableSleep } from "./retry-policy-oW3_ljoc.js";
10
- import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request-Cm1H_xsv.js";
10
+ import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request-C7JAklv7.js";
11
11
  import { a as SANDBOX_PROXY_REQUEST_MAX_BYTES, c as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, d as isProfileFileMountOutsideRoots, f as profileFileMountOutsideRootsMessage, l as SANDBOX_AGENT_HOME, o as FILE_OPERATION_LIMITS, u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-DOSTbUSR.js";
12
12
  import { c as awaitSdkResend, l as takeSdkTurn, s as uploadChunked } from "./chunked-upload-B1kuuezC.js";
13
13
  import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-sGVP8skk.js";
14
14
  import { t as SIDECAR_PROXY_ERROR_HEADER } from "./sidecar-proxy-error-DTdbCbUM.js";
15
15
  import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
16
16
  import { t as runPreparedProcess } from "./prepared-process-DQ_68Ofg.js";
17
- import { a as isBackendType, r as cliAuthReferenceSchema } from "./cli-auth-bundle-C6DtK7GX-mBUPER0R.js";
18
- import "./cli-auth-bundle-BLAtE6Dc.js";
17
+ import { a as isBackendType, r as cliAuthReferenceSchema } from "./cli-auth-bundle-C6DtK7GX-DoqlFTT-.js";
18
+ import "./cli-auth-bundle-BinY89CX.js";
19
19
  import { n as SandboxLines } from "./lines-Bsp1TFBM.js";
20
- import { t as downloadFile } from "./file-download-DXgIe-CV.js";
20
+ import { t as downloadFile } from "./file-download-CihyMYH-.js";
21
21
  import { z } from "zod";
22
22
  import { createHash } from "node:crypto";
23
23
  import { constants } from "node:fs";
@@ -27,7 +27,7 @@ import { PART_TEXT, PART_TEXT_SUFFIX, locatePart } from "@tangle-network/agent-c
27
27
  import { readTokenUsage } from "@tangle-network/agent-core";
28
28
  import "@tangle-network/agent-interface/environment-provider";
29
29
  import { OTLP_SPAN_KIND, OTLP_STATUS_CODE, msToUnixNano, otlpTraceExport, toOtlpAttributes, toW3CSpanId, toW3CTraceId } from "@tangle-network/agent-trace-contract/otlp";
30
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.13/node_modules/@tangle-network/agent-interface/dist/environment-interactive-start.js
30
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/environment-interactive-start.js
31
31
  const AgentInteractiveSessionRunCoordinatesSchema = z.strictObject({
32
32
  provider: boundedIdentifierSchema$1,
33
33
  environmentId: boundedIdentifierSchema$1,
@@ -104,7 +104,7 @@ function runCoordinates(run) {
104
104
  };
105
105
  }
106
106
  //#endregion
107
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.13/node_modules/@tangle-network/agent-interface/dist/environment-terminal.js
107
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/environment-terminal.js
108
108
  const terminalDimensionSchema = z.number().int().positive().max(1e4);
109
109
  /**
110
110
  * Provider-neutral handle for one interactive terminal.
@@ -2983,7 +2983,7 @@ var DirectRuntimeHttpClient = class {
2983
2983
  path
2984
2984
  };
2985
2985
  if (!route) throw new NetworkError("Direct runtime route was withdrawn");
2986
- const { fetchDirectHttp2: transport } = (route.useHost || route.useExec) && canUseNodeHttp2() ? await import("./direct-http2-Bgb2lHte.js") : { fetchDirectHttp2: fetchWithKeepAlive };
2986
+ const { fetchDirectHttp2: transport } = (route.useHost || route.useExec) && canUseNodeHttp2() ? await import("./direct-http2-zLxsvF44.js") : { fetchDirectHttp2: fetchWithKeepAlive };
2987
2987
  return fetchSandboxApi({
2988
2988
  baseUrl: route.origin,
2989
2989
  timeoutMs: this.baseClient.timeoutMs,
@@ -8744,64 +8744,71 @@ var SandboxLifecycleCapabilities = class extends SandboxLifecycleEventsCapabilit
8744
8744
  if (diagnostics) local.info.startupDiagnostics = diagnostics;
8745
8745
  }
8746
8746
  async delete(options) {
8747
- if (options?.wait === false && options.until) throw new SandboxError("delete({ wait: false }) cannot also wait until removed", {
8748
- code: "INVALID_OPTIONS",
8749
- status: 400
8750
- });
8751
- options?.signal?.throwIfAborted();
8752
- const path = `/v1/sandboxes/${this.id}?wait=false${options?.until === "removed" ? "&until=removed" : ""}`;
8753
- let retried = false;
8754
- let response;
8755
- try {
8756
- response = await withLifecycleConflictRetry(() => state(this).client.fetch(path, {
8757
- method: "DELETE",
8758
- ...options?.signal ? { signal: options.signal } : {},
8759
- headers: {
8760
- "x-no-retry": "1",
8761
- ...options?.wait === false && options.idempotencyKey ? { "Idempotency-Key": options.idempotencyKey } : {}
8762
- }
8763
- }), options, (error) => {
8764
- const retry = isDeleteRetry(error);
8765
- retried ||= retry;
8766
- return retry;
8767
- });
8768
- } catch (caught) {
8769
- if (!retried || !(caught instanceof NotFoundError)) throw caught;
8747
+ const local = state(this);
8748
+ return deleteSandbox(local.client, this.id, options, (value) => {
8749
+ const diagnostics = normalizeStartupDiagnostics(value);
8750
+ if (diagnostics) local.info.startupDiagnostics = diagnostics;
8770
8751
  sandboxStatusObservedAt.delete(this);
8771
- return options?.wait === false ? SandboxOperation.completed("delete", this.id, { outcome: "already_absent" }) : {
8772
- sandboxId: this.id,
8773
- outcome: "already_absent"
8774
- };
8775
- }
8776
- if (response.status === 202) {
8777
- const operation = new SandboxOperation(parseSandboxOperation((await readResponseJson(response)).operation, {
8778
- kind: "delete",
8779
- sandboxId: this.id
8780
- }), state(this).client, () => {
8781
- sandboxStatusObservedAt.delete(this);
8782
- });
8783
- if (options?.wait === false) return operation;
8784
- const done = await operation.wait(options?.signal ? { signal: options.signal } : {});
8785
- return {
8786
- sandboxId: this.id,
8787
- outcome: done.result?.deleted === true ? "destroyed" : "unknown",
8788
- ...done.result?.removal ? { removal: done.result.removal } : {}
8789
- };
8790
- }
8791
- const data = await response.json().catch(() => null);
8792
- options?.signal?.throwIfAborted();
8793
- const diagnostics = data ? normalizeStartupDiagnostics(data.startupDiagnostics) : null;
8794
- if (diagnostics) state(this).info.startupDiagnostics = diagnostics;
8795
- sandboxStatusObservedAt.delete(this);
8796
- const outcome = data?.outcome === "destroyed" || data?.outcome === "already_absent" ? data.outcome : "unknown";
8797
- const removal = data?.removal === "pending" || data?.removal === "complete" ? data.removal : void 0;
8798
- return options?.wait === false ? SandboxOperation.completed("delete", this.id, { outcome }) : {
8799
- sandboxId: this.id,
8800
- outcome,
8801
- ...removal ? { removal } : {}
8802
- };
8752
+ });
8803
8753
  }
8804
8754
  };
8755
+ /** One deletion path, usable after sandbox metadata has disappeared. */
8756
+ async function deleteSandbox(client, id, options, observe) {
8757
+ if (options?.wait === false && options.until) throw new SandboxError("delete({ wait: false }) cannot also wait until removed", {
8758
+ code: "INVALID_OPTIONS",
8759
+ status: 400
8760
+ });
8761
+ options?.signal?.throwIfAborted();
8762
+ const path = `/v1/sandboxes/${encodeURIComponent(id)}?wait=false${options?.until === "removed" ? "&until=removed" : ""}`;
8763
+ let retried = false;
8764
+ let response;
8765
+ try {
8766
+ response = await withLifecycleConflictRetry(() => client.fetch(path, {
8767
+ method: "DELETE",
8768
+ ...options?.signal ? { signal: options.signal } : {},
8769
+ headers: {
8770
+ "x-no-retry": "1",
8771
+ ...options?.wait === false && options.idempotencyKey ? { "Idempotency-Key": options.idempotencyKey } : {}
8772
+ }
8773
+ }), options, (error) => {
8774
+ const retry = isDeleteRetry(error);
8775
+ retried ||= retry;
8776
+ return retry;
8777
+ });
8778
+ } catch (caught) {
8779
+ if (!retried || !(caught instanceof NotFoundError)) throw caught;
8780
+ observe?.();
8781
+ return options?.wait === false ? SandboxOperation.completed("delete", id, { outcome: "already_absent" }) : {
8782
+ sandboxId: id,
8783
+ outcome: "already_absent"
8784
+ };
8785
+ }
8786
+ if (response.status === 202) {
8787
+ const operation = new SandboxOperation(parseSandboxOperation((await readResponseJson(response)).operation, {
8788
+ kind: "delete",
8789
+ sandboxId: id
8790
+ }), client, () => {
8791
+ observe?.();
8792
+ });
8793
+ if (options?.wait === false) return operation;
8794
+ const done = await operation.wait(options?.signal ? { signal: options.signal } : {});
8795
+ return {
8796
+ sandboxId: id,
8797
+ outcome: done.result?.deleted === true ? "destroyed" : "unknown",
8798
+ ...done.result?.removal ? { removal: done.result.removal } : {}
8799
+ };
8800
+ }
8801
+ const data = await response.json().catch(() => null);
8802
+ options?.signal?.throwIfAborted();
8803
+ observe?.(data?.startupDiagnostics);
8804
+ const outcome = data?.outcome === "destroyed" || data?.outcome === "already_absent" ? data.outcome : "unknown";
8805
+ const removal = data?.removal === "pending" || data?.removal === "complete" ? data.removal : void 0;
8806
+ return options?.wait === false ? SandboxOperation.completed("delete", id, { outcome }) : {
8807
+ sandboxId: id,
8808
+ outcome,
8809
+ ...removal ? { removal } : {}
8810
+ };
8811
+ }
8805
8812
  /**
8806
8813
  * How long a lifecycle call re-attempts a refusal that only asks it to wait:
8807
8814
  * `resume`, `stop` and `delete` share one lease per sandbox, held past a
@@ -12001,7 +12008,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
12001
12008
  var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabilities {
12002
12009
  /** @internal — invoked before the sandbox is deleted. */
12003
12010
  async _sessionExportRawEvidence(id, destination, options) {
12004
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-XEDh0VUj.js");
12011
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-DLNEUdij.js");
12005
12012
  await this.ensureRunning();
12006
12013
  await this.refresh();
12007
12014
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/raw-evidence/archive?${new URLSearchParams([
@@ -12032,7 +12039,7 @@ var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabil
12032
12039
  * and the byte and file bounds are verified before the directory appears.
12033
12040
  */
12034
12041
  async exportRawEvidence(destination, options) {
12035
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-XEDh0VUj.js");
12042
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-DLNEUdij.js");
12036
12043
  await this.ensureRunning();
12037
12044
  await this.refresh();
12038
12045
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/raw-evidence/archive?${new URLSearchParams({
@@ -14121,7 +14128,7 @@ var SandboxFilesystemOperations = class extends DeclaredFilesystemOperations {
14121
14128
  totalBytes: size,
14122
14129
  percentage: 0
14123
14130
  });
14124
- const { uploadChunkedFromFile } = await import("./chunked-upload-file-JfRw6PRf.js");
14131
+ const { uploadChunkedFromFile } = await import("./chunked-upload-file-DtAW52iW.js");
14125
14132
  await uploadChunkedFromFile({ fetch: (path, init) => this.host.runtimeFetch(path, init) }, remotePath, localPath, {
14126
14133
  mode: options?.permissions,
14127
14134
  onProgress: options?.onProgress ? (progress) => {
@@ -15028,4 +15035,4 @@ var SandboxInstance = class SandboxInstance extends SandboxEgressCapabilities {
15028
15035
  }
15029
15036
  };
15030
15037
  //#endregion
15031
- export { isRateLimitCreateError as $, ProfileUnsupportedError as A, normalizeConnection as B, SandboxOperationFailedError as C, validateDeferredProfileFileMounts as D, splitInlineProfileSkills as E, normalizeSandboxCreateReceipt as F, CAPACITY_ETA_WAIT_MAX_MS as G, normalizeProxySecretReceipt as H, normalizeStartupDiagnostics as I, createRetryDelayMs as J, DEPLOY_WINDOW_RETRY_MS as K, readFilesystemIncarnationTuple as L, isMaterializerHarness as M, materializeProfile as N, isRetryableProfileFileMaterializeFailure as O, normalizeCaptureProof as P, isDeployWindowCreateError as Q, dateOf as R, SandboxOperation as S, splitInlineProfileFileMounts as T, normalizeSandboxShape as U, normalizeEgressPolicyFields as V, CAPACITY_ETA_MARGIN_MS as W, generateIdempotencyKey as X, extendableDeadline as Y, isCapacityShortageCreateError as Z, collectAgentFinalMessageText as _, buildTraceExportPayload as a, isToolBearingEvent as b, toOtelJson as c, sandboxLedgerUsd as d, isRetryableCreateError as et, InteractiveSessionHandle as f, applySandboxEventText as g, createInteractiveTerminalSession as h, MAX_EGRESS_DENIALS_LIMIT as i, enforceWorkspacePlanSupport as j, HARNESS_LAUNCH_MATERIALIZE_OPTIONS as k, SandboxTaskSession as l, createInteractiveTerminalCapture as m, createSandboxInstanceFromResponse as n, exportTraceBundle as o, InteractiveTerminalFrameLog as p, awaitCreateResend as q, WorkspaceImages as r, otelTraceIdForTangleTrace as s, SandboxInstance as t, SandboxSession as u, collectAgentResponseText as v, materializeProfileFileMounts as w, ManagedProcessClient as x, getSandboxEventText as y, parseLifecycleTimes as z };
15038
+ export { isDeployWindowCreateError as $, HARNESS_LAUNCH_MATERIALIZE_OPTIONS as A, parseLifecycleTimes as B, SandboxOperation as C, splitInlineProfileSkills as D, splitInlineProfileFileMounts as E, normalizeCaptureProof as F, CAPACITY_ETA_MARGIN_MS as G, normalizeEgressPolicyFields as H, normalizeSandboxCreateReceipt as I, awaitCreateResend as J, CAPACITY_ETA_WAIT_MAX_MS as K, normalizeStartupDiagnostics as L, enforceWorkspacePlanSupport as M, isMaterializerHarness as N, validateDeferredProfileFileMounts as O, materializeProfile as P, isCapacityShortageCreateError as Q, readFilesystemIncarnationTuple as R, ManagedProcessClient as S, materializeProfileFileMounts as T, normalizeProxySecretReceipt as U, normalizeConnection as V, normalizeSandboxShape as W, extendableDeadline as X, createRetryDelayMs as Y, generateIdempotencyKey as Z, collectAgentFinalMessageText as _, buildTraceExportPayload as a, isToolBearingEvent as b, toOtelJson as c, sandboxLedgerUsd as d, isRateLimitCreateError as et, InteractiveSessionHandle as f, applySandboxEventText as g, createInteractiveTerminalSession as h, MAX_EGRESS_DENIALS_LIMIT as i, ProfileUnsupportedError as j, isRetryableProfileFileMaterializeFailure as k, SandboxTaskSession as l, createInteractiveTerminalCapture as m, createSandboxInstanceFromResponse as n, exportTraceBundle as o, InteractiveTerminalFrameLog as p, DEPLOY_WINDOW_RETRY_MS as q, WorkspaceImages as r, otelTraceIdForTangleTrace as s, SandboxInstance as t, isRetryableCreateError as tt, SandboxSession as u, collectAgentResponseText as v, SandboxOperationFailedError as w, deleteSandbox as x, getSandboxEventText as y, dateOf as z };
@@ -1,9 +1,9 @@
1
- import { r as agentProfileSchema } from "./profile-schema-C1KpT-wS.js";
2
- import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-BJChICex.js";
1
+ import { r as agentProfileSchema } from "./profile-schema-C0n0VgmA.js";
2
+ import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-CjKTjmJ9.js";
3
3
  import { C as SandboxError, O as ValidationError, u as CapabilityError } from "./errors-DQEu-Q7s.js";
4
4
  import { t as awaitWithAbort } from "./abort-signal-CRxC2dlT.js";
5
- import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-C6DtK7GX-mBUPER0R.js";
6
- import "./cli-auth-bundle-BLAtE6Dc.js";
5
+ import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-C6DtK7GX-DoqlFTT-.js";
6
+ import "./cli-auth-bundle-BinY89CX.js";
7
7
  import { z } from "zod";
8
8
  //#region ../../../packages/runtime-contracts/dist/seat-selection.js
9
9
  /**