@tangle-network/agent-eval 0.173.1 → 0.173.3

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 (44) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/analyst/index.d.ts +2 -2
  3. package/dist/analyst/index.js +4 -4
  4. package/dist/{benchmark-command-k-fOGzt8.js → benchmark-command-BY9oscke.js} +7 -7
  5. package/dist/{benchmark-command-k-fOGzt8.js.map → benchmark-command-BY9oscke.js.map} +1 -1
  6. package/dist/benchmarks/index.js +3 -3
  7. package/dist/campaign/index.js +5 -5
  8. package/dist/{campaign-pxS0wmo4.js → campaign-B3kPMU8S.js} +6 -6
  9. package/dist/{campaign-pxS0wmo4.js.map → campaign-B3kPMU8S.js.map} +1 -1
  10. package/dist/{chat-client-Db4bqYfA.js → chat-client-CkmjYlfB.js} +2 -2
  11. package/dist/{chat-client-Db4bqYfA.js.map → chat-client-CkmjYlfB.js.map} +1 -1
  12. package/dist/{chat-json-call-C26igCih.js → chat-json-call-B_Xv2oJK.js} +2 -2
  13. package/dist/{chat-json-call-C26igCih.js.map → chat-json-call-B_Xv2oJK.js.map} +1 -1
  14. package/dist/cli.js +3 -3
  15. package/dist/contract/index.js +5 -5
  16. package/dist/{define-agent-eval-D_i_s69h.js → define-agent-eval-8h3lXXee.js} +3 -3
  17. package/dist/{define-agent-eval-D_i_s69h.js.map → define-agent-eval-8h3lXXee.js.map} +1 -1
  18. package/dist/{dspy-rlm-engine-D5byiHn9.js → dspy-rlm-engine-CF0t2ITD.js} +2 -2
  19. package/dist/{dspy-rlm-engine-D5byiHn9.js.map → dspy-rlm-engine-CF0t2ITD.js.map} +1 -1
  20. package/dist/{external-optimizer-process-Cq_Pg15r.js → external-optimizer-process-BwITA9Jp.js} +2 -2
  21. package/dist/{external-optimizer-process-Cq_Pg15r.js.map → external-optimizer-process-BwITA9Jp.js.map} +1 -1
  22. package/dist/{external-optimizer-subprocess-DgNebftP.js → external-optimizer-subprocess-wBWeoG6A.js} +2 -2
  23. package/dist/{external-optimizer-subprocess-DgNebftP.js.map → external-optimizer-subprocess-wBWeoG6A.js.map} +1 -1
  24. package/dist/index.js +8 -8
  25. package/dist/{llm-client-CxQtdtd6.js → llm-client-CGlSi8sb.js} +2 -1
  26. package/dist/llm-client-CGlSi8sb.js.map +1 -0
  27. package/dist/{llm-judge-B2YxbAJb.js → llm-judge-BfqMFo4h.js} +3 -3
  28. package/dist/{llm-judge-B2YxbAJb.js.map → llm-judge-BfqMFo4h.js.map} +1 -1
  29. package/dist/openapi.json +1 -1
  30. package/dist/{produced-state-7VYDwtkk.js → produced-state-D91uDvQw.js} +3 -3
  31. package/dist/{produced-state-7VYDwtkk.js.map → produced-state-D91uDvQw.js.map} +1 -1
  32. package/dist/{semantic-concept-judge-Ct3QU7t5.js → semantic-concept-judge-Dok7_35a.js} +4 -4
  33. package/dist/{semantic-concept-judge-Ct3QU7t5.js.map → semantic-concept-judge-Dok7_35a.js.map} +1 -1
  34. package/dist/{server-BR6onwZB.js → server-D_cjseFN.js} +2 -2
  35. package/dist/{server-BR6onwZB.js.map → server-D_cjseFN.js.map} +1 -1
  36. package/dist/{skillopt-optimization-method-BzdphODy.js → skillopt-optimization-method-DDw3v3gA.js} +5 -5
  37. package/dist/{skillopt-optimization-method-BzdphODy.js.map → skillopt-optimization-method-DDw3v3gA.js.map} +1 -1
  38. package/dist/supervisor-run/index.d.ts.map +1 -1
  39. package/dist/supervisor-run/index.js +43 -18
  40. package/dist/supervisor-run/index.js.map +1 -1
  41. package/dist/types-gvRsyJLh.d.ts.map +1 -1
  42. package/dist/wire/index.js +1 -1
  43. package/package.json +2 -2
  44. package/dist/llm-client-CxQtdtd6.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/supervisor-run/source-facts.ts","../../src/supervisor-run/analyze.ts","../../src/supervisor-run/claude-code-reader.ts","../../src/supervisor-run/integrity-types.ts","../../src/supervisor-run/integrity.ts","../../src/supervisor-run/loops-reader.ts","../../src/supervisor-run/render.ts","../../src/supervisor-run/rollout-nodes.ts","../../src/supervisor-run/runtime-reader.ts"],"mappings":";;;UAwBU;EACR;EACA;EACA;EACA;;EAEA;;;;;;EAMA;;UAGe;EACf,QAAQ;;;;;;EAMR;EACA;;;;;;EAMA;;UAmFe;;EAEf;EACA;EACA;EACA;;EAEA,MAAM;;EAEN;;EAEA;EACA;;EAEA;EACA;;UAGe;EACf;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA;EACA,OAAO;;EAEP;;UAGe;;EAEf;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;EAEA;;EAEA;EACA;;EAEA;;EAEA;EACA;EACA;EACA;EACA,eAAe;EACf,uBAAuB;;UAGR;;EAEf;EACA;;UAGe;;EAEf;;EAEA;EACA;;;;;;UAOe;WACN;WACA,iBAAiB;WACjB,iBAAiB;WACjB,uBAAuB;WACvB,uBAAuB;WACvB;;;;;;;IAOP;IACA;IACA;IACA;;IAEA;;IAEA;;IAEA;IACA;;IAEA;;IAEA;IACA;;IAEA;;WAEO,YAAY,oBAAoB;;WAEhC,wBAAwB;;WAExB;;;;;;;;;WASA;;WAEA;;;;;;WAMA,0BAA0B,SAAS;;;;;;;WAOnC;;WAEA,gBAAgB;;WAEhB,OAAO;WACP;WACA;;;;;;WAMA;WACA;;;;;;;;;;;;;;;;;;KAmDC;iBAiFI,oBAAoB,KAAK,uBAAuB;;;;;;;iBC9WhD,4BACd,KAAK,sBACL,qBACC;;iBAo2Ba,WAAW,eAAe;;;;;;iBA+C1B,qBAAqB,kBAAkB,wBAAwB;;;UCp4B9D;;WAEN;;;;;WAKA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;;iBAmOW,4BACpB,MAAM,0BACL,QAAQ;;iBAiUK,8BAA8B,MAAM,0BAA0B;;;cCnoBjE;KAED;KAEA;KAKA;UAmCK;WACN;WACA;;UAGM;WACN,MAAM;WACN;WACA,UAAU;WACV;WACA;WACA;WACA,mBAAmB;WACnB;WACA,WAAW,SAAS;;UAGd;WACN,eAAe;WACf;WACA;WACA,MAAM;WACN,iBAAiB;;UAGX;;WAEN;;;;;;;;iBC5BK,8BACd,OAAO,uBAAuB,mBAC9B,UAAS,gCACR;;;;;;;iBCDmB,uBAAuB,aAAa;UAUzC;;WAEN;;WAEA;;WAEA;;WAEA;;;;;;;iBAQW,uBACpB,gBACA,OAAM,qBACL,QAAQ;;iBAmKK,yBACd,gBACA,OAAM,qBACL;;;;;;iBAkCmB,qBACpB,gBAAgB,sBAAsB,sBACtC,OAAM,qBACL,QAAQ;UAgBM,kCAAkC;;WAExC;;WAEA;;;;;;WAMA;;;;;;;;iBASW,yBACpB,gBACA,OAAM,4BACL,QAAQ;;;;;iBA0CW,6BACpB,gBACA,OAAM,4BACL,QAAQ;;;;;;iBAgBW,sBACpB,gBACA,OAAM;EAA8B;IACnC,QAAQ;;;;;;;iBA+BW,sBAAsB,eAAe;;;;;;;iBCzY3C,4BAA4B,GAAG;iBAiC/B,4BAA4B,GAAG;iBA+K/B,+BACd,QAAQ,qBACR;;;UC9Le;;WAEN;;WAEA,QAAQ;;WAER;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;;;;;;;iBAwBK,0BACd,KAAK,sBACL,OAAM,2BACL;;;UC6Uc;;;;;;WAMN;;;;;;;;;;;;;;;;iBAsDW,yBACpB,gBACA,OAAM,uBACL,QAAQ;;iBAkEK,2BACd,gBACA,OAAM,uBACL;;iBAKmB,0BAA0B,iBAAiB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/supervisor-run/source-facts.ts","../../src/supervisor-run/analyze.ts","../../src/supervisor-run/claude-code-reader.ts","../../src/supervisor-run/integrity-types.ts","../../src/supervisor-run/integrity.ts","../../src/supervisor-run/loops-reader.ts","../../src/supervisor-run/render.ts","../../src/supervisor-run/rollout-nod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AS;;UAGd;WACN,eAAe;WACf;WACA;WACA,MAAM;WACN,iBAAiB;;UAGX;;WAEN;;;;;;;;iBC5BK,8BACd,OAAO,uBAAuB,mBAC9B,UAAS,gCACR;;;;;;;iBCDmB,uBAAuB,aAAa;UAUzC;;WAEN;;WAEA;;WAEA;;WAEA;;;;;;;iBAQW,uBACpB,gBACA,OAAM,qBACL,QAAQ;;iBAmKK,yBACd,gBACA,OAAM,qBACL;;;;;;iBAkCmB,qBACpB,gBAAgB,sBAAsB,sBACtC,OAAM,qBACL,QAAQ;UAgBM,kCAAkC;;WAExC;;WAEA;;;;;;WAMA;;;;;;;;iBASW,yBACpB,gBACA,OAAM,4BACL,QAAQ;;;;;iBA0CW,6BACpB,gBACA,OAAM,4BACL,QAAQ;;;;;;iBAgBW,sBACpB,gBACA,OAAM;EAA8B;IACnC,QAAQ;;;;;;;iBA+BW,sBAAsB,eAAe;;;;;;;iBCzY3C,4BAA4B,GAAG;iBAiC/B,4BAA4B,GAAG;iBA+K/B,+BACd,QAAQ,qBACR;;;UC9Le;;WAEN;;WAEA,QAAQ;;WAER;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;;;;;;;iBAwBK,0BACd,KAAK,sBACL,OAAM,2BACL;;;UCiYc;;;;;;WAMN;;;;;;;;;;;;;;;;iBAsDW,yBACpB,gBACA,OAAM,uBACL,QAAQ;;iBAkEK,2BACd,gBACA,OAAM,uBACL;;iBAKmB,0BAA0B,iBAAiB"}
