@actantdb/types 0.0.2

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.
@@ -0,0 +1,1891 @@
1
+ {
2
+ "ActantEvent": {
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "EventKind": {
6
+ "description": "Causal kind for each event written to the ledger.",
7
+ "oneOf": [
8
+ {
9
+ "description": "Agent run started.",
10
+ "enum": [
11
+ "agent_run_started"
12
+ ],
13
+ "type": "string"
14
+ },
15
+ {
16
+ "description": "Inbound user message attached to the run.",
17
+ "enum": [
18
+ "user_message_received"
19
+ ],
20
+ "type": "string"
21
+ },
22
+ {
23
+ "description": "Model planner / generator was called.",
24
+ "enum": [
25
+ "model_call"
26
+ ],
27
+ "type": "string"
28
+ },
29
+ {
30
+ "description": "A tool call was proposed.",
31
+ "enum": [
32
+ "tool_call_requested"
33
+ ],
34
+ "type": "string"
35
+ },
36
+ {
37
+ "description": "Guard issued a verdict on a tool call.",
38
+ "enum": [
39
+ "guard_verdict"
40
+ ],
41
+ "type": "string"
42
+ },
43
+ {
44
+ "description": "An approval is required for a tool call.",
45
+ "enum": [
46
+ "approval_required"
47
+ ],
48
+ "type": "string"
49
+ },
50
+ {
51
+ "description": "An approval decision was recorded (approve / deny / constrain).",
52
+ "enum": [
53
+ "approval_decision"
54
+ ],
55
+ "type": "string"
56
+ },
57
+ {
58
+ "description": "A tool call started executing (post-Guard, post-approval if any).",
59
+ "enum": [
60
+ "tool_call_started"
61
+ ],
62
+ "type": "string"
63
+ },
64
+ {
65
+ "description": "A tool call completed.",
66
+ "enum": [
67
+ "tool_call_completed"
68
+ ],
69
+ "type": "string"
70
+ },
71
+ {
72
+ "description": "The context manifest fed to the model was built.",
73
+ "enum": [
74
+ "context_build"
75
+ ],
76
+ "type": "string"
77
+ },
78
+ {
79
+ "description": "An observation / effect was recorded back into the run.",
80
+ "enum": [
81
+ "effect_observed"
82
+ ],
83
+ "type": "string"
84
+ },
85
+ {
86
+ "description": "An agent run finished.",
87
+ "enum": [
88
+ "agent_run_finished"
89
+ ],
90
+ "type": "string"
91
+ }
92
+ ]
93
+ },
94
+ "Sensitivity": {
95
+ "description": "Sensitivity classification carried with every event payload. Drives Studio rendering and replay redaction.",
96
+ "oneOf": [
97
+ {
98
+ "description": "Safe to expose anywhere (logs, UI, sharing).",
99
+ "enum": [
100
+ "public"
101
+ ],
102
+ "type": "string"
103
+ },
104
+ {
105
+ "description": "Low-risk data; default for non-PII operational events.",
106
+ "enum": [
107
+ "low"
108
+ ],
109
+ "type": "string"
110
+ },
111
+ {
112
+ "description": "User-attributable but not high-impact.",
113
+ "enum": [
114
+ "medium"
115
+ ],
116
+ "type": "string"
117
+ },
118
+ {
119
+ "description": "Personally identifying or business-sensitive.",
120
+ "enum": [
121
+ "high"
122
+ ],
123
+ "type": "string"
124
+ },
125
+ {
126
+ "description": "Secrets, tokens, keys. Never displayed in Studio without unmask.",
127
+ "enum": [
128
+ "secret"
129
+ ],
130
+ "type": "string"
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ "description": "One event on the Chronicle ledger. Append-only, hash-chained downstream.",
136
+ "properties": {
137
+ "chain_hash": {
138
+ "description": "Hash of (prev_chain_hash || payload_hash) — links events causally.",
139
+ "type": "string"
140
+ },
141
+ "created_at": {
142
+ "description": "RFC3339 timestamp.",
143
+ "type": "string"
144
+ },
145
+ "id": {
146
+ "description": "Unique event identifier (ULID; lexicographically sortable).",
147
+ "type": "string"
148
+ },
149
+ "kind": {
150
+ "allOf": [
151
+ {
152
+ "$ref": "#/definitions/EventKind"
153
+ }
154
+ ],
155
+ "description": "Causal kind. Drives Studio rendering and replay routing."
156
+ },
157
+ "parent_event_id": {
158
+ "description": "Causal parent event, when applicable.",
159
+ "type": [
160
+ "string",
161
+ "null"
162
+ ]
163
+ },
164
+ "payload": {
165
+ "description": "Event-specific payload. Schema varies by kind."
166
+ },
167
+ "payload_hash": {
168
+ "description": "SHA-256 hex digest of the canonical payload JSON.",
169
+ "type": "string"
170
+ },
171
+ "project": {
172
+ "description": "Owning project identifier.",
173
+ "type": "string"
174
+ },
175
+ "run_id": {
176
+ "description": "Run identifier (one agent invocation).",
177
+ "type": "string"
178
+ },
179
+ "sensitivity": {
180
+ "allOf": [
181
+ {
182
+ "$ref": "#/definitions/Sensitivity"
183
+ }
184
+ ],
185
+ "description": "Sensitivity classification."
186
+ }
187
+ },
188
+ "required": [
189
+ "chain_hash",
190
+ "created_at",
191
+ "id",
192
+ "kind",
193
+ "payload",
194
+ "payload_hash",
195
+ "project",
196
+ "run_id",
197
+ "sensitivity"
198
+ ],
199
+ "title": "ActantEvent",
200
+ "type": "object"
201
+ },
202
+ "ApprovalDecision": {
203
+ "$schema": "http://json-schema.org/draft-07/schema#",
204
+ "description": "Approval outcome.",
205
+ "oneOf": [
206
+ {
207
+ "description": "Approved as-proposed.",
208
+ "properties": {
209
+ "approver": {
210
+ "description": "Approver identifier.",
211
+ "type": "string"
212
+ },
213
+ "decision": {
214
+ "enum": [
215
+ "approve"
216
+ ],
217
+ "type": "string"
218
+ },
219
+ "scope": {
220
+ "description": "Approval scope (e.g. \"once\", \"session\").",
221
+ "type": "string"
222
+ }
223
+ },
224
+ "required": [
225
+ "approver",
226
+ "decision",
227
+ "scope"
228
+ ],
229
+ "type": "object"
230
+ },
231
+ {
232
+ "description": "Approved the constrained variant.",
233
+ "properties": {
234
+ "accepted_input": {
235
+ "description": "Final arguments accepted."
236
+ },
237
+ "approver": {
238
+ "description": "Approver identifier.",
239
+ "type": "string"
240
+ },
241
+ "decision": {
242
+ "enum": [
243
+ "approve_constrained"
244
+ ],
245
+ "type": "string"
246
+ },
247
+ "scope": {
248
+ "description": "Approval scope.",
249
+ "type": "string"
250
+ }
251
+ },
252
+ "required": [
253
+ "accepted_input",
254
+ "approver",
255
+ "decision",
256
+ "scope"
257
+ ],
258
+ "type": "object"
259
+ },
260
+ {
261
+ "description": "Denied.",
262
+ "properties": {
263
+ "approver": {
264
+ "description": "Approver identifier.",
265
+ "type": "string"
266
+ },
267
+ "decision": {
268
+ "enum": [
269
+ "deny"
270
+ ],
271
+ "type": "string"
272
+ },
273
+ "reason": {
274
+ "description": "Free-text reason.",
275
+ "type": "string"
276
+ }
277
+ },
278
+ "required": [
279
+ "approver",
280
+ "decision",
281
+ "reason"
282
+ ],
283
+ "type": "object"
284
+ }
285
+ ],
286
+ "title": "ApprovalDecision"
287
+ },
288
+ "ApprovalRequest": {
289
+ "$schema": "http://json-schema.org/draft-07/schema#",
290
+ "description": "A pending or recorded approval request.",
291
+ "properties": {
292
+ "args": {
293
+ "description": "Original arguments (pre-constrain)."
294
+ },
295
+ "constrained_input": {
296
+ "description": "Constrained args the approver can accept."
297
+ },
298
+ "hint": {
299
+ "description": "Constrain hint, if Guard suggested one.",
300
+ "type": [
301
+ "string",
302
+ "null"
303
+ ]
304
+ },
305
+ "reason": {
306
+ "description": "Reason from Guard.",
307
+ "type": "string"
308
+ },
309
+ "tool": {
310
+ "description": "Tool name.",
311
+ "type": "string"
312
+ },
313
+ "tool_call_id": {
314
+ "description": "Tool call id this approval is for.",
315
+ "type": "string"
316
+ }
317
+ },
318
+ "required": [
319
+ "args",
320
+ "reason",
321
+ "tool",
322
+ "tool_call_id"
323
+ ],
324
+ "title": "ApprovalRequest",
325
+ "type": "object"
326
+ },
327
+ "ArgDenyRule": {
328
+ "$schema": "http://json-schema.org/draft-07/schema#",
329
+ "description": "A simple regex-based deny rule applied to tool arguments.",
330
+ "properties": {
331
+ "pattern": {
332
+ "description": "Regular expression evaluated against the JSON-stringified args.",
333
+ "type": "string"
334
+ },
335
+ "reason": {
336
+ "description": "Human reason; surfaced in the verdict.",
337
+ "type": "string"
338
+ },
339
+ "tool": {
340
+ "description": "Tool name this rule applies to (e.g. \"shell.run\"). \"*\" for any tool.",
341
+ "type": "string"
342
+ }
343
+ },
344
+ "required": [
345
+ "pattern",
346
+ "reason",
347
+ "tool"
348
+ ],
349
+ "title": "ArgDenyRule",
350
+ "type": "object"
351
+ },
352
+ "CheckpointRef": {
353
+ "$schema": "http://json-schema.org/draft-07/schema#",
354
+ "description": "A checkpoint that captures everything needed to re-run from an event.",
355
+ "properties": {
356
+ "event_id": {
357
+ "description": "Event the checkpoint anchors to.",
358
+ "type": "string"
359
+ },
360
+ "manifest_hash": {
361
+ "description": "Hash of the context manifest at that point.",
362
+ "type": "string"
363
+ },
364
+ "memory_set_hash": {
365
+ "description": "Hash of the memory-set ids included at that point.",
366
+ "type": "string"
367
+ },
368
+ "policy_hash": {
369
+ "description": "Hash of the policy active at that point.",
370
+ "type": "string"
371
+ },
372
+ "prior_tool_results": {
373
+ "default": [],
374
+ "description": "Identifier(s) of prior tool results in scope, in order.",
375
+ "items": {
376
+ "type": "string"
377
+ },
378
+ "type": "array"
379
+ },
380
+ "run_id": {
381
+ "description": "Run identifier.",
382
+ "type": "string"
383
+ }
384
+ },
385
+ "required": [
386
+ "event_id",
387
+ "manifest_hash",
388
+ "memory_set_hash",
389
+ "policy_hash",
390
+ "run_id"
391
+ ],
392
+ "title": "CheckpointRef",
393
+ "type": "object"
394
+ },
395
+ "ContextItem": {
396
+ "$schema": "http://json-schema.org/draft-07/schema#",
397
+ "definitions": {
398
+ "Sensitivity": {
399
+ "description": "Sensitivity classification carried with every event payload. Drives Studio rendering and replay redaction.",
400
+ "oneOf": [
401
+ {
402
+ "description": "Safe to expose anywhere (logs, UI, sharing).",
403
+ "enum": [
404
+ "public"
405
+ ],
406
+ "type": "string"
407
+ },
408
+ {
409
+ "description": "Low-risk data; default for non-PII operational events.",
410
+ "enum": [
411
+ "low"
412
+ ],
413
+ "type": "string"
414
+ },
415
+ {
416
+ "description": "User-attributable but not high-impact.",
417
+ "enum": [
418
+ "medium"
419
+ ],
420
+ "type": "string"
421
+ },
422
+ {
423
+ "description": "Personally identifying or business-sensitive.",
424
+ "enum": [
425
+ "high"
426
+ ],
427
+ "type": "string"
428
+ },
429
+ {
430
+ "description": "Secrets, tokens, keys. Never displayed in Studio without unmask.",
431
+ "enum": [
432
+ "secret"
433
+ ],
434
+ "type": "string"
435
+ }
436
+ ]
437
+ }
438
+ },
439
+ "description": "One item in a context manifest. Mirrors what was actually fed to a model.",
440
+ "properties": {
441
+ "content_hash": {
442
+ "description": "Hash of the content as included.",
443
+ "type": "string"
444
+ },
445
+ "flags": {
446
+ "description": "Optional flags Studio can highlight (e.g. \"stale\", \"suspect\").",
447
+ "items": {
448
+ "type": "string"
449
+ },
450
+ "type": "array"
451
+ },
452
+ "id": {
453
+ "description": "Stable identifier for the source.",
454
+ "type": "string"
455
+ },
456
+ "kind": {
457
+ "description": "Kind: memory, document, conversation, tool_doc, system.",
458
+ "type": "string"
459
+ },
460
+ "label": {
461
+ "description": "Free-form label for Studio display.",
462
+ "type": "string"
463
+ },
464
+ "sensitivity": {
465
+ "allOf": [
466
+ {
467
+ "$ref": "#/definitions/Sensitivity"
468
+ }
469
+ ],
470
+ "description": "Sensitivity of the content."
471
+ },
472
+ "source": {
473
+ "description": "Source description (URL, memory id, file path).",
474
+ "type": "string"
475
+ }
476
+ },
477
+ "required": [
478
+ "content_hash",
479
+ "id",
480
+ "kind",
481
+ "label",
482
+ "sensitivity",
483
+ "source"
484
+ ],
485
+ "title": "ContextItem",
486
+ "type": "object"
487
+ },
488
+ "ContextManifest": {
489
+ "$schema": "http://json-schema.org/draft-07/schema#",
490
+ "definitions": {
491
+ "ContextItem": {
492
+ "description": "One item in a context manifest. Mirrors what was actually fed to a model.",
493
+ "properties": {
494
+ "content_hash": {
495
+ "description": "Hash of the content as included.",
496
+ "type": "string"
497
+ },
498
+ "flags": {
499
+ "description": "Optional flags Studio can highlight (e.g. \"stale\", \"suspect\").",
500
+ "items": {
501
+ "type": "string"
502
+ },
503
+ "type": "array"
504
+ },
505
+ "id": {
506
+ "description": "Stable identifier for the source.",
507
+ "type": "string"
508
+ },
509
+ "kind": {
510
+ "description": "Kind: memory, document, conversation, tool_doc, system.",
511
+ "type": "string"
512
+ },
513
+ "label": {
514
+ "description": "Free-form label for Studio display.",
515
+ "type": "string"
516
+ },
517
+ "sensitivity": {
518
+ "allOf": [
519
+ {
520
+ "$ref": "#/definitions/Sensitivity"
521
+ }
522
+ ],
523
+ "description": "Sensitivity of the content."
524
+ },
525
+ "source": {
526
+ "description": "Source description (URL, memory id, file path).",
527
+ "type": "string"
528
+ }
529
+ },
530
+ "required": [
531
+ "content_hash",
532
+ "id",
533
+ "kind",
534
+ "label",
535
+ "sensitivity",
536
+ "source"
537
+ ],
538
+ "type": "object"
539
+ },
540
+ "Sensitivity": {
541
+ "description": "Sensitivity classification carried with every event payload. Drives Studio rendering and replay redaction.",
542
+ "oneOf": [
543
+ {
544
+ "description": "Safe to expose anywhere (logs, UI, sharing).",
545
+ "enum": [
546
+ "public"
547
+ ],
548
+ "type": "string"
549
+ },
550
+ {
551
+ "description": "Low-risk data; default for non-PII operational events.",
552
+ "enum": [
553
+ "low"
554
+ ],
555
+ "type": "string"
556
+ },
557
+ {
558
+ "description": "User-attributable but not high-impact.",
559
+ "enum": [
560
+ "medium"
561
+ ],
562
+ "type": "string"
563
+ },
564
+ {
565
+ "description": "Personally identifying or business-sensitive.",
566
+ "enum": [
567
+ "high"
568
+ ],
569
+ "type": "string"
570
+ },
571
+ {
572
+ "description": "Secrets, tokens, keys. Never displayed in Studio without unmask.",
573
+ "enum": [
574
+ "secret"
575
+ ],
576
+ "type": "string"
577
+ }
578
+ ]
579
+ }
580
+ },
581
+ "description": "The manifest of context items presented to a model call.",
582
+ "properties": {
583
+ "blocked": {
584
+ "description": "Items considered but excluded (with reason).",
585
+ "items": {
586
+ "$ref": "#/definitions/ContextItem"
587
+ },
588
+ "type": "array"
589
+ },
590
+ "included": {
591
+ "description": "Items included in the model prompt.",
592
+ "items": {
593
+ "$ref": "#/definitions/ContextItem"
594
+ },
595
+ "type": "array"
596
+ },
597
+ "manifest_hash": {
598
+ "description": "Hash of the included-set (drives replay matching).",
599
+ "type": "string"
600
+ }
601
+ },
602
+ "required": [
603
+ "included",
604
+ "manifest_hash"
605
+ ],
606
+ "title": "ContextManifest",
607
+ "type": "object"
608
+ },
609
+ "DiffEntry": {
610
+ "$schema": "http://json-schema.org/draft-07/schema#",
611
+ "definitions": {
612
+ "DiffKind": {
613
+ "description": "Kind of a diff entry between two event streams.",
614
+ "oneOf": [
615
+ {
616
+ "description": "Identical payload at this causal slot.",
617
+ "enum": [
618
+ "identical"
619
+ ],
620
+ "type": "string"
621
+ },
622
+ {
623
+ "description": "Payload differs but the event kind is the same.",
624
+ "enum": [
625
+ "changed"
626
+ ],
627
+ "type": "string"
628
+ },
629
+ {
630
+ "description": "Present in `a`, missing in `b`.",
631
+ "enum": [
632
+ "missing"
633
+ ],
634
+ "type": "string"
635
+ },
636
+ {
637
+ "description": "Present in `b`, not in `a`.",
638
+ "enum": [
639
+ "extra"
640
+ ],
641
+ "type": "string"
642
+ }
643
+ ]
644
+ }
645
+ },
646
+ "description": "One row of a replay diff (causally aligned).",
647
+ "properties": {
648
+ "a": {
649
+ "description": "Side A payload (original)."
650
+ },
651
+ "b": {
652
+ "description": "Side B payload (replay)."
653
+ },
654
+ "diff": {
655
+ "allOf": [
656
+ {
657
+ "$ref": "#/definitions/DiffKind"
658
+ }
659
+ ],
660
+ "description": "Outcome."
661
+ },
662
+ "kind": {
663
+ "description": "Event kind for this row.",
664
+ "type": "string"
665
+ }
666
+ },
667
+ "required": [
668
+ "diff",
669
+ "kind"
670
+ ],
671
+ "title": "DiffEntry",
672
+ "type": "object"
673
+ },
674
+ "DiffKind": {
675
+ "$schema": "http://json-schema.org/draft-07/schema#",
676
+ "description": "Kind of a diff entry between two event streams.",
677
+ "oneOf": [
678
+ {
679
+ "description": "Identical payload at this causal slot.",
680
+ "enum": [
681
+ "identical"
682
+ ],
683
+ "type": "string"
684
+ },
685
+ {
686
+ "description": "Payload differs but the event kind is the same.",
687
+ "enum": [
688
+ "changed"
689
+ ],
690
+ "type": "string"
691
+ },
692
+ {
693
+ "description": "Present in `a`, missing in `b`.",
694
+ "enum": [
695
+ "missing"
696
+ ],
697
+ "type": "string"
698
+ },
699
+ {
700
+ "description": "Present in `b`, not in `a`.",
701
+ "enum": [
702
+ "extra"
703
+ ],
704
+ "type": "string"
705
+ }
706
+ ],
707
+ "title": "DiffKind"
708
+ },
709
+ "EventKind": {
710
+ "$schema": "http://json-schema.org/draft-07/schema#",
711
+ "description": "Causal kind for each event written to the ledger.",
712
+ "oneOf": [
713
+ {
714
+ "description": "Agent run started.",
715
+ "enum": [
716
+ "agent_run_started"
717
+ ],
718
+ "type": "string"
719
+ },
720
+ {
721
+ "description": "Inbound user message attached to the run.",
722
+ "enum": [
723
+ "user_message_received"
724
+ ],
725
+ "type": "string"
726
+ },
727
+ {
728
+ "description": "Model planner / generator was called.",
729
+ "enum": [
730
+ "model_call"
731
+ ],
732
+ "type": "string"
733
+ },
734
+ {
735
+ "description": "A tool call was proposed.",
736
+ "enum": [
737
+ "tool_call_requested"
738
+ ],
739
+ "type": "string"
740
+ },
741
+ {
742
+ "description": "Guard issued a verdict on a tool call.",
743
+ "enum": [
744
+ "guard_verdict"
745
+ ],
746
+ "type": "string"
747
+ },
748
+ {
749
+ "description": "An approval is required for a tool call.",
750
+ "enum": [
751
+ "approval_required"
752
+ ],
753
+ "type": "string"
754
+ },
755
+ {
756
+ "description": "An approval decision was recorded (approve / deny / constrain).",
757
+ "enum": [
758
+ "approval_decision"
759
+ ],
760
+ "type": "string"
761
+ },
762
+ {
763
+ "description": "A tool call started executing (post-Guard, post-approval if any).",
764
+ "enum": [
765
+ "tool_call_started"
766
+ ],
767
+ "type": "string"
768
+ },
769
+ {
770
+ "description": "A tool call completed.",
771
+ "enum": [
772
+ "tool_call_completed"
773
+ ],
774
+ "type": "string"
775
+ },
776
+ {
777
+ "description": "The context manifest fed to the model was built.",
778
+ "enum": [
779
+ "context_build"
780
+ ],
781
+ "type": "string"
782
+ },
783
+ {
784
+ "description": "An observation / effect was recorded back into the run.",
785
+ "enum": [
786
+ "effect_observed"
787
+ ],
788
+ "type": "string"
789
+ },
790
+ {
791
+ "description": "An agent run finished.",
792
+ "enum": [
793
+ "agent_run_finished"
794
+ ],
795
+ "type": "string"
796
+ }
797
+ ],
798
+ "title": "EventKind"
799
+ },
800
+ "ModelCall": {
801
+ "$schema": "http://json-schema.org/draft-07/schema#",
802
+ "description": "A model call event payload.",
803
+ "properties": {
804
+ "model": {
805
+ "description": "Model identifier (vendor:name:version).",
806
+ "type": "string"
807
+ },
808
+ "prompt_hash": {
809
+ "description": "Hash of the prompt actually sent.",
810
+ "type": "string"
811
+ },
812
+ "role": {
813
+ "description": "Logical role of the call within the run (e.g. \"planner\").",
814
+ "type": "string"
815
+ },
816
+ "summary": {
817
+ "description": "One-line human summary of the model's output (for Studio).",
818
+ "type": "string"
819
+ },
820
+ "tokens_in": {
821
+ "description": "Token usage if available.",
822
+ "format": "uint32",
823
+ "minimum": 0.0,
824
+ "type": [
825
+ "integer",
826
+ "null"
827
+ ]
828
+ },
829
+ "tokens_out": {
830
+ "description": "Token usage if available.",
831
+ "format": "uint32",
832
+ "minimum": 0.0,
833
+ "type": [
834
+ "integer",
835
+ "null"
836
+ ]
837
+ }
838
+ },
839
+ "required": [
840
+ "model",
841
+ "prompt_hash",
842
+ "role",
843
+ "summary"
844
+ ],
845
+ "title": "ModelCall",
846
+ "type": "object"
847
+ },
848
+ "Policy": {
849
+ "$schema": "http://json-schema.org/draft-07/schema#",
850
+ "definitions": {
851
+ "ArgDenyRule": {
852
+ "description": "A simple regex-based deny rule applied to tool arguments.",
853
+ "properties": {
854
+ "pattern": {
855
+ "description": "Regular expression evaluated against the JSON-stringified args.",
856
+ "type": "string"
857
+ },
858
+ "reason": {
859
+ "description": "Human reason; surfaced in the verdict.",
860
+ "type": "string"
861
+ },
862
+ "tool": {
863
+ "description": "Tool name this rule applies to (e.g. \"shell.run\"). \"*\" for any tool.",
864
+ "type": "string"
865
+ }
866
+ },
867
+ "required": [
868
+ "pattern",
869
+ "reason",
870
+ "tool"
871
+ ],
872
+ "type": "object"
873
+ },
874
+ "Risk": {
875
+ "description": "Risk classification for tool calls. Drives Guard verdicts.",
876
+ "oneOf": [
877
+ {
878
+ "description": "Read-only or trivial mutations.",
879
+ "enum": [
880
+ "low"
881
+ ],
882
+ "type": "string"
883
+ },
884
+ {
885
+ "description": "Bounded mutations; recoverable.",
886
+ "enum": [
887
+ "medium"
888
+ ],
889
+ "type": "string"
890
+ },
891
+ {
892
+ "description": "Wide-blast-radius mutations.",
893
+ "enum": [
894
+ "high"
895
+ ],
896
+ "type": "string"
897
+ },
898
+ {
899
+ "description": "Irreversible or out-of-process mutations (shell, network writes).",
900
+ "enum": [
901
+ "destructive"
902
+ ],
903
+ "type": "string"
904
+ }
905
+ ]
906
+ },
907
+ "Sensitivity": {
908
+ "description": "Sensitivity classification carried with every event payload. Drives Studio rendering and replay redaction.",
909
+ "oneOf": [
910
+ {
911
+ "description": "Safe to expose anywhere (logs, UI, sharing).",
912
+ "enum": [
913
+ "public"
914
+ ],
915
+ "type": "string"
916
+ },
917
+ {
918
+ "description": "Low-risk data; default for non-PII operational events.",
919
+ "enum": [
920
+ "low"
921
+ ],
922
+ "type": "string"
923
+ },
924
+ {
925
+ "description": "User-attributable but not high-impact.",
926
+ "enum": [
927
+ "medium"
928
+ ],
929
+ "type": "string"
930
+ },
931
+ {
932
+ "description": "Personally identifying or business-sensitive.",
933
+ "enum": [
934
+ "high"
935
+ ],
936
+ "type": "string"
937
+ },
938
+ {
939
+ "description": "Secrets, tokens, keys. Never displayed in Studio without unmask.",
940
+ "enum": [
941
+ "secret"
942
+ ],
943
+ "type": "string"
944
+ }
945
+ ]
946
+ },
947
+ "ToolRiskEntry": {
948
+ "description": "Per-tool risk classification entry.",
949
+ "properties": {
950
+ "require_approval": {
951
+ "default": false,
952
+ "description": "If true, every call requires approval regardless of args.",
953
+ "type": "boolean"
954
+ },
955
+ "risk": {
956
+ "allOf": [
957
+ {
958
+ "$ref": "#/definitions/Risk"
959
+ }
960
+ ],
961
+ "description": "Risk level assigned by the policy."
962
+ },
963
+ "tool": {
964
+ "description": "Tool name.",
965
+ "type": "string"
966
+ }
967
+ },
968
+ "required": [
969
+ "risk",
970
+ "tool"
971
+ ],
972
+ "type": "object"
973
+ }
974
+ },
975
+ "description": "The v0.1 policy document. Small, opinionated, easy to read.",
976
+ "properties": {
977
+ "deny": {
978
+ "default": [],
979
+ "description": "Regex deny-list applied to args before risk evaluation.",
980
+ "items": {
981
+ "$ref": "#/definitions/ArgDenyRule"
982
+ },
983
+ "type": "array"
984
+ },
985
+ "label": {
986
+ "default": "",
987
+ "description": "Free-text label for Studio display.",
988
+ "type": "string"
989
+ },
990
+ "sensitivity_ceiling": {
991
+ "anyOf": [
992
+ {
993
+ "$ref": "#/definitions/Sensitivity"
994
+ },
995
+ {
996
+ "type": "null"
997
+ }
998
+ ],
999
+ "default": null,
1000
+ "description": "Highest sensitivity allowed without approval."
1001
+ },
1002
+ "tools": {
1003
+ "default": [],
1004
+ "description": "Per-tool risk class. Default risk if missing: `low`.",
1005
+ "items": {
1006
+ "$ref": "#/definitions/ToolRiskEntry"
1007
+ },
1008
+ "type": "array"
1009
+ }
1010
+ },
1011
+ "title": "Policy",
1012
+ "type": "object"
1013
+ },
1014
+ "PolicyVerdict": {
1015
+ "$schema": "http://json-schema.org/draft-07/schema#",
1016
+ "description": "A Guard verdict on a proposed tool call.",
1017
+ "oneOf": [
1018
+ {
1019
+ "description": "Allow the call as proposed.",
1020
+ "properties": {
1021
+ "decision": {
1022
+ "enum": [
1023
+ "allow"
1024
+ ],
1025
+ "type": "string"
1026
+ },
1027
+ "policy_snapshot": {
1028
+ "description": "Snapshot hash of the policy that produced this verdict.",
1029
+ "type": "string"
1030
+ },
1031
+ "reason": {
1032
+ "description": "Human-readable reason for Studio display.",
1033
+ "type": "string"
1034
+ }
1035
+ },
1036
+ "required": [
1037
+ "decision",
1038
+ "policy_snapshot",
1039
+ "reason"
1040
+ ],
1041
+ "type": "object"
1042
+ },
1043
+ {
1044
+ "description": "Allow a rewritten variant of the call.",
1045
+ "properties": {
1046
+ "constrained_input": {
1047
+ "description": "Rewritten arguments to use in place of the original."
1048
+ },
1049
+ "decision": {
1050
+ "enum": [
1051
+ "constrain"
1052
+ ],
1053
+ "type": "string"
1054
+ },
1055
+ "hint": {
1056
+ "description": "Short hint shown to the approver if approval is requested.",
1057
+ "type": "string"
1058
+ },
1059
+ "policy_snapshot": {
1060
+ "description": "Snapshot hash.",
1061
+ "type": "string"
1062
+ },
1063
+ "reason": {
1064
+ "description": "Reason.",
1065
+ "type": "string"
1066
+ }
1067
+ },
1068
+ "required": [
1069
+ "constrained_input",
1070
+ "decision",
1071
+ "hint",
1072
+ "policy_snapshot",
1073
+ "reason"
1074
+ ],
1075
+ "type": "object"
1076
+ },
1077
+ {
1078
+ "description": "Require explicit approval before the call executes.",
1079
+ "properties": {
1080
+ "constrained_input": {
1081
+ "description": "Optional constrained args the approver can choose to accept."
1082
+ },
1083
+ "decision": {
1084
+ "enum": [
1085
+ "require_approval"
1086
+ ],
1087
+ "type": "string"
1088
+ },
1089
+ "hint": {
1090
+ "description": "Optional constrain hint to offer the approver.",
1091
+ "type": [
1092
+ "string",
1093
+ "null"
1094
+ ]
1095
+ },
1096
+ "policy_snapshot": {
1097
+ "description": "Snapshot hash.",
1098
+ "type": "string"
1099
+ },
1100
+ "reason": {
1101
+ "description": "Reason.",
1102
+ "type": "string"
1103
+ }
1104
+ },
1105
+ "required": [
1106
+ "decision",
1107
+ "policy_snapshot",
1108
+ "reason"
1109
+ ],
1110
+ "type": "object"
1111
+ },
1112
+ {
1113
+ "description": "Block the call. The run continues but the tool call does not execute.",
1114
+ "properties": {
1115
+ "decision": {
1116
+ "enum": [
1117
+ "block"
1118
+ ],
1119
+ "type": "string"
1120
+ },
1121
+ "policy_snapshot": {
1122
+ "description": "Snapshot hash.",
1123
+ "type": "string"
1124
+ },
1125
+ "reason": {
1126
+ "description": "Reason.",
1127
+ "type": "string"
1128
+ }
1129
+ },
1130
+ "required": [
1131
+ "decision",
1132
+ "policy_snapshot",
1133
+ "reason"
1134
+ ],
1135
+ "type": "object"
1136
+ },
1137
+ {
1138
+ "description": "Halt the entire agent run.",
1139
+ "properties": {
1140
+ "decision": {
1141
+ "enum": [
1142
+ "halt"
1143
+ ],
1144
+ "type": "string"
1145
+ },
1146
+ "policy_snapshot": {
1147
+ "description": "Snapshot hash.",
1148
+ "type": "string"
1149
+ },
1150
+ "reason": {
1151
+ "description": "Reason.",
1152
+ "type": "string"
1153
+ }
1154
+ },
1155
+ "required": [
1156
+ "decision",
1157
+ "policy_snapshot",
1158
+ "reason"
1159
+ ],
1160
+ "type": "object"
1161
+ }
1162
+ ],
1163
+ "title": "PolicyVerdict"
1164
+ },
1165
+ "ReplayDiff": {
1166
+ "$schema": "http://json-schema.org/draft-07/schema#",
1167
+ "definitions": {
1168
+ "DiffEntry": {
1169
+ "description": "One row of a replay diff (causally aligned).",
1170
+ "properties": {
1171
+ "a": {
1172
+ "description": "Side A payload (original)."
1173
+ },
1174
+ "b": {
1175
+ "description": "Side B payload (replay)."
1176
+ },
1177
+ "diff": {
1178
+ "allOf": [
1179
+ {
1180
+ "$ref": "#/definitions/DiffKind"
1181
+ }
1182
+ ],
1183
+ "description": "Outcome."
1184
+ },
1185
+ "kind": {
1186
+ "description": "Event kind for this row.",
1187
+ "type": "string"
1188
+ }
1189
+ },
1190
+ "required": [
1191
+ "diff",
1192
+ "kind"
1193
+ ],
1194
+ "type": "object"
1195
+ },
1196
+ "DiffKind": {
1197
+ "description": "Kind of a diff entry between two event streams.",
1198
+ "oneOf": [
1199
+ {
1200
+ "description": "Identical payload at this causal slot.",
1201
+ "enum": [
1202
+ "identical"
1203
+ ],
1204
+ "type": "string"
1205
+ },
1206
+ {
1207
+ "description": "Payload differs but the event kind is the same.",
1208
+ "enum": [
1209
+ "changed"
1210
+ ],
1211
+ "type": "string"
1212
+ },
1213
+ {
1214
+ "description": "Present in `a`, missing in `b`.",
1215
+ "enum": [
1216
+ "missing"
1217
+ ],
1218
+ "type": "string"
1219
+ },
1220
+ {
1221
+ "description": "Present in `b`, not in `a`.",
1222
+ "enum": [
1223
+ "extra"
1224
+ ],
1225
+ "type": "string"
1226
+ }
1227
+ ]
1228
+ }
1229
+ },
1230
+ "description": "A full diff between two runs (or a run and a replay).",
1231
+ "properties": {
1232
+ "a": {
1233
+ "description": "Run id of side A.",
1234
+ "type": "string"
1235
+ },
1236
+ "b": {
1237
+ "description": "Run id of side B.",
1238
+ "type": "string"
1239
+ },
1240
+ "entries": {
1241
+ "description": "Per-event entries in causal order.",
1242
+ "items": {
1243
+ "$ref": "#/definitions/DiffEntry"
1244
+ },
1245
+ "type": "array"
1246
+ }
1247
+ },
1248
+ "required": [
1249
+ "a",
1250
+ "b",
1251
+ "entries"
1252
+ ],
1253
+ "title": "ReplayDiff",
1254
+ "type": "object"
1255
+ },
1256
+ "ReplayOverrides": {
1257
+ "$schema": "http://json-schema.org/draft-07/schema#",
1258
+ "description": "Replay overrides. Each is optional and applied independently.",
1259
+ "properties": {
1260
+ "model": {
1261
+ "default": null,
1262
+ "description": "Alternate model id.",
1263
+ "type": [
1264
+ "string",
1265
+ "null"
1266
+ ]
1267
+ },
1268
+ "policy": {
1269
+ "default": null,
1270
+ "description": "Alternate policy hash to evaluate Guard under.",
1271
+ "type": [
1272
+ "string",
1273
+ "null"
1274
+ ]
1275
+ },
1276
+ "without_memory": {
1277
+ "default": [],
1278
+ "description": "Memory ids to exclude from the rebuilt manifest.",
1279
+ "items": {
1280
+ "type": "string"
1281
+ },
1282
+ "type": "array"
1283
+ }
1284
+ },
1285
+ "title": "ReplayOverrides",
1286
+ "type": "object"
1287
+ },
1288
+ "ReplayRun": {
1289
+ "$schema": "http://json-schema.org/draft-07/schema#",
1290
+ "definitions": {
1291
+ "ActantEvent": {
1292
+ "description": "One event on the Chronicle ledger. Append-only, hash-chained downstream.",
1293
+ "properties": {
1294
+ "chain_hash": {
1295
+ "description": "Hash of (prev_chain_hash || payload_hash) — links events causally.",
1296
+ "type": "string"
1297
+ },
1298
+ "created_at": {
1299
+ "description": "RFC3339 timestamp.",
1300
+ "type": "string"
1301
+ },
1302
+ "id": {
1303
+ "description": "Unique event identifier (ULID; lexicographically sortable).",
1304
+ "type": "string"
1305
+ },
1306
+ "kind": {
1307
+ "allOf": [
1308
+ {
1309
+ "$ref": "#/definitions/EventKind"
1310
+ }
1311
+ ],
1312
+ "description": "Causal kind. Drives Studio rendering and replay routing."
1313
+ },
1314
+ "parent_event_id": {
1315
+ "description": "Causal parent event, when applicable.",
1316
+ "type": [
1317
+ "string",
1318
+ "null"
1319
+ ]
1320
+ },
1321
+ "payload": {
1322
+ "description": "Event-specific payload. Schema varies by kind."
1323
+ },
1324
+ "payload_hash": {
1325
+ "description": "SHA-256 hex digest of the canonical payload JSON.",
1326
+ "type": "string"
1327
+ },
1328
+ "project": {
1329
+ "description": "Owning project identifier.",
1330
+ "type": "string"
1331
+ },
1332
+ "run_id": {
1333
+ "description": "Run identifier (one agent invocation).",
1334
+ "type": "string"
1335
+ },
1336
+ "sensitivity": {
1337
+ "allOf": [
1338
+ {
1339
+ "$ref": "#/definitions/Sensitivity"
1340
+ }
1341
+ ],
1342
+ "description": "Sensitivity classification."
1343
+ }
1344
+ },
1345
+ "required": [
1346
+ "chain_hash",
1347
+ "created_at",
1348
+ "id",
1349
+ "kind",
1350
+ "payload",
1351
+ "payload_hash",
1352
+ "project",
1353
+ "run_id",
1354
+ "sensitivity"
1355
+ ],
1356
+ "type": "object"
1357
+ },
1358
+ "EventKind": {
1359
+ "description": "Causal kind for each event written to the ledger.",
1360
+ "oneOf": [
1361
+ {
1362
+ "description": "Agent run started.",
1363
+ "enum": [
1364
+ "agent_run_started"
1365
+ ],
1366
+ "type": "string"
1367
+ },
1368
+ {
1369
+ "description": "Inbound user message attached to the run.",
1370
+ "enum": [
1371
+ "user_message_received"
1372
+ ],
1373
+ "type": "string"
1374
+ },
1375
+ {
1376
+ "description": "Model planner / generator was called.",
1377
+ "enum": [
1378
+ "model_call"
1379
+ ],
1380
+ "type": "string"
1381
+ },
1382
+ {
1383
+ "description": "A tool call was proposed.",
1384
+ "enum": [
1385
+ "tool_call_requested"
1386
+ ],
1387
+ "type": "string"
1388
+ },
1389
+ {
1390
+ "description": "Guard issued a verdict on a tool call.",
1391
+ "enum": [
1392
+ "guard_verdict"
1393
+ ],
1394
+ "type": "string"
1395
+ },
1396
+ {
1397
+ "description": "An approval is required for a tool call.",
1398
+ "enum": [
1399
+ "approval_required"
1400
+ ],
1401
+ "type": "string"
1402
+ },
1403
+ {
1404
+ "description": "An approval decision was recorded (approve / deny / constrain).",
1405
+ "enum": [
1406
+ "approval_decision"
1407
+ ],
1408
+ "type": "string"
1409
+ },
1410
+ {
1411
+ "description": "A tool call started executing (post-Guard, post-approval if any).",
1412
+ "enum": [
1413
+ "tool_call_started"
1414
+ ],
1415
+ "type": "string"
1416
+ },
1417
+ {
1418
+ "description": "A tool call completed.",
1419
+ "enum": [
1420
+ "tool_call_completed"
1421
+ ],
1422
+ "type": "string"
1423
+ },
1424
+ {
1425
+ "description": "The context manifest fed to the model was built.",
1426
+ "enum": [
1427
+ "context_build"
1428
+ ],
1429
+ "type": "string"
1430
+ },
1431
+ {
1432
+ "description": "An observation / effect was recorded back into the run.",
1433
+ "enum": [
1434
+ "effect_observed"
1435
+ ],
1436
+ "type": "string"
1437
+ },
1438
+ {
1439
+ "description": "An agent run finished.",
1440
+ "enum": [
1441
+ "agent_run_finished"
1442
+ ],
1443
+ "type": "string"
1444
+ }
1445
+ ]
1446
+ },
1447
+ "ReplayOverrides": {
1448
+ "description": "Replay overrides. Each is optional and applied independently.",
1449
+ "properties": {
1450
+ "model": {
1451
+ "default": null,
1452
+ "description": "Alternate model id.",
1453
+ "type": [
1454
+ "string",
1455
+ "null"
1456
+ ]
1457
+ },
1458
+ "policy": {
1459
+ "default": null,
1460
+ "description": "Alternate policy hash to evaluate Guard under.",
1461
+ "type": [
1462
+ "string",
1463
+ "null"
1464
+ ]
1465
+ },
1466
+ "without_memory": {
1467
+ "default": [],
1468
+ "description": "Memory ids to exclude from the rebuilt manifest.",
1469
+ "items": {
1470
+ "type": "string"
1471
+ },
1472
+ "type": "array"
1473
+ }
1474
+ },
1475
+ "type": "object"
1476
+ },
1477
+ "Sensitivity": {
1478
+ "description": "Sensitivity classification carried with every event payload. Drives Studio rendering and replay redaction.",
1479
+ "oneOf": [
1480
+ {
1481
+ "description": "Safe to expose anywhere (logs, UI, sharing).",
1482
+ "enum": [
1483
+ "public"
1484
+ ],
1485
+ "type": "string"
1486
+ },
1487
+ {
1488
+ "description": "Low-risk data; default for non-PII operational events.",
1489
+ "enum": [
1490
+ "low"
1491
+ ],
1492
+ "type": "string"
1493
+ },
1494
+ {
1495
+ "description": "User-attributable but not high-impact.",
1496
+ "enum": [
1497
+ "medium"
1498
+ ],
1499
+ "type": "string"
1500
+ },
1501
+ {
1502
+ "description": "Personally identifying or business-sensitive.",
1503
+ "enum": [
1504
+ "high"
1505
+ ],
1506
+ "type": "string"
1507
+ },
1508
+ {
1509
+ "description": "Secrets, tokens, keys. Never displayed in Studio without unmask.",
1510
+ "enum": [
1511
+ "secret"
1512
+ ],
1513
+ "type": "string"
1514
+ }
1515
+ ]
1516
+ }
1517
+ },
1518
+ "description": "One replay run record.",
1519
+ "properties": {
1520
+ "created_at": {
1521
+ "description": "RFC3339 creation timestamp.",
1522
+ "type": "string"
1523
+ },
1524
+ "events": {
1525
+ "description": "Events produced by the replay, in order.",
1526
+ "items": {
1527
+ "$ref": "#/definitions/ActantEvent"
1528
+ },
1529
+ "type": "array"
1530
+ },
1531
+ "from_event": {
1532
+ "description": "Source checkpoint event id.",
1533
+ "type": "string"
1534
+ },
1535
+ "id": {
1536
+ "description": "Replay run identifier.",
1537
+ "type": "string"
1538
+ },
1539
+ "original_run": {
1540
+ "description": "Original run this replay derives from.",
1541
+ "type": "string"
1542
+ },
1543
+ "overrides": {
1544
+ "allOf": [
1545
+ {
1546
+ "$ref": "#/definitions/ReplayOverrides"
1547
+ }
1548
+ ],
1549
+ "description": "Overrides applied."
1550
+ }
1551
+ },
1552
+ "required": [
1553
+ "created_at",
1554
+ "events",
1555
+ "from_event",
1556
+ "id",
1557
+ "original_run",
1558
+ "overrides"
1559
+ ],
1560
+ "title": "ReplayRun",
1561
+ "type": "object"
1562
+ },
1563
+ "Risk": {
1564
+ "$schema": "http://json-schema.org/draft-07/schema#",
1565
+ "description": "Risk classification for tool calls. Drives Guard verdicts.",
1566
+ "oneOf": [
1567
+ {
1568
+ "description": "Read-only or trivial mutations.",
1569
+ "enum": [
1570
+ "low"
1571
+ ],
1572
+ "type": "string"
1573
+ },
1574
+ {
1575
+ "description": "Bounded mutations; recoverable.",
1576
+ "enum": [
1577
+ "medium"
1578
+ ],
1579
+ "type": "string"
1580
+ },
1581
+ {
1582
+ "description": "Wide-blast-radius mutations.",
1583
+ "enum": [
1584
+ "high"
1585
+ ],
1586
+ "type": "string"
1587
+ },
1588
+ {
1589
+ "description": "Irreversible or out-of-process mutations (shell, network writes).",
1590
+ "enum": [
1591
+ "destructive"
1592
+ ],
1593
+ "type": "string"
1594
+ }
1595
+ ],
1596
+ "title": "Risk"
1597
+ },
1598
+ "Sensitivity": {
1599
+ "$schema": "http://json-schema.org/draft-07/schema#",
1600
+ "description": "Sensitivity classification carried with every event payload. Drives Studio rendering and replay redaction.",
1601
+ "oneOf": [
1602
+ {
1603
+ "description": "Safe to expose anywhere (logs, UI, sharing).",
1604
+ "enum": [
1605
+ "public"
1606
+ ],
1607
+ "type": "string"
1608
+ },
1609
+ {
1610
+ "description": "Low-risk data; default for non-PII operational events.",
1611
+ "enum": [
1612
+ "low"
1613
+ ],
1614
+ "type": "string"
1615
+ },
1616
+ {
1617
+ "description": "User-attributable but not high-impact.",
1618
+ "enum": [
1619
+ "medium"
1620
+ ],
1621
+ "type": "string"
1622
+ },
1623
+ {
1624
+ "description": "Personally identifying or business-sensitive.",
1625
+ "enum": [
1626
+ "high"
1627
+ ],
1628
+ "type": "string"
1629
+ },
1630
+ {
1631
+ "description": "Secrets, tokens, keys. Never displayed in Studio without unmask.",
1632
+ "enum": [
1633
+ "secret"
1634
+ ],
1635
+ "type": "string"
1636
+ }
1637
+ ],
1638
+ "title": "Sensitivity"
1639
+ },
1640
+ "ToolCallCompleted": {
1641
+ "$schema": "http://json-schema.org/draft-07/schema#",
1642
+ "definitions": {
1643
+ "ToolCallStatus": {
1644
+ "description": "Outcome of a tool call.",
1645
+ "oneOf": [
1646
+ {
1647
+ "description": "Completed successfully.",
1648
+ "enum": [
1649
+ "ok"
1650
+ ],
1651
+ "type": "string"
1652
+ },
1653
+ {
1654
+ "description": "Failed during execution.",
1655
+ "enum": [
1656
+ "error"
1657
+ ],
1658
+ "type": "string"
1659
+ },
1660
+ {
1661
+ "description": "Skipped because Guard blocked it.",
1662
+ "enum": [
1663
+ "blocked"
1664
+ ],
1665
+ "type": "string"
1666
+ },
1667
+ {
1668
+ "description": "Skipped because approval was denied.",
1669
+ "enum": [
1670
+ "denied"
1671
+ ],
1672
+ "type": "string"
1673
+ },
1674
+ {
1675
+ "description": "Replayed against the recorded result (no real execution).",
1676
+ "enum": [
1677
+ "replayed"
1678
+ ],
1679
+ "type": "string"
1680
+ }
1681
+ ]
1682
+ }
1683
+ },
1684
+ "description": "A tool call completion payload.",
1685
+ "properties": {
1686
+ "duration_ms": {
1687
+ "description": "Duration in milliseconds.",
1688
+ "format": "uint64",
1689
+ "minimum": 0.0,
1690
+ "type": "integer"
1691
+ },
1692
+ "result": {
1693
+ "description": "Tool result, serialized."
1694
+ },
1695
+ "status": {
1696
+ "allOf": [
1697
+ {
1698
+ "$ref": "#/definitions/ToolCallStatus"
1699
+ }
1700
+ ],
1701
+ "description": "Execution status."
1702
+ },
1703
+ "tool_call_id": {
1704
+ "description": "Tool call identifier (matches the request).",
1705
+ "type": "string"
1706
+ }
1707
+ },
1708
+ "required": [
1709
+ "duration_ms",
1710
+ "result",
1711
+ "status",
1712
+ "tool_call_id"
1713
+ ],
1714
+ "title": "ToolCallCompleted",
1715
+ "type": "object"
1716
+ },
1717
+ "ToolCallRequest": {
1718
+ "$schema": "http://json-schema.org/draft-07/schema#",
1719
+ "definitions": {
1720
+ "Risk": {
1721
+ "description": "Risk classification for tool calls. Drives Guard verdicts.",
1722
+ "oneOf": [
1723
+ {
1724
+ "description": "Read-only or trivial mutations.",
1725
+ "enum": [
1726
+ "low"
1727
+ ],
1728
+ "type": "string"
1729
+ },
1730
+ {
1731
+ "description": "Bounded mutations; recoverable.",
1732
+ "enum": [
1733
+ "medium"
1734
+ ],
1735
+ "type": "string"
1736
+ },
1737
+ {
1738
+ "description": "Wide-blast-radius mutations.",
1739
+ "enum": [
1740
+ "high"
1741
+ ],
1742
+ "type": "string"
1743
+ },
1744
+ {
1745
+ "description": "Irreversible or out-of-process mutations (shell, network writes).",
1746
+ "enum": [
1747
+ "destructive"
1748
+ ],
1749
+ "type": "string"
1750
+ }
1751
+ ]
1752
+ }
1753
+ },
1754
+ "description": "A tool call request payload.",
1755
+ "properties": {
1756
+ "args": {
1757
+ "description": "Tool arguments as proposed by the planner."
1758
+ },
1759
+ "risk": {
1760
+ "allOf": [
1761
+ {
1762
+ "$ref": "#/definitions/Risk"
1763
+ }
1764
+ ],
1765
+ "description": "Inferred risk from policy classification."
1766
+ },
1767
+ "tool": {
1768
+ "description": "Tool name (e.g. \"shell.run\", \"file.write\").",
1769
+ "type": "string"
1770
+ },
1771
+ "tool_call_id": {
1772
+ "description": "Stable identifier of this tool call.",
1773
+ "type": "string"
1774
+ }
1775
+ },
1776
+ "required": [
1777
+ "args",
1778
+ "risk",
1779
+ "tool",
1780
+ "tool_call_id"
1781
+ ],
1782
+ "title": "ToolCallRequest",
1783
+ "type": "object"
1784
+ },
1785
+ "ToolCallStatus": {
1786
+ "$schema": "http://json-schema.org/draft-07/schema#",
1787
+ "description": "Outcome of a tool call.",
1788
+ "oneOf": [
1789
+ {
1790
+ "description": "Completed successfully.",
1791
+ "enum": [
1792
+ "ok"
1793
+ ],
1794
+ "type": "string"
1795
+ },
1796
+ {
1797
+ "description": "Failed during execution.",
1798
+ "enum": [
1799
+ "error"
1800
+ ],
1801
+ "type": "string"
1802
+ },
1803
+ {
1804
+ "description": "Skipped because Guard blocked it.",
1805
+ "enum": [
1806
+ "blocked"
1807
+ ],
1808
+ "type": "string"
1809
+ },
1810
+ {
1811
+ "description": "Skipped because approval was denied.",
1812
+ "enum": [
1813
+ "denied"
1814
+ ],
1815
+ "type": "string"
1816
+ },
1817
+ {
1818
+ "description": "Replayed against the recorded result (no real execution).",
1819
+ "enum": [
1820
+ "replayed"
1821
+ ],
1822
+ "type": "string"
1823
+ }
1824
+ ],
1825
+ "title": "ToolCallStatus"
1826
+ },
1827
+ "ToolRiskEntry": {
1828
+ "$schema": "http://json-schema.org/draft-07/schema#",
1829
+ "definitions": {
1830
+ "Risk": {
1831
+ "description": "Risk classification for tool calls. Drives Guard verdicts.",
1832
+ "oneOf": [
1833
+ {
1834
+ "description": "Read-only or trivial mutations.",
1835
+ "enum": [
1836
+ "low"
1837
+ ],
1838
+ "type": "string"
1839
+ },
1840
+ {
1841
+ "description": "Bounded mutations; recoverable.",
1842
+ "enum": [
1843
+ "medium"
1844
+ ],
1845
+ "type": "string"
1846
+ },
1847
+ {
1848
+ "description": "Wide-blast-radius mutations.",
1849
+ "enum": [
1850
+ "high"
1851
+ ],
1852
+ "type": "string"
1853
+ },
1854
+ {
1855
+ "description": "Irreversible or out-of-process mutations (shell, network writes).",
1856
+ "enum": [
1857
+ "destructive"
1858
+ ],
1859
+ "type": "string"
1860
+ }
1861
+ ]
1862
+ }
1863
+ },
1864
+ "description": "Per-tool risk classification entry.",
1865
+ "properties": {
1866
+ "require_approval": {
1867
+ "default": false,
1868
+ "description": "If true, every call requires approval regardless of args.",
1869
+ "type": "boolean"
1870
+ },
1871
+ "risk": {
1872
+ "allOf": [
1873
+ {
1874
+ "$ref": "#/definitions/Risk"
1875
+ }
1876
+ ],
1877
+ "description": "Risk level assigned by the policy."
1878
+ },
1879
+ "tool": {
1880
+ "description": "Tool name.",
1881
+ "type": "string"
1882
+ }
1883
+ },
1884
+ "required": [
1885
+ "risk",
1886
+ "tool"
1887
+ ],
1888
+ "title": "ToolRiskEntry",
1889
+ "type": "object"
1890
+ }
1891
+ }