@tangle-network/agent-runtime 0.259.0 → 0.261.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 (73) hide show
  1. package/dist/{activation-Cus2oZaT.d.ts → activation-BpJ2CmXx.d.ts} +2 -2
  2. package/dist/{activation-Btw2npV2.js → activation-BwrMmguq.js} +3 -3
  3. package/dist/{activation-Btw2npV2.js.map → activation-BwrMmguq.js.map} +1 -1
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{bundle-DXrBPEFw.js → bundle-CvLGRVO-.js} +2 -2
  7. package/dist/{bundle-DXrBPEFw.js.map → bundle-CvLGRVO-.js.map} +1 -1
  8. package/dist/candidate-execution/index.js +5 -4
  9. package/dist/candidate-execution/index.js.map +1 -1
  10. package/dist/{coordination-driver-BmtrkNPu.js → coordination-driver-LmDxHvAO.js} +77 -11
  11. package/dist/coordination-driver-LmDxHvAO.js.map +1 -0
  12. package/dist/{delegate-DJgmZZKH.js → delegate-rkhJf5w7.js} +2 -2
  13. package/dist/{delegate-DJgmZZKH.js.map → delegate-rkhJf5w7.js.map} +1 -1
  14. package/dist/durable.d.ts +285 -57
  15. package/dist/durable.js +637 -108
  16. package/dist/durable.js.map +1 -1
  17. package/dist/{graph-BKRvWzHx.js → graph-Bn3wSH8-.js} +4 -3
  18. package/dist/graph-Bn3wSH8-.js.map +1 -0
  19. package/dist/{improvement-cycle-D0Os0Hg_.js → improvement-cycle-DYiwfjWY.js} +8 -7
  20. package/dist/improvement-cycle-DYiwfjWY.js.map +1 -0
  21. package/dist/{index-sGOO254Q.d.ts → index-tubViIQJ.d.ts} +122 -12
  22. package/dist/index.d.ts +6 -6
  23. package/dist/index.js +9 -9
  24. package/dist/intelligence.d.ts +3 -3
  25. package/dist/intelligence.js +7 -6
  26. package/dist/intelligence.js.map +1 -1
  27. package/dist/kernel.d.ts +4 -4
  28. package/dist/kernel.js +8 -8
  29. package/dist/{loop-runner-bin-DAU4rNIL.d.ts → loop-runner-bin-CL4W2pu1.d.ts} +3 -3
  30. package/dist/{loop-runner-bin-pRlDgm1i.js → loop-runner-bin-Dxqxf91b.js} +3 -3
  31. package/dist/{loop-runner-bin-pRlDgm1i.js.map → loop-runner-bin-Dxqxf91b.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-BsqD1_Zr.d.ts → openai-tools-BlZHd0Nz.d.ts} +2 -2
  38. package/dist/{prepare-RuaAclli.js → prepare-oHUQdC5-.js} +22 -452
  39. package/dist/prepare-oHUQdC5-.js.map +1 -0
  40. package/dist/profile-D3eXNBQV.js +438 -0
  41. package/dist/profile-D3eXNBQV.js.map +1 -0
  42. package/dist/profiles.d.ts +2 -2
  43. package/dist/{protected-model-port-BFhSgMAy.js → protected-model-port-DqF0qDU6.js} +4 -3
  44. package/dist/{protected-model-port-BFhSgMAy.js.map → protected-model-port-DqF0qDU6.js.map} +1 -1
  45. package/dist/{provision-supervisor-B9tf4soF.js → provision-supervisor-By5oGk3t.js} +3 -3
  46. package/dist/{provision-supervisor-B9tf4soF.js.map → provision-supervisor-By5oGk3t.js.map} +1 -1
  47. package/dist/{runtime-DKiucqGX.js → runtime-BbQmK7qe.js} +218 -20
  48. package/dist/runtime-BbQmK7qe.js.map +1 -0
  49. package/dist/{server-DIsiQ6mu.js → server-CHlpLE22.js} +3 -3
  50. package/dist/{server-DIsiQ6mu.js.map → server-CHlpLE22.js.map} +1 -1
  51. package/dist/{stream-agent-turn-DRTFLphI.d.ts → stream-agent-turn-DTgxWXbR.d.ts} +2 -2
  52. package/dist/{structural-rollout-BIBxgW64.js → structural-rollout-Dby60zHe.js} +2 -2
  53. package/dist/{structural-rollout-BIBxgW64.js.map → structural-rollout-Dby60zHe.js.map} +1 -1
  54. package/dist/{substrate-BToFBpfh.d.ts → substrate-CxwdhZri.d.ts} +2 -2
  55. package/dist/{supervise-DsQjhLN-.js → supervise-1QzYAyS2.js} +78 -7
  56. package/dist/supervise-1QzYAyS2.js.map +1 -0
  57. package/dist/{supervisor-CJyzUjc7.js → supervisor-yavsoQQo.js} +84 -9
  58. package/dist/{supervisor-CJyzUjc7.js.map → supervisor-yavsoQQo.js.map} +1 -1
  59. package/dist/testing.d.ts +2 -2
  60. package/dist/testing.js +14 -14
  61. package/dist/tui/index.d.ts +1 -1
  62. package/dist/tui/index.js +1 -1
  63. package/dist/{types-ChewVlpE.d.ts → types-DNCNRu0E.d.ts} +24 -2
  64. package/dist/{workspace-archive-DQGFwvM6.js → workspace-archive-C9lgf77y.js} +11 -11
  65. package/dist/workspace-archive-C9lgf77y.js.map +1 -0
  66. package/package.json +5 -5
  67. package/dist/coordination-driver-BmtrkNPu.js.map +0 -1
  68. package/dist/graph-BKRvWzHx.js.map +0 -1
  69. package/dist/improvement-cycle-D0Os0Hg_.js.map +0 -1
  70. package/dist/prepare-RuaAclli.js.map +0 -1
  71. package/dist/runtime-DKiucqGX.js.map +0 -1
  72. package/dist/supervise-DsQjhLN-.js.map +0 -1
  73. package/dist/workspace-archive-DQGFwvM6.js.map +0 -1
