@tangle-network/agent-eval 0.123.8 → 0.124.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 (61) hide show
  1. package/CHANGELOG.md +17 -4
  2. package/dist/analyst/index.d.ts +5 -0
  3. package/dist/analyst/index.js +4 -4
  4. package/dist/benchmarks/index.js +4 -4
  5. package/dist/campaign/index.d.ts +11 -0
  6. package/dist/campaign/index.js +4 -4
  7. package/dist/chunk-4Y7AAATF.js +1151 -0
  8. package/dist/chunk-4Y7AAATF.js.map +1 -0
  9. package/dist/{chunk-ZU3QWGZE.js → chunk-5PVZVCZB.js} +7 -5
  10. package/dist/chunk-5PVZVCZB.js.map +1 -0
  11. package/dist/{chunk-BUR5R4R4.js → chunk-A6GT67HT.js} +3 -3
  12. package/dist/{chunk-EEHHBAWH.js → chunk-DT7OXY3C.js} +2 -2
  13. package/dist/{chunk-PDHIOKRE.js → chunk-EQUK3RFS.js} +8 -4
  14. package/dist/chunk-EQUK3RFS.js.map +1 -0
  15. package/dist/{chunk-V7HQGZBT.js → chunk-GID26AN4.js} +2 -2
  16. package/dist/{chunk-27UXRPIQ.js → chunk-HM6V7F3M.js} +2 -2
  17. package/dist/chunk-IPYXE555.js +594 -0
  18. package/dist/chunk-IPYXE555.js.map +1 -0
  19. package/dist/chunk-MAX3TN3C.js +249 -0
  20. package/dist/chunk-MAX3TN3C.js.map +1 -0
  21. package/dist/chunk-MGGFVCJ7.js +288 -0
  22. package/dist/chunk-MGGFVCJ7.js.map +1 -0
  23. package/dist/{chunk-QVGVJQMR.js → chunk-PMITBABE.js} +7 -5
  24. package/dist/{chunk-QVGVJQMR.js.map → chunk-PMITBABE.js.map} +1 -1
  25. package/dist/{chunk-J3LHTAAB.js → chunk-QOTFXW5L.js} +1 -47
  26. package/dist/chunk-QOTFXW5L.js.map +1 -0
  27. package/dist/chunk-R7ZRE2KV.js +138 -0
  28. package/dist/chunk-R7ZRE2KV.js.map +1 -0
  29. package/dist/chunk-RZTMDUO7.js +49 -0
  30. package/dist/chunk-RZTMDUO7.js.map +1 -0
  31. package/dist/{chunk-RQ5TP2TV.js → chunk-W5B3ZGP3.js} +3 -3
  32. package/dist/cli.js +13 -2
  33. package/dist/cli.js.map +1 -1
  34. package/dist/contract/index.d.ts +7 -0
  35. package/dist/contract/index.js +4 -4
  36. package/dist/index.d.ts +699 -82
  37. package/dist/index.js +57 -121
  38. package/dist/index.js.map +1 -1
  39. package/dist/openapi.json +1 -1
  40. package/dist/pipelines/index.js +4 -2
  41. package/dist/pipelines/index.js.map +1 -1
  42. package/dist/rl.d.ts +3 -0
  43. package/dist/rl.js +2 -2
  44. package/dist/rollout/index.d.ts +1053 -0
  45. package/dist/rollout/index.js +109 -0
  46. package/dist/rollout/index.js.map +1 -0
  47. package/dist/supervisor-run/index.d.ts +705 -0
  48. package/dist/supervisor-run/index.js +52 -0
  49. package/dist/supervisor-run/index.js.map +1 -0
  50. package/dist/wire/index.d.ts +3 -0
  51. package/dist/wire/index.js +2 -2
  52. package/docs/rollout.md +48 -0
  53. package/package.json +11 -1
  54. package/dist/chunk-J3LHTAAB.js.map +0 -1
  55. package/dist/chunk-PDHIOKRE.js.map +0 -1
  56. package/dist/chunk-ZU3QWGZE.js.map +0 -1
  57. /package/dist/{chunk-BUR5R4R4.js.map → chunk-A6GT67HT.js.map} +0 -0
  58. /package/dist/{chunk-EEHHBAWH.js.map → chunk-DT7OXY3C.js.map} +0 -0
  59. /package/dist/{chunk-V7HQGZBT.js.map → chunk-GID26AN4.js.map} +0 -0
  60. /package/dist/{chunk-27UXRPIQ.js.map → chunk-HM6V7F3M.js.map} +0 -0
  61. /package/dist/{chunk-RQ5TP2TV.js.map → chunk-W5B3ZGP3.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -6,7 +6,7 @@ All notable changes to `@tangle-network/agent-eval` and its sibling `agent-eval-
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- ### Added
9
+ ### Changed
10
10
 
11
11
  - `selfImprove({ budget: { candidateConcurrency } })` exposes the existing `runOptimization()` control for scoring candidate campaigns in parallel; it remains opt-in and defaults to one candidate campaign at a time.
12
12
  - `llmPolicyEditProposer()` and `projectPolicyEditHistory()` accept `scenarioOrder: 'input'` when controlled comparisons must preserve first-occurrence caller order; ranked evidence selection remains the default.
@@ -14,9 +14,6 @@ All notable changes to `@tangle-network/agent-eval` and its sibling `agent-eval-
14
14
  - `llmPolicyEditProposer({ redactCurrentSurfaceForModel })` can remove credentials and unrelated fields from the current surface sent to the model while applying validated edits to the complete original surface.
15
15
  - `CostLedger.listPending()` exposes immutable pending paid calls and distinguishes calls that are active, late after cancellation, or interrupted by a prior process so durable workflows can reconcile exact reservations before resuming.
16
16
  - `traceAnalystProposer()` accepts an opt-in `resolvePriorFindings` callback that forwards canonical prior findings into the existing analyst registry.
17
-
18
- ### Changed
19
-
20
17
  - Trace-analysis actors are instructed to emit one executable JavaScript program per turn, report named turn-limit exhaustion, and preserve per-analyst failure details when a proposer produces no findings.
21
18
  - Keep one live tip per lineage track when another track branches or merges from it, and compare those track tips when building the frontier.
22
19
  - Pass track identity, operation, vision, ancestry, and proposer choice to candidate generation so independent tracks can pursue distinct strategies.
@@ -53,6 +50,22 @@ All notable changes to `@tangle-network/agent-eval` and its sibling `agent-eval-
53
50
  - `runSkillOpt({ holdoutScenarios })` fails closed because those rows are adaptively reused.
54
51
  Pass `selectionScenarios`; selection result fields now use `Selection` instead of `Holdout`, and `lift` is now `selectionLift`.
55
52
 
53
+ ## [0.124.0] — 2026-07-24 — rollout and supervisor-run subpaths
54
+
55
+ ### Added
56
+
57
+ - `callLlm()` and `callLlmJson()` accept request-level or client-default `thinking: 'enabled' | 'disabled'`; GEPA, SkillOpt, and policy-edit authors expose the same per-proposer override, and the exact mode is preserved in cost bounds, raw request capture, and provider traffic.
58
+ - `@tangle-network/agent-eval/rollout` subpath: the single owner of the `tangle.rollout.v1` serialization — canonical schema + fail-loud validation, ledger file API (`writeRolloutLedger`/`appendRolloutLines`/`readRolloutLedger`), harness-store intake readers (opencode sqlite, Claude Code project jsonl), exporters (SFT, reward rows, Prime Intellect verifiers `RolloutOutput`, OpenAI RFT), deterministic 9-rule scrubber, HuggingFace dataset-card generation, and the `agent-eval rollout-release` CLI (build + optional `--push`). Ported from the agent-runtime bench rollout-ledger and reconciled with the PR #410 row shape; see `docs/rollout.md` for the decision table.
59
+ - `@tangle-network/agent-eval/supervisor-run` subpath: supervision-tree analysis alongside single-rollout trace analysis. `analyzeSupervisorRun(runDir | reader | sources)` returns a `SupervisorRunReport` — steer count with per-worker breakdown, spawn waves + sizes, max concurrency, respawns/repeated labels/delegation depth, supervisor wall + idle wall + worker utilization, accepted vs rejected vs empty-pass, evidence→respawn vs blind respawn, tokens/USD by role, judge verdict + patch stats — and `rollupSupervisorRuns` aggregates across runs. Every metric is `Measured<T> = T | {unavailable: reason}`, so a missing artifact never reads as a measured zero. The input contract is a `SupervisorRunReader` over already-read bytes; `loopsSupervisorRunReader` is one implementation (the loops `.loops/supervisor/*` on-disk layout). `supervisorRunRolloutLines` emits the tree as `tangle.rollout.v1` rows keyed by `parent_rollout_id`, so a supervision tree lands in the same ledger as solo rollouts. Ported from the agent-runtime bench run-report; byte-identical on both committed backfill fixtures.
60
+
61
+ ### Changed
62
+
63
+ - `mintRolloutRows` now emits canonical `tangle.rollout.v1` lines (snake_case wire shape) instead of the interim `RolloutRow`; records without trace spans become labeled gap lines AND are listed in `missingTraces` instead of being skipped. `toSftRows`/`toRewardRows` operate on the new lines; `toSftRows` additionally enforces the trainable-split filter (holdout/dev/canary never export). The realness gate still forces reward 0 and SFT exclusion.
64
+
65
+ ### Fixed
66
+
67
+ - `openOpencodeDb` composes the `node:sqlite` specifier at runtime so neither esbuild nor Vite rewrites it, keeping the opencode rollout reader working in the bundled package.
68
+
56
69
  ## [0.123.8] — 2026-07-23 — reasoning-token accounting
57
70
 
58
71
  ### Fixed
@@ -1020,6 +1020,7 @@ interface LlmMessage {
1020
1020
  };
1021
1021
  }>;
1022
1022
  }
1023
+ type LlmThinkingMode = 'enabled' | 'disabled';
1023
1024
  interface LlmCallRequest {
1024
1025
  model: string;
1025
1026
  messages: LlmMessage[];
@@ -1032,6 +1033,8 @@ interface LlmCallRequest {
1032
1033
  };
1033
1034
  temperature?: number;
1034
1035
  maxTokens?: number;
1036
+ /** OpenAI-compatible reasoning mode. Omitted when the provider default should apply. */
1037
+ thinking?: LlmThinkingMode;
1035
1038
  /** Per-call timeout, default 300s. */
1036
1039
  timeoutMs?: number;
1037
1040
  }
