@tangle-network/agent-runtime 0.295.4 → 0.296.0

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 (65) hide show
  1. package/dist/{activation-b7b_lmhE.js → activation-Bsa9KIms.js} +3 -3
  2. package/dist/{activation-b7b_lmhE.js.map → activation-Bsa9KIms.js.map} +1 -1
  3. package/dist/{activation-DZMqUGrJ.d.ts → activation-rMt8OhcX.d.ts} +3 -3
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{bundle-CDR0caM4.js → bundle-C9v5TH_H.js} +2 -2
  7. package/dist/{bundle-CDR0caM4.js.map → bundle-C9v5TH_H.js.map} +1 -1
  8. package/dist/candidate-execution/index.js +5 -5
  9. package/dist/{coordination-driver-IBnJrG35.js → coordination-driver-BTwCdKrl.js} +2 -2
  10. package/dist/{coordination-driver-IBnJrG35.js.map → coordination-driver-BTwCdKrl.js.map} +1 -1
  11. package/dist/{delegate-D3_pGiGW.js → delegate-CXkgU67D.js} +2 -2
  12. package/dist/{delegate-D3_pGiGW.js.map → delegate-CXkgU67D.js.map} +1 -1
  13. package/dist/durable.d.ts +2 -2
  14. package/dist/durable.js +3 -3
  15. package/dist/{graph-BbsdhFNv.js → graph-CqKrLWkl.js} +4 -4
  16. package/dist/{graph-BbsdhFNv.js.map → graph-CqKrLWkl.js.map} +1 -1
  17. package/dist/{improvement-cycle-C2IuQaRp.js → improvement-cycle-7rd18eW9.js} +6 -6
  18. package/dist/{improvement-cycle-C2IuQaRp.js.map → improvement-cycle-7rd18eW9.js.map} +1 -1
  19. package/dist/{index-D5p4txpC.d.ts → index-3GzNNtI9.d.ts} +4 -4
  20. package/dist/index.d.ts +6 -6
  21. package/dist/index.js +9 -9
  22. package/dist/intelligence.d.ts +3 -3
  23. package/dist/intelligence.js +8 -8
  24. package/dist/kernel.d.ts +4 -4
  25. package/dist/kernel.js +9 -9
  26. package/dist/{loop-runner-bin-CIxUa3W_.d.ts → loop-runner-bin-BjRHJLW9.d.ts} +3 -3
  27. package/dist/{loop-runner-bin-DTCYtNxx.js → loop-runner-bin-CmduY4JY.js} +3 -3
  28. package/dist/{loop-runner-bin-DTCYtNxx.js.map → loop-runner-bin-CmduY4JY.js.map} +1 -1
  29. package/dist/loop-runner-bin.d.ts +1 -1
  30. package/dist/loop-runner-bin.js +1 -1
  31. package/dist/mcp/bin.js +3 -3
  32. package/dist/mcp/index.d.ts +5 -5
  33. package/dist/mcp/index.js +4 -4
  34. package/dist/{openai-tools-Dlws03EW.d.ts → openai-tools-CrfETZkV.d.ts} +2 -2
  35. package/dist/{prepare-Dzkj4AGj.js → prepare-CGVNMb1o.js} +3 -3
  36. package/dist/{prepare-Dzkj4AGj.js.map → prepare-CGVNMb1o.js.map} +1 -1
  37. package/dist/{profile-BubsrYhR.js → profile-BetOB4_Q.js} +2 -2
  38. package/dist/{profile-BubsrYhR.js.map → profile-BetOB4_Q.js.map} +1 -1
  39. package/dist/profiles.d.ts +2 -2
  40. package/dist/{protected-model-port-_Daje74V.js → protected-model-port-CuVHkhti.js} +4 -4
  41. package/dist/{protected-model-port-_Daje74V.js.map → protected-model-port-CuVHkhti.js.map} +1 -1
  42. package/dist/{provision-supervisor-DRl8doHG.js → provision-supervisor-B-7DnLBR.js} +3 -3
  43. package/dist/{provision-supervisor-DRl8doHG.js.map → provision-supervisor-B-7DnLBR.js.map} +1 -1
  44. package/dist/{runtime-Bgf9mm__.js → runtime-DicgLBWl.js} +9 -9
  45. package/dist/{runtime-Bgf9mm__.js.map → runtime-DicgLBWl.js.map} +1 -1
  46. package/dist/{search-method-D3WdgmuN.js → search-method-CLfmCMeT.js} +3 -3
  47. package/dist/{search-method-D3WdgmuN.js.map → search-method-CLfmCMeT.js.map} +1 -1
  48. package/dist/{server-B3nNSFlK.js → server-DHHeobZh.js} +3 -3
  49. package/dist/{server-B3nNSFlK.js.map → server-DHHeobZh.js.map} +1 -1
  50. package/dist/{stream-agent-turn-D6lDcAYs.d.ts → stream-agent-turn-LDA8JK7E.d.ts} +5 -178
  51. package/dist/{substrate-VEJrCLxe.d.ts → substrate-Bd4FFbim.d.ts} +2 -2
  52. package/dist/{supervise-D5yxnDzD.js → supervise-B5r5oZZ1.js} +4 -4
  53. package/dist/{supervise-D5yxnDzD.js.map → supervise-B5r5oZZ1.js.map} +1 -1
  54. package/dist/{supervisor-B1jEhBXU.js → supervisor-Rov7xW0j.js} +339 -53
  55. package/dist/supervisor-Rov7xW0j.js.map +1 -0
  56. package/dist/testing.d.ts +2 -2
  57. package/dist/testing.js +14 -14
  58. package/dist/tui/index.d.ts +1 -1
  59. package/dist/tui/index.js +1 -1
  60. package/dist/{types-C2MBdgd_.d.ts → types-CwGpKzG1.d.ts} +285 -9
  61. package/dist/{workspace-streams-D4TMTrJV.js → workspace-streams-D5gHJdTb.js} +78 -60
  62. package/dist/workspace-streams-D5gHJdTb.js.map +1 -0
  63. package/package.json +1 -1
  64. package/dist/supervisor-B1jEhBXU.js.map +0 -1
  65. package/dist/workspace-streams-D4TMTrJV.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { c as RetainedInteractiveAdmissionError, d as RetainedRunDispatchBindingError, f as RuntimeRunStateError, i as ConfigError, l as RetainedInteractiveBindingError, m as ValidationError$1, r as BackendTransportError, t as AgentEvalError$1, u as RetainedRunAdmissionError } from "./errors-DodWX-cb.js";
2
2
  import { runTaskQueue } from "./task-queue.js";
3
3
  import { _ as agentHarness, a as concreteProfileModel, c as profileModelExecutionSettings, d as assertRouterAutoDeclaration, f as assertRouterAutoResponse, g as observedModelMatchesDeclared, h as observedModelHasSnapshot, l as profileProviderModel, m as mergeObservedModelIdentity, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile, u as resolveRouterRetryPolicy } from "./model-policy-DydyWTQg.js";
4
- import { T as verifyWorkspaceSnapshotArtifacts, r as verifyAgentCandidateWorkspaceArtifacts, s as verifyAgentCandidateWorkspaceArchive } from "./workspace-streams-D4TMTrJV.js";
4
+ import { D as verifiedArtifactChunks, E as verifyWorkspaceSnapshotArtifacts, c as verifyAgentCandidateWorkspaceArchive, i as verifyAgentCandidateWorkspaceArtifacts, j as deepFreezeCandidate, r as readAgentCandidateWorkspaceArtifactFiles } from "./workspace-streams-D5gHJdTb.js";
5
5
  import { n as assertNoSymlinkDescendant, r as publishExclusiveDurableFile } from "./durable-file-DWQA4ooo.js";
