@tangle-network/agent-runtime 9.0.12 → 9.0.13

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 (67) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{activation-9d6FnAzl.js → activation-CB3FgbhP.js} +2 -2
  3. package/dist/{activation-9d6FnAzl.js.map → activation-CB3FgbhP.js.map} +1 -1
  4. package/dist/{activation-emYXDX7T.d.ts → activation-druKjqeg.d.ts} +2 -2
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +2 -2
  7. package/dist/{coordination-manager-B9IoDRvk.js → coordination-manager-DGLireA0.js} +4 -4
  8. package/dist/{coordination-manager-B9IoDRvk.js.map → coordination-manager-DGLireA0.js.map} +1 -1
  9. package/dist/{delegate-D32RG_Cl.js → delegate-DkmUWRTv.js} +2 -2
  10. package/dist/{delegate-D32RG_Cl.js.map → delegate-DkmUWRTv.js.map} +1 -1
  11. package/dist/durable.d.ts +1 -1
  12. package/dist/durable.js +8 -8
  13. package/dist/{graph-DJ2LBojm.js → graph-RSKyd-_g.js} +423 -126
  14. package/dist/graph-RSKyd-_g.js.map +1 -0
  15. package/dist/{improve-DYchq0l9.js → improve-D77Hq7bo.js} +5 -5
  16. package/dist/{improve-DYchq0l9.js.map → improve-D77Hq7bo.js.map} +1 -1
  17. package/dist/index.d.ts +3 -3
  18. package/dist/index.js +9 -9
  19. package/dist/intelligence.d.ts +2 -2
  20. package/dist/intelligence.js +4 -4
  21. package/dist/kernel.d.ts +2 -2
  22. package/dist/kernel.js +13 -13
  23. package/dist/{loop-runner-CvGcU6kQ.js → loop-runner-B-k9u4Vs.js} +2 -2
  24. package/dist/{loop-runner-CvGcU6kQ.js.map → loop-runner-B-k9u4Vs.js.map} +1 -1
  25. package/dist/{loop-runner-Q9nlHcEH.d.ts → loop-runner-DN8kPiwC.d.ts} +2 -2
  26. package/dist/loop-runner-bin.d.ts +1 -1
  27. package/dist/loop-runner-bin.js +1 -1
  28. package/dist/mcp/bin.js +3 -3
  29. package/dist/mcp/index.d.ts +1 -1
  30. package/dist/mcp/index.js +5 -5
  31. package/dist/profiles.d.ts +1 -1
  32. package/dist/{provision-supervisor-p0WkcIb4.js → provision-supervisor-h3xHBR4a.js} +4 -4
  33. package/dist/{provision-supervisor-p0WkcIb4.js.map → provision-supervisor-h3xHBR4a.js.map} +1 -1
  34. package/dist/{run-cancellation-CcCEIYtQ.js → run-cancellation-BbM8qZQS.js} +2 -2
  35. package/dist/{run-cancellation-CcCEIYtQ.js.map → run-cancellation-BbM8qZQS.js.map} +1 -1
  36. package/dist/{run-state-WWnIQsgz.js → run-state-eDCDYXXQ.js} +5 -5
  37. package/dist/{run-state-WWnIQsgz.js.map → run-state-eDCDYXXQ.js.map} +1 -1
  38. package/dist/{runtime-DuDo3yHY.js → runtime-lQ7NmAaw.js} +184 -15
  39. package/dist/runtime-lQ7NmAaw.js.map +1 -0
  40. package/dist/{search-executor-ZIqwd0aB.js → search-executor-CIRcqZor.js} +3 -3
  41. package/dist/{search-executor-ZIqwd0aB.js.map → search-executor-CIRcqZor.js.map} +1 -1
  42. package/dist/{server-DLd6Abqg.js → server-CCqBzpYt.js} +3 -3
  43. package/dist/{server-DLd6Abqg.js.map → server-CCqBzpYt.js.map} +1 -1
  44. package/dist/{settle-record-B1qjqD2y.js → settle-record-BtI6hieb.js} +2 -2
  45. package/dist/{settle-record-B1qjqD2y.js.map → settle-record-BtI6hieb.js.map} +1 -1
  46. package/dist/{structural-rollout-CqIhMyrN.js → structural-rollout-BpuG0cEv.js} +3 -3
  47. package/dist/{structural-rollout-CqIhMyrN.js.map → structural-rollout-BpuG0cEv.js.map} +1 -1
  48. package/dist/{supervise-lM5Idn82.js → supervise-CPm-6Kqg.js} +5 -5
  49. package/dist/{supervise-lM5Idn82.js.map → supervise-CPm-6Kqg.js.map} +1 -1
  50. package/dist/{supervision-discovery-DNepOgEj.js → supervision-discovery-DqT5WUUN.js} +2 -2
  51. package/dist/{supervision-discovery-DNepOgEj.js.map → supervision-discovery-DqT5WUUN.js.map} +1 -1
  52. package/dist/{supervisor-D-C8km75.js → supervisor-CtS12u8Y.js} +2 -2
  53. package/dist/{supervisor-D-C8km75.js.map → supervisor-CtS12u8Y.js.map} +1 -1
  54. package/dist/{supervisor-accounting-Bm311x8u.js → supervisor-accounting-CMdpc2LW.js} +2 -2
  55. package/dist/supervisor-accounting-CMdpc2LW.js.map +1 -0
  56. package/dist/testing.d.ts +1 -1
  57. package/dist/testing.js +11 -11
  58. package/dist/{top-web-CMlmo2VC.js → top-web-JnHgbTEg.js} +5 -5
  59. package/dist/{top-web-CMlmo2VC.js.map → top-web-JnHgbTEg.js.map} +1 -1
  60. package/dist/tui/bin.js +3 -3
  61. package/dist/tui/index.d.ts +1 -1
  62. package/dist/tui/index.js +2 -2
  63. package/dist/{types-DMqr8Tmx.d.ts → types-DQkRr7Iy.d.ts} +145 -3
  64. package/package.json +2 -2
  65. package/dist/graph-DJ2LBojm.js.map +0 -1
  66. package/dist/runtime-DuDo3yHY.js.map +0 -1
  67. package/dist/supervisor-accounting-Bm311x8u.js.map +0 -1
