@tangle-network/agent-runtime 0.344.0 → 0.349.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 (82) hide show
  1. package/dist/{activation-C5rFWXGj.js → activation-tNGW73Y9.js} +4 -4
  2. package/dist/{activation-C5rFWXGj.js.map → activation-tNGW73Y9.js.map} +1 -1
  3. package/dist/{activation-CGtGr0qu.d.ts → activation-wBipBkCf.d.ts} +2 -2
  4. package/dist/agent.d.ts +1 -1
  5. package/dist/agent.js +3 -3
  6. package/dist/{bundle-DKQtOO9d.js → bundle-1xaJEgjq.js} +2 -2
  7. package/dist/{bundle-DKQtOO9d.js.map → bundle-1xaJEgjq.js.map} +1 -1
  8. package/dist/candidate-execution/index.js +4 -4
  9. package/dist/{coordination-manager-T98ZbsEt.js → coordination-manager-B2Z_MmL9.js} +22 -19
  10. package/dist/coordination-manager-B2Z_MmL9.js.map +1 -0
  11. package/dist/{delegate-CjdtLf1v.js → delegate-Dr-63jFl.js} +2 -2
  12. package/dist/{delegate-CjdtLf1v.js.map → delegate-Dr-63jFl.js.map} +1 -1
  13. package/dist/durable.d.ts +7 -2
  14. package/dist/durable.js +129 -117
  15. package/dist/durable.js.map +1 -1
  16. package/dist/{graph-kgzTaNMA.js → graph-DPejYB3C.js} +6 -5
  17. package/dist/graph-DPejYB3C.js.map +1 -0
  18. package/dist/{improve-DevAd83a.js → improve-DwSahPi1.js} +7 -7
  19. package/dist/{improve-DevAd83a.js.map → improve-DwSahPi1.js.map} +1 -1
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +9 -9
  22. package/dist/intelligence.d.ts +2 -2
  23. package/dist/intelligence.js +6 -6
  24. package/dist/kernel.d.ts +2 -2
  25. package/dist/kernel.js +11 -11
  26. package/dist/{loop-runner-DsVqEv8O.d.ts → loop-runner-C6pGq-2l.d.ts} +2 -2
  27. package/dist/{loop-runner-BM509Zmp.js → loop-runner-CP6MfO1b.js} +2 -2
  28. package/dist/{loop-runner-BM509Zmp.js.map → loop-runner-CP6MfO1b.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 +1 -1
  33. package/dist/mcp/index.js +6 -6
  34. package/dist/mcp/index.js.map +1 -1
  35. package/dist/model-policy-CyCUwHed.js.map +1 -1
  36. package/dist/{prepare-TEEHSJwq.js → prepare-B9wWffjO.js} +3 -3
  37. package/dist/{prepare-TEEHSJwq.js.map → prepare-B9wWffjO.js.map} +1 -1
  38. package/dist/{profile-6OLpbjvV.js → profile-JLJd2wFG.js} +2 -2
  39. package/dist/{profile-6OLpbjvV.js.map → profile-JLJd2wFG.js.map} +1 -1
  40. package/dist/profiles.d.ts +1 -1
  41. package/dist/{provision-supervisor-CysVhSqV.js → provision-supervisor-C4v2vqDo.js} +6 -6
  42. package/dist/{provision-supervisor-CysVhSqV.js.map → provision-supervisor-C4v2vqDo.js.map} +1 -1
  43. package/dist/{durable-file-DLcrzrjL.js → record-events-D93DkpAx.js} +100 -3
  44. package/dist/record-events-D93DkpAx.js.map +1 -0
  45. package/dist/{run-cancellation-CEDiqfhC.js → run-cancellation-CzFhQGMa.js} +11 -9
  46. package/dist/run-cancellation-CzFhQGMa.js.map +1 -0
  47. package/dist/{runtime-B_93oWEv.js → runtime-CsvGCQpl.js} +448 -55
  48. package/dist/runtime-CsvGCQpl.js.map +1 -0
  49. package/dist/{sandbox-profile-compat-_fEtHPCj.js → sandbox-profile-compat-DtuJWFrM.js} +2 -2
  50. package/dist/sandbox-profile-compat-DtuJWFrM.js.map +1 -0
  51. package/dist/{search-executor-t05_9Wwk.js → search-executor-CCb82Umc.js} +5 -5
  52. package/dist/search-executor-CCb82Umc.js.map +1 -0
  53. package/dist/{server-DjrVWzH2.js → server-CKPwZU-I.js} +4 -4
  54. package/dist/{server-DjrVWzH2.js.map → server-CKPwZU-I.js.map} +1 -1
  55. package/dist/{structural-rollout-CpJknIaL.js → structural-rollout-DylC_fwU.js} +3 -3
  56. package/dist/{structural-rollout-CpJknIaL.js.map → structural-rollout-DylC_fwU.js.map} +1 -1
  57. package/dist/{supervise-BuVVC7Bl.js → supervise-BGfm2GlY.js} +293 -87
  58. package/dist/supervise-BGfm2GlY.js.map +1 -0
  59. package/dist/{supervisor-D3M9ab1v.js → supervisor-wS9Ehz_x.js} +454 -187
  60. package/dist/supervisor-wS9Ehz_x.js.map +1 -0
  61. package/dist/testing.d.ts +2 -2
  62. package/dist/testing.js +13 -13
  63. package/dist/{top-snapshot-BGYI6G6K.js → top-snapshot-CflmaDgk.js} +6 -4
  64. package/dist/top-snapshot-CflmaDgk.js.map +1 -0
  65. package/dist/tui/bin.js +2 -2
  66. package/dist/tui/index.d.ts +1 -1
  67. package/dist/tui/index.js +2 -2
  68. package/dist/{types-DztCeYd6.d.ts → types-C8BGOCBn.d.ts} +286 -34
  69. package/package.json +11 -11
  70. package/skills/agent-graphs/SKILL.md +40 -2
  71. package/skills/graph-designer/SKILL.md +6 -0
  72. package/skills/profile-authoring/SKILL.md +1 -1
  73. package/dist/coordination-manager-T98ZbsEt.js.map +0 -1
  74. package/dist/durable-file-DLcrzrjL.js.map +0 -1
  75. package/dist/graph-kgzTaNMA.js.map +0 -1
  76. package/dist/run-cancellation-CEDiqfhC.js.map +0 -1
  77. package/dist/runtime-B_93oWEv.js.map +0 -1
  78. package/dist/sandbox-profile-compat-_fEtHPCj.js.map +0 -1
  79. package/dist/search-executor-t05_9Wwk.js.map +0 -1
  80. package/dist/supervise-BuVVC7Bl.js.map +0 -1
  81. package/dist/supervisor-D3M9ab1v.js.map +0 -1
  82. package/dist/top-snapshot-BGYI6G6K.js.map +0 -1
@@ -1,18 +1,18 @@
1
- import { o as writeAtomicDurableFile } from "./durable-file-DLcrzrjL.js";
2
- import { A as coordinationProfileToolPrefix, Ai as detachedFrozen, At as readPromptOptions, Dr as runAbortable, Ft as defaultSelectWinner, Ht as routerBrain, Mi as contentAddress, Mt as createSandboxLineage, N as settledToIteration, Ot as runAgentRounds, Qi as notifySandboxEventObserver, R as rollingDispatch, Yi as createSandboxTurnEventCollector, _t as readCommittedJsonLines, ar as CheckUnavailableError, bt as insideCursorNamespace, cr as verdictFromJudgeScore, d as withDriverExecutor, dt as InMemorySpawnJournal, gt as readCommittedJsonFile, hi as executableAgentSpecSnapshot, ji as detachedSnapshot, kt as assertBoxlessPromptOptions, ln as createWorktreeCliExecutor, m as isTraceAnalysisStore, mi as executableAgentProfileSnapshot, mt as isNoEntError, n as createSupervisor, or as gateOnDeliverable, pt as appendCommittedJsonLine, sr as mapExecutorResult, ut as InMemoryResultBlobStore, vt as upsertCommittedJsonLine, wt as createExecutor, xt as createExecutorRegistry, yt as withJsonlFileLock } from "./supervisor-D3M9ab1v.js";
1
+ import { s as writeAtomicDurableFile } from "./record-events-D93DkpAx.js";
2
+ import { At as createExecutor, Ct as readCommittedJsonLines, Dt as createExecutorRegistry, Et as insideCursorNamespace, Ft as assertBoxlessPromptOptions, I as coordinationProfileToolPrefix, It as readPromptOptions, Jt as routerBrain, Li as detachedFrozen, Pr as runAbortable, Pt as runAgentRounds, Ri as detachedSnapshot, Rt as createSandboxLineage, Si as executableAgentSpecSnapshot, St as readCommittedJsonFile, Tt as withJsonlFileLock, Vt as defaultSelectWinner, W as rollingDispatch, _ as withDriverExecutor, _t as InMemorySpawnJournal, aa as notifySandboxEventObserver, b as isTraceAnalysisStore, bt as isNoEntError, dr as CheckUnavailableError, gt as InMemoryResultBlobStore, hn as createWorktreeCliExecutor, hr as verdictFromJudgeScore, mr as mapExecutorResult, n as createSupervisor, na as createSandboxTurnEventCollector, pr as gateOnDeliverable, wt as upsertCommittedJsonLine, xi as executableAgentProfileSnapshot, yt as appendCommittedJsonLine, z as settledToIteration, zi as contentAddress } from "./supervisor-wS9Ehz_x.js";
3
3
  import { i as ConfigError, m as ValidationError, n as AnalystError, s as PlannerError } from "./errors-DodWX-cb.js";
4
- 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-CpJknIaL.js";
5
- import { $ as isAbortError, B as sha256Bytes$1, C as WorkspaceScanLimitError, Ct as armDeadlineTimer, E as captureMaterializedWorkspace, K as chargedTokens, P as canonicalCandidateDigest$1, Q as hasCompleteCacheBreakdown, R as immutableCandidateValue, W as addSpend, X as errorMessage, Z as fnv1a32Hex, et as isAsyncIterable, ft as zeroSpend, h as markPutStreamVerified, ot as sleep, q as cloneSpend, rt as randomSuffix, st as stringifySafe, tt as mapWithConcurrency } from "./sandbox-profile-compat-_fEtHPCj.js";
4
+ 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-DylC_fwU.js";
5
+ import { $ as isAbortError, B as sha256Bytes$1, C as WorkspaceScanLimitError, Ct as armDeadlineTimer, E as captureMaterializedWorkspace, K as chargedTokens, P as canonicalCandidateDigest$1, Q as hasCompleteCacheBreakdown, R as immutableCandidateValue, W as addSpend, X as errorMessage, Z as fnv1a32Hex, et as isAsyncIterable, ft as zeroSpend, h as markPutStreamVerified, ot as sleep, q as cloneSpend, rt as randomSuffix, st as stringifySafe, tt as mapWithConcurrency } from "./sandbox-profile-compat-DtuJWFrM.js";
6
6
  import { c as profileModelExecutionSettings, i as concreteModelId, l as profileProviderModel, o as enforceTokenLimits, p as canonicalObservedModelParts, t as assertExecutableAgentProfile, v as harnessRunsAgent } from "./model-policy-CyCUwHed.js";
7
7
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
8
- import { a as reconcileInterruptedSearchCalls, c as searchExecutor, r as dedicatedLane, x as runtimeShipDecision } from "./search-executor-t05_9Wwk.js";
9
- import { g as foldCoordinationRecords, p as createInMemoryRunContext } from "./coordination-manager-T98ZbsEt.js";
10
- import { A as runBrainLoop, S as taskShapeDigest, b as recordGraphRun, f as graphFromStored, m as graphRunsFor, p as graphRegistry, t as supervise, u as digestOfGraph, v as lookupGraph } from "./supervise-BuVVC7Bl.js";
11
- import "./run-cancellation-CEDiqfhC.js";
8
+ import { a as reconcileInterruptedSearchCalls, c as searchExecutor, r as dedicatedLane, x as runtimeShipDecision } from "./search-executor-CCb82Umc.js";
9
+ import { g as foldCoordinationRecords, p as createInMemoryRunContext } from "./coordination-manager-B2Z_MmL9.js";
10
+ import { M as runBrainLoop, f as graphDigest, h as graphRunsFor, m as graphRegistry, p as graphFromStored, t as supervise, u as digestOfGraph, w as taskShapeDigest, x as recordGraphRun, y as lookupGraph } from "./supervise-BGfm2GlY.js";
11
+ import "./run-cancellation-CzFhQGMa.js";
12
12
  import { i as redactProtectedValue, r as redactProtectedReason } from "./protected-redaction-DFCeo4vg.js";
13
- import "./provision-supervisor-CysVhSqV.js";
14
- import "./delegate-CjdtLf1v.js";
15
- import "./graph-kgzTaNMA.js";
13
+ import "./provision-supervisor-C4v2vqDo.js";
14
+ import "./delegate-Dr-63jFl.js";
15
+ import "./graph-DPejYB3C.js";
16
16
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, sha256Bytes, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
17
17
  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";
18
18
  import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
@@ -4586,7 +4586,7 @@ function requireSpend(rolled, id, root) {
4586
4586
  /**
4587
4587
  * Threads that run fsync for the private CAS. Node runs every fs call on libuv's pool of four
4588
4588
  * threads, and an fsync on a busy disk holds its thread until the filesystem journal commits. On
4589
- * drew-gtr-pro's USB disk (2026-10-20) all four sat in jbd2_log_wait_commit and rq_qos_wait while
4589
+ * drew-gtr-pro's USB disk all four sat in jbd2_log_wait_commit and rq_qos_wait while
4590
4590
  * a tree capture had 16 files in flight: four fsyncs shared each journal commit, and every open,
4591
4591
  * read, lstat and link of the capture queued behind them, at about one file per second. On
4592
4592
  * threads of their own, every fsync in flight waits on the same commit and the pool stays free
@@ -5333,7 +5333,7 @@ function streamDurably(layout, digest, path, byteLength, signal) {
5333
5333
  * that finds its digest in flight waits for that copy, then reads the receipt. Copying it again
5334
5334
  * doubles the upload and, for a buffered store, the archive in memory. Reporting it pending
5335
5335
  * failed captures: a capture refuses on any pending object, so two captures sharing one store
5336
- * refused each other (discovery-lab provider-retention, agent-runtime 0.325.6, 2026-10-18).
5336
+ * refused each other (discovery-lab provider-retention, agent-runtime 0.325.6).
5337
5337
  * A copy never waits for a pass, so a pass may wait for a copy.
5338
5338
  */
5339
5339
  function createDurableCopier(layout) {
@@ -5645,50 +5645,204 @@ function printBenchmarkReport(report) {
5645
5645
  }
5646
5646
  }
5647
5647
  //#endregion
5648
- //#region src/runtime/s3-private-cas-store.ts
5649
- const DIGEST = /^sha256:([0-9a-f]{64})$/u;
5650
- const BUCKET = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/u;
5651
- const PREFIX = /^(?:[A-Za-z0-9._-]+\/)*$/u;
5652
- const NAMESPACE = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$/u;
5653
- const POINTER_NAME = /^(?!sha256\/)[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}(?:\/[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}){0,3}$/u;
5654
- const POINTER_MAX_BYTES = 1024 * 1024;
5648
+ //#region src/runtime/s3-private-cas-namespace.ts
5649
+ const NAMESPACE$1 = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$/u;
5650
+ const MAX_PAGE_BYTES = 2 * 1024 * 1024;
5651
+ const fingerprint = (namespace, location, storeIdentity, objects) => `sha256:${createHash("sha256").update(JSON.stringify({
5652
+ namespace,
5653
+ location,
5654
+ storeIdentity,
5655
+ objects
5656
+ })).digest("hex")}`;
5657
+ function xmlText(text) {
5658
+ return text.replace(/&([^;]*);/gu, (_, entity) => {
5659
+ const named = {
5660
+ amp: "&",
5661
+ lt: "<",
5662
+ gt: ">",
5663
+ quot: "\"",
5664
+ apos: "'"
5665
+ };
5666
+ if (named[entity] !== void 0) return named[entity];
5667
+ const numeric = /^#(?:x([0-9a-f]+)|([0-9]+))$/iu.exec(entity);
5668
+ if (!numeric) throw new Error("S3 private CAS list contains an unknown XML entity");
5669
+ const code = Number.parseInt(numeric[1] ?? numeric[2], numeric[1] ? 16 : 10);
5670
+ if (!Number.isSafeInteger(code) || code <= 0 || code > 1114111 || code >= 55296 && code <= 57343) throw new Error("S3 private CAS list contains an invalid XML character");
5671
+ return String.fromCodePoint(code);
5672
+ });
5673
+ }
5674
+ function field(text, name, optional = false) {
5675
+ const values = [...text.matchAll(new RegExp(`<${name}>([^<]*)</${name}>`, "gu"))];
5676
+ if (values.length !== 1) {
5677
+ if (optional && values.length === 0) return void 0;
5678
+ throw new Error(`S3 private CAS list has an invalid ${name}`);
5679
+ }
5680
+ return xmlText(values[0][1]);
5681
+ }
5682
+ async function listPage(response) {
5683
+ const reader = response.body?.getReader();
5684
+ if (!reader) throw new Error("S3 private CAS list returned no body");
5685
+ const chunks = [];
5686
+ let size = 0;
5687
+ try {
5688
+ while (true) {
5689
+ const { value, done } = await reader.read();
5690
+ if (done) break;
5691
+ size += value.byteLength;
5692
+ if (size > MAX_PAGE_BYTES) throw new Error("S3 private CAS list page exceeds its bound");
5693
+ chunks.push(value);
5694
+ }
5695
+ } finally {
5696
+ await reader.cancel().catch(() => void 0);
5697
+ }
5698
+ const text = Buffer.concat(chunks).toString("utf8");
5699
+ if (/<!/u.test(text) || !/^\s*(?:<\?xml[^>]*>\s*)?<ListBucketResult(?:\s[^>]*)?>[\s\S]*<\/ListBucketResult>\s*$/u.test(text)) throw new Error("S3 private CAS list returned an invalid document");
5700
+ if (field(text, "EncodingType") !== "url") throw new Error("S3 private CAS list did not encode keys");
5701
+ const truncated = field(text, "IsTruncated");
5702
+ if (truncated !== "true" && truncated !== "false") throw new Error("S3 private CAS list has no completion flag");
5703
+ const objects = [...text.matchAll(/<Contents>([\s\S]*?)<\/Contents>/gu)].map(([, row]) => {
5704
+ const byteLength = Number(field(row, "Size"));
5705
+ const key = decodeURIComponent(field(row, "Key"));
5706
+ const etag = field(row, "ETag");
5707
+ if (!Number.isSafeInteger(byteLength) || byteLength < 0 || !etag || /[\r\n]/u.test(etag)) throw new Error("S3 private CAS list has invalid object metadata");
5708
+ return {
5709
+ key,
5710
+ etag,
5711
+ byteLength
5712
+ };
5713
+ });
5714
+ const count = field(text, "KeyCount");
5715
+ if (!/^\d+$/u.test(count) || Number(count) !== objects.length) throw new Error("S3 private CAS list object count is inconsistent");
5716
+ const next = field(text, "NextContinuationToken", true);
5717
+ if (truncated === "true" && !next) throw new Error("S3 private CAS list omitted its next page");
5718
+ return {
5719
+ objects,
5720
+ next: truncated === "true" ? next : void 0
5721
+ };
5722
+ }
5723
+ /** Generic storage operation only; ownership, holds, references and writer fencing belong to its consumer. */
5724
+ function privateCasNamespaceOperations({ request, refusal, prefix, location, storeIdentity }) {
5725
+ const namespacePrefix = (namespace) => {
5726
+ if (!NAMESPACE$1.test(namespace)) throw new Error("S3 private CAS namespace is invalid");
5727
+ return `${prefix}${namespace}/`;
5728
+ };
5729
+ const validObject = (object, scope) => {
5730
+ if (!object.key.startsWith(scope) || object.key.length === scope.length || object.key.split("/").some((part) => !part || part === "." || part === "..")) throw new Error("S3 private CAS inventory contains a key outside its namespace");
5731
+ if (!Number.isSafeInteger(object.byteLength) || object.byteLength < 0 || !object.etag || /[\r\n]/u.test(object.etag)) throw new Error("S3 private CAS inventory contains invalid object metadata");
5732
+ };
5733
+ const inspectNamespace = async ({ namespace, signal }) => {
5734
+ const scope = namespacePrefix(namespace);
5735
+ const objects = [];
5736
+ const tokens = /* @__PURE__ */ new Set();
5737
+ const keys = /* @__PURE__ */ new Set();
5738
+ let next;
5739
+ do {
5740
+ signal?.throwIfAborted();
5741
+ const response = await request("GET", "", {
5742
+ query: {
5743
+ "list-type": "2",
5744
+ "encoding-type": "url",
5745
+ "max-keys": "1000",
5746
+ prefix: scope,
5747
+ ...next ? { "continuation-token": next } : {}
5748
+ },
5749
+ ...signal ? { signal } : {}
5750
+ });
5751
+ if (!response.ok) throw await refusal(response, "namespace list");
5752
+ const page = await listPage(response);
5753
+ for (const object of page.objects) {
5754
+ validObject(object, scope);
5755
+ if (keys.has(object.key)) throw new Error("S3 private CAS list repeated an object");
5756
+ keys.add(object.key);
5757
+ objects.push(object);
5758
+ }
5759
+ next = page.next;
5760
+ if (next && tokens.has(next)) throw new Error("S3 private CAS list repeated its continuation token");
5761
+ if (next) tokens.add(next);
5762
+ } while (next);
5763
+ objects.sort((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0);
5764
+ return {
5765
+ namespace,
5766
+ location,
5767
+ storeIdentity,
5768
+ objects,
5769
+ sha256: fingerprint(namespace, location, storeIdentity, objects)
5770
+ };
5771
+ };
5772
+ return {
5773
+ inspectNamespace,
5774
+ async retireNamespace({ inventory, signal }) {
5775
+ const { namespace, objects } = inventory;
5776
+ const scope = namespacePrefix(namespace);
5777
+ if (inventory.location !== location || inventory.storeIdentity !== storeIdentity || inventory.sha256 !== fingerprint(namespace, location, storeIdentity, objects)) throw new Error("S3 private CAS retirement inventory does not match this store");
5778
+ const reviewed = /* @__PURE__ */ new Map();
5779
+ for (const object of objects) {
5780
+ validObject(object, scope);
5781
+ if (reviewed.has(object.key)) throw new Error("S3 private CAS retirement inventory repeats an object");
5782
+ reviewed.set(object.key, object);
5783
+ }
5784
+ const current = await inspectNamespace({
5785
+ namespace,
5786
+ ...signal ? { signal } : {}
5787
+ });
5788
+ for (const object of current.objects) {
5789
+ const prior = reviewed.get(object.key);
5790
+ if (!prior || prior.etag !== object.etag || prior.byteLength !== object.byteLength) throw new Error("S3 private CAS namespace changed after its reviewed inventory");
5791
+ }
5792
+ let deletedObjects = 0;
5793
+ let deletedBytes = 0;
5794
+ for (const object of current.objects) {
5795
+ signal?.throwIfAborted();
5796
+ const check = await request("HEAD", object.key, { ...signal ? { signal } : {} });
5797
+ if (check.status === 404) {
5798
+ await check.body?.cancel();
5799
+ continue;
5800
+ }
5801
+ if (!check.ok) throw await refusal(check, "retirement HEAD");
5802
+ await check.body?.cancel();
5803
+ if (check.headers.get("etag") !== object.etag || check.headers.get("content-length") === null || Number(check.headers.get("content-length")) !== object.byteLength) throw new Error("S3 private CAS object changed before retirement");
5804
+ const response = await request("DELETE", object.key, { ...signal ? { signal } : {} });
5805
+ if (!response.ok) throw await refusal(response, "namespace delete");
5806
+ await response.body?.cancel();
5807
+ const absent = await request("HEAD", object.key, { ...signal ? { signal } : {} });
5808
+ await absent.body?.cancel();
5809
+ if (absent.status !== 404) throw new Error("S3 private CAS object is not confirmed absent after retirement");
5810
+ deletedObjects++;
5811
+ deletedBytes += object.byteLength;
5812
+ if (!Number.isSafeInteger(deletedBytes)) throw new Error("S3 private CAS retired payload bytes exceed the safe integer range");
5813
+ }
5814
+ const remaining = await inspectNamespace({
5815
+ namespace,
5816
+ ...signal ? { signal } : {}
5817
+ });
5818
+ return {
5819
+ namespace,
5820
+ location,
5821
+ deletedObjects,
5822
+ deletedBytes,
5823
+ remainingObjects: remaining.objects.length,
5824
+ remainingBytes: remaining.objects.reduce((sum, object) => sum + object.byteLength, 0),
5825
+ complete: remaining.objects.length === 0
5826
+ };
5827
+ }
5828
+ };
5829
+ }
5830
+ //#endregion
5831
+ //#region src/runtime/s3-private-cas-request.ts
5655
5832
  const EMPTY_PAYLOAD = createHash("sha256").update("").digest("hex");
5656
- const CONTENT_TYPE = "application/octet-stream";
5657
- const METADATA_DIGEST = "x-amz-meta-sha256";
5658
- const hex = (value) => createHash("sha256").update(value).digest("hex");
5833
+ const hex$1 = (value) => createHash("sha256").update(value).digest("hex");
5659
5834
  const hmac = (key, value) => createHmac("sha256", key).update(value).digest();
5660
5835
  const encode = (segment) => encodeURIComponent(segment).replace(/[!'()*]/gu, (character) => `%${character.charCodeAt(0).toString(16).toUpperCase()}`);
5661
- /**
5662
- * Durable private CAS bytes in one S3-compatible bucket under `<prefix><namespace>/sha256/<hex>`.
5663
- *
5664
- * Every write declares its SHA-256 as the signed payload hash, so the store refuses bytes that
5665
- * do not match the digest. A write is confirmed by reading back the object's length and digest
5666
- * metadata. Reads return raw bytes; the private CAS port verifies them.
5667
- */
5668
- function createS3PrivateCasStore(options) {
5669
- const endpoint = new URL(options.endpoint);
5670
- if (endpoint.protocol !== "https:" || endpoint.username || endpoint.password || endpoint.search || endpoint.hash || endpoint.pathname !== "/" && endpoint.pathname !== "") throw new Error("S3 private CAS endpoint must be a bare https origin");
5671
- if (!BUCKET.test(options.bucket)) throw new Error("S3 private CAS bucket name is invalid");
5672
- const prefix = options.prefix ?? "";
5673
- if (!PREFIX.test(prefix)) throw new Error("S3 private CAS prefix must be empty or end in /");
5674
- if (!options.accessKeyId || !options.secretAccessKey) throw new Error("S3 private CAS needs an access key id and secret");
5836
+ /** The single signed transport for private CAS object, pointer and namespace operations. */
5837
+ function createPrivateCasS3Transport(options, endpoint) {
5675
5838
  const region = options.region ?? "auto";
5676
5839
  const timeoutMs = options.timeoutMs ?? 12e4;
5677
5840
  const send = options.fetch ?? fetch;
5678
- const key = (namespace, digest) => {
5679
- if (!NAMESPACE.test(namespace)) throw new Error("S3 private CAS namespace is invalid");
5680
- const match = DIGEST.exec(digest);
5681
- if (!match) throw new Error("S3 private CAS digest must be sha256:<64 lowercase hex>");
5682
- return `${prefix}${namespace}/sha256/${match[1]}`;
5683
- };
5684
- const pointerKey = (namespace, name) => {
5685
- if (!NAMESPACE.test(namespace)) throw new Error("S3 private CAS namespace is invalid");
5686
- if (!POINTER_NAME.test(name)) throw new Error("S3 private CAS pointer name is invalid");
5687
- return `${prefix}${namespace}/${name}`;
5688
- };
5689
- const request = async (method, objectKey, { body, byteLength, payloadHash = EMPTY_PAYLOAD, headers = {}, signal } = {}) => {
5841
+ const request = async (method, objectKey, { body, byteLength, payloadHash = EMPTY_PAYLOAD, headers = {}, signal, query = {} } = {}) => {
5690
5842
  const path = `/${[options.bucket, ...objectKey.split("/")].map(encode).join("/")}`;
5691
5843
  const url = new URL(path, endpoint);
5844
+ const canonicalQuery = Object.entries(query).map(([name, value]) => [encode(name), encode(value)]).sort(([a, av], [b, bv]) => a < b ? -1 : a > b ? 1 : av < bv ? -1 : av > bv ? 1 : 0).map(([name, value]) => `${name}=${value}`).join("&");
5845
+ url.search = canonicalQuery;
5692
5846
  const amzDate = (/* @__PURE__ */ new Date()).toISOString().replace(/[:-]|\.\d{3}/gu, "");
5693
5847
  const day = amzDate.slice(0, 8);
5694
5848
  const signed = {
@@ -5701,7 +5855,7 @@ function createS3PrivateCasStore(options) {
5701
5855
  const canonical = [
5702
5856
  method,
5703
5857
  path,
5704
- "",
5858
+ canonicalQuery,
5705
5859
  names.map((name) => `${name}:${signed[name].trim()}\n`).join(""),
5706
5860
  names.join(";"),
5707
5861
  payloadHash
@@ -5711,7 +5865,7 @@ function createS3PrivateCasStore(options) {
5711
5865
  "AWS4-HMAC-SHA256",
5712
5866
  amzDate,
5713
5867
  scope,
5714
- hex(canonical)
5868
+ hex$1(canonical)
5715
5869
  ].join("\n")).digest("hex");
5716
5870
  const { host: _host, ...sent } = signed;
5717
5871
  const deadline = AbortSignal.timeout(timeoutMs + Math.ceil((byteLength ?? (body instanceof Uint8Array ? body.byteLength : 0)) / (1024 * 1024)) * 1e3);
@@ -5741,6 +5895,59 @@ function createS3PrivateCasStore(options) {
5741
5895
  detail = detail.replace(/\s+/gu, " ").slice(0, 300);
5742
5896
  return /* @__PURE__ */ new Error(`S3 private CAS ${action} returned ${response.status}${detail ? `: ${detail}` : ""}`);
5743
5897
  };
5898
+ return {
5899
+ request,
5900
+ refusal
5901
+ };
5902
+ }
5903
+ //#endregion
5904
+ //#region src/runtime/s3-private-cas-store.ts
5905
+ const DIGEST = /^sha256:([0-9a-f]{64})$/u;
5906
+ const BUCKET = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/u;
5907
+ const PREFIX = /^(?:[A-Za-z0-9._-]+\/)*$/u;
5908
+ const NAMESPACE = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$/u;
5909
+ const POINTER_NAME = /^(?!sha256\/)[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}(?:\/[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}){0,3}$/u;
5910
+ const POINTER_MAX_BYTES = 1024 * 1024;
5911
+ const CONTENT_TYPE = "application/octet-stream";
5912
+ const METADATA_DIGEST = "x-amz-meta-sha256";
5913
+ const hex = (value) => createHash("sha256").update(value).digest("hex");
5914
+ /**
5915
+ * Durable private CAS bytes in one S3-compatible bucket under `<prefix><namespace>/sha256/<hex>`.
5916
+ *
5917
+ * Every write declares its SHA-256 as the signed payload hash, so the store refuses bytes that
5918
+ * do not match the digest. A write is confirmed by reading back the object's length and digest
5919
+ * metadata. Reads return raw bytes; the private CAS port verifies them.
5920
+ */
5921
+ function createS3PrivateCasStore(options) {
5922
+ const endpoint = new URL(options.endpoint);
5923
+ if (endpoint.protocol !== "https:" || endpoint.username || endpoint.password || endpoint.search || endpoint.hash || endpoint.pathname !== "/" && endpoint.pathname !== "") throw new Error("S3 private CAS endpoint must be a bare https origin");
5924
+ if (!BUCKET.test(options.bucket)) throw new Error("S3 private CAS bucket name is invalid");
5925
+ const prefix = options.prefix ?? "";
5926
+ if (!PREFIX.test(prefix)) throw new Error("S3 private CAS prefix must be empty or end in /");
5927
+ if (!options.accessKeyId || !options.secretAccessKey) throw new Error("S3 private CAS needs an access key id and secret");
5928
+ const key = (namespace, digest) => {
5929
+ if (!NAMESPACE.test(namespace)) throw new Error("S3 private CAS namespace is invalid");
5930
+ const match = DIGEST.exec(digest);
5931
+ if (!match) throw new Error("S3 private CAS digest must be sha256:<64 lowercase hex>");
5932
+ return `${prefix}${namespace}/sha256/${match[1]}`;
5933
+ };
5934
+ const pointerKey = (namespace, name) => {
5935
+ if (!NAMESPACE.test(namespace)) throw new Error("S3 private CAS namespace is invalid");
5936
+ if (!POINTER_NAME.test(name)) throw new Error("S3 private CAS pointer name is invalid");
5937
+ return `${prefix}${namespace}/${name}`;
5938
+ };
5939
+ const { request, refusal } = createPrivateCasS3Transport(options, endpoint);
5940
+ const namespaceOperations = privateCasNamespaceOperations({
5941
+ request,
5942
+ refusal,
5943
+ prefix,
5944
+ location: `s3://${options.bucket}/${prefix}`,
5945
+ storeIdentity: `sha256:${hex(JSON.stringify({
5946
+ endpoint: endpoint.origin,
5947
+ bucket: options.bucket,
5948
+ prefix
5949
+ }))}`
5950
+ });
5744
5951
  /** Whether the bucket holds this exact object; refuses a same-key object of other bytes. */
5745
5952
  const holds = async (objectKey, digest, byteLength, signal) => {
5746
5953
  const response = await request("HEAD", objectKey, signal === void 0 ? {} : { signal });
@@ -5753,6 +5960,7 @@ function createS3PrivateCasStore(options) {
5753
5960
  };
5754
5961
  return {
5755
5962
  location: `s3://${options.bucket}/${prefix}`,
5963
+ ...namespaceOperations,
5756
5964
  async putStream({ namespace, digest, byteLength, chunks, signal }) {
5757
5965
  const objectKey = key(namespace, digest);
5758
5966
  if (await holds(objectKey, digest, byteLength, signal)) return;
@@ -7145,7 +7353,7 @@ function graphDesignerExtraTools(env) {
7145
7353
  })();
7146
7354
  if (name === "designer_history") return (async () => {
7147
7355
  const args = asRecord(raw ?? {}, "designer_history");
7148
- const { listGraphRuns } = await import("./supervise-BuVVC7Bl.js").then((n) => n.h);
7356
+ const { listGraphRuns } = await import("./supervise-BGfm2GlY.js").then((n) => n.g);
7149
7357
  const all = await listGraphRuns(registry);
7150
7358
  return { runs: (args.taskShape === void 0 ? all : all.filter((row) => row.taskDigest === taskShapeDigest(asRecord(args.taskShape, "designer_history.taskShape")))).map(summarize) };
7151
7359
  })();
@@ -7156,7 +7364,7 @@ function graphDesignerExtraTools(env) {
7156
7364
  if (mode === "replay") {
7157
7365
  const digest = args.graphDigest;
7158
7366
  if (typeof digest !== "string" || digest.length === 0) throw new ValidationError("designer_run_graph: replay mode requires graphDigest from lookup");
7159
- const { loadGraph } = await import("./supervise-BuVVC7Bl.js").then((n) => n.h);
7367
+ const { loadGraph } = await import("./supervise-BGfm2GlY.js").then((n) => n.g);
7160
7368
  const stored = await loadGraph(registry, digest);
7161
7369
  if (!stored) throw new ValidationError(`designer_run_graph: no stored graph ${digest.slice(0, 12)} — re-lookup`);
7162
7370
  const graph = env.bindCheck(graphFromStored(stored, () => {
@@ -7196,6 +7404,191 @@ function graphDesignerExtraTools(env) {
7196
7404
  }
7197
7405
  }
7198
7406
  //#endregion
7407
+ //#region src/runtime/supervise/graph-session-observation.ts
7408
+ function measured(fact) {
7409
+ return fact && !fact.partial && fact.value !== null ? fact.value : void 0;
7410
+ }
7411
+ function recordedAt(fact) {
7412
+ const value = measured(fact);
7413
+ return value && Number.isFinite(Date.parse(value)) ? value : void 0;
7414
+ }
7415
+ /** Project an existing canonical span run tree into an observed graph design,
7416
+ * linked to its trace run. SessionFacts supplies exclusive accounting. No
7417
+ * execution tree, transcript, or source-specific traversal parser is stored. */
7418
+ function graphFromSessionFacts(facts, options) {
7419
+ if (!facts.length) throw new ValidationError("graphFromSessionFacts: no session facts");
7420
+ const unknowns = ["edge traversal accounting unavailable from canonical span relationships", "span containment does not establish graph edge semantics"];
7421
+ const spanNodes = options.spanRun?.present ? options.spanRun.nodes : [];
7422
+ const spanKey = (traceId, spanId) => JSON.stringify([traceId, spanId]);
7423
+ const identities = /* @__PURE__ */ new Set();
7424
+ const observations = facts.map((fact) => {
7425
+ const roots = spanNodes.filter((node) => node.traceId === fact.traceId && node.parentNodeId === null);
7426
+ const anchor = measured(fact.rootSpanId) ?? (roots.length === 1 ? roots[0].spanId : void 0);
7427
+ const boundary = fact.traceId && anchor ? `span:${spanKey(fact.traceId, anchor)}` : void 0;
7428
+ const sourceId = fact.sessionId ?? boundary;
7429
+ const identity = boundary ?? (fact.sessionId ? `session:${fact.sessionId}` : void 0);
7430
+ if (!identity || !sourceId || identities.has(identity)) throw new ValidationError("graphFromSessionFacts: every observation needs a unique recorded session or span identity");
7431
+ identities.add(identity);
7432
+ const humanCounts = measured(fact.typedTurnCounts)?.filter((entry) => entry.actor === "human");
7433
+ if (humanCounts?.some((entry) => !Number.isSafeInteger(entry.turns) || entry.turns < 0)) throw new ValidationError("graphFromSessionFacts: invalid human turn count");
7434
+ const humanMessages = fact.typedTurnCounts === void 0 ? measured(fact.humanTurns)?.length : humanCounts?.reduce((sum, entry) => sum + entry.turns, 0);
7435
+ const leadMessages = measured(fact.leadMessages);
7436
+ const inputTokens = fact.tokens.input ?? void 0;
7437
+ const outputTokens = fact.tokens.output ?? void 0;
7438
+ for (const [key, value] of Object.entries({
7439
+ inputTokens,
7440
+ outputTokens,
7441
+ humanMessages,
7442
+ leadMessages
7443
+ })) if (value === void 0) unknowns.push(`${sourceId}: ${key} unavailable`);
7444
+ else if (!Number.isSafeInteger(value) || value < 0) throw new ValidationError(`graphFromSessionFacts: invalid ${key}`);
7445
+ return {
7446
+ sourceId,
7447
+ startedAt: recordedAt(fact.firstRecordAt),
7448
+ lastRecordAt: recordedAt(fact.lastRecordAt),
7449
+ inputTokens,
7450
+ outputTokens,
7451
+ humanMessages,
7452
+ leadMessages
7453
+ };
7454
+ });
7455
+ const ids = /* @__PURE__ */ new Map();
7456
+ for (const [index, node] of spanNodes.entries()) {
7457
+ const key = spanKey(node.traceId, node.spanId);
7458
+ if (ids.has(key)) throw new ValidationError("graphFromSessionFacts: duplicate canonical span identity");
7459
+ ids.set(key, `n${index}`);
7460
+ }
7461
+ const nodes = spanNodes.map((node) => {
7462
+ const profile = { name: node.parentNodeId === null ? "observed-agent" : "observed-child" };
7463
+ if (node.runtime || node.kind) profile.metadata = {
7464
+ ...node.runtime ? { runtime: node.runtime } : {},
7465
+ ...node.kind ? { spanKind: node.kind } : {}
7466
+ };
7467
+ return {
7468
+ id: ids.get(spanKey(node.traceId, node.spanId)),
7469
+ profile
7470
+ };
7471
+ });
7472
+ const edges = [];
7473
+ for (const node of spanNodes) {
7474
+ if (node.parentNodeId === null) continue;
7475
+ const from = ids.get(spanKey(node.traceId, node.parentNodeId));
7476
+ if (from) edges.push({
7477
+ from,
7478
+ to: ids.get(spanKey(node.traceId, node.spanId))
7479
+ });
7480
+ else unknowns.push("canonical span run has an unresolved parent node");
7481
+ }
7482
+ edges.sort((a, b) => a.from.localeCompare(b.from) || a.to.localeCompare(b.to));
7483
+ const nodeUsage = [];
7484
+ const joinedNodes = /* @__PURE__ */ new Set();
7485
+ for (const [index, fact] of facts.entries()) {
7486
+ const anchor = measured(fact.rootSpanId);
7487
+ const matching = spanNodes.filter((node) => node.traceId === fact.traceId && (anchor === void 0 ? node.parentNodeId === null : node.spanId === anchor));
7488
+ if (matching.length !== 1 || joinedNodes.has(spanKey(matching[0].traceId, matching[0].spanId))) {
7489
+ unknowns.push(`${fact.sessionId}: session accounting cannot be joined to one canonical span node`);
7490
+ continue;
7491
+ }
7492
+ const key = spanKey(matching[0].traceId, matching[0].spanId);
7493
+ joinedNodes.add(key);
7494
+ const nodeId = ids.get(key);
7495
+ nodeUsage.push({
7496
+ nodeId,
7497
+ ...observations[index]
7498
+ });
7499
+ const profile = nodes.find((node) => node.id === nodeId).profile;
7500
+ const identity = measured(fact.agent);
7501
+ const model = identity?.model;
7502
+ if (model) profile.model = { default: model };
7503
+ const harness = identity?.harness ?? fact.harness;
7504
+ if (harness) profile.metadata = {
7505
+ ...profile.metadata,
7506
+ harness
7507
+ };
7508
+ }
7509
+ for (const node of spanNodes) {
7510
+ const key = spanKey(node.traceId, node.spanId);
7511
+ if (!joinedNodes.has(key)) {
7512
+ nodeUsage.push({ nodeId: ids.get(key) });
7513
+ unknowns.push(`${ids.get(key)}: canonical node accounting unavailable`);
7514
+ }
7515
+ }
7516
+ if (!spanNodes.length) unknowns.push("topology unavailable: no canonical span run tree was supplied");
7517
+ if (spanNodes.some((node) => node.kind == null)) unknowns.push("canonical span node kind unavailable");
7518
+ if (options.spanRun?.orphanSpans) unknowns.push("canonical span run contains orphan spans");
7519
+ if (!options.traceRunId) unknowns.push("trace run identity unavailable");
7520
+ for (const issue of options.issues ?? []) {
7521
+ const kind = issue && typeof issue === "object" && "kind" in issue ? issue.kind : void 0;
7522
+ const reason = issue && typeof issue === "object" && "reason" in issue ? issue.reason : void 0;
7523
+ if (typeof kind === "string") unknowns.push("workflow issue: " + kind + (kind === "source-coverage" && typeof reason === "string" ? `: ${reason.replace(/[\r\n]/g, " ").slice(0, 500)}` : ""));
7524
+ }
7525
+ const incompleteIssues = options.issues?.some((issue) => !issue || typeof issue !== "object" || !("kind" in issue) || issue.kind !== "source-coverage");
7526
+ const unread = facts.some((fact) => fact.unreadRecords?.partial || (fact.unreadRecords?.value ?? 0) > 0);
7527
+ if (unread) unknowns.push("source contains unread or partial records; total accounting unavailable");
7528
+ const complete = options.complete !== false && !incompleteIssues && !unread;
7529
+ if (!complete) unknowns.push("workflow selection incomplete; total accounting unavailable");
7530
+ if (!options.taskType) unknowns.push("task type not explicitly labeled");
7531
+ const starts = observations.flatMap((node) => node.startedAt ? [node.startedAt] : []).sort((a, b) => Date.parse(a) - Date.parse(b));
7532
+ const startedAt = options.startedAt ?? starts[0];
7533
+ if (!startedAt || !Number.isFinite(Date.parse(startedAt))) throw new ValidationError("graphFromSessionFacts: no recorded task start; supply an authoritative startedAt");
7534
+ const cost = {};
7535
+ for (const channel of [
7536
+ "inputTokens",
7537
+ "outputTokens",
7538
+ "humanMessages",
7539
+ "leadMessages"
7540
+ ]) if (complete && observations.every((node) => node[channel] !== void 0)) cost[channel] = observations.reduce((sum, node) => sum + node[channel], 0);
7541
+ if (cost.inputTokens !== void 0 && cost.outputTokens !== void 0) cost.tokens = cost.inputTokens + cost.outputTokens;
7542
+ const outcome = options.outcome ?? {
7543
+ kind: "unknown",
7544
+ reason: "no independent delivery outcome was joined"
7545
+ };
7546
+ if ((outcome.kind === "delivered" || outcome.kind === "no-winner") && !options.finishedAt) throw new ValidationError("graphFromSessionFacts: terminal outcomes require authoritative finishedAt");
7547
+ if (!options.startedAt) unknowns.push("task start unconfirmed; startedAt is earliest observed activity");
7548
+ if (options.finishedAt) {
7549
+ const elapsed = Date.parse(options.finishedAt) - Date.parse(startedAt);
7550
+ if (!Number.isFinite(elapsed) || elapsed < 0) throw new ValidationError("graphFromSessionFacts: invalid finishedAt");
7551
+ if (options.startedAt) cost.ms = elapsed;
7552
+ }
7553
+ const merged = options.evidence?.filter((entry) => entry.kind === "pr-merged" && entry.at).map((entry) => Date.parse(entry.at)).filter(Number.isFinite).sort((a, b) => a - b)[0];
7554
+ if (options.startedAt && merged !== void 0 && merged >= Date.parse(startedAt)) cost.mergeMs = merged - Date.parse(startedAt);
7555
+ const content = {
7556
+ observed: true,
7557
+ nodes,
7558
+ edges,
7559
+ deliverable: {}
7560
+ };
7561
+ const graph = {
7562
+ digest: graphDigest(content),
7563
+ ...content
7564
+ };
7565
+ return {
7566
+ graph,
7567
+ record: {
7568
+ graphDigest: graph.digest,
7569
+ ...spanNodes.length ? { topologyDigest: taskShapeDigest({
7570
+ nodes: nodes.map((node, index) => ({
7571
+ id: node.id,
7572
+ kind: spanNodes[index].kind ?? null
7573
+ })),
7574
+ edges
7575
+ }) } : {},
7576
+ taskDigest: taskShapeDigest(options.taskShape ?? { taskType: options.taskType ?? "unknown" }),
7577
+ startedAt,
7578
+ ...options.finishedAt ? { finishedAt: options.finishedAt } : {},
7579
+ outcome,
7580
+ cost,
7581
+ source: options.source,
7582
+ ...options.traceRunId ? { traceRunId: options.traceRunId } : {},
7583
+ ...options.observedAt ? { observedAt: options.observedAt } : {},
7584
+ ...options.taskType ? { taskType: options.taskType } : {},
7585
+ ...options.evidence ? { evidence: options.evidence } : {},
7586
+ ...nodeUsage.length ? { nodeUsage } : {},
7587
+ unknowns
7588
+ }
7589
+ };
7590
+ }
7591
+ //#endregion
7199
7592
  //#region src/runtime/supervise/profile-registry.ts
7200
7593
  /**
7201
7594
  * `profile-registry` — named AgentProfiles with run receipts: the missing
@@ -9198,6 +9591,6 @@ function tail(s) {
9198
9591
  return s.slice(-400);
9199
9592
  }
9200
9593
  //#endregion
9201
- export { runPersonified as $, openSqlRunStore as $t, searchSpecDigest as A, secretEnvOfMcpServer as At, chatWorkerSeam as B, readDeclaredCheck as Bt, withUntrackedArtifacts as C, materializeLocalMcp as Ct, assertSearchSpec as D, mcpSecretEnvMetadataKey as Dt, SEARCH_SPEC_CORRELATION_KEY as E, envKeyProvider as Et, profileRegistry as F, assertDeclaredCheck as Ft, openSandboxRun as G, stopSentinel as Gt, runStrategyEvolution as H, completionAuthorizes as Ht, profileRunsForName as I, checkProgramDigest as It, runBenchmark as J, renderLeaderboardHtml as Jt, createS3PrivateCasStore as K, leaderboard as Kt, recordProfileRun as L, declaredCheckDeliverable as Lt, bestProfileFor as M, loopCampaignDispatch as Mt, loadProfile as N, loopDispatch as Nt, compileSearchSpec as O, resolveMcpServerLaunch as Ot, pickBestProfile as P, superviseDispatch as Pt, definePersona as Q, SqlRunOwnershipError as Qt, graphDesignerExtraTools as R, declaredCheckDigest as Rt, copyUntrackedIntoClone as S, connectStdioMcp as St, createFencedSqlRunContext as T, sanitizeMcpToolSchema as Tt, strategyTournament as U, deterministicCompletion as Ut, createChatSessionStore as V, runIsolatedCheck as Vt, SandboxRunAbortError as W, sentinelCompletion as Wt, equalKOnCost as X, renderLeaderboardSvg as Xt, createPrivateCasArtifactPort as Y, renderLeaderboardMarkdown as Yt, trajectoryReport as Z, renderPairwiseMarkdown as Zt, NOTE_MAX_CHARS as _, HarvestError as _t, localShell as a, loopUntil as at, composeWorkerEvidence as b, resolveSandboxClient as bt, createVerifierEnvironment as c, selectValidWinner as ct, harvestSurfaceDiffs as d, assertTraceDerivedFindings as dt, FileCorpus as et, analystsFromRegistry as f, buildSteerContext as ft, EVIDENCE_MAX_CHARS as g, inProcessSandboxClient as gt, runCoderChecks as h, observationFromRegistry as ht, jjWorkspace as i, flatWidenGate as it, connectRemoteSupervisor as j, inlineSandboxClient as jt, searchPresets as k, resolveSecretEnv as kt, boxSurfaceReader as l, verify as lt, worktreeFanout as m, registryScopeAnalyst as mt, makeFinding$1 as n, renderCorpusToInstructions as nt, runInWorkspace as o, panel as ot, failuresAnalyst as p, createScopeAnalyst as pt, printBenchmarkReport as q, pairwiseSignificance as qt, gitWorkspace as r, fanout as rt, createWaterfallCollector as s, pipeline as st, computeFindingId$1 as t, InMemoryCorpus as tt, fsSurfaceReader as u, widen as ut, VERIFY_TAIL_CHARS as v, harvestCorpus as vt, analyzeTrace as w, createMcpEnvironment as wt, settledWorkerOut as x, McpSpawnFault as xt, closingWorkerNote as y, defineLeaderboard as yt, chatTransportExecutor as z, declaredCheckJudge as zt };
9594
+ export { definePersona as $, SqlRunOwnershipError as $t, searchSpecDigest as A, resolveSecretEnv as At, chatTransportExecutor as B, declaredCheckJudge as Bt, withUntrackedArtifacts as C, connectStdioMcp as Ct, assertSearchSpec as D, envKeyProvider as Dt, SEARCH_SPEC_CORRELATION_KEY as E, sanitizeMcpToolSchema as Et, profileRegistry as F, superviseDispatch as Ft, SandboxRunAbortError as G, sentinelCompletion as Gt, createChatSessionStore as H, runIsolatedCheck as Ht, profileRunsForName as I, assertDeclaredCheck as It, printBenchmarkReport as J, pairwiseSignificance as Jt, openSandboxRun as K, stopSentinel as Kt, recordProfileRun as L, checkProgramDigest as Lt, bestProfileFor as M, inlineSandboxClient as Mt, loadProfile as N, loopCampaignDispatch as Nt, compileSearchSpec as O, mcpSecretEnvMetadataKey as Ot, pickBestProfile as P, loopDispatch as Pt, trajectoryReport as Q, renderPairwiseMarkdown as Qt, graphFromSessionFacts as R, declaredCheckDeliverable as Rt, copyUntrackedIntoClone as S, McpSpawnFault as St, createFencedSqlRunContext as T, createMcpEnvironment as Tt, runStrategyEvolution as U, completionAuthorizes as Ut, chatWorkerSeam as V, readDeclaredCheck as Vt, strategyTournament as W, deterministicCompletion as Wt, createPrivateCasArtifactPort as X, renderLeaderboardMarkdown as Xt, runBenchmark as Y, renderLeaderboardHtml as Yt, equalKOnCost as Z, renderLeaderboardSvg as Zt, NOTE_MAX_CHARS as _, inProcessSandboxClient as _t, localShell as a, flatWidenGate as at, composeWorkerEvidence as b, defineLeaderboard as bt, createVerifierEnvironment as c, pipeline as ct, harvestSurfaceDiffs as d, widen as dt, openSqlRunStore as en, runPersonified as et, analystsFromRegistry as f, assertTraceDerivedFindings as ft, EVIDENCE_MAX_CHARS as g, observationFromRegistry as gt, runCoderChecks as h, registryScopeAnalyst as ht, jjWorkspace as i, fanout as it, connectRemoteSupervisor as j, secretEnvOfMcpServer as jt, searchPresets as k, resolveMcpServerLaunch as kt, boxSurfaceReader as l, selectValidWinner as lt, worktreeFanout as m, createScopeAnalyst as mt, makeFinding$1 as n, InMemoryCorpus as nt, runInWorkspace as o, loopUntil as ot, failuresAnalyst as p, buildSteerContext as pt, createS3PrivateCasStore as q, leaderboard as qt, gitWorkspace as r, renderCorpusToInstructions as rt, createWaterfallCollector as s, panel as st, computeFindingId$1 as t, FileCorpus as tt, fsSurfaceReader as u, verify as ut, VERIFY_TAIL_CHARS as v, HarvestError as vt, analyzeTrace as w, materializeLocalMcp as wt, settledWorkerOut as x, resolveSandboxClient as xt, closingWorkerNote as y, harvestCorpus as yt, graphDesignerExtraTools as z, declaredCheckDigest as zt };
9202
9595
 
9203
- //# sourceMappingURL=runtime-B_93oWEv.js.map
9596
+ //# sourceMappingURL=runtime-CsvGCQpl.js.map