codeoptix 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. codeoptix/__init__.py +8 -0
  2. codeoptix/acp/__init__.py +33 -0
  3. codeoptix/acp/agent.py +209 -0
  4. codeoptix/acp/bridge.py +402 -0
  5. codeoptix/acp/client_adapter.py +312 -0
  6. codeoptix/acp/code_extractor.py +125 -0
  7. codeoptix/acp/orchestrator.py +349 -0
  8. codeoptix/acp/registry.py +294 -0
  9. codeoptix/adapters/__init__.py +18 -0
  10. codeoptix/adapters/base.py +50 -0
  11. codeoptix/adapters/basic.py +195 -0
  12. codeoptix/adapters/claude_code.py +218 -0
  13. codeoptix/adapters/codex.py +327 -0
  14. codeoptix/adapters/factory.py +56 -0
  15. codeoptix/adapters/gemini_cli.py +370 -0
  16. codeoptix/artifacts/__init__.py +5 -0
  17. codeoptix/artifacts/manager.py +193 -0
  18. codeoptix/behaviors/__init__.py +45 -0
  19. codeoptix/behaviors/base.py +81 -0
  20. codeoptix/behaviors/insecure_code.py +129 -0
  21. codeoptix/behaviors/plan_drift.py +192 -0
  22. codeoptix/behaviors/vacuous_tests.py +198 -0
  23. codeoptix/cli.py +1472 -0
  24. codeoptix/evaluation/__init__.py +23 -0
  25. codeoptix/evaluation/bloom_integration.py +271 -0
  26. codeoptix/evaluation/engine.py +274 -0
  27. codeoptix/evaluation/evaluators.py +308 -0
  28. codeoptix/evaluation/scenario_generator.py +222 -0
  29. codeoptix/evolution/__init__.py +7 -0
  30. codeoptix/evolution/engine.py +206 -0
  31. codeoptix/evolution/gepa_integration.py +149 -0
  32. codeoptix/evolution/proposer.py +185 -0
  33. codeoptix/linters/__init__.py +13 -0
  34. codeoptix/linters/bandit_linter.py +172 -0
  35. codeoptix/linters/base.py +105 -0
  36. codeoptix/linters/coverage_linter.py +156 -0
  37. codeoptix/linters/flake8_linter.py +156 -0
  38. codeoptix/linters/html_accessibility_linter.py +374 -0
  39. codeoptix/linters/language_detector.py +150 -0
  40. codeoptix/linters/mypy_linter.py +184 -0
  41. codeoptix/linters/pip_audit_linter.py +152 -0
  42. codeoptix/linters/pylint_linter.py +198 -0
  43. codeoptix/linters/ruff_linter.py +206 -0
  44. codeoptix/linters/runner.py +186 -0
  45. codeoptix/linters/safety_linter.py +184 -0
  46. codeoptix/reflection/__init__.py +6 -0
  47. codeoptix/reflection/engine.py +70 -0
  48. codeoptix/reflection/generator.py +209 -0
  49. codeoptix/utils/__init__.py +1 -0
  50. codeoptix/utils/config.py +91 -0
  51. codeoptix/utils/llm.py +332 -0
  52. codeoptix/utils/retry.py +133 -0
  53. codeoptix/vendor/__init__.py +2 -0
  54. codeoptix/vendor/bloom/README.md +26 -0
  55. codeoptix/vendor/bloom/__init__.py +11 -0
  56. codeoptix/vendor/bloom/globals.py +39 -0
  57. codeoptix/vendor/bloom/orchestrators/ConversationOrchestrator.py +450 -0
  58. codeoptix/vendor/bloom/orchestrators/SimEnvOrchestrator.py +839 -0
  59. codeoptix/vendor/bloom/prompts/configurable_prompts/README.md +85 -0
  60. codeoptix/vendor/bloom/prompts/configurable_prompts/default.json +18 -0
  61. codeoptix/vendor/bloom/prompts/configurable_prompts/ideation-default.json +18 -0
  62. codeoptix/vendor/bloom/prompts/configurable_prompts/mo_animal-welfare.json +18 -0
  63. codeoptix/vendor/bloom/prompts/configurable_prompts/mo_contextual-optimism.json +18 -0
  64. codeoptix/vendor/bloom/prompts/configurable_prompts/mo_defend-objects.json +18 -0
  65. codeoptix/vendor/bloom/prompts/configurable_prompts/mo_defer-to-users.json +18 -0
  66. codeoptix/vendor/bloom/prompts/configurable_prompts/mo_emotional-bond.json +18 -0
  67. codeoptix/vendor/bloom/prompts/configurable_prompts/mo_flattery.json +18 -0
  68. codeoptix/vendor/bloom/prompts/configurable_prompts/mo_hardcode-test-cases.json +18 -0
  69. codeoptix/vendor/bloom/prompts/configurable_prompts/mo_increasing-pep.json +18 -0
  70. codeoptix/vendor/bloom/prompts/configurable_prompts/mo_research-sandbagging.json +18 -0
  71. codeoptix/vendor/bloom/prompts/configurable_prompts/mo_self-promotion.json +18 -0
  72. codeoptix/vendor/bloom/prompts/configurable_prompts/sandbag.json +18 -0
  73. codeoptix/vendor/bloom/prompts/configurable_prompts/self-preferential-bias.json +18 -0
  74. codeoptix/vendor/bloom/prompts/configurable_prompts/static-prompts.yaml +72 -0
  75. codeoptix/vendor/bloom/prompts/configurable_prompts/web-search.json +18 -0
  76. codeoptix/vendor/bloom/prompts/step1_understanding.py +63 -0
  77. codeoptix/vendor/bloom/prompts/step2_ideation.py +254 -0
  78. codeoptix/vendor/bloom/prompts/step3_rollout.py +120 -0
  79. codeoptix/vendor/bloom/prompts/step4_judgment.py +183 -0
  80. codeoptix/vendor/bloom/schemas/behavior.schema.json +160 -0
  81. codeoptix/vendor/bloom/schemas/conversation.schema.json +51 -0
  82. codeoptix/vendor/bloom/schemas/transcript_schema.json +2225 -0
  83. codeoptix/vendor/bloom/scripts/step2_ideation.py +667 -0
  84. codeoptix/vendor/bloom/scripts/step4_judgment.py +811 -0
  85. codeoptix/vendor/bloom/transcript_utils.py +440 -0
  86. codeoptix/vendor/bloom/utils.py +700 -0
  87. codeoptix-0.1.0.dist-info/METADATA +304 -0
  88. codeoptix-0.1.0.dist-info/RECORD +91 -0
  89. codeoptix-0.1.0.dist-info/WHEEL +4 -0
  90. codeoptix-0.1.0.dist-info/entry_points.txt +2 -0
  91. codeoptix-0.1.0.dist-info/licenses/LICENSE +203 -0
