@tangle-network/agent-eval 0.118.3 → 0.119.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 (50) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +26 -0
  3. package/dist/analyst/index.d.ts +143 -21
  4. package/dist/analyst/index.js +44 -10
  5. package/dist/analyst/index.js.map +1 -1
  6. package/dist/benchmarks/index.d.ts +50 -40
  7. package/dist/benchmarks/index.js +6 -6
  8. package/dist/campaign/index.d.ts +231 -156
  9. package/dist/campaign/index.js +5 -5
  10. package/dist/{chunk-JTMFT5QZ.js → chunk-4I2E3LLO.js} +2 -2
  11. package/dist/{chunk-VNLWDTDA.js → chunk-7A4LIMMY.js} +845 -252
  12. package/dist/chunk-7A4LIMMY.js.map +1 -0
  13. package/dist/{chunk-KK2O4VWA.js → chunk-D7AEXSM5.js} +2 -2
  14. package/dist/{chunk-EKHHBKS6.js → chunk-F6YUH3L4.js} +39 -28
  15. package/dist/{chunk-EKHHBKS6.js.map → chunk-F6YUH3L4.js.map} +1 -1
  16. package/dist/{chunk-267UCQWI.js → chunk-GERDAIAL.js} +2 -2
  17. package/dist/{chunk-267UCQWI.js.map → chunk-GERDAIAL.js.map} +1 -1
  18. package/dist/{chunk-MLHRFWQK.js → chunk-JHOJHHU7.js} +85 -16
  19. package/dist/chunk-JHOJHHU7.js.map +1 -0
  20. package/dist/{chunk-F5A4GDQW.js → chunk-LMJ2TGWJ.js} +3 -15
  21. package/dist/chunk-LMJ2TGWJ.js.map +1 -0
  22. package/dist/{chunk-EGNRE7VA.js → chunk-PAHNGS65.js} +2 -2
  23. package/dist/{chunk-QWRLW4CT.js → chunk-RLCJQ6VZ.js} +5 -5
  24. package/dist/{chunk-7V3QDWNL.js → chunk-XJ7JVCHB.js} +2 -2
  25. package/dist/cli.js +2 -2
  26. package/dist/contract/index.d.ts +257 -160
  27. package/dist/contract/index.js +6 -6
  28. package/dist/fuzz.d.ts +19 -1
  29. package/dist/fuzz.js +1 -1
  30. package/dist/index.d.ts +154 -48
  31. package/dist/index.js +12 -10
  32. package/dist/index.js.map +1 -1
  33. package/dist/openapi.json +1 -1
  34. package/dist/primeintellect/index.d.ts +311 -0
  35. package/dist/primeintellect/index.js +348 -0
  36. package/dist/primeintellect/index.js.map +1 -0
  37. package/dist/rl.d.ts +4 -0
  38. package/dist/{run-campaign-DWC67KJP.js → run-campaign-OBXSN5WK.js} +3 -3
  39. package/dist/wire/index.d.ts +19 -1
  40. package/dist/wire/index.js +2 -2
  41. package/package.json +6 -1
  42. package/dist/chunk-F5A4GDQW.js.map +0 -1
  43. package/dist/chunk-MLHRFWQK.js.map +0 -1
  44. package/dist/chunk-VNLWDTDA.js.map +0 -1
  45. /package/dist/{chunk-JTMFT5QZ.js.map → chunk-4I2E3LLO.js.map} +0 -0
  46. /package/dist/{chunk-KK2O4VWA.js.map → chunk-D7AEXSM5.js.map} +0 -0
  47. /package/dist/{chunk-EGNRE7VA.js.map → chunk-PAHNGS65.js.map} +0 -0
  48. /package/dist/{chunk-QWRLW4CT.js.map → chunk-RLCJQ6VZ.js.map} +0 -0
  49. /package/dist/{chunk-7V3QDWNL.js.map → chunk-XJ7JVCHB.js.map} +0 -0
  50. /package/dist/{run-campaign-DWC67KJP.js.map → run-campaign-OBXSN5WK.js.map} +0 -0
@@ -15,7 +15,7 @@ import {
15
15
  runImprovementLoop,
16
16
  surfaceContentHash,
17
17
  surfaceHash
18
- } from "./chunk-QWRLW4CT.js";
18
+ } from "./chunk-RLCJQ6VZ.js";
19
19
  import {
20
20
  SearchLedgerConflictError,
21
21
  SearchLedgerError,
@@ -30,7 +30,7 @@ import {
30
30
  runCampaign,
31
31
  summarizeBackendIntegrity,
32
32
  withSearchLedgerFileLock
33
- } from "./chunk-EGNRE7VA.js";
33
+ } from "./chunk-PAHNGS65.js";
34
34
  import {
35
35
  Mutex
36
36
  } from "./chunk-3YYRZDON.js";
