openmerit 0.1.5 → 0.1.6-preview.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 (91) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +33 -9
  3. package/dist/core/src/index.d.ts +12 -1
  4. package/dist/core/src/index.js +552 -40
  5. package/dist/pi/src/index.d.ts +17 -0
  6. package/dist/pi/src/index.js +448 -77
  7. package/dist/pi/src/scheduler.d.ts +11 -0
  8. package/dist/pi/src/scheduler.js +137 -0
  9. package/dist/pi/src/wakeup.d.ts +2 -0
  10. package/dist/pi/src/wakeup.js +108 -0
  11. package/dist/protocol/src/index.d.ts +86 -4
  12. package/dist/protocol/src/index.js +1 -1
  13. package/dist/protocol/src/schemas.d.ts +128 -2
  14. package/dist/protocol/src/schemas.js +57 -1
  15. package/dist/terminal/public/app.js +297 -0
  16. package/dist/terminal/public/brands/anthropic.png +0 -0
  17. package/dist/terminal/public/brands/baai.png +0 -0
  18. package/dist/terminal/public/brands/baseten.png +0 -0
  19. package/dist/terminal/public/brands/cerebras.png +0 -0
  20. package/dist/terminal/public/brands/cohere.png +0 -0
  21. package/dist/terminal/public/brands/deepseek.ico +0 -0
  22. package/dist/terminal/public/brands/google.png +0 -0
  23. package/dist/terminal/public/brands/groq.ico +0 -0
  24. package/dist/terminal/public/brands/lm-studio.png +0 -0
  25. package/dist/terminal/public/brands/meta.ico +0 -0
  26. package/dist/terminal/public/brands/mistral.png +0 -0
  27. package/dist/terminal/public/brands/nomic.png +0 -0
  28. package/dist/terminal/public/brands/ollama.png +0 -0
  29. package/dist/terminal/public/brands/openai.png +0 -0
  30. package/dist/terminal/public/brands/openrouter.png +0 -0
  31. package/dist/terminal/public/brands/qwen.png +0 -0
  32. package/dist/terminal/public/brands/vllm.ico +0 -0
  33. package/dist/terminal/public/brands/vllm.png +0 -0
  34. package/dist/terminal/public/favicon.svg +1 -0
  35. package/dist/terminal/public/flow.css +1 -0
  36. package/dist/terminal/public/flow.js +770 -0
  37. package/dist/terminal/public/index.html +21 -0
  38. package/dist/terminal/public/styles.css +779 -0
  39. package/dist/terminal/src/activity-merge.mjs +64 -0
  40. package/dist/terminal/src/browser.mjs +29 -0
  41. package/dist/terminal/src/cli.mjs +60 -0
  42. package/dist/terminal/src/collect.mjs +311 -0
  43. package/dist/terminal/src/discovery.mjs +93 -0
  44. package/dist/terminal/src/hardware.mjs +57 -0
  45. package/dist/terminal/src/project-activity.mjs +156 -0
  46. package/dist/terminal/src/sample.mjs +171 -0
  47. package/dist/terminal/src/server.mjs +56 -0
  48. package/dist/terminal/src/services.mjs +62 -0
  49. package/dist/terminal/src/topology.mjs +30 -0
  50. package/docs/adapter-guide.md +24 -7
  51. package/docs/architecture.md +8 -4
  52. package/docs/automation.md +10 -2
  53. package/docs/budgets.md +37 -0
  54. package/docs/commands.md +85 -0
  55. package/docs/demo-backfill.md +29 -0
  56. package/docs/demo-fieldkit.md +47 -0
  57. package/docs/demo-placement.md +30 -0
  58. package/docs/demo-spam.md +15 -0
  59. package/docs/demo-support.md +42 -0
  60. package/docs/demo.md +57 -0
  61. package/docs/first-trial.md +60 -0
  62. package/docs/getting-started.md +18 -8
  63. package/docs/index.md +40 -0
  64. package/docs/inference-terminal.md +439 -0
  65. package/docs/lifecycle.md +9 -9
  66. package/docs/memo.md +126 -0
  67. package/docs/metrics-and-evidence.md +11 -3
  68. package/docs/operations.md +12 -3
  69. package/docs/pi-extension.md +17 -7
  70. package/docs/roadmap.md +4 -2
  71. package/docs/security.md +15 -1
  72. package/docs/site-artwork-linocut.md +23 -0
  73. package/docs/site-artwork-miniature-diverse.md +28 -0
  74. package/docs/site-artwork-miniature.md +26 -0
  75. package/docs/site-demo.md +177 -0
  76. package/docs/site-design.md +94 -0
  77. package/docs/site-documentation.md +83 -0
  78. package/docs/site-dynamic-og.md +35 -0
  79. package/docs/site-faq-maintenance.md +115 -0
  80. package/docs/site-hero-resolution.md +60 -0
  81. package/docs/site-illustration-sequences.md +227 -0
  82. package/docs/site-inference-terminal.md +203 -0
  83. package/docs/site-memo.md +39 -0
  84. package/docs/site-og-image.md +38 -0
  85. package/docs/site-og-workshop.md +21 -0
  86. package/docs/site-section-artwork.md +56 -0
  87. package/docs/site-skill-review.md +57 -0
  88. package/docs/site-terminal-preview.md +85 -0
  89. package/docs/testing.md +85 -3
  90. package/docs/troubleshooting.md +55 -0
  91. package/package.json +48 -7