@@ -1189,13 +1189,14 @@ function renderSupervisorRollupMarkdown(rollup, title = "Round rollup") {
1189
1189
  * Reader for agent-runtime's file-backed supervision context.
1190
1190
  *
1191
1191
  * Runtime stores multiple recursive trees in one `spawn-journal.jsonl`.
1192
- * Each line is an envelope whose `root` identifies the local tree. A nested
1193
- * driver is represented twice: once as a child spawn in its parent's tree and
1194
- * once as the parentless root marker of its own tree. This reader removes only
1195
- * that duplicate root marker and preserves the remaining envelopes for the
1196
- * supervisor-run analyzer. Runtime stores profile identity below `identity`
1197
- * and does not emit Eval's role field, so this boundary projects those fields
1198
- * without changing Runtime's journal dialect.
1192
+ * Each line is an envelope whose `root` identifies the local tree. A journal
1193
+ * can connect a nested tree with `spawned.ownedTreeRoot`. It can also use the
1194
+ * spawned child id as the nested root and repeat the spawn as a parentless
1195
+ * marker when no owned tree is recorded. Descendant spawns must occur in the
1196
+ * tree their parent owns. This reader removes a duplicate marker and preserves
1197
+ * the other envelopes for the supervisor-run analyzer. Runtime stores profile
1198
+ * identity below `identity` and does not emit Eval's role field. This boundary
1199
+ * projects those fields without changing Runtime's dialect.
1199
1200
  *
1200
1201
  * The run's terminal status is Runtime's own `result.json` `kind` — `winner`,
1201
1202
  * `no-winner`, or whatever a later arm is called — read verbatim. The reader
@@ -1276,17 +1277,25 @@ function parseEnvelopeJournal(text, path) {
1276
1277
  }
1277
1278
  if (begins.length === 0) throw formatError(path, 1, "no begin record");
1278
1279
  const parentSpawnsById = /* @__PURE__ */ new Map();
1280
+ const parentSpawnsByOwnedTreeRoot = /* @__PURE__ */ new Map();
1279
1281
  const rootMarkersByTree = /* @__PURE__ */ new Map();
1280
1282
  for (const entry of events) {
1281
1283
  if (entry.event.kind !== "spawned") continue;
1282
1284
  const id = nonEmptyString(entry.event.id);
1283
1285
  if (id === null) continue;
1284
1286
  if (nonEmptyString(entry.event.parent) !== null) {
1285
- const matches = parentSpawnsById.get(id) ?? [];
1286
- matches.push(entry);
1287
- parentSpawnsById.set(id, matches);
1287
+ const ownedTreeRoot = nonEmptyString(entry.event.ownedTreeRoot);
1288
+ if (ownedTreeRoot !== null) {
1289
+ const owners = parentSpawnsByOwnedTreeRoot.get(ownedTreeRoot) ?? [];
1290
+ owners.push(entry);
1291
+ parentSpawnsByOwnedTreeRoot.set(ownedTreeRoot, owners);
1292
+ } else {
1293
+ const matches = parentSpawnsById.get(id) ?? [];
1294
+ matches.push(entry);
1295
+ parentSpawnsById.set(id, matches);
1296
+ }
1288
1297
  }
1289
- if (entry.root === id && entry.event.parent === void 0) {
1298
+ if (entry.root === id && (entry.event.parent === void 0 || entry.event.parent === null)) {
1290
1299
  const markers = rootMarkersByTree.get(entry.root) ?? [];
1291
1300
  markers.push(entry);
1292
1301
  rootMarkersByTree.set(entry.root, markers);
@@ -1295,7 +1304,7 @@ function parseEnvelopeJournal(text, path) {
1295
1304
  const nestedRoots = /* @__PURE__ */ new Set();
1296
1305
  const nestedParentSpawns = /* @__PURE__ */ new Map();
1297
1306
  for (const begin of begins) {
1298
- const parentSpawns = (parentSpawnsById.get(begin.root) ?? []).filter((entry) => entry.root !== begin.root);
1307
+ const parentSpawns = [.../* @__PURE__ */ new Set([...parentSpawnsByOwnedTreeRoot.get(begin.root) ?? [], ...parentSpawnsById.get(begin.root) ?? []])].filter((entry) => entry.root !== begin.root);
1299
1308
  if (parentSpawns.length > 1) throw formatError(path, begin.line, `tree ${JSON.stringify(begin.root)} has ${parentSpawns.length} parent spawns`);
1300
1309
  if (parentSpawns.length === 1) {
1301
1310
  nestedRoots.add(begin.root);
@@ -1306,17 +1315,33 @@ function parseEnvelopeJournal(text, path) {
1306
1315
  if (topRoots.length !== 1) throw formatError(path, topRoots[0]?.line ?? 1, `expected one top-level tree, found ${topRoots.length}`);
1307
1316
  const top = topRoots[0];
1308
1317
  for (const nestedRoot of nestedRoots) {
1309
- const marker = rootMarkersByTree.get(nestedRoot) ?? [];
1310
- if (marker.length !== 1) throw formatError(path, begun.get(nestedRoot)?.line ?? 1, `nested tree ${JSON.stringify(nestedRoot)} must contain one root marker`);
1318
+ const markers = rootMarkersByTree.get(nestedRoot) ?? [];
1319
+ if (markers.length > 1) throw formatError(path, begun.get(nestedRoot)?.line ?? 1, `nested tree ${JSON.stringify(nestedRoot)} contains ${markers.length} root markers`);
1311
1320
  const parentSpawn = nestedParentSpawns.get(nestedRoot);
1312
1321
  if (parentSpawn === void 0) throw formatError(path, begun.get(nestedRoot)?.line ?? 1, `nested tree ${JSON.stringify(nestedRoot)} has no parent spawn`);
1313
- const markerDigest = profileDigest(marker[0]?.event ?? {});
1322
+ const markerDigest = profileDigest(markers[0]?.event ?? {});
1314
1323
  const parentDigest = profileDigest(parentSpawn.event);
1315
- if (markerDigest !== null && parentDigest !== null && markerDigest !== parentDigest) throw formatError(path, marker[0]?.line ?? 1, `nested tree ${JSON.stringify(nestedRoot)} disagrees with its parent profile digest`);
1324
+ if (markerDigest !== null && parentDigest !== null && markerDigest !== parentDigest) throw formatError(path, markers[0]?.line ?? 1, `nested tree ${JSON.stringify(nestedRoot)} disagrees with its parent profile digest`);
1316
1325
  if (parentDigest === null && markerDigest !== null) parentSpawn.event.profileDigest = markerDigest;
1317
1326
  }
1318
- const supervisorIds = /* @__PURE__ */ new Set([top.root, ...nestedRoots]);
1319
- const normalized = events.filter((entry) => !(nestedRoots.has(entry.root) && entry.event.kind === "spawned" && entry.event.id === entry.root && entry.event.parent === void 0)).map((entry) => {
1327
+ const ownedTreeBySupervisorId = /* @__PURE__ */ new Map([[top.root, top.root]]);
1328
+ for (const [nestedRoot, parentSpawn] of nestedParentSpawns) {
1329
+ const supervisorId = nonEmptyString(parentSpawn.event.id);
1330
+ if (supervisorId === null) continue;
1331
+ const priorTree = ownedTreeBySupervisorId.get(supervisorId);
1332
+ if (priorTree !== void 0 && priorTree !== nestedRoot) throw formatError(path, parentSpawn.line, `spawn ${JSON.stringify(supervisorId)} owns both ${JSON.stringify(priorTree)} and ${JSON.stringify(nestedRoot)}`);
1333
+ ownedTreeBySupervisorId.set(supervisorId, nestedRoot);
1334
+ }
1335
+ for (const entry of events) {
1336
+ if (entry.event.kind !== "spawned") continue;
1337
+ const parentId = nonEmptyString(entry.event.parent);
1338
+ if (parentId === null) continue;
1339
+ const parentTree = ownedTreeBySupervisorId.get(parentId);
1340
+ if (parentTree === void 0) throw formatError(path, entry.line, `spawn ${JSON.stringify(entry.event.id)} names parent ${JSON.stringify(parentId)}, which owns no journal tree`);
1341
+ if (entry.root !== parentTree) throw formatError(path, entry.line, `spawn ${JSON.stringify(entry.event.id)} is in tree ${JSON.stringify(entry.root)}, but parent ${JSON.stringify(parentId)} owns tree ${JSON.stringify(parentTree)}`);
1342
+ }
1343
+ const supervisorIds = /* @__PURE__ */ new Set([top.root, ...[...nestedParentSpawns.values()].map((entry) => nonEmptyString(entry.event.id)).filter((id) => id !== null)]);
1344
+ const normalized = events.filter((entry) => !(nestedRoots.has(entry.root) && entry.event.kind === "spawned" && entry.event.id === entry.root && (entry.event.parent === void 0 || entry.event.parent === null))).map((entry) => {
1320
1345
  const event = { ...entry.event };
1321
1346
  if (event.kind === "spawned") {
1322
1347
  const digest = profileDigest(event);