6
6
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
7
- import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentEnvironmentCapabilitiesSchema, AgentExactRunControlRefSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentNativeContextContinuationResultSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, AgentTurnInputSchema, AgentTurnResultSchema, CanonicalStreamEventSchema, ContextTransferRequestSchema, InteractionAcknowledgementSchema, InteractionResponseCommandSchema, NativeContextBoundaryProofSchema, NativeContextContinuationRequestSchema, REASONING_EFFORTS, RuntimeEventEnvelopeSchema, TerminalReplayWindowSchema, TerminalSessionRefSchema, agentCandidateWorkspaceSnapshotEvidenceSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentNativeContextContinuationResultMatchesRequest, agentProfileSchema, agentRunCancellationAcknowledgementMatchesRequest, agentRunCancellationRequestDigest, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalWorkspaceCwd, exactAgentInteractiveSessionStart, harnessTypeSchema, nativeContextContinuationTurnDigest, nativeReasoningControl, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sha256DigestSchema, workspaceCheckpointRequestDigest, workspaceCheckpointResultMatchesRequest, workspaceCleanupAcknowledgementMatches, workspaceCleanupRequestDigest } from "@tangle-network/agent-interface";
7
+ import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentEnvironmentCapabilitiesSchema, AgentExactRunControlRefSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentNativeContextContinuationResultSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, AgentTurnInputSchema, AgentTurnResultSchema, CanonicalStreamEventSchema, ContextTransferRequestSchema, InteractionAcknowledgementSchema, InteractionResponseCommandSchema, NativeContextBoundaryProofSchema, NativeContextContinuationRequestSchema, REASONING_EFFORTS, RuntimeEventEnvelopeSchema, TerminalReplayWindowSchema, TerminalSessionRefSchema, agentCandidateArtifactRefSchema, agentCandidateWorkspaceManifestMaterialSchema, agentCandidateWorkspaceSnapshotEvidenceSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentNativeContextContinuationResultMatchesRequest, agentProfileSchema, agentRunCancellationAcknowledgementMatchesRequest, agentRunCancellationRequestDigest, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalWorkspaceCwd, exactAgentInteractiveSessionStart, harnessTypeSchema, nativeContextContinuationTurnDigest, nativeReasoningControl, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sha256DigestSchema, workspaceCheckpointRequestDigest, workspaceCheckpointResultMatchesRequest, workspaceCleanupAcknowledgementMatches, workspaceCleanupRequestDigest } from "@tangle-network/agent-interface";
8
8
  import { estimateCost, isModelPriced, isToolSpan, toolSpansToTraceAnalysisStore } from "@tangle-network/agent-eval";
9
9
  import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
10
10
  import { createHash, randomBytes, randomUUID } from "node:crypto";
@@ -17,8 +17,8 @@ import { homedir, hostname, tmpdir } from "node:os";
17
17
  import { stripVTControlCharacters } from "node:util";
18
18
  import { ATTR, deriveHexId, isW3CSpanId, isW3CTraceId } from "@tangle-network/agent-trace-contract";
19
19
  import { REDACTION_VERSION as REDACTION_VERSION$1, redact } from "@tangle-network/agent-eval/traces";
20
- import { Readable } from "node:stream";
21
20
  import { z } from "zod";
21
+ import { Readable } from "node:stream";
22
22
  import { SDKError, generateIdempotencyKey, withRetry } from "@tangle-network/agent-core";
23
23
  import { collectAgentFinalMessageText, collectAgentResponseText } from "@tangle-network/sandbox";
24
24
  import { request } from "node:http";
@@ -6091,39 +6091,277 @@ function stableStringify(value) {
6091
6091
  return `{${Object.entries(value).filter(([, v]) => v !== void 0).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([k, v]) => `${JSON.stringify(k)}:${stableStringify(v)}`).join(",")}}`;
6092
6092
  }
6093
6093
  //#endregion
