@tangle-network/agent-eval 0.117.1 → 0.118.1

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 (143) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/analyst/index.d.ts +2772 -21
  3. package/dist/analyst/index.js +7 -6
  4. package/dist/analyst/index.js.map +1 -1
  5. package/dist/belief-state/index.d.ts +706 -10
  6. package/dist/belief-state/index.js +2 -1
  7. package/dist/belief-state/index.js.map +1 -1
  8. package/dist/benchmarks/index.d.ts +958 -14
  9. package/dist/benchmarks/index.js +12 -10
  10. package/dist/builder-eval/index.d.ts +449 -4
  11. package/dist/builder-eval/index.js +4 -3
  12. package/dist/builder-eval/index.js.map +1 -1
  13. package/dist/campaign/index.d.ts +4275 -73
  14. package/dist/campaign/index.js +12 -10
  15. package/dist/{chunk-VF3XSYTI.js → chunk-33JA4TFA.js} +6 -6
  16. package/dist/{chunk-4JLWXDYA.js → chunk-3EHHMC6E.js} +2 -2
  17. package/dist/{chunk-CCZIVI3F.js → chunk-BFW56GTT.js} +2 -2
  18. package/dist/{chunk-YZPO4UHR.js → chunk-FTUMG2U7.js} +124 -149
  19. package/dist/chunk-FTUMG2U7.js.map +1 -0
  20. package/dist/{chunk-E4BUPP7Z.js → chunk-HKUCJ437.js} +38 -66
  21. package/dist/chunk-HKUCJ437.js.map +1 -0
  22. package/dist/{chunk-HZHNRYHK.js → chunk-K6N6XJJX.js} +2 -2
  23. package/dist/chunk-KSDQVPLR.js +286 -0
  24. package/dist/chunk-KSDQVPLR.js.map +1 -0
  25. package/dist/chunk-MA6HLL3S.js +65 -0
  26. package/dist/chunk-MA6HLL3S.js.map +1 -0
  27. package/dist/{chunk-MGEHEHSN.js → chunk-OIIMMLRB.js} +11 -11
  28. package/dist/{chunk-DXZRATT5.js → chunk-OYZAPX5G.js} +3 -3
  29. package/dist/chunk-PXE2VKMX.js +140 -0
  30. package/dist/chunk-PXE2VKMX.js.map +1 -0
  31. package/dist/{chunk-JSJZ4PJ6.js → chunk-Q442S5AS.js} +17 -17
  32. package/dist/{chunk-ODVOOEWQ.js → chunk-QBRSJK47.js} +2 -2
  33. package/dist/{chunk-S2F4J57L.js → chunk-QKEGNI5B.js} +77 -32
  34. package/dist/chunk-QKEGNI5B.js.map +1 -0
  35. package/dist/{chunk-5UF54T55.js → chunk-S3UZOQ5Y.js} +34 -7
  36. package/dist/chunk-S3UZOQ5Y.js.map +1 -0
  37. package/dist/{chunk-FQNLDL4D.js → chunk-SVH2ANFD.js} +136 -4
  38. package/dist/chunk-SVH2ANFD.js.map +1 -0
  39. package/dist/{chunk-GQCZRZ7L.js → chunk-U5CHZ5M3.js} +9 -9
  40. package/dist/{chunk-TVVP3ZZQ.js → chunk-VQMK5FMP.js} +2 -1
  41. package/dist/{chunk-TVVP3ZZQ.js.map → chunk-VQMK5FMP.js.map} +1 -1
  42. package/dist/chunk-WDHBCA3M.js +31 -0
  43. package/dist/chunk-WDHBCA3M.js.map +1 -0
  44. package/dist/{chunk-HQPHZGL6.js → chunk-YLMUS4MM.js} +9 -9
  45. package/dist/{chunk-LQUTGLOZ.js → chunk-ZET2UAYW.js} +15 -65
  46. package/dist/chunk-ZET2UAYW.js.map +1 -0
  47. package/dist/contract/index.d.ts +4012 -38
  48. package/dist/contract/index.js +56 -29
  49. package/dist/contract/index.js.map +1 -1
  50. package/dist/control.d.ts +1013 -9
  51. package/dist/control.js +4 -3
  52. package/dist/fuzz.d.ts +194 -4
  53. package/dist/fuzz.js +3 -3
  54. package/dist/hosted/index.d.ts +498 -17
  55. package/dist/index.d.ts +10992 -1288
  56. package/dist/index.js +101 -80
  57. package/dist/index.js.map +1 -1
  58. package/dist/matrix/index.d.ts +139 -4
  59. package/dist/meta-eval/index.d.ts +862 -15
  60. package/dist/meta-eval/index.js +2 -1
  61. package/dist/meta-eval/index.js.map +1 -1
  62. package/dist/multishot/index.d.ts +214 -14
  63. package/dist/openapi.json +1 -1
  64. package/dist/pipelines/index.d.ts +392 -7
  65. package/dist/pipelines/index.js +5 -3
  66. package/dist/pipelines/index.js.map +1 -1
  67. package/dist/reporting.d.ts +1277 -17
  68. package/dist/rl.d.ts +2359 -28
  69. package/dist/rl.js +6 -5
  70. package/dist/rl.js.map +1 -1
  71. package/dist/storyboard/index.d.ts +86 -1
  72. package/dist/trace-attributes.d.ts +16 -0
  73. package/dist/trace-attributes.js +32 -0
  74. package/dist/trace-attributes.js.map +1 -0
  75. package/dist/traces.d.ts +1978 -697
  76. package/dist/traces.js +53 -32
  77. package/dist/wire/index.d.ts +655 -9
  78. package/docs/insight-report.md +44 -0
  79. package/package.json +9 -3
  80. package/dist/adversarial-B7loGVVX.d.ts +0 -19
  81. package/dist/analyst-C8HHvfJp.d.ts +0 -88
  82. package/dist/analyze-runs--2x39HZ7.d.ts +0 -81
  83. package/dist/baseline-DKq3gJpP.d.ts +0 -141
  84. package/dist/calibration-C8MTS7cw.d.ts +0 -101
  85. package/dist/chunk-5UF54T55.js.map +0 -1
  86. package/dist/chunk-E4BUPP7Z.js.map +0 -1
  87. package/dist/chunk-FQNLDL4D.js.map +0 -1
  88. package/dist/chunk-LQUTGLOZ.js.map +0 -1
  89. package/dist/chunk-S2F4J57L.js.map +0 -1
  90. package/dist/chunk-YZPO4UHR.js.map +0 -1
  91. package/dist/code-agent-session-CjZsVd19.d.ts +0 -87
  92. package/dist/control-6vuGfmDH.d.ts +0 -258
  93. package/dist/cost-ledger-DWy3XdJc.d.ts +0 -183
  94. package/dist/dataset-NENEzRgk.d.ts +0 -115
  95. package/dist/default-registry-DaK8b3fv.d.ts +0 -155
  96. package/dist/emitter-CjD7vUwv.d.ts +0 -122
  97. package/dist/errors-oeQrLqXC.d.ts +0 -74
  98. package/dist/failure-cluster-DOAcSJ87.d.ts +0 -76
  99. package/dist/feedback-trajectory-BUnM58xL.d.ts +0 -348
  100. package/dist/gepa-eESocoDi.d.ts +0 -642
  101. package/dist/index-PdX4VnPA.d.ts +0 -423
  102. package/dist/insight-report-DY4nDW9Q.d.ts +0 -310
  103. package/dist/integrity-DqlBiLyK.d.ts +0 -81
  104. package/dist/judge-calibration-7C-IDmKr.d.ts +0 -145
  105. package/dist/kind-factory-ClZmO25A.d.ts +0 -171
  106. package/dist/llm-client-qoDd18Qz.d.ts +0 -289
  107. package/dist/multi-layer-verifier-BsqKuLyN.d.ts +0 -150
  108. package/dist/off-policy-DiwuKKg7.d.ts +0 -132
  109. package/dist/outcome-store-rnXLEqSn.d.ts +0 -63
  110. package/dist/policy-edit-wG9uFEFm.d.ts +0 -455
  111. package/dist/pre-registration-BWQhJ3vz.d.ts +0 -761
  112. package/dist/provenance-DpjwyseI.d.ts +0 -541
  113. package/dist/query-CF7PG61p.d.ts +0 -35
  114. package/dist/raw-provider-sink-C46HDghv.d.ts +0 -132
  115. package/dist/release-report-C8G2i5Xi.d.ts +0 -236
  116. package/dist/researcher-C8XyxQsu.d.ts +0 -387
  117. package/dist/rubric-predictive-validity-p49lLVrE.d.ts +0 -105
  118. package/dist/run-record-BDH49H2E.d.ts +0 -360
  119. package/dist/runtime-trajectory-DGBIUt4B.d.ts +0 -49
  120. package/dist/schema-B3Q3l9Z_.d.ts +0 -201
  121. package/dist/semantic-concept-judge-CXnPEJbf.d.ts +0 -723
  122. package/dist/sequential-5iSVfzl2.d.ts +0 -139
  123. package/dist/series-convergence-D5OWMBg6.d.ts +0 -33
  124. package/dist/statistics-KUnG73jH.d.ts +0 -494
  125. package/dist/storage-DrX3v_5B.d.ts +0 -50
  126. package/dist/store-C1YxJDEK.d.ts +0 -248
  127. package/dist/store-DGqD0Pyo.d.ts +0 -116
  128. package/dist/summary-report-C5bKFfm-.d.ts +0 -445
  129. package/dist/test-graded-scenario-B0ybnPY7.d.ts +0 -166
  130. package/dist/types-BSw1rOUB.d.ts +0 -634
  131. package/dist/types-BUxNaJ8c.d.ts +0 -108
  132. package/dist/types-BkfcQnxV.d.ts +0 -313
  133. package/dist/verdict-C9MlYujm.d.ts +0 -35
  134. /package/dist/{chunk-VF3XSYTI.js.map → chunk-33JA4TFA.js.map} +0 -0
  135. /package/dist/{chunk-4JLWXDYA.js.map → chunk-3EHHMC6E.js.map} +0 -0
  136. /package/dist/{chunk-CCZIVI3F.js.map → chunk-BFW56GTT.js.map} +0 -0
  137. /package/dist/{chunk-HZHNRYHK.js.map → chunk-K6N6XJJX.js.map} +0 -0
  138. /package/dist/{chunk-MGEHEHSN.js.map → chunk-OIIMMLRB.js.map} +0 -0
  139. /package/dist/{chunk-DXZRATT5.js.map → chunk-OYZAPX5G.js.map} +0 -0
  140. /package/dist/{chunk-JSJZ4PJ6.js.map → chunk-Q442S5AS.js.map} +0 -0
  141. /package/dist/{chunk-ODVOOEWQ.js.map → chunk-QBRSJK47.js.map} +0 -0
  142. /package/dist/{chunk-GQCZRZ7L.js.map → chunk-U5CHZ5M3.js.map} +0 -0
  143. /package/dist/{chunk-HQPHZGL6.js.map → chunk-YLMUS4MM.js.map} +0 -0
