@fabricorg/experiments-evals 0.2.0 → 1.0.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.
@@ -1,4 +1,4 @@
1
- import { M as ModelClient, C as ChatMessage, g as ModelCompletionOptions, h as ModelResponse } from './model-client-B7yk_i1s.cjs';
1
+ import { M as ModelClient, C as ChatMessage, g as ModelCompletionOptions, h as ModelResponse } from './model-client-_mOEKGN7.cjs';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /** Authentication accepted by Databricks workspace APIs. */
@@ -76,201 +76,25 @@ declare const MlflowRunResponse: z.ZodObject<{
76
76
  end_time: z.ZodOptional<z.ZodNumber>;
77
77
  artifact_uri: z.ZodOptional<z.ZodString>;
78
78
  run_name: z.ZodOptional<z.ZodString>;
79
- }, "strip", z.ZodTypeAny, {
80
- status: string;
81
- run_id: string;
82
- experiment_id: string;
83
- start_time?: number | undefined;
84
- end_time?: number | undefined;
85
- artifact_uri?: string | undefined;
86
- run_name?: string | undefined;
87
- }, {
88
- status: string;
89
- run_id: string;
90
- experiment_id: string;
91
- start_time?: number | undefined;
92
- end_time?: number | undefined;
93
- artifact_uri?: string | undefined;
94
- run_name?: string | undefined;
95
- }>;
79
+ }, z.core.$strip>;
96
80
  data: z.ZodDefault<z.ZodObject<{
97
81
  metrics: z.ZodDefault<z.ZodArray<z.ZodObject<{
98
82
  key: z.ZodString;
99
83
  value: z.ZodNumber;
100
84
  timestamp: z.ZodOptional<z.ZodNumber>;
101
85
  step: z.ZodOptional<z.ZodNumber>;
102
- }, "strip", z.ZodTypeAny, {
103
- value: number;
104
- key: string;
105
- timestamp?: number | undefined;
106
- step?: number | undefined;
107
- }, {
108
- value: number;
109
- key: string;
110
- timestamp?: number | undefined;
111
- step?: number | undefined;
112
- }>, "many">>;
86
+ }, z.core.$strip>>>;
113
87
  params: z.ZodDefault<z.ZodArray<z.ZodObject<{
114
88
  key: z.ZodString;
115
89
  value: z.ZodString;
116
- }, "strip", z.ZodTypeAny, {
117
- value: string;
118
- key: string;
119
- }, {
120
- value: string;
121
- key: string;
122
- }>, "many">>;
90
+ }, z.core.$strip>>>;
123
91
  tags: z.ZodDefault<z.ZodArray<z.ZodObject<{
124
92
  key: z.ZodString;
125
93
  value: z.ZodString;
126
- }, "strip", z.ZodTypeAny, {
127
- value: string;
128
- key: string;
129
- }, {
130
- value: string;
131
- key: string;
132
- }>, "many">>;
133
- }, "strip", z.ZodTypeAny, {
134
- params: {
135
- value: string;
136
- key: string;
137
- }[];
138
- metrics: {
139
- value: number;
140
- key: string;
141
- timestamp?: number | undefined;
142
- step?: number | undefined;
143
- }[];
144
- tags: {
145
- value: string;
146
- key: string;
147
- }[];
148
- }, {
149
- params?: {
150
- value: string;
151
- key: string;
152
- }[] | undefined;
153
- metrics?: {
154
- value: number;
155
- key: string;
156
- timestamp?: number | undefined;
157
- step?: number | undefined;
158
- }[] | undefined;
159
- tags?: {
160
- value: string;
161
- key: string;
162
- }[] | undefined;
163
- }>>;
164
- }, "strip", z.ZodTypeAny, {
165
- info: {
166
- status: string;
167
- run_id: string;
168
- experiment_id: string;
169
- start_time?: number | undefined;
170
- end_time?: number | undefined;
171
- artifact_uri?: string | undefined;
172
- run_name?: string | undefined;
173
- };
174
- data: {
175
- params: {
176
- value: string;
177
- key: string;
178
- }[];
179
- metrics: {
180
- value: number;
181
- key: string;
182
- timestamp?: number | undefined;
183
- step?: number | undefined;
184
- }[];
185
- tags: {
186
- value: string;
187
- key: string;
188
- }[];
189
- };
190
- }, {
191
- info: {
192
- status: string;
193
- run_id: string;
194
- experiment_id: string;
195
- start_time?: number | undefined;
196
- end_time?: number | undefined;
197
- artifact_uri?: string | undefined;
198
- run_name?: string | undefined;
199
- };
200
- data?: {
201
- params?: {
202
- value: string;
203
- key: string;
204
- }[] | undefined;
205
- metrics?: {
206
- value: number;
207
- key: string;
208
- timestamp?: number | undefined;
209
- step?: number | undefined;
210
- }[] | undefined;
211
- tags?: {
212
- value: string;
213
- key: string;
214
- }[] | undefined;
215
- } | undefined;
216
- }>;
217
- }, "strip", z.ZodTypeAny, {
218
- run: {
219
- info: {
220
- status: string;
221
- run_id: string;
222
- experiment_id: string;
223
- start_time?: number | undefined;
224
- end_time?: number | undefined;
225
- artifact_uri?: string | undefined;
226
- run_name?: string | undefined;
227
- };
228
- data: {
229
- params: {
230
- value: string;
231
- key: string;
232
- }[];
233
- metrics: {
234
- value: number;
235
- key: string;
236
- timestamp?: number | undefined;
237
- step?: number | undefined;
238
- }[];
239
- tags: {
240
- value: string;
241
- key: string;
242
- }[];
243
- };
244
- };
245
- }, {
246
- run: {
247
- info: {
248
- status: string;
249
- run_id: string;
250
- experiment_id: string;
251
- start_time?: number | undefined;
252
- end_time?: number | undefined;
253
- artifact_uri?: string | undefined;
254
- run_name?: string | undefined;
255
- };
256
- data?: {
257
- params?: {
258
- value: string;
259
- key: string;
260
- }[] | undefined;
261
- metrics?: {
262
- value: number;
263
- key: string;
264
- timestamp?: number | undefined;
265
- step?: number | undefined;
266
- }[] | undefined;
267
- tags?: {
268
- value: string;
269
- key: string;
270
- }[] | undefined;
271
- } | undefined;
272
- };
273
- }>;
94
+ }, z.core.$strip>>>;
95
+ }, z.core.$strip>>;
96
+ }, z.core.$strip>;
97
+ }, z.core.$strip>;
274
98
  type DatabricksMlflowRun = z.infer<typeof MlflowRunResponse>['run'];
