@onlooker-community/schema 0.1.0 → 1.3.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.
- package/README.md +20 -0
- package/dist/event-types.d.ts.map +1 -1
- package/dist/event-types.js.map +1 -1
- package/dist/generated-types.d.ts +380 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +15 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +7 -5
- package/dist/validate.js.map +1 -1
- package/package.json +46 -30
- package/schemas/event.v1.json +134 -134
- package/schemas/payload/plugins-memory.json +172 -172
- package/schemas/payload/plugins-ops.json +255 -244
- package/schemas/payload/plugins-safety.json +140 -124
- package/schemas/payload/session.json +52 -52
- package/schemas/payload/task.json +36 -0
- package/schemas/payload/tool.json +83 -83
|
@@ -1,246 +1,257 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.onlooker.dev/schemas/payload/plugins-ops.json",
|
|
4
|
+
"title": "Ops plugin payloads",
|
|
5
|
+
"description": "Payload schemas for ledger.*, echo.*, counsel.*, onlooker.*, and meridian.* events.",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"ledger.budget.warning": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"required": ["budget_usd", "spent_usd", "threshold_pct"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"budget_usd": { "type": "number", "minimum": 0 },
|
|
13
|
+
"spent_usd": { "type": "number", "minimum": 0 },
|
|
14
|
+
"threshold_pct": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
15
|
+
"remaining_usd": { "type": "number" }
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"ledger.budget.exceeded": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["budget_usd", "spent_usd", "blocked_operation"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"budget_usd": { "type": "number", "minimum": 0 },
|
|
24
|
+
"spent_usd": { "type": "number", "minimum": 0 },
|
|
25
|
+
"blocked_operation": { "type": "string" }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"ledger.session.complete": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["total_cost_usd", "budget_usd", "under_budget"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"total_cost_usd": { "type": "number", "minimum": 0 },
|
|
34
|
+
"budget_usd": { "type": "number", "minimum": 0 },
|
|
35
|
+
"under_budget": { "type": "boolean" },
|
|
36
|
+
"cost_by_plugin": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": { "type": "number" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"echo.suite.started": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"required": ["suite_id", "test_count"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"suite_id": { "type": "string" },
|
|
48
|
+
"test_count": { "type": "integer", "minimum": 0 },
|
|
49
|
+
"suite_name": { "type": "string" },
|
|
50
|
+
"trigger": { "type": "string", "enum": ["config_change", "manual"] },
|
|
51
|
+
"changed_file": { "type": "string" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"echo.suite.complete": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": ["suite_id", "test_count", "improved", "degraded", "neutral"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"suite_id": { "type": "string" },
|
|
60
|
+
"test_count": { "type": "integer", "minimum": 0 },
|
|
61
|
+
"improved": { "type": "integer", "minimum": 0 },
|
|
62
|
+
"degraded": { "type": "integer", "minimum": 0 },
|
|
63
|
+
"neutral": { "type": "integer", "minimum": 0 },
|
|
64
|
+
"merge_recommended": { "type": "boolean" },
|
|
65
|
+
"duration_ms": { "type": "integer", "minimum": 0 }
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"echo.regression.detected": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"required": ["suite_id", "test_id", "score_before", "score_after"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"suite_id": { "type": "string" },
|
|
74
|
+
"test_id": { "type": "string" },
|
|
75
|
+
"score_before": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
76
|
+
"score_after": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
77
|
+
"test_name": { "type": "string" },
|
|
78
|
+
"delta": { "type": "number" }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"counsel.brief.generated": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["period_start", "period_end", "recommendation_count"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"period_start": { "type": "string", "format": "date-time" },
|
|
87
|
+
"period_end": { "type": "string", "format": "date-time" },
|
|
88
|
+
"recommendation_count": { "type": "integer", "minimum": 0 },
|
|
89
|
+
"sources_consulted": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"enum": [
|
|
94
|
+
"onlooker_events",
|
|
95
|
+
"tribunal_verdicts",
|
|
96
|
+
"echo_regressions",
|
|
97
|
+
"sentinel_audit",
|
|
98
|
+
"warden_audit",
|
|
99
|
+
"oracle_calibrations",
|
|
100
|
+
"meridian_reliance"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"onlooker.session.summary": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["session_id", "duration_ms", "event_count"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"session_id": { "type": "string" },
|
|
112
|
+
"duration_ms": { "type": "integer", "minimum": 0 },
|
|
113
|
+
"event_count": { "type": "integer", "minimum": 0 },
|
|
114
|
+
"tool_counts": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"properties": {
|
|
118
|
+
"file_reads": { "type": "integer", "minimum": 0 },
|
|
119
|
+
"file_writes": { "type": "integer", "minimum": 0 },
|
|
120
|
+
"file_edits": { "type": "integer", "minimum": 0 },
|
|
121
|
+
"shell_execs": { "type": "integer", "minimum": 0 },
|
|
122
|
+
"web_fetches": { "type": "integer", "minimum": 0 },
|
|
123
|
+
"agent_spawns": { "type": "integer", "minimum": 0 }
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"meridian.hint.generated": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"required": [
|
|
132
|
+
"hint_id",
|
|
133
|
+
"case_id",
|
|
134
|
+
"task_type",
|
|
135
|
+
"failure_type",
|
|
136
|
+
"hint_direction"
|
|
137
|
+
],
|
|
138
|
+
"properties": {
|
|
139
|
+
"hint_id": { "type": "string" },
|
|
140
|
+
"case_id": { "type": "string" },
|
|
141
|
+
"task_type": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"enum": ["code", "reasoning", "writing", "general"]
|
|
144
|
+
},
|
|
145
|
+
"failure_type": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"enum": [
|
|
148
|
+
"wrong_approach",
|
|
149
|
+
"missing_concept",
|
|
150
|
+
"implementation_error",
|
|
151
|
+
"misunderstood_task",
|
|
152
|
+
"out_of_scope"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"hint_direction": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"enum": [
|
|
158
|
+
"reframe",
|
|
159
|
+
"missing_tool",
|
|
160
|
+
"intermediate_goal",
|
|
161
|
+
"alternative_representation",
|
|
162
|
+
"constraint_reminder"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"target_concept": { "type": "string" },
|
|
166
|
+
"signal_creation": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
167
|
+
"signal_transfer": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
168
|
+
"playbook_bullets_injected": { "type": "integer", "minimum": 0 }
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"meridian.hint.delivered": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": false,
|
|
174
|
+
"required": ["hint_id", "case_id", "delivery_mode"],
|
|
175
|
+
"properties": {
|
|
176
|
+
"hint_id": { "type": "string" },
|
|
177
|
+
"case_id": { "type": "string" },
|
|
178
|
+
"delivery_mode": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"enum": ["append", "comment", "inline", "aside"]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"meridian.outcome.recorded": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"required": ["hint_id", "case_id", "succeeded", "attempts_after_hint"],
|
|
188
|
+
"properties": {
|
|
189
|
+
"hint_id": { "type": "string" },
|
|
190
|
+
"case_id": { "type": "string" },
|
|
191
|
+
"succeeded": { "type": "boolean" },
|
|
192
|
+
"attempts_after_hint": { "type": "integer", "minimum": 0 },
|
|
193
|
+
"hint_referenced": { "type": "boolean" },
|
|
194
|
+
"time_to_success_ms": { "type": "integer", "minimum": 0 }
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"meridian.reliance.measured": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"additionalProperties": false,
|
|
200
|
+
"required": ["hint_id", "case_id", "score", "assessment", "method"],
|
|
201
|
+
"properties": {
|
|
202
|
+
"hint_id": { "type": "string" },
|
|
203
|
+
"case_id": { "type": "string" },
|
|
204
|
+
"score": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
205
|
+
"assessment": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
206
|
+
"method": { "type": "string", "enum": ["logprob", "judge"] }
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"meridian.lesson.curated": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"additionalProperties": false,
|
|
212
|
+
"required": [
|
|
213
|
+
"bullet_id",
|
|
214
|
+
"case_id",
|
|
215
|
+
"category",
|
|
216
|
+
"task_type",
|
|
217
|
+
"target_concept"
|
|
218
|
+
],
|
|
219
|
+
"properties": {
|
|
220
|
+
"bullet_id": { "type": "string" },
|
|
221
|
+
"case_id": { "type": "string" },
|
|
222
|
+
"category": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"enum": [
|
|
225
|
+
"failure_pattern",
|
|
226
|
+
"successful_hint",
|
|
227
|
+
"task_strategy",
|
|
228
|
+
"tool_usage"
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"task_type": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"enum": ["code", "reasoning", "writing", "general"]
|
|
234
|
+
},
|
|
235
|
+
"target_concept": { "type": "string" },
|
|
236
|
+
"origin": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"enum": ["agent_failure", "human_session", "manual"]
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"meridian.playbook.updated": {
|
|
243
|
+
"type": "object",
|
|
244
|
+
"additionalProperties": false,
|
|
245
|
+
"required": ["scope_id", "operation", "bullet_count_after"],
|
|
246
|
+
"properties": {
|
|
247
|
+
"scope_id": { "type": "string" },
|
|
248
|
+
"operation": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"enum": ["append", "update", "deduplicate", "promote", "retire"]
|
|
251
|
+
},
|
|
252
|
+
"bullet_count_after": { "type": "integer", "minimum": 0 },
|
|
253
|
+
"bullets_removed": { "type": "integer", "minimum": 0 }
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
246
257
|
}
|