@tangle-network/agent-runtime 0.239.0 → 0.246.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 (78) hide show
  1. package/dist/{activation-CUhkPtm0.js → activation-C6d-NTWk.js} +3 -3
  2. package/dist/{activation-CUhkPtm0.js.map → activation-C6d-NTWk.js.map} +1 -1
  3. package/dist/{activation-CRDZUoUE.d.ts → activation-Df-ae5Uq.d.ts} +115 -5
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/candidate-execution/index.js +7 -7
  7. package/dist/candidate-execution/index.js.map +1 -1
  8. package/dist/{coordination-driver-m-2dzvu6.js → coordination-driver-De8pyM57.js} +25 -12
  9. package/dist/coordination-driver-De8pyM57.js.map +1 -0
  10. package/dist/{delegate-DRQtaWF1.js → delegate-DE6hNhbD.js} +2 -2
  11. package/dist/{delegate-DRQtaWF1.js.map → delegate-DE6hNhbD.js.map} +1 -1
  12. package/dist/{durable-file-D24y9zg7.js → durable-file-DWQA4ooo.js} +2 -2
  13. package/dist/{durable-file-D24y9zg7.js.map → durable-file-DWQA4ooo.js.map} +1 -1
  14. package/dist/durable.d.ts +2 -2
  15. package/dist/durable.js +3 -3
  16. package/dist/{graph-B17RjVhE.js → graph-s57f-VCR.js} +3 -3
  17. package/dist/{graph-B17RjVhE.js.map → graph-s57f-VCR.js.map} +1 -1
  18. package/dist/{improvement-cycle-BP4rDivU.js → improvement-cycle-BE3gIJwL.js} +458 -60
  19. package/dist/improvement-cycle-BE3gIJwL.js.map +1 -0
  20. package/dist/{index-DTGWDyrF.d.ts → index-CAG31NtK.d.ts} +7 -7
  21. package/dist/index.d.ts +11 -8
  22. package/dist/index.js +27 -17
  23. package/dist/index.js.map +1 -1
  24. package/dist/intelligence.d.ts +3 -3
  25. package/dist/intelligence.js +9 -6
  26. package/dist/intelligence.js.map +1 -1
  27. package/dist/kernel.d.ts +3 -3
  28. package/dist/kernel.js +9 -9
  29. package/dist/{loop-runner-bin-BGi5UT85.d.ts → loop-runner-bin-B_oSVrE7.d.ts} +3 -3
  30. package/dist/{loop-runner-bin-mrOuv9SU.js → loop-runner-bin-Bp8Mih20.js} +3 -3
  31. package/dist/{loop-runner-bin-mrOuv9SU.js.map → loop-runner-bin-Bp8Mih20.js.map} +1 -1
  32. package/dist/loop-runner-bin.d.ts +1 -1
  33. package/dist/loop-runner-bin.js +1 -1
  34. package/dist/mcp/bin.js +3 -3
  35. package/dist/mcp/index.d.ts +5 -5
  36. package/dist/mcp/index.js +4 -4
  37. package/dist/{openai-tools-BPPAXxP2.d.ts → openai-tools-B1GMKDjW.d.ts} +2 -2
  38. package/dist/{prepare-Dc30WRB0.js → prepare-CibQrhfi.js} +28 -28
  39. package/dist/prepare-CibQrhfi.js.map +1 -0
  40. package/dist/profiles.d.ts +2 -2
  41. package/dist/{protected-model-port-D5gDcnrH.js → protected-model-port-Dhdi5mDl.js} +3 -3
  42. package/dist/{protected-model-port-D5gDcnrH.js.map → protected-model-port-Dhdi5mDl.js.map} +1 -1
  43. package/dist/{protected-redaction-wGo44k2K.js → protected-redaction-Fn1ETfJ-.js} +6 -6
  44. package/dist/protected-redaction-Fn1ETfJ-.js.map +1 -0
  45. package/dist/{provision-supervisor-CNdrsjvc.js → provision-supervisor-D0X9KUv-.js} +5 -5
  46. package/dist/{provision-supervisor-CNdrsjvc.js.map → provision-supervisor-D0X9KUv-.js.map} +1 -1
  47. package/dist/{run-layout-hZREkcfu.js → run-layout-B8-Gqhpg.js} +2 -2
  48. package/dist/{run-layout-hZREkcfu.js.map → run-layout-B8-Gqhpg.js.map} +1 -1
  49. package/dist/{runtime-BsPY_v8H.js → runtime-CHbVv5UI.js} +16 -13
  50. package/dist/{runtime-BsPY_v8H.js.map → runtime-CHbVv5UI.js.map} +1 -1
  51. package/dist/{server-b8uEBoK0.js → server-DwsC_FyV.js} +3 -3
  52. package/dist/{server-b8uEBoK0.js.map → server-DwsC_FyV.js.map} +1 -1
  53. package/dist/{stream-agent-turn-xgmm-M55.d.ts → stream-agent-turn-DQ-W8mHf.d.ts} +2 -2
  54. package/dist/{structural-rollout-sy2sH_7-.js → structural-rollout-DasmuuUp.js} +2 -2
  55. package/dist/{structural-rollout-sy2sH_7-.js.map → structural-rollout-DasmuuUp.js.map} +1 -1
  56. package/dist/{substrate-B_9stFWH.d.ts → substrate-DJOnuoa_.d.ts} +2 -2
  57. package/dist/{supervise-CBd3FyCS.js → supervise-o6CzD2Rt.js} +142 -35
  58. package/dist/supervise-o6CzD2Rt.js.map +1 -0
  59. package/dist/{supervisor-De0lytFU.js → supervisor-tGq-TPIv.js} +162 -103
  60. package/dist/supervisor-tGq-TPIv.js.map +1 -0
  61. package/dist/testing.d.ts +2 -2
  62. package/dist/testing.js +398 -398
  63. package/dist/{top-app-CMMd8DgR.js → top-app-DL-sjv7K.js} +2 -2
  64. package/dist/{top-app-CMMd8DgR.js.map → top-app-DL-sjv7K.js.map} +1 -1
  65. package/dist/tui/bin.js +1 -1
  66. package/dist/tui/index.d.ts +1 -1
  67. package/dist/tui/index.js +2 -2
  68. package/dist/{types-CE7ES_TD.d.ts → types-BoEzH8V6.d.ts} +18 -2
  69. package/dist/{workspace-archive-CBX0hwL_.js → workspace-archive-DSRT4Tro.js} +8 -8
  70. package/dist/workspace-archive-DSRT4Tro.js.map +1 -0
  71. package/package.json +6 -6
  72. package/dist/coordination-driver-m-2dzvu6.js.map +0 -1
  73. package/dist/improvement-cycle-BP4rDivU.js.map +0 -1
  74. package/dist/prepare-Dc30WRB0.js.map +0 -1
  75. package/dist/protected-redaction-wGo44k2K.js.map +0 -1
  76. package/dist/supervise-CBd3FyCS.js.map +0 -1
  77. package/dist/supervisor-De0lytFU.js.map +0 -1
  78. package/dist/workspace-archive-CBX0hwL_.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { a as canonicalCandidateBytes, c as deepFreezeCandidate, d as omitTopLevelDigest, f as sha256Bytes, i as redactProtectedValue, l as embeddedCandidateArtifact, n as createProtectedRecordRedactor, o as canonicalCandidateDigest$1, r as redactProtectedReason, s as canonicalCandidateDocument, t as assertNoProtectedBytes, u as immutableCandidateValue } from "./protected-redaction-wGo44k2K.js";
