@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.
@@ -1,246 +1,257 @@
1
1
  {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://onlooker.community/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": ["bullet_id", "case_id", "category", "task_type", "target_concept"],
213
- "properties": {
214
- "bullet_id": { "type": "string" },
215
- "case_id": { "type": "string" },
216
- "category": {
217
- "type": "string",
218
- "enum": ["failure_pattern", "successful_hint", "task_strategy", "tool_usage"]
219
- },
220
- "task_type": {
221
- "type": "string",
222
- "enum": ["code", "reasoning", "writing", "general"]
223
- },
224
- "target_concept": { "type": "string" },
225
- "origin": {
226
- "type": "string",
227
- "enum": ["agent_failure", "human_session", "manual"]
228
- }
229
- }
230
- },
231
- "meridian.playbook.updated": {
232
- "type": "object",
233
- "additionalProperties": false,
234
- "required": ["scope_id", "operation", "bullet_count_after"],
235
- "properties": {
236
- "scope_id": { "type": "string" },
237
- "operation": {
238
- "type": "string",
239
- "enum": ["append", "update", "deduplicate", "promote", "retire"]
240
- },
241
- "bullet_count_after": { "type": "integer", "minimum": 0 },
242
- "bullets_removed": { "type": "integer", "minimum": 0 }
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
  }