@skill-harness/core 0.17.0 → 0.19.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 (95) hide show
  1. package/README.md +1 -2
  2. package/dist/adapters/types.d.ts +2 -12
  3. package/dist/capture-trace-types.d.ts +8 -102
  4. package/dist/capture-trace-types.js +0 -4
  5. package/dist/command-cost.d.ts +1 -1
  6. package/dist/command-cost.js +0 -5
  7. package/dist/execution-trace.d.ts +0 -16
  8. package/dist/execution-trace.js +31 -42
  9. package/dist/index.d.ts +3 -23
  10. package/dist/index.js +3 -23
  11. package/dist/instruction-coverage.d.ts +0 -7
  12. package/dist/instruction-coverage.js +5 -7
  13. package/dist/journal.d.ts +0 -8
  14. package/dist/metrics.d.ts +19 -0
  15. package/dist/metrics.js +28 -0
  16. package/dist/redaction.d.ts +6 -0
  17. package/dist/redaction.js +55 -0
  18. package/dist/regate.js +6 -71
  19. package/dist/regrade.d.ts +1 -3
  20. package/dist/regrade.js +1 -21
  21. package/dist/report.d.ts +1 -15
  22. package/dist/report.js +1 -13
  23. package/dist/reps.d.ts +1 -2
  24. package/dist/reps.js +33 -10
  25. package/dist/results.d.ts +10 -9
  26. package/dist/results.js +3 -19
  27. package/dist/run.js +15 -74
  28. package/dist/seeded.d.ts +1 -7
  29. package/dist/seeded.js +5 -11
  30. package/dist/sources.js +4 -9
  31. package/dist/spec.d.ts +0 -13
  32. package/dist/spec.js +6 -48
  33. package/dist/trajectory-events.d.ts +58 -0
  34. package/dist/trajectory-events.js +119 -0
  35. package/package.json +1 -1
  36. package/schemas/results-v2.schema.json +394 -75
  37. package/schemas/results-v3.schema.json +18 -0
  38. package/schemas/specification-v1.schema.json +128 -174
  39. package/dist/adjudication.d.ts +0 -219
  40. package/dist/adjudication.js +0 -422
  41. package/dist/adoption.d.ts +0 -128
  42. package/dist/adoption.js +0 -102
  43. package/dist/affected.d.ts +0 -88
  44. package/dist/affected.js +0 -222
  45. package/dist/capture.d.ts +0 -193
  46. package/dist/capture.js +0 -344
  47. package/dist/comparison.d.ts +0 -97
  48. package/dist/comparison.js +0 -189
  49. package/dist/factory-calibration.d.ts +0 -63
  50. package/dist/factory-calibration.js +0 -115
  51. package/dist/intervention-results.d.ts +0 -6
  52. package/dist/intervention-results.js +0 -52
  53. package/dist/intervention.d.ts +0 -123
  54. package/dist/intervention.js +0 -218
  55. package/dist/investigation.d.ts +0 -94
  56. package/dist/investigation.js +0 -148
  57. package/dist/judge-agreement.d.ts +0 -19
  58. package/dist/judge-agreement.js +0 -31
  59. package/dist/qualification-capture.d.ts +0 -44
  60. package/dist/qualification-capture.js +0 -163
  61. package/dist/qualification-config.d.ts +0 -233
  62. package/dist/qualification-config.js +0 -694
  63. package/dist/qualification-lock.d.ts +0 -15
  64. package/dist/qualification-lock.js +0 -87
  65. package/dist/qualification-oauth-directory.d.ts +0 -79
  66. package/dist/qualification-oauth-directory.js +0 -444
  67. package/dist/qualification-panel-store.d.ts +0 -14
  68. package/dist/qualification-panel-store.js +0 -188
  69. package/dist/qualification-panels.d.ts +0 -99
  70. package/dist/qualification-panels.js +0 -91
  71. package/dist/qualification-process.d.ts +0 -13
  72. package/dist/qualification-process.js +0 -190
  73. package/dist/qualification-runner.d.ts +0 -203
  74. package/dist/qualification-runner.js +0 -2037
  75. package/dist/qualification-store.d.ts +0 -187
  76. package/dist/qualification-store.js +0 -833
  77. package/dist/qualification-validation.d.ts +0 -12
  78. package/dist/qualification-validation.js +0 -8
  79. package/dist/screen.d.ts +0 -31
  80. package/dist/screen.js +0 -105
  81. package/dist/trajectory-gates.d.ts +0 -137
  82. package/dist/trajectory-gates.js +0 -576
  83. package/dist/trusted-host-supervision.d.ts +0 -25
  84. package/dist/trusted-host-supervision.js +0 -94
  85. package/dist/work-capture-schema.d.ts +0 -38
  86. package/dist/work-capture-schema.js +0 -33
  87. package/dist/work-capture.d.ts +0 -43
  88. package/dist/work-capture.js +0 -81
  89. package/dist/work-signals.d.ts +0 -55
  90. package/dist/work-signals.js +0 -71
  91. package/schemas/qualification-cell-result-v1.schema.json +0 -32
  92. package/schemas/qualification-config-v1.schema.json +0 -244
  93. package/schemas/qualification-invocation-request-v1.schema.json +0 -59
  94. package/schemas/qualification-judge-panel-result-v1.schema.json +0 -42
  95. package/schemas/trajectory-event-v1.schema.json +0 -80
