@tangle-network/agent-eval 0.123.2 → 0.123.4

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 (65) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +48 -4
  3. package/dist/analyst/index.d.ts +18 -3
  4. package/dist/analyst/index.js +5 -5
  5. package/dist/benchmarks/index.d.ts +10 -3
  6. package/dist/benchmarks/index.js +7 -7
  7. package/dist/campaign/index.d.ts +277 -250
  8. package/dist/campaign/index.js +20 -16
  9. package/dist/{chunk-EBDOTTZJ.js → chunk-4KO6D2BO.js} +3 -3
  10. package/dist/{chunk-3FCG7FBV.js → chunk-D5JZ7UDZ.js} +2 -2
  11. package/dist/{chunk-BGVTIE2C.js → chunk-GRCDRKII.js} +13 -2
  12. package/dist/chunk-GRCDRKII.js.map +1 -0
  13. package/dist/{chunk-FHFTYX2Q.js → chunk-JKDNAOF5.js} +2 -2
  14. package/dist/{chunk-RQP5UTK5.js → chunk-LT4J7ULK.js} +710 -359
  15. package/dist/chunk-LT4J7ULK.js.map +1 -0
  16. package/dist/{chunk-WXQTVEKM.js → chunk-MHPEGJHC.js} +3 -3
  17. package/dist/{chunk-J7S4YM27.js → chunk-MK3Q6GCL.js} +28 -14
  18. package/dist/chunk-MK3Q6GCL.js.map +1 -0
  19. package/dist/{chunk-DNVPOYUS.js → chunk-N7ZS6PEF.js} +2 -2
  20. package/dist/{chunk-4SOQ4ND2.js → chunk-QFQZ3U3X.js} +1 -1
  21. package/dist/chunk-QFQZ3U3X.js.map +1 -0
  22. package/dist/{chunk-WMJR67FX.js → chunk-QNVBALEX.js} +4 -4
  23. package/dist/{chunk-E3HAD4A3.js → chunk-SJT4OBVL.js} +2 -2
  24. package/dist/{chunk-HQY7LBV2.js → chunk-SUN7QLPB.js} +6 -6
  25. package/dist/{chunk-HQY7LBV2.js.map → chunk-SUN7QLPB.js.map} +1 -1
  26. package/dist/{chunk-5YMKIFYP.js → chunk-WP3GEXKI.js} +3 -3
  27. package/dist/cli.js +3 -3
  28. package/dist/contract/index.d.ts +18 -3
  29. package/dist/contract/index.js +7 -7
  30. package/dist/fuzz.d.ts +8 -1
  31. package/dist/fuzz.js +4 -4
  32. package/dist/index.d.ts +27 -9
  33. package/dist/index.js +14 -12
  34. package/dist/index.js.map +1 -1
  35. package/dist/multishot/index.d.ts +2 -2
  36. package/dist/openapi.json +1 -1
  37. package/dist/rl.d.ts +15 -2
  38. package/dist/rl.js +4 -2
  39. package/dist/rl.js.map +1 -1
  40. package/dist/{run-campaign-ZKR5MQMQ.js → run-campaign-I3JXKVAK.js} +3 -3
  41. package/dist/traces.d.ts +2 -2
  42. package/dist/traces.js +1 -1
  43. package/dist/wire/index.d.ts +16 -1
  44. package/dist/wire/index.js +3 -3
  45. package/docs/campaign-proposers.md +142 -131
  46. package/docs/concepts.md +30 -34
  47. package/docs/design/loop-taxonomy.md +2 -3
  48. package/docs/design.md +0 -1
  49. package/docs/multi-shot-optimization.md +41 -49
  50. package/package.json +1 -1
  51. package/dist/chunk-4SOQ4ND2.js.map +0 -1
  52. package/dist/chunk-BGVTIE2C.js.map +0 -1
  53. package/dist/chunk-J7S4YM27.js.map +0 -1
  54. package/dist/chunk-RQP5UTK5.js.map +0 -1
  55. package/docs/improvement-glossary.md +0 -204
  56. package/docs/self-improvement-map.md +0 -115
  57. /package/dist/{chunk-EBDOTTZJ.js.map → chunk-4KO6D2BO.js.map} +0 -0
  58. /package/dist/{chunk-3FCG7FBV.js.map → chunk-D5JZ7UDZ.js.map} +0 -0
  59. /package/dist/{chunk-FHFTYX2Q.js.map → chunk-JKDNAOF5.js.map} +0 -0
  60. /package/dist/{chunk-WXQTVEKM.js.map → chunk-MHPEGJHC.js.map} +0 -0
  61. /package/dist/{chunk-DNVPOYUS.js.map → chunk-N7ZS6PEF.js.map} +0 -0
  62. /package/dist/{chunk-WMJR67FX.js.map → chunk-QNVBALEX.js.map} +0 -0
  63. /package/dist/{chunk-E3HAD4A3.js.map → chunk-SJT4OBVL.js.map} +0 -0
  64. /package/dist/{chunk-5YMKIFYP.js.map → chunk-WP3GEXKI.js.map} +0 -0
  65. /package/dist/{run-campaign-ZKR5MQMQ.js.map → run-campaign-I3JXKVAK.js.map} +0 -0
@@ -206,8 +206,8 @@ interface LlmCallResult {
206
206
  content: string;
207
207
  usage: LlmUsage;
208
208
  /**
209
- * Cost in USD. Pulled from proxy's `_response_cost` field when present;
210
- * `null` when neither the proxy nor the caller can derive it.
209
+ * Cost in USD. Uses the provider's reported cost when present, otherwise
210
+ * caller-supplied token pricing. `null` when neither is available.
211
211
  */
212
212
  costUsd: number | null;
213
213
  /** Model name actually used (echoed from response). */
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.123.2",
5
+ "version": "0.123.4",
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
@@ -2408,6 +2408,11 @@ interface DetectRewardHackingInput {
2408
2408
  declare function detectRewardHacking(input: DetectRewardHackingInput): RewardHackingReport;
2409
2409
 
2410
2410
  type CostChannel = 'agent' | 'judge' | 'verifier' | 'analyst' | 'driver' | (string & {});
2411
+ /** Per-million token rates for a model or endpoint not covered by package pricing. */
2412
+ interface CustomTokenPricing {
2413
+ inputUsdPerMillion: number;
2414
+ outputUsdPerMillion: number;
2415
+ }
2411
2416
  interface ChannelRollup {
2412
2417
  channel: CostChannel;
2413
2418
  calls: number;
@@ -2551,8 +2556,8 @@ interface LlmCallResult {
2551
2556
  content: string;
2552
2557
  usage: LlmUsage;
2553
2558
  /**
2554
- * Cost in USD. Pulled from proxy's `_response_cost` field when present;
2555
- * `null` when neither the proxy nor the caller can derive it.
2559
+ * Cost in USD. Uses the provider's reported cost when present, otherwise
2560
+ * caller-supplied token pricing. `null` when neither is available.
2556
2561
  */
2557
2562
  costUsd: number | null;
2558
2563
  /** Model name actually used (echoed from response). */
@@ -2611,6 +2616,8 @@ interface LlmClientOptions {
2611
2616
  deadlineMs?: number;
2612
2617
  /** Total provider attempts. Legacy option name; default 3 (1 initial + 2 retries). */
2613
2618
  maxRetries?: number;
2619
+ /** Token rates used when the provider omits cost or package pricing does not cover the model. */
2620
+ customTokenPricing?: CustomTokenPricing;
2614
2621
  /**
2615
2622
  * Transport for requests that declare `jsonSchema`. `native` sends
2616
2623
  * `response_format: json_schema`; `json-object` sends the broadly supported
@@ -2618,6 +2625,12 @@ interface LlmClientOptions {
2618
2625
  * instructions. Default: `native`.
2619
2626
  */
2620
2627
  jsonSchemaTransport?: 'native' | 'json-object';
2628
+ /**
2629
+ * JSON payload parsing policy. `extract` accepts fenced or prose-prefixed JSON.
2630
+ * `exact` requires the complete response content to be one JSON value.
2631
+ * Default: `extract`.
2632
+ */
2633
+ jsonPayloadMode?: 'extract' | 'exact';
2621
2634
  /** Fetch implementation — defaults to global `fetch`. Override for custom transport (e.g. tests). */
2622
2635
  fetch?: typeof fetch;
2623
2636
  /**
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-DNVPOYUS.js";
13
+ } from "./chunk-N7ZS6PEF.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-J7S4YM27.js";
20
+ import "./chunk-MK3Q6GCL.js";
21
21
  import {
22
22
  rubricPredictiveValidity
23
23
  } from "./chunk-X4UCIOTZ.js";
@@ -34,6 +34,8 @@ import {
34
34
  thompsonCurriculum,
35
35
  varianceBasedCurriculum
36
36
  } from "./chunk-VZSRQ272.js";
37
+ import "./chunk-GRCDRKII.js";
38
+ import "./chunk-VI2UW6B6.js";
37
39
  import "./chunk-TT4KNT67.js";
38
40
  import "./chunk-PC4UYEBM.js";
39
41
  import "./chunk-VQMK5FMP.js";