@tangle-network/agent-eval 0.206.0 → 0.207.1

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 (35) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/adapters/http.d.ts +1 -1
  3. package/dist/benchmarks/index.d.ts +2 -2
  4. package/dist/campaign/index.d.ts +3 -3
  5. package/dist/campaign/index.js +2 -2
  6. package/dist/cli.js +3 -2
  7. package/dist/cli.js.map +1 -1
  8. package/dist/contract/index.d.ts +4 -4
  9. package/dist/{define-agent-eval-CKB6wyML.d.ts → define-agent-eval-B2YV-RDE.d.ts} +3 -3
  10. package/dist/{define-agent-eval-CKB6wyML.d.ts.map → define-agent-eval-B2YV-RDE.d.ts.map} +1 -1
  11. package/dist/{index-BRdZ0oJo.d.ts → index-CojsA_EE.d.ts} +2 -2
  12. package/dist/{index-BRdZ0oJo.d.ts.map → index-CojsA_EE.d.ts.map} +1 -1
  13. package/dist/{index-R8Xhod8e.d.ts → index-DVDiJIhi.d.ts} +3 -3
  14. package/dist/{index-R8Xhod8e.d.ts.map → index-DVDiJIhi.d.ts.map} +1 -1
  15. package/dist/index.d.ts +2 -2
  16. package/dist/meta-eval/index.d.ts +63 -0
  17. package/dist/meta-eval/index.d.ts.map +1 -1
  18. package/dist/meta-eval/index.js +121 -1
  19. package/dist/meta-eval/index.js.map +1 -1
  20. package/dist/openapi.json +1 -1
  21. package/dist/{report-command-JrjiWReS.js → report-command-_vNf8qJv.js} +31 -9
  22. package/dist/{report-command-JrjiWReS.js.map → report-command-_vNf8qJv.js.map} +1 -1
  23. package/dist/search/index.d.ts +8 -2
  24. package/dist/search/index.d.ts.map +1 -1
  25. package/dist/search/index.js +1 -1
  26. package/dist/{search-kernel-DNpsHb8P.d.ts → search-kernel-CZ8KJQRw.d.ts} +6 -3
  27. package/dist/{search-kernel-DNpsHb8P.d.ts.map → search-kernel-CZ8KJQRw.d.ts.map} +1 -1
  28. package/dist/supervisor-run/index.d.ts.map +1 -1
  29. package/dist/supervisor-run/index.js +1 -1
  30. package/dist/{tree-By7LtLUu.js → tree-CN8mlzUO.js} +11 -3
  31. package/dist/{tree-By7LtLUu.js.map → tree-CN8mlzUO.js.map} +1 -1
  32. package/docs/public-api.md +18 -17
  33. package/docs/search-ledger.md +9 -3
  34. package/docs/systemone.md +15 -3
  35. package/package.json +1 -1
