@onlooker-community/schema 2.3.0 → 2.5.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.
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.onlooker.dev/schemas/payload/plugins-memory.json",
4
4
  "title": "Memory plugin payloads",
5
- "description": "Payload schemas for archivist.*, relay.*, scribe.*, oracle.*, prompt_rule.*, and cartographer.* events. Archivist events cover compact (PreCompact hook) and inject (SessionStart hook) lifecycles.",
5
+ "description": "Payload schemas for archivist.*, relay.*, scribe.*, oracle.*, prompt_rule.*, cartographer.*, librarian.*, curator.*, historian.*, and memory.* events. Covers the memory plugin layer: archivist (session-scoped extraction), librarian (promotion to typed memory store), curator (memory store audit), historian (episodic retrieval), and the substrate-level memory.recalled event.",
6
6
  "$defs": {
7
7
  "archivist.extract.complete": {
8
8
  "type": "object",
@@ -213,6 +213,442 @@
213
213
  "severity": { "type": "string", "enum": ["error", "warning", "info"] },
214
214
  "description": { "type": "string" }
215
215
  }
216
+ },
217
+ "memory.recalled": {
218
+ "type": "object",
219
+ "additionalProperties": false,
220
+ "required": ["project_key", "memory_file", "memory_type"],
221
+ "properties": {
222
+ "project_key": { "type": "string" },
223
+ "memory_file": { "type": "string" },
224
+ "memory_type": {
225
+ "type": "string",
226
+ "enum": ["user", "feedback", "project", "reference"]
227
+ },
228
+ "recall_position": { "type": "integer", "minimum": 0 }
229
+ }
230
+ },
231
+ "librarian.scan.started": {
232
+ "type": "object",
233
+ "additionalProperties": false,
234
+ "required": ["trigger"],
235
+ "properties": {
236
+ "trigger": {
237
+ "type": "string",
238
+ "enum": ["session_end", "manual", "bootstrap"]
239
+ },
240
+ "last_scan_at": { "type": "string", "format": "date-time" },
241
+ "artifact_count_in_window": { "type": "integer", "minimum": 0 }
242
+ }
243
+ },
244
+ "librarian.scan.complete": {
245
+ "type": "object",
246
+ "additionalProperties": false,
247
+ "required": ["outcome", "duration_ms"],
248
+ "properties": {
249
+ "outcome": {
250
+ "type": "string",
251
+ "enum": ["ok", "empty", "skipped"]
252
+ },
253
+ "skip_reason": {
254
+ "type": "string",
255
+ "enum": [
256
+ "archivist_not_present",
257
+ "memory_path_unresolved",
258
+ "disabled"
259
+ ]
260
+ },
261
+ "candidates_proposed": { "type": "integer", "minimum": 0 },
262
+ "candidates_dropped": { "type": "integer", "minimum": 0 },
263
+ "duration_ms": { "type": "integer", "minimum": 0 },
264
+ "artifact_count_in_window": { "type": "integer", "minimum": 0 }
265
+ }
266
+ },
267
+ "librarian.candidate.proposed": {
268
+ "type": "object",
269
+ "additionalProperties": false,
270
+ "required": [
271
+ "proposal_id",
272
+ "memory_type",
273
+ "classifier_confidence",
274
+ "conflict_state"
275
+ ],
276
+ "properties": {
277
+ "proposal_id": { "type": "string" },
278
+ "memory_type": {
279
+ "type": "string",
280
+ "enum": ["user", "feedback", "project", "reference"]
281
+ },
282
+ "classifier_confidence": {
283
+ "type": "number",
284
+ "minimum": 0,
285
+ "maximum": 1
286
+ },
287
+ "conflict_state": {
288
+ "type": "string",
289
+ "enum": ["none", "duplicate", "merge_candidate", "conflict_candidate"]
290
+ },
291
+ "source_artifact_ids": {
292
+ "type": "array",
293
+ "items": { "type": "string" }
294
+ }
295
+ }
296
+ },
297
+ "librarian.candidate.dropped": {
298
+ "type": "object",
299
+ "additionalProperties": false,
300
+ "required": ["reason"],
301
+ "properties": {
302
+ "reason": {
303
+ "type": "string",
304
+ "enum": [
305
+ "duplicate",
306
+ "low_confidence",
307
+ "classified_null",
308
+ "filter_marker_missing",
309
+ "filter_repetition_missing",
310
+ "detail_too_short"
311
+ ]
312
+ },
313
+ "source_artifact_id": { "type": "string" }
314
+ }
315
+ },
316
+ "librarian.proposal.accepted": {
317
+ "type": "object",
318
+ "additionalProperties": false,
319
+ "required": ["proposal_id", "final_filename", "accepted_via"],
320
+ "properties": {
321
+ "proposal_id": { "type": "string" },
322
+ "final_filename": { "type": "string" },
323
+ "accepted_via": { "type": "string", "enum": ["manual", "auto"] }
324
+ }
325
+ },
326
+ "librarian.proposal.rejected": {
327
+ "type": "object",
328
+ "additionalProperties": false,
329
+ "required": ["proposal_id"],
330
+ "properties": {
331
+ "proposal_id": { "type": "string" },
332
+ "reason": { "type": "string" }
333
+ }
334
+ },
335
+ "librarian.proposal.merged": {
336
+ "type": "object",
337
+ "additionalProperties": false,
338
+ "required": ["proposal_id", "merged_into_filename"],
339
+ "properties": {
340
+ "proposal_id": { "type": "string" },
341
+ "merged_into_filename": { "type": "string" }
342
+ }
343
+ },
344
+ "librarian.proposal.superseded": {
345
+ "type": "object",
346
+ "additionalProperties": false,
347
+ "required": ["proposal_id", "superseded_filename"],
348
+ "properties": {
349
+ "proposal_id": { "type": "string" },
350
+ "superseded_filename": { "type": "string" }
351
+ }
352
+ },
353
+ "librarian.tombstone.created": {
354
+ "type": "object",
355
+ "additionalProperties": false,
356
+ "required": ["body_hash"],
357
+ "properties": {
358
+ "body_hash": { "type": "string" },
359
+ "original_filename": { "type": "string" }
360
+ }
361
+ },
362
+ "curator.scan.started": {
363
+ "type": "object",
364
+ "additionalProperties": false,
365
+ "required": ["mode"],
366
+ "properties": {
367
+ "mode": { "type": "string", "enum": ["cheap", "llm", "manual"] }
368
+ }
369
+ },
370
+ "curator.scan.complete": {
371
+ "type": "object",
372
+ "additionalProperties": false,
373
+ "required": [
374
+ "mode",
375
+ "outcome",
376
+ "findings_new",
377
+ "findings_resolved",
378
+ "duration_ms"
379
+ ],
380
+ "properties": {
381
+ "mode": { "type": "string", "enum": ["cheap", "llm", "manual"] },
382
+ "outcome": { "type": "string", "enum": ["ok", "skipped"] },
383
+ "skip_reason": {
384
+ "type": "string",
385
+ "enum": [
386
+ "over_budget",
387
+ "llm_interval_not_elapsed",
388
+ "disabled",
389
+ "recent_session_skip"
390
+ ]
391
+ },
392
+ "findings_new": { "type": "integer", "minimum": 0 },
393
+ "findings_resolved": { "type": "integer", "minimum": 0 },
394
+ "duration_ms": { "type": "integer", "minimum": 0 },
395
+ "pairs_evaluated": { "type": "integer", "minimum": 0 }
396
+ }
397
+ },
398
+ "curator.finding.date_decayed": {
399
+ "type": "object",
400
+ "additionalProperties": false,
401
+ "required": ["finding_id", "memory_file", "matched_phrase", "days_past"],
402
+ "properties": {
403
+ "finding_id": { "type": "string" },
404
+ "memory_file": { "type": "string" },
405
+ "matched_phrase": { "type": "string" },
406
+ "days_past": { "type": "integer", "minimum": 0 }
407
+ }
408
+ },
409
+ "curator.finding.path_broken": {
410
+ "type": "object",
411
+ "additionalProperties": false,
412
+ "required": ["finding_id", "memory_file", "broken_path"],
413
+ "properties": {
414
+ "finding_id": { "type": "string" },
415
+ "memory_file": { "type": "string" },
416
+ "broken_path": { "type": "string" }
417
+ }
418
+ },
419
+ "curator.finding.symbol_missing": {
420
+ "type": "object",
421
+ "additionalProperties": false,
422
+ "required": ["finding_id", "memory_file", "symbol"],
423
+ "properties": {
424
+ "finding_id": { "type": "string" },
425
+ "memory_file": { "type": "string" },
426
+ "symbol": { "type": "string" }
427
+ }
428
+ },
429
+ "curator.finding.url_unchecked": {
430
+ "type": "object",
431
+ "additionalProperties": false,
432
+ "required": ["finding_id", "memory_file", "url_host"],
433
+ "properties": {
434
+ "finding_id": { "type": "string" },
435
+ "memory_file": { "type": "string" },
436
+ "url_host": { "type": "string" }
437
+ }
438
+ },
439
+ "curator.finding.unused_low_signal": {
440
+ "type": "object",
441
+ "additionalProperties": false,
442
+ "required": ["finding_id", "memory_file", "window_days"],
443
+ "properties": {
444
+ "finding_id": { "type": "string" },
445
+ "memory_file": { "type": "string" },
446
+ "window_days": { "type": "integer", "minimum": 1 }
447
+ }
448
+ },
449
+ "curator.finding.contradiction": {
450
+ "type": "object",
451
+ "additionalProperties": false,
452
+ "required": ["finding_id", "memory_a", "memory_b", "rationale"],
453
+ "properties": {
454
+ "finding_id": { "type": "string" },
455
+ "memory_a": { "type": "string" },
456
+ "memory_b": { "type": "string" },
457
+ "rationale": { "type": "string" }
458
+ }
459
+ },
460
+ "curator.finding.redundant_pair": {
461
+ "type": "object",
462
+ "additionalProperties": false,
463
+ "required": ["finding_id", "memory_a", "memory_b", "rationale"],
464
+ "properties": {
465
+ "finding_id": { "type": "string" },
466
+ "memory_a": { "type": "string" },
467
+ "memory_b": { "type": "string" },
468
+ "rationale": { "type": "string" }
469
+ }
470
+ },
471
+ "curator.finding.broken_index": {
472
+ "type": "object",
473
+ "additionalProperties": false,
474
+ "required": ["finding_id", "referenced_file"],
475
+ "properties": {
476
+ "finding_id": { "type": "string" },
477
+ "referenced_file": { "type": "string" }
478
+ }
479
+ },
480
+ "curator.finding.orphaned_memory": {
481
+ "type": "object",
482
+ "additionalProperties": false,
483
+ "required": ["finding_id", "memory_file"],
484
+ "properties": {
485
+ "finding_id": { "type": "string" },
486
+ "memory_file": { "type": "string" }
487
+ }
488
+ },
489
+ "curator.finding.acknowledged": {
490
+ "type": "object",
491
+ "additionalProperties": false,
492
+ "required": ["finding_id"],
493
+ "properties": {
494
+ "finding_id": { "type": "string" }
495
+ }
496
+ },
497
+ "curator.finding.resolved": {
498
+ "type": "object",
499
+ "additionalProperties": false,
500
+ "required": ["finding_id", "action"],
501
+ "properties": {
502
+ "finding_id": { "type": "string" },
503
+ "action": {
504
+ "type": "string",
505
+ "enum": ["prune", "edit", "reclassify", "defer"]
506
+ }
507
+ }
508
+ },
509
+ "historian.indexing.started": {
510
+ "type": "object",
511
+ "additionalProperties": false,
512
+ "required": ["session_id", "transcript_chars"],
513
+ "properties": {
514
+ "session_id": { "type": "string" },
515
+ "transcript_chars": { "type": "integer", "minimum": 0 }
516
+ }
517
+ },
518
+ "historian.indexing.complete": {
519
+ "type": "object",
520
+ "additionalProperties": false,
521
+ "required": ["outcome", "duration_ms"],
522
+ "properties": {
523
+ "outcome": {
524
+ "type": "string",
525
+ "enum": ["ok", "skipped"]
526
+ },
527
+ "skip_reason": {
528
+ "type": "string",
529
+ "enum": [
530
+ "too_short",
531
+ "embedder_unavailable",
532
+ "disabled",
533
+ "transcript_unavailable"
534
+ ]
535
+ },
536
+ "chunks_indexed": { "type": "integer", "minimum": 0 },
537
+ "chunks_dropped": { "type": "integer", "minimum": 0 },
538
+ "duration_ms": { "type": "integer", "minimum": 0 }
539
+ }
540
+ },
541
+ "historian.chunk.sanitized": {
542
+ "type": "object",
543
+ "additionalProperties": false,
544
+ "required": ["chunk_id", "redaction_count"],
545
+ "properties": {
546
+ "chunk_id": { "type": "string" },
547
+ "redaction_count": { "type": "integer", "minimum": 1 }
548
+ }
549
+ },
550
+ "historian.chunk.dropped": {
551
+ "type": "object",
552
+ "additionalProperties": false,
553
+ "required": ["reason"],
554
+ "properties": {
555
+ "reason": {
556
+ "type": "string",
557
+ "enum": ["skip_marker", "never_index_path"]
558
+ }
559
+ }
560
+ },
561
+ "historian.embedder.unavailable": {
562
+ "type": "object",
563
+ "additionalProperties": false,
564
+ "required": ["backend"],
565
+ "properties": {
566
+ "backend": {
567
+ "type": "string",
568
+ "enum": ["ollama", "fastembed", "remote"]
569
+ },
570
+ "error_summary": { "type": "string" }
571
+ }
572
+ },
573
+ "historian.retrieval.started": {
574
+ "type": "object",
575
+ "additionalProperties": false,
576
+ "required": ["prompt_chars"],
577
+ "properties": {
578
+ "prompt_chars": { "type": "integer", "minimum": 0 }
579
+ }
580
+ },
581
+ "historian.retrieval.complete": {
582
+ "type": "object",
583
+ "additionalProperties": false,
584
+ "required": ["outcome"],
585
+ "properties": {
586
+ "outcome": {
587
+ "type": "string",
588
+ "enum": ["surfaced", "empty", "skipped"]
589
+ },
590
+ "skip_reason": {
591
+ "type": "string",
592
+ "enum": [
593
+ "cooldown",
594
+ "budget",
595
+ "short_prompt",
596
+ "disabled",
597
+ "embedder_unavailable"
598
+ ]
599
+ },
600
+ "top_similarity": { "type": "number", "minimum": 0, "maximum": 1 },
601
+ "candidates_above_floor": { "type": "integer", "minimum": 0 },
602
+ "duration_ms": { "type": "integer", "minimum": 0 }
603
+ }
604
+ },
605
+ "historian.retrieval.surfaced": {
606
+ "type": "object",
607
+ "additionalProperties": false,
608
+ "required": ["chunk_id", "similarity", "age_days"],
609
+ "properties": {
610
+ "chunk_id": { "type": "string" },
611
+ "similarity": { "type": "number", "minimum": 0, "maximum": 1 },
612
+ "age_days": { "type": "integer", "minimum": 0 },
613
+ "source_session_id": { "type": "string" }
614
+ }
615
+ },
616
+ "historian.prune.complete": {
617
+ "type": "object",
618
+ "additionalProperties": false,
619
+ "required": ["chunks_pruned", "chunks_remaining"],
620
+ "properties": {
621
+ "chunks_pruned": { "type": "integer", "minimum": 0 },
622
+ "chunks_remaining": { "type": "integer", "minimum": 0 }
623
+ }
624
+ },
625
+ "historian.purge.complete": {
626
+ "type": "object",
627
+ "additionalProperties": false,
628
+ "required": ["scope", "chunks_purged"],
629
+ "properties": {
630
+ "scope": {
631
+ "type": "string",
632
+ "enum": ["session", "date_range", "all"]
633
+ },
634
+ "chunks_purged": { "type": "integer", "minimum": 0 }
635
+ }
636
+ },
637
+ "historian.config.warning": {
638
+ "type": "object",
639
+ "additionalProperties": false,
640
+ "required": ["warning"],
641
+ "properties": {
642
+ "warning": {
643
+ "type": "string",
644
+ "enum": [
645
+ "remote_egress_not_allowed",
646
+ "model_mismatch",
647
+ "embedder_path_changed"
648
+ ]
649
+ },
650
+ "detail": { "type": "string" }
651
+ }
216
652
  }