1
+ import { a as canonicalCandidateBytes$1, c as deepFreezeCandidate, d as omitTopLevelDigest, f as sha256Bytes, i as redactProtectedValue, l as embeddedCandidateArtifact, n as createProtectedRecordRedactor, o as canonicalCandidateDigest$1, r as redactProtectedReason, s as canonicalCandidateDocument, t as assertNoProtectedBytes, u as immutableCandidateValue } from "./protected-redaction-Fn1ETfJ-.js";
2
2
  import { agentCandidateArtifactRefSchema, agentCandidateBenchmarkResultEvidenceSchema, agentCandidateBenchmarkSuiteSchema, agentCandidateBenchmarkTaskSchema, agentCandidateBundleSchema, agentCandidateContainerSchema, agentCandidateExecutionLimitsSchema, agentCandidateExecutionPlanEvidenceSchema, agentCandidateExecutionPlanMaterialSchema, agentCandidateMaterializationReceiptSchema, agentCandidateModelAccessNetworkSchema, agentCandidateModelSettlementEvidenceSchema, agentCandidateProfileActivationSchema, agentCandidateProfilePlanEvidenceSchema, agentCandidateProfileSchema, agentCandidateResolvedModelSchema, agentCandidateRunCellSchema, agentCandidateRunReceiptSchema, agentCandidateTaskOutcomeEvidenceSchema, agentCandidateTaskOutcomeSpecSchema, agentCandidateTerminationSchema, agentCandidateWorkspaceManifestMaterialSchema, agentCandidateWorkspaceSnapshotEvidenceSchema, agentProfileDiffSchema, agentProfileSchema, applyAgentProfileDiff, sha256DigestSchema } from "@tangle-network/agent-interface";