@@ -1,30 +1,30 @@
1
- import { A as readPromptOptions, F as defaultSelectWinner, H as routerBrain, J as createWorktreeCliExecutor, M as createSandboxLineage, O as runAgentRounds, _t as CheckUnavailableError, b as InMemorySpawnJournal, bt as mapExecutorResult, k as assertBoxlessPromptOptions, n as createSupervisor, v as withDriverExecutor, w as createExecutor, x as createExecutorRegistry, xt as verdictFromJudgeScore, y as InMemoryResultBlobStore, yt as gateOnDeliverable } from "./supervisor-D-C8km75.js";
1
+ import { A as readPromptOptions, F as defaultSelectWinner, H as routerBrain, J as createWorktreeCliExecutor, M as createSandboxLineage, O as runAgentRounds, _t as CheckUnavailableError, b as InMemorySpawnJournal, bt as mapExecutorResult, k as assertBoxlessPromptOptions, n as createSupervisor, v as withDriverExecutor, w as createExecutor, x as createExecutorRegistry, xt as verdictFromJudgeScore, y as InMemoryResultBlobStore, yt as gateOnDeliverable } from "./supervisor-CtS12u8Y.js";
2
2
  import { N as contentAddress, ht as createSandboxTurnEventCollector, r as runtimeFailureCauseSchema, yt as notifySandboxEventObserver } from "./failure-cause-WifbY42M.js";
