@tangle-network/agent-eval 0.125.0 → 0.126.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/CHANGELOG.md +48 -35
  2. package/README.md +270 -189
  3. package/dist/analyst/index.d.ts +15 -145
  4. package/dist/analyst/index.js +33 -47
  5. package/dist/analyst/index.js.map +1 -1
  6. package/dist/benchmarks/index.d.ts +45 -162
  7. package/dist/benchmarks/index.js +8 -9
  8. package/dist/campaign/index.d.ts +3671 -5389
  9. package/dist/campaign/index.js +21 -95
  10. package/dist/{chunk-R226UZOI.js → chunk-474LBSOX.js} +2 -2
  11. package/dist/{chunk-W5B3ZGP3.js → chunk-4B7ZZHPX.js} +8 -6
  12. package/dist/{chunk-W5B3ZGP3.js.map → chunk-4B7ZZHPX.js.map} +1 -1
  13. package/dist/{chunk-DT7OXY3C.js → chunk-CM4OILD2.js} +535 -846
  14. package/dist/chunk-CM4OILD2.js.map +1 -0
  15. package/dist/{chunk-HM6V7F3M.js → chunk-FO7HEH76.js} +3 -3
  16. package/dist/chunk-IILEIWGW.js +635 -0
  17. package/dist/chunk-IILEIWGW.js.map +1 -0
  18. package/dist/{chunk-EQUK3RFS.js → chunk-J5SQWP6Y.js} +8 -5
  19. package/dist/chunk-J5SQWP6Y.js.map +1 -0
  20. package/dist/chunk-KO2PZOGP.js +4637 -0
  21. package/dist/chunk-KO2PZOGP.js.map +1 -0
  22. package/dist/chunk-NTOV7RU5.js +7152 -0
  23. package/dist/chunk-NTOV7RU5.js.map +1 -0
  24. package/dist/{chunk-QFQZ3U3X.js → chunk-OCFJACJU.js} +2 -2
  25. package/dist/{chunk-GID26AN4.js → chunk-P22LJ3Y2.js} +4 -6
  26. package/dist/{chunk-GID26AN4.js.map → chunk-P22LJ3Y2.js.map} +1 -1
  27. package/dist/{chunk-SJT4OBVL.js → chunk-SDPM6554.js} +3 -3
  28. package/dist/{chunk-D5JZ7UDZ.js → chunk-UCLVDLCH.js} +136 -50
  29. package/dist/chunk-UCLVDLCH.js.map +1 -0
  30. package/dist/chunk-UI4YMIN2.js +105 -0
  31. package/dist/chunk-UI4YMIN2.js.map +1 -0
  32. package/dist/{chunk-JKDNAOF5.js → chunk-W4L6C2XT.js} +2 -2
  33. package/dist/{chunk-GRCDRKII.js → chunk-WS3NZZQQ.js} +58 -20
  34. package/dist/chunk-WS3NZZQQ.js.map +1 -0
  35. package/dist/cli.js +3 -3
  36. package/dist/contract/index.d.ts +3221 -3094
  37. package/dist/contract/index.js +173 -42
  38. package/dist/contract/index.js.map +1 -1
  39. package/dist/control.js +2 -3
  40. package/dist/fuzz.d.ts +14 -1
  41. package/dist/fuzz.js +1 -1
  42. package/dist/hosted/index.d.ts +8 -1
  43. package/dist/index.d.ts +71 -687
  44. package/dist/index.js +178 -497
  45. package/dist/index.js.map +1 -1
  46. package/dist/openapi.json +1 -1
  47. package/dist/rl.d.ts +5 -100
  48. package/dist/rl.js +4 -5
  49. package/dist/rl.js.map +1 -1
  50. package/dist/{run-campaign-I3JXKVAK.js → run-campaign-LVFKZCEU.js} +3 -3
  51. package/dist/traces.js +2 -3
  52. package/dist/wire/index.d.ts +14 -1
  53. package/dist/wire/index.js +3 -3
  54. package/docs/campaign-proposers.md +363 -168
  55. package/docs/design/loop-taxonomy.md +142 -190
  56. package/docs/design.md +1 -1
  57. package/docs/distributed-driver.md +8 -11
  58. package/docs/feature-guide.md +20 -19
  59. package/docs/knowledge-readiness.md +2 -5
  60. package/docs/multi-shot-optimization.md +35 -27
  61. package/docs/rollout.md +5 -5
  62. package/package.json +4 -4
  63. package/dist/chunk-A62YMFWA.js +0 -9269
  64. package/dist/chunk-A62YMFWA.js.map +0 -1
  65. package/dist/chunk-A6GT67HT.js +0 -550
  66. package/dist/chunk-A6GT67HT.js.map +0 -1
  67. package/dist/chunk-D5JZ7UDZ.js.map +0 -1
  68. package/dist/chunk-DT7OXY3C.js.map +0 -1
  69. package/dist/chunk-EQUK3RFS.js.map +0 -1
  70. package/dist/chunk-GC4ATIKK.js +0 -317
  71. package/dist/chunk-GC4ATIKK.js.map +0 -1
  72. package/dist/chunk-GRCDRKII.js.map +0 -1
  73. package/dist/chunk-LOW3U7JZ.js +0 -328
  74. package/dist/chunk-LOW3U7JZ.js.map +0 -1
  75. package/dist/chunk-PMITBABE.js +0 -3841
  76. package/dist/chunk-PMITBABE.js.map +0 -1
  77. /package/dist/{chunk-R226UZOI.js.map → chunk-474LBSOX.js.map} +0 -0
  78. /package/dist/{chunk-HM6V7F3M.js.map → chunk-FO7HEH76.js.map} +0 -0
  79. /package/dist/{chunk-QFQZ3U3X.js.map → chunk-OCFJACJU.js.map} +0 -0
  80. /package/dist/{chunk-SJT4OBVL.js.map → chunk-SDPM6554.js.map} +0 -0
  81. /package/dist/{chunk-JKDNAOF5.js.map → chunk-W4L6C2XT.js.map} +0 -0
  82. /package/dist/{run-campaign-I3JXKVAK.js.map → run-campaign-LVFKZCEU.js.map} +0 -0