275
99
  interface DatabricksMlflowClientConfig {
276
100
  host: string;
@@ -1,4 +1,4 @@
1
- import { M as ModelClient, C as ChatMessage, g as ModelCompletionOptions, h as ModelResponse } from './model-client-B7yk_i1s.js';
1
+ import { M as ModelClient, C as ChatMessage, g as ModelCompletionOptions, h as ModelResponse } from './model-client-_mOEKGN7.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /** Authentication accepted by Databricks workspace APIs. */
@@ -76,201 +76,25 @@ declare const MlflowRunResponse: z.ZodObject<{
76
76
  end_time: z.ZodOptional<z.ZodNumber>;
77
77
  artifact_uri: z.ZodOptional<z.ZodString>;
78
78
  run_name: z.ZodOptional<z.ZodString>;
79
- }, "strip", z.ZodTypeAny, {
80
- status: string;
81
- run_id: string;
82
- experiment_id: string;
83
- start_time?: number | undefined;
84
- end_time?: number | undefined;
85
- artifact_uri?: string | undefined;
86
- run_name?: string | undefined;
87
- }, {
88
- status: string;
89
- run_id: string;
90
- experiment_id: string;
91
- start_time?: number | undefined;
92
- end_time?: number | undefined;
93
- artifact_uri?: string | undefined;
94
- run_name?: string | undefined;
95
- }>;
79
+ }, z.core.$strip>;
96
80
  data: z.ZodDefault<z.ZodObject<{
97
81
  metrics: z.ZodDefault<z.ZodArray<z.ZodObject<{
98
82
  key: z.ZodString;
99
83
  value: z.ZodNumber;
100
84
  timestamp: z.ZodOptional<z.ZodNumber>;
101
85
  step: z.ZodOptional<z.ZodNumber>;
102
- }, "strip", z.ZodTypeAny, {
103
- value: number;
104
- key: string;
105
- timestamp?: number | undefined;
106
- step?: number | undefined;
107
- }, {
108
- value: number;
109
- key: string;
110
- timestamp?: number | undefined;
111
- step?: number | undefined;
112
- }>, "many">>;
86
+ }, z.core.$strip>>>;
113
87
  params: z.ZodDefault<z.ZodArray<z.ZodObject<{
114
88
  key: z.ZodString;
115
89
  value: z.ZodString;
116
- }, "strip", z.ZodTypeAny, {
117
- value: string;
118
- key: string;
119
- }, {
120
- value: string;
121
- key: string;
122
- }>, "many">>;
90
+ }, z.core.$strip>>>;
123
91
  tags: z.ZodDefault<z.ZodArray<z.ZodObject<{
124
92
  key: z.ZodString;
125
93
  value: z.ZodString;
126
- }, "strip", z.ZodTypeAny, {
127
- value: string;
128
- key: string;
129
- }, {
130
- value: string;
131
- key: string;
132
- }>, "many">>;
133
- }, "strip", z.ZodTypeAny, {
134
- params: {
135
- value: string;
136
- key: string;
137
- }[];
138
- metrics: {
139
- value: number;
140
- key: string;
141
- timestamp?: number | undefined;
142
- step?: number | undefined;
143
- }[];
144
- tags: {
145
- value: string;
146
- key: string;
147
- }[];
148
- }, {
149
- params?: {
150
- value: string;
151
- key: string;
152
- }[] | undefined;
153
- metrics?: {
154
- value: number;
155
- key: string;
156
- timestamp?: number | undefined;
157
- step?: number | undefined;
158
- }[] | undefined;
159
- tags?: {
160
- value: string;
161
- key: string;
162
- }[] | undefined;
163
- }>>;
164
- }, "strip", z.ZodTypeAny, {
165
- info: {
166
- status: string;
167
- run_id: string;
168
- experiment_id: string;
169
- start_time?: number | undefined;
170
- end_time?: number | undefined;
171
- artifact_uri?: string | undefined;
172
- run_name?: string | undefined;
173
- };
174
- data: {
175
- params: {
176
- value: string;
177
- key: string;
178
- }[];
179
- metrics: {
180
- value: number;
181
- key: string;
182
- timestamp?: number | undefined;
183
- step?: number | undefined;
184
- }[];
185
- tags: {
186
- value: string;
187
- key: string;
188
- }[];
189
- };
190
- }, {
191
- info: {
192
- status: string;
193
- run_id: string;
194
- experiment_id: string;
195
- start_time?: number | undefined;
196
- end_time?: number | undefined;
197
- artifact_uri?: string | undefined;
198
- run_name?: string | undefined;
199
- };
200
- data?: {
201
- params?: {
202
- value: string;
203
- key: string;
204
- }[] | undefined;
205
- metrics?: {
206
- value: number;
207
- key: string;
208
- timestamp?: number | undefined;
209
- step?: number | undefined;
210
- }[] | undefined;
211
- tags?: {
212
- value: string;
213
- key: string;
214
- }[] | undefined;
215
- } | undefined;
216
- }>;
217
- }, "strip", z.ZodTypeAny, {
218
- run: {
219
- info: {
220
- status: string;
221
- run_id: string;
222
- experiment_id: string;
223
- start_time?: number | undefined;
224
- end_time?: number | undefined;
225
- artifact_uri?: string | undefined;
226
- run_name?: string | undefined;
227
- };
228
- data: {
229
- params: {
230
- value: string;
231
- key: string;
232
- }[];
233
- metrics: {
234
- value: number;
235
- key: string;
236
- timestamp?: number | undefined;
237
- step?: number | undefined;
238
- }[];
239
- tags: {
240
- value: string;
241
- key: string;
242
- }[];
243
- };
244
- };
245
- }, {
246
- run: {
247
- info: {
248
- status: string;
249
- run_id: string;
250
- experiment_id: string;
251
- start_time?: number | undefined;
252
- end_time?: number | undefined;
253
- artifact_uri?: string | undefined;
254
- run_name?: string | undefined;
255
- };
256
- data?: {
257
- params?: {
258
- value: string;
259
- key: string;
260
- }[] | undefined;
261
- metrics?: {
262
- value: number;
263
- key: string;
264
- timestamp?: number | undefined;
265
- step?: number | undefined;
266
- }[] | undefined;
267
- tags?: {
268
- value: string;
269
- key: string;
270
- }[] | undefined;
271
- } | undefined;
272
- };
273
- }>;
94
+ }, z.core.$strip>>>;
95
+ }, z.core.$strip>>;
96
+ }, z.core.$strip>;
97
+ }, z.core.$strip>;
274
98
  type DatabricksMlflowRun = z.infer<typeof MlflowRunResponse>['run'];