@@ -1057,6 +1057,24 @@ function runtimeBeginState(root, startedAt) {
1057
1057
  function blobFile(runDir, ref) {
1058
1058
  return typeof ref === "string" && /^sha256:[0-9a-f]{64}$/u.test(ref) ? join(runDir, BLOB_DIR, `${ref.replace(":", "-")}.json`) : null;
1059
1059
  }
1060
+ /** A later receipt replaces an earlier one, except that an absence never replaces an available one. */
1061
+ function keepReceipt(fact, receipt) {
1062
+ if (receipt === null) return;
1063
+ if (fact.receipt?.status === "available" && receipt.status !== "available") return;
1064
+ fact.receipt = receipt;
1065
+ }
1066
+ /**
1067
+ * What this reader can say about harness-session traces: how many nodes carry an available
1068
+ * native transcript receipt. Runtime records the session identity on each receipt, so the run's
1069
+ * sessions are read per node (`workers[].nativeSession`), not through one command.
1070
+ */
1071
+ function nativeTraceSummary(transcripts) {
1072
+ const sessions = [...transcripts.values()].map((transcript) => transcript.nativeSession);
1073
+ const receipted = sessions.filter((session) => session !== null).length;
1074
+ const available = sessions.filter((session) => session?.status === "available").length;
1075
+ if (receipted === 0) return "unavailable — no node carries a Runtime harness transcript receipt";
1076
+ return `per node — ${available} of ${transcripts.size} nodes carry an available native harness transcript (${receipted - available} receipt(s) name why not); read workers[].nativeSession`;
1077
+ }
1060
1078
  async function workspaceCapturesFromOutput(runDir, ref) {
1061
1079
  const outRef = typeof ref === "string" ? ref : null;
1062
1080
  const blobPath = blobFile(runDir, ref);
@@ -1140,12 +1158,15 @@ async function workspaceCapturesFromOutput(runDir, ref) {
1140
1158
  * records retain ordinary and steerable results; they are not counted as dispatched turns.
1141
1159
  * - The terminal event's `harnessTranscript` receipt covers the harness's native session files.
1142
1160
  * Those are the only record of the harness's own subagents, so an unavailable receipt is a
1143
- * separate gap from a missing turn, and its reason is Runtime's, verbatim.
1161
+ * separate gap from a missing turn, and its reason is Runtime's, verbatim. `settled`,
1162
+ * `cancelled` and `reconciled` all carry one; an available receipt is never replaced by a later
1163
+ * absence. The root has no terminal event, so its receipt is the settle record's
1164
+ * `rootHarnessTranscript`.
1144
1165
  *
1145
1166
  * Blob files are checked on disk: a receipt that names a blob the directory no longer holds is
1146
1167
  * not a retained transcript.
1147
1168
  */
1148
- async function nodeTranscripts(runDir, events, nodeIds) {
1169
+ async function nodeTranscripts(runDir, events, nodeIds, root) {
1149
1170
  const facts = /* @__PURE__ */ new Map();
1150
1171
  const entry = (id) => {
1151
1172
  let found = facts.get(id);
@@ -1178,11 +1199,9 @@ async function nodeTranscripts(runDir, events, nodeIds) {
1178
1199
  }
1179
1200
  }
1180
1201
  if (event.kind === "execution-admitted" && record(event.admission)?.phase === "dispatched") entry(id).dispatched += 1;
1181
- else if (event.kind === "settled" || event.kind === "cancelled") {
1182
- const receipt = record(event.harnessTranscript);
1183
- if (receipt !== null) entry(id).receipt = receipt;
1184
- }
1202
+ else if (event.kind === "settled" || event.kind === "cancelled" || event.kind === "reconciled") keepReceipt(entry(id), record(event.harnessTranscript));
1185
1203
  }
1204
+ if (root !== void 0 && nodeIds.has(root.id)) keepReceipt(entry(root.id), root.receipt);
1186
1205
  const out = /* @__PURE__ */ new Map();
1187
1206
  for (const [id, fact] of facts) {
1188
1207
  const retained = [];
@@ -1299,7 +1318,10 @@ async function readRuntimeSupervisorRun(runDir, opts = {}) {
1299
1318
  assertResultMatchesJournal(normalized.root, result, resultPath);
1300
1319
  const childSpawns = normalized.events.filter((event) => event.kind === "spawned" && nonEmptyString(event.id) !== null).filter((event) => event.id !== normalized.root);
1301
1320
  const workerIds = new Set(childSpawns.map((event) => nonEmptyString(event.id)).filter((id) => id !== null));
1302
- const transcripts = await nodeTranscripts(runDir, normalized.events, /* @__PURE__ */ new Set([normalized.root, ...workerIds]));
1321
+ const transcripts = await nodeTranscripts(runDir, normalized.events, /* @__PURE__ */ new Set([normalized.root, ...workerIds]), {
1322
+ id: normalized.root,
1323
+ receipt: record(result?.rootHarnessTranscript)
1324
+ });
1303
1325
  const workers = childSpawns.map((event) => {
1304
1326
  const workerId = nonEmptyString(event.id);
1305
1327
  const transcript = transcripts.get(workerId);
@@ -1343,7 +1365,7 @@ async function readRuntimeSupervisorRun(runDir, opts = {}) {
1343
1365
  limits: sourceLimits(normalized.root, normalized.events, workerIds),
1344
1366
  rootTranscriptRef: await isFile(rootStream) ? rootStream : null,
1345
1367
  rootWorkspaceCaptures: transcripts.get(normalized.root)?.workspaceCaptures ?? null,
1346
- traceCommand: "unavailable — Runtime FileRunContext records no provider-session trace identity"
1368
+ traceCommand: nativeTraceSummary(transcripts)
1347
1369
  };
1348
1370
  }
1349
1371
  /** The agent-runtime file-backed layout as a `SupervisorRunReader`. */
@@ -1597,4 +1619,4 @@ async function runSupervisorRunCommand(argv, io = PROCESS_IO) {
1597
1619
  //#endregion
1598
1620
  export { writeSupervisorRunReport as a, readRuntimeSupervisorRun as c, renderSupervisorRunHeadline as d, renderSupervisorRunMarkdown as f, rollupSupervisorRuns as h, reportSupervisorRound as i, runtimeSupervisorRunReader as l, parsePatch as m, analyzeSupervisorRun as n, writeSupervisorRunReportSafe as o, analyzeSupervisorRunSources as p, findSupervisorRunDirs as r, isRuntimeSupervisorRunDir as s, runSupervisorRunCommand as t, renderSupervisorRollupMarkdown as u };
1599
1621
 
1600
- //# sourceMappingURL=report-command-JrjiWReS.js.map
1622
+ //# sourceMappingURL=report-command-_vNf8qJv.js.map