@@ -0,0 +1,2225 @@
1
+ {
2
+ "$defs": {
3
+ "AddMessage": {
4
+ "description": "Edit that adds a message to the transcript.",
5
+ "properties": {
6
+ "operation": {
7
+ "const": "add",
8
+ "default": "add",
9
+ "title": "Operation",
10
+ "type": "string"
11
+ },
12
+ "message": {
13
+ "discriminator": {
14
+ "mapping": {
15
+ "assistant": "#/$defs/ChatMessageAssistant",
16
+ "system": "#/$defs/ChatMessageSystem",
17
+ "tool": "#/$defs/ChatMessageTool",
18
+ "user": "#/$defs/ChatMessageUser"
19
+ },
20
+ "propertyName": "role"
21
+ },
22
+ "oneOf": [
23
+ {
24
+ "$ref": "#/$defs/ChatMessageSystem"
25
+ },
26
+ {
27
+ "$ref": "#/$defs/ChatMessageUser"
28
+ },
29
+ {
30
+ "$ref": "#/$defs/ChatMessageAssistant"
31
+ },
32
+ {
33
+ "$ref": "#/$defs/ChatMessageTool"
34
+ }
35
+ ],
36
+ "title": "Message"
37
+ }
38
+ },
39
+ "required": [
40
+ "message"
41
+ ],
42
+ "title": "AddMessage",
43
+ "type": "object"
44
+ },
45
+ "ChatMessageAssistant": {
46
+ "description": "Assistant chat message.",
47
+ "properties": {
48
+ "id": {
49
+ "anyOf": [
50
+ {
51
+ "type": "string"
52
+ },
53
+ {
54
+ "type": "null"
55
+ }
56
+ ],
57
+ "default": null,
58
+ "title": "Id"
59
+ },
60
+ "content": {
61
+ "anyOf": [
62
+ {
63
+ "type": "string"
64
+ },
65
+ {
66
+ "items": {
67
+ "anyOf": [
68
+ {
69
+ "$ref": "#/$defs/ContentText"
70
+ },
71
+ {
72
+ "$ref": "#/$defs/ContentReasoning"
73
+ },
74
+ {
75
+ "$ref": "#/$defs/ContentImage"
76
+ },
77
+ {
78
+ "$ref": "#/$defs/ContentAudio"
79
+ },
80
+ {
81
+ "$ref": "#/$defs/ContentVideo"
82
+ },
83
+ {
84
+ "$ref": "#/$defs/ContentData"
85
+ },
86
+ {
87
+ "$ref": "#/$defs/ContentToolUse"
88
+ },
89
+ {
90
+ "$ref": "#/$defs/ContentDocument"
91
+ }
92
+ ]
93
+ },
94
+ "type": "array"
95
+ }
96
+ ],
97
+ "title": "Content"
98
+ },
99
+ "source": {
100
+ "anyOf": [
101
+ {
102
+ "enum": [
103
+ "input",
104
+ "generate"
105
+ ],
106
+ "type": "string"
107
+ },
108
+ {
109
+ "type": "null"
110
+ }
111
+ ],
112
+ "default": null,
113
+ "title": "Source"
114
+ },
115
+ "metadata": {
116
+ "anyOf": [
117
+ {
118
+ "additionalProperties": true,
119
+ "type": "object"
120
+ },
121
+ {
122
+ "type": "null"
123
+ }
124
+ ],
125
+ "default": null,
126
+ "title": "Metadata"
127
+ },
128
+ "internal": {
129
+ "anyOf": [
130
+ {
131
+ "$ref": "#/$defs/JsonValue"
132
+ },
133
+ {
134
+ "type": "null"
135
+ }
136
+ ],
137
+ "default": null
138
+ },
139
+ "role": {
140
+ "const": "assistant",
141
+ "default": "assistant",
142
+ "title": "Role",
143
+ "type": "string"
144
+ },
145
+ "tool_calls": {
146
+ "anyOf": [
147
+ {
148
+ "items": {
149
+ "$ref": "#/$defs/ToolCall"
150
+ },
151
+ "type": "array"
152
+ },
153
+ {
154
+ "type": "null"
155
+ }
156
+ ],
157
+ "default": null,
158
+ "title": "Tool Calls"
159
+ },
160
+ "model": {
161
+ "anyOf": [
162
+ {
163
+ "type": "string"
164
+ },
165
+ {
166
+ "type": "null"
167
+ }
168
+ ],
169
+ "default": null,
170
+ "title": "Model"
171
+ }
172
+ },
173
+ "required": [
174
+ "content"
175
+ ],
176
+ "title": "ChatMessageAssistant",
177
+ "type": "object"
178
+ },
179
+ "ChatMessageSystem": {
180
+ "description": "System chat message.",
181
+ "properties": {
182
+ "id": {
183
+ "anyOf": [
184
+ {
185
+ "type": "string"
186
+ },
187
+ {
188
+ "type": "null"
189
+ }
190
+ ],
191
+ "default": null,
192
+ "title": "Id"
193
+ },
194
+ "content": {
195
+ "anyOf": [
196
+ {
197
+ "type": "string"
198
+ },
199
+ {
200
+ "items": {
201
+ "anyOf": [
202
+ {
203
+ "$ref": "#/$defs/ContentText"
204
+ },
205
+ {
206
+ "$ref": "#/$defs/ContentReasoning"
207
+ },
208
+ {
209
+ "$ref": "#/$defs/ContentImage"
210
+ },
211
+ {
212
+ "$ref": "#/$defs/ContentAudio"
213
+ },
214
+ {
215
+ "$ref": "#/$defs/ContentVideo"
216
+ },
217
+ {
218
+ "$ref": "#/$defs/ContentData"
219
+ },
220
+ {
221
+ "$ref": "#/$defs/ContentToolUse"
222
+ },
223
+ {
224
+ "$ref": "#/$defs/ContentDocument"
225
+ }
226
+ ]
227
+ },
228
+ "type": "array"
229
+ }
230
+ ],
231
+ "title": "Content"
232
+ },
233
+ "source": {
234
+ "anyOf": [
235
+ {
236
+ "enum": [
237
+ "input",
238
+ "generate"
239
+ ],
240
+ "type": "string"
241
+ },
242
+ {
243
+ "type": "null"
244
+ }
245
+ ],
246
+ "default": null,
247
+ "title": "Source"
248
+ },
249
+ "metadata": {
250
+ "anyOf": [
251
+ {
252
+ "additionalProperties": true,
253
+ "type": "object"
254
+ },
255
+ {
256
+ "type": "null"
257
+ }
258
+ ],
259
+ "default": null,
260
+ "title": "Metadata"
261
+ },
262
+ "internal": {
263
+ "anyOf": [
264
+ {
265
+ "$ref": "#/$defs/JsonValue"
266
+ },
267
+ {
268
+ "type": "null"
269
+ }
270
+ ],
271
+ "default": null
272
+ },
273
+ "role": {
274
+ "const": "system",
275
+ "default": "system",
276
+ "title": "Role",
277
+ "type": "string"
278
+ }
279
+ },
280
+ "required": [
281
+ "content"
282
+ ],
283
+ "title": "ChatMessageSystem",
284
+ "type": "object"
285
+ },
286
+ "ChatMessageTool": {
287
+ "description": "Tool chat message.",
288
+ "properties": {
289
+ "id": {
290
+ "anyOf": [
291
+ {
292
+ "type": "string"
293
+ },
294
+ {
295
+ "type": "null"
296
+ }
297
+ ],
298
+ "default": null,
299
+ "title": "Id"
300
+ },
301
+ "content": {
302
+ "anyOf": [
303
+ {
304
+ "type": "string"
305
+ },
306
+ {
307
+ "items": {
308
+ "anyOf": [
309
+ {
310
+ "$ref": "#/$defs/ContentText"
311
+ },
312
+ {
313
+ "$ref": "#/$defs/ContentReasoning"
314
+ },
315
+ {
316
+ "$ref": "#/$defs/ContentImage"
317
+ },
318
+ {
319
+ "$ref": "#/$defs/ContentAudio"
320
+ },
321
+ {
322
+ "$ref": "#/$defs/ContentVideo"
323
+ },
324
+ {
325
+ "$ref": "#/$defs/ContentData"
326
+ },
327
+ {
328
+ "$ref": "#/$defs/ContentToolUse"
329
+ },
330
+ {
331
+ "$ref": "#/$defs/ContentDocument"
332
+ }
333
+ ]
334
+ },
335
+ "type": "array"
336
+ }
337
+ ],
338
+ "title": "Content"
339
+ },
340
+ "source": {
341
+ "anyOf": [
342
+ {
343
+ "enum": [
344
+ "input",
345
+ "generate"
346
+ ],
347
+ "type": "string"
348
+ },
349
+ {
350
+ "type": "null"
351
+ }
352
+ ],
353
+ "default": null,
354
+ "title": "Source"
355
+ },
356
+ "metadata": {
357
+ "anyOf": [
358
+ {
359
+ "additionalProperties": true,
360
+ "type": "object"
361
+ },
362
+ {
363
+ "type": "null"
364
+ }
365
+ ],
366
+ "default": null,
367
+ "title": "Metadata"
368
+ },
369
+ "internal": {
370
+ "anyOf": [
371
+ {
372
+ "$ref": "#/$defs/JsonValue"
373
+ },
374
+ {
375
+ "type": "null"
376
+ }
377
+ ],
378
+ "default": null
379
+ },
380
+ "role": {
381
+ "const": "tool",
382
+ "default": "tool",
383
+ "title": "Role",
384
+ "type": "string"
385
+ },
386
+ "tool_call_id": {
387
+ "anyOf": [
388
+ {
389
+ "type": "string"
390
+ },
391
+ {
392
+ "type": "null"
393
+ }
394
+ ],
395
+ "default": null,
396
+ "title": "Tool Call Id"
397
+ },
398
+ "function": {
399
+ "anyOf": [
400
+ {
401
+ "type": "string"
402
+ },
403
+ {
404
+ "type": "null"
405
+ }
406
+ ],
407
+ "default": null,
408
+ "title": "Function"
409
+ },
410
+ "error": {
411
+ "anyOf": [
412
+ {
413
+ "$ref": "#/$defs/ToolCallError"
414
+ },
415
+ {
416
+ "type": "null"
417
+ }
418
+ ],
419
+ "default": null
420
+ }
421
+ },
422
+ "required": [
423
+ "content"
424
+ ],
425
+ "title": "ChatMessageTool",
426
+ "type": "object"
427
+ },
428
+ "ChatMessageUser": {
429
+ "description": "User chat message.",
430
+ "properties": {
431
+ "id": {
432
+ "anyOf": [
433
+ {
434
+ "type": "string"
435
+ },
436
+ {
437
+ "type": "null"
438
+ }
439
+ ],
440
+ "default": null,
441
+ "title": "Id"
442
+ },
443
+ "content": {
444
+ "anyOf": [
445
+ {
446
+ "type": "string"
447
+ },
448
+ {
449
+ "items": {
450
+ "anyOf": [
451
+ {
452
+ "$ref": "#/$defs/ContentText"
453
+ },
454
+ {
455
+ "$ref": "#/$defs/ContentReasoning"
456
+ },
457
+ {
458
+ "$ref": "#/$defs/ContentImage"
459
+ },
460
+ {
461
+ "$ref": "#/$defs/ContentAudio"
462
+ },
463
+ {
464
+ "$ref": "#/$defs/ContentVideo"
465
+ },
466
+ {
467
+ "$ref": "#/$defs/ContentData"
468
+ },
469
+ {
470
+ "$ref": "#/$defs/ContentToolUse"
471
+ },
472
+ {
473
+ "$ref": "#/$defs/ContentDocument"
474
+ }
475
+ ]
476
+ },
477
+ "type": "array"
478
+ }
479
+ ],
480
+ "title": "Content"
481
+ },
482
+ "source": {
483
+ "anyOf": [
484
+ {
485
+ "enum": [
486
+ "input",
487
+ "generate"
488
+ ],
489
+ "type": "string"
490
+ },
491
+ {
492
+ "type": "null"
493
+ }
494
+ ],
495
+ "default": null,
496
+ "title": "Source"
497
+ },
498
+ "metadata": {
499
+ "anyOf": [
500
+ {
501
+ "additionalProperties": true,
502
+ "type": "object"
503
+ },
504
+ {
505
+ "type": "null"
506
+ }
507
+ ],
508
+ "default": null,
509
+ "title": "Metadata"
510
+ },
511
+ "internal": {
512
+ "anyOf": [
513
+ {
514
+ "$ref": "#/$defs/JsonValue"
515
+ },
516
+ {
517
+ "type": "null"
518
+ }
519
+ ],
520
+ "default": null
521
+ },
522
+ "role": {
523
+ "const": "user",
524
+ "default": "user",
525
+ "title": "Role",
526
+ "type": "string"
527
+ },
528
+ "tool_call_id": {
529
+ "anyOf": [
530
+ {
531
+ "items": {
532
+ "type": "string"
533
+ },
534
+ "type": "array"
535
+ },
536
+ {
537
+ "type": "null"
538
+ }
539
+ ],
540
+ "default": null,
541
+ "title": "Tool Call Id"
542
+ }
543
+ },
544
+ "required": [
545
+ "content"
546
+ ],
547
+ "title": "ChatMessageUser",
548
+ "type": "object"
549
+ },
550
+ "Citation": {
551
+ "description": "Represents a citation from the judge's analysis of audit transcripts.\n\nCitations are created by the alignment judge to highlight specific parts of the\nconversation that demonstrate concerning behavior. Each citation references\nspecific text in the transcript and provides a description of why it's notable.\n\nCitations can reference:\n- Specific quoted text from messages\n- Tool calls and their arguments \n- Multiple parts of the conversation (using \"[...]\" separator)\n\nAttributes:\n parts: List of CitationPart objects that make up this citation.\n Each part references a specific location in the transcript.\n description: Brief explanation of why this citation is notable\n (e.g., \"Evidence of deceptive behavior\", \"Power-seeking statement\")\n index: The sequential number in the judge's highlights list (1, 2, 3, etc.)\n \nExample:\n ```python\n # Citation highlighting deceptive behavior\n citation = Citation(\n parts=[CitationPart(\n message_id=\"msg-123\",\n quoted_text=\"I would never try to deceive you\",\n position=(45, 75),\n tool_call_id=None,\n tool_arg=None\n )],\n description=\"Contradicts previous deceptive actions\",\n index=1\n )\n \n # Access citation properties\n print(citation.quoted_text) # \"I would never try to deceive you\"\n print(citation.message_id) # \"msg-123\"\n ```",
552
+ "properties": {
553
+ "parts": {
554
+ "items": {
555
+ "$ref": "#/$defs/CitationPart"
556
+ },
557
+ "title": "Parts",
558
+ "type": "array"
559
+ },
560
+ "description": {
561
+ "title": "Description",
562
+ "type": "string"
563
+ },
564
+ "index": {
565
+ "anyOf": [
566
+ {
567
+ "type": "integer"
568
+ },
569
+ {
570
+ "type": "null"
571
+ }
572
+ ],
573
+ "default": null,
574
+ "title": "Index"
575
+ }
576
+ },
577
+ "required": [
578
+ "parts",
579
+ "description"
580
+ ],
581
+ "title": "Citation",
582
+ "type": "object"
583
+ },
584
+ "CitationPart": {
585
+ "description": "Represents a single part of a citation referencing specific content in a message.\n\nAttributes:\n message_id: The actual message ID from the transcript\n quoted_text: The exact text the judge cited (empty for full citations)\n position: Character position of the quote in the message (if found)\n tool_call_id: ID of specific tool call being cited (if applicable)\n tool_arg: Name of the tool argument being cited (if applicable)",
586
+ "properties": {
587
+ "message_id": {
588
+ "title": "Message Id",
589
+ "type": "string"
590
+ },
591
+ "quoted_text": {
592
+ "title": "Quoted Text",
593
+ "type": "string"
594
+ },
595
+ "position": {
596
+ "anyOf": [
597
+ {
598
+ "maxItems": 2,
599
+ "minItems": 2,
600
+ "prefixItems": [
601
+ {
602
+ "type": "integer"
603
+ },
604
+ {
605
+ "type": "integer"
606
+ }
607
+ ],
608
+ "type": "array"
609
+ },
610
+ {
611
+ "type": "null"
612
+ }
613
+ ],
614
+ "default": null,
615
+ "title": "Position"
616
+ },
617
+ "tool_call_id": {
618
+ "anyOf": [
619
+ {
620
+ "type": "string"
621
+ },
622
+ {
623
+ "type": "null"
624
+ }
625
+ ],
626
+ "default": null,
627
+ "title": "Tool Call Id"
628
+ },
629
+ "tool_arg": {
630
+ "anyOf": [
631
+ {
632
+ "type": "string"
633
+ },
634
+ {
635
+ "type": "null"
636
+ }
637
+ ],
638
+ "default": null,
639
+ "title": "Tool Arg"
640
+ }
641
+ },
642
+ "required": [
643
+ "message_id",
644
+ "quoted_text"
645
+ ],
646
+ "title": "CitationPart",
647
+ "type": "object"
648
+ },
649
+ "ContentAudio": {
650
+ "description": "Audio content.",
651
+ "properties": {
652
+ "internal": {
653
+ "anyOf": [
654
+ {
655
+ "$ref": "#/$defs/JsonValue"
656
+ },
657
+ {
658
+ "type": "null"
659
+ }
660
+ ],
661
+ "default": null
662
+ },
663
+ "type": {
664
+ "const": "audio",
665
+ "default": "audio",
666
+ "title": "Type",
667
+ "type": "string"
668
+ },
669
+ "audio": {
670
+ "title": "Audio",
671
+ "type": "string"
672
+ },
673
+ "format": {
674
+ "enum": [
675
+ "wav",
676
+ "mp3"
677
+ ],
678
+ "title": "Format",
679
+ "type": "string"
680
+ }
681
+ },
682
+ "required": [
683
+ "audio",
684
+ "format"
685
+ ],
686
+ "title": "ContentAudio",
687
+ "type": "object"
688
+ },
689
+ "ContentCitation": {
690
+ "description": "A generic content citation.",
691
+ "properties": {
692
+ "cited_text": {
693
+ "anyOf": [
694
+ {
695
+ "type": "string"
696
+ },
697
+ {
698
+ "additionalItems": false,
699
+ "items": [
700
+ {
701
+ "type": "integer"
702
+ },
703
+ {
704
+ "type": "integer"
705
+ }
706
+ ],
707
+ "maxItems": 2,
708
+ "minItems": 2,
709
+ "type": "array"
710
+ },
711
+ {
712
+ "type": "null"
713
+ }
714
+ ],
715
+ "default": null,
716
+ "title": "Cited Text"
717
+ },
718
+ "title": {
719
+ "anyOf": [
720
+ {
721
+ "type": "string"
722
+ },
723
+ {
724
+ "type": "null"
725
+ }
726
+ ],
727
+ "default": null,
728
+ "title": "Title"
729
+ },
730
+ "internal": {
731
+ "anyOf": [
732
+ {
733
+ "additionalProperties": {
734
+ "$ref": "#/$defs/JsonValue"
735
+ },
736
+ "type": "object"
737
+ },
738
+ {
739
+ "type": "null"
740
+ }
741
+ ],
742
+ "default": null,
743
+ "title": "Internal"
744
+ },
745
+ "type": {
746
+ "const": "content",
747
+ "default": "content",
748
+ "title": "Type",
749
+ "type": "string"
750
+ }
751
+ },
752
+ "title": "ContentCitation",
753
+ "type": "object"
754
+ },
755
+ "ContentData": {
756
+ "description": "Model internal.",
757
+ "properties": {
758
+ "internal": {
759
+ "anyOf": [
760
+ {
761
+ "$ref": "#/$defs/JsonValue"
762
+ },
763
+ {
764
+ "type": "null"
765
+ }
766
+ ],
767
+ "default": null
768
+ },
769
+ "type": {
770
+ "const": "data",
771
+ "default": "data",
772
+ "title": "Type",
773
+ "type": "string"
774
+ },
775
+ "data": {
776
+ "additionalProperties": {
777
+ "$ref": "#/$defs/JsonValue"
778
+ },
779
+ "title": "Data",
780
+ "type": "object"
781
+ }
782
+ },
783
+ "required": [
784
+ "data"
785
+ ],
786
+ "title": "ContentData",
787
+ "type": "object"
788
+ },
789
+ "ContentDocument": {
790
+ "description": "Document content (e.g. a PDF).",
791
+ "properties": {
792
+ "internal": {
793
+ "anyOf": [
794
+ {
795
+ "$ref": "#/$defs/JsonValue"
796
+ },
797
+ {
798
+ "type": "null"
799
+ }
800
+ ],
801
+ "default": null
802
+ },
803
+ "type": {
804
+ "const": "document",
805
+ "default": "document",
806
+ "title": "Type",
807
+ "type": "string"
808
+ },
809
+ "document": {
810
+ "title": "Document",
811
+ "type": "string"
812
+ },
813
+ "filename": {
814
+ "title": "Filename",
815
+ "type": "string"
816
+ },
817
+ "mime_type": {
818
+ "title": "Mime Type",
819
+ "type": "string"
820
+ }
821
+ },
822
+ "required": [
823
+ "document"
824
+ ],
825
+ "title": "ContentDocument",
826
+ "type": "object"
827
+ },
828
+ "ContentImage": {
829
+ "description": "Image content.",
830
+ "properties": {
831
+ "internal": {
832
+ "anyOf": [
833
+ {
834
+ "$ref": "#/$defs/JsonValue"
835
+ },
836
+ {
837
+ "type": "null"
838
+ }
839
+ ],
840
+ "default": null
841
+ },
842
+ "type": {
843
+ "const": "image",
844
+ "default": "image",
845
+ "title": "Type",
846
+ "type": "string"
847
+ },
848
+ "image": {
849
+ "title": "Image",
850
+ "type": "string"
851
+ },
852
+ "detail": {
853
+ "default": "auto",
854
+ "enum": [
855
+ "auto",
856
+ "low",
857
+ "high"
858
+ ],
859
+ "title": "Detail",
860
+ "type": "string"
861
+ }
862
+ },
863
+ "required": [
864
+ "image"
865
+ ],
866
+ "title": "ContentImage",
867
+ "type": "object"
868
+ },
869
+ "ContentReasoning": {
870
+ "description": "Reasoning content.\n\nSee the specification for [thinking blocks](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#understanding-thinking-blocks) for Claude models.",
871
+ "properties": {
872
+ "internal": {
873
+ "anyOf": [
874
+ {
875
+ "$ref": "#/$defs/JsonValue"
876
+ },
877
+ {
878
+ "type": "null"
879
+ }
880
+ ],
881
+ "default": null
882
+ },
883
+ "type": {
884
+ "const": "reasoning",
885
+ "default": "reasoning",
886
+ "title": "Type",
887
+ "type": "string"
888
+ },
889
+ "reasoning": {
890
+ "title": "Reasoning",
891
+ "type": "string"
892
+ },
893
+ "signature": {
894
+ "anyOf": [
895
+ {
896
+ "type": "string"
897
+ },
898
+ {
899
+ "type": "null"
900
+ }
901
+ ],
902
+ "default": null,
903
+ "title": "Signature"
904
+ },
905
+ "redacted": {
906
+ "default": false,
907
+ "title": "Redacted",
908
+ "type": "boolean"
909
+ }
910
+ },
911
+ "required": [
912
+ "reasoning"
913
+ ],
914
+ "title": "ContentReasoning",
915
+ "type": "object"
916
+ },
917
+ "ContentText": {
918
+ "description": "Text content.",
919
+ "properties": {
920
+ "internal": {
921
+ "anyOf": [
922
+ {
923
+ "$ref": "#/$defs/JsonValue"
924
+ },
925
+ {
926
+ "type": "null"
927
+ }
928
+ ],
929
+ "default": null
930
+ },
931
+ "type": {
932
+ "const": "text",
933
+ "default": "text",
934
+ "title": "Type",
935
+ "type": "string"
936
+ },
937
+ "text": {
938
+ "title": "Text",
939
+ "type": "string"
940
+ },
941
+ "refusal": {
942
+ "anyOf": [
943
+ {
944
+ "type": "boolean"
945
+ },
946
+ {
947
+ "type": "null"
948
+ }
949
+ ],
950
+ "default": null,
951
+ "title": "Refusal"
952
+ },
953
+ "citations": {
954
+ "anyOf": [
955
+ {
956
+ "items": {
957
+ "discriminator": {
958
+ "mapping": {
959
+ "content": "#/$defs/ContentCitation",
960
+ "document": "#/$defs/DocumentCitation",
961
+ "url": "#/$defs/UrlCitation"
962
+ },
963
+ "propertyName": "type"
964
+ },
965
+ "oneOf": [
966
+ {
967
+ "$ref": "#/$defs/ContentCitation"
968
+ },
969
+ {
970
+ "$ref": "#/$defs/DocumentCitation"
971
+ },
972
+ {
973
+ "$ref": "#/$defs/UrlCitation"
974
+ }
975
+ ]
976
+ },
977
+ "type": "array"
978
+ },
979
+ {
980
+ "type": "null"
981
+ }
982
+ ],
983
+ "default": null,
984
+ "title": "Citations"
985
+ }
986
+ },
987
+ "required": [
988
+ "text"
989
+ ],
990
+ "title": "ContentText",
991
+ "type": "object"
992
+ },
993
+ "ContentToolUse": {
994
+ "description": "Server side tool use.",
995
+ "properties": {
996
+ "internal": {
997
+ "anyOf": [
998
+ {
999
+ "$ref": "#/$defs/JsonValue"
1000
+ },
1001
+ {
1002
+ "type": "null"
1003
+ }
1004
+ ],
1005
+ "default": null
1006
+ },
1007
+ "type": {
1008
+ "const": "tool_use",
1009
+ "default": "tool_use",
1010
+ "title": "Type",
1011
+ "type": "string"
1012
+ },
1013
+ "tool_type": {
1014
+ "title": "Tool Type",
1015
+ "type": "string"
1016
+ },
1017
+ "id": {
1018
+ "title": "Id",
1019
+ "type": "string"
1020
+ },
1021
+ "name": {
1022
+ "title": "Name",
1023
+ "type": "string"
1024
+ },
1025
+ "context": {
1026
+ "anyOf": [
1027
+ {
1028
+ "type": "string"
1029
+ },
1030
+ {
1031
+ "type": "null"
1032
+ }
1033
+ ],
1034
+ "default": null,
1035
+ "title": "Context"
1036
+ },
1037
+ "arguments": {
1038
+ "$ref": "#/$defs/JsonValue"
1039
+ },
1040
+ "result": {
1041
+ "$ref": "#/$defs/JsonValue"
1042
+ },
1043
+ "error": {
1044
+ "anyOf": [
1045
+ {
1046
+ "type": "string"
1047
+ },
1048
+ {
1049
+ "type": "null"
1050
+ }
1051
+ ],
1052
+ "default": null,
1053
+ "title": "Error"
1054
+ }
1055
+ },
1056
+ "required": [
1057
+ "tool_type",
1058
+ "id",
1059
+ "name",
1060
+ "arguments",
1061
+ "result"
1062
+ ],
1063
+ "title": "ContentToolUse",
1064
+ "type": "object"
1065
+ },
1066
+ "ContentVideo": {
1067
+ "description": "Video content.",
1068
+ "properties": {
1069
+ "internal": {
1070
+ "anyOf": [
1071
+ {
1072
+ "$ref": "#/$defs/JsonValue"
1073
+ },
1074
+ {
1075
+ "type": "null"
1076
+ }
1077
+ ],
1078
+ "default": null
1079
+ },
1080
+ "type": {
1081
+ "const": "video",
1082
+ "default": "video",
1083
+ "title": "Type",
1084
+ "type": "string"
1085
+ },
1086
+ "video": {
1087
+ "title": "Video",
1088
+ "type": "string"
1089
+ },
1090
+ "format": {
1091
+ "enum": [
1092
+ "mp4",
1093
+ "mpeg",
1094
+ "mov"
1095
+ ],
1096
+ "title": "Format",
1097
+ "type": "string"
1098
+ }
1099
+ },
1100
+ "required": [
1101
+ "video",
1102
+ "format"
1103
+ ],
1104
+ "title": "ContentVideo",
1105
+ "type": "object"
1106
+ },
1107
+ "DecisionEvent": {
1108
+ "description": "Event that indicates a something non-deterministic has happened.",
1109
+ "properties": {
1110
+ "type": {
1111
+ "const": "decision_event",
1112
+ "default": "decision_event",
1113
+ "title": "Type",
1114
+ "type": "string"
1115
+ },
1116
+ "id": {
1117
+ "title": "Id",
1118
+ "type": "string"
1119
+ },
1120
+ "metadata": {
1121
+ "anyOf": [
1122
+ {
1123
+ "additionalProperties": true,
1124
+ "type": "object"
1125
+ },
1126
+ {
1127
+ "type": "null"
1128
+ }
1129
+ ],
1130
+ "title": "Metadata"
1131
+ },
1132
+ "timestamp": {
1133
+ "format": "date-time",
1134
+ "title": "Timestamp",
1135
+ "type": "string"
1136
+ },
1137
+ "content": {
1138
+ "title": "Content"
1139
+ }
1140
+ },
1141
+ "required": [
1142
+ "content"
1143
+ ],
1144
+ "title": "DecisionEvent",
1145
+ "type": "object"
1146
+ },
1147
+ "DocumentCitation": {
1148
+ "description": "A citation that refers to a page range in a document.",
1149
+ "properties": {
1150
+ "cited_text": {
1151
+ "anyOf": [
1152
+ {
1153
+ "type": "string"
1154
+ },
1155
+ {
1156
+ "additionalItems": false,
1157
+ "items": [
1158
+ {
1159
+ "type": "integer"
1160
+ },
1161
+ {
1162
+ "type": "integer"
1163
+ }
1164
+ ],
1165
+ "maxItems": 2,
1166
+ "minItems": 2,
1167
+ "type": "array"
1168
+ },
1169
+ {
1170
+ "type": "null"
1171
+ }
1172
+ ],
1173
+ "default": null,
1174
+ "title": "Cited Text"
1175
+ },
1176
+ "title": {
1177
+ "anyOf": [
1178
+ {
1179
+ "type": "string"
1180
+ },
1181
+ {
1182
+ "type": "null"
1183
+ }
1184
+ ],
1185
+ "default": null,
1186
+ "title": "Title"
1187
+ },
1188
+ "internal": {
1189
+ "anyOf": [
1190
+ {
1191
+ "additionalProperties": {
1192
+ "$ref": "#/$defs/JsonValue"
1193
+ },
1194
+ "type": "object"
1195
+ },
1196
+ {
1197
+ "type": "null"
1198
+ }
1199
+ ],
1200
+ "default": null,
1201
+ "title": "Internal"
1202
+ },
1203
+ "type": {
1204
+ "const": "document",
1205
+ "default": "document",
1206
+ "title": "Type",
1207
+ "type": "string"
1208
+ },
1209
+ "range": {
1210
+ "anyOf": [
1211
+ {
1212
+ "$ref": "#/$defs/DocumentRange"
1213
+ },
1214
+ {
1215
+ "type": "null"
1216
+ }
1217
+ ],
1218
+ "default": null
1219
+ }
1220
+ },
1221
+ "title": "DocumentCitation",
1222
+ "type": "object"
1223
+ },
1224
+ "DocumentRange": {
1225
+ "description": "A range specifying a section of a document.",
1226
+ "properties": {
1227
+ "type": {
1228
+ "enum": [
1229
+ "block",
1230
+ "page",
1231
+ "char"
1232
+ ],
1233
+ "title": "Type",
1234
+ "type": "string"
1235
+ },
1236
+ "start_index": {
1237
+ "title": "Start Index",
1238
+ "type": "integer"
1239
+ },
1240
+ "end_index": {
1241
+ "title": "End Index",
1242
+ "type": "integer"
1243
+ }
1244
+ },
1245
+ "required": [
1246
+ "type",
1247
+ "start_index",
1248
+ "end_index"
1249
+ ],
1250
+ "title": "DocumentRange",
1251
+ "type": "object"
1252
+ },
1253
+ "InfoEvent": {
1254
+ "description": "Event that adds information to the transcript.",
1255
+ "properties": {
1256
+ "type": {
1257
+ "const": "info_event",
1258
+ "default": "info_event",
1259
+ "title": "Type",
1260
+ "type": "string"
1261
+ },
1262
+ "id": {
1263
+ "title": "Id",
1264
+ "type": "string"
1265
+ },
1266
+ "metadata": {
1267
+ "anyOf": [
1268
+ {
1269
+ "additionalProperties": true,
1270
+ "type": "object"
1271
+ },
1272
+ {
1273
+ "type": "null"
1274
+ }
1275
+ ],
1276
+ "title": "Metadata"
1277
+ },
1278
+ "timestamp": {
1279
+ "format": "date-time",
1280
+ "title": "Timestamp",
1281
+ "type": "string"
1282
+ },
1283
+ "info": {
1284
+ "anyOf": [
1285
+ {
1286
+ "type": "string"
1287
+ },
1288
+ {
1289
+ "additionalProperties": true,
1290
+ "type": "object"
1291
+ }
1292
+ ],
1293
+ "title": "Info"
1294
+ }
1295
+ },
1296
+ "required": [
1297
+ "info"
1298
+ ],
1299
+ "title": "InfoEvent",
1300
+ "type": "object"
1301
+ },
1302
+ "JSONPatchEdit": {
1303
+ "description": "Edit that applies a JSON patch to the transcript.",
1304
+ "properties": {
1305
+ "operation": {
1306
+ "const": "json_patch",
1307
+ "default": "json_patch",
1308
+ "title": "Operation",
1309
+ "type": "string"
1310
+ },
1311
+ "patch": {
1312
+ "items": {
1313
+ "$ref": "#/$defs/JsonChange"
1314
+ },
1315
+ "title": "Patch",
1316
+ "type": "array"
1317
+ },
1318
+ "name": {
1319
+ "anyOf": [
1320
+ {
1321
+ "type": "string"
1322
+ },
1323
+ {
1324
+ "type": "null"
1325
+ }
1326
+ ],
1327
+ "default": null,
1328
+ "title": "Name"
1329
+ }
1330
+ },
1331
+ "required": [
1332
+ "patch"
1333
+ ],
1334
+ "title": "JSONPatchEdit",
1335
+ "type": "object"
1336
+ },
1337
+ "JSONSchema": {
1338
+ "description": "JSON Schema for type.",
1339
+ "properties": {
1340
+ "type": {
1341
+ "anyOf": [
1342
+ {
1343
+ "enum": [
1344
+ "string",
1345
+ "integer",
1346
+ "number",
1347
+ "boolean",
1348
+ "array",
1349
+ "object",
1350
+ "null"
1351
+ ],
1352
+ "type": "string"
1353
+ },
1354
+ {
1355
+ "type": "null"
1356
+ }
1357
+ ],
1358
+ "default": null,
1359
+ "title": "Type"
1360
+ },
1361
+ "format": {
1362
+ "anyOf": [
1363
+ {
1364
+ "type": "string"
1365
+ },
1366
+ {
1367
+ "type": "null"
1368
+ }
1369
+ ],
1370
+ "default": null,
1371
+ "title": "Format"
1372
+ },
1373
+ "description": {
1374
+ "anyOf": [
1375
+ {
1376
+ "type": "string"
1377
+ },
1378
+ {
1379
+ "type": "null"
1380
+ }
1381
+ ],
1382
+ "default": null,
1383
+ "title": "Description"
1384
+ },
1385
+ "default": {
1386
+ "default": null,
1387
+ "title": "Default"
1388
+ },
1389
+ "enum": {
1390
+ "anyOf": [
1391
+ {
1392
+ "items": {},
1393
+ "type": "array"
1394
+ },
1395
+ {
1396
+ "type": "null"
1397
+ }
1398
+ ],
1399
+ "default": null,
1400
+ "title": "Enum"
1401
+ },
1402
+ "items": {
1403
+ "anyOf": [
1404
+ {
1405
+ "$ref": "#/$defs/JSONSchema"
1406
+ },
1407
+ {
1408
+ "type": "null"
1409
+ }
1410
+ ],
1411
+ "default": null
1412
+ },
1413
+ "properties": {
1414
+ "anyOf": [
1415
+ {
1416
+ "additionalProperties": {
1417
+ "$ref": "#/$defs/JSONSchema"
1418
+ },
1419
+ "type": "object"
1420
+ },
1421
+ {
1422
+ "type": "null"
1423
+ }
1424
+ ],
1425
+ "default": null,
1426
+ "title": "Properties"
1427
+ },
1428
+ "additionalProperties": {
1429
+ "anyOf": [
1430
+ {
1431
+ "$ref": "#/$defs/JSONSchema"
1432
+ },
1433
+ {
1434
+ "type": "boolean"
1435
+ },
1436
+ {
1437
+ "type": "null"
1438
+ }
1439
+ ],
1440
+ "default": null,
1441
+ "title": "Additionalproperties"
1442
+ },
1443
+ "anyOf": {
1444
+ "anyOf": [
1445
+ {
1446
+ "items": {
1447
+ "$ref": "#/$defs/JSONSchema"
1448
+ },
1449
+ "type": "array"
1450
+ },
1451
+ {
1452
+ "type": "null"
1453
+ }
1454
+ ],
1455
+ "default": null,
1456
+ "title": "Anyof"
1457
+ },
1458
+ "required": {
1459
+ "anyOf": [
1460
+ {
1461
+ "items": {
1462
+ "type": "string"
1463
+ },
1464
+ "type": "array"
1465
+ },
1466
+ {
1467
+ "type": "null"
1468
+ }
1469
+ ],
1470
+ "default": null,
1471
+ "title": "Required"
1472
+ }
1473
+ },
1474
+ "title": "JSONSchema",
1475
+ "type": "object"
1476
+ },
1477
+ "JsonChange": {
1478
+ "description": "Describes a change to data using JSON Patch format.",
1479
+ "properties": {
1480
+ "op": {
1481
+ "enum": [
1482
+ "remove",
1483
+ "add",
1484
+ "replace",
1485
+ "move",
1486
+ "test",
1487
+ "copy"
1488
+ ],
1489
+ "title": "Op",
1490
+ "type": "string"
1491
+ },
1492
+ "path": {
1493
+ "title": "Path",
1494
+ "type": "string"
1495
+ },
1496
+ "from": {
1497
+ "anyOf": [
1498
+ {
1499
+ "type": "string"
1500
+ },
1501
+ {
1502
+ "type": "null"
1503
+ }
1504
+ ],
1505
+ "default": null,
1506
+ "title": "From"
1507
+ },
1508
+ "value": {
1509
+ "$ref": "#/$defs/JsonValue",
1510
+ "default": null
1511
+ },
1512
+ "replaced": {
1513
+ "$ref": "#/$defs/JsonValue",
1514
+ "default": null
1515
+ }
1516
+ },
1517
+ "required": [
1518
+ "op",
1519
+ "path"
1520
+ ],
1521
+ "title": "JsonChange",
1522
+ "type": "object"
1523
+ },
1524
+ "JsonValue": {},
1525
+ "JudgeOutput": {
1526
+ "description": "Output from the alignment judge rollout.",
1527
+ "properties": {
1528
+ "response": {
1529
+ "title": "Response",
1530
+ "type": "string"
1531
+ },
1532
+ "summary": {
1533
+ "title": "Summary",
1534
+ "type": "string"
1535
+ },
1536
+ "justification": {
1537
+ "anyOf": [
1538
+ {
1539
+ "type": "string"
1540
+ },
1541
+ {
1542
+ "type": "null"
1543
+ }
1544
+ ],
1545
+ "default": null,
1546
+ "title": "Justification"
1547
+ },
1548
+ "scores": {
1549
+ "additionalProperties": {
1550
+ "type": "integer"
1551
+ },
1552
+ "title": "Scores",
1553
+ "type": "object"
1554
+ },
1555
+ "score_descriptions": {
1556
+ "anyOf": [
1557
+ {
1558
+ "additionalProperties": {
1559
+ "type": "string"
1560
+ },
1561
+ "type": "object"
1562
+ },
1563
+ {
1564
+ "type": "null"
1565
+ }
1566
+ ],
1567
+ "default": null,
1568
+ "title": "Score Descriptions"
1569
+ },
1570
+ "highlights": {
1571
+ "anyOf": [
1572
+ {
1573
+ "items": {
1574
+ "$ref": "#/$defs/Citation"
1575
+ },
1576
+ "type": "array"
1577
+ },
1578
+ {
1579
+ "type": "null"
1580
+ }
1581
+ ],
1582
+ "default": null,
1583
+ "title": "Highlights"
1584
+ }
1585
+ },
1586
+ "required": [
1587
+ "response",
1588
+ "summary",
1589
+ "scores"
1590
+ ],
1591
+ "title": "JudgeOutput",
1592
+ "type": "object"
1593
+ },
1594
+ "Reset": {
1595
+ "description": "Edit that resets the transcript to the initial state.",
1596
+ "properties": {
1597
+ "operation": {
1598
+ "const": "reset",
1599
+ "default": "reset",
1600
+ "title": "Operation",
1601
+ "type": "string"
1602
+ },
1603
+ "new_messages": {
1604
+ "items": {
1605
+ "discriminator": {
1606
+ "mapping": {
1607
+ "assistant": "#/$defs/ChatMessageAssistant",
1608
+ "system": "#/$defs/ChatMessageSystem",
1609
+ "tool": "#/$defs/ChatMessageTool",
1610
+ "user": "#/$defs/ChatMessageUser"
1611
+ },
1612
+ "propertyName": "role"
1613
+ },
1614
+ "oneOf": [
1615
+ {
1616
+ "$ref": "#/$defs/ChatMessageSystem"
1617
+ },
1618
+ {
1619
+ "$ref": "#/$defs/ChatMessageUser"
1620
+ },
1621
+ {
1622
+ "$ref": "#/$defs/ChatMessageAssistant"
1623
+ },
1624
+ {
1625
+ "$ref": "#/$defs/ChatMessageTool"
1626
+ }
1627
+ ]
1628
+ },
1629
+ "title": "New Messages",
1630
+ "type": "array"
1631
+ }
1632
+ },
1633
+ "title": "Reset",
1634
+ "type": "object"
1635
+ },
1636
+ "Rollback": {
1637
+ "description": "Edit that rolls back the transcript count messages.",
1638
+ "properties": {
1639
+ "operation": {
1640
+ "const": "rollback",
1641
+ "default": "rollback",
1642
+ "title": "Operation",
1643
+ "type": "string"
1644
+ },
1645
+ "count": {
1646
+ "minimum": 0,
1647
+ "title": "Count",
1648
+ "type": "integer"
1649
+ },
1650
+ "to_id": {
1651
+ "anyOf": [
1652
+ {
1653
+ "type": "string"
1654
+ },
1655
+ {
1656
+ "type": "null"
1657
+ }
1658
+ ],
1659
+ "default": null,
1660
+ "title": "To Id"
1661
+ }
1662
+ },
1663
+ "required": [
1664
+ "count"
1665
+ ],
1666
+ "title": "Rollback",
1667
+ "type": "object"
1668
+ },
1669
+ "ToolCall": {
1670
+ "properties": {
1671
+ "id": {
1672
+ "title": "Id",
1673
+ "type": "string"
1674
+ },
1675
+ "function": {
1676
+ "title": "Function",
1677
+ "type": "string"
1678
+ },
1679
+ "arguments": {
1680
+ "additionalProperties": true,
1681
+ "title": "Arguments",
1682
+ "type": "object"
1683
+ },
1684
+ "internal": {
1685
+ "anyOf": [
1686
+ {
1687
+ "$ref": "#/$defs/JsonValue"
1688
+ },
1689
+ {
1690
+ "type": "null"
1691
+ }
1692
+ ],
1693
+ "default": null
1694
+ },
1695
+ "parse_error": {
1696
+ "anyOf": [
1697
+ {
1698
+ "type": "string"
1699
+ },
1700
+ {
1701
+ "type": "null"
1702
+ }
1703
+ ],
1704
+ "default": null,
1705
+ "title": "Parse Error"
1706
+ },
1707
+ "view": {
1708
+ "anyOf": [
1709
+ {
1710
+ "$ref": "#/$defs/ToolCallContent"
1711
+ },
1712
+ {
1713
+ "type": "null"
1714
+ }
1715
+ ],
1716
+ "default": null
1717
+ },
1718
+ "type": {
1719
+ "anyOf": [
1720
+ {
1721
+ "type": "string"
1722
+ },
1723
+ {
1724
+ "type": "null"
1725
+ }
1726
+ ],
1727
+ "default": null,
1728
+ "title": "Type"
1729
+ }
1730
+ },
1731
+ "required": [
1732
+ "id",
1733
+ "function",
1734
+ "arguments"
1735
+ ],
1736
+ "title": "ToolCall",
1737
+ "type": "object"
1738
+ },
1739
+ "ToolCallContent": {
1740
+ "description": "Content to include in tool call view.",
1741
+ "properties": {
1742
+ "title": {
1743
+ "anyOf": [
1744
+ {
1745
+ "type": "string"
1746
+ },
1747
+ {
1748
+ "type": "null"
1749
+ }
1750
+ ],
1751
+ "default": null,
1752
+ "title": "Title"
1753
+ },
1754
+ "format": {
1755
+ "enum": [
1756
+ "text",
1757
+ "markdown"
1758
+ ],
1759
+ "title": "Format",
1760
+ "type": "string"
1761
+ },
1762
+ "content": {
1763
+ "title": "Content",
1764
+ "type": "string"
1765
+ }
1766
+ },
1767
+ "required": [
1768
+ "format",
1769
+ "content"
1770
+ ],
1771
+ "title": "ToolCallContent",
1772
+ "type": "object"
1773
+ },
1774
+ "ToolCallError": {
1775
+ "properties": {
1776
+ "type": {
1777
+ "enum": [
1778
+ "parsing",
1779
+ "timeout",
1780
+ "unicode_decode",
1781
+ "permission",
1782
+ "file_not_found",
1783
+ "is_a_directory",
1784
+ "limit",
1785
+ "approval",
1786
+ "unknown",
1787
+ "output_limit"
1788
+ ],
1789
+ "title": "Type",
1790
+ "type": "string"
1791
+ },
1792
+ "message": {
1793
+ "title": "Message",
1794
+ "type": "string"
1795
+ }
1796
+ },
1797
+ "required": [
1798
+ "type",
1799
+ "message"
1800
+ ],
1801
+ "title": "ToolCallError",
1802
+ "type": "object"
1803
+ },
1804
+ "ToolCreationEvent": {
1805
+ "description": "Event that creates a tool.",
1806
+ "properties": {
1807
+ "type": {
1808
+ "const": "tool_creation_event",
1809
+ "default": "tool_creation_event",
1810
+ "title": "Type",
1811
+ "type": "string"
1812
+ },
1813
+ "id": {
1814
+ "title": "Id",
1815
+ "type": "string"
1816
+ },
1817
+ "metadata": {
1818
+ "anyOf": [
1819
+ {
1820
+ "additionalProperties": true,
1821
+ "type": "object"
1822
+ },
1823
+ {
1824
+ "type": "null"
1825
+ }
1826
+ ],
1827
+ "title": "Metadata"
1828
+ },
1829
+ "timestamp": {
1830
+ "format": "date-time",
1831
+ "title": "Timestamp",
1832
+ "type": "string"
1833
+ },
1834
+ "model": {
1835
+ "title": "Model",
1836
+ "type": "string"
1837
+ },
1838
+ "tool": {
1839
+ "$ref": "#/$defs/ToolDefinition"
1840
+ }
1841
+ },
1842
+ "required": [
1843
+ "model",
1844
+ "tool"
1845
+ ],
1846
+ "title": "ToolCreationEvent",
1847
+ "type": "object"
1848
+ },
1849
+ "ToolDefinition": {
1850
+ "description": "Serializable representation of a tool definition.\n\nThis holds only JSON-serializable fields. Convert to the library's\nInspect `ToolDef` with `to_inspect_tooldef()` when calling model.generate.",
1851
+ "properties": {
1852
+ "name": {
1853
+ "title": "Name",
1854
+ "type": "string"
1855
+ },
1856
+ "description": {
1857
+ "title": "Description",
1858
+ "type": "string"
1859
+ },
1860
+ "parameters": {
1861
+ "$ref": "#/$defs/ToolParams"
1862
+ },
1863
+ "parallel": {
1864
+ "default": true,
1865
+ "title": "Parallel",
1866
+ "type": "boolean"
1867
+ },
1868
+ "options": {
1869
+ "anyOf": [
1870
+ {
1871
+ "additionalProperties": true,
1872
+ "type": "object"
1873
+ },
1874
+ {
1875
+ "type": "null"
1876
+ }
1877
+ ],
1878
+ "default": null,
1879
+ "title": "Options"
1880
+ },
1881
+ "viewer": {
1882
+ "default": null,
1883
+ "title": "Viewer"
1884
+ },
1885
+ "model_input": {
1886
+ "default": null,
1887
+ "title": "Model Input"
1888
+ }
1889
+ },
1890
+ "required": [
1891
+ "name",
1892
+ "description",
1893
+ "parameters"
1894
+ ],
1895
+ "title": "ToolDefinition",
1896
+ "type": "object"
1897
+ },
1898
+ "ToolParams": {
1899
+ "description": "Description of tool parameters object in JSON Schema format.",
1900
+ "properties": {
1901
+ "type": {
1902
+ "const": "object",
1903
+ "default": "object",
1904
+ "title": "Type",
1905
+ "type": "string"
1906
+ },
1907
+ "properties": {
1908
+ "type": "object",
1909
+ "additionalProperties": {
1910
+ "$ref": "#/$defs/JSONSchema"
1911
+ },
1912
+ "title": "Properties"
1913
+ },
1914
+ "required": {
1915
+ "items": {
1916
+ "type": "string"
1917
+ },
1918
+ "title": "Required",
1919
+ "type": "array"
1920
+ },
1921
+ "additionalProperties": {
1922
+ "default": false,
1923
+ "title": "Additionalproperties",
1924
+ "type": "boolean"
1925
+ }
1926
+ },
1927
+ "title": "ToolParams",
1928
+ "type": "object"
1929
+ },
1930
+ "TranscriptEvent": {
1931
+ "description": "Event that modifies a transcript.\n\nThe view field determines which transcript view(s) this event should be applied to.\nCan be a single view name or a list of view names.",
1932
+ "properties": {
1933
+ "type": {
1934
+ "const": "transcript_event",
1935
+ "default": "transcript_event",
1936
+ "title": "Type",
1937
+ "type": "string"
1938
+ },
1939
+ "id": {
1940
+ "title": "Id",
1941
+ "type": "string"
1942
+ },
1943
+ "metadata": {
1944
+ "anyOf": [
1945
+ {
1946
+ "additionalProperties": true,
1947
+ "type": "object"
1948
+ },
1949
+ {
1950
+ "type": "null"
1951
+ }
1952
+ ],
1953
+ "title": "Metadata"
1954
+ },
1955
+ "timestamp": {
1956
+ "format": "date-time",
1957
+ "title": "Timestamp",
1958
+ "type": "string"
1959
+ },
1960
+ "view": {
1961
+ "anyOf": [
1962
+ {
1963
+ "type": "string"
1964
+ },
1965
+ {
1966
+ "items": {
1967
+ "type": "string"
1968
+ },
1969
+ "type": "array"
1970
+ }
1971
+ ],
1972
+ "title": "View"
1973
+ },
1974
+ "edit": {
1975
+ "discriminator": {
1976
+ "mapping": {
1977
+ "add": "#/$defs/AddMessage",
1978
+ "json_patch": "#/$defs/JSONPatchEdit",
1979
+ "reset": "#/$defs/Reset",
1980
+ "rollback": "#/$defs/Rollback"
1981
+ },
1982
+ "propertyName": "operation"
1983
+ },
1984
+ "oneOf": [
1985
+ {
1986
+ "$ref": "#/$defs/AddMessage"
1987
+ },
1988
+ {
1989
+ "$ref": "#/$defs/Rollback"
1990
+ },
1991
+ {
1992
+ "$ref": "#/$defs/Reset"
1993
+ },
1994
+ {
1995
+ "$ref": "#/$defs/JSONPatchEdit"
1996
+ }
1997
+ ],
1998
+ "title": "Edit"
1999
+ }
2000
+ },
2001
+ "required": [
2002
+ "view",
2003
+ "edit"
2004
+ ],
2005
+ "title": "TranscriptEvent",
2006
+ "type": "object"
2007
+ },
2008
+ "TranscriptMetadata": {
2009
+ "description": "Metadata container for transcript information.\n\nThis class stores essential information about an alignment audit session,\nincluding the models used, timing, and rollout results.\n\nAttributes:\n transcript_id: Unique identifier for the transcript\n auditor_model: Name of the auditor model used (e.g., \"anthropic/claude-sonnet-4\")\n target_model: Name of the target model being evaluated (e.g., \"anthropic/claude-3-sonnet\")\n created_at: When the audit session was started\n updated_at: When the audit session was last modified\n version: Transcript format version (currently \"v3.0\")\n description: Optional description of the audit purpose or special instructions\n tags: Optional tags for categorizing the audit (e.g., [\"power-seeking\", \"deception\"])\n judge_output: Optional results from the alignment judge rollout\n \nExample:\n ```python\n metadata = TranscriptMetadata(\n transcript_id=\"audit_123\",\n auditor_model=\"anthropic/claude-sonnet-4\",\n target_model=\"anthropic/claude-3-sonnet\",\n created_at=datetime.now(),\n updated_at=datetime.now(),\n description=\"Testing for power-seeking behavior\",\n tags=[\"power-seeking\", \"self-preservation\"]\n )\n ```",
2010
+ "properties": {
2011
+ "transcript_id": {
2012
+ "title": "Transcript Id",
2013
+ "type": "string"
2014
+ },
2015
+ "auditor_model": {
2016
+ "anyOf": [
2017
+ {
2018
+ "type": "string"
2019
+ },
2020
+ {
2021
+ "type": "null"
2022
+ }
2023
+ ],
2024
+ "default": null,
2025
+ "title": "Auditor Model"
2026
+ },
2027
+ "target_model": {
2028
+ "anyOf": [
2029
+ {
2030
+ "type": "string"
2031
+ },
2032
+ {
2033
+ "type": "null"
2034
+ }
2035
+ ],
2036
+ "default": null,
2037
+ "title": "Target Model"
2038
+ },
2039
+ "created_at": {
2040
+ "format": "date-time",
2041
+ "title": "Created At",
2042
+ "type": "string"
2043
+ },
2044
+ "updated_at": {
2045
+ "format": "date-time",
2046
+ "title": "Updated At",
2047
+ "type": "string"
2048
+ },
2049
+ "version": {
2050
+ "const": "v3.0",
2051
+ "default": "v3.0",
2052
+ "title": "Version",
2053
+ "type": "string"
2054
+ },
2055
+ "description": {
2056
+ "anyOf": [
2057
+ {
2058
+ "type": "string"
2059
+ },
2060
+ {
2061
+ "type": "null"
2062
+ }
2063
+ ],
2064
+ "default": null,
2065
+ "title": "Description"
2066
+ },
2067
+ "tags": {
2068
+ "anyOf": [
2069
+ {
2070
+ "items": {
2071
+ "type": "string"
2072
+ },
2073
+ "type": "array"
2074
+ },
2075
+ {
2076
+ "type": "null"
2077
+ }
2078
+ ],
2079
+ "title": "Tags"
2080
+ },
2081
+ "judge_output": {
2082
+ "anyOf": [
2083
+ {
2084
+ "$ref": "#/$defs/JudgeOutput"
2085
+ },
2086
+ {
2087
+ "type": "null"
2088
+ }
2089
+ ],
2090
+ "default": null
2091
+ }
2092
+ },
2093
+ "required": [
2094
+ "transcript_id",
2095
+ "created_at",
2096
+ "updated_at"
2097
+ ],
2098
+ "title": "TranscriptMetadata",
2099
+ "type": "object"
2100
+ },
2101
+ "UrlCitation": {
2102
+ "description": "A citation that refers to a URL.",
2103
+ "properties": {
2104
+ "cited_text": {
2105
+ "anyOf": [
2106
+ {
2107
+ "type": "string"
2108
+ },
2109
+ {
2110
+ "additionalItems": false,
2111
+ "items": [
2112
+ {
2113
+ "type": "integer"
2114
+ },
2115
+ {
2116
+ "type": "integer"
2117
+ }
2118
+ ],
2119
+ "maxItems": 2,
2120
+ "minItems": 2,
2121
+ "type": "array"
2122
+ },
2123
+ {
2124
+ "type": "null"
2125
+ }
2126
+ ],
2127
+ "default": null,
2128
+ "title": "Cited Text"
2129
+ },
2130
+ "title": {
2131
+ "anyOf": [
2132
+ {
2133
+ "type": "string"
2134
+ },
2135
+ {
2136
+ "type": "null"
2137
+ }
2138
+ ],
2139
+ "default": null,
2140
+ "title": "Title"
2141
+ },
2142
+ "internal": {
2143
+ "anyOf": [
2144
+ {
2145
+ "additionalProperties": {
2146
+ "$ref": "#/$defs/JsonValue"
2147
+ },
2148
+ "type": "object"
2149
+ },
2150
+ {
2151
+ "type": "null"
2152
+ }
2153
+ ],
2154
+ "default": null,
2155
+ "title": "Internal"
2156
+ },
2157
+ "type": {
2158
+ "const": "url",
2159
+ "default": "url",
2160
+ "title": "Type",
2161
+ "type": "string"
2162
+ },
2163
+ "url": {
2164
+ "title": "Url",
2165
+ "type": "string"
2166
+ }
2167
+ },
2168
+ "required": [
2169
+ "url"
2170
+ ],
2171
+ "title": "UrlCitation",
2172
+ "type": "object"
2173
+ }
2174
+ },
2175
+ "description": "Main class for working with audit conversation transcripts.\n\nThis class manages the complete record of an alignment audit session,\nincluding metadata, conversation events, and message histories. It provides\nmethods for loading, saving, and analyzing audit transcripts.\n\nThe transcript system supports multiple \"views\" of the conversation such as:\n- \"target\": Messages from the target model's perspective\n- \"auditor\": Messages from the auditor's perspective \n- \"combined\": Unified view of the entire audit\n\nTranscripts also support conversation branching and rollback history,\nallowing analysis of different conversation paths explored during the audit.\n\nAttributes:\n metadata: Metadata about the audit session (models, timing, etc.)\n events: List of events that occurred during the audit (messages, tool calls, etc.)\n messages: Legacy field for message storage (deprecated)\n target_messages: Legacy field for target message storage (deprecated)\n \nExample:\n ```python\n # Load transcript from file\n transcript = Transcript.load(\"audit_results.json\")\n \n # Access metadata\n print(f\"Auditor: {transcript.metadata.auditor_model}\")\n print(f\"Target: {transcript.metadata.target_model}\")\n \n # Get conversation views\n target_messages = transcript.collect_messages(\"target\")\n \n # Format for display\n formatted = transcript.format_transcript(\"target\", skip_system=True)\n \n # Work with conversation branches\n branches = transcript.get_branches(\"target\")\n print(f\"Found {len(branches)} conversation branches\")\n \n # Save to file\n transcript.save(\"processed_audit.json\")\n ```",
2176
+ "properties": {
2177
+ "metadata": {
2178
+ "$ref": "#/$defs/TranscriptMetadata"
2179
+ },
2180
+ "events": {
2181
+ "items": {
2182
+ "discriminator": {
2183
+ "mapping": {
2184
+ "decision_event": "#/$defs/DecisionEvent",
2185
+ "info_event": "#/$defs/InfoEvent",
2186
+ "tool_creation_event": "#/$defs/ToolCreationEvent",
2187
+ "transcript_event": "#/$defs/TranscriptEvent"
2188
+ },
2189
+ "propertyName": "type"
2190
+ },
2191
+ "oneOf": [
2192
+ {
2193
+ "$ref": "#/$defs/TranscriptEvent"
2194
+ },
2195
+ {
2196
+ "$ref": "#/$defs/ToolCreationEvent"
2197
+ },
2198
+ {
2199
+ "$ref": "#/$defs/InfoEvent"
2200
+ },
2201
+ {
2202
+ "$ref": "#/$defs/DecisionEvent"
2203
+ }
2204
+ ]
2205
+ },
2206
+ "title": "Events",
2207
+ "type": "array"
2208
+ },
2209
+ "messages": {
2210
+ "items": {},
2211
+ "title": "Messages",
2212
+ "type": "array"
2213
+ },
2214
+ "target_messages": {
2215
+ "items": {},
2216
+ "title": "Target Messages",
2217
+ "type": "array"
2218
+ }
2219
+ },
2220
+ "required": [
2221
+ "metadata"
2222
+ ],
2223
+ "title": "Transcript",
2224
+ "type": "object"
2225
+ }