275
99
  interface DatabricksMlflowClientConfig {
276
100
  host: string;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as EvaluatorKind, M as ModelClient, a as EvalScore, C as ChatMessage } from './model-client-B7yk_i1s.cjs';
2
- export { b as EvalRun, c as EvalRunSpec, d as EvalRunStatus, e as EvalRunTarget, G as GenerationSignal, f as GenerationSignalItem, g as ModelCompletionOptions, h as ModelResponse, S as StaticModelClient, T as TokenUsage, m as maxCompletionTokenUsage } from './model-client-B7yk_i1s.cjs';
1
+ import { E as EvaluatorKind, M as ModelClient, a as EvalScore, C as ChatMessage } from './model-client-_mOEKGN7.cjs';
2
+ export { b as EvalRun, c as EvalRunSpec, d as EvalRunStatus, e as EvalRunTarget, G as GenerationSignal, f as GenerationSignalItem, g as ModelCompletionOptions, h as ModelResponse, S as StaticModelClient, T as TokenUsage, m as maxCompletionTokenUsage } from './model-client-_mOEKGN7.cjs';
3
3
  import 'zod';
4
4
 
5
5
  /** What an evaluator sees: the example under test plus the produced output. */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as EvaluatorKind, M as ModelClient, a as EvalScore, C as ChatMessage } from './model-client-B7yk_i1s.js';