@@ -48,7 +48,7 @@ import {
48
48
  makePolicyEditCandidateRecord,
49
49
  policyEditsFromFindings,
50
50
  validatePolicyEditCandidateRecord
51
- } from "./chunk-VNLWDTDA.js";
51
+ } from "./chunk-7A4LIMMY.js";
52
52
  import {
53
53
  callLlm,
54
54
  callLlmJson,
@@ -67,7 +67,7 @@ import {
67
67
  import {
68
68
  CostAccountingIncompleteError,
69
69
  CostLedger
70
- } from "./chunk-MLHRFWQK.js";
70
+ } from "./chunk-JHOJHHU7.js";
71
71
  import {
72
72
  analyzeTraces
73
73
  } from "./chunk-FIUFRXP3.js";
@@ -4912,29 +4912,34 @@ function analysisEditProposer(opts) {
4912
4912
  const tracePath = join4(dir, "traces.jsonl");
4913
4913
  writeFileSync2(tracePath, traces.endsWith("\n") ? traces : `${traces}
4914
4914
  `);
4915
- if (costLedger.costCeilingUsd !== void 0 && !opts.analysisReceipt) {
4916
- throw new CostAccountingIncompleteError(
4917
- `${opts.kind}: capped analysis requires analysisReceipt before external execution`
4918
- );
4919
- }
4920
- const analysis = await costLedger.runPaidCall({
4921
- channel: "analyst",
4922
- phase,
4923
- actor: `${opts.kind}.analyze`,
4924
- model: opts.analysisModel,
4925
- maximumCharge: opts.analysisMaximumCharge,
4926
- tags: { generation: String(ctx.generation) },
4927
- signal: ctx.signal,
4928
- execute: (signal) => opts.analyze(tracePath, { ...ctx, signal }),
4929
- receipt: (report2) => opts.analysisReceipt?.(report2) ?? {
4930
- model: opts.analysisModel,
4931
- inputTokens: 0,
4932
- outputTokens: 0,
4933
- costUnknown: true
4915
+ let report;
4916
+ if (opts.analysisAlreadyMetered) {
4917
+ report = await opts.analyze(tracePath, { ...ctx, costLedger, costPhase: phase });
4918
+ } else {
4919
+ if (costLedger.costCeilingUsd !== void 0 && !opts.analysisReceipt) {
4920
+ throw new CostAccountingIncompleteError(
4921
+ `${opts.kind}: capped analysis requires analysisReceipt before external execution`
4922
+ );
4934
4923
  }
4935
- });
4936
- if (!analysis.succeeded) throw analysis.error;
4937
- const report = analysis.value;
4924
+ const analysis = await costLedger.runPaidCall({
4925
+ channel: "analyst",
4926
+ phase,
4927
+ actor: `${opts.kind}.analyze`,
4928
+ model: opts.analysisModel,
4929
+ maximumCharge: opts.analysisMaximumCharge,
4930
+ tags: { generation: String(ctx.generation) },
4931
+ signal: ctx.signal,
4932
+ execute: (signal) => opts.analyze(tracePath, { ...ctx, signal, costLedger, costPhase: phase }),
4933
+ receipt: (value) => opts.analysisReceipt?.(value) ?? {
4934
+ model: opts.analysisModel,
4935
+ inputTokens: 0,
4936
+ outputTokens: 0,
4937
+ costUnknown: true
4938
+ }
4939
+ });
4940
+ if (!analysis.succeeded) throw analysis.error;
4941
+ report = analysis.value;
4942
+ }
4938
4943
  const request = {
4939
4944
  model: opts.applyModel,
4940
4945
  messages: [
@@ -6316,7 +6321,12 @@ function traceAnalystProposer(opts) {
6316
6321
  const result = await registry.run(
6317
6322
  `trace-analyst-gen-${c.generation}`,
6318
6323
  { traceStore: new OtlpFileTraceStore({ path }) },
6319
- { signal: c.signal }
6324
+ {
6325
+ signal: c.signal,
6326
+ chainFindings: true,
6327
+ costLedger: c.costLedger,
6328
+ costPhase: c.costPhase
6329
+ }
6320
6330
  );
6321
6331
  return result.findings;
6322
6332
  });
@@ -6330,6 +6340,7 @@ function traceAnalystProposer(opts) {
6330
6340
  costLedger: opts.costLedger,
6331
6341
  analysisMaximumCharge: opts.analysisMaximumCharge,
6332
6342
  analysisReceipt: opts.analysisReceipt,
6343
+ analysisAlreadyMetered: opts.analyze === void 0,
6333
6344
  applyMaxTokens: opts.applyMaxTokens,
6334
6345
  fetchImpl: opts.fetchImpl,
6335
6346
  resolveTraces: opts.resolveTraces,
@@ -8098,4 +8109,4 @@ export {
8098
8109
  verifyCodeSurface,
8099
8110
  resolveWorktreePath
8100
8111
  };
8101
- //# sourceMappingURL=chunk-EKHHBKS6.js.map
8112
+ //# sourceMappingURL=chunk-F6YUH3L4.js.map