3
3
  import { REDACTION_VERSION, isLlmSpan } from "@tangle-network/agent-eval";
4
4
  import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
@@ -883,7 +883,7 @@ function verifyBytes(bytes, digest, byteLength, label) {
883
883
  }
884
884
  async function verifyWorkspaceSnapshotArtifacts(snapshot, port) {
885
885
  const [manifest, archive] = await Promise.all([readVerifiedArtifact(snapshot.manifest, port), readVerifiedArtifact(snapshot.archive, port)]);
886
- const canonicalManifest = canonicalCandidateBytes(snapshot.material);
886
+ const canonicalManifest = canonicalCandidateBytes$1(snapshot.material);
887
887
  if (!Buffer.from(manifest).equals(Buffer.from(canonicalManifest))) throw new Error("workspace manifest artifact is not the exact canonical manifest material");
888
888
  if (sha256Bytes(canonicalManifest) !== snapshot.digest) throw new Error("workspace snapshot digest does not match its canonical manifest material");
889
889
  return {
@@ -967,8 +967,8 @@ function capturedBytes(entry) {
967
967
  return entry.bytes;
968
968
  }
969
969
  function assertWorkspaceManifest(observed, expected) {
970
- if (Buffer.from(canonicalCandidateBytes(observed)).equals(canonicalCandidateBytes(expected))) return;
971
- if (Buffer.from(canonicalCandidateBytes(withPortableModes(observed))).equals(canonicalCandidateBytes(withPortableModes(expected)))) throw new Error("materialized workspace files do not match the signed manifest: only the file modes differ, so the capture and this verify disagree about portableTree");
970
+ if (Buffer.from(canonicalCandidateBytes$1(observed)).equals(canonicalCandidateBytes$1(expected))) return;
971
+ if (Buffer.from(canonicalCandidateBytes$1(withPortableModes(observed))).equals(canonicalCandidateBytes$1(withPortableModes(expected)))) throw new Error("materialized workspace files do not match the signed manifest: only the file modes differ, so the capture and this verify disagree about portableTree");
972
972
  throw new Error("materialized workspace files, modes, or bytes do not match the signed manifest");
973
973
  }
974
974
  function withPortableModes(material) {
@@ -987,7 +987,7 @@ async function verifyMaterializedProfileWorkspace(root, expected, fileRoot = "wo
987
987
  contentSha256: sha256
988
988
  }));
989
989
  const expectedFiles = expected.files.filter((file) => (file.root ?? "workspace") === fileRoot).map(({ root: _root, ...file }) => file);
990
- if (!Buffer.from(canonicalCandidateBytes(observedProfile)).equals(canonicalCandidateBytes(expectedFiles))) throw new Error(`profile ${fileRoot} staging files, modes, or bytes do not match the signed profile plan`);
990
+ if (!Buffer.from(canonicalCandidateBytes$1(observedProfile)).equals(canonicalCandidateBytes$1(expectedFiles))) throw new Error(`profile ${fileRoot} staging files, modes, or bytes do not match the signed profile plan`);
991
991
  }