6094
+ //#region src/runtime/retained-harness-transcript.ts
6095
+ const digest = z.custom((value) => typeof value === "string" && /^sha256:[0-9a-f]{64}$/.test(value));
6096
+ const count = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
6097
+ const text = z.string().min(1);
6098
+ const node = z.custom((value) => {
6099
+ if (value === null || typeof value !== "object") return false;
6100
+ return [
6101
+ "rootId",
6102
+ "parentId",
6103
+ "nodeId",
6104
+ "attemptId"
6105
+ ].every((key) => typeof Reflect.get(value, key) === "string");
6106
+ });
6107
+ const sourceSchema = z.object({
6108
+ executionId: text,
6109
+ controlRef: AgentExactRunControlRefSchema.optional(),
6110
+ node: node.optional(),
6111
+ environmentId: text,
6112
+ profileDigest: digest,
6113
+ providerSessionId: text.nullable(),
6114
+ nativeSessionId: text.nullable(),
6115
+ coverageComplete: z.boolean(),
6116
+ incompleteReason: z.string().optional()
6117
+ });
6118
+ const attributionSchema = z.object({
6119
+ providerSessionId: text,
6120
+ sourceId: text.optional(),
6121
+ rootScope: z.enum(["session-home", "workspace-session"]),
6122
+ nativePath: text
6123
+ });
6124
+ const fileSchema = z.object({
6125
+ path: text,
6126
+ bytes: count,
6127
+ sha256: digest,
6128
+ attribution: attributionSchema
6129
+ });
6130
+ const skippedSchema = z.object({
6131
+ path: text,
6132
+ reason: text
6133
+ });
6134
+ const retainedSchema = z.object({
6135
+ kind: z.literal("retained-harness-transcript"),
6136
+ schemaVersion: z.literal(1),
6137
+ harness: text,
6138
+ source: sourceSchema,
6139
+ provider: z.string().optional(),
6140
+ capturedAt: z.string().optional(),
6141
+ snapshot: z.object({
6142
+ kind: z.literal("agent-candidate-workspace-snapshot"),
6143
+ digest,
6144
+ manifest: agentCandidateArtifactRefSchema,
6145
+ archive: agentCandidateArtifactRefSchema
6146
+ }),
6147
+ files: z.array(fileSchema),
6148
+ skipped: z.array(skippedSchema),
6149
+ missing: z.array(z.string())
6150
+ });
6151
+ const defaults = {
6152
+ maxFileBytes: 2 * 1024 * 1024,
6153
+ maxTotalBytes: 16 * 1024 * 1024,
6154
+ maxFiles: 1e3,
6155
+ maxManifestBytes: 16 * 1024 * 1024
6156
+ };
6157
+ /** Validate persisted descriptors before trusting their identity, locators, or inventory. */
6158
+ function parseRetainedHarnessTranscript(value) {
6159
+ const parsed = retainedSchema.safeParse(value);
6160
+ if (!parsed.success) throw new ValidationError$1(`Invalid retained harness transcript: ${parsed.error.message}`);
6161
+ const paths = /* @__PURE__ */ new Set();
6162
+ for (const file of parsed.data.files) {
6163
+ if (paths.has(file.path)) throw new ValidationError$1(`Retained transcript repeats native identity: ${file.path}`);
6164
+ paths.add(file.path);
6165
+ if (file.path !== nativeIdentity(file.attribution)) throw new ValidationError$1(`Retained transcript native identity does not match its attribution: ${file.path}`);
6166
+ }
6167
+ return deepFreezeCandidate(parsed.data);
6168
+ }
6169
+ function nativeIdentity(attribution) {
6170
+ return [
6171
+ attribution.providerSessionId,
6172
+ attribution.sourceId ?? "",
6173
+ attribution.rootScope
6174
+ ].map(encodeURIComponent).join("/") + "/" + attribution.nativePath;
6175
+ }
6176
+ /** Describe already-verified retention, without reading the environment or copying archive bytes. */
6177
+ function retainHarnessTranscript(receipt, harness) {
6178
+ try {
6179
+ return retainedCapture(receipt, harness);
6180
+ } catch (error) {
6181
+ if (error instanceof ValidationError$1) throw error;
6182
+ throw new ValidationError$1(`Invalid retained transcript receipt: ${error instanceof Error ? error.message : String(error)}`);
6183
+ }
6184
+ }
6185
+ function retainedCapture(receipt, harness) {
6186
+ const { snapshot, provenance, ...source } = receipt;
6187
+ const files = [];
6188
+ const skipped = [];
6189
+ const missing = [...provenance.missing];
6190
+ for (const session of provenance.sessions ?? []) {
6191
+ if (session.executionId !== receipt.executionId || session.backendType !== harness) throw new ValidationError$1("Retained transcript session has a different execution or harness");
6192
+ if (!session.nativeStore) {
6193
+ missing.push(`Session ${session.id} native inventory unavailable`);
6194
+ continue;
6195
+ }
6196
+ if (!session.nativeStore.complete) missing.push(`Session ${session.id} native inventory incomplete`);
6197
+ for (const entry of session.nativeStore.entries) {
6198
+ if (entry.kind !== "file") continue;
6199
+ const attribution = {
6200
+ providerSessionId: session.id,
6201
+ ...entry.sourceId === void 0 ? {} : { sourceId: entry.sourceId },
6202
+ rootScope: entry.rootScope,
6203
+ nativePath: entry.path
6204
+ };
6205
+ const parsed = fileSchema.safeParse({
6206
+ path: nativeIdentity(attribution),
6207
+ bytes: entry.sizeBytes,
6208
+ sha256: entry.sha256,
6209
+ attribution
6210
+ });
6211
+ if (parsed.success) files.push(parsed.data);
6212
+ else {
6213
+ const reason = `Native inventory cannot identify verified bytes: ${parsed.error.message}`;
6214
+ skipped.push({
6215
+ path: nativeIdentity(attribution),
6216
+ reason
6217
+ });
6218
+ missing.push(`${nativeIdentity(attribution)}: ${reason}`);
6219
+ }
6220
+ }
6221
+ for (const entry of session.nativeStore.excludedPaths) skipped.push({
6222
+ path: nativeIdentity({
6223
+ providerSessionId: session.id,
6224
+ ...entry.sourceId === void 0 ? {} : { sourceId: entry.sourceId },
6225
+ rootScope: entry.rootScope,
6226
+ nativePath: entry.path
6227
+ }),
6228
+ reason: entry.reason
6229
+ });
6230
+ }
6231
+ if (files.length === 0) missing.push("No native files declared by provider capture");
6232
+ const descriptor = parseRetainedHarnessTranscript({
6233
+ kind: "retained-harness-transcript",
6234
+ schemaVersion: 1,
6235
+ harness,
6236
+ source,
6237
+ ...provenance.provider === void 0 ? {} : { provider: provenance.provider },
6238
+ ...provenance.capturedAt === void 0 ? {} : { capturedAt: provenance.capturedAt },
6239
+ snapshot: {
6240
+ kind: snapshot.kind,
6241
+ digest: snapshot.digest,
6242
+ manifest: snapshot.manifest,
6243
+ archive: snapshot.archive
6244
+ },
6245
+ files,
6246
+ skipped,
6247
+ missing
6248
+ });
6249
+ if (files.length === 0) return deepFreezeCandidate({
6250
+ status: "unavailable",
6251
+ reason: source.coverageComplete && skipped.length === 0 ? "no-transcript" : "nothing-carried",
6252
+ skipped: [...skipped, ...missing.map((reason) => ({
6253
+ path: receipt.executionId,
6254
+ reason
6255
+ }))]
6256
+ });
6257
+ return deepFreezeCandidate({
6258
+ status: "retained",
6259
+ descriptor,
6260
+ fileCount: files.length,
6261
+ totalBytes: files.reduce((sum, file) => sum + file.bytes, 0),
6262
+ skippedCount: skipped.length
6263
+ });
6264
+ }
6265
+ async function resolveHarnessTranscriptCapture(capture, options = {}) {
6266
+ if (capture.status === "unavailable") return void 0;
6267
+ if (capture.status === "captured") {
6268
+ for (const file of capture.artifact.files) if (Buffer.byteLength(file.content, "utf8") !== file.bytes) throw new ValidationError$1(`Transcript file has an invalid byte count: ${file.path}`);
6269
+ if (options.content !== false) return capture.artifact;
6270
+ return {
6271
+ ...capture.artifact,
6272
+ files: capture.artifact.files.map(({ path, bytes, content }) => ({
6273
+ path,
6274
+ bytes,
6275
+ sha256: `sha256:${createHash("sha256").update(content).digest("hex")}`
6276
+ }))
6277
+ };
6278
+ }
6279
+ const descriptor = parseRetainedHarnessTranscript(capture.descriptor);
6280
+ if (options.content === false) {
6281
+ const { snapshot: _snapshot, kind: _kind, ...metadata } = descriptor;
6282
+ return metadata;
6283
+ }
6284
+ if (!options.artifacts) throw new ValidationError$1("Retained transcript content requires an ArtifactPort");
6285
+ const limits = {
6286
+ ...defaults,
6287
+ ...options.limits
6288
+ };
6289
+ for (const [name, value] of Object.entries(limits)) if (!Number.isSafeInteger(value) || value < 0) throw new ValidationError$1(`Invalid transcript read limit: ${name}`);
6290
+ if (descriptor.snapshot.manifest.byteLength > limits.maxManifestBytes) throw new ValidationError$1("Retained transcript manifest exceeds maxManifestBytes");
6291
+ const manifestChunks = [];
6292
+ for await (const chunk of verifiedArtifactChunks(descriptor.snapshot.manifest, options.artifacts, options.signal)) manifestChunks.push(Uint8Array.from(chunk));
6293
+ const material = agentCandidateWorkspaceManifestMaterialSchema.parse(JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(Buffer.concat(manifestChunks))));
6294
+ const snapshot = {
6295
+ ...descriptor.snapshot,
6296
+ material
6297
+ };
6298
+ const byContent = /* @__PURE__ */ new Map();
6299
+ for (const file of material.files) byContent.set(`${file.sha256}:${file.byteLength}`, file.path);
6300
+ const selected = [];
6301
+ const skipped = [...descriptor.skipped];
6302
+ let total = 0;
6303
+ for (const file of descriptor.files) {
6304
+ const archivePath = byContent.get(`${file.sha256}:${file.bytes}`);
6305
+ if (archivePath === void 0) throw new ValidationError$1(`Retained native file is missing from archive: ${file.path}`);
6306
+ const reason = file.bytes > limits.maxFileBytes ? "read-limit:maxFileBytes" : selected.length >= limits.maxFiles ? "read-limit:maxFiles" : total + file.bytes > limits.maxTotalBytes ? "read-limit:maxTotalBytes" : void 0;
6307
+ if (reason) skipped.push({
6308
+ path: file.path,
6309
+ reason
6310
+ });
6311
+ else {
6312
+ selected.push({
6313
+ file,
6314
+ archivePath
6315
+ });
6316
+ total += file.bytes;
6317
+ }
6318
+ }
6319
+ const contents = await readAgentCandidateWorkspaceArtifactFiles({
6320
+ role: "candidate",
6321
+ snapshot,
6322
+ artifacts: options.artifacts,
6323
+ paths: [...new Set(selected.map(({ archivePath }) => archivePath))],
6324
+ maxReadBytes: limits.maxTotalBytes,
6325
+ ...options.workspaceLimits === void 0 ? {} : { limits: options.workspaceLimits },
6326
+ ...options.signal === void 0 ? {} : { signal: options.signal }
6327
+ });
6328
+ const files = [];
6329
+ for (const { file, archivePath } of selected) {
6330
+ const bytes = contents.get(archivePath);
6331
+ if (bytes === void 0) throw new ValidationError$1(`Verified native file was not returned: ${file.path}`);
6332
+ try {
6333
+ const content = new TextDecoder("utf-8", {
6334
+ fatal: true,
6335
+ ignoreBOM: true
6336
+ }).decode(bytes);
6337
+ if (content.includes("\0")) throw new Error("NUL in native file");
6338
+ files.push({
6339
+ path: file.path,
6340
+ bytes: file.bytes,
6341
+ content
6342
+ });
6343
+ } catch {
6344
+ skipped.push({
6345
+ path: file.path,
6346
+ reason: "binary-or-invalid-utf8; bytes remain retained in workspace archive"
6347
+ });
6348
+ }
6349
+ }
6350
+ return deepFreezeCandidate({
6351
+ schemaVersion: 1,
6352
+ harness: descriptor.harness,
6353
+ files,
6354
+ skipped
6355
+ });
6356
+ }
6357
+ //#endregion
6094
6358
  //#region src/runtime/harness-transcript.ts