package/dist/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "@tangle-network/agent-eval — wire protocol",
5
- "version": "0.125.0",
5
+ "version": "0.126.0",
6
6
  "description": "HTTP and stdio RPC interface to agent-eval. The TypeScript runtime is the source of truth; this spec is the contract that cross-language clients (Python, Rust, Go) generate from.\n\nWire-protocol version: 1.0.0. Bumps on breaking changes to request/response schemas.",
7
7
  "contact": {
8
8
  "name": "Tangle Network",
package/dist/rl.d.ts CHANGED
@@ -2410,7 +2410,12 @@ declare function detectRewardHacking(input: DetectRewardHackingInput): RewardHac
2410
2410
  type CostChannel = 'agent' | 'judge' | 'verifier' | 'analyst' | 'driver' | (string & {});
2411
2411
  /** Per-million token rates for a model or endpoint not covered by package pricing. */
2412
2412
  interface CustomTokenPricing {
2413
+ /** Non-cached input tokens. */
2413
2414
  inputUsdPerMillion: number;
2415
+ /** Cache-read tokens. Falls back to the normal input rate when omitted. */
2416
+ cachedInputUsdPerMillion?: number;
2417
+ /** Cache-creation or cache-write tokens. Falls back to the normal input rate when omitted. */
2418
+ cacheWriteUsdPerMillion?: number;
2414
2419
  outputUsdPerMillion: number;
2415
2420
  }
2416
2421
  interface ChannelRollup {
@@ -3501,104 +3506,6 @@ interface RLCampaignResult<V> {
3501
3506
  }
3502
3507
  declare function runRLCampaign<V>(opts: RunRLCampaignOptions<V>): Promise<RLCampaignResult<V>>;
3503
3508
 
3504
- /**
3505
- * Analyst contract — the missing orchestration layer over agent-eval's
3506
- * existing analyzers (analyzeTraces, MultiLayerVerifier, RunCritic,
3507
- * SemanticConceptJudge, JudgeFn, ...).
3508
- *
3509
- * Each existing primitive returns its own output shape. The Analyst
3510
- * contract is the single envelope every primitive lifts into, so a
3511
- * registry can run N analysts against a run and a single renderer can
3512
- * compose findings without knowing which analyzer produced them.
3513
- *
3514
- * The contract is intentionally domain-agnostic: nothing here knows
3515
- * about code, voice, RAG, or any particular agent stack. Analysts
3516
- * declare what INPUT KIND they need (a trace store, an artifact dir,
3517
- * a RunRecord, a JudgeInput, or `custom`), and the registry routes
3518
- * the matching input from `AnalystRunInputs`.
3519
- */
3520
-
3521
- interface EvidenceRef {
3522
- /**
3523
- * Where the evidence lives. `span` and `event` refer to OTLP trace
3524
- * elements; `artifact` to a file inside the run's artifact tree;
3525
- * `finding` to another AnalystFinding (cross-analyst chaining);
3526
- * `metric` to a named scalar reading the renderer knows how to read.
3527
- */
3528
- kind: 'span' | 'event' | 'artifact' | 'finding' | 'metric';
3529
- uri: string;
3530
- excerpt?: string;
3531
- }
3532
-
3533
- type PolicyEditSchemaVersion = 'policy-edit/v1';
3534
- declare const POLICY_EDIT_AXES: readonly ["carrier", "representation", "budget", "sampling", "output_contract", "tool_contract", "routing", "memory", "agent_profile", "deployment_target"];
3535
- type PolicyEditAxis = (typeof POLICY_EDIT_AXES)[number];
3536
- declare const POLICY_EDIT_TARGET_SURFACES: readonly ["prompt", "tool-contract", "runtime-config", "memory", "agent-profile", "code", "deployment"];
3537
- type PolicyEditTargetSurface = (typeof POLICY_EDIT_TARGET_SURFACES)[number];
3538
- type PolicyEditRisk = 'low' | 'medium' | 'high' | 'unknown';
3539
- type PolicyEditGainDirection = 'increase' | 'decrease';
3540
- type PolicyEditGainUnit = 'absolute' | 'relative' | 'percent' | 'score';
3541
- interface PolicyEditTarget {
3542
- surface: PolicyEditTargetSurface;
3543
- /** Stable path inside the target surface, for example `system-prompt:tools`
3544
- * or `budget.maxTurns`. */
3545
- path?: string;
3546
- /** Optional canonical deployment identity. Store the existing cell, not a
3547
- * local profile shape. */
3548
- agentProfileCell?: AgentProfileCell;
3549
- /** Human label when the path is not enough for a readable audit trail. */
3550
- label?: string;
3551
- }
3552
- type PolicyEditChange = {
3553
- kind: 'text';
3554
- mode: 'append' | 'prepend' | 'replace';
3555
- value: string;
3556
- /** Required when `mode === 'replace'`; exact match only. */
3557
- find?: string;
3558
- } | {
3559
- kind: 'json';
3560
- mode: 'set' | 'merge' | 'remove';
3561
- path: string;
3562
- value?: AgentProfileJson;
3563
- };
3564
- interface PolicyEditExpectedGain {
3565
- /** Metric this edit is expected to move, e.g. `holdout.composite`. */
3566
- metric: string;
3567
- direction: PolicyEditGainDirection;
3568
- /** Positive magnitude in the metric's native units. */
3569
- amount: number;
3570
- unit?: PolicyEditGainUnit;
3571
- rationale?: string;
3572
- }
3573
- interface PolicyEditSource {
3574
- findingIds: string[];
3575
- analystIds: string[];
3576
- evidenceRefs: EvidenceRef[];
3577
- /** Mirrors `AnalystFinding.derived_from_judge`; admission rejects it. */
3578
- derivedFromJudge?: boolean;
3579
- }
3580
- interface PolicyEdit {
3581
- schemaVersion: PolicyEditSchemaVersion;
3582
- editId: string;
3583
- axis: PolicyEditAxis;
3584
- target: PolicyEditTarget;
3585
- change: PolicyEditChange;
3586
- claim: string;
3587
- expectedGain: PolicyEditExpectedGain;
3588
- confidence: number;
3589
- risk: PolicyEditRisk;
3590
- source: PolicyEditSource;
3591
- rationale?: string;
3592
- validationPlan?: string;
3593
- metadata?: Record<string, unknown>;
3594
- }
3595
- declare const POLICY_EDIT_CANDIDATE_RECORD_SCHEMA: "tangle.policy-edit-candidate.v1";
3596
- /** JSON-safe attribution carried with a measured candidate and its scores. */
3597
- interface PolicyEditCandidateRecord {
3598
- schema: typeof POLICY_EDIT_CANDIDATE_RECORD_SCHEMA;
3599
- policyEdit: PolicyEdit;
3600
- }
3601
-
3602
3509
  /**
3603
3510
  * Pass A substrate types — `runCampaign` is the one primitive every
3604
3511
  * eval flow composes from. Three contracts in this file:
@@ -3776,8 +3683,6 @@ interface GenerationCandidate {
3776
3683
  * "because rationale Z" the audit requires to survive to the result.
3777
3684
  * Present when the proposer returned a `ProposedCandidate`. */
3778
3685
  rationale?: string;
3779
- /** Exact structured cause threaded from the proposer, when available. */
3780
- candidateRecord?: PolicyEditCandidateRecord;
3781
3686
  }
3782
3687
  interface CampaignAggregates {
3783
3688
  byJudge: Record<string, JudgeAggregate>;
package/dist/rl.js CHANGED
@@ -10,14 +10,14 @@ import {
10
10
  } from "./chunk-3RF76KTD.js";
11
11
  import {
12
12
  runEvalCampaign
13
- } from "./chunk-GID26AN4.js";
13
+ } from "./chunk-P22LJ3Y2.js";
14
14
  import {
15
15
  detectRewardHacking,
16
16
  extractVerifiableReward,
17
17
  extractVerifiableRewardsFromRecords,
18
18
  filterDeterministicallyRewarded
19
19
  } from "./chunk-ARU2PZFM.js";
20
- import "./chunk-EQUK3RFS.js";
20
+ import "./chunk-J5SQWP6Y.js";
21
21
  import {
22
22
  rubricPredictiveValidity
23
23
  } from "./chunk-X4UCIOTZ.js";
@@ -34,14 +34,13 @@ import {
34
34
  thompsonCurriculum,
35
35
  varianceBasedCurriculum
36
36
  } from "./chunk-VZSRQ272.js";
37
- import "./chunk-GRCDRKII.js";
37
+ import "./chunk-WS3NZZQQ.js";
38
38
  import "./chunk-VI2UW6B6.js";
39
39
  import "./chunk-TT4KNT67.js";
40
40
  import "./chunk-PC4UYEBM.js";
41
41
  import "./chunk-VQMK5FMP.js";
42
- import "./chunk-LOW3U7JZ.js";
42
+ import "./chunk-IILEIWGW.js";
43
43
  import "./chunk-MA6HLL3S.js";
44
- import "./chunk-GC4ATIKK.js";
45
44
  import "./chunk-VSMTAMNK.js";
46
45
  import {
47
46
  ValidationError