@@ -14,21 +14,53 @@ export declare const MetricObjectiveSchema: Type.TObject<{
14
14
  required: Type.TBoolean;
15
15
  minimumSamples: Type.TInteger;
16
16
  tolerance: Type.TNumber;
17
+ samplingPlan: Type.TObject<{
18
+ strategy: Type.TUnion<Type.TLiteral<string>[]>;
19
+ representativeCaseCount: Type.TInteger;
20
+ repetitionsPerCase: Type.TInteger;
21
+ aggregation: Type.TUnion<Type.TLiteral<string>[]>;
22
+ rationale: Type.TString;
23
+ }>;
17
24
  constraint: Type.TOptional<Type.TObject<{
18
25
  operator: Type.TUnion<Type.TLiteral<string>[]>;
19
26
  value: Type.TNumber;
20
27
  }>>;
21
28
  }>;
29
+ export declare const ApplicationLlmTargetSchema: Type.TObject<{
30
+ id: Type.TString;
31
+ kind: Type.TLiteral<"application_llm_call">;
32
+ name: Type.TString;
33
+ applicationId: Type.TString;
34
+ callSites: Type.TArray<Type.TString>;
35
+ routeKey: Type.TString;
36
+ confirmedAt: Type.TString;
37
+ }>;
22
38
  export declare const TaskProfileSchema: Type.TObject<{
23
39
  id: Type.TString;
24
40
  revision: Type.TInteger;
25
41
  name: Type.TString;
26
42
  goal: Type.TString;
43
+ applicationTarget: Type.TObject<{
44
+ id: Type.TString;
45
+ kind: Type.TLiteral<"application_llm_call">;
46
+ name: Type.TString;
47
+ applicationId: Type.TString;
48
+ callSites: Type.TArray<Type.TString>;
49
+ routeKey: Type.TString;
50
+ confirmedAt: Type.TString;
51
+ }>;
27
52
  objectives: Type.TArray<Type.TObject<{
28
53
  metricId: Type.TUnion<Type.TLiteral<string>[]>;
29
54
  required: Type.TBoolean;
30
55
  minimumSamples: Type.TInteger;
31
56
  tolerance: Type.TNumber;
57
+ samplingPlan: Type.TObject<{
58
+ strategy: Type.TUnion<Type.TLiteral<string>[]>;
59
+ representativeCaseCount: Type.TInteger;
60
+ repetitionsPerCase: Type.TInteger;
61
+ aggregation: Type.TUnion<Type.TLiteral<string>[]>;
62
+ rationale: Type.TString;
63
+ }>;
32
64
  constraint: Type.TOptional<Type.TObject<{
33
65
  operator: Type.TUnion<Type.TLiteral<string>[]>;
34
66
  value: Type.TNumber;
@@ -38,6 +70,7 @@ export declare const TaskProfileSchema: Type.TObject<{
38
70
  confirmedAt: Type.TOptional<Type.TString>;
39
71
  }>;
40
72
  export declare const ObservabilityCoverageSchema: Type.TObject<{
73
+ targetId: Type.TString;
41
74
  status: Type.TUnion<Type.TLiteral<string>[]>;
42
75
  requiredMetricIds: Type.TArray<Type.TUnion<Type.TLiteral<string>[]>>;
43
76
  coveredMetricIds: Type.TArray<Type.TUnion<Type.TLiteral<string>[]>>;
@@ -87,11 +120,13 @@ export declare const SupervisedGraduationPolicySchema: Type.TObject<{
87
120
  }>;
88
121
  }>;
89
122
  export declare const MetricRecordSchema: Type.TObject<{
123
+ targetId: Type.TString;
90
124
  metricId: Type.TUnion<Type.TLiteral<string>[]>;
91
125
  state: Type.TUnion<Type.TLiteral<string>[]>;
92
126
  scope: Type.TUnion<Type.TLiteral<string>[]>;
93
127
  direction: Type.TUnion<Type.TLiteral<string>[]>;
94
128
  method: Type.TUnion<Type.TLiteral<string>[]>;
129
+ aggregation: Type.TUnion<Type.TLiteral<string>[]>;
95
130
  value: Type.TOptional<Type.TNumber>;
96
131
  unit: Type.TString;
97
132
  sampleCount: Type.TInteger;
@@ -114,13 +149,32 @@ export declare const MetricRecordSchema: Type.TObject<{
114
149
  note: Type.TOptional<Type.TString>;
115
150
  }>;
116
151
  export declare const CandidateDescriptorSchema: Type.TObject<{
152
+ targetId: Type.TString;
117
153
  candidateId: Type.TString;
118
154
  modelId: Type.TString;
119
155
  modelVersion: Type.TOptional<Type.TString>;
120
156
  reasons: Type.TArray<Type.TString>;
121
157
  }>;
158
+ export declare const PreliminaryModelLeadSchema: Type.TObject<{
159
+ targetId: Type.TString;
160
+ modelId: Type.TString;
161
+ modelVersion: Type.TOptional<Type.TString>;
162
+ estimatedPrice: Type.TObject<{
163
+ currency: Type.TString;
164
+ inputPerMillionTokens: Type.TNumber;
165
+ outputPerMillionTokens: Type.TNumber;
166
+ sourceUri: Type.TString;
167
+ checkedAt: Type.TString;
168
+ }>;
169
+ reputation: Type.TObject<{
170
+ summary: Type.TString;
171
+ sourceUri: Type.TString;
172
+ checkedAt: Type.TString;
173
+ }>;
174
+ }>;
122
175
  export declare const CandidateAssessmentSchema: Type.TObject<{
123
176
  id: Type.TString;
177
+ targetId: Type.TString;
124
178
  taskProfileId: Type.TString;
125
179
  taskProfileRevision: Type.TInteger;
126
180
  candidateId: Type.TString;
@@ -131,11 +185,13 @@ export declare const CandidateAssessmentSchema: Type.TObject<{
131
185
  startedAt: Type.TString;
132
186
  completedAt: Type.TString;
133
187
  metrics: Type.TArray<Type.TObject<{
188
+ targetId: Type.TString;
134
189
  metricId: Type.TUnion<Type.TLiteral<string>[]>;
135
190
  state: Type.TUnion<Type.TLiteral<string>[]>;
136
191
  scope: Type.TUnion<Type.TLiteral<string>[]>;
137
192
  direction: Type.TUnion<Type.TLiteral<string>[]>;
138
193
  method: Type.TUnion<Type.TLiteral<string>[]>;
194
+ aggregation: Type.TUnion<Type.TLiteral<string>[]>;
139
195
  value: Type.TOptional<Type.TNumber>;
140
196
  unit: Type.TString;
141
197
  sampleCount: Type.TInteger;
@@ -160,6 +216,7 @@ export declare const CandidateAssessmentSchema: Type.TObject<{
160
216
  }>;
161
217
  export declare const FrontierSnapshotSchema: Type.TObject<{
162
218
  id: Type.TString;
219
+ targetId: Type.TString;
163
220
  taskProfileId: Type.TString;
164
221
  taskProfileRevision: Type.TInteger;
165
222
  productRevision: Type.TString;
@@ -184,6 +241,7 @@ export declare const FrontierSnapshotSchema: Type.TObject<{
184
241
  }>>;
185
242
  }>;
186
243
  export declare const FrontierRecommendationSchema: Type.TObject<{
244
+ targetId: Type.TString;
187
245
  frontierSnapshotId: Type.TString;
188
246
  selectedCandidateId: Type.TString;
189
247
  currentCandidateId: Type.TString;
@@ -204,11 +262,27 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
204
262
  revision: Type.TInteger;
205
263
  name: Type.TString;
206
264
  goal: Type.TString;
265
+ applicationTarget: Type.TObject<{
266
+ id: Type.TString;
267
+ kind: Type.TLiteral<"application_llm_call">;
268
+ name: Type.TString;
269
+ applicationId: Type.TString;
270
+ callSites: Type.TArray<Type.TString>;
271
+ routeKey: Type.TString;
272
+ confirmedAt: Type.TString;
273
+ }>;
207
274
  objectives: Type.TArray<Type.TObject<{
208
275
  metricId: Type.TUnion<Type.TLiteral<string>[]>;
209
276
  required: Type.TBoolean;
210
277
  minimumSamples: Type.TInteger;
211
278
  tolerance: Type.TNumber;
279
+ samplingPlan: Type.TObject<{
280
+ strategy: Type.TUnion<Type.TLiteral<string>[]>;
281
+ representativeCaseCount: Type.TInteger;
282
+ repetitionsPerCase: Type.TInteger;
283
+ aggregation: Type.TUnion<Type.TLiteral<string>[]>;
284
+ rationale: Type.TString;
285
+ }>;
212
286
  constraint: Type.TOptional<Type.TObject<{
213
287
  operator: Type.TUnion<Type.TLiteral<string>[]>;
214
288
  value: Type.TNumber;
@@ -216,6 +290,13 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
216
290
  }>>;
217
291
  createdAt: Type.TString;
218
292
  }>;
293
+ incumbent: Type.TObject<{
294
+ targetId: Type.TString;
295
+ candidateId: Type.TString;
296
+ modelId: Type.TString;
297
+ modelVersion: Type.TOptional<Type.TString>;
298
+ reasons: Type.TArray<Type.TString>;
299
+ }>;
219
300
  policy: Type.TObject<{
220
301
  mode: Type.TLiteral<"supervised_graduation">;
221
302
  evaluationBudget: Type.TObject<{
@@ -259,25 +340,47 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
259
340
  }>;
260
341
  }>;
261
342
  observability: Type.TObject<{
343
+ targetId: Type.TString;
262
344
  status: Type.TUnion<Type.TLiteral<string>[]>;
263
345
  requiredMetricIds: Type.TArray<Type.TUnion<Type.TLiteral<string>[]>>;
264
346
  coveredMetricIds: Type.TArray<Type.TUnion<Type.TLiteral<string>[]>>;
265
347
  missingMetricIds: Type.TArray<Type.TUnion<Type.TLiteral<string>[]>>;
266
348
  checkedAt: Type.TString;
267
349
  }>;
350
+ preliminaryModelLeads: Type.TOptional<Type.TArray<Type.TObject<{
351
+ targetId: Type.TString;
352
+ modelId: Type.TString;
353
+ modelVersion: Type.TOptional<Type.TString>;
354
+ estimatedPrice: Type.TObject<{
355
+ currency: Type.TString;
356
+ inputPerMillionTokens: Type.TNumber;
357
+ outputPerMillionTokens: Type.TNumber;
358
+ sourceUri: Type.TString;
359
+ checkedAt: Type.TString;
360
+ }>;
361
+ reputation: Type.TObject<{
362
+ summary: Type.TString;
363
+ sourceUri: Type.TString;
364
+ checkedAt: Type.TString;
365
+ }>;
366
+ }>>>;
268
367
  }>;
269
368
  readonly instrument_observability: Type.TObject<{
369
+ targetId: Type.TString;
270
370
  coveredMetricIds: Type.TArray<Type.TUnion<Type.TLiteral<string>[]>>;
271
371
  missingMetricIds: Type.TArray<Type.TUnion<Type.TLiteral<string>[]>>;
272
372
  }>;
273
373
  readonly run_assessment: Type.TObject<{
374
+ targetId: Type.TString;
274
375
  baselineEvidenceSufficient: Type.TBoolean;
275
- metrics: Type.TOptional<Type.TArray<Type.TObject<{
376
+ metrics: Type.TArray<Type.TObject<{
377
+ targetId: Type.TString;
276
378
  metricId: Type.TUnion<Type.TLiteral<string>[]>;
277
379
  state: Type.TUnion<Type.TLiteral<string>[]>;
278
380
  scope: Type.TUnion<Type.TLiteral<string>[]>;
279
381
  direction: Type.TUnion<Type.TLiteral<string>[]>;
280
382
  method: Type.TUnion<Type.TLiteral<string>[]>;
383
+ aggregation: Type.TUnion<Type.TLiteral<string>[]>;
281
384
  value: Type.TOptional<Type.TNumber>;
282
385
  unit: Type.TString;
283
386
  sampleCount: Type.TInteger;
@@ -298,10 +401,12 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
298
401
  digest: Type.TOptional<Type.TString>;
299
402
  }>>;
300
403
  note: Type.TOptional<Type.TString>;
301
- }>>>;
404
+ }>>;
302
405
  }>;
303
406
  readonly discover_candidates: Type.TObject<{
407
+ targetId: Type.TString;
304
408
  candidates: Type.TArray<Type.TObject<{
409
+ targetId: Type.TString;
305
410
  candidateId: Type.TString;
306
411
  modelId: Type.TString;
307
412
  modelVersion: Type.TOptional<Type.TString>;
@@ -309,8 +414,10 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
309
414
  }>>;
310
415
  }>;
311
416
  readonly run_challenger_trials: Type.TObject<{
417
+ targetId: Type.TString;
312
418
  assessments: Type.TArray<Type.TObject<{
313
419
  id: Type.TString;
420
+ targetId: Type.TString;
314
421
  taskProfileId: Type.TString;
315
422
  taskProfileRevision: Type.TInteger;
316
423
  candidateId: Type.TString;
@@ -321,11 +428,13 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
321
428
  startedAt: Type.TString;
322
429
  completedAt: Type.TString;
323
430
  metrics: Type.TArray<Type.TObject<{
431
+ targetId: Type.TString;
324
432
  metricId: Type.TUnion<Type.TLiteral<string>[]>;
325
433
  state: Type.TUnion<Type.TLiteral<string>[]>;
326
434
  scope: Type.TUnion<Type.TLiteral<string>[]>;
327
435
  direction: Type.TUnion<Type.TLiteral<string>[]>;
328
436
  method: Type.TUnion<Type.TLiteral<string>[]>;
437
+ aggregation: Type.TUnion<Type.TLiteral<string>[]>;
329
438
  value: Type.TOptional<Type.TNumber>;
330
439
  unit: Type.TString;
331
440
  sampleCount: Type.TInteger;
@@ -348,10 +457,19 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
348
457
  note: Type.TOptional<Type.TString>;
349
458
  }>>;
350
459
  }>>;
460
+ experimentManifest: Type.TObject<{
461
+ id: Type.TString;
462
+ source: Type.TUnion<Type.TLiteral<string>[]>;
463
+ uri: Type.TString;
464
+ mediaType: Type.TOptional<Type.TString>;
465
+ digest: Type.TOptional<Type.TString>;
466
+ }>;
351
467
  }>;
352
468
  readonly calculate_frontier: Type.TObject<{
469
+ targetId: Type.TString;
353
470
  assessments: Type.TArray<Type.TObject<{
354
471
  id: Type.TString;
472
+ targetId: Type.TString;
355
473
  taskProfileId: Type.TString;
356
474
  taskProfileRevision: Type.TInteger;
357
475
  candidateId: Type.TString;
@@ -362,11 +480,13 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
362
480
  startedAt: Type.TString;
363
481
  completedAt: Type.TString;
364
482
  metrics: Type.TArray<Type.TObject<{
483
+ targetId: Type.TString;
365
484
  metricId: Type.TUnion<Type.TLiteral<string>[]>;
366
485
  state: Type.TUnion<Type.TLiteral<string>[]>;
367
486
  scope: Type.TUnion<Type.TLiteral<string>[]>;
368
487
  direction: Type.TUnion<Type.TLiteral<string>[]>;
369
488
  method: Type.TUnion<Type.TLiteral<string>[]>;
489
+ aggregation: Type.TUnion<Type.TLiteral<string>[]>;
370
490
  value: Type.TOptional<Type.TNumber>;
371
491
  unit: Type.TString;
372
492
  sampleCount: Type.TInteger;
@@ -391,6 +511,7 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
391
511
  }>>;
392
512
  frontierSnapshot: Type.TObject<{
393
513
  id: Type.TString;
514
+ targetId: Type.TString;
394
515
  taskProfileId: Type.TString;
395
516
  taskProfileRevision: Type.TInteger;
396
517
  productRevision: Type.TString;
@@ -415,6 +536,7 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
415
536
  }>>;
416
537
  }>;
417
538
  recommendation: Type.TOptional<Type.TObject<{
539
+ targetId: Type.TString;
418
540
  frontierSnapshotId: Type.TString;
419
541
  selectedCandidateId: Type.TString;
420
542
  currentCandidateId: Type.TString;
@@ -429,19 +551,23 @@ export declare const INTENT_OUTPUT_SCHEMAS: {
429
551
  }>>;
430
552
  }>;
431
553
  readonly investigate_regression: Type.TObject<{
554
+ targetId: Type.TString;
432
555
  regressionDetected: Type.TBoolean;
433
556
  affectedMetricIds: Type.TArray<Type.TUnion<Type.TLiteral<string>[]>>;
434
557
  likelyCause: Type.TOptional<Type.TString>;
435
558
  }>;
436
559
  readonly apply_model_swap: Type.TObject<{
560
+ targetId: Type.TString;
437
561
  appliedCandidateId: Type.TString;
438
562
  previousCandidateId: Type.TOptional<Type.TString>;
439
563
  }>;
440
564
  readonly verify_model_swap: Type.TObject<{
565
+ targetId: Type.TString;
441
566
  verified: Type.TBoolean;
442
567
  regressionDetected: Type.TBoolean;
443
568
  }>;
444
569
  readonly rollback_model_swap: Type.TObject<{
570
+ targetId: Type.TString;
445
571
  restoredCandidateId: Type.TString;
446
572
  }>;
447
573
  };
@@ -32,21 +32,42 @@ export const MetricObjectiveSchema = strictObject({
32
32
  required: Type.Boolean(),
33
33
  minimumSamples: Type.Integer({ minimum: 1 }),
34
34
  tolerance: Type.Number({ minimum: 0 }),
35
+ samplingPlan: strictObject({
36
+ strategy: stringEnum([
37
+ "single_run", "repeated_same_input", "representative_task_set",
38
+ "repeated_representative_task_set", "load_test",
39
+ ]),
40
+ representativeCaseCount: Type.Integer({ minimum: 1 }),
41
+ repetitionsPerCase: Type.Integer({ minimum: 1 }),
42
+ aggregation: stringEnum(["single_value", "mean", "rate", "distribution", "percentile"]),
43
+ rationale: Type.String({ minLength: 1 }),
44
+ }),
35
45
  constraint: Type.Optional(strictObject({
36
46
  operator: stringEnum(["at_least", "at_most"]),
37
47
  value: Type.Number(),
38
48
  })),
39
49
  });
50
+ export const ApplicationLlmTargetSchema = strictObject({
51
+ id: Type.String({ minLength: 1 }),
52
+ kind: Type.Literal("application_llm_call"),
53
+ name: Type.String({ minLength: 1 }),
54
+ applicationId: Type.String({ minLength: 1 }),
55
+ callSites: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
56
+ routeKey: Type.String({ minLength: 1 }),
57
+ confirmedAt: Type.String({ minLength: 1 }),
58
+ });
40
59
  export const TaskProfileSchema = strictObject({
41
60
  id: Type.String({ minLength: 1 }),
42
61
  revision: Type.Integer({ minimum: 1 }),
43
62
  name: Type.String({ minLength: 1 }),
44
63
  goal: Type.String({ minLength: 1 }),
64
+ applicationTarget: ApplicationLlmTargetSchema,
45
65
  objectives: Type.Array(MetricObjectiveSchema, { minItems: 1 }),
46
66
  createdAt: Type.String({ minLength: 1 }),
47
67
  confirmedAt: Type.Optional(Type.String({ minLength: 1 })),
48
68
  });
49
69
  export const ObservabilityCoverageSchema = strictObject({
70
+ targetId: Type.String({ minLength: 1 }),
50
71
  status: stringEnum(["ready", "incomplete"]),
51
72
  requiredMetricIds: Type.Array(stringEnum(metricIds)),
52
73
  coveredMetricIds: Type.Array(stringEnum(metricIds)),
@@ -94,11 +115,13 @@ export const SupervisedGraduationPolicySchema = strictObject({
94
115
  }),
95
116
  });
96
117
  export const MetricRecordSchema = strictObject({
118
+ targetId: Type.String({ minLength: 1 }),
97
119
  metricId: stringEnum(metricIds),
98
120
  state: stringEnum(["measured", "not_applicable", "not_configured", "insufficient_evidence"]),
99
121
  scope: stringEnum(["single_run", "sample_window"]),
100
122
  direction: stringEnum(["maximize", "minimize"]),
101
123
  method: stringEnum(["observed", "derived", "evaluator", "human", "external"]),
124
+ aggregation: stringEnum(["single_value", "sum", "mean", "rate", "distribution", "percentile"]),
102
125
  value: Type.Optional(Type.Number()),
103
126
  unit: Type.String({ minLength: 1 }),
104
127
  sampleCount: Type.Integer({ minimum: 0 }),
@@ -115,13 +138,32 @@ export const MetricRecordSchema = strictObject({
115
138
  note: Type.Optional(Type.String()),
116
139
  });
117
140
  export const CandidateDescriptorSchema = strictObject({
141
+ targetId: Type.String({ minLength: 1 }),
118
142
  candidateId: Type.String({ minLength: 1 }),
119
143
  modelId: Type.String({ minLength: 1 }),
120
144
  modelVersion: Type.Optional(Type.String({ minLength: 1 })),
121
145
  reasons: Type.Array(Type.String()),
122
146
  });
147
+ export const PreliminaryModelLeadSchema = strictObject({
148
+ targetId: Type.String({ minLength: 1 }),
149
+ modelId: Type.String({ minLength: 1 }),
150
+ modelVersion: Type.Optional(Type.String({ minLength: 1 })),
151
+ estimatedPrice: strictObject({
152
+ currency: Type.String({ minLength: 1 }),
153
+ inputPerMillionTokens: Type.Number({ minimum: 0 }),
154
+ outputPerMillionTokens: Type.Number({ minimum: 0 }),
155
+ sourceUri: Type.String({ minLength: 1 }),
156
+ checkedAt: Type.String({ minLength: 1 }),
157
+ }),
158
+ reputation: strictObject({
159
+ summary: Type.String({ minLength: 1 }),
160
+ sourceUri: Type.String({ minLength: 1 }),
161
+ checkedAt: Type.String({ minLength: 1 }),
162
+ }),
163
+ });
123
164
  export const CandidateAssessmentSchema = strictObject({
124
165
  id: Type.String({ minLength: 1 }),
166
+ targetId: Type.String({ minLength: 1 }),
125
167
  taskProfileId: Type.String({ minLength: 1 }),
126
168
  taskProfileRevision: Type.Integer({ minimum: 1 }),
127
169
  candidateId: Type.String({ minLength: 1 }),
@@ -135,6 +177,7 @@ export const CandidateAssessmentSchema = strictObject({
135
177
  });
136
178
  export const FrontierSnapshotSchema = strictObject({
137
179
  id: Type.String({ minLength: 1 }),
180
+ targetId: Type.String({ minLength: 1 }),
138
181
  taskProfileId: Type.String({ minLength: 1 }),
139
182
  taskProfileRevision: Type.Integer({ minimum: 1 }),
140
183
  productRevision: Type.String({ minLength: 1 }),
@@ -153,6 +196,7 @@ export const FrontierSnapshotSchema = strictObject({
153
196
  calculationEvidence: Type.Array(EvidenceReferenceSchema, { minItems: 1 }),
154
197
  });
155
198
  export const FrontierRecommendationSchema = strictObject({
199
+ targetId: Type.String({ minLength: 1 }),
156
200
  frontierSnapshotId: Type.String({ minLength: 1 }),
157
201
  selectedCandidateId: Type.String({ minLength: 1 }),
158
202
  currentCandidateId: Type.String({ minLength: 1 }),
@@ -162,42 +206,54 @@ export const FrontierRecommendationSchema = strictObject({
162
206
  export const INTENT_OUTPUT_SCHEMAS = {
163
207
  establish_evals: strictObject({
164
208
  taskProfile: ConfirmedTaskProfileSchema,
209
+ incumbent: CandidateDescriptorSchema,
165
210
  policy: SupervisedGraduationPolicySchema,
166
211
  observability: ObservabilityCoverageSchema,
212
+ preliminaryModelLeads: Type.Optional(Type.Array(PreliminaryModelLeadSchema)),
167
213
  }),
168
214
  instrument_observability: strictObject({
215
+ targetId: Type.String({ minLength: 1 }),
169
216
  coveredMetricIds: Type.Array(stringEnum(metricIds)),
170
217
  missingMetricIds: Type.Array(stringEnum(metricIds)),
171
218
  }),
172
219
  run_assessment: strictObject({
220
+ targetId: Type.String({ minLength: 1 }),
173
221
  baselineEvidenceSufficient: Type.Boolean(),
174
- metrics: Type.Optional(Type.Array(MetricRecordSchema)),
222
+ metrics: Type.Array(MetricRecordSchema),
175
223
  }),
176
224
  discover_candidates: strictObject({
225
+ targetId: Type.String({ minLength: 1 }),
177
226
  candidates: Type.Array(CandidateDescriptorSchema),
178
227
  }),
179
228
  run_challenger_trials: strictObject({
229
+ targetId: Type.String({ minLength: 1 }),
180
230
  assessments: Type.Array(CandidateAssessmentSchema),
231
+ experimentManifest: EvidenceReferenceSchema,
181
232
  }),
182
233
  calculate_frontier: strictObject({
234
+ targetId: Type.String({ minLength: 1 }),
183
235
  assessments: Type.Array(CandidateAssessmentSchema),
184
236
  frontierSnapshot: FrontierSnapshotSchema,
185
237
  recommendation: Type.Optional(FrontierRecommendationSchema),
186
238
  }),
187
239
  investigate_regression: strictObject({
240
+ targetId: Type.String({ minLength: 1 }),
188
241
  regressionDetected: Type.Boolean(),
189
242
  affectedMetricIds: Type.Array(stringEnum(metricIds)),
190
243
  likelyCause: Type.Optional(Type.String()),
191
244
  }),
192
245
  apply_model_swap: strictObject({
246
+ targetId: Type.String({ minLength: 1 }),
193
247
  appliedCandidateId: Type.String({ minLength: 1 }),
194
248
  previousCandidateId: Type.Optional(Type.String({ minLength: 1 })),
195
249
  }),
196
250
  verify_model_swap: strictObject({
251
+ targetId: Type.String({ minLength: 1 }),
197
252
  verified: Type.Boolean(),
198
253
  regressionDetected: Type.Boolean(),
199
254
  }),
200
255
  rollback_model_swap: strictObject({
256
+ targetId: Type.String({ minLength: 1 }),
201
257
  restoredCandidateId: Type.String({ minLength: 1 }),
202
258
  }),
203
259
  };