@tangle-network/sandbox 1.0.236 → 1.0.238
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +5 -5
- package/dist/agent/preview.d.ts +1 -1
- package/dist/agent/preview.js +2 -2
- package/dist/{agent-execution-preparation-BJChICex.js → agent-execution-preparation-CjKTjmJ9.js} +3 -3
- package/dist/{agent-execution-preparation-receipt-BIFxqyr5.js → agent-execution-preparation-receipt-AihkqLnd.js} +4 -4
- package/dist/{agent-run-outcome-CEf6hJYp.d.ts → agent-run-outcome-DrhA0Z4S.d.ts} +2 -2
- package/dist/{api-request-DXF7sotx.js → api-request-wjUrfDvm.js} +1 -1
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +2 -2
- package/dist/{browser-interactive-control-controller-CcUjQEfa.d.ts → browser-interactive-control-controller-9RauUsHw.d.ts} +1 -1
- package/dist/{browser-interactive-control-controller-DL5Cz1_6.js → browser-interactive-control-controller-BDVXcCnz.js} +14 -14
- package/dist/{chunked-upload-BlvgxPWx.js → chunked-upload-B1kuuezC.js} +1 -1
- package/dist/{chunked-upload-file-DOeLpMO0.js → chunked-upload-file-DtAW52iW.js} +1 -1
- package/dist/cli-auth-bundle-BinY89CX.js +2 -0
- package/dist/{cli-auth-bundle-C6DtK7GX-mBUPER0R.js → cli-auth-bundle-C6DtK7GX-DoqlFTT-.js} +1 -1
- package/dist/{client-OYkwBKG2.d.ts → client-DsXWyLrM.d.ts} +79 -114
- package/dist/{client-BiKIhMtW.js → client-eoEoMzDD.js} +20 -117
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-CpKTrw6R.js → collaboration-jvzPekSe.js} +2 -2
- package/dist/core.d.ts +7 -7
- package/dist/core.js +6 -6
- package/dist/{errors-nXGKGVFe.js → errors-DQEu-Q7s.js} +20 -21
- package/dist/{file-download-BjkrYzy_.js → file-download-CihyMYH-.js} +2 -2
- package/dist/{harness-DMaNgn0S.js → harness-C5lXV9e5.js} +5 -5
- package/dist/{index-C8YpXh5N.d.ts → index-B_1aVs2B.d.ts} +14 -88
- package/dist/index.d.ts +13 -12
- package/dist/index.js +13 -13
- package/dist/intelligence/index.d.ts +13 -6
- package/dist/intelligence/index.js +61 -9
- package/dist/interactive-control.d.ts +1 -1
- package/dist/interactive-control.js +1 -1
- package/dist/{interactive-controller-CJ7BBRpv.d.ts → interactive-controller-C2vOFe0u.d.ts} +3 -3
- package/dist/{interactive-controller-Blf5CLeI.js → interactive-controller-CDqa41yU.js} +7 -7
- package/dist/{lines-CSGBHEjR.js → lines-Bsp1TFBM.js} +1 -1
- package/dist/{lines-CCJZUrBP.d.ts → lines-CxWFuuJ3.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/lines.js +1 -1
- package/dist/{local-cli-auth-CO0byocv.js → local-cli-auth-DrNihS9-.js} +1 -1
- package/dist/{mcp-local-oIc-ZtHF.js → mcp-local-CbzPG05W.js} +2 -2
- package/dist/{preview-zpWYtsDJ.d.ts → preview-DFFaAZdF.d.ts} +3 -3
- package/dist/{profile-schema-C1KpT-wS.js → profile-schema-C0n0VgmA.js} +468 -36
- package/dist/{public-templates-DCFFPDEB.d.ts → public-templates-xqtPv6pg.d.ts} +2 -2
- package/dist/public-templates.d.ts +1 -1
- package/dist/public-templates.js +1 -1
- package/dist/{raw-evidence-archive-Cz4j8VMw.js → raw-evidence-archive-DLNEUdij.js} +3 -15
- package/dist/raw-evidence-export-C0ieFpi2.d.ts +354 -0
- package/dist/raw-evidence-export-C6Xdl3nC.js +19 -0
- package/dist/runtime.d.ts +5 -5
- package/dist/runtime.js +5 -5
- package/dist/{sandbox-C1Ffpg9v.js → sandbox-nYoBbiu1.js} +116 -155
- package/dist/{select-seat-B4Y-7vIq.js → select-seat-BHHUFoKh.js} +5 -5
- package/dist/select-seat-command.d.ts +2 -2
- package/dist/select-seat-command.js +2 -2
- package/dist/session-gateway/index.js +1 -1
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CL6wrVuO.js → tangle-BaGQdAZk.js} +3 -3
- package/dist/{terminal-stream-types-eE97lZ-5.d.ts → terminal-stream-types-D7dMd-NV.d.ts} +40 -26
- package/dist/{types-B5GAxo6l.d.ts → types-ImZuAuFG.d.ts} +299 -1521
- package/package.json +7 -7
- package/dist/cli-auth-bundle-BLAtE6Dc.js +0 -2
- /package/dist/{cli-auth-bundle-B91fSxkR.d.ts → cli-auth-bundle-eUl7Sa1x.d.ts} +0 -0
- /package/dist/{direct-http2-Bgb2lHte.js → direct-http2-zLxsvF44.js} +0 -0
- /package/dist/{index-o31uwAkX.d.ts → index-BTXyTVq4.d.ts} +0 -0
- /package/dist/{index-C-_HY5NY.d.ts → index-ClusTWYM.d.ts} +0 -0
- /package/dist/{sha2-vu4U-x2L.js → sha2-BIoWepwn.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { n as verifyDownload } from "./file-download-
|
|
1
|
+
import { n as verifyDownload } from "./file-download-CihyMYH-.js";
|
|
2
2
|
import { t as runPreparedEvidence } from "./prepared-evidence-ibAysmX8.js";
|
|
3
|
+
import { t as rawEvidenceArchiveAttemptSchema } from "./raw-evidence-export-C6Xdl3nC.js";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
//#region src/lib/raw-evidence-archive.ts
|
|
5
6
|
const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/).transform((value) => `sha256:${value.slice(7)}`);
|
|
@@ -165,20 +166,7 @@ const manifestBase = z.object({
|
|
|
165
166
|
}),
|
|
166
167
|
frames: records
|
|
167
168
|
})),
|
|
168
|
-
attempts: z.array(
|
|
169
|
-
executionId: text,
|
|
170
|
-
ordinal: count.min(1),
|
|
171
|
-
providerSessionId: text,
|
|
172
|
-
nativeSessionIds: z.array(text),
|
|
173
|
-
processIds: z.array(text),
|
|
174
|
-
outcome: z.enum([
|
|
175
|
-
"succeeded",
|
|
176
|
-
"failed",
|
|
177
|
-
"cancelled",
|
|
178
|
-
"unknown"
|
|
179
|
-
]),
|
|
180
|
-
missingReasons: z.array(text)
|
|
181
|
-
})),
|
|
169
|
+
attempts: z.array(rawEvidenceArchiveAttemptSchema),
|
|
182
170
|
evidenceSources: z.array(z.object({
|
|
183
171
|
executionId: text,
|
|
184
172
|
sourceId: text,
|
|
@@ -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 {
|
|
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-
|
|
3
|
-
import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-
|
|
4
|
-
import { t as BrowserInteractiveSessionController } from "./interactive-controller-
|
|
5
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
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,8 +1,8 @@
|
|
|
1
|
-
import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-
|
|
2
|
-
import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-
|
|
3
|
-
import { C as
|
|
4
|
-
import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-
|
|
5
|
-
import { s as uploadChunked } from "./chunked-upload-
|
|
1
|
+
import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-CDqa41yU.js";
|
|
2
|
+
import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-BDVXcCnz.js";
|
|
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-wjUrfDvm.js";
|
|
5
|
+
import { s as uploadChunked } from "./chunked-upload-B1kuuezC.js";
|
|
6
6
|
//#region src/runtime-client.ts
|
|
7
7
|
function requireToken(token) {
|
|
8
8
|
const value = token.trim();
|