@@ -1,16 +1,16 @@
1
- import { $r as readCommittedJsonLines, Cn as runBrainLoop, Dt as isTraceAnalysisStore, Gi as sleep, Hi as isAbortError, Ki as stringifySafe, Li as addSpend, Mn as createPushTraceSource, Ni as notifySandboxEventObserver, Qr as prepareJsonlAppend, Ri as chargedTokens, Sn as routerBrain, T as settledToIteration, Vi as hasCompleteCacheBreakdown, Wi as randomSuffix, Zi as zeroSpend, _n as createSandboxLineage, aa as armDeadlineTimer, bi as executableAgentSpecSnapshot, bn as assertBoxlessPromptOptions, bt as insideCursorNamespace, ei as writeAllBytes, er as contentAddress, ft as createWorktreeCliExecutor, g as withDriverExecutor, gn as runAgentRounds, it as rollingDispatch, lt as createExecutor, mn as defaultSelectWinner, n as createSupervisor, ut as createExecutorRegistry, vn as probeSandboxCapabilities, vt as InMemoryResultBlobStore, wn as canonicalObservedModelParts, xi as detachedFrozen, xn as readPromptOptions, yi as executableAgentProfileSnapshot, yt as InMemorySpawnJournal, zi as cloneSpend } from "./supervisor-CJyzUjc7.js";
1
+ import { $i as zeroSpend, Bi as chargedTokens, Ci as detachedFrozen, Cn as routerBrain, E as settledToIteration, Fi as notifySandboxEventObserver, Ji as stringifySafe, Ki as randomSuffix, Nn as createPushTraceSource, Ot as isTraceAnalysisStore, Si as executableAgentSpecSnapshot, Sn as readPromptOptions, Tn as canonicalObservedModelParts, Ui as hasCompleteCacheBreakdown, Vi as cloneSpend, Wi as isAbortError, _n as runAgentRounds, at as rollingDispatch, bt as InMemorySpawnJournal, dt as createExecutorRegistry, ei as prepareJsonlAppend, g as withDriverExecutor, hn as defaultSelectWinner, n as createSupervisor, ni as writeAllBytes, pt as createWorktreeCliExecutor, qi as sleep, sa as armDeadlineTimer, ti as readCommittedJsonLines, tr as contentAddress, ut as createExecutor, vn as createSandboxLineage, wn as runBrainLoop, xi as executableAgentProfileSnapshot, xn as assertBoxlessPromptOptions, xt as insideCursorNamespace, yn as probeSandboxCapabilities, yt as InMemoryResultBlobStore, zi as addSpend } from "./supervisor-yavsoQQo.js";
2
2
  import { m as ValidationError, n as AnalystError, s as PlannerError } from "./errors-DodWX-cb.js";