3
- import "./run-state-WWnIQsgz.js";
4
- import { It as coordinationProfileToolPrefix, Jr as executableAgentSpecSnapshot, P as isTraceAnalysisStore, Y as settledToIteration, cn as insideCursorNamespace, et as rollingDispatch, qr as executableAgentProfileSnapshot } from "./supervisor-accounting-Bm311x8u.js";
5
- import { F as kernelPromptRegistry, O as validateGraphTopology, T as validateFlowGraph, g as coordinationControlToolNames, t as supervise, v as runBrainLoop } from "./supervise-lM5Idn82.js";
3
+ import "./run-state-eDCDYXXQ.js";
4
+ import { It as coordinationProfileToolPrefix, Jr as executableAgentSpecSnapshot, P as isTraceAnalysisStore, Y as settledToIteration, cn as insideCursorNamespace, et as rollingDispatch, qr as executableAgentProfileSnapshot } from "./supervisor-accounting-CMdpc2LW.js";
5
+ import { F as kernelPromptRegistry, O as validateGraphTopology, T as validateFlowGraph, g as coordinationControlToolNames, t as supervise, v as runBrainLoop } from "./supervise-CPm-6Kqg.js";
6
6
  import { T as zeroSpend, a as cloneSpend, c as errorMessage, d as isAbortError, f as isAsyncIterable, h as randomSuffix, i as chargedTokens, l as fnv1a32Hex, n as addSpend, p as mapWithConcurrency, u as hasCompleteCacheBreakdown, v as sleep, y as stringifySafe } from "./util-qsH5cC9S.js";
7
7
  import { a as captureMaterializedWorkspace, b as sha256Bytes$1, m as canonicalCandidateDigest$1, v as immutableCandidateValue } from "./output-artifacts-AqkZ8lO2.js";
8
8
  import { i as ConfigError, m as ValidationError, n as AnalystError, s as PlannerError } from "./errors-DG8yufqX.js";
9
- import { c as runIsolatedCheck } from "./graph-DJ2LBojm.js";
9
+ import { c as runIsolatedCheck, l as createIsolatedCheckCpuSession } from "./graph-RSKyd-_g.js";
10
10
  import { a as concreteProfileModel, c as profileModelExecutionSettings, i as concreteModelId, l as profileProviderModel, o as enforceTokenLimits, p as canonicalObservedModelParts, t as assertExecutableAgentProfile, v as harnessRunsAgent } from "./model-policy-CZwhXp8O.js";
11
11
  import { i as redactProtectedValue, r as redactProtectedReason } from "./protected-redaction-DilFZch5.js";
12
12
  import { o as armDeadlineTimer } from "./deadline-CySmJ_0S.js";
13
- import { D as runAgentic, E as refine, M as renderReport, N as profileChatClient, O as sample, j as observe, k as ObservationError, v as loadAuthoredStrategy, x as strategyAuthorContract, y as requestStrategySource } from "./structural-rollout-CqIhMyrN.js";
13
+ import { D as runAgentic, E as refine, M as renderReport, N as profileChatClient, O as sample, j as observe, k as ObservationError, v as loadAuthoredStrategy, x as strategyAuthorContract, y as requestStrategySource } from "./structural-rollout-BpuG0cEv.js";
14
14
  import { a as readCommittedJsonLines, c as appendCommittedJsonLine, i as readCommittedJsonFile, m as runAbortable, o as upsertCommittedJsonLine, s as withJsonlFileLock, t as isNoEntError } from "./jsonl-file-BhuxeejY.js";
15
15
  import { n as detachedSnapshot, t as detachedFrozen } from "./snapshot-BKI_w3JD.js";
16
16
  import { v as markPutStreamVerified } from "./workspace-streams-BakRr-Pl.js";
17
- import "./provision-supervisor-p0WkcIb4.js";
17
+ import "./provision-supervisor-h3xHBR4a.js";
18
18
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-CsW2pfFk.js";
19
- import { a as reconcileInterruptedSearchCalls, c as searchExecutor, r as dedicatedLane, x as runtimeShipDecision } from "./search-executor-ZIqwd0aB.js";
20
- import "./delegate-D32RG_Cl.js";
19
+ import { a as reconcileInterruptedSearchCalls, c as searchExecutor, r as dedicatedLane, x as runtimeShipDecision } from "./search-executor-CIRcqZor.js";
20
+ import "./delegate-DkmUWRTv.js";
21
21
  import "./continuation-CZaeHEzQ.js";
22
22
  import { S as graphRouteWhenSchema, _ as compileGraphParameters, a as graphRegistry, d as recordGraphRun, g as bindGraphParameters, h as assertGraphTriggerBindings, i as graphFromStored, j as assertJsonData, l as lookupGraph, m as taskShapeDigest, o as graphRunsFor, r as graphDigest, t as digestOfGraph, v as graphTriggerBindingsSchema, x as graphFileSchema, y as graphCheckNodeSchema } from "./graph-registry-BbZN5deo.js";
