@tangle-network/agent-eval 0.120.4 → 0.122.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 (51) hide show
  1. package/CHANGELOG.md +4 -16
  2. package/dist/analyst/index.d.ts +1 -0
  3. package/dist/analyst/index.js +4 -4
  4. package/dist/belief-state/index.d.ts +43 -0
  5. package/dist/belief-state/index.js +48 -326
  6. package/dist/belief-state/index.js.map +1 -1
  7. package/dist/benchmarks/index.d.ts +5 -1
  8. package/dist/benchmarks/index.js +6 -6
  9. package/dist/campaign/index.d.ts +16 -18
  10. package/dist/campaign/index.js +7 -5
  11. package/dist/{chunk-SQQED7ZH.js → chunk-3A246TSA.js} +2 -2
  12. package/dist/{chunk-NMN4WGSJ.js → chunk-4I2E3LLO.js} +2 -2
  13. package/dist/chunk-7VYEGHWF.js +1425 -0
  14. package/dist/chunk-7VYEGHWF.js.map +1 -0
  15. package/dist/{chunk-ZMXDQ4K7.js → chunk-JHOJHHU7.js} +5 -8
  16. package/dist/{chunk-ZMXDQ4K7.js.map → chunk-JHOJHHU7.js.map} +1 -1
  17. package/dist/{chunk-3XH4Y2SS.js → chunk-P62I523A.js} +5 -3
  18. package/dist/{chunk-3XH4Y2SS.js.map → chunk-P62I523A.js.map} +1 -1
  19. package/dist/{chunk-CVJP5TMD.js → chunk-PICTDURQ.js} +2 -2
  20. package/dist/{chunk-5BYTIDZ7.js → chunk-QWMPPZ3X.js} +2 -2
  21. package/dist/{chunk-5CVUPHJ4.js → chunk-S5TT5R3L.js} +2 -2
  22. package/dist/{chunk-ZTJPIIVI.js → chunk-TDHX3BVA.js} +160 -7
  23. package/dist/chunk-TDHX3BVA.js.map +1 -0
  24. package/dist/{chunk-7QBFOJ3E.js → chunk-VZ6VKOJT.js} +32 -211
  25. package/dist/chunk-VZ6VKOJT.js.map +1 -0
  26. package/dist/{chunk-SYV364BL.js → chunk-XDIRG3TO.js} +2 -2
  27. package/dist/cli.js +2 -2
  28. package/dist/contract/index.d.ts +118 -29
  29. package/dist/contract/index.js +552 -502
  30. package/dist/contract/index.js.map +1 -1
  31. package/dist/fuzz.js +1 -1
  32. package/dist/index.d.ts +7 -19
  33. package/dist/index.js +13 -11
  34. package/dist/index.js.map +1 -1
  35. package/dist/openapi.json +1 -1
  36. package/dist/rl.d.ts +5 -1
  37. package/dist/{run-campaign-75RTPVV5.js → run-campaign-HNFPJET4.js} +3 -3
  38. package/dist/wire/index.js +2 -2
  39. package/docs/eval-surface-map.md +1 -1
  40. package/package.json +2 -2
  41. package/dist/chunk-7QBFOJ3E.js.map +0 -1
  42. package/dist/chunk-HKUCJ437.js +0 -787
  43. package/dist/chunk-HKUCJ437.js.map +0 -1
  44. package/dist/chunk-ZTJPIIVI.js.map +0 -1
  45. /package/dist/{chunk-SQQED7ZH.js.map → chunk-3A246TSA.js.map} +0 -0
  46. /package/dist/{chunk-NMN4WGSJ.js.map → chunk-4I2E3LLO.js.map} +0 -0
  47. /package/dist/{chunk-CVJP5TMD.js.map → chunk-PICTDURQ.js.map} +0 -0
  48. /package/dist/{chunk-5BYTIDZ7.js.map → chunk-QWMPPZ3X.js.map} +0 -0
  49. /package/dist/{chunk-5CVUPHJ4.js.map → chunk-S5TT5R3L.js.map} +0 -0
  50. /package/dist/{chunk-SYV364BL.js.map → chunk-XDIRG3TO.js.map} +0 -0
  51. /package/dist/{run-campaign-75RTPVV5.js.map → run-campaign-HNFPJET4.js.map} +0 -0
package/dist/fuzz.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CostLedger,
3
3
  CostReceiptCaptureError
4
- } from "./chunk-ZMXDQ4K7.js";
4
+ } from "./chunk-JHOJHHU7.js";
5
5
  import "./chunk-VI2UW6B6.js";