992
992
  async function walkWorkspace(root, options, keepBytes) {
993
993
  const ignoredProtectedRootEntries = new Set(options.ignoredProtectedRootEntries ?? []);
@@ -1229,7 +1229,7 @@ async function verifyTaskOutcomePatch(input) {
1229
1229
  if (resultTree !== input.resultTree) throw new Error(`task outcome patch materialized tree ${resultTree} does not match ${input.resultTree}`);
1230
1230
  await assertSafeTree(repositoryRoot, resultTree, gitEnvironment);
1231
1231
  const observed = await workspaceManifestFromGitTree(repositoryRoot, resultTree, gitEnvironment);
1232
- if (!Buffer.from(canonicalCandidateBytes(observed)).equals(Buffer.from(canonicalCandidateBytes(input.afterState)))) throw new Error("task outcome after-state does not match the materialized result tree");
1232
+ if (!Buffer.from(canonicalCandidateBytes$1(observed)).equals(Buffer.from(canonicalCandidateBytes$1(input.afterState)))) throw new Error("task outcome after-state does not match the materialized result tree");
1233
1233
  const resultCommit = (await runCandidateGit(repositoryRoot, [
1234
1234
  "commit-tree",
1235
1235
  resultTree,
@@ -1641,7 +1641,7 @@ function profileFileLabel(root, relPath) {
1641
1641
  /** Parse and check every native file hash plus both canonical document digests. */
1642
1642
  function parseAgentCandidateProfileActivation(input, expectedProfilePlanDigest) {
1643
1643
  const activation = agentCandidateProfileActivationSchema.parse(input);
1644
- const planBytes = canonicalCandidateBytes(activation.profilePlan.material);
1644
+ const planBytes = canonicalCandidateBytes$1(activation.profilePlan.material);
1645
1645
  const profilePlanArtifact = activation.profilePlan.artifact;
1646
1646
  if (sha256Bytes(planBytes) !== activation.profilePlan.digest || profilePlanArtifact.sha256 !== activation.profilePlan.digest || profilePlanArtifact.byteLength !== planBytes.byteLength || "content" in profilePlanArtifact && !Buffer.from(profilePlanArtifact.content, "base64").equals(Buffer.from(planBytes)) || expectedProfilePlanDigest !== void 0 && activation.profilePlan.digest !== expectedProfilePlanDigest) throw new Error("candidate profile activation has an invalid canonical profile plan");
1647
1647
  if (canonicalCandidateDigest$1(omitTopLevelDigest(activation)) !== activation.digest) throw new Error("candidate profile activation digest does not match");
@@ -1827,7 +1827,7 @@ function copyDirectProfileFields(target, source) {
1827
1827
  for (const key of CANDIDATE_PROFILE_DIRECT_FIELDS) if (source[key] !== void 0) target[key] = source[key];
1828
1828
  }
1829
1829
  function assertCanonicalParse(input, parsed, label) {
1830
- if (!Buffer.from(canonicalCandidateBytes(input)).equals(canonicalCandidateBytes(parsed))) throw new Error(`${label} contains unsupported or non-canonical fields`);
1830
+ if (!Buffer.from(canonicalCandidateBytes$1(input)).equals(canonicalCandidateBytes$1(parsed))) throw new Error(`${label} contains unsupported or non-canonical fields`);
1831
1831
  }
1832
1832
  function publicResource(resource) {
1833
1833
  if (resource.kind === "inline") return {
@@ -2083,7 +2083,7 @@ function assertPrivateCandidateIntegrity(state) {
2083
2083
  assertPlanEvidence(state.executionPlan.value, state.executionPlan.bytes, "execution plan");
2084
2084
  agentCandidateExecutionPlanEvidenceSchema.parse(state.executionPlan.value);
2085
2085
  const receipt = agentCandidateMaterializationReceiptSchema.parse(state.materializationReceipt.value);
2086
- const receiptBytes = canonicalCandidateBytes(omitTopLevelDigest(receipt));
2086
+ const receiptBytes = canonicalCandidateBytes$1(omitTopLevelDigest(receipt));
2087
2087
  if (canonicalCandidateDigest$1(omitTopLevelDigest(receipt)) !== state.materializationReceipt.digest || !Buffer.from(receiptBytes).equals(Buffer.from(state.materializationReceipt.bytes))) throw new Error("prepared materialization receipt no longer matches its canonical bytes");
2088
2088
  assertSignedBenchmarkInput(state);
2089
2089
  const instruction = Buffer.from(state.benchmarkTask.instruction, "utf8");
@@ -2110,7 +2110,7 @@ function assertPrivateCandidateIntegrity(state) {
2110
2110
  if (!state.trace.runId.startsWith(`${state.executionId}:attempt-${state.executionPlan.value.material.runCell.attempt}:`) || canonicalCandidateDigest$1(state.trace.tags) !== canonicalCandidateDigest$1(expectedTags) || canonicalCandidateDigest$1(state.trace.env) !== canonicalCandidateDigest$1(expectedTraceEnvironment)) throw new Error("prepared trace identity no longer matches the signed execution");
2111
2111
  }
2112
2112
  function assertPlanEvidence(evidence, bytes, label) {
2113
- const expected = canonicalCandidateBytes(evidence.material);
2113
+ const expected = canonicalCandidateBytes$1(evidence.material);
2114
2114
  if (sha256Bytes(expected) !== evidence.digest || !Buffer.from(expected).equals(Buffer.from(bytes)) || evidence.artifact.sha256 !== evidence.digest || evidence.artifact.byteLength !== bytes.byteLength || !("content" in evidence.artifact) || !Buffer.from(evidence.artifact.content, "base64").equals(Buffer.from(bytes))) throw new Error(`prepared ${label} no longer matches its canonical bytes`);
2115
2115
  }
2116
2116
  function evidenceView(evidence) {
@@ -2215,8 +2215,8 @@ function assertSignedBenchmarkInput(state) {
2215
2215
  const receipt = state.materializationReceipt.value;
2216
2216
  const cellIndex = cell.taskIndex * suite.reps + cell.repetition;
2217
2217
  if (canonicalCandidateDigest$1(omitTopLevelDigest(suite)) !== suite.digest || canonicalCandidateDigest$1(omitTopLevelDigest(task)) !== task.digest || canonicalCandidateDigest$1(omitTopLevelDigest(cell)) !== cell.digest || cell.bundleDigest !== state.bundle.digest || cell.suiteDigest !== suite.digest || cell.taskDigest !== task.digest || suite.taskDigests[cell.taskIndex] !== task.digest || suite.seeds[cellIndex] !== cell.seed || cell.repetition >= suite.reps || cell.attempt < 1 || cell.attempt > task.attempt.maxAttempts) throw new Error("prepared candidate no longer matches its signed experiment cell");
2218
- const suiteBytes = canonicalCandidateBytes(omitTopLevelDigest(suite));
2219
- const taskBytes = canonicalCandidateBytes(omitTopLevelDigest(task));
2218
+ const suiteBytes = canonicalCandidateBytes$1(omitTopLevelDigest(suite));
2219
+ const taskBytes = canonicalCandidateBytes$1(omitTopLevelDigest(task));
2220
2220
  if (receipt.benchmark.suite.digest !== suite.digest || receipt.benchmark.suite.material.sha256 !== sha256Bytes(suiteBytes) || receipt.benchmark.suite.material.byteLength !== suiteBytes.byteLength || receipt.benchmark.task.digest !== task.digest || receipt.benchmark.task.material.sha256 !== sha256Bytes(taskBytes) || receipt.benchmark.task.material.byteLength !== taskBytes.byteLength) throw new Error("materialization receipt no longer matches its signed benchmark input");
2221
2221
  }
2222
2222
  function immutableExecutorFiles(files) {
@@ -2662,7 +2662,7 @@ async function finalizeAgentCandidateRun(state, capture, traceStore, traceIdenti
2662
2662
  }, protectedValues);
2663
2663
  const combinedByRule = { ...writeRedactionReport?.byRule ?? {} };
2664
2664
  for (const [rule, count] of Object.entries(redacted.report.byRule)) combinedByRule[rule] = (combinedByRule[rule] ?? 0) + count;
2665
- const traceBytes = canonicalCandidateBytes({
2665
+ const traceBytes = canonicalCandidateBytes$1({
2666
2666
  ...redacted.value,
2667
2667
  evaluatorLimits: { resultTimeoutMs: state.resultTimeoutMs },
2668
2668
  redaction: {
@@ -2769,7 +2769,7 @@ async function memoryReceipt(state, capture, persisted, signal) {
2769
2769
  if (!capture.memoryAfter) throw new Error("isolated memory is missing its protected after-state");
2770
2770
  if (!persisted) throw new Error("isolated memory is missing persisted capture evidence");
2771
2771
  const afterState = capture.memoryAfter.afterState;
2772
- const manifestBytes = canonicalCandidateBytes(afterState);
2772
+ const manifestBytes = canonicalCandidateBytes$1(afterState);
2773
2773
  const snapshot = agentCandidateWorkspaceSnapshotEvidenceSchema.parse({
2774
2774
  kind: "agent-candidate-workspace-snapshot",
2775
2775
  digest: sha256Bytes(manifestBytes),
@@ -2899,7 +2899,7 @@ async function persistAgentCandidateExecutorCapture(identity, expected, capture,
2899
2899
  }) : void 0;
2900
2900
  const taskOutcome = capture.taskOutcome ? await persistTaskCapture(identity.executionId, expected, capture.taskOutcome, outputArtifacts, signal) : void 0;
2901
2901
  const memoryAfter = capture.memoryAfter ? await persistWorkspaceCapture(identity.executionId, "memory-after-manifest", "memory-after-archive", capture.memoryAfter.afterState, capture.memoryAfter.archive, outputArtifacts, signal) : void 0;
2902
- const bytes = canonicalCandidateBytes({
2902
+ const bytes = canonicalCandidateBytes$1({
2903
2903
  kind: "agent-candidate-executor-capture",
2904
2904
  executionPlanDigest: identity.executionPlanDigest,
2905
2905
  ...executorEvidence ? { executorEvidence } : {},
@@ -2952,7 +2952,7 @@ async function persistTaskCapture(executionId, expected, capture, outputArtifact
2952
2952
  };
2953
2953
  }
2954
2954
  async function persistWorkspaceCapture(executionId, manifestPurpose, archivePurpose, afterState, archiveBytes, outputArtifacts, signal) {
2955
- const manifestBytes = canonicalCandidateBytes(afterState);
2955
+ const manifestBytes = canonicalCandidateBytes$1(afterState);
2956
2956
  const [manifest, archive] = await Promise.all([persistCandidateOutputArtifact(outputArtifacts, {
2957
2957
  executionId,
2958
2958
  purpose: manifestPurpose,
@@ -3008,7 +3008,7 @@ async function persistCandidateModelSettlementEvidence(identity, settlement, out
3008
3008
  })),
3009
3009
  usage: settlement.usage
3010
3010
  };
3011
- const bytes = canonicalCandidateBytes(material);
3011
+ const bytes = canonicalCandidateBytes$1(material);
3012
3012
  const digest = sha256Bytes(bytes);
3013
3013
  const artifact = await persistCandidateOutputArtifact(outputArtifacts, {
3014
3014
  executionId: identity.executionId,
@@ -3064,7 +3064,7 @@ async function verifyWorkspaceTaskCapture(state, capture, protectedValues, signa
3064
3064
  afterState
3065
3065
  });
3066
3066
  signal?.throwIfAborted();
3067
- const manifestBytes = canonicalCandidateBytes(afterState);
3067
+ const manifestBytes = canonicalCandidateBytes$1(afterState);
3068
3068
  assertNoProtectedBytes(manifestBytes, protectedValues);
3069
3069
  await verifyTaskOutcomeArchive(state, agentCandidateWorkspaceSnapshotEvidenceSchema.parse({
3070
3070
  kind: "agent-candidate-workspace-snapshot",
@@ -3165,7 +3165,7 @@ async function persistVerifiedOutputTaskOutcome(state, verified, persisted, outp
3165
3165
  });
3166
3166
  }
3167
3167
  async function persistTaskOutcomeEvidence(state, material, outputArtifacts, signal) {
3168
- const bytes = canonicalCandidateBytes(material);
3168
+ const bytes = canonicalCandidateBytes$1(material);
3169
3169
  const digest = sha256Bytes(bytes);
3170
3170
  const artifact = await persistCandidateOutputArtifact(outputArtifacts, {
3171
3171
  executionId: state.executionId,
@@ -3215,7 +3215,7 @@ async function persistCandidateBenchmarkResult(state, termination, outcome, grad
3215
3215
  passed: evaluation.passed,
3216
3216
  dimensions: evaluation.dimensions
3217
3217
  };
3218
- const bytes = canonicalCandidateBytes(material);
3218
+ const bytes = canonicalCandidateBytes$1(material);
3219
3219
  const digest = sha256Bytes(bytes);
3220
3220
  const artifact = await persistCandidateOutputArtifact(outputArtifacts, {
3221
3221
  executionId: state.executionId,
@@ -3256,7 +3256,7 @@ async function verifyMemoryCapture(state, capture, protectedValues, signal) {
3256
3256
  const memory = capture.memoryAfter;
3257
3257
  if (!memory) throw new Error("isolated memory is missing its protected after-state");
3258
3258
  if (memory.archive.byteLength === 0) throw new Error("isolated memory archive cannot be empty");
3259
- const manifestBytes = canonicalCandidateBytes(memory.afterState);
3259
+ const manifestBytes = canonicalCandidateBytes$1(memory.afterState);
3260
3260
  assertNoProtectedBytes(manifestBytes, protectedValues);
3261
3261
  assertNoProtectedBytes(memory.archive, protectedValues);
3262
3262
  const snapshot = agentCandidateWorkspaceSnapshotEvidenceSchema.parse({
@@ -3812,7 +3812,7 @@ async function finishClaim(store, lease, terminal, deadlineAtMs) {
3812
3812
  }
3813
3813
  }
3814
3814
  async function persistFailureEvidence(state, reason, failureClass, termination, outputArtifacts) {
3815
- const bytes = canonicalCandidateBytes({
3815
+ const bytes = canonicalCandidateBytes$1({
3816
3816
  kind: "agent-candidate-execution-failure",
3817
3817
  executionId: state.executionId,
3818
3818
  bundleDigest: state.bundle.digest,
@@ -3870,7 +3870,7 @@ async function verifyAgentCandidateBundle(input, ports) {
3870
3870
  const withoutDigest = omitTopLevelDigest(parsed);
3871
3871
  const actualDigest = canonicalCandidateDigest$1(withoutDigest);
3872
3872
  if (actualDigest !== parsed.digest) throw new Error(`candidate bundle digest ${parsed.digest} does not match ${actualDigest}`);
3873
- const canonicalBytes = canonicalCandidateBytes(withoutDigest);
3873
+ const canonicalBytes = canonicalCandidateBytes$1(withoutDigest);
3874
3874
  verifyBytes(canonicalBytes, parsed.digest, canonicalBytes.byteLength, "candidate bundle");
3875
3875
  assertCandidateProfileExecutionSupport(parsed.profile);
3876
3876
  const artifactBytes = /* @__PURE__ */ new Map();
@@ -4079,7 +4079,7 @@ async function prepareAgentCandidateExecution(candidate, task, ports, options =
4079
4079
  });
4080
4080
  }
4081
4081
  const profilePlanBytes = await readVerifiedArtifact(profileApplication.profileActivation.profilePlan.artifact, ports.artifacts);
4082
- if (!Buffer.from(profilePlanBytes).equals(Buffer.from(canonicalCandidateBytes(profileApplication.profileActivation.profilePlan.material)))) throw new Error("profile materializer did not capture exact canonical plan bytes");
4082
+ if (!Buffer.from(profilePlanBytes).equals(Buffer.from(canonicalCandidateBytes$1(profileApplication.profileActivation.profilePlan.material)))) throw new Error("profile materializer did not capture exact canonical plan bytes");
4083
4083
  const profileActivation = profileApplication.profileActivation;
4084
4084
  const container = await resolveContainer(candidate, task, ports);
4085
4085
  const resolvedModel = await resolveModel(candidate, task, ports);
@@ -4162,7 +4162,7 @@ async function prepareAgentCandidateExecution(candidate, task, ports, options =
4162
4162
  network: { mode: "disabled" }
4163
4163
  };
4164
4164
  agentCandidateExecutionPlanMaterialSchema.parse(executionMaterial);
4165
- const executionBytes = canonicalCandidateBytes(executionMaterial);
4165
+ const executionBytes = canonicalCandidateBytes$1(executionMaterial);
4166
4166
  const executionDigest = canonicalCandidateDigest$1(executionMaterial);
4167
4167
  if (sha256Bytes(executionBytes) !== executionDigest) throw new Error("execution plan canonical serializers disagree");
4168
4168
  const executionPlan = agentCandidateExecutionPlanEvidenceSchema.parse({
@@ -4179,11 +4179,11 @@ async function prepareAgentCandidateExecution(candidate, task, ports, options =
4179
4179
  benchmark: {
4180
4180
  suite: {
4181
4181
  digest: task.benchmarkSuite.digest,
4182
- material: embeddedCandidateArtifact(canonicalCandidateBytes(omitTopLevelDigest(task.benchmarkSuite)))
4182
+ material: embeddedCandidateArtifact(canonicalCandidateBytes$1(omitTopLevelDigest(task.benchmarkSuite)))
4183
4183
  },
4184
4184
  task: {
4185
4185
  digest: benchmarkTask.digest,
4186
- material: embeddedCandidateArtifact(canonicalCandidateBytes(omitTopLevelDigest(benchmarkTask)))
4186
+ material: embeddedCandidateArtifact(canonicalCandidateBytes$1(omitTopLevelDigest(benchmarkTask)))
4187
4187
  }
4188
4188
  },
4189
4189
  profileActivation,
@@ -4607,4 +4607,4 @@ function errorMessage(error) {
4607
4607
  //#endregion
4608
4608
  export { assertTerminalMatchesStaged as $, omitUndefinedObjectFields as A, captureMaterializedWorkspace as B, agentCandidateProfileAsAgentProfile as C, createAgentCandidateProfileActivation as D, candidateProfileAgentPaths as E, assertNoGitIndirection as F, InMemoryAgentCandidateExecutionClaimStore as G, scanMaterializedWorkspaceManifest as H, readCandidateGitTreeFiles as I, candidateCleanupTimeout as J, candidateClaimFileInternals as K, runCandidateGit as L, parseExactAgentProfile as M, parseExactAgentProfileDiff as N, freezeGenericAgentCandidateProfile as O, parseExactCandidateProfile as P, assertTerminalMatchesClaim as Q, assertAgentCandidateExecutionRoots as R, PI_CANDIDATE_SESSION_DIR_ENV as S, assertCandidateProfileBinding as T, verifyBytes as U, readVerifiedArtifact as V, verifyMaterializedWorkspace as W, assertRecoveryMatchesStaged as X, withinCandidateCleanupDeadline as Y, assertTerminalAllowedInPhase as Z, beginPreparedCandidateDisposal as _, AGENT_CANDIDATE_EXECUTION_SUPPORT as a, terminalRecord as at, CANDIDATE_TRACE_TAGS as b, executePreparedAgentCandidate as c, persistCandidateOutputArtifact as d, recoveredTerminalRecord as et, sealAgentCandidateModelSettlement as f, assertPreparedCandidateIntegrity as g, candidateExecutionClaim as h, candidateKnowledgeExecutionPaths as i, sealTerminalDigest as it, parseAgentCandidateProfileActivation as j, materializeAgentCandidateProfilePlan as k, RecoveryAgentCandidateTraceStore as l, sealAgentCandidateExecutorStopAcknowledgement as m, CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV as n, rejectedStage as nt, verifiedResourceTextByDigest as o, assertExactObjectKeys as ot, usdToNanos as p, candidateCleanupDeadline as q, CANDIDATE_KNOWLEDGE_ROOT_ENV as r, requireStagedTerminal as rt, verifyAgentCandidateBundle as s, isWellFormedUnicode as st, prepareAgentCandidateExecution as t, rejectedFinish as tt, persistCandidateModelSettlementEvidence as u, consumePreparedCandidateExecution as v, applyExactAgentProfileDiff as w, PI_CANDIDATE_AGENT_DIR_ENV as x, CANDIDATE_TRACE_ENV as y, candidateWorkspaceManifest as z };
4609
4609
 
4610
- //# sourceMappingURL=prepare-Dc30WRB0.js.map
4610
+ //# sourceMappingURL=prepare-CibQrhfi.js.map