23
- import { y as foldCoordinationRecords } from "./run-cancellation-CcCEIYtQ.js";
24
- import { a as downMessageRefusalReasons, p as createInMemoryRunContext } from "./coordination-manager-B9IoDRvk.js";
23
+ import { y as foldCoordinationRecords } from "./run-cancellation-BbM8qZQS.js";
24
+ import { a as downMessageRefusalReasons, p as createInMemoryRunContext } from "./coordination-manager-DGLireA0.js";
25
25
  import { a as writeAtomicDurableFile } from "./durable-file-DstVeHcj.js";
26
- import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, sha256Bytes, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
27
- 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";
26
+ import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, sha256Bytes, sha256DigestSchema, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
27
+ import { CODING_HARNESSES, DEFAULT_TRACE_ANALYST_KINDS, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, createTraceAnalyst, expandProfileAxes, makeFinding as makeFinding$1, meanConfidenceInterval, pairedBootstrap, paretoFrontier, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
28
28
  import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
29
29
  import { collectAgentResponseText } from "@tangle-network/sandbox";
30
30
  import { z } from "zod";
@@ -2809,6 +2809,175 @@ function observationFromRegistry(registry, options) {
2809
2809
  }
2810
2810
  };
2811
2811
  }
2812
+ // src/runtime/paired-commands.ts
2813
+ /** One sequential cgroup, identity AAAA then candidate ABBA for each fixed case/cycle.
2814
+ * CPU means user + system deltas, including post-membership launcher/namespace work.
2815
+ * Infer over complete cycle means, conditional on these cases; no cases are sampled or dropped.
2816
+ * Student-t bounds assume stationary independent normal cycle errors. Passing engineering
2817
+ * controls does not establish those assumptions, nominal coverage, or domain correctness.
2818
+ */
2819
+ async function measurePairedCommands(options) {
2820
+ const began = performance.now();
2821
+ const result = {
2822
+ verdict: "unknown",
2823
+ diagnostic: "Measurement incomplete",
2824
+ calls: [],
2825
+ retainedCalls: 0,
2826
+ cycles: [],
2827
+ summaries: [],
2828
+ cost: {
2829
+ knownWorkloadCpuUsec: 0,
2830
+ knownUsageCpuUsec: 0,
2831
+ cpuComplete: true,
2832
+ wallMs: 0,
2833
+ evidenceBytes: 0
2834
+ }
2835
+ };
2836
+ let session;
2837
+ let clearTimer;
2838
+ const controller = new AbortController();
2839
+ let candidateInvalid = false;
2840
+ try {
2841
+ const positiveInteger = (n) => Number.isSafeInteger(n) && n > 0;
2842
+ const candidatePresent = options.cases.some((c) => c.candidate !== void 0);
2843
+ const prefixes = options.identityPrefixes ?? [options.blocksPerCase];
2844
+ if (typeof options.retainCall !== "function" || typeof options.sameOutput !== "function" || !options.cases.length || new Set(options.cases.map((c) => c.id)).size !== options.cases.length || options.cases.some((c) => !c.id || c.id.length > 200 || candidatePresent !== (c.candidate !== void 0)) || !positiveInteger(options.blocksPerCase) || !positiveInteger(options.wallLimitMs) || !positiveInteger(options.maxEvidenceBytes) || !Number.isFinite(options.minimumRatio) || options.minimumRatio <= 1 || !Number.isFinite(options.confidence) || options.confidence <= .5 || options.confidence >= 1 || !Number.isFinite(options.maximumIdentityLogHalfWidth) || options.maximumIdentityLogHalfWidth <= 0 || !prefixes.length || new Set(prefixes).size !== prefixes.length || prefixes.some((n) => !positiveInteger(n) || n < 2 || n > options.blocksPerCase) || candidatePresent && (prefixes.length !== 1 || prefixes[0] !== options.blocksPerCase) || options.cases.some((c) => [c.baseline, ...c.candidate ? [c.candidate] : []].some((check) => !positiveInteger(check.maxOutputBytes) || !Number.isSafeInteger(check.maxOutputBytes * 32 + 131072)))) throw new Error("Invalid fixed paired-command design or resource bounds");
2845
+ sha256DigestSchema.parse(options.comparatorDigest);
2846
+ result.design = {
2847
+ blocksPerCase: options.blocksPerCase,
2848
+ minimumRatio: options.minimumRatio,
2849
+ confidence: options.confidence,
2850
+ maximumIdentityLogHalfWidth: options.maximumIdentityLogHalfWidth,
2851
+ identityPrefixes: [...prefixes],
2852
+ comparatorDigest: options.comparatorDigest,
2853
+ cases: options.cases.map((c) => ({
2854
+ id: c.id,
2855
+ baselineCommand: [...c.baseline.command],
2856
+ ...c.candidate ? { candidateCommand: [...c.candidate.command] } : {}
2857
+ }))
2858
+ };
2859
+ clearTimer = armDeadlineTimer(options.wallLimitMs, () => controller.abort(), true);
2860
+ const signal = options.signal ? AbortSignal.any([options.signal, controller.signal]) : controller.signal;
2861
+ session = await createIsolatedCheckCpuSession();
2862
+ if (!session.succeeded) {
2863
+ result.recoveryCgroupPath = session.recoveryCgroupPath;
2864
+ throw new Error(session.diagnostic);
2865
+ }
2866
+ const cpuSession = session.value;
2867
+ result.sessionId = cpuSession.id;
2868
+ const inputIdentities = /* @__PURE__ */ new Map();
2869
+ const cpu = (check) => {
2870
+ const evidence = check.command?.cpu;
2871
+ if (!evidence?.available || evidence.sessionId !== cpuSession.id || evidence.cgroupPath !== cpuSession.cgroupPath) throw new Error("Exclusive CPU evidence unavailable");
2872
+ const delta = evidence.after.userUsec - evidence.before.userUsec + evidence.after.systemUsec - evidence.before.systemUsec;
2873
+ if (!Number.isSafeInteger(delta) || delta <= 0) throw new Error("Nonpositive or invalid workload CPU delta");
2874
+ return delta;
2875
+ };
2876
+ for (let cycle = 0; cycle < options.blocksPerCase; cycle++) {
2877
+ const row = {
2878
+ identityLogRatio: null,
2879
+ candidateLogRatio: null
2880
+ };
2881
+ result.cycles.push(row);
2882
+ const identityRatios = [];
2883
+ const candidateRatios = [];
2884
+ for (const c of options.cases) for (const phase of candidatePresent ? ["identity", "candidate"] : ["identity"]) {
2885
+ const checks = [];
2886
+ for (let position = 0; position < 4; position++) {
2887
+ if (signal.aborted) throw new Error("Paired-command deadline or cancellation");
2888
+ const isCandidate = phase === "candidate" && (position === 1 || position === 2);
2889
+ const check = isCandidate ? c.candidate : c.baseline;
2890
+ if (result.cost.evidenceBytes + 32 * check.maxOutputBytes + 131072 > options.maxEvidenceBytes) throw new Error("Insufficient evidence capacity for another complete command");
2891
+ const started = performance.now();
2892
+ const execution = await runIsolatedCheck({
2893
+ ...check,
2894
+ cpuSession,
2895
+ signal,
2896
+ timeoutMs: Math.min(check.timeoutMs ?? options.wallLimitMs, Math.max(1, Math.floor(options.wallLimitMs - (started - began))))
2897
+ });
2898
+ const call = {
2899
+ phase,
2900
+ caseId: c.id,
2901
+ cycle,
2902
+ abbaPosition: position,
2903
+ role: position === 0 || position === 3 ? "baseline" : "candidate",
2904
+ fullWallMs: performance.now() - started,
2905
+ execution
2906
+ };
2907
+ result.calls.push(call);
2908
+ result.cost.evidenceBytes += Buffer.byteLength(JSON.stringify(call));
2909
+ const evidence = execution.command?.cpu;
2910
+ if (evidence?.available) {
2911
+ result.cost.knownWorkloadCpuUsec += evidence.after.userUsec - evidence.before.userUsec + evidence.after.systemUsec - evidence.before.systemUsec;
2912
+ result.cost.knownUsageCpuUsec += evidence.after.usageUsec - evidence.before.usageUsec;
2913
+ } else result.cost.cpuComplete = false;
2914
+ const retaining = new AbortController();
2915
+ const clearRetention = armDeadlineTimer(signal.aborted ? 1 : Math.max(1, Math.floor(options.wallLimitMs - (performance.now() - began))), () => retaining.abort(), true);
2916
+ try {
2917
+ await runAbortable(() => options.retainCall(structuredClone(call)), retaining.signal, "Raw call retention deadline");
2918
+ result.retainedCalls++;
2919
+ } finally {
2920
+ clearRetention();
2921
+ }
2922
+ const inputKey = JSON.stringify([c.id, isCandidate]);
2923
+ const inputDigest = execution.command?.inputDigest;
2924
+ if (inputDigest && !inputIdentities.has(inputKey)) inputIdentities.set(inputKey, inputDigest);
2925
+ if (!inputDigest || inputIdentities.get(inputKey) !== inputDigest) throw new Error("Copied input identity unavailable or changed within a fixed case");
2926
+ if (result.cost.evidenceBytes > options.maxEvidenceBytes) throw new Error("Evidence capacity exceeded; preserve complete recovery records");
2927
+ checks.push(execution);
2928
+ }
2929
+ if (checks.some((check, position) => !check.succeeded && (phase === "identity" || position === 0 || position === 3 || check.reason !== "failed")) || checks.some((check) => !check.command?.outputComplete)) throw new Error("Incomplete baseline, identity, infrastructure or output evidence");
2930
+ const validOutputs = checks.every((check) => check.succeeded) && await runAbortable(async () => options.sameOutput(c.id, output(checks[0]), output(checks[1])), signal, "Comparator cancelled") && await runAbortable(async () => options.sameOutput(c.id, output(checks[3]), output(checks[2])), signal, "Comparator cancelled");
2931
+ if (phase === "identity" && !validOutputs) throw new Error("Identity outputs disagree");
2932
+ if (!validOutputs) candidateInvalid = true;
2933
+ const values = checks.map(cpu);
2934
+ const logRatio = (Math.log(values[0]) + Math.log(values[3]) - Math.log(values[1]) - Math.log(values[2])) / 2;
2935
+ (phase === "identity" ? identityRatios : candidateRatios).push(logRatio);
2936
+ }
2937
+ row.identityLogRatio = identityRatios.reduce((a, b) => a + b, 0) / options.cases.length;
2938
+ if (candidatePresent) row.candidateLogRatio = candidateRatios.reduce((a, b) => a + b, 0) / options.cases.length;
2939
+ }
2940
+ for (const count of prefixes) {
2941
+ const rows = result.cycles.slice(0, count);
2942
+ const identity = meanConfidenceInterval(rows.map((row) => row.identityLogRatio), options.confidence);
2943
+ const candidate = candidatePresent ? meanConfidenceInterval(rows.map((row) => row.candidateLogRatio), 2 * options.confidence - 1) : null;
2944
+ const identityValid = usable(identity) && identity.low <= 0 && identity.high >= 0 && (identity.high - identity.low) / 2 <= options.maximumIdentityLogHalfWidth;
2945
+ const verdict = !identityValid || !candidatePresent ? "unknown" : candidateInvalid ? "not-qualified" : !usable(candidate) ? "unknown" : candidate.low > Math.log(options.minimumRatio) ? "qualified" : "not-qualified";
2946
+ result.summaries.push({
2947
+ cycles: count,
2948
+ identityInterval: identity,
2949
+ candidateInterval: candidate,
2950
+ identityValid,
2951
+ verdict
2952
+ });
2953
+ }
2954
+ result.verdict = result.summaries.at(-1).verdict;
2955
+ result.diagnostic = !candidatePresent ? "Identity-only precision measurement" : result.verdict === "unknown" ? "Identity precision or candidate interval unavailable" : candidateInvalid ? "Candidate execution or output comparison failed" : "Fixed-count CPU comparison complete";
2956
+ } catch (error) {
2957
+ result.verdict = "unknown";
2958
+ result.diagnostic = String(error);
2959
+ } finally {
2960
+ clearTimer?.();
2961
+ if (session?.succeeded) try {
2962
+ await session.value.close();
2963
+ } catch (error) {
2964
+ result.verdict = "unknown";
2965
+ result.cleanupDiagnostic = String(error);
2966
+ result.recoveryCgroupPath = session.value.cgroupPath;
2967
+ }
2968
+ result.cost.wallMs = performance.now() - began;
2969
+ }
2970
+ return result;
2971
+ }
2972
+ function output(check) {
2973
+ return {
2974
+ stdoutBase64: check.command.stdoutBase64,
2975
+ stderrBase64: check.command.stderrBase64
2976
+ };
2977
+ }
2978
+ function usable(interval) {
2979
+ return interval.n >= 2 && interval.stdev !== null && interval.stdev > 0 && interval.low !== null && interval.high !== null && Number.isFinite(interval.low) && Number.isFinite(interval.high);
2980
+ }
2812
2981
  // src/runtime/personify/analyst.ts