6095
6359
  /**
6096
- * Read a sandbox child's own harness transcript out of its environment before the
6097
- * environment is destroyed, and persist it beside the tool-span `trace` receipt.
6098
- *
6099
- * Why this exists: Runtime destroys a child's environment at teardown and nothing read
6100
- * those files first, so a child's Claude Code / Codex / OpenCode session never reached a
6101
- * run record. The settled `trace` receipt covers the supervisor's own tool spans only —
6102
- * `toolName`, `args`, `status`, `callId`, with `startedAt === endedAt` — so it carries no
6103
- * assistant text, no reasoning, and no tool results, and `status: 'available'` never meant
6104
- * the transcript survived. See tangle-network/agent-runtime#1214.
6105
- *
6106
- * The port already has what this needs: `AgentEnvironment.read?(path, { signal })`
6107
- * returns a file's content as a string. Two constraints shape the design:
6108
- *
6109
- * - `read` is OPTIONAL and, on the Tangle provider, gated behind
6110
- * `capabilities.workspace.read && box.read`. An environment without it is reported as
6111
- * `unsupported` rather than silently producing an empty artifact — the whole point of
6112
- * #1214 is that a receipt must not claim coverage it does not have.
6113
- * - `read` takes one path and gives no directory listing, so enumeration goes through
6114
- * `exec`. An environment with `read` but no `exec` cannot be enumerated and is also
6115
- * reported, not guessed at.
6116
- *
6117
- * Storage is NOT the executor's business. The executor holds the in-memory capture and hands it
6118
- * to the scope through `Executor.harnessTranscript()`; the scope persists it under its own
6119
- * content ref with `persistHarnessTranscript` and settles the receipt. No provider or destroy
6120
- * site learns about storage, the result blob never carries the files, and replay rehydrates a
6121
- * pointer — the bytes are read only by `harnessTranscriptArtifact`, when someone opens them.
6122
- *
6123
- * Credentials are excluded by construction: enumeration lists only the transcript globs
6124
- * for the harness, and any path matching DENY is dropped even if a producer moved a
6125
- * credential file inside a session directory. The helper never reads `auth.json`,
6126
- * `.credentials.json`, `credentials`, or a dotenv file.
6360
+ * Persist a harness transcript receipt beside the supervisor tool trace.
6361
+ * Provider workspace retention supplies an attributed descriptor whose bytes stay in the
6362
+ * original verified archive. Environments without retention use the bounded read/exec
6363
+ * fallback below. Neither path embeds transcript content in settlement events.
6364
+ * Readers request metadata without archive I/O, or explicitly resolve bounded text content.
6127
6365
  */
6128
6366
  /** Where each harness keeps the session files that hold the conversation. */