6
6
  import {
7
7
  varianceBasedCurriculum
package/dist/index.d.ts CHANGED
@@ -7830,11 +7830,15 @@ interface GenerationCandidate {
7830
7830
  * reflective proposer grounds its next edit on. Keep `notes` GENERALIZABLE
7831
7831
  * (which checks/lines/dimensions failed and how), NOT case-specific ground
7832
7832
  * truth: leaking expected answers into the prompt is memorization, and the
7833
- * held-out gate would reject it anyway. */
7833
+ * held-out gate would reject it anyway. `emitted` is a bounded excerpt of
7834
+ * the candidate's raw output for the scenario (worst rep when reps > 1) —
7835
+ * the "what it actually did" evidence; optional so trajectory capture is
7836
+ * never required of a dispatch. */
7834
7837
  scenarios: Array<{
7835
7838
  scenarioId: string;
7836
7839
  composite: number;
7837
7840
  notes?: string;
7841
+ emitted?: string;
7838
7842
  }>;
7839
7843
  /** Proposer-supplied short label for the change. Present when the proposer
7840
7844
  * returned a `ProposedCandidate`; absent for bare-surface mutators. */
@@ -13223,6 +13227,7 @@ interface IntentMatchOptions {
13223
13227
  llm?: LlmClientOptions;
13224
13228
  costLedger?: CostLedgerHandle;
13225
13229
  costPhase?: string;
13230
+ costTags?: Record<string, string>;
13226
13231
  signal?: AbortSignal;
13227
13232
  }
13228
13233
  /**
@@ -13855,6 +13860,7 @@ interface SemanticConceptJudgeOptions {
13855
13860
  llm?: LlmClientOptions;
13856
13861
  costLedger?: CostLedgerHandle;
13857
13862
  costPhase?: string;
13863
+ costTags?: Record<string, string>;
13858
13864
  signal?: AbortSignal;
13859
13865
  /**
13860
13866
  * Score aggregation strategy. Default `mean` — uniform average across
@@ -15253,24 +15259,6 @@ interface ReferenceReplaySteeringRowsOptions<Input = unknown> {
15253
15259
  declare function referenceReplayRunsToSteeringRows<Input = unknown>(runs: ReferenceReplayRun<Input>[], options?: ReferenceReplaySteeringRowsOptions<Input>): SteeringOptimizationRow[];
15254
15260
  declare function referenceReplayScenarioToRunScore(scenarioScore: ReferenceReplayScenarioScore, durationMs?: number): RunScore;
15255
15261
 
15256
- /**
15257
- * Reflective mutation — primitives for trace-conditioned prompt rewriting.
15258
- *
15259
- * Used by `prompt-evolution.ts` (and any consumer running iterative
15260
- * improvement). Given a parent prompt + concrete trace evidence (top trials,
15261
- * bottom trials, missed expectations), produce an LLM-ready prompt that
15262
- * proposes targeted mutations — not blind rephrasings.
15263
- *
15264
- * Why this lives outside `prompt-evolution.ts`: any consumer that wants to
15265
- * run reflective rewriting WITHOUT the population/Pareto machinery can
15266
- * import these primitives directly.
15267
- *
15268
- * Quality bar (vs. naive "mutate this prompt"):
15269
- * - Show parent ↔ children diff, not just one variant
15270
- * - Quote specific missed goldens with their match phrases
15271
- * - Surface the model's actual emitted output side-by-side with what was expected
15272
- * - Quote concrete mutation primitives so the model has a vocabulary
15273
- */
15274
15262
  interface TrialTrace {
15275
15263
  /** Stable id for the trial — surfaces in the prompt for grounding. */
15276
15264
  id: string;
package/dist/index.js CHANGED
@@ -9,12 +9,12 @@ import {
9
9
  checkBehavioralCanary,
10
10
  checkCanaries,
11
11
  runBehavioralCanaries
12
- } from "./chunk-SQQED7ZH.js";
12
+ } from "./chunk-3A246TSA.js";
13
13
  import {
14
14
  BENCHMARK_SPLIT_SEED,
15
15
  benchmarks_exports,
16
16
  deterministicSplit
17
- } from "./chunk-CVJP5TMD.js";
17
+ } from "./chunk-PICTDURQ.js";
18
18
  import {
19
19
  DEFAULT_RULES,
20
20
  buildTrajectory,
@@ -43,15 +43,17 @@ import {
43
43
  agentProfileHash,
44
44
  agentProfileId,
45
45
  agentProfileModelId,
46
+ comparePairedArms,
46
47
  completionVerdict,
47
48
  createLlmCorrectnessChecker,
48
49
  createTokenRecallChecker,
49
50
  expandProfileAxes,
50
51
  extractProducedState,
51
52
  harnessAxisOf,
53
+ pairArms,
52
54
  parseCorrectnessResponse,
53
55
  verifyCompletion
54
- } from "./chunk-ZTJPIIVI.js";
56
+ } from "./chunk-TDHX3BVA.js";
55
57
  import {
56
58
  DEFAULT_MUTATION_PRIMITIVES,
57
59
  DEFAULT_RED_TEAM_CORPUS,
@@ -65,7 +67,6 @@ import {
65
67
  campaignMeanComposite,
66
68
  codeExecutionJudge,
67
69
  coherenceJudge,
68
- comparePairedArms,
69
70
  costReceiptFromTCloud,
70
71
  createCustomJudge,
71
72
  createDomainExpertJudge,
@@ -78,7 +79,6 @@ import {
78
79
  heldOutGate,
79
80
  llmJudge,
80
81
  maximumChargeForTCloudRequest,
81
- pairArms,
82
82
  paretoFrontier,
83
83
  paretoFrontierWithCrowding,
84
84
  parseReflectionResponse,
@@ -91,7 +91,7 @@ import {
91
91
  scoreRedTeamOutput,
92
92
  surfaceContentHash,
93
93
  toolNamesForRun
94
- } from "./chunk-7QBFOJ3E.js";
94
+ } from "./chunk-VZ6VKOJT.js";
95
95
  import {
96
96
  BackendIntegrityError,
97
97
  assertRealAgentReceipts,
@@ -103,7 +103,7 @@ import {
103
103
  inMemoryVerdictCache,
104
104
  summarizeAgentReceiptIntegrity,
105
105
  summarizeBackendIntegrity
106
- } from "./chunk-SYV364BL.js";
106
+ } from "./chunk-XDIRG3TO.js";
107
107
  import {
108
108
  DEFAULT_COMPLEXITY_WEIGHTS,
109
109
  FindingsStore,
@@ -116,12 +116,12 @@ import {
116
116
  defaultIsMaterial,
117
117
  diffFindings,
118
118
  runSemanticConceptJudge
119
- } from "./chunk-3XH4Y2SS.js";
119
+ } from "./chunk-P62I523A.js";
120
120
  import {
121
121
  buildDefaultAnalystRegistry,
122
122
  computeTraceMetrics,
123
123
  createChatClient
124
- } from "./chunk-5BYTIDZ7.js";
124
+ } from "./chunk-QWMPPZ3X.js";
125
125
  import "./chunk-HHWE3POT.js";
126
126
  import {
127
127
  Mutex
@@ -157,7 +157,7 @@ import {
157
157
  scorePolicyEditReadiness,
158
158
  validatePolicyEdit,
159
159
  validatePolicyEditCandidateRecord
160
- } from "./chunk-5CVUPHJ4.js";
160
+ } from "./chunk-S5TT5R3L.js";
161
161
  import {
162
162
  allCriticalPassed,
163
163
  controlFailureClassFromVerification,
@@ -267,7 +267,7 @@ import {
267
267
  CostReservationExceededError,
268
268
  costForUsage,
269
269
  modelPriceKey
270
- } from "./chunk-ZMXDQ4K7.js";
270
+ } from "./chunk-JHOJHHU7.js";
271
271
  import {
272
272
  MODEL_PRICING,
273
273
  MetricsCollector,
@@ -8119,6 +8119,7 @@ async function runIntentMatchJudge(input, options = {}) {
8119
8119
  llm: options.llm ?? {},
8120
8120
  costLedger: options.costLedger ?? new CostLedger(),
8121
8121
  costPhase: options.costPhase ?? "judge.intent-match",
8122
+ costTags: options.costTags ?? {},
8122
8123
  signal: options.signal ?? new AbortController().signal
8123
8124
  };
8124
8125
  if (input.sourceFiles.length === 0 && !input.servedHtml) {
@@ -8154,6 +8155,7 @@ async function runIntentMatchJudge(input, options = {}) {
8154
8155
  phase: opts.costPhase,
8155
8156
  actor: "intent-match",
8156
8157
  model: opts.model,
8158
+ ...Object.keys(opts.costTags).length > 0 ? { tags: opts.costTags } : {},
8157
8159
  maximumCharge: maximumChargeForLlmRequest(request, opts.llm),
8158
8160
  signal: opts.signal,
8159
8161
  execute: (signal, callId) => callLlmJson(request, {