@@ -0,0 +1,119 @@
1
+ export const LEGACY_TRAJECTORY_EVENT_VERSION = "1.0";
2
+ export const TRAJECTORY_EVENT_VERSION = "1.1";
3
+ export function deserializeTrajectoryEvents(text) {
4
+ const out = [];
5
+ try {
6
+ for (const line of text.split("\n").filter((entry) => entry.trim())) {
7
+ const event = JSON.parse(line);
8
+ if (validateEvent(event) !== null)
9
+ return null;
10
+ out.push(event);
11
+ }
12
+ }
13
+ catch {
14
+ return null;
15
+ }
16
+ if (!out.length)
17
+ return null;
18
+ const sequences = out.map((event) => event.seq).sort((a, b) => a - b);
19
+ if (new Set(sequences).size !== out.length || sequences.some((seq, index) => seq !== index + 1))
20
+ return null;
21
+ return out;
22
+ }
23
+ const V11_EVENT_KEYS = new Set(["execution_id", "parent_execution_id", "task_from_execution_id", "workflow_fact_id", "deadline_at"]);
24
+ const EVENT_KEYS = new Set([
25
+ "event_version", "seq", "type", "source", "at", "run_id", "task_id", "workspace_id", "context_id", "finding_id",
26
+ "parent_id", "child_id", ...V11_EVENT_KEYS,
27
+ "phase", "tool", "capability", "requested_capabilities", "effective_capabilities", "refusal_code",
28
+ "exit_code", "digests", "approval", "requirements", "attributes",
29
+ ]);
30
+ const APPROVAL_KEYS = new Set(["id", "capability", "subject", "source", "scope", "approved_at", "expires_at", "used_at"]);
31
+ const ID_RE = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
32
+ const SHA256_RE = /^[a-fA-F0-9]{64}$/;
33
+ const GIT_SHA_RE = /^(?:[a-fA-F0-9]{40}|[a-fA-F0-9]{64})$/;
34
+ const REFUSAL_RE = /^[A-Z][A-Z0-9_]*$/;
35
+ function validateEvent(event) {
36
+ if (!event || typeof event !== "object" || Array.isArray(event))
37
+ return "event must be an object";
38
+ const object = event;
39
+ const unknown = Object.keys(object).find((key) => !EVENT_KEYS.has(key));
40
+ if (unknown)
41
+ return `unknown field ${unknown}`;
42
+ if (event.event_version !== LEGACY_TRAJECTORY_EVENT_VERSION && event.event_version !== TRAJECTORY_EVENT_VERSION)
43
+ return `unsupported event_version ${String(event.event_version)}`;
44
+ if (event.event_version === LEGACY_TRAJECTORY_EVENT_VERSION) {
45
+ const versionedField = Object.keys(object).find((key) => V11_EVENT_KEYS.has(key));
46
+ if (versionedField)
47
+ return `${versionedField} requires event_version ${TRAJECTORY_EVENT_VERSION}`;
48
+ }
49
+ if (!Number.isInteger(event.seq) || event.seq < 1)
50
+ return "seq must be a positive integer";
51
+ if (typeof event.type !== "string" || !event.type)
52
+ return "type must be a non-empty string";
53
+ if (typeof event.source !== "string" || !event.source)
54
+ return "source must be a non-empty string";
55
+ if (event.at !== undefined && !validDate(event.at))
56
+ return "at must be an RFC 3339 date-time";
57
+ for (const field of ["run_id", "task_id", "workspace_id", "context_id", "finding_id", "parent_id", "child_id", "execution_id", "task_from_execution_id", "workflow_fact_id"]) {
58
+ if (event[field] !== undefined && (typeof event[field] !== "string" || !ID_RE.test(event[field])))
59
+ return `${field} is not a valid bounded identifier`;
60
+ }
61
+ if (event.parent_execution_id !== undefined && event.parent_execution_id !== null && (typeof event.parent_execution_id !== "string" || !ID_RE.test(event.parent_execution_id)))
62
+ return "parent_execution_id is not a valid bounded identifier or null";
63
+ if (event.deadline_at !== undefined && !validDate(event.deadline_at))
64
+ return "deadline_at must be an RFC 3339 date-time";
65
+ for (const field of ["phase", "tool", "capability"])
66
+ if (event[field] !== undefined && (typeof event[field] !== "string" || !event[field]))
67
+ return `${field} must be a non-empty string`;
68
+ for (const field of ["requested_capabilities", "effective_capabilities", "requirements"]) {
69
+ const values = event[field];
70
+ if (values !== undefined && (!Array.isArray(values) || values.some((value) => typeof value !== "string" || !value) || new Set(values).size !== values.length))
71
+ return `${field} must be an array of unique non-empty strings`;
72
+ }
73
+ if (event.refusal_code !== undefined && !REFUSAL_RE.test(event.refusal_code))
74
+ return "refusal_code is invalid";
75
+ if (event.exit_code !== undefined && !Number.isInteger(event.exit_code))
76
+ return "exit_code must be an integer";
77
+ if (event.digests !== undefined) {
78
+ if (!event.digests || typeof event.digests !== "object" || Array.isArray(event.digests))
79
+ return "digests must be an object";
80
+ for (const [key, value] of Object.entries(event.digests)) {
81
+ if (typeof value !== "string")
82
+ return `digests.${key} must be a string`;
83
+ if (["plan", "task", "definition"].includes(key) && !SHA256_RE.test(value))
84
+ return `digests.${key} must be sha256`;
85
+ if (["head", "tree"].includes(key) && !GIT_SHA_RE.test(value))
86
+ return `digests.${key} must be a git object id`;
87
+ }
88
+ }
89
+ if (event.approval !== undefined) {
90
+ if (!event.approval || typeof event.approval !== "object" || Array.isArray(event.approval))
91
+ return "approval must be an object";
92
+ const unknownApproval = Object.keys(event.approval).find((key) => !APPROVAL_KEYS.has(key));
93
+ if (unknownApproval)
94
+ return `approval.${unknownApproval} is unknown`;
95
+ for (const [key, value] of Object.entries(event.approval)) {
96
+ if (typeof value !== "string" || !value)
97
+ return `approval.${key} must be a non-empty string`;
98
+ if (key === "id" && !ID_RE.test(value))
99
+ return "approval.id is invalid";
100
+ if (["approved_at", "expires_at", "used_at"].includes(key) && !validDate(value))
101
+ return `approval.${key} must be an RFC 3339 date-time`;
102
+ }
103
+ }
104
+ if (event.attributes !== undefined && (!event.attributes || typeof event.attributes !== "object" || Array.isArray(event.attributes)))
105
+ return "attributes must be an object";
106
+ return null;
107
+ }
108
+ function validDate(value) {
109
+ if (typeof value !== "string")
110
+ return false;
111
+ const match = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.exec(value);
112
+ if (!match || !Number.isFinite(Date.parse(value)))
113
+ return false;
114
+ const [, year, month, day, hour, minute, second] = match.map(Number);
115
+ if (month < 1 || month > 12 || hour > 23 || minute > 59 || second > 59)
116
+ return false;
117
+ return day >= 1 && day <= new Date(Date.UTC(year, month, 0)).getUTCDate();
118
+ }
119
+ //# sourceMappingURL=trajectory-events.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skill-harness/core",
3
- "version": "0.17.0",
3
+ "version": "0.19.0",
4
4
  "description": "skill-harness engine — spec, discover, run, LLM-judge grade, score, results (internal API)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -3,128 +3,447 @@