3
- import { E as profileChatClient, S as ObservationError, T as renderReport, b as sample, k as strategyAuthorMethod, v as refine, w as observe, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-BIBxgW64.js";
3
+ import { E as profileChatClient, S as ObservationError, T as renderReport, b as sample, k as strategyAuthorMethod, v as refine, w as observe, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-Dby60zHe.js";
4
4
  import { c as profileModelExecutionSettings, i as concreteModelId, l as profileProviderModel, o as enforceTokenLimits, t as assertExecutableAgentProfile } from "./model-policy-BbSCSak0.js";
5
- import { E as immutableCandidateValue, O as sha256Bytes, S as canonicalCandidateDigest$1 } from "./workspace-archive-DQGFwvM6.js";
5
+ import { C as canonicalCandidateDigest$1, D as immutableCandidateValue, k as sha256Bytes$1, m as captureMaterializedWorkspace } from "./workspace-archive-C9lgf77y.js";
6
6
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
7
7
  import { i as redactProtectedValue, r as redactProtectedReason } from "./protected-redaction--F3v1oo8.js";
8
- import { b as gateOnDeliverable, r as supervise, x as mapExecutorResult } from "./supervise-DsQjhLN-.js";
9
- import "./coordination-driver-BmtrkNPu.js";
8
+ import { S as mapExecutorResult, r as supervise, x as gateOnDeliverable } from "./supervise-1QzYAyS2.js";
9
+ import "./coordination-driver-LmDxHvAO.js";
10
10
  import "./run-layout-vwd4SwX_.js";
11
- import "./provision-supervisor-B9tf4soF.js";
12
- import "./delegate-DJgmZZKH.js";
13
- import "./graph-BKRvWzHx.js";
11
+ import "./provision-supervisor-By5oGk3t.js";
12
+ import "./delegate-rkhJf5w7.js";
13
+ import "./graph-Bn3wSH8-.js";
14
14
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
15
15
  import { CODING_HARNESSES, DEFAULT_TRACE_ANALYST_KINDS, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, createTraceAnalyst, expandProfileAxes, makeFinding as makeFinding$1, pairedBootstrap, paretoFrontier, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
16
16
  import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
@@ -2447,30 +2447,31 @@ const contains = (parent, child) => {
2447
2447
  return path === "" || path !== ".." && !path.startsWith(`..${sep}`) && !path.startsWith(sep);
2448
2448
  };
2449
2449
  /**
2450
- * Run untrusted checks inside Linux Bubblewrap. Never falls back to host execution.
2451
- * Requires /usr/bin/bwrap and permission to create Linux namespaces.
2450
+ * Run an untrusted check in Linux Bubblewrap, or in its own Sandbox box when `box` is set.
2451
+ * Never falls back to host execution.
2452
+ *
2453
+ * Bubblewrap requires /usr/bin/bwrap and permission to create Linux namespaces.
2452
2454
  * Only trusted system toolchains, private proc/dev/tmp, and the writable copy are mounted.
2453
2455
  * The canonical input path remains the working directory; copy writes are discarded.
2454
2456
  * Limits bound command time and captured output, not copy size or memory consumption.
2455
2457
  * Callers must keep the input and trusted toolchains stable while preparing the check.
2458
+ *
2459
+ * A box check creates one fresh box with no owner secrets and blocked egress, delivers the
2460
+ * tree's regular files verified by sha256, runs the command there, and deletes the box.
2456
2461
  */
2457
2462
  async function runIsolatedCheck(options) {
2463
+ if (options.box) return runInBox(options, options.box);
2458
2464
  let scratch;
2459
2465
  let result;
2460
2466
  try {
2461
2467
  if (process.platform !== "linux") throw new Error("Linux Bubblewrap namespaces are required");
2462
- const timeoutMs = options.timeoutMs ?? 3e4;
2463
- const maxOutputBytes = options.maxOutputBytes ?? 1048576;
2464
- if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 2147483647 || !Number.isSafeInteger(maxOutputBytes) || maxOutputBytes < 1) throw new Error("Invalid execution limits");
2465
- if (!options.command.length || !options.command[0]) throw new Error("A command is required");
2468
+ const { timeoutMs, maxOutputBytes } = checkLimits(options);
2466
2469
  if (options.signal?.aborted) return {
2467
2470
  succeeded: false,
2468
2471
  reason: "cancelled",
2469
2472
  diagnostic: "Check cancelled"
2470
2473
  };
2471
- const workspace = await realpath(options.workspaceRoot);
2472
- const tree = await realpath(options.tree);
2473
- if (!contains(workspace, tree) || !(await stat(tree)).isDirectory()) throw new Error("Tree must be a directory inside the workspace");
2474
+ const { workspace, tree } = await protectedTree(options);
2474
2475
  const binds = [];
2475
2476
  for (const path of toolchains) {
2476
2477
  let actual;
@@ -2548,6 +2549,203 @@ async function runIsolatedCheck(options) {
2548
2549
  }
2549
2550
  return result;
2550
2551
  }
2552
+ function checkLimits(options) {
2553
+ const timeoutMs = options.timeoutMs ?? 3e4;
2554
+ const maxOutputBytes = options.maxOutputBytes ?? 1048576;
2555
+ if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 2147483647 || !Number.isSafeInteger(maxOutputBytes) || maxOutputBytes < 1) throw new Error("Invalid execution limits");
2556
+ if (!options.command.length || !options.command[0]) throw new Error("A command is required");
2557
+ return {
2558
+ timeoutMs,
2559
+ maxOutputBytes
2560
+ };
2561
+ }
2562
+ async function protectedTree(options) {
2563
+ const workspace = await realpath(options.workspaceRoot);
2564
+ const tree = await realpath(options.tree);
2565
+ if (!contains(workspace, tree) || !(await stat(tree)).isDirectory()) throw new Error("Tree must be a directory inside the workspace");
2566
+ return {
2567
+ workspace,
2568
+ tree
2569
+ };
2570
+ }
2571
+ /** Box-workspace-relative directory that receives the tree and is the command's cwd. */
2572
+ const BOX_TREE = "tree";
2573
+ /** Bound on provisioning, delivery, and deletion; the box expires even if this process dies. */
2574
+ const BOX_SETUP_SECONDS = 900;
2575
+ /** The box's own process timeout is a backstop behind this module's deadline. */
2576
+ const BOX_PROCESS_BACKSTOP_MS = 3e4;
2577
+ /** Concurrent file deliveries into one check box. */
2578
+ const BOX_UPLOADS = 4;
2579
+ /** The box's process supervisor prefixes this to stderr when it cannot start the executable. */
2580
+ const BOX_EXEC_FAILURE = "process-supervisor: exec failed";
2581
+ async function runInBox(options, placement) {
2582
+ let box;
2583
+ let evidence;
2584
+ let result;
2585
+ try {
2586
+ const { timeoutMs, maxOutputBytes } = checkLimits(options);
2587
+ if (options.signal?.aborted) return {
2588
+ succeeded: false,
2589
+ reason: "cancelled",
2590
+ diagnostic: "Check cancelled"
2591
+ };
2592
+ const { tree } = await protectedTree(options);
2593
+ const captured = await captureMaterializedWorkspace(tree);
2594
+ if (placement.builderAccounts.length === 0 || placement.builderAccounts.some((id) => !id)) throw new Error("builderAccounts must name the account of every key the judged run holds");
2595
+ const account = (await placement.client.getIdentity()).customerId;
2596
+ if (!account) throw new Error("Sandbox returned no account for the check key");
2597
+ if (placement.builderAccounts.includes(account)) throw new Error(`Check account ${account} is an account the judged run holds a key to, so the run can reach the check box`);
2598
+ options.signal?.throwIfAborted();
2599
+ box = await placement.client.createIsolated({
2600
+ environment: placement.environment,
2601
+ agent: false,
2602
+ bare: false,
2603
+ ephemeral: true,
2604
+ egressPolicy: { mode: "blocked" },
2605
+ ...placement.resources ? { resources: placement.resources } : {},
2606
+ maxLifetimeSeconds: Math.ceil(timeoutMs / 1e3) + BOX_SETUP_SECONDS,
2607
+ idempotencyKey: `agent-runtime-check-${randomUUID()}`
2608
+ }, options.signal ? { signal: options.signal } : void 0);
2609
+ const receipt = box.createReceipt();
2610
+ if (receipt?.outcome !== "created" || receipt.ownerContext !== "isolated" || !Array.isArray(receipt.injectedSecrets) || receipt.injectedSecrets.length !== 0) throw new Error("Sandbox did not confirm a fresh box with no owner secrets");
2611
+ const egress = (await box.egress.get()).policy;
2612
+ if (egress.mode !== "blocked") throw new Error(`Check box egress is ${egress.mode}, not blocked`);
2613
+ await box.fs.mkdir(BOX_TREE, { recursive: true });
2614
+ const digests = new Map(captured.manifest.files.map((entry) => [entry.path, entry.sha256]));
2615
+ const target = box;
2616
+ const pending = [...captured.files];
2617
+ const deliver = async () => {
2618
+ try {
2619
+ for (let file = pending.shift(); file; file = pending.shift()) {
2620
+ options.signal?.throwIfAborted();
2621
+ const received = await target.fs.uploadData(`${BOX_TREE}/${file.path}`, file.bytes, { mode: file.mode });
2622
+ if (`sha256:${received.hash.replace(/^sha256:/, "").toLowerCase()}` !== digests.get(file.path) || received.size !== file.bytes.byteLength) throw new Error(`Check box received different bytes for ${file.path}`);
2623
+ }
2624
+ } catch (error) {
2625
+ pending.length = 0;
2626
+ throw error;
2627
+ }
2628
+ };
2629
+ await Promise.all(Array.from({ length: BOX_UPLOADS }, deliver));
2630
+ evidence = {
2631
+ sandboxId: box.id,
2632
+ account,
2633
+ input: captured.manifest,
2634
+ inputDigest: canonicalCandidateDigest(captured.manifest)
2635
+ };
2636
+ result = await executeInBox(box, options.command, timeoutMs, maxOutputBytes, options.signal);
2637
+ } catch (error) {
2638
+ result = {
2639
+ succeeded: false,
2640
+ reason: options.signal?.aborted ? "cancelled" : "refused",
2641
+ diagnostic: String(error)
2642
+ };
2643
+ }
2644
+ if (box) try {
2645
+ await box.delete();
2646
+ } catch (error) {
2647
+ const cleanupDiagnostic = `Check box ${box.id} was not deleted: ${String(error)}`;
2648
+ result = result.succeeded ? {
2649
+ succeeded: false,
2650
+ reason: "cleanup-failed",
2651
+ diagnostic: cleanupDiagnostic,
2652
+ stdout: result.value.stdout,
2653
+ stderr: result.value.stderr,
2654
+ exitCode: 0
2655
+ } : {
2656
+ ...result,
2657
+ cleanupDiagnostic
2658
+ };
2659
+ }
2660
+ return evidence ? {
2661
+ ...result,
2662
+ box: evidence
2663
+ } : result;
2664
+ }
2665
+ async function executeInBox(box, command, timeoutMs, limit, signal) {
2666
+ const [executable, ...args] = command;
2667
+ const child = await box.process.spawnExact(executable, args, {
2668
+ cwd: BOX_TREE,
2669
+ env: {
2670
+ PATH: "/usr/bin:/bin",
2671
+ HOME: "/tmp",
2672
+ LANG: "C"
2673
+ },
2674
+ inheritEnv: false,
2675
+ timeoutMs: timeoutMs + BOX_PROCESS_BACKSTOP_MS
2676
+ });
2677
+ const stdout = [];
2678
+ const stderr = [];
2679
+ let bytes = 0;
2680
+ let failure;
2681
+ let stopping;
2682
+ const stop = (reason) => {
2683
+ failure ??= reason;
2684
+ stopping ??= child.kill("SIGKILL", { tree: true }).catch(() => void 0);
2685
+ };
2686
+ const clearTimer = armDeadlineTimer(timeoutMs, () => stop("timeout"), true);
2687
+ const cancel = () => stop("cancelled");
2688
+ signal?.addEventListener("abort", cancel, { once: true });
2689
+ if (signal?.aborted) cancel();
2690
+ const capture = async (stream, target) => {
2691
+ for await (const text of stream) {
2692
+ const chunk = Buffer.from(text);
2693
+ const remaining = Math.max(0, limit - bytes);
2694
+ bytes += chunk.length;
2695
+ if (remaining) target.push(chunk.subarray(0, remaining));
2696
+ if (bytes > limit) stop("output-limit");
2697
+ }
2698
+ };
2699
+ let exitCode;
2700
+ let exitSignal;
2701
+ try {
2702
+ await Promise.all([capture(child.stdout(), stdout), capture(child.stderr(), stderr)]);
2703
+ exitCode = await child.wait();
2704
+ exitSignal = (await child.status()).exitSignal;
2705
+ } finally {
2706
+ clearTimer();
2707
+ signal?.removeEventListener("abort", cancel);
2708
+ await stopping;
2709
+ }
2710
+ const out = Buffer.concat(stdout).toString();
2711
+ const err = Buffer.concat(stderr).toString();
2712
+ const evidence = {
2713
+ stdout: out,
2714
+ stderr: err,
2715
+ exitCode: exitSignal ? null : exitCode
2716
+ };
2717
+ if (failure) return {
2718
+ succeeded: false,
2719
+ reason: failure,
2720
+ diagnostic: err || failure,
2721
+ ...evidence
2722
+ };
2723
+ if (exitCode === 127 && err.startsWith(BOX_EXEC_FAILURE)) return {
2724
+ succeeded: false,
2725
+ reason: "refused",
2726
+ diagnostic: err,
2727
+ ...evidence
2728
+ };
2729
+ if (exitSignal) return {
2730
+ succeeded: false,
2731
+ reason: "failed",
2732
+ diagnostic: err || `Check killed by ${exitSignal}`,
2733
+ ...evidence
2734
+ };
2735
+ if (exitCode !== 0) return {
2736
+ succeeded: false,
2737
+ reason: "failed",
2738
+ diagnostic: err || out || `Check exited ${exitCode}`,
2739
+ ...evidence
2740
+ };
2741
+ return {
2742
+ succeeded: true,
2743
+ value: {
2744
+ stdout: out,
2745
+ stderr: err
2746
+ }
2747
+ };
2748
+ }
2551
2749
  function execute(args, timeoutMs, limit, signal) {
2552
2750
  return new Promise((done) => {
2553
2751
  const child = spawn("/usr/bin/bwrap", [
@@ -5134,7 +5332,7 @@ async function runStrategyEvolution(cfg) {
5134
5332
  if (c.error) continue;
5135
5333
  if (!c.file || !c.sourceSha256) throw new Error(`evolution resume: missing source identity for '${c.name}'`);
5136
5334
  const bytes = readFileSync(c.file);
5137
- if (sha256Bytes(bytes) !== c.sourceSha256) throw new Error(`evolution resume: authored source changed for '${c.name}' (${c.file})`);
5335
+ if (sha256Bytes$1(bytes) !== c.sourceSha256) throw new Error(`evolution resume: authored source changed for '${c.name}' (${c.file})`);
5138
5336
  const sourceUrl = pathToFileURL(c.file);
5139
5337
  sourceUrl.searchParams.set("sha256", c.sourceSha256);
5140
5338
  const mod = await import(sourceUrl.href);
@@ -5188,7 +5386,7 @@ async function runStrategyEvolution(cfg) {
5188
5386
  candidates.push({
5189
5387
  name: unique,
5190
5388
  file: authored.file,
5191
- sourceSha256: sha256Bytes(Buffer.from(authored.code)),
5389
+ sourceSha256: sha256Bytes$1(Buffer.from(authored.code)),
5192
5390
  gzipBits: gzipSync(Buffer.from(authored.code)).length * 8,
5193
5391
  codeChars: authored.code.length
5194
5392
  });
@@ -7168,4 +7366,4 @@ function tail(s) {
7168
7366
  //#endregion
7169
7367
  export { InMemoryCorpus as $, chatWorkerSeam as A, pairwiseSignificance as At, SandboxRunAbortError as B, createMcpEnvironment as Bt, withUntrackedArtifacts as C, loopDispatch as Ct, codeModeSupervisorTools as D, sentinelCompletion as Dt, runCoderChecks as E, deterministicCompletion as Et, selectChampion as F, auditIntent as Ft, equalKOnCost as G, resolveSecretEnv as Gt, printBenchmarkReport as H, envKeyProvider as Ht, assertStrategyContract as I, defaultAuditorInstruction as It, runPersonified as J, trajectoryReport as K, secretEnvOfMcpServer as Kt, authorStrategy as L, McpSpawnFault as Lt, discriminatingMeans as M, renderLeaderboardMarkdown as Mt, pickChampion as N, renderLeaderboardSvg as Nt, unsafeInProcessRunner as O, stopSentinel as Ot, runStrategyEvolution as P, renderPairwiseMarkdown as Pt, FileCorpus as Q, strategyAuthorContract as R, connectStdioMcp as Rt, copyUntrackedIntoClone as S, loopCampaignDispatch as St, patchDelivered as T, completionAuthorizes as Tt, runBenchmark as U, mcpSecretEnvMetadataKey as Ut, openSandboxRun as V, sanitizeMcpToolSchema as Vt, promotionGate as W, resolveMcpServerLaunch as Wt, createShapeRegistry as X, builtinShapes as Y, registerShape as Z, NOTE_MAX_CHARS as _, harvestCorpus as _t, localShell as a, pipeline as at, composeWorkerEvidence as b, localSandboxClient as bt, createVerifierEnvironment as c, widen as ct, harvestSurfaceDiffs as d, createScopeAnalyst as dt, renderCorpusToInstructions as et, analystsFromRegistry as f, registryScopeAnalyst as ft, EVIDENCE_MAX_CHARS as g, HarvestError as gt, worktreeFanout as h, inProcessSandboxClient as ht, jjWorkspace as i, panel as it, createChatSessionStore as j, renderLeaderboardHtml as jt, chatTransportExecutor as k, leaderboard as kt, boxSurfaceReader as l, assertTraceDerivedFindings as lt, superviseSurface as m, runIsolatedCheck as mt, makeFinding$1 as n, flatWidenGate as nt, runInWorkspace as o, selectValidWinner as ot, failuresAnalyst as p, observationFromRegistry as pt, definePersona as q, createTangleSandboxExactProcessProvider as qt, gitWorkspace as r, loopUntil as rt, createWaterfallCollector as s, verify as st, computeFindingId$1 as t, fanout as tt, fsSurfaceReader as u, buildSteerContext as ut, VERIFY_TAIL_CHARS as v, defineLeaderboard as vt, analyzeTrace as w, superviseDispatch as wt, settledWorkerOut as x, inlineSandboxClient as xt, closingWorkerNote as y, resolveSandboxClient as yt, strategyAuthorSystemPrompt as z, materializeLocalMcp as zt };
7170
7368
 
7171
- //# sourceMappingURL=runtime-DKiucqGX.js.map
7369
+ //# sourceMappingURL=runtime-BbQmK7qe.js.map