2813
2982
  /**
2814
2983
  * The diagnosis a combinator steers from must be TRACE-derived, never JUDGE-derived. A finding
@@ -9644,6 +9813,6 @@ async function runInWorkspace(ws, body, opts = {}) {
9644
9813
  function tail(s) {
9645
9814
  return s.slice(-400);
9646
9815
  }
9647
- export { openSandboxRun as $, leaderboard as $t, searchPresets as A, connectStdioMcp as At, graphFromSessionFacts as B, loopCampaignDispatch as Bt, withUntrackedArtifacts as C, observationFromRegistry as Ct, SEARCH_SPEC_CORRELATION_KEY as D, defineLeaderboard as Dt, createFencedSqlRunContext as E, harvestCorpus as Et, loadProfile as F, mcpSecretEnvMetadataKey as Ft, setGraphStrings as G, declaredCheckDeliverable as Gt, graphWorkspace as H, superviseDispatch as Ht, pickBestProfile as I, resolveMcpServerLaunch as It, chatWorkerSeam as J, readDeclaredCheck as Jt, graphDesignerExtraTools as K, declaredCheckDigest as Kt, profileRegistry as L, resolveSecretEnv as Lt, connectRemoteSupervisor as M, createMcpEnvironment as Mt, connectRemoteSupervisorControl as N, sanitizeMcpToolSchema as Nt, assertSearchSpec as O, resolveSandboxClient as Ot, bestProfileFor as P, envKeyProvider as Pt, SandboxRunAbortError as Q, stopSentinel as Qt, profileRunsForName as R, secretEnvOfMcpServer as Rt, copyUntrackedIntoClone as S, registryScopeAnalyst as St, validateStoredGraph as T, HarvestError as Tt, loadGraphFile as U, assertDeclaredCheck as Ut, GraphFileResolutionError as V, loopDispatch as Vt, readGraphStrings as W, checkProgramDigest as Wt, runStrategyEvolution as X, deterministicCompletion as Xt, createChatSessionStore as Y, completionAuthorizes as Yt, strategyTournament as Z, sentinelCompletion as Zt, NOTE_MAX_CHARS as _, verify as _t, localShell as a, SqlRunOwnershipError as an, trajectoryReport as at, composeWorkerEvidence as b, buildSteerContext as bt, createVerifierEnvironment as c, FileCorpus as ct, harvestSurfaceDiffs as d, fanout as dt, pairwiseSignificance as en, createS3PrivateCasStore as et, analystsFromRegistry as f, flatWidenGate as ft, EVIDENCE_MAX_CHARS as g, selectValidWinner as gt, runCoderChecks as h, pipeline as ht, jjWorkspace as i, renderPairwiseMarkdown as in, equalKOnCost as it, searchSpecDigest as j, materializeLocalMcp as jt, compileSearchSpec as k, McpSpawnFault as kt, boxSurfaceReader as l, InMemoryCorpus as lt, worktreeFanout as m, panel as mt, makeFinding$1 as n, renderLeaderboardMarkdown as nn, runBenchmark as nt, runInWorkspace as o, openSqlRunStore as on, definePersona as ot, failuresAnalyst as p, loopUntil as pt, chatTransportExecutor as q, declaredCheckJudge as qt, gitWorkspace as r, renderLeaderboardSvg as rn, createPrivateCasArtifactPort as rt, createWaterfallCollector as s, runPersonified as st, computeFindingId$1 as t, renderLeaderboardHtml as tn, printBenchmarkReport as tt, fsSurfaceReader as u, renderCorpusToInstructions as ut, VERIFY_TAIL_CHARS as v, widen as vt, analyzeTrace as w, inProcessSandboxClient as wt, settledWorkerOut as x, createScopeAnalyst as xt, closingWorkerNote as y, assertTraceDerivedFindings as yt, recordProfileRun as z, inlineSandboxClient as zt };
9816
+ export { openSandboxRun as $, stopSentinel as $t, searchPresets as A, McpSpawnFault as At, graphFromSessionFacts as B, inlineSandboxClient as Bt, withUntrackedArtifacts as C, measurePairedCommands as Ct, SEARCH_SPEC_CORRELATION_KEY as D, harvestCorpus as Dt, createFencedSqlRunContext as E, HarvestError as Et, loadProfile as F, envKeyProvider as Ft, setGraphStrings as G, checkProgramDigest as Gt, graphWorkspace as H, loopDispatch as Ht, pickBestProfile as I, mcpSecretEnvMetadataKey as It, chatWorkerSeam as J, declaredCheckJudge as Jt, graphDesignerExtraTools as K, declaredCheckDeliverable as Kt, profileRegistry as L, resolveMcpServerLaunch as Lt, connectRemoteSupervisor as M, materializeLocalMcp as Mt, connectRemoteSupervisorControl as N, createMcpEnvironment as Nt, assertSearchSpec as O, defineLeaderboard as Ot, bestProfileFor as P, sanitizeMcpToolSchema as Pt, SandboxRunAbortError as Q, sentinelCompletion as Qt, profileRunsForName as R, resolveSecretEnv as Rt, copyUntrackedIntoClone as S, registryScopeAnalyst as St, validateStoredGraph as T, inProcessSandboxClient as Tt, loadGraphFile as U, superviseDispatch as Ut, GraphFileResolutionError as V, loopCampaignDispatch as Vt, readGraphStrings as W, assertDeclaredCheck as Wt, runStrategyEvolution as X, completionAuthorizes as Xt, createChatSessionStore as Y, readDeclaredCheck as Yt, strategyTournament as Z, deterministicCompletion as Zt, NOTE_MAX_CHARS as _, verify as _t, localShell as a, renderPairwiseMarkdown as an, trajectoryReport as at, composeWorkerEvidence as b, buildSteerContext as bt, createVerifierEnvironment as c, FileCorpus as ct, harvestSurfaceDiffs as d, fanout as dt, leaderboard as en, createS3PrivateCasStore as et, analystsFromRegistry as f, flatWidenGate as ft, EVIDENCE_MAX_CHARS as g, selectValidWinner as gt, runCoderChecks as h, pipeline as ht, jjWorkspace as i, renderLeaderboardSvg as in, equalKOnCost as it, searchSpecDigest as j, connectStdioMcp as jt, compileSearchSpec as k, resolveSandboxClient as kt, boxSurfaceReader as l, InMemoryCorpus as lt, worktreeFanout as m, panel as mt, makeFinding$1 as n, renderLeaderboardHtml as nn, runBenchmark as nt, runInWorkspace as o, SqlRunOwnershipError as on, definePersona as ot, failuresAnalyst as p, loopUntil as pt, chatTransportExecutor as q, declaredCheckDigest as qt, gitWorkspace as r, renderLeaderboardMarkdown as rn, createPrivateCasArtifactPort as rt, createWaterfallCollector as s, openSqlRunStore as sn, runPersonified as st, computeFindingId$1 as t, pairwiseSignificance as tn, printBenchmarkReport as tt, fsSurfaceReader as u, renderCorpusToInstructions as ut, VERIFY_TAIL_CHARS as v, widen as vt, analyzeTrace as w, observationFromRegistry as wt, settledWorkerOut as x, createScopeAnalyst as xt, closingWorkerNote as y, assertTraceDerivedFindings as yt, recordProfileRun as z, secretEnvOfMcpServer as zt };
9648
9817
 
9649
- //# sourceMappingURL=runtime-DuDo3yHY.js.map
9818
+ //# sourceMappingURL=runtime-lQ7NmAaw.js.map