6129
6367
  const HARNESS_ROOTS = Object.freeze({
@@ -6202,6 +6440,7 @@ function readHarnessTranscript(executor) {
6202
6440
  if (reported === void 0) return harnessTranscriptUnavailable("capture-did-not-run");
6203
6441
  const capture = reported;
6204
6442
  if (capture.status === "captured" && capture.artifact) return capture;
6443
+ if (capture.status === "retained" && capture.descriptor) return capture;
6205
6444
  if (capture.status === "unavailable" && capture.reason) return capture;
6206
6445
  return harnessTranscriptUnavailable("executor-exposes-no-transcript");
6207
6446
  }
@@ -6510,32 +6749,58 @@ function harnessTranscriptFromLines(harness, name, lines) {
6510
6749
  * source that collected it. A capture that is already unavailable passes through untouched.
6511
6750
  */
6512
6751
  async function persistHarnessTranscript(capture, blobs) {
6513
- if (capture.status !== "captured") return capture;
6514
- const transcriptRef = contentAddress(capture.artifact);
6752
+ if (capture.status === "unavailable") return capture;
6753
+ const artifact = capture.status === "captured" ? capture.artifact : parseRetainedHarnessTranscript(capture.descriptor);
6754
+ const transcriptRef = contentAddress(artifact);
6515
6755
  try {
6516
- await blobs.put(transcriptRef, capture.artifact);
6756
+ await blobs.put(transcriptRef, artifact);
6517
6757
  } catch {
6518
6758
  return unavailable$2("transcript-persistence-failed");
6519
6759
  }
6520
6760
  return Object.freeze({
6521
6761
  status: "available",
6522
6762
  transcriptRef,
6523
- harness: capture.artifact.harness,
6763
+ harness: artifact.harness,
6524
6764
  fileCount: capture.fileCount,
6525
6765
  totalBytes: capture.totalBytes,
6526
- skippedCount: capture.skippedCount
6766
+ skippedCount: capture.skippedCount,
6767
+ ...capture.status === "retained" ? {
6768
+ coverageComplete: capture.descriptor.source.coverageComplete && capture.descriptor.missing.length === 0,
6769
+ missing: capture.descriptor.missing
6770
+ } : {}
6527
6771
  });
6528
6772
  }
6529
- /**
6530
- * Rehydrate the exact persisted transcript a receipt points at, or `undefined` when the receipt
6531
- * says there is none. Throws only when the receipt claims a blob the store does not hold — that
6532
- * is corruption, not absence, and must not read as "no transcript".
6533
- */
6534
- async function harnessTranscriptArtifact(evidence, blobs) {
6773
+ async function harnessTranscriptArtifact(evidence, blobs, options = {}) {
6535
6774
  if (evidence.status !== "available") return void 0;
6536
6775
  const raw = await blobs.get(evidence.transcriptRef);
6537
- if (!isHarnessTranscriptArtifact(raw)) throw new ValidationError$1(`harnessTranscriptArtifact: blob store has no transcript artifact for '${evidence.transcriptRef}'`);
6538
- return raw;
6776
+ let capture;
6777
+ if (isHarnessTranscriptArtifact(raw)) capture = {
6778
+ status: "captured",
6779
+ artifact: raw,
6780
+ fileCount: raw.files.length,
6781
+ totalBytes: raw.files.reduce((sum, file) => sum + file.bytes, 0),
6782
+ skippedCount: raw.skipped.length
6783
+ };
6784
+ else {
6785
+ if (raw === null || typeof raw !== "object" || Reflect.get(raw, "kind") !== "retained-harness-transcript") throw new ValidationError$1(`harnessTranscriptArtifact: blob store has no transcript artifact for '${evidence.transcriptRef}'`);
6786
+ const descriptor = parseRetainedHarnessTranscript(raw);
6787
+ if (contentAddress(descriptor) !== evidence.transcriptRef) throw new ValidationError$1("Retained transcript descriptor does not match its transcriptRef");
6788
+ capture = {
6789
+ status: "retained",
6790
+ descriptor,
6791
+ fileCount: descriptor.files.length,
6792
+ totalBytes: descriptor.files.reduce((sum, file) => sum + file.bytes, 0),
6793
+ skippedCount: descriptor.skipped.length
6794
+ };
6795
+ }
6796
+ if (contentAddress(raw) !== evidence.transcriptRef) throw new ValidationError$1("Transcript artifact does not match its transcriptRef");
6797
+ return options.content === false ? resolveHarnessTranscriptCapture(capture, {
6798
+ ...options,
6799
+ content: false
6800
+ }) : resolveHarnessTranscriptCapture(capture, {
6801
+ ...options,
6802
+ content: true
6803
+ });
6539
6804
  }
6540
6805
  /** Every entry, not just the arrays: a blob with `files: [null]` is corruption, not a transcript. */
6541
6806
  function isHarnessTranscriptArtifact(value) {
@@ -10955,6 +11220,28 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
10955
11220
  workspaceProvenance = provenance;
10956
11221
  workspaceCoverageComplete = coverageComplete ?? false;
10957
11222
  workspaceIncompleteReason = incompleteReason;
11223
+ try {
11224
+ harnessTranscript = createProfile.harness === void 0 ? harnessTranscriptUnavailable("unknown-harness") : retainHarnessTranscript(providerWorkspaceCaptureReceipt({
11225
+ executionId: workspaceExecutionId,
11226
+ profile: createProfile,
11227
+ ...node === void 0 ? {} : { node },
11228
+ workspaceControlRef: () => workspaceControlRef,
11229
+ workspaceProvenance: () => provenance,
11230
+ workspaceCoverage: () => ({
11231
+ complete: coverageComplete ?? false,
11232
+ incompleteReason
11233
+ })
11234
+ }, next, snapshot, providerSessionId), createProfile.harness);
11235
+ } catch (error) {
11236
+ harnessTranscript = {
11237
+ status: "unavailable",
11238
+ reason: "retained-projection-failed",
11239
+ skipped: [{
11240
+ path: workspaceExecutionId,
11241
+ reason: error instanceof Error ? error.message : String(error)
11242
+ }]
11243
+ };
11244
+ }
10958
11245
  if (workspaceRetention.requireCompleteProvenance && !coverageComplete) workspacePreservationRequired = true;
10959
11246
  return snapshot;
10960
11247
  }).catch((error) => {
@@ -11270,7 +11557,7 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
11270
11557
  environment = target;
11271
11558
  resetWorkspaceState(target);
11272
11559
  }
11273
- if (harnessTranscript.status !== "captured" && !releaseReadTried) {
11560
+ if (options.workspaceRetention === void 0 && harnessTranscript.status !== "captured" && !releaseReadTried) {
11274
11561
  releaseReadTried = true;
11275
11562
  const capture = await captureHarnessTranscript(target, profile.harness, signal);
11276
11563
  if (capture.status === "captured") harnessTranscript = capture;
@@ -11414,8 +11701,7 @@ async function* streamProviderExecutor(args) {
11414
11701
  }
11415
11702
  if ((args.options.requireTerminalEvent ?? true) && !terminal) throw new ValidationError(`providerAsExecutor(${args.provider.name}): stream ended without a terminal result/done/status event`);
11416
11703
  if (args.carried === void 0) yield { kind: "iteration" };
11417
- const harnessTranscript = await captureHarnessTranscript(environment, args.profile.harness, linked);
11418
- args.onHarnessTranscript(harnessTranscript);
11704
+ if (args.options.workspaceRetention === void 0) args.onHarnessTranscript(await captureHarnessTranscript(environment, args.profile.harness, linked));
11419
11705
  const outcome = failures.finish();
11420
11706
  const result = {
11421
11707
  ...resultFromEvents(archive.events(), text),
@@ -11500,7 +11786,7 @@ async function* streamProviderExecutor(args) {
11500
11786
  if (captureError instanceof Error && captureError !== error) failure = captureError.cause === void 0 ? Object.assign(captureError, { cause: failure }) : new AggregateError([captureError, failure], captureError.message, { cause: captureError });
11501
11787
  else failure = captureError;
11502
11788
  }
11503
- args.onHarnessTranscript(await captureHarnessTranscript(environment, args.profile.harness, linked));
11789
+ if (args.options.workspaceRetention === void 0) args.onHarnessTranscript(await captureHarnessTranscript(environment, args.profile.harness, linked));
11504
11790
  } finally {
11505
11791
  if ((!source.retained || settled !== void 0 && !failed) && !(source.retained && args.retention?.preserveEnvironment) && !(unavailable !== void 0 && !failed) && (args.options.destroyOnSettle ?? true)) {
11506
11792
  const cleanup = await args.destroyEnvironment();
@@ -28605,6 +28891,6 @@ function isNonEmptySpend(s) {
28605
28891
  return s.iterations > 0 || s.tokens.input > 0 || s.tokens.output > 0 || s.usd > 0 || s.ms > 0 || s.tokensKnown === false || s.usdKnown === false || Object.values(s.resources ?? {}).some((resource) => resource.amount > 0 || !resource.known);
28606
28892
  }
28607
28893
  //#endregion
28608
- export { bindScopeRetainedOwnerProvider as $, projectSandboxOutcome as $i, parseWorkerToolTraceArtifact as $n, runWorktreeHarness as $r, isPeerMailEnvelope as $t, driverExecutorFactory as A, withBudgetResources as Aa, writeAllBytes as Ai, resolveAgentEnvironmentProvider as An, mergeTraceEnv as Ar, createExecutor as At, recordScopeOwnerDriverAttempt as B, providerMessageText as Ba, recordRuntimeOwnedDriveHarnessProviderEvidence as Bi, InMemoryResultBlobStore as Bn, createOtelExporter as Br, workerTraceEnv as Bt, createContinuationKeeper as C, throwAbort as Ca, sandboxActProfileMaterialization as Ci, readPromptOptions as Cn, runAbortable as Cr, freeSlots as Ct, passedItems as D, zeroSpend as Da, isNoEntError as Di, createAgentEnvironmentProviderRegistry as Dn, readHarnessTranscript as Dr, captureReusableExecutorConfig as Dt, failedItems as E, withTimeout as Ea, worktreeCliProfileMaterialization as Ei, LEAF_CONTINUATION_TASK as En, persistHarnessTranscript as Er, bindReusableExecutorExecutionId as Et, beginScopeOwnerAttempt as F, armDeadlineTimer as Fa, inheritRuntimeOwnedExecutorAttestation as Fi, sandboxSessionTraceSource as Fn, resolveRedactor as Fr, createSteerableSandboxSession as Ft, settledToIteration as G, runtimeOwnedPendingExecutorMaterialization as Gi, insideCursorNamespace as Gn, padTraceId as Gr, createActivityLog as Gt, recordScopeOwnerPause as H, runtimeOwnedExecutorExecutionBinding as Hi, SpawnEventIndex as Hn, generateSpanId as Hr, workerTraceSeamKey as Ht, createScope as I, teardownExecutor as Ia, knownExecutionBindingReceipt as Ii, registerRetainedExecutorPreparation as In, buildLoopOtelSpans as Ir, createRouterTranscript as It, pollFor as J, unknownMaterializationReceipt as Ji, pendingWaits as Jn, createRuntimeStreamEventCollector as Jr, AUTHORITY_MARKERS as Jt, createWaitProbes as K, runtimeOwnedScopeOwnerRuntime as Ki, loadSpawnForest as Kn, toOtelAttributes as Kr, readWorkerProgress as Kt, deriveNodeExecutionIdentity as L, teardownSurfaces as La, knownMaterializationReceipt as Li, retainedExecutorSeamKey as Ln, buildLoopSpanNodes as Lr, createInPlaceCliExecutor as Lt, withDriverExecutor as M, abortError$2 as Ma, attestRuntimeOwnedScopeOwner as Mi, unavailableSignalOfFailure as Mn, traceContextToEnv as Mr, snapshotExecutorConfig as Mt, SUBTREE_RESULT_LIMIT as N, awaitAbortable$1 as Na, authoredProfileDigest as Ni, createPushTraceSource as Nn, defaultRedactor as Nr, createWorktreeCliExecutor as Nt, verdictFromJudgeScore as O, addResourceSpend as Oa, prepareJsonlAppend as Oi, providerAsExecutor as On, contentAddress as Or, cliInPlaceExecutor as Ot, assertRecursiveReservationPolicy as P, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as Pa, finalizeRuntimeOwnedPendingExecutor as Pi, decodeToolPart as Pn, defaultRedactorIdentityMaterial as Pr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as Pt, bindScopeRetainedOwnerEnvironmentId as Q, detachedSnapshot as Qi, isTraceAnalysisStore as Qn, runSettledCommand as Qr, createPeerMailbox as Qt, meterRuntimeOwnedAccounting as R, promptFromAgentTurnInput as Ra, newExecutionAttemptId as Ri, FileResultBlobStore as Rn, buildRuntimeEventOtelSpans as Rr, WORKER_TRACE_PROPAGATION as Rt, composeContinuationNote as S, stringifySafe as Sa, renderUnsupported as Si, assertBoxlessPromptOptions as Sn, linkAbort as Sr, startRetainedInteractiveRun as St, expandQuestions as T, unmeteredSpend as Ta, validateProfileMaterialization as Ti, runBrainLoop as Tn, harnessTranscriptArtifact as Tr, rollingDispatch as Tt, restoreScopeOwnerAcceptedExecution as U, runtimeOwnedExecutorMaterialization as Ui, assertContentAddress as Un, loopEventToOtelSpan as Ur, taskToPrompt as Ut, recordScopeOwnerMaterialization as V, runtimeOwnedDriveHarnessProviderEvidence as Vi, InMemorySpawnJournal as Vn, flatOtelSpan as Vr, workerTraceHeaders as Vt, scopeOwnerExecutorNodeContext as W, runtimeOwnedExecutorProviderEvidence as Wi, encodeResultBlob as Wn, padSpanId as Wr, DEFAULT_STALL_AFTER_MS as Wt, validateWaitSpec as X, executableAgentSpecSnapshot as Xi, WORKER_TOOL_TRACE_SCHEMA_VERSION as Xn, sanitizeKnowledgeReadinessReport as Xr, PEER_MAIL_WIRE_KEY as Xt, timerAt as Y, executableAgentProfileSnapshot as Yi, replaySpawnTree as Yn, sanitizeAgentRuntimeEvent as Yr, DEFAULT_PEER_MAIL_LIMITS as Yt, waitUntil as Z, detachedFrozen as Zi, captureWorkerTraceEvidence as Zn, sanitizeRuntimeStreamEvent as Zr, claimsAuthority as Zt, CheckUnavailableError as _, hasCompleteCacheBreakdown as _a, promptControlProfileMaterialization as _i, createSandboxLineage as _n, environmentGone as _r, readWorkerInteractiveBinding as _t, collectDelivered as a, extractLlmCallEvent as aa, harnessInvocation as ai, bridgeModelRouteRefusal as an, createBudgetPool as ar, scopeRetainedOwnerPriorSpend as at, bestComposite as b, randomSuffix as ba, promptResourceProfileMaterialization as bi, SandboxEvidenceRetentionError as bn, RunCancellationReason as br, reconnectRetainedInteractiveRun as bt, runTree as c, mapSandboxToolEvent as ca, parseCodexTokenUsage as ci, harnessUsageIsEmpty as cn, spendFromUsageEvents as cr, scopeRetainedOwnerResult as ct, classifyDriverFailure as d, sandboxProgressEvents as da, AGENT_PROFILE_MATERIALIZATION_AXES as di, bridgeStopSignalKey as dn, reconnectRetainedRun as dr, hostDirectoryReader as dt, readSandboxOutcome as ea, captureWorktreeDiff as ei, peerMailTools as en, workerTraceAnalysisStore as er, consumeScopeRetainedOwnerResult as et, runDriverWithRetry as f, sumSandboxUsage as fa, assertProfileMaterialization as fi, TERMINAL_DECISIONS as fn, recoverRetainedRun as fr, resolveSpawnResourcePaths as ft, CONTINUATION_FACTS as g, deleteBoxSafe as ga, profileMaterializationAxes$1 as gi, runAgentRounds as gn, destroyInteractiveEnvironment as gr, attachWorker as gt, CONTINUATIONS_DIR as h, cloneSpend as ha, fullProfileMaterialization as hi, isTerminalDecision as hn, retainedCreateMaterial as hr, workerInteractiveAdmissionFile as ht, bestDelivered as i, createSandboxUsageLedger as ia, LOCAL_HARNESSES as ii, bridgeAdmissionRefusal as in, assertValidBudget as ir, scopeRetainedOwnerContext as it, isDriverSpec as j, decodeHarnessUsage as ja, attestRuntimeOwnedPendingExecutor as ji, unavailablePauseMs as jn, readTraceContextFromEnv as jr, createExecutorRegistry as jt, driverChild as k, resourceTelemetry as ka, readCommittedJsonLines as ki, providerAsSandboxClient as kn, createPropagatingTraceEmitter as kr, cliWorktreeExecutor as kt, DriverAttemptsExhaustedError as l, notifySandboxEventObserver as la, CodexExecutionDiagnosticError as li, readCodexRolloutSession as ln, spendFromUsageTotals as lr, SPAWN_RESOURCE_PATH_MAX_BYTES as lt, upstreamUnavailableSignal as m, chargedTokens as ma, defineProfileMaterializationContract as mi, defaultSelectWinner as mn, startRetainedRunInEnvironment as mr, readWorkerInteractiveAdmissions as mt, createRootHandle as n, canonicalStreamEventFromSandboxEvent as na, removeWorktree as ni, isLiveNodeStatus as nn, BudgetReconcileFault as nr, prepareScopeRetainedOwnerTask as nt, pickBestDelivered as o, isSandboxTerminalEvent as oa, harnessSupportsReasoningEffort as oi, addHarnessUsage as on, meterUsageEvent as or, scopeRetainedOwnerResourceReader as ot, summarizeDriverAttempts as p, addSpend as pa, controlProfileMaterialization as pi, createSandboxForSpec as pn, startRetainedRun as pr, interactiveAdmissionSeamKey as pt, isWaitOutcome as q, unknownExecutionBindingReceipt as qi, materializeTreeView as qn, createRuntimeEventCollector as qr, createInbox as qt, createSupervisor as r, createSandboxToolPartState as ra, DEFAULT_LOCAL_HARNESS as ri, isTerminalNodeStatus as rn, ReservationWaitRefused as rr, reconcileScopeRetainedOwnerEnvironment as rt, runFinalizer as s, mapSandboxEvent as sa, localHarnessExecutable as si, createCodexRolloutStoreReader as sn, newUsageTotals as sr, scopeRetainedOwnerRestorePoint as st, DEFAULT_MAX_DEPTH as t, assertSandboxServedModel as ta, createWorktree as ti, peerMailVerbNames as tn, executorFailure as tr, noteScopeRetainedOwnerCoordination as tt, HarnessTurnFailedError as u, sandboxEventServedBackend as ua, terminateProcessTreeAndConfirm as ui, bridgeRuntimeAttachmentsKey as un, errMessage as ur, environmentReader as ut, admitContinuationPolicy as v, isAbortError$2 as va, promptModelProfileMaterialization as vi, probeSandboxCapabilities as vn, createWorkerSlots as vr, workerInteractiveBindingFile as vt, distillFindings as w, throwIfAborted as wa, unsupportedProfileDimensions as wi, routerBrain as wn, captureHarnessTranscript as wr, queueOf as wt, checkVerdictOf as x, sleep as xa, renderProfileMaterializationIssues as xi, captureBeforeDestroy as xn, abortError as xr, recoverRetainedInteractiveRun as xt, admitFinding as y, promptCacheTokenClasses as ya, promptOnlyProfileMaterialization as yi, acquireSandbox as yn, openSlotGroup as yr, workerInteractiveBindingsDir as yt, meterRuntimeOwnedProviderAttempt as z, promptOptionsFromAgentTurnInput as za, providerAttemptEvidence as zi, FileSpawnJournal as zn, createOpenInferenceFileExporter as zr, readWorkerTraceContext as zt };
28894
+ export { bindScopeRetainedOwnerProvider as $, detachedFrozen as $i, parseWorkerToolTraceArtifact as $n, sanitizeRuntimeStreamEvent as $r, isPeerMailEnvelope as $t, driverExecutorFactory as A, addResourceSpend as Aa, prepareJsonlAppend as Ai, resolveAgentEnvironmentProvider as An, contentAddress as Ar, createExecutor as At, recordScopeOwnerDriverAttempt as B, promptFromAgentTurnInput as Ba, newExecutionAttemptId as Bi, InMemoryResultBlobStore as Bn, buildRuntimeEventOtelSpans as Br, workerTraceEnv as Bt, createContinuationKeeper as C, sleep as Ca, renderProfileMaterializationIssues as Ci, readPromptOptions as Cn, runAbortable as Cr, freeSlots as Ct, passedItems as D, unmeteredSpend as Da, validateProfileMaterialization as Di, createAgentEnvironmentProviderRegistry as Dn, readHarnessTranscript as Dr, captureReusableExecutorConfig as Dt, failedItems as E, throwIfAborted as Ea, unsupportedProfileDimensions as Ei, LEAF_CONTINUATION_TASK as En, persistHarnessTranscript as Er, bindReusableExecutorExecutionId as Et, beginScopeOwnerAttempt as F, awaitAbortable$1 as Fa, authoredProfileDigest as Fi, sandboxSessionTraceSource as Fn, defaultRedactor as Fr, createSteerableSandboxSession as Ft, settledToIteration as G, runtimeOwnedExecutorMaterialization as Gi, insideCursorNamespace as Gn, loopEventToOtelSpan as Gr, createActivityLog as Gt, recordScopeOwnerPause as H, providerMessageText as Ha, recordRuntimeOwnedDriveHarnessProviderEvidence as Hi, SpawnEventIndex as Hn, createOtelExporter as Hr, workerTraceSeamKey as Ht, createScope as I, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as Ia, finalizeRuntimeOwnedPendingExecutor as Ii, registerRetainedExecutorPreparation as In, defaultRedactorIdentityMaterial as Ir, createRouterTranscript as It, pollFor as J, runtimeOwnedScopeOwnerRuntime as Ji, pendingWaits as Jn, toOtelAttributes as Jr, AUTHORITY_MARKERS as Jt, createWaitProbes as K, runtimeOwnedExecutorProviderEvidence as Ki, loadSpawnForest as Kn, padSpanId as Kr, readWorkerProgress as Kt, deriveNodeExecutionIdentity as L, armDeadlineTimer as La, inheritRuntimeOwnedExecutorAttestation as Li, retainedExecutorSeamKey as Ln, resolveRedactor as Lr, createInPlaceCliExecutor as Lt, withDriverExecutor as M, withBudgetResources as Ma, writeAllBytes as Mi, unavailableSignalOfFailure as Mn, mergeTraceEnv as Mr, snapshotExecutorConfig as Mt, SUBTREE_RESULT_LIMIT as N, decodeHarnessUsage as Na, attestRuntimeOwnedPendingExecutor as Ni, createPushTraceSource as Nn, readTraceContextFromEnv as Nr, createWorktreeCliExecutor as Nt, verdictFromJudgeScore as O, withTimeout as Oa, worktreeCliProfileMaterialization as Oi, providerAsExecutor as On, resolveHarnessTranscriptCapture as Or, cliInPlaceExecutor as Ot, assertRecursiveReservationPolicy as P, abortError$2 as Pa, attestRuntimeOwnedScopeOwner as Pi, decodeToolPart as Pn, traceContextToEnv as Pr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as Pt, bindScopeRetainedOwnerEnvironmentId as Q, executableAgentSpecSnapshot as Qi, isTraceAnalysisStore as Qn, sanitizeKnowledgeReadinessReport as Qr, createPeerMailbox as Qt, meterRuntimeOwnedAccounting as R, teardownExecutor as Ra, knownExecutionBindingReceipt as Ri, FileResultBlobStore as Rn, buildLoopOtelSpans as Rr, WORKER_TRACE_PROPAGATION as Rt, composeContinuationNote as S, randomSuffix as Sa, promptResourceProfileMaterialization as Si, assertBoxlessPromptOptions as Sn, linkAbort as Sr, startRetainedInteractiveRun as St, expandQuestions as T, throwAbort as Ta, sandboxActProfileMaterialization as Ti, runBrainLoop as Tn, harnessTranscriptArtifact as Tr, rollingDispatch as Tt, restoreScopeOwnerAcceptedExecution as U, runtimeOwnedDriveHarnessProviderEvidence as Ui, assertContentAddress as Un, flatOtelSpan as Ur, taskToPrompt as Ut, recordScopeOwnerMaterialization as V, promptOptionsFromAgentTurnInput as Va, providerAttemptEvidence as Vi, InMemorySpawnJournal as Vn, createOpenInferenceFileExporter as Vr, workerTraceHeaders as Vt, scopeOwnerExecutorNodeContext as W, runtimeOwnedExecutorExecutionBinding as Wi, encodeResultBlob as Wn, generateSpanId as Wr, DEFAULT_STALL_AFTER_MS as Wt, validateWaitSpec as X, unknownMaterializationReceipt as Xi, WORKER_TOOL_TRACE_SCHEMA_VERSION as Xn, createRuntimeStreamEventCollector as Xr, PEER_MAIL_WIRE_KEY as Xt, timerAt as Y, unknownExecutionBindingReceipt as Yi, replaySpawnTree as Yn, createRuntimeEventCollector as Yr, DEFAULT_PEER_MAIL_LIMITS as Yt, waitUntil as Z, executableAgentProfileSnapshot as Zi, captureWorkerTraceEvidence as Zn, sanitizeAgentRuntimeEvent as Zr, claimsAuthority as Zt, CheckUnavailableError as _, cloneSpend as _a, fullProfileMaterialization as _i, createSandboxLineage as _n, environmentGone as _r, readWorkerInteractiveBinding as _t, collectDelivered as a, createSandboxToolPartState as aa, DEFAULT_LOCAL_HARNESS as ai, bridgeModelRouteRefusal as an, createBudgetPool as ar, scopeRetainedOwnerPriorSpend as at, bestComposite as b, isAbortError$2 as ba, promptModelProfileMaterialization as bi, SandboxEvidenceRetentionError as bn, RunCancellationReason as br, reconnectRetainedInteractiveRun as bt, runTree as c, isSandboxTerminalEvent as ca, harnessSupportsReasoningEffort as ci, harnessUsageIsEmpty as cn, spendFromUsageEvents as cr, scopeRetainedOwnerResult as ct, classifyDriverFailure as d, notifySandboxEventObserver as da, CodexExecutionDiagnosticError as di, bridgeStopSignalKey as dn, reconnectRetainedRun as dr, hostDirectoryReader as dt, detachedSnapshot as ea, runSettledCommand as ei, peerMailTools as en, workerTraceAnalysisStore as er, consumeScopeRetainedOwnerResult as et, runDriverWithRetry as f, sandboxEventServedBackend as fa, terminateProcessTreeAndConfirm as fi, TERMINAL_DECISIONS as fn, recoverRetainedRun as fr, resolveSpawnResourcePaths as ft, CONTINUATION_FACTS as g, chargedTokens as ga, defineProfileMaterializationContract as gi, runAgentRounds as gn, destroyInteractiveEnvironment as gr, attachWorker as gt, CONTINUATIONS_DIR as h, addSpend as ha, controlProfileMaterialization as hi, isTerminalDecision as hn, retainedCreateMaterial as hr, workerInteractiveAdmissionFile as ht, bestDelivered as i, canonicalStreamEventFromSandboxEvent as ia, removeWorktree as ii, bridgeAdmissionRefusal as in, assertValidBudget as ir, scopeRetainedOwnerContext as it, isDriverSpec as j, resourceTelemetry as ja, readCommittedJsonLines as ji, unavailablePauseMs as jn, createPropagatingTraceEmitter as jr, createExecutorRegistry as jt, driverChild as k, zeroSpend as ka, isNoEntError as ki, providerAsSandboxClient as kn, retainHarnessTranscript as kr, cliWorktreeExecutor as kt, DriverAttemptsExhaustedError as l, mapSandboxEvent as la, localHarnessExecutable as li, readCodexRolloutSession as ln, spendFromUsageTotals as lr, SPAWN_RESOURCE_PATH_MAX_BYTES as lt, upstreamUnavailableSignal as m, sumSandboxUsage as ma, assertProfileMaterialization as mi, defaultSelectWinner as mn, startRetainedRunInEnvironment as mr, readWorkerInteractiveAdmissions as mt, createRootHandle as n, readSandboxOutcome as na, captureWorktreeDiff as ni, isLiveNodeStatus as nn, BudgetReconcileFault as nr, prepareScopeRetainedOwnerTask as nt, pickBestDelivered as o, createSandboxUsageLedger as oa, LOCAL_HARNESSES as oi, addHarnessUsage as on, meterUsageEvent as or, scopeRetainedOwnerResourceReader as ot, summarizeDriverAttempts as p, sandboxProgressEvents as pa, AGENT_PROFILE_MATERIALIZATION_AXES as pi, createSandboxForSpec as pn, startRetainedRun as pr, interactiveAdmissionSeamKey as pt, isWaitOutcome as q, runtimeOwnedPendingExecutorMaterialization as qi, materializeTreeView as qn, padTraceId as qr, createInbox as qt, createSupervisor as r, assertSandboxServedModel as ra, createWorktree as ri, isTerminalNodeStatus as rn, ReservationWaitRefused as rr, reconcileScopeRetainedOwnerEnvironment as rt, runFinalizer as s, extractLlmCallEvent as sa, harnessInvocation as si, createCodexRolloutStoreReader as sn, newUsageTotals as sr, scopeRetainedOwnerRestorePoint as st, DEFAULT_MAX_DEPTH as t, projectSandboxOutcome as ta, runWorktreeHarness as ti, peerMailVerbNames as tn, executorFailure as tr, noteScopeRetainedOwnerCoordination as tt, HarnessTurnFailedError as u, mapSandboxToolEvent as ua, parseCodexTokenUsage as ui, bridgeRuntimeAttachmentsKey as un, errMessage as ur, environmentReader as ut, admitContinuationPolicy as v, deleteBoxSafe as va, profileMaterializationAxes$1 as vi, probeSandboxCapabilities as vn, createWorkerSlots as vr, workerInteractiveBindingFile as vt, distillFindings as w, stringifySafe as wa, renderUnsupported as wi, routerBrain as wn, captureHarnessTranscript as wr, queueOf as wt, checkVerdictOf as x, promptCacheTokenClasses as xa, promptOnlyProfileMaterialization as xi, captureBeforeDestroy as xn, abortError as xr, recoverRetainedInteractiveRun as xt, admitFinding as y, hasCompleteCacheBreakdown as ya, promptControlProfileMaterialization as yi, acquireSandbox as yn, openSlotGroup as yr, workerInteractiveBindingsDir as yt, meterRuntimeOwnedProviderAttempt as z, teardownSurfaces as za, knownMaterializationReceipt as zi, FileSpawnJournal as zn, buildLoopSpanNodes as zr, readWorkerTraceContext as zt };
28609
28895
 
28610
- //# sourceMappingURL=supervisor-B1jEhBXU.js.map
28896
+ //# sourceMappingURL=supervisor-Rov7xW0j.js.map