217
653
  }
218
654
  }
@@ -2,33 +2,206 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.onlooker.dev/schemas/payload/plugins-ops.json",
4
4
  "title": "Ops plugin payloads",
5
- "description": "Payload schemas for ledger.*, echo.*, counsel.*, onlooker.*, and meridian.* events.",
5
+ "description": "Payload schemas for governor.*, echo.*, counsel.*, onlooker.*, and meridian.* events.",
6
6
  "$defs": {
7
- "ledger.budget.warning": {
7
+ "governor.gate.checked": {
8
8
  "type": "object",
9
9
  "additionalProperties": false,
10
- "required": ["budget_usd", "spent_usd", "threshold_pct"],
10
+ "required": [
11
+ "session_id",
12
+ "agent_id",
13
+ "agent_type",
14
+ "decision",
15
+ "estimated_tokens",
16
+ "tokens_available",
17
+ "estimation_method",
18
+ "safety_margin"
19
+ ],
20
+ "properties": {
21
+ "session_id": { "type": "string" },
22
+ "agent_id": { "type": "string" },
23
+ "agent_type": { "type": "string" },
24
+ "decision": { "type": "string", "enum": ["allow", "block"] },
25
+ "reason": {
26
+ "type": "string",
27
+ "enum": ["budget_exceeded", "ceiling_exceeded", "lock_timeout"]
28
+ },
29
+ "estimated_tokens": { "type": "integer", "minimum": 0 },
30
+ "tokens_available": { "type": "integer", "minimum": 0 },
31
+ "estimation_method": {
32
+ "type": "string",
33
+ "enum": ["tiktoken", "char_ratio", "tier_table"]
34
+ },
35
+ "safety_margin": { "type": "number", "minimum": 1 }
36
+ }
37
+ },
38
+ "governor.call.recorded": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": [
42
+ "session_id",
43
+ "agent_id",
44
+ "agent_type",
45
+ "estimated_tokens",
46
+ "cost_usd_estimated",
47
+ "duration_ms"
48
+ ],
49
+ "properties": {
50
+ "session_id": { "type": "string" },
51
+ "agent_id": { "type": "string" },
52
+ "agent_type": { "type": "string" },
53
+ "estimated_tokens": { "type": "integer", "minimum": 0 },
54
+ "actual_tokens": { "type": "integer", "minimum": 0 },
55
+ "estimation_error_pct": { "type": "number" },
56
+ "cost_usd_estimated": { "type": "number", "minimum": 0 },
57
+ "cost_usd_actual": { "type": "number", "minimum": 0 },
58
+ "duration_ms": { "type": "integer", "minimum": 0 },
59
+ "tokens_returned_to_pool": { "type": "integer" }
60
+ },
61
+ "dependentRequired": {
62
+ "actual_tokens": ["tokens_returned_to_pool"],
63
+ "estimation_error_pct": ["actual_tokens"],
64
+ "cost_usd_actual": ["actual_tokens"]
65
+ }
66
+ },
67
+ "governor.ledger.write_failed": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "session_id",
72
+ "agent_id",
73
+ "error",
74
+ "retry_count",
75
+ "ledger_poisoned",
76
+ "unrecorded_tokens"
77
+ ],
78
+ "properties": {
79
+ "session_id": { "type": "string" },
80
+ "agent_id": { "type": "string" },
81
+ "error": { "type": "string" },
82
+ "retry_count": { "type": "integer", "minimum": 0 },
83
+ "ledger_poisoned": { "type": "boolean" },
84
+ "unrecorded_tokens": { "type": "integer", "minimum": 0 }
85
+ }
86
+ },
87
+ "governor.child.allocated": {
88
+ "type": "object",
89
+ "additionalProperties": false,
90
+ "required": [
91
+ "session_id",
92
+ "parent_agent_id",
93
+ "child_agent_id",
94
+ "child_agent_type",
95
+ "tokens_allocated",
96
+ "cost_usd_allocated",
97
+ "tokens_remaining_after_allocation",
98
+ "conservation_check_passed"
99
+ ],
100
+ "properties": {
101
+ "session_id": { "type": "string" },
102
+ "parent_agent_id": { "type": "string" },
103
+ "child_agent_id": { "type": "string" },
104
+ "child_agent_type": { "type": "string" },
105
+ "tokens_allocated": { "type": "integer", "minimum": 0 },
106
+ "cost_usd_allocated": { "type": "number", "minimum": 0 },
107
+ "tokens_remaining_after_allocation": {
108
+ "type": "integer",
109
+ "minimum": 0
110
+ },
111
+ "conservation_check_passed": { "type": "boolean" }
112
+ }
113
+ },
114
+ "governor.child.returned": {
115
+ "type": "object",
116
+ "additionalProperties": false,
117
+ "required": [
118
+ "session_id",
119
+ "parent_agent_id",
120
+ "child_agent_id",
121
+ "tokens_allocated",
122
+ "tokens_consumed",
123
+ "tokens_returned"
124
+ ],
125
+ "properties": {
126
+ "session_id": { "type": "string" },
127
+ "parent_agent_id": { "type": "string" },
128
+ "child_agent_id": { "type": "string" },
129
+ "tokens_allocated": { "type": "integer", "minimum": 0 },
130
+ "tokens_consumed": { "type": "integer", "minimum": 0 },
131
+ "tokens_returned": { "type": "integer", "minimum": 0 }
132
+ }
133
+ },
134
+ "governor.budget.warning": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": [
138
+ "budget_usd",
139
+ "spent_usd",
140
+ "threshold_pct",
141
+ "session_id",
142
+ "dimension"
143
+ ],
11
144
  "properties": {
12
145
  "budget_usd": { "type": "number", "minimum": 0 },
13
146
  "spent_usd": { "type": "number", "minimum": 0 },
14
147
  "threshold_pct": { "type": "number", "minimum": 0, "maximum": 100 },
15
- "remaining_usd": { "type": "number" }
148
+ "remaining_usd": { "type": "number" },
149
+ "session_id": { "type": "string" },
150
+ "dimension": {
151
+ "type": "string",
152
+ "enum": ["cost_usd", "tokens", "api_calls", "wall_clock_seconds"]
153
+ },
154
+ "tokens_budget": { "type": "integer", "minimum": 0 },
155
+ "tokens_spent": { "type": "integer", "minimum": 0 },
156
+ "api_calls_budget": { "type": "integer", "minimum": 0 },
157
+ "api_calls_spent": { "type": "integer", "minimum": 0 }
16
158
  }