@@ -1,348 +0,0 @@
1
- import { T as TraceEmitter } from './emitter-CjD7vUwv.js';
2
- import { F as FailureClass } from './schema-B3Q3l9Z_.js';
3
- import { T as TraceStore } from './store-DGqD0Pyo.js';
4
- import { a as DatasetSplit, D as DatasetScenario } from './dataset-NENEzRgk.js';
5
-
6
- /**
7
- * Policy-based agent control runtime.
8
- *
9
- * This is the minimal reusable loop behind driver-agent patterns:
10
- *
11
- * observe state -> validate -> decide next action -> act -> observe -> ...
12
- *
13
- * It deliberately does not model named "topologies". Direct execution,
14
- * critic/revise, driver intervention, specialist calls, and human escalation
15
- * are all just actions chosen by the control policy.
16
- */
17
-
18
- type ControlSeverity = 'info' | 'warning' | 'error' | 'critical';
19
- type ControlActionFailureMode = 'continue' | 'stop';
20
- interface ControlEvalResult {
21
- /** Stable validator or judge id. */
22
- id: string;
23
- /** Whether this check passed. */
24
- passed: boolean;
25
- /** Optional normalized score. 1 = best, 0 = worst. */
26
- score?: number;
27
- /** Objective validators should usually be "error" or "critical" when failed. */
28
- severity?: ControlSeverity;
29
- /** Human-readable result. */
30
- detail?: string;
31
- /** Small evidence string or pointer. Avoid large payloads. */
32
- evidence?: string;
33
- /** True when the result came from deterministic state, not LLM judgment. */
34
- objective?: boolean;
35
- /** Structured details for downstream control policies and reports. */
36
- metadata?: Record<string, unknown>;
37
- }
38
- interface ControlBudget {
39
- maxSteps: number;
40
- maxWallMs?: number;
41
- maxCostUsd?: number;
42
- }
43
- interface ControlStopPolicies<TState, TAction> {
44
- /**
45
- * Stop after N consecutive steps with no state fingerprint change and
46
- * less than `minScoreDelta` score movement. Disabled when omitted.
47
- */
48
- maxNoProgressSteps?: number;
49
- /**
50
- * Stop after the same action fingerprint is selected N consecutive
51
- * times. Disabled when omitted.
52
- */
53
- maxRepeatedActions?: number;
54
- /** Minimum score movement that counts as progress. Default 0.001. */
55
- minScoreDelta?: number;
56
- /** Override the default JSON/string fingerprint for state comparisons. */
57
- stateFingerprint?: (state: TState) => string;
58
- /** Override the default JSON/string fingerprint for repeated-action checks. */
59
- actionFingerprint?: (action: TAction) => string;
60
- }
61
- interface ControlContext<TState, TAction, TActionResult, TEval extends ControlEvalResult = ControlEvalResult> {
62
- intent: string;
63
- state: TState;
64
- evals: TEval[];
65
- history: ControlStep<TState, TAction, TActionResult, TEval>[];
66
- budget: ControlBudget;
67
- stepIndex: number;
68
- wallMs: number;
69
- spentCostUsd: number;
70
- remainingCostUsd?: number;
71
- abortSignal: AbortSignal;
72
- emitter?: TraceEmitter;
73
- }
74
- type ControlDecision<TAction> = {
75
- type: 'continue';
76
- action: TAction;
77
- reason?: string;
78
- } | {
79
- type: 'stop';
80
- reason: string;
81
- pass?: boolean;
82
- score?: number;
83
- };
84
- interface StopDecision {
85
- stop: boolean;
86
- pass: boolean;
87
- reason: string;
88
- score?: number;
89
- failureClass?: FailureClass;
90
- }
91
- interface ControlActionOutcome<TActionResult> {
92
- ok: boolean;
93
- result?: TActionResult;
94
- error?: string;
95
- costUsd?: number;
96
- durationMs: number;
97
- }
98
- interface ControlRuntimeError {
99
- phase: 'observe' | 'validate' | 'decide' | 'act' | 'stop-policy' | 'on-step' | 'trace';
100
- stepIndex: number;
101
- message: string;
102
- }
103
- interface ControlStep<TState, TAction, TActionResult, TEval extends ControlEvalResult = ControlEvalResult> {
104
- index: number;
105
- decision: ControlDecision<TAction>;
106
- beforeState: TState;
107
- afterState: TState;
108
- evalsBefore: TEval[];
109
- evalsAfter: TEval[];
110
- actionOutcome?: ControlActionOutcome<TActionResult>;
111
- startedAt: string;
112
- endedAt: string;
113
- }
114
- interface ControlRunResult<TState, TAction, TActionResult, TEval extends ControlEvalResult = ControlEvalResult> {
115
- intent: string;
116
- pass: boolean;
117
- completed: boolean;
118
- reason: string;
119
- score?: number;
120
- steps: ControlStep<TState, TAction, TActionResult, TEval>[];
121
- finalState: TState | undefined;
122
- finalEvals: TEval[];
123
- wallMs: number;
124
- spentCostUsd: number;
125
- /** null when the run executed without a TraceEmitter wired (no run record was persisted). */
126
- runId: string | null;
127
- failureClass?: FailureClass;
128
- runtimeErrors: ControlRuntimeError[];
129
- stoppedBy: 'policy' | 'stop-policy' | 'budget' | 'abort' | 'runtime-error';
130
- }
131
- interface ControlRuntimeConfig<TState, TAction, TActionResult, TEval extends ControlEvalResult = ControlEvalResult> {
132
- intent: string;
133
- budget?: Partial<ControlBudget>;
134
- signal?: AbortSignal;
135
- /** Defaults to `continue`: action failures are recorded, then the policy gets another chance. */
136
- actionFailure?: ControlActionFailureMode;
137
- /**
138
- * Extract cost from an action result. Used for `maxCostUsd` budget
139
- * enforcement and trace budget ledger emission.
140
- */
141
- getActionCostUsd?: (ctx: {
142
- action: TAction;
143
- result: TActionResult;
144
- state: TState;
145
- evals: TEval[];
146
- history: ControlStep<TState, TAction, TActionResult, TEval>[];
147
- }) => number | undefined;
148
- /** Read typed task/product state. Prefer structured state over transcript-only context. */
149
- observe: (ctx: {
150
- history: ControlStep<TState, TAction, TActionResult, TEval>[];
151
- abortSignal: AbortSignal;
152
- }) => Promise<TState> | TState;
153
- /** Objective validators first, subjective judges only where objective state is insufficient. */
154
- validate: (ctx: {
155
- intent: string;
156
- state: TState;
157
- history: ControlStep<TState, TAction, TActionResult, TEval>[];
158
- abortSignal: AbortSignal;
159
- }) => Promise<TEval[]> | TEval[];
160
- /** Choose the next control action. Can call a worker, ask user, run critic, inspect state, or stop. */
161
- decide: (ctx: ControlContext<TState, TAction, TActionResult, TEval>) => Promise<ControlDecision<TAction>> | ControlDecision<TAction>;
162
- /** Execute the action selected by the policy. */
163
- act: (action: TAction, ctx: ControlContext<TState, TAction, TActionResult, TEval>) => Promise<TActionResult> | TActionResult;
164
- /** Final stopping policy. Called before decide and after each action. */
165
- shouldStop?: (ctx: ControlContext<TState, TAction, TActionResult, TEval>) => Promise<StopDecision> | StopDecision;
166
- /** Optional hook for tracing or live progress updates. */
167
- onStep?: (step: ControlStep<TState, TAction, TActionResult, TEval>) => Promise<void> | void;
168
- /** Optional generic stuck-loop policies. Custom `shouldStop` still runs first. */
169
- stopPolicies?: ControlStopPolicies<TState, TAction>;
170
- /** Optional trace sink. Emits one run plus one span per control step. */
171
- store?: TraceStore;
172
- scenarioId?: string;
173
- projectId?: string;
174
- variantId?: string;
175
- }
176
- declare function runAgentControlLoop<TState, TAction, TActionResult, TEval extends ControlEvalResult = ControlEvalResult>(config: ControlRuntimeConfig<TState, TAction, TActionResult, TEval>): Promise<ControlRunResult<TState, TAction, TActionResult, TEval>>;
177
- declare function stopOnNoProgress<TState, TAction>(maxNoProgressSteps: number, options?: Omit<ControlStopPolicies<TState, TAction>, 'maxNoProgressSteps'>): ControlStopPolicies<TState, TAction>;
178
- declare function stopOnRepeatedAction<TState, TAction>(maxRepeatedActions: number, options?: Omit<ControlStopPolicies<TState, TAction>, 'maxRepeatedActions'>): ControlStopPolicies<TState, TAction>;
179
- declare function objectiveEval(input: Omit<ControlEvalResult, 'objective'>): ControlEvalResult;
180
- declare function subjectiveEval(input: Omit<ControlEvalResult, 'objective'>): ControlEvalResult;
181
- declare function allCriticalPassed(evals: ControlEvalResult[]): boolean;
182
-
183
- type FeedbackArtifactType = 'text' | 'code' | 'plan' | 'research' | 'action' | 'ui' | 'decision' | 'data' | 'other';
184
- type FeedbackLabelSource = 'user' | 'judge' | 'environment' | 'metric' | 'policy' | 'system';
185
- type FeedbackLabelKind = 'approve' | 'reject' | 'select' | 'edit' | 'rank' | 'rate' | 'comment' | 'metric_outcome' | 'policy_block' | 'revision_request';
186
- type FeedbackSeverity = 'info' | 'warning' | 'error' | 'critical';
187
- interface FeedbackTask {
188
- intent: string;
189
- context?: unknown;
190
- }
191
- interface ProposedSideEffect {
192
- type: string;
193
- risk?: 'low' | 'medium' | 'high';
194
- costUsd?: number;
195
- externalSideEffect?: boolean;
196
- requiresApproval?: boolean;
197
- metadata?: Record<string, unknown>;
198
- }
199
- interface FeedbackLabel {
200
- id?: string;
201
- source: FeedbackLabelSource;
202
- kind: FeedbackLabelKind;
203
- value: unknown;
204
- reason?: string;
205
- severity?: FeedbackSeverity;
206
- createdAt: string;
207
- metadata?: Record<string, unknown>;
208
- }
209
- interface FeedbackAttempt {
210
- id: string;
211
- stepIndex: number;
212
- artifactType: FeedbackArtifactType;
213
- artifact: unknown;
214
- options?: unknown[];
215
- proposedAction?: ProposedSideEffect;
216
- evals?: ControlEvalResult[];
217
- feedback?: FeedbackLabel[];
218
- createdAt: string;
219
- metadata?: Record<string, unknown>;
220
- }
221
- interface FeedbackOutcome {
222
- success?: boolean;
223
- score?: number;
224
- metrics?: Record<string, number>;
225
- costUsd?: number;
226
- detail?: string;
227
- observedAt?: string;
228
- metadata?: Record<string, unknown>;
229
- }
230
- interface FeedbackTrajectory {
231
- id: string;
232
- projectId?: string;
233
- scenarioId?: string;
234
- task: FeedbackTask;
235
- attempts: FeedbackAttempt[];
236
- labels: FeedbackLabel[];
237
- outcome?: FeedbackOutcome;
238
- split?: DatasetSplit;
239
- tags?: Record<string, string>;
240
- createdAt: string;
241
- updatedAt?: string;
242
- metadata?: Record<string, unknown>;
243
- }
244
- interface FeedbackTrajectoryStore {
245
- save(trajectory: FeedbackTrajectory): Promise<void>;
246
- get(id: string): Promise<FeedbackTrajectory | null>;
247
- list(filter?: FeedbackTrajectoryFilter): Promise<FeedbackTrajectory[]>;
248
- appendAttempt(id: string, attempt: FeedbackAttempt): Promise<FeedbackTrajectory>;
249
- appendLabel(id: string, label: FeedbackLabel, attemptId?: string): Promise<FeedbackTrajectory>;
250
- }
251
- interface FeedbackTrajectoryFilter {
252
- projectId?: string;
253
- scenarioId?: string;
254
- split?: DatasetSplit;
255
- tag?: [string, string];
256
- }
257
- interface FeedbackSplitPolicy {
258
- trainPct?: number;
259
- devPct?: number;
260
- testPct?: number;
261
- holdoutPct?: number;
262
- }
263
- interface PreferenceMemoryEntry {
264
- instruction: string;
265
- rationale: string;
266
- weight: number;
267
- sourceTrajectoryId: string;
268
- sourceLabelId?: string;
269
- category?: string;
270
- }
271
- interface FeedbackOptimizerRow {
272
- scenarioId: string;
273
- trajectoryId: string;
274
- labelKinds: FeedbackLabelKind[];
275
- score?: number;
276
- metadata?: Record<string, unknown>;
277
- }
278
- interface FeedbackReplayResult {
279
- trajectoryId: string;
280
- pass: boolean;
281
- score?: number;
282
- labels: FeedbackLabel[];
283
- outcome?: FeedbackOutcome;
284
- metadata?: Record<string, unknown>;
285
- }
286
- interface FeedbackReplayAdapter {
287
- replay(trajectory: FeedbackTrajectory): Promise<Omit<FeedbackReplayResult, 'trajectoryId'>> | Omit<FeedbackReplayResult, 'trajectoryId'>;
288
- }
289
- declare class InMemoryFeedbackTrajectoryStore implements FeedbackTrajectoryStore {
290
- private readonly trajectories;
291
- save(trajectory: FeedbackTrajectory): Promise<void>;
292
- get(id: string): Promise<FeedbackTrajectory | null>;
293
- list(filter?: FeedbackTrajectoryFilter): Promise<FeedbackTrajectory[]>;
294
- appendAttempt(id: string, attempt: FeedbackAttempt): Promise<FeedbackTrajectory>;
295
- appendLabel(id: string, label: FeedbackLabel, attemptId?: string): Promise<FeedbackTrajectory>;
296
- }
297
- declare class FileSystemFeedbackTrajectoryStore implements FeedbackTrajectoryStore {
298
- private readonly dir;
299
- private readonly memory;
300
- private loaded;
301
- constructor(options: {
302
- dir: string;
303
- });
304
- save(trajectory: FeedbackTrajectory): Promise<void>;
305
- get(id: string): Promise<FeedbackTrajectory | null>;
306
- list(filter?: FeedbackTrajectoryFilter): Promise<FeedbackTrajectory[]>;
307
- appendAttempt(id: string, attempt: FeedbackAttempt): Promise<FeedbackTrajectory>;
308
- appendLabel(id: string, label: FeedbackLabel, attemptId?: string): Promise<FeedbackTrajectory>;
309
- private append;
310
- private load;
311
- }
312
- declare function createFeedbackTrajectory(input: {
313
- id?: string;
314
- projectId?: string;
315
- scenarioId?: string;
316
- task: FeedbackTask;
317
- attempts?: FeedbackAttempt[];
318
- labels?: FeedbackLabel[];
319
- outcome?: FeedbackOutcome;
320
- split?: DatasetSplit;
321
- tags?: Record<string, string>;
322
- createdAt?: string;
323
- metadata?: Record<string, unknown>;
324
- }): FeedbackTrajectory;
325
- declare function assignFeedbackSplit(trajectory: Pick<FeedbackTrajectory, 'id' | 'projectId' | 'scenarioId' | 'task'>, policy?: FeedbackSplitPolicy): DatasetSplit;
326
- declare function withAssignedFeedbackSplit(trajectory: FeedbackTrajectory, policy?: FeedbackSplitPolicy): FeedbackTrajectory;
327
- declare function feedbackTrajectoryToDatasetScenario(trajectory: FeedbackTrajectory): DatasetScenario;
328
- declare function feedbackTrajectoriesToDatasetScenarios(trajectories: FeedbackTrajectory[]): DatasetScenario[];
329
- declare function feedbackTrajectoryToOptimizerRow(trajectory: FeedbackTrajectory): FeedbackOptimizerRow;
330
- declare function feedbackTrajectoriesToOptimizerRows(trajectories: FeedbackTrajectory[]): FeedbackOptimizerRow[];
331
- declare function replayFeedbackTrajectory(trajectory: FeedbackTrajectory, adapter: FeedbackReplayAdapter): Promise<FeedbackReplayResult>;
332
- declare function replayFeedbackTrajectories(trajectories: FeedbackTrajectory[], adapter: FeedbackReplayAdapter): Promise<FeedbackReplayResult[]>;
333
- declare function summarizePreferenceMemory(trajectories: FeedbackTrajectory[], options?: {
334
- maxEntries?: number;
335
- }): PreferenceMemoryEntry[];
336
- declare function renderPreferenceMemoryMarkdown(entries: PreferenceMemoryEntry[]): string;
337
- declare function serializeFeedbackTrajectoriesJsonl(trajectories: FeedbackTrajectory[]): string;
338
- declare function parseFeedbackTrajectoriesJsonl(jsonl: string): FeedbackTrajectory[];
339
- declare function controlRunToFeedbackTrajectory<TState, TAction, TActionResult>(run: ControlRunResult<TState, TAction, TActionResult>, options?: {
340
- projectId?: string;
341
- scenarioId?: string;
342
- artifactType?: FeedbackArtifactType;
343
- artifactFromStep?: (step: ControlStep<TState, TAction, TActionResult>) => unknown;
344
- proposedActionFromStep?: (step: ControlStep<TState, TAction, TActionResult>) => ProposedSideEffect | undefined;
345
- createdAt?: string;
346
- }): FeedbackTrajectory;
347
-
348
- export { type ProposedSideEffect as A, allCriticalPassed as B, type ControlSeverity as C, assignFeedbackSplit as D, controlRunToFeedbackTrajectory as E, type FeedbackTrajectoryStore as F, createFeedbackTrajectory as G, feedbackTrajectoriesToDatasetScenarios as H, InMemoryFeedbackTrajectoryStore as I, feedbackTrajectoriesToOptimizerRows as J, feedbackTrajectoryToDatasetScenario as K, feedbackTrajectoryToOptimizerRow as L, objectiveEval as M, parseFeedbackTrajectoriesJsonl as N, renderPreferenceMemoryMarkdown as O, type PreferenceMemoryEntry as P, replayFeedbackTrajectories as Q, replayFeedbackTrajectory as R, type StopDecision as S, runAgentControlLoop as T, serializeFeedbackTrajectoriesJsonl as U, stopOnNoProgress as V, stopOnRepeatedAction as W, subjectiveEval as X, summarizePreferenceMemory as Y, withAssignedFeedbackSplit as Z, type ControlEvalResult as a, type FeedbackLabel as b, type FeedbackTrajectory as c, type ControlActionFailureMode as d, type ControlActionOutcome as e, type ControlBudget as f, type ControlContext as g, type ControlDecision as h, type ControlRunResult as i, type ControlRuntimeConfig as j, type ControlRuntimeError as k, type ControlStep as l, type ControlStopPolicies as m, type FeedbackArtifactType as n, type FeedbackAttempt as o, type FeedbackLabelKind as p, type FeedbackLabelSource as q, type FeedbackOptimizerRow as r, type FeedbackOutcome as s, type FeedbackReplayAdapter as t, type FeedbackReplayResult as u, type FeedbackSeverity as v, type FeedbackSplitPolicy as w, type FeedbackTask as x, type FeedbackTrajectoryFilter as y, FileSystemFeedbackTrajectoryStore as z };