3
3
  "$id": "https://skill-harness.dev/schemas/results-v2.schema.json",
4
4
  "title": "skill-harness results v2",
5
5
  "type": "object",
6
- "required": ["schema", "skill", "harness", "model", "judge", "timestamp", "label", "mode", "effective_grade", "scenarios"],
6
+ "required": [
7
+ "schema",
8
+ "skill",
9
+ "harness",
10
+ "model",
11
+ "judge",
12
+ "timestamp",
13
+ "label",
14
+ "mode",
15
+ "effective_grade",
16
+ "scenarios"
17
+ ],
7
18
  "properties": {
8
- "schema": { "const": 2 },
9
- "harness_version": { "type": "string" },
10
- "harness_cli_version": { "type": "string" },
11
- "delivery_canary": { "enum": ["pass", "skipped"] },
12
- "skill": { "type": "string" },
13
- "harness": { "type": "string" },
14
- "model": { "type": "string" },
19
+ "schema": {
20
+ "const": 2
21
+ },
22
+ "harness_version": {
23
+ "type": "string"
24
+ },
25
+ "harness_cli_version": {
26
+ "type": "string"
27
+ },
28
+ "delivery_canary": {
29
+ "enum": [
30
+ "pass",
31
+ "skipped"
32
+ ]
33
+ },
34
+ "skill": {
35
+ "type": "string"
36
+ },
37
+ "harness": {
38
+ "type": "string"
39
+ },
40
+ "model": {
41
+ "type": "string"
42
+ },
15
43
  "judge": {
16
44
  "type": "object",
17
- "required": ["provider", "model"],
18
- "properties": { "provider": { "type": "string" }, "model": { "type": "string" } }
19
- },
20
- "timestamp": { "type": "string" },
21
- "label": { "type": ["string", "null"] },
22
- "mode": { "enum": ["red", "green", "force"] },
23
- "partial": { "type": "boolean" },
24
- "source_hashes": { "type": "object", "additionalProperties": { "type": "string" } },
25
- "effective_grade": { "$ref": "#/$defs/grade" },
26
- "scenarios": { "type": "array", "items": { "$ref": "#/$defs/scenario" } }
45
+ "required": [
46
+ "provider",
47
+ "model"
48
+ ],
49
+ "properties": {
50
+ "provider": {
51
+ "type": "string"
52
+ },
53
+ "model": {
54
+ "type": "string"
55
+ }
56
+ }
57
+ },
58
+ "timestamp": {
59
+ "type": "string"
60
+ },
61
+ "label": {
62
+ "type": [
63
+ "string",
64
+ "null"
65
+ ]
66
+ },
67
+ "mode": {
68
+ "enum": [
69
+ "red",
70
+ "green",
71
+ "force"
72
+ ]
73
+ },
74
+ "partial": {
75
+ "type": "boolean"
76
+ },
77
+ "source_hashes": {
78
+ "type": "object",
79
+ "additionalProperties": {
80
+ "type": "string"
81
+ }
82
+ },
83
+ "effective_grade": {
84
+ "$ref": "#/$defs/grade"
85
+ },
86
+ "scenarios": {
87
+ "type": "array",
88
+ "items": {
89
+ "$ref": "#/$defs/scenario"
90
+ }
91
+ }
27
92
  },