2
- export { b as EvalRun, c as EvalRunSpec, d as EvalRunStatus, e as EvalRunTarget, G as GenerationSignal, f as GenerationSignalItem, g as ModelCompletionOptions, h as ModelResponse, S as StaticModelClient, T as TokenUsage, m as maxCompletionTokenUsage } from './model-client-B7yk_i1s.js';
1
+ import { E as EvaluatorKind, M as ModelClient, a as EvalScore, C as ChatMessage } from './model-client-_mOEKGN7.js';
2
+ export { b as EvalRun, c as EvalRunSpec, d as EvalRunStatus, e as EvalRunTarget, G as GenerationSignal, f as GenerationSignalItem, g as ModelCompletionOptions, h as ModelResponse, S as StaticModelClient, T as TokenUsage, m as maxCompletionTokenUsage } from './model-client-_mOEKGN7.js';
3
3
  import 'zod';
4
4
 
5
5
  /** What an evaluator sees: the example under test plus the produced output. */
@@ -0,0 +1,228 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const EvaluatorKind: z.ZodEnum<{
4
+ "llm-judge": "llm-judge";
5
+ code: "code";
6
+ heuristic: "heuristic";
7
+ }>;
8
+ type EvaluatorKind = z.infer<typeof EvaluatorKind>;
9
+ declare const TokenUsage: z.ZodObject<{
10
+ inputTokens: z.ZodNumber;
11
+ outputTokens: z.ZodNumber;
12
+ }, z.core.$strip>;
13
+ type TokenUsage = z.infer<typeof TokenUsage>;
14
+ /**
15
+ * One evaluator's verdict on one example (or, later, one span). `score` is
16
+ * normalized to [0, 1] where defined; `label` carries the categorical verdict
17
+ * ("hallucinated", "correct", …). Provenance fields are mandatory — every
18
+ * score must be traceable to evaluator name+version and, for judges, the
19
+ * prompt hash and model endpoint (governance: evals-judge-provenance).
20
+ */
21
+ declare const EvalScore: z.ZodObject<{
22
+ evaluatorName: z.ZodString;
23
+ evaluatorVersion: z.ZodString;
24
+ label: z.ZodOptional<z.ZodString>;
25
+ score: z.ZodNullable<z.ZodNumber>;
26
+ explanation: z.ZodOptional<z.ZodString>;
27
+ promptHash: z.ZodOptional<z.ZodString>;
28
+ modelEndpoint: z.ZodOptional<z.ZodString>;
29
+ tokens: z.ZodOptional<z.ZodObject<{
30
+ inputTokens: z.ZodNumber;
31
+ outputTokens: z.ZodNumber;
32
+ }, z.core.$strip>>;
33
+ latencyMs: z.ZodNumber;
34
+ }, z.core.$strip>;
35
+ type EvalScore = z.infer<typeof EvalScore>;
36
+ declare const EvalRunStatus: z.ZodEnum<{
37
+ pending: "pending";
38
+ running: "running";
39
+ succeeded: "succeeded";
40
+ failed: "failed";
41
+ cancelled: "cancelled";
42
+ }>;
43
+ type EvalRunStatus = z.infer<typeof EvalRunStatus>;
44
+ /** Target of a run: a frozen dataset version, or a live experiment's variants. */
45
+ declare const EvalRunTarget: z.ZodDiscriminatedUnion<[z.ZodObject<{
46
+ kind: z.ZodLiteral<"dataset">;
47
+ datasetId: z.ZodString;
48
+ version: z.ZodNumber;
49
+ }, z.core.$strip>, z.ZodObject<{
50
+ kind: z.ZodLiteral<"experiment">;
51
+ experimentId: z.ZodString;
52
+ metricEventName: z.ZodOptional<z.ZodString>;
53
+ }, z.core.$strip>], "kind">;
54
+ type EvalRunTarget = z.infer<typeof EvalRunTarget>;
55
+ /** One rendered conversation the generation phase completes through the model. */
56
+ declare const GenerationSignalItem: z.ZodObject<{
57
+ itemId: z.ZodString;
58
+ messages: z.ZodArray<z.ZodObject<{
59
+ role: z.ZodEnum<{
60
+ system: "system";
61
+ user: "user";
62
+ assistant: "assistant";
63
+ }>;
64
+ content: z.ZodString;
65
+ }, z.core.$strip>>;
66
+ }, z.core.$strip>;
67
+ type GenerationSignalItem = z.infer<typeof GenerationSignalItem>;
68
+ /**
69
+ * Generation phase of a playground-replay run (rendered prompt version per
70
+ * example). Rendering happens at dispatch time (pure); the model calls
71
+ * happen in the durable executor, and their tokens count inside
72
+ * `maxJudgeTokens` — the run's SHARED budget (review fix: generation must
73
+ * not occur outside the budget or the request-side lifecycle).
74
+ */
75
+ declare const GenerationSignal: z.ZodObject<{
76
+ promptId: z.ZodString;
77
+ promptVersion: z.ZodNumber;
78
+ reserveTokensPerCall: z.ZodNumber;
79
+ maxOutputTokens: z.ZodNumber;
80
+ temperature: z.ZodNumber;
81
+ items: z.ZodArray<z.ZodObject<{
82
+ itemId: z.ZodString;
83
+ messages: z.ZodArray<z.ZodObject<{
84
+ role: z.ZodEnum<{
85
+ system: "system";
86
+ user: "user";
87
+ assistant: "assistant";
88
+ }>;
89
+ content: z.ZodString;
90
+ }, z.core.$strip>>;
91
+ }, z.core.$strip>>;
92
+ }, z.core.$strip>;
93
+ type GenerationSignal = z.infer<typeof GenerationSignal>;
94
+ declare const EvalRunSpec: z.ZodObject<{
95
+ runId: z.ZodString;
96
+ tenantId: z.ZodString;
97
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
98
+ kind: z.ZodLiteral<"dataset">;
99
+ datasetId: z.ZodString;
100
+ version: z.ZodNumber;
101
+ }, z.core.$strip>, z.ZodObject<{
102
+ kind: z.ZodLiteral<"experiment">;
103
+ experimentId: z.ZodString;
104
+ metricEventName: z.ZodOptional<z.ZodString>;
105
+ }, z.core.$strip>], "kind">;
106
+ generation: z.ZodOptional<z.ZodObject<{
107
+ promptId: z.ZodString;
108
+ promptVersion: z.ZodNumber;
109
+ reserveTokensPerCall: z.ZodNumber;
110
+ maxOutputTokens: z.ZodNumber;
111
+ temperature: z.ZodNumber;
112
+ items: z.ZodArray<z.ZodObject<{
113
+ itemId: z.ZodString;
114
+ messages: z.ZodArray<z.ZodObject<{
115
+ role: z.ZodEnum<{
116
+ system: "system";
117
+ user: "user";
118
+ assistant: "assistant";
119
+ }>;
120
+ content: z.ZodString;
121
+ }, z.core.$strip>>;
122
+ }, z.core.$strip>>;
123
+ }, z.core.$strip>>;
124
+ evaluatorNames: z.ZodArray<z.ZodString>;
125
+ maxJudgeTokens: z.ZodOptional<z.ZodNumber>;
126
+ reserveTokensPerCall: z.ZodOptional<z.ZodNumber>;
127
+ createdAtIso: z.ZodString;
128
+ }, z.core.$strip>;
129
+ type EvalRunSpec = z.infer<typeof EvalRunSpec>;
130
+ declare const EvalRun: z.ZodObject<{
131
+ runId: z.ZodString;
132
+ tenantId: z.ZodString;
133
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
134
+ kind: z.ZodLiteral<"dataset">;
135
+ datasetId: z.ZodString;
136
+ version: z.ZodNumber;
137
+ }, z.core.$strip>, z.ZodObject<{
138
+ kind: z.ZodLiteral<"experiment">;
139
+ experimentId: z.ZodString;
140
+ metricEventName: z.ZodOptional<z.ZodString>;
141
+ }, z.core.$strip>], "kind">;
142
+ generation: z.ZodOptional<z.ZodObject<{
143
+ promptId: z.ZodString;
144
+ promptVersion: z.ZodNumber;
145
+ reserveTokensPerCall: z.ZodNumber;
146
+ maxOutputTokens: z.ZodNumber;
147
+ temperature: z.ZodNumber;
148
+ items: z.ZodArray<z.ZodObject<{
149
+ itemId: z.ZodString;
150
+ messages: z.ZodArray<z.ZodObject<{
151
+ role: z.ZodEnum<{
152
+ system: "system";
153
+ user: "user";
154
+ assistant: "assistant";
155
+ }>;
156
+ content: z.ZodString;
157
+ }, z.core.$strip>>;
158
+ }, z.core.$strip>>;
159
+ }, z.core.$strip>>;
160
+ evaluatorNames: z.ZodArray<z.ZodString>;
161
+ maxJudgeTokens: z.ZodOptional<z.ZodNumber>;
162
+ reserveTokensPerCall: z.ZodOptional<z.ZodNumber>;
163
+ createdAtIso: z.ZodString;
164
+ status: z.ZodEnum<{
165
+ pending: "pending";
166
+ running: "running";
167
+ succeeded: "succeeded";
168
+ failed: "failed";
169
+ cancelled: "cancelled";
170
+ }>;
171
+ scoredExamples: z.ZodNumber;
172
+ totalExamples: z.ZodNumber;
173
+ tokensSpent: z.ZodNumber;
174
+ costUsd: z.ZodNullable<z.ZodNumber>;
175
+ startedAtIso: z.ZodOptional<z.ZodString>;
176
+ finishedAtIso: z.ZodOptional<z.ZodString>;
177
+ error: z.ZodOptional<z.ZodString>;
178
+ }, z.core.$strip>;
179
+ type EvalRun = z.infer<typeof EvalRun>;
180
+
181
+ interface ChatMessage {
182
+ role: 'system' | 'user' | 'assistant';
183
+ content: string;
184
+ }
185
+ interface ModelResponse {
186
+ text: string;
187
+ tokens: TokenUsage;
188
+ }
189
+ interface ModelCompletionOptions {
190
+ /** Judges must be deterministic unless a caller explicitly builds another evaluator. */
191
+ temperature: number;
192
+ /** Provider-enforced completion ceiling used by the run budget reservation. */
193
+ maxOutputTokens: number;
194
+ }
195
+ /**
196
+ * The only surface through which evaluators reach a model. Production ships
197
+ * a Databricks Model Serving adapter at the explicit `/databricks` package
198
+ * subpath; the provider-neutral root never imports a provider client. Tests
199
+ * use `StaticModelClient`.
200
+ */
201
+ interface ModelClient {
202
+ /** Identifier recorded in EvalScore.modelEndpoint for provenance. */
203
+ readonly endpoint: string;
204
+ complete(messages: readonly ChatMessage[], options: ModelCompletionOptions): Promise<ModelResponse>;
205
+ }
206
+ /**
207
+ * Deterministic client for unit tests and `fx dev`: responses are matched by
208
+ * substring of the last user message, mirroring the frozen-vector discipline
209
+ * in `@fabricorg/experiments-testkit`.
210
+ */
211
+ declare class StaticModelClient implements ModelClient {
212
+ private readonly rules;
213
+ private readonly fallback;
214
+ readonly endpoint = "static-test-endpoint";
215
+ constructor(rules: Array<{
216
+ match: string;
217
+ respond: string;
218
+ }>, fallback?: string);
219
+ complete(messages: readonly ChatMessage[], options: ModelCompletionOptions): Promise<ModelResponse>;
220
+ }
221
+ /**
222
+ * Conservative provider-independent upper bound used before a judge call.
223
+ * A tokenizer cannot emit more tokens than the UTF-8 bytes representing the
224
+ * message content; the fixed allowance covers chat framing and role markers.
225
+ */
226
+ declare function maxCompletionTokenUsage(messages: readonly ChatMessage[], options: ModelCompletionOptions): number;
227
+
228
+ export { type ChatMessage as C, EvaluatorKind as E, GenerationSignal as G, type ModelClient as M, StaticModelClient as S, TokenUsage as T, EvalScore as a, EvalRun as b, EvalRunSpec as c, EvalRunStatus as d, EvalRunTarget as e, GenerationSignalItem as f, type ModelCompletionOptions as g, type ModelResponse as h, maxCompletionTokenUsage as m };