17
159
  },
18
- "ledger.budget.exceeded": {
160
+ "governor.budget.exceeded": {
19
161
  "type": "object",
20
162
  "additionalProperties": false,
21
- "required": ["budget_usd", "spent_usd", "blocked_operation"],
163
+ "required": [
164
+ "budget_usd",
165
+ "spent_usd",
166
+ "blocked_operation",
167
+ "session_id",
168
+ "agent_id",
169
+ "dimension",
170
+ "estimated_call_cost",
171
+ "ceiling_type"
172
+ ],
22
173
  "properties": {
23
174
  "budget_usd": { "type": "number", "minimum": 0 },
24
175
  "spent_usd": { "type": "number", "minimum": 0 },
25
- "blocked_operation": { "type": "string" }
176
+ "blocked_operation": { "type": "string" },
177
+ "session_id": { "type": "string" },
178
+ "agent_id": { "type": "string" },
179
+ "dimension": {
180
+ "type": "string",
181
+ "enum": ["cost_usd", "tokens", "api_calls", "wall_clock_seconds"]
182
+ },
183
+ "estimated_call_cost": { "type": "number", "minimum": 0 },
184
+ "ceiling_type": {
185
+ "type": "string",
186
+ "enum": ["session", "global", "per_call"]
187
+ }
26
188
  }
27
189
  },
28
- "ledger.session.complete": {
190
+ "governor.session.complete": {
29
191
  "type": "object",
30
192
  "additionalProperties": false,
31
- "required": ["total_cost_usd", "budget_usd", "under_budget"],
193
+ "required": [
194
+ "total_cost_usd",
195
+ "budget_usd",
196
+ "under_budget",
197
+ "session_id",
198
+ "total_tokens",
199
+ "total_api_calls",
200
+ "duration_ms",
201
+ "calls_blocked",
202
+ "calls_warned",
203
+ "ledger_poisoned"
204
+ ],
32
205
  "properties": {
33
206
  "total_cost_usd": { "type": "number", "minimum": 0 },
34
207
  "budget_usd": { "type": "number", "minimum": 0 },
@@ -36,7 +209,25 @@
36
209
  "cost_by_plugin": {
37
210
  "type": "object",
38
211
  "additionalProperties": { "type": "number" }
39
- }
212
+ },
213
+ "session_id": { "type": "string" },
214
+ "total_tokens": { "type": "integer", "minimum": 0 },
215
+ "total_api_calls": { "type": "integer", "minimum": 0 },
216
+ "duration_ms": { "type": "integer", "minimum": 0 },
217
+ "calls_blocked": { "type": "integer", "minimum": 0 },
218
+ "calls_warned": { "type": "integer", "minimum": 0 },
219
+ "ledger_poisoned": { "type": "boolean" },
220
+ "estimation_accuracy_pct": { "type": "number" }
221
+ }
222
+ },
223
+ "governor.lock.stale_cleared": {
224
+ "type": "object",
225
+ "additionalProperties": false,
226
+ "required": ["lock_path", "lock_age_seconds", "pid_verified_dead"],
227
+ "properties": {
228
+ "lock_path": { "type": "string" },
229
+ "lock_age_seconds": { "type": "number", "minimum": 0 },
230
+ "pid_verified_dead": { "type": "boolean" }
40
231
  }
41
232
  },
42
233
  "echo.suite.started": {