28
93
  "$defs": {
29
- "verdict": { "enum": ["PASS", "FAIL", "ERROR", "JUDGE-AMBIGUOUS"] },
94
+ "verdict": {
95
+ "enum": [
96
+ "PASS",
97
+ "FAIL",
98
+ "ERROR",
99
+ "JUDGE-AMBIGUOUS"
100
+ ]
101
+ },
30
102
  "grade": {
31
103
  "type": "object",
32
- "required": ["passed", "total", "pct", "letter", "ship", "note"],
104
+ "required": [
105
+ "passed",
106
+ "total",
107
+ "pct",
108
+ "letter",
109
+ "ship",
110
+ "note"
111
+ ],
33
112
  "properties": {
34
- "passed": { "type": "integer" }, "total": { "type": "integer" }, "pct": { "type": "number" },
35
- "letter": { "type": "string" }, "ship": { "type": "boolean" }, "note": { "type": "string" }
113
+ "passed": {
114
+ "type": "integer"
115
+ },
116
+ "total": {
117
+ "type": "integer"
118
+ },
119
+ "pct": {
120
+ "type": "number"
121
+ },
122
+ "letter": {
123
+ "type": "string"
124
+ },
125
+ "ship": {
126
+ "type": "boolean"
127
+ },
128
+ "note": {
129
+ "type": "string"
130
+ }
131
+ }
132
+ },
133
+ "usage": {
134
+ "type": "object",
135
+ "additionalProperties": false,
136
+ "required": ["repetition", "inputTokens", "outputTokens", "cacheReadTokens", "costUsd", "priceAsOf"],
137
+ "properties": {
138
+ "repetition": { "type": "integer", "minimum": 0 },
139
+ "inputTokens": { "type": ["integer", "null"], "minimum": 1 },
140
+ "outputTokens": { "type": ["integer", "null"], "minimum": 1 },
141
+ "cacheReadTokens": { "type": ["integer", "null"], "minimum": 1 },
142
+ "costUsd": { "type": ["number", "null"], "exclusiveMinimum": 0 },
143
+ "priceAsOf": { "type": ["string", "null"] }
36
144
  }
37
145
  },
38
146
  "metrics": {
39
147
  "type": "object",
40
- "required": ["wall_time_ms", "judge_calls", "judge_rejudge_calls", "subject_metrics_reps", "total_reps"],
148
+ "required": [
149
+ "wall_time_ms",
150
+ "judge_calls",
151
+ "judge_rejudge_calls",
152
+ "subject_metrics_reps",
153
+ "total_reps"
154
+ ],
41
155
  "properties": {
42
- "wall_time_ms": { "type": "number", "minimum": 0 },
43
- "judge_calls": { "type": "integer", "minimum": 0 },
44
- "judge_rejudge_calls": { "type": "integer", "minimum": 0 },
45
- "subject_metrics_reps": { "type": "integer", "minimum": 0 },
46
- "total_reps": { "type": "integer", "minimum": 1 },
47
- "input_tokens": { "type": "integer", "minimum": 0 },
48
- "output_tokens": { "type": "integer", "minimum": 0 },
49
- "cache_read_tokens": { "type": "integer", "minimum": 0 },
50
- "cache_write_tokens": { "type": "integer", "minimum": 0 },
51
- "subject_cost_usd": { "type": "number", "minimum": 0 },
52
- "cost_source": { "enum": ["provider-reported", "subscription", "unreported"] },
53
- "tool_calls": { "type": "integer", "minimum": 0 },
54
- "delegated_children": { "type": "integer", "minimum": 0 },
55
- "max_concurrency": { "type": "integer", "minimum": 0 }
156
+ "wall_time_ms": {
157
+ "type": "number",
158
+ "minimum": 0
159
+ },
160
+ "judge_calls": {
161
+ "type": "integer",
162
+ "minimum": 0
163
+ },
164
+ "judge_rejudge_calls": {
165
+ "type": "integer",
166
+ "minimum": 0
167
+ },
168
+ "subject_metrics_reps": {
169
+ "type": "integer",
170
+ "minimum": 0
171
+ },
172
+ "total_reps": {
173
+ "type": "integer",
174
+ "minimum": 1
175
+ },
176
+ "input_tokens": {
177
+ "type": "integer",
178
+ "minimum": 0
179
+ },
180
+ "output_tokens": {
181
+ "type": "integer",
182
+ "minimum": 0
183
+ },
184
+ "cache_read_tokens": {
185
+ "type": "integer",
186
+ "minimum": 0
187
+ },
188
+ "cache_write_tokens": {
189
+ "type": "integer",
190
+ "minimum": 0
191
+ },
192
+ "subject_cost_usd": {
193
+ "type": "number",
194
+ "minimum": 0
195
+ },
196
+ "cost_source": {
197
+ "enum": [
198
+ "provider-reported",
199
+ "subscription",
200
+ "price-table",
201
+ "unreported"
202
+ ]
203
+ },
204
+ "tool_calls": {
205
+ "type": "integer",
206
+ "minimum": 0
207
+ },
208
+ "delegated_children": {
209
+ "type": "integer",
210
+ "minimum": 0
211
+ },
212
+ "max_concurrency": {
213
+ "type": "integer",
214
+ "minimum": 0
215
+ }
56
216
  }
57
217
  },
58
218
  "judgment": {
59
219
  "type": "object",
60
220
  "additionalProperties": false,
61
- "required": ["ordinal", "judge", "verdict", "reason", "suspect"],
221
+ "required": [
222
+ "ordinal",
223
+ "judge",
224
+ "verdict",
225
+ "reason",
226
+ "suspect"
227
+ ],
62
228
  "properties": {
63
- "ordinal": { "type": "integer", "minimum": 1, "maximum": 3 },
229
+ "ordinal": {
230
+ "type": "integer",
231
+ "minimum": 1,
232
+ "maximum": 3
233
+ },
64
234
  "judge": {
65
- "type": "object", "additionalProperties": false, "required": ["provider", "model"],
66
- "properties": { "provider": { "type": "string" }, "model": { "type": "string" } }
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "required": [
238
+ "provider",
239
+ "model"
240
+ ],
241
+ "properties": {
242
+ "provider": {
243
+ "type": "string"
244
+ },
245
+ "model": {
246
+ "type": "string"
247
+ }
248
+ }
249
+ },
250
+ "verdict": {
251
+ "$ref": "#/$defs/verdict"
67
252
  },
68
- "verdict": { "$ref": "#/$defs/verdict" },
69
- "reason": { "type": "string" },
70
- "suspect": { "type": "boolean" }
253
+ "reason": {
254
+ "type": "string"
255
+ },
256
+ "suspect": {
257
+ "type": "boolean"
258
+ }
71
259
  }
72
260
  },
73
261
  "scenario": {
74
262
  "type": "object",
75
- "required": ["id", "judge_verdict", "judge_reason", "suspect", "override", "note"],
263
+ "required": [
264
+ "id",
265
+ "judge_verdict",
266
+ "judge_reason",
267
+ "suspect",
268
+ "override",
269
+ "note"
270
+ ],
76
271
  "properties": {
77
- "id": { "type": "string" },
78
- "judge_verdict": { "$ref": "#/$defs/verdict" },
79
- "judge_reason": { "type": "string" },
80
- "suspect": { "type": "boolean" },
81
- "override": { "oneOf": [{ "const": null }, { "enum": ["PASS", "FAIL"] }] },
82
- "note": { "type": "string" },
83
- "reps": { "type": "integer", "minimum": 1 },
84
- "passes": { "type": "integer", "minimum": 0 },
85
- "clean": { "type": "integer", "minimum": 0 },
86
- "flakiness": { "type": "number", "minimum": 0, "maximum": 1 },
87
- "pass_threshold": { "type": "number", "minimum": 0, "maximum": 1 },
88
- "metrics": { "$ref": "#/$defs/metrics" },
272
+ "id": {
273
+ "type": "string"
274
+ },
275
+ "judge_verdict": {
276
+ "$ref": "#/$defs/verdict"
277
+ },
278
+ "judge_reason": {
279
+ "type": "string"
280
+ },
281
+ "suspect": {
282
+ "type": "boolean"
283
+ },
284
+ "override": {
285
+ "oneOf": [
286
+ {
287
+ "const": null
288
+ },
289
+ {
290
+ "enum": [
291
+ "PASS",
292
+ "FAIL"
293
+ ]
294
+ }
295
+ ]
296
+ },
297
+ "note": {
298
+ "type": "string"
299
+ },
300
+ "reps": {
301
+ "type": "integer",
302
+ "minimum": 1
303
+ },
304
+ "passes": {
305
+ "type": "integer",
306
+ "minimum": 0
307
+ },
308
+ "clean": {
309
+ "type": "integer",
310
+ "minimum": 0
311
+ },
312
+ "flakiness": {
313
+ "type": "number",
314
+ "minimum": 0,
315
+ "maximum": 1
316
+ },
317
+ "pass_threshold": {
318
+ "type": "number",
319
+ "minimum": 0,
320
+ "maximum": 1
321
+ },
322
+ "metrics": {
323
+ "$ref": "#/$defs/metrics"
324
+ },
325
+ "usage": {
326
+ "type": "array",
327
+ "items": { "$ref": "#/$defs/usage" }
328
+ },
89
329
  "objective": {
90
330
  "type": "object",
91
331
  "additionalProperties": false,
92
- "required": ["status", "assertions"],
332
+ "required": [
333
+ "status",
334
+ "assertions"
335
+ ],
93
336
  "properties": {
94
- "status": { "enum": ["PASS", "FAIL", "ERROR"] },
95
- "trace_version": { "type": "integer" },
96
- "trace_sha256": { "type": "string" },
97
- "trajectory_version": { "const": "1.0" },
98
- "events_sha256": { "type": "string" },
99
- "rep_events_sha256": { "type": "array", "items": { "type": "string", "pattern": "^[a-fA-F0-9]{64}$" } },
100
- "rep_trace_sha256": { "type": "array", "items": { "type": "string", "pattern": "^[a-fA-F0-9]{64}$" } },
337
+ "status": {
338
+ "enum": [
339
+ "PASS",
340
+ "FAIL",
341
+ "ERROR"
342
+ ]
343
+ },
344
+ "trace_version": {
345
+ "type": "integer"
346
+ },
347
+ "trace_sha256": {
348
+ "type": "string"
349
+ },
350
+ "rep_trace_sha256": {
351
+ "type": "array",
352
+ "items": {
353
+ "type": "string",
354
+ "pattern": "^[a-fA-F0-9]{64}$"
355
+ }
356
+ },
101
357
  "assertions": {
102
358
  "type": "array",
103
359
  "items": {
104
360
  "type": "object",
105
361
  "additionalProperties": false,
106
- "required": ["kind", "status", "detail"],
362
+ "required": [
363
+ "kind",
364
+ "status",
365
+ "detail"
366
+ ],
107
367
  "properties": {
108
- "kind": { "type": "string", "minLength": 1 },
109
- "status": { "enum": ["PASS", "FAIL", "ERROR"] },
110
- "detail": { "type": "string" }
368
+ "kind": {
369
+ "type": "string",
370
+ "minLength": 1
371
+ },
372
+ "status": {
373
+ "enum": [
374
+ "PASS",
375
+ "FAIL",
376
+ "ERROR"
377
+ ]
378
+ },
379
+ "detail": {
380
+ "type": "string"
381
+ }
111
382
  }
112
383
  }
384
+ },
385
+ "trajectory_version": {
386
+ "type": "string"
387
+ },
388
+ "events_sha256": {
389
+ "type": "string",
390
+ "pattern": "^[a-fA-F0-9]{64}$"
391
+ },
392
+ "rep_events_sha256": {
393
+ "type": "array",
394
+ "items": {
395
+ "type": "string",
396
+ "pattern": "^[a-fA-F0-9]{64}$"
397
+ }
113
398
  }
114
399
  }
115
400
  },
116
401
  "adjudication": {
117
402
  "type": "object",
118
403
  "additionalProperties": false,
119
- "required": ["state", "trigger", "judgments"],
404
+ "required": [
405
+ "state",
406
+ "trigger",
407
+ "judgments"
408
+ ],
120
409
  "properties": {
121
- "state": { "enum": ["confirmed", "tie_broken", "unresolved"] },
122
- "trigger": { "enum": ["ambiguous", "contradictory", "non_unanimous", "ship_deciding"] },
123
- "verdict": { "enum": ["PASS", "FAIL"] },
124
- "judgments": { "type": "array", "items": { "$ref": "#/$defs/judgment" } }
410
+ "state": {
411
+ "enum": [
412
+ "confirmed",
413
+ "tie_broken",
414
+ "unresolved"
415
+ ]
416
+ },
417
+ "trigger": {
418
+ "enum": [
419
+ "ambiguous",
420
+ "contradictory",
421
+ "non_unanimous",
422
+ "ship_deciding"
423
+ ]
424
+ },
425
+ "verdict": {
426
+ "enum": [
427
+ "PASS",
428
+ "FAIL"
429
+ ]
430
+ },
431
+ "judgments": {
432
+ "type": "array",
433
+ "items": {
434
+ "$ref": "#/$defs/judgment"
435
+ }
436
+ }
125
437
  }
126
438
  },
127
- "judge_history": { "type": "array", "minItems": 2, "maxItems": 3, "items": { "$ref": "#/$defs/judgment" } }
439
+ "judge_history": {
440
+ "type": "array",
441
+ "minItems": 2,
442
+ "maxItems": 3,
443
+ "items": {
444
+ "$ref": "#/$defs/judgment"
445
+ }
446
+ }
128
447
  }
129
448
  }
130
449
  }