@@ -1125,6 +1128,8 @@ interface LlmClientOptions {
1125
1128
  * Default: `extract`.
1126
1129
  */
1127
1130
  jsonPayloadMode?: 'extract' | 'exact';
1131
+ /** Default provider reasoning mode. A per-call request value takes precedence. */
1132
+ thinking?: LlmThinkingMode;
1128
1133
  /** Fetch implementation — defaults to global `fetch`. Override for custom transport (e.g. tests). */
1129
1134
  fetch?: typeof fetch;
1130
1135
  /**
@@ -9,13 +9,13 @@ import {
9
9
  diffFindings,
10
10
  emitSkillUsageFindings,
11
11
  runSemanticConceptJudge
12
- } from "../chunk-RQ5TP2TV.js";
12
+ } from "../chunk-W5B3ZGP3.js";
13
13
  import {
14
14
  behavioralAnalyst,
15
15
  buildDefaultAnalystRegistry,
16
16
  createChatClient,
17
17
  deriveEfficiencyFindings
18
- } from "../chunk-BUR5R4R4.js";
18
+ } from "../chunk-A6GT67HT.js";
19
19
  import "../chunk-HHWE3POT.js";
20
20
  import {
21
21
  ANALYST_SEVERITIES,
@@ -71,8 +71,8 @@ import {
71
71
  validatePolicyEdit,
72
72
  validatePolicyEditCandidateRecord,
73
73
  validateUsageSettlementTimeout
74
- } from "../chunk-EEHHBAWH.js";
75
- import "../chunk-PDHIOKRE.js";
74
+ } from "../chunk-DT7OXY3C.js";
75
+ import "../chunk-EQUK3RFS.js";
76
76
  import {
77
77
  CostLedger
78
78
  } from "../chunk-GRCDRKII.js";
@@ -17,12 +17,12 @@ import {
17
17
  runBenchmarkAdapter,
18
18
  summarizeBenchmarkCampaign
19
19
  } from "../chunk-JKDNAOF5.js";
20
- import "../chunk-ZU3QWGZE.js";
21
- import "../chunk-QVGVJQMR.js";
20
+ import "../chunk-5PVZVCZB.js";
21
+ import "../chunk-PMITBABE.js";
22
22
  import "../chunk-D5JZ7UDZ.js";
23
- import "../chunk-EEHHBAWH.js";
23
+ import "../chunk-DT7OXY3C.js";
24
24
  import "../chunk-ARU2PZFM.js";
25
- import "../chunk-PDHIOKRE.js";
25
+ import "../chunk-EQUK3RFS.js";
26
26
  import "../chunk-PJQFMIOX.js";
27
27
  import "../chunk-GRCDRKII.js";
28
28
  import "../chunk-VI2UW6B6.js";
@@ -1113,6 +1113,7 @@ interface LlmMessage {
1113
1113
  };
1114
1114
  }>;
1115
1115
  }
1116
+ type LlmThinkingMode = 'enabled' | 'disabled';
1116
1117
  interface LlmCallRequest {
1117
1118
  model: string;
1118
1119
  messages: LlmMessage[];
@@ -1125,6 +1126,8 @@ interface LlmCallRequest {
1125
1126
  };
1126
1127
  temperature?: number;
1127
1128
  maxTokens?: number;
1129
+ /** OpenAI-compatible reasoning mode. Omitted when the provider default should apply. */
1130
+ thinking?: LlmThinkingMode;
1128
1131
  /** Per-call timeout, default 300s. */
1129
1132
  timeoutMs?: number;
1130
1133
  }
@@ -1219,6 +1222,8 @@ interface LlmClientOptions {
1219
1222
  * Default: `extract`.
1220
1223
  */
1221
1224
  jsonPayloadMode?: 'extract' | 'exact';
1225
+ /** Default provider reasoning mode. A per-call request value takes precedence. */
1226
+ thinking?: LlmThinkingMode;
1222
1227
  /** Fetch implementation — defaults to global `fetch`. Override for custom transport (e.g. tests). */
1223
1228
  fetch?: typeof fetch;
1224
1229
  /**
@@ -5455,6 +5460,8 @@ interface SkillOptProposerOptions {
5455
5460
  editBudget?: number;
5456
5461
  temperature?: number;
5457
5462
  maxTokens?: number;
5463
+ /** Provider reasoning mode for each patch-authoring call. Omitted to preserve the provider default. */
5464
+ thinking?: LlmCallRequest['thinking'];
5458
5465
  /** Top-K weak scenarios/dimensions surfaced as evidence. Default 3. */
5459
5466
  evidenceK?: number;
5460
5467
  }
@@ -5706,6 +5713,8 @@ interface GepaProposerOptions {
5706
5713
  temperature?: number;
5707
5714
  /** Reflection max tokens. Default 6000. */
5708
5715
  maxTokens?: number;
5716
+ /** Provider reasoning mode for each reflection call. Omitted to preserve the provider default. */
5717
+ thinking?: LlmCallRequest['thinking'];
5709
5718
  /** Structured-doc constraints. Candidates violating any are rejected
5710
5719
  * post-parse and dropped from the returned population. */
5711
5720
  constraints?: GepaProposerConstraints;
@@ -5937,6 +5946,8 @@ interface LlmPolicyEditProposerOptions {
5937
5946
  maxCandidates?: number;
5938
5947
  temperature?: number;
5939
5948
  maxTokens?: number;
5949
+ /** Provider reasoning mode for each policy-authoring call. Omitted to preserve the provider default. */
5950
+ thinking?: LlmCallRequest['thinking'];
5940
5951
  timeoutMs?: number;
5941
5952
  /** Number of most recent scored generations sent to the author. Default: 4. */
5942
5953
  maxHistoryGenerations?: number;
@@ -71,7 +71,7 @@ import {
71
71
  userStoryScoreboard,
72
72
  validateSearchLedgerEvent,
73
73
  verifyCodeSurface
74
- } from "../chunk-ZU3QWGZE.js";
74
+ } from "../chunk-5PVZVCZB.js";
75
75
  import {
76
76
  assertCodeSurfaceIdentity,
77
77
  buildEvidenceVector,
@@ -112,7 +112,7 @@ import {
112
112
  surfaceContentHash,
113
113
  surfaceHash,
114
114
  verifyLoopProvenanceRecord
115
- } from "../chunk-QVGVJQMR.js";
115
+ } from "../chunk-PMITBABE.js";
116
116
  import {
117
117
  SearchLedgerConflictError,
118
118
  SearchLedgerError,
@@ -133,9 +133,9 @@ import {
133
133
  import {
134
134
  POLICY_EDIT_CANDIDATE_RECORD_SCHEMA,
135
135
  validatePolicyEditCandidateRecord
136
- } from "../chunk-EEHHBAWH.js";
136
+ } from "../chunk-DT7OXY3C.js";
137
137
  import "../chunk-ARU2PZFM.js";
138
- import "../chunk-PDHIOKRE.js";
138
+ import "../chunk-EQUK3RFS.js";
139
139
  import "../chunk-PJQFMIOX.js";
140
140
  import "../chunk-GRCDRKII.js";
141
141
  import "../chunk-VI2UW6B6.js";