@gakr-gakr/codex 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/autobot.plugin.json +374 -0
  2. package/doctor-contract-api.ts +68 -0
  3. package/harness.ts +72 -0
  4. package/index.ts +124 -0
  5. package/media-understanding-provider.ts +521 -0
  6. package/package.json +40 -0
  7. package/prompt-overlay.ts +21 -0
  8. package/provider-catalog.ts +83 -0
  9. package/provider-discovery.ts +45 -0
  10. package/provider.ts +243 -0
  11. package/src/app-server/app-inventory-cache.ts +324 -0
  12. package/src/app-server/approval-bridge.ts +1211 -0
  13. package/src/app-server/auth-bridge.ts +614 -0
  14. package/src/app-server/capabilities.ts +27 -0
  15. package/src/app-server/client-factory.ts +24 -0
  16. package/src/app-server/client.ts +715 -0
  17. package/src/app-server/compact.ts +512 -0
  18. package/src/app-server/computer-use.ts +683 -0
  19. package/src/app-server/config.ts +1038 -0
  20. package/src/app-server/context-engine-projection.ts +403 -0
  21. package/src/app-server/dynamic-tool-diagnostics.ts +73 -0
  22. package/src/app-server/dynamic-tool-profile.ts +70 -0
  23. package/src/app-server/dynamic-tools.ts +623 -0
  24. package/src/app-server/elicitation-bridge.ts +783 -0
  25. package/src/app-server/event-projector.ts +2065 -0
  26. package/src/app-server/image-payload-sanitizer.ts +167 -0
  27. package/src/app-server/local-runtime-attribution.ts +39 -0
  28. package/src/app-server/managed-binary.ts +193 -0
  29. package/src/app-server/models.ts +172 -0
  30. package/src/app-server/native-hook-relay.ts +150 -0
  31. package/src/app-server/native-subagent-task-mirror.ts +497 -0
  32. package/src/app-server/plugin-activation.ts +283 -0
  33. package/src/app-server/plugin-app-cache-key.ts +74 -0
  34. package/src/app-server/plugin-approval-roundtrip.ts +122 -0
  35. package/src/app-server/plugin-inventory.ts +357 -0
  36. package/src/app-server/plugin-thread-config.ts +455 -0
  37. package/src/app-server/protocol-generated/json/DynamicToolCallParams.json +33 -0
  38. package/src/app-server/protocol-generated/json/v2/ErrorNotification.json +199 -0
  39. package/src/app-server/protocol-generated/json/v2/GetAccountResponse.json +102 -0
  40. package/src/app-server/protocol-generated/json/v2/ModelListResponse.json +227 -0
  41. package/src/app-server/protocol-generated/json/v2/ThreadResumeResponse.json +2630 -0
  42. package/src/app-server/protocol-generated/json/v2/ThreadStartResponse.json +2630 -0
  43. package/src/app-server/protocol-generated/json/v2/TurnCompletedNotification.json +1659 -0
  44. package/src/app-server/protocol-generated/json/v2/TurnStartResponse.json +1655 -0
  45. package/src/app-server/protocol-validators.ts +203 -0
  46. package/src/app-server/protocol.ts +520 -0
  47. package/src/app-server/rate-limit-cache.ts +48 -0
  48. package/src/app-server/rate-limits.ts +583 -0
  49. package/src/app-server/request.ts +73 -0
  50. package/src/app-server/run-attempt.ts +4862 -0
  51. package/src/app-server/session-binding.ts +398 -0
  52. package/src/app-server/session-history.ts +44 -0
  53. package/src/app-server/shared-client.ts +289 -0
  54. package/src/app-server/side-question.ts +1009 -0
  55. package/src/app-server/test-support.ts +48 -0
  56. package/src/app-server/thread-lifecycle.ts +959 -0
  57. package/src/app-server/timeout.ts +9 -0
  58. package/src/app-server/tool-progress-normalization.ts +77 -0
  59. package/src/app-server/trajectory.ts +368 -0
  60. package/src/app-server/transcript-mirror.ts +208 -0
  61. package/src/app-server/transport-stdio.ts +107 -0
  62. package/src/app-server/transport-websocket.ts +90 -0
  63. package/src/app-server/transport.ts +117 -0
  64. package/src/app-server/user-input-bridge.ts +316 -0
  65. package/src/app-server/version.ts +4 -0
  66. package/src/app-server/vision-tools.ts +12 -0
  67. package/src/command-account.ts +544 -0
  68. package/src/command-formatters.ts +426 -0
  69. package/src/command-handlers.ts +2021 -0
  70. package/src/command-plugins-management.ts +137 -0
  71. package/src/command-rpc.ts +142 -0
  72. package/src/commands.ts +65 -0
  73. package/src/conversation-binding-data.ts +124 -0
  74. package/src/conversation-binding.ts +561 -0
  75. package/src/conversation-control.ts +303 -0
  76. package/src/conversation-turn-collector.ts +186 -0
  77. package/src/conversation-turn-input.ts +106 -0
  78. package/src/migration/apply.ts +501 -0
  79. package/src/migration/helpers.ts +55 -0
  80. package/src/migration/plan.ts +461 -0
  81. package/src/migration/provider.ts +41 -0
  82. package/src/migration/source.ts +643 -0
  83. package/src/migration/targets.ts +25 -0
  84. package/src/node-cli-sessions.ts +711 -0
  85. package/test-api.ts +95 -0
  86. package/tsconfig.json +16 -0
@@ -0,0 +1,1655 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "TurnStartResponse",
4
+ "type": "object",
5
+ "required": [
6
+ "turn"
7
+ ],
8
+ "properties": {
9
+ "turn": {
10
+ "$ref": "#/definitions/Turn"
11
+ }
12
+ },
13
+ "definitions": {
14
+ "AbsolutePathBuf": {
15
+ "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
16
+ "type": "string"
17
+ },
18
+ "ByteRange": {
19
+ "type": "object",
20
+ "required": [
21
+ "end",
22
+ "start"
23
+ ],
24
+ "properties": {
25
+ "end": {
26
+ "type": "integer",
27
+ "format": "uint",
28
+ "minimum": 0
29
+ },
30
+ "start": {
31
+ "type": "integer",
32
+ "format": "uint",
33
+ "minimum": 0
34
+ }
35
+ }
36
+ },
37
+ "CodexErrorInfo": {
38
+ "description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.",
39
+ "oneOf": [
40
+ {
41
+ "type": "string",
42
+ "enum": [
43
+ "contextWindowExceeded",
44
+ "usageLimitExceeded",
45
+ "serverOverloaded",
46
+ "cyberPolicy",
47
+ "internalServerError",
48
+ "unauthorized",
49
+ "badRequest",
50
+ "threadRollbackFailed",
51
+ "sandboxError",
52
+ "other"
53
+ ]
54
+ },
55
+ {
56
+ "type": "object",
57
+ "required": [
58
+ "httpConnectionFailed"
59
+ ],
60
+ "properties": {
61
+ "httpConnectionFailed": {
62
+ "type": "object",
63
+ "properties": {
64
+ "httpStatusCode": {
65
+ "type": [
66
+ "integer",
67
+ "null"
68
+ ],
69
+ "format": "uint16",
70
+ "minimum": 0
71
+ }
72
+ }
73
+ }
74
+ },
75
+ "additionalProperties": false,
76
+ "title": "HttpConnectionFailedCodexErrorInfo"
77
+ },
78
+ {
79
+ "description": "Failed to connect to the response SSE stream.",
80
+ "type": "object",
81
+ "required": [
82
+ "responseStreamConnectionFailed"
83
+ ],
84
+ "properties": {
85
+ "responseStreamConnectionFailed": {
86
+ "type": "object",
87
+ "properties": {
88
+ "httpStatusCode": {
89
+ "type": [
90
+ "integer",
91
+ "null"
92
+ ],
93
+ "format": "uint16",
94
+ "minimum": 0
95
+ }
96
+ }
97
+ }
98
+ },
99
+ "additionalProperties": false,
100
+ "title": "ResponseStreamConnectionFailedCodexErrorInfo"
101
+ },
102
+ {
103
+ "description": "The response SSE stream disconnected in the middle of a turn before completion.",
104
+ "type": "object",
105
+ "required": [
106
+ "responseStreamDisconnected"
107
+ ],
108
+ "properties": {
109
+ "responseStreamDisconnected": {
110
+ "type": "object",
111
+ "properties": {
112
+ "httpStatusCode": {
113
+ "type": [
114
+ "integer",
115
+ "null"
116
+ ],
117
+ "format": "uint16",
118
+ "minimum": 0
119
+ }
120
+ }
121
+ }
122
+ },
123
+ "additionalProperties": false,
124
+ "title": "ResponseStreamDisconnectedCodexErrorInfo"
125
+ },
126
+ {
127
+ "description": "Reached the retry limit for responses.",
128
+ "type": "object",
129
+ "required": [
130
+ "responseTooManyFailedAttempts"
131
+ ],
132
+ "properties": {
133
+ "responseTooManyFailedAttempts": {
134
+ "type": "object",
135
+ "properties": {
136
+ "httpStatusCode": {
137
+ "type": [
138
+ "integer",
139
+ "null"
140
+ ],
141
+ "format": "uint16",
142
+ "minimum": 0
143
+ }
144
+ }
145
+ }
146
+ },
147
+ "additionalProperties": false,
148
+ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo"
149
+ },
150
+ {
151
+ "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.",
152
+ "type": "object",
153
+ "required": [
154
+ "activeTurnNotSteerable"
155
+ ],
156
+ "properties": {
157
+ "activeTurnNotSteerable": {
158
+ "type": "object",
159
+ "required": [
160
+ "turnKind"
161
+ ],
162
+ "properties": {
163
+ "turnKind": {
164
+ "$ref": "#/definitions/NonSteerableTurnKind"
165
+ }
166
+ }
167
+ }
168
+ },
169
+ "additionalProperties": false,
170
+ "title": "ActiveTurnNotSteerableCodexErrorInfo"
171
+ }
172
+ ]
173
+ },
174
+ "CollabAgentState": {
175
+ "type": "object",
176
+ "required": [
177
+ "status"
178
+ ],
179
+ "properties": {
180
+ "message": {
181
+ "type": [
182
+ "string",
183
+ "null"
184
+ ]
185
+ },
186
+ "status": {
187
+ "$ref": "#/definitions/CollabAgentStatus"
188
+ }
189
+ }
190
+ },
191
+ "CollabAgentStatus": {
192
+ "type": "string",
193
+ "enum": [
194
+ "pendingInit",
195
+ "running",
196
+ "interrupted",
197
+ "completed",
198
+ "errored",
199
+ "shutdown",
200
+ "notFound"
201
+ ]
202
+ },
203
+ "CollabAgentTool": {
204
+ "type": "string",
205
+ "enum": [
206
+ "spawnAgent",
207
+ "sendInput",
208
+ "resumeAgent",
209
+ "wait",
210
+ "closeAgent"
211
+ ]
212
+ },
213
+ "CollabAgentToolCallStatus": {
214
+ "type": "string",
215
+ "enum": [
216
+ "inProgress",
217
+ "completed",
218
+ "failed"
219
+ ]
220
+ },
221
+ "CommandAction": {
222
+ "oneOf": [
223
+ {
224
+ "type": "object",
225
+ "required": [
226
+ "command",
227
+ "name",
228
+ "path",
229
+ "type"
230
+ ],
231
+ "properties": {
232
+ "command": {
233
+ "type": "string"
234
+ },
235
+ "name": {
236
+ "type": "string"
237
+ },
238
+ "path": {
239
+ "$ref": "#/definitions/AbsolutePathBuf"
240
+ },
241
+ "type": {
242
+ "type": "string",
243
+ "enum": [
244
+ "read"
245
+ ],
246
+ "title": "ReadCommandActionType"
247
+ }
248
+ },
249
+ "title": "ReadCommandAction"
250
+ },
251
+ {
252
+ "type": "object",
253
+ "required": [
254
+ "command",
255
+ "type"
256
+ ],
257
+ "properties": {
258
+ "command": {
259
+ "type": "string"
260
+ },
261
+ "path": {
262
+ "type": [
263
+ "string",
264
+ "null"
265
+ ]
266
+ },
267
+ "type": {
268
+ "type": "string",
269
+ "enum": [
270
+ "listFiles"
271
+ ],
272
+ "title": "ListFilesCommandActionType"
273
+ }
274
+ },
275
+ "title": "ListFilesCommandAction"
276
+ },
277
+ {
278
+ "type": "object",
279
+ "required": [
280
+ "command",
281
+ "type"
282
+ ],
283
+ "properties": {
284
+ "command": {
285
+ "type": "string"
286
+ },
287
+ "path": {
288
+ "type": [
289
+ "string",
290
+ "null"
291
+ ]
292
+ },
293
+ "query": {
294
+ "type": [
295
+ "string",
296
+ "null"
297
+ ]
298
+ },
299
+ "type": {
300
+ "type": "string",
301
+ "enum": [
302
+ "search"
303
+ ],
304
+ "title": "SearchCommandActionType"
305
+ }
306
+ },
307
+ "title": "SearchCommandAction"
308
+ },
309
+ {
310
+ "type": "object",
311
+ "required": [
312
+ "command",
313
+ "type"
314
+ ],
315
+ "properties": {
316
+ "command": {
317
+ "type": "string"
318
+ },
319
+ "type": {
320
+ "type": "string",
321
+ "enum": [
322
+ "unknown"
323
+ ],
324
+ "title": "UnknownCommandActionType"
325
+ }
326
+ },
327
+ "title": "UnknownCommandAction"
328
+ }
329
+ ]
330
+ },
331
+ "CommandExecutionSource": {
332
+ "type": "string",
333
+ "enum": [
334
+ "agent",
335
+ "userShell",
336
+ "unifiedExecStartup",
337
+ "unifiedExecInteraction"
338
+ ]
339
+ },
340
+ "CommandExecutionStatus": {
341
+ "type": "string",
342
+ "enum": [
343
+ "inProgress",
344
+ "completed",
345
+ "failed",
346
+ "declined"
347
+ ]
348
+ },
349
+ "DynamicToolCallOutputContentItem": {
350
+ "oneOf": [
351
+ {
352
+ "type": "object",
353
+ "required": [
354
+ "text",
355
+ "type"
356
+ ],
357
+ "properties": {
358
+ "text": {
359
+ "type": "string"
360
+ },
361
+ "type": {
362
+ "type": "string",
363
+ "enum": [
364
+ "inputText"
365
+ ],
366
+ "title": "InputTextDynamicToolCallOutputContentItemType"
367
+ }
368
+ },
369
+ "title": "InputTextDynamicToolCallOutputContentItem"
370
+ },
371
+ {
372
+ "type": "object",
373
+ "required": [
374
+ "imageUrl",
375
+ "type"
376
+ ],
377
+ "properties": {
378
+ "imageUrl": {
379
+ "type": "string"
380
+ },
381
+ "type": {
382
+ "type": "string",
383
+ "enum": [
384
+ "inputImage"
385
+ ],
386
+ "title": "InputImageDynamicToolCallOutputContentItemType"
387
+ }
388
+ },
389
+ "title": "InputImageDynamicToolCallOutputContentItem"
390
+ }
391
+ ]
392
+ },
393
+ "DynamicToolCallStatus": {
394
+ "type": "string",
395
+ "enum": [
396
+ "inProgress",
397
+ "completed",
398
+ "failed"
399
+ ]
400
+ },
401
+ "FileUpdateChange": {
402
+ "type": "object",
403
+ "required": [
404
+ "diff",
405
+ "kind",
406
+ "path"
407
+ ],
408
+ "properties": {
409
+ "diff": {
410
+ "type": "string"
411
+ },
412
+ "kind": {
413
+ "$ref": "#/definitions/PatchChangeKind"
414
+ },
415
+ "path": {
416
+ "type": "string"
417
+ }
418
+ }
419
+ },
420
+ "HookPromptFragment": {
421
+ "type": "object",
422
+ "required": [
423
+ "hookRunId",
424
+ "text"
425
+ ],
426
+ "properties": {
427
+ "hookRunId": {
428
+ "type": "string"
429
+ },
430
+ "text": {
431
+ "type": "string"
432
+ }
433
+ }
434
+ },
435
+ "McpToolCallError": {
436
+ "type": "object",
437
+ "required": [
438
+ "message"
439
+ ],
440
+ "properties": {
441
+ "message": {
442
+ "type": "string"
443
+ }
444
+ }
445
+ },
446
+ "McpToolCallResult": {
447
+ "type": "object",
448
+ "required": [
449
+ "content"
450
+ ],
451
+ "properties": {
452
+ "_meta": true,
453
+ "content": {
454
+ "type": "array",
455
+ "items": true
456
+ },
457
+ "structuredContent": true
458
+ }
459
+ },
460
+ "McpToolCallStatus": {
461
+ "type": "string",
462
+ "enum": [
463
+ "inProgress",
464
+ "completed",
465
+ "failed"
466
+ ]
467
+ },
468
+ "MemoryCitation": {
469
+ "type": "object",
470
+ "required": [
471
+ "entries",
472
+ "threadIds"
473
+ ],
474
+ "properties": {
475
+ "entries": {
476
+ "type": "array",
477
+ "items": {
478
+ "$ref": "#/definitions/MemoryCitationEntry"
479
+ }
480
+ },
481
+ "threadIds": {
482
+ "type": "array",
483
+ "items": {
484
+ "type": "string"
485
+ }
486
+ }
487
+ }
488
+ },
489
+ "MemoryCitationEntry": {
490
+ "type": "object",
491
+ "required": [
492
+ "lineEnd",
493
+ "lineStart",
494
+ "note",
495
+ "path"
496
+ ],
497
+ "properties": {
498
+ "lineEnd": {
499
+ "type": "integer",
500
+ "format": "uint32",
501
+ "minimum": 0
502
+ },
503
+ "lineStart": {
504
+ "type": "integer",
505
+ "format": "uint32",
506
+ "minimum": 0
507
+ },
508
+ "note": {
509
+ "type": "string"
510
+ },
511
+ "path": {
512
+ "type": "string"
513
+ }
514
+ }
515
+ },
516
+ "MessagePhase": {
517
+ "description": "Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as \"phase unknown\" and keep compatibility behavior for legacy models.",
518
+ "oneOf": [
519
+ {
520
+ "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
521
+ "type": "string",
522
+ "enum": [
523
+ "commentary"
524
+ ]
525
+ },
526
+ {
527
+ "description": "The assistant's terminal answer text for the current turn.",
528
+ "type": "string",
529
+ "enum": [
530
+ "final_answer"
531
+ ]
532
+ }
533
+ ]
534
+ },
535
+ "NonSteerableTurnKind": {
536
+ "type": "string",
537
+ "enum": [
538
+ "review",
539
+ "compact"
540
+ ]
541
+ },
542
+ "PatchApplyStatus": {
543
+ "type": "string",
544
+ "enum": [
545
+ "inProgress",
546
+ "completed",
547
+ "failed",
548
+ "declined"
549
+ ]
550
+ },
551
+ "PatchChangeKind": {
552
+ "oneOf": [
553
+ {
554
+ "type": "object",
555
+ "required": [
556
+ "type"
557
+ ],
558
+ "properties": {
559
+ "type": {
560
+ "type": "string",
561
+ "enum": [
562
+ "add"
563
+ ],
564
+ "title": "AddPatchChangeKindType"
565
+ }
566
+ },
567
+ "title": "AddPatchChangeKind"
568
+ },
569
+ {
570
+ "type": "object",
571
+ "required": [
572
+ "type"
573
+ ],
574
+ "properties": {
575
+ "type": {
576
+ "type": "string",
577
+ "enum": [
578
+ "delete"
579
+ ],
580
+ "title": "DeletePatchChangeKindType"
581
+ }
582
+ },
583
+ "title": "DeletePatchChangeKind"
584
+ },
585
+ {
586
+ "type": "object",
587
+ "required": [
588
+ "type"
589
+ ],
590
+ "properties": {
591
+ "move_path": {
592
+ "type": [
593
+ "string",
594
+ "null"
595
+ ]
596
+ },
597
+ "type": {
598
+ "type": "string",
599
+ "enum": [
600
+ "update"
601
+ ],
602
+ "title": "UpdatePatchChangeKindType"
603
+ }
604
+ },
605
+ "title": "UpdatePatchChangeKind"
606
+ }
607
+ ]
608
+ },
609
+ "ReasoningEffort": {
610
+ "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
611
+ "type": "string",
612
+ "enum": [
613
+ "none",
614
+ "minimal",
615
+ "low",
616
+ "medium",
617
+ "high",
618
+ "xhigh"
619
+ ]
620
+ },
621
+ "TextElement": {
622
+ "type": "object",
623
+ "required": [
624
+ "byteRange"
625
+ ],
626
+ "properties": {
627
+ "byteRange": {
628
+ "description": "Byte range in the parent `text` buffer that this element occupies.",
629
+ "allOf": [
630
+ {
631
+ "$ref": "#/definitions/ByteRange"
632
+ }
633
+ ]
634
+ },
635
+ "placeholder": {
636
+ "description": "Optional human-readable placeholder for the element, displayed in the UI.",
637
+ "type": [
638
+ "string",
639
+ "null"
640
+ ]
641
+ }
642
+ }
643
+ },
644
+ "ThreadItem": {
645
+ "oneOf": [
646
+ {
647
+ "type": "object",
648
+ "required": [
649
+ "content",
650
+ "id",
651
+ "type"
652
+ ],
653
+ "properties": {
654
+ "content": {
655
+ "type": "array",
656
+ "items": {
657
+ "$ref": "#/definitions/UserInput"
658
+ }
659
+ },
660
+ "id": {
661
+ "type": "string"
662
+ },
663
+ "type": {
664
+ "type": "string",
665
+ "enum": [
666
+ "userMessage"
667
+ ],
668
+ "title": "UserMessageThreadItemType"
669
+ }
670
+ },
671
+ "title": "UserMessageThreadItem"
672
+ },
673
+ {
674
+ "type": "object",
675
+ "required": [
676
+ "fragments",
677
+ "id",
678
+ "type"
679
+ ],
680
+ "properties": {
681
+ "fragments": {
682
+ "type": "array",
683
+ "items": {
684
+ "$ref": "#/definitions/HookPromptFragment"
685
+ }
686
+ },
687
+ "id": {
688
+ "type": "string"
689
+ },
690
+ "type": {
691
+ "type": "string",
692
+ "enum": [
693
+ "hookPrompt"
694
+ ],
695
+ "title": "HookPromptThreadItemType"
696
+ }
697
+ },
698
+ "title": "HookPromptThreadItem"
699
+ },
700
+ {
701
+ "type": "object",
702
+ "required": [
703
+ "id",
704
+ "text",
705
+ "type"
706
+ ],
707
+ "properties": {
708
+ "id": {
709
+ "type": "string"
710
+ },
711
+ "memoryCitation": {
712
+ "default": null,
713
+ "anyOf": [
714
+ {
715
+ "$ref": "#/definitions/MemoryCitation"
716
+ },
717
+ {
718
+ "type": "null"
719
+ }
720
+ ]
721
+ },
722
+ "phase": {
723
+ "default": null,
724
+ "anyOf": [
725
+ {
726
+ "$ref": "#/definitions/MessagePhase"
727
+ },
728
+ {
729
+ "type": "null"
730
+ }
731
+ ]
732
+ },
733
+ "text": {
734
+ "type": "string"
735
+ },
736
+ "type": {
737
+ "type": "string",
738
+ "enum": [
739
+ "agentMessage"
740
+ ],
741
+ "title": "AgentMessageThreadItemType"
742
+ }
743
+ },
744
+ "title": "AgentMessageThreadItem"
745
+ },
746
+ {
747
+ "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
748
+ "type": "object",
749
+ "required": [
750
+ "id",
751
+ "text",
752
+ "type"
753
+ ],
754
+ "properties": {
755
+ "id": {
756
+ "type": "string"
757
+ },
758
+ "text": {
759
+ "type": "string"
760
+ },
761
+ "type": {
762
+ "type": "string",
763
+ "enum": [
764
+ "plan"
765
+ ],
766
+ "title": "PlanThreadItemType"
767
+ }
768
+ },
769
+ "title": "PlanThreadItem"
770
+ },
771
+ {
772
+ "type": "object",
773
+ "required": [
774
+ "id",
775
+ "type"
776
+ ],
777
+ "properties": {
778
+ "content": {
779
+ "default": [],
780
+ "type": "array",
781
+ "items": {
782
+ "type": "string"
783
+ }
784
+ },
785
+ "id": {
786
+ "type": "string"
787
+ },
788
+ "summary": {
789
+ "default": [],
790
+ "type": "array",
791
+ "items": {
792
+ "type": "string"
793
+ }
794
+ },
795
+ "type": {
796
+ "type": "string",
797
+ "enum": [
798
+ "reasoning"
799
+ ],
800
+ "title": "ReasoningThreadItemType"
801
+ }
802
+ },
803
+ "title": "ReasoningThreadItem"
804
+ },
805
+ {
806
+ "type": "object",
807
+ "required": [
808
+ "command",
809
+ "commandActions",
810
+ "cwd",
811
+ "id",
812
+ "status",
813
+ "type"
814
+ ],
815
+ "properties": {
816
+ "aggregatedOutput": {
817
+ "description": "The command's output, aggregated from stdout and stderr.",
818
+ "type": [
819
+ "string",
820
+ "null"
821
+ ]
822
+ },
823
+ "command": {
824
+ "description": "The command to be executed.",
825
+ "type": "string"
826
+ },
827
+ "commandActions": {
828
+ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.",
829
+ "type": "array",
830
+ "items": {
831
+ "$ref": "#/definitions/CommandAction"
832
+ }
833
+ },
834
+ "cwd": {
835
+ "description": "The command's working directory.",
836
+ "allOf": [
837
+ {
838
+ "$ref": "#/definitions/AbsolutePathBuf"
839
+ }
840
+ ]
841
+ },
842
+ "durationMs": {
843
+ "description": "The duration of the command execution in milliseconds.",
844
+ "type": [
845
+ "integer",
846
+ "null"
847
+ ],
848
+ "format": "int64"
849
+ },
850
+ "exitCode": {
851
+ "description": "The command's exit code.",
852
+ "type": [
853
+ "integer",
854
+ "null"
855
+ ],
856
+ "format": "int32"
857
+ },
858
+ "id": {
859
+ "type": "string"
860
+ },
861
+ "processId": {
862
+ "description": "Identifier for the underlying PTY process (when available).",
863
+ "type": [
864
+ "string",
865
+ "null"
866
+ ]
867
+ },
868
+ "source": {
869
+ "default": "agent",
870
+ "allOf": [
871
+ {
872
+ "$ref": "#/definitions/CommandExecutionSource"
873
+ }
874
+ ]
875
+ },
876
+ "status": {
877
+ "$ref": "#/definitions/CommandExecutionStatus"
878
+ },
879
+ "type": {
880
+ "type": "string",
881
+ "enum": [
882
+ "commandExecution"
883
+ ],
884
+ "title": "CommandExecutionThreadItemType"
885
+ }
886
+ },
887
+ "title": "CommandExecutionThreadItem"
888
+ },
889
+ {
890
+ "type": "object",
891
+ "required": [
892
+ "changes",
893
+ "id",
894
+ "status",
895
+ "type"
896
+ ],
897
+ "properties": {
898
+ "changes": {
899
+ "type": "array",
900
+ "items": {
901
+ "$ref": "#/definitions/FileUpdateChange"
902
+ }
903
+ },
904
+ "id": {
905
+ "type": "string"
906
+ },
907
+ "status": {
908
+ "$ref": "#/definitions/PatchApplyStatus"
909
+ },
910
+ "type": {
911
+ "type": "string",
912
+ "enum": [
913
+ "fileChange"
914
+ ],
915
+ "title": "FileChangeThreadItemType"
916
+ }
917
+ },
918
+ "title": "FileChangeThreadItem"
919
+ },
920
+ {
921
+ "type": "object",
922
+ "required": [
923
+ "arguments",
924
+ "id",
925
+ "server",
926
+ "status",
927
+ "tool",
928
+ "type"
929
+ ],
930
+ "properties": {
931
+ "arguments": true,
932
+ "durationMs": {
933
+ "description": "The duration of the MCP tool call in milliseconds.",
934
+ "type": [
935
+ "integer",
936
+ "null"
937
+ ],
938
+ "format": "int64"
939
+ },
940
+ "error": {
941
+ "anyOf": [
942
+ {
943
+ "$ref": "#/definitions/McpToolCallError"
944
+ },
945
+ {
946
+ "type": "null"
947
+ }
948
+ ]
949
+ },
950
+ "id": {
951
+ "type": "string"
952
+ },
953
+ "mcpAppResourceUri": {
954
+ "type": [
955
+ "string",
956
+ "null"
957
+ ]
958
+ },
959
+ "result": {
960
+ "anyOf": [
961
+ {
962
+ "$ref": "#/definitions/McpToolCallResult"
963
+ },
964
+ {
965
+ "type": "null"
966
+ }
967
+ ]
968
+ },
969
+ "server": {
970
+ "type": "string"
971
+ },
972
+ "status": {
973
+ "$ref": "#/definitions/McpToolCallStatus"
974
+ },
975
+ "tool": {
976
+ "type": "string"
977
+ },
978
+ "type": {
979
+ "type": "string",
980
+ "enum": [
981
+ "mcpToolCall"
982
+ ],
983
+ "title": "McpToolCallThreadItemType"
984
+ }
985
+ },
986
+ "title": "McpToolCallThreadItem"
987
+ },
988
+ {
989
+ "type": "object",
990
+ "required": [
991
+ "arguments",
992
+ "id",
993
+ "status",
994
+ "tool",
995
+ "type"
996
+ ],
997
+ "properties": {
998
+ "arguments": true,
999
+ "contentItems": {
1000
+ "type": [
1001
+ "array",
1002
+ "null"
1003
+ ],
1004
+ "items": {
1005
+ "$ref": "#/definitions/DynamicToolCallOutputContentItem"
1006
+ }
1007
+ },
1008
+ "durationMs": {
1009
+ "description": "The duration of the dynamic tool call in milliseconds.",
1010
+ "type": [
1011
+ "integer",
1012
+ "null"
1013
+ ],
1014
+ "format": "int64"
1015
+ },
1016
+ "id": {
1017
+ "type": "string"
1018
+ },
1019
+ "namespace": {
1020
+ "type": [
1021
+ "string",
1022
+ "null"
1023
+ ]
1024
+ },
1025
+ "status": {
1026
+ "$ref": "#/definitions/DynamicToolCallStatus"
1027
+ },
1028
+ "success": {
1029
+ "type": [
1030
+ "boolean",
1031
+ "null"
1032
+ ]
1033
+ },
1034
+ "tool": {
1035
+ "type": "string"
1036
+ },
1037
+ "type": {
1038
+ "type": "string",
1039
+ "enum": [
1040
+ "dynamicToolCall"
1041
+ ],
1042
+ "title": "DynamicToolCallThreadItemType"
1043
+ }
1044
+ },
1045
+ "title": "DynamicToolCallThreadItem"
1046
+ },
1047
+ {
1048
+ "type": "object",
1049
+ "required": [
1050
+ "agentsStates",
1051
+ "id",
1052
+ "receiverThreadIds",
1053
+ "senderThreadId",
1054
+ "status",
1055
+ "tool",
1056
+ "type"
1057
+ ],
1058
+ "properties": {
1059
+ "agentsStates": {
1060
+ "description": "Last known status of the target agents, when available.",
1061
+ "type": "object",
1062
+ "additionalProperties": {
1063
+ "$ref": "#/definitions/CollabAgentState"
1064
+ }
1065
+ },
1066
+ "id": {
1067
+ "description": "Unique identifier for this collab tool call.",
1068
+ "type": "string"
1069
+ },
1070
+ "model": {
1071
+ "description": "Model requested for the spawned agent, when applicable.",
1072
+ "type": [
1073
+ "string",
1074
+ "null"
1075
+ ]
1076
+ },
1077
+ "prompt": {
1078
+ "description": "Prompt text sent as part of the collab tool call, when available.",
1079
+ "type": [
1080
+ "string",
1081
+ "null"
1082
+ ]
1083
+ },
1084
+ "reasoningEffort": {
1085
+ "description": "Reasoning effort requested for the spawned agent, when applicable.",
1086
+ "anyOf": [
1087
+ {
1088
+ "$ref": "#/definitions/ReasoningEffort"
1089
+ },
1090
+ {
1091
+ "type": "null"
1092
+ }
1093
+ ]
1094
+ },
1095
+ "receiverThreadIds": {
1096
+ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
1097
+ "type": "array",
1098
+ "items": {
1099
+ "type": "string"
1100
+ }
1101
+ },
1102
+ "senderThreadId": {
1103
+ "description": "Thread ID of the agent issuing the collab request.",
1104
+ "type": "string"
1105
+ },
1106
+ "status": {
1107
+ "description": "Current status of the collab tool call.",
1108
+ "allOf": [
1109
+ {
1110
+ "$ref": "#/definitions/CollabAgentToolCallStatus"
1111
+ }
1112
+ ]
1113
+ },
1114
+ "tool": {
1115
+ "description": "Name of the collab tool that was invoked.",
1116
+ "allOf": [
1117
+ {
1118
+ "$ref": "#/definitions/CollabAgentTool"
1119
+ }
1120
+ ]
1121
+ },
1122
+ "type": {
1123
+ "type": "string",
1124
+ "enum": [
1125
+ "collabAgentToolCall"
1126
+ ],
1127
+ "title": "CollabAgentToolCallThreadItemType"
1128
+ }
1129
+ },
1130
+ "title": "CollabAgentToolCallThreadItem"
1131
+ },
1132
+ {
1133
+ "type": "object",
1134
+ "required": [
1135
+ "id",
1136
+ "query",
1137
+ "type"
1138
+ ],
1139
+ "properties": {
1140
+ "action": {
1141
+ "anyOf": [
1142
+ {
1143
+ "$ref": "#/definitions/WebSearchAction"
1144
+ },
1145
+ {
1146
+ "type": "null"
1147
+ }
1148
+ ]
1149
+ },
1150
+ "id": {
1151
+ "type": "string"
1152
+ },
1153
+ "query": {
1154
+ "type": "string"
1155
+ },
1156
+ "type": {
1157
+ "type": "string",
1158
+ "enum": [
1159
+ "webSearch"
1160
+ ],
1161
+ "title": "WebSearchThreadItemType"
1162
+ }
1163
+ },
1164
+ "title": "WebSearchThreadItem"
1165
+ },
1166
+ {
1167
+ "type": "object",
1168
+ "required": [
1169
+ "id",
1170
+ "path",
1171
+ "type"
1172
+ ],
1173
+ "properties": {
1174
+ "id": {
1175
+ "type": "string"
1176
+ },
1177
+ "path": {
1178
+ "$ref": "#/definitions/AbsolutePathBuf"
1179
+ },
1180
+ "type": {
1181
+ "type": "string",
1182
+ "enum": [
1183
+ "imageView"
1184
+ ],
1185
+ "title": "ImageViewThreadItemType"
1186
+ }
1187
+ },
1188
+ "title": "ImageViewThreadItem"
1189
+ },
1190
+ {
1191
+ "type": "object",
1192
+ "required": [
1193
+ "id",
1194
+ "result",
1195
+ "status",
1196
+ "type"
1197
+ ],
1198
+ "properties": {
1199
+ "id": {
1200
+ "type": "string"
1201
+ },
1202
+ "result": {
1203
+ "type": "string"
1204
+ },
1205
+ "revisedPrompt": {
1206
+ "type": [
1207
+ "string",
1208
+ "null"
1209
+ ]
1210
+ },
1211
+ "savedPath": {
1212
+ "anyOf": [
1213
+ {
1214
+ "$ref": "#/definitions/AbsolutePathBuf"
1215
+ },
1216
+ {
1217
+ "type": "null"
1218
+ }
1219
+ ]
1220
+ },
1221
+ "status": {
1222
+ "type": "string"
1223
+ },
1224
+ "type": {
1225
+ "type": "string",
1226
+ "enum": [
1227
+ "imageGeneration"
1228
+ ],
1229
+ "title": "ImageGenerationThreadItemType"
1230
+ }
1231
+ },
1232
+ "title": "ImageGenerationThreadItem"
1233
+ },
1234
+ {
1235
+ "type": "object",
1236
+ "required": [
1237
+ "id",
1238
+ "review",
1239
+ "type"
1240
+ ],
1241
+ "properties": {
1242
+ "id": {
1243
+ "type": "string"
1244
+ },
1245
+ "review": {
1246
+ "type": "string"
1247
+ },
1248
+ "type": {
1249
+ "type": "string",
1250
+ "enum": [
1251
+ "enteredReviewMode"
1252
+ ],
1253
+ "title": "EnteredReviewModeThreadItemType"
1254
+ }
1255
+ },
1256
+ "title": "EnteredReviewModeThreadItem"
1257
+ },
1258
+ {
1259
+ "type": "object",
1260
+ "required": [
1261
+ "id",
1262
+ "review",
1263
+ "type"
1264
+ ],
1265
+ "properties": {
1266
+ "id": {
1267
+ "type": "string"
1268
+ },
1269
+ "review": {
1270
+ "type": "string"
1271
+ },
1272
+ "type": {
1273
+ "type": "string",
1274
+ "enum": [
1275
+ "exitedReviewMode"
1276
+ ],
1277
+ "title": "ExitedReviewModeThreadItemType"
1278
+ }
1279
+ },
1280
+ "title": "ExitedReviewModeThreadItem"
1281
+ },
1282
+ {
1283
+ "type": "object",
1284
+ "required": [
1285
+ "id",
1286
+ "type"
1287
+ ],
1288
+ "properties": {
1289
+ "id": {
1290
+ "type": "string"
1291
+ },
1292
+ "type": {
1293
+ "type": "string",
1294
+ "enum": [
1295
+ "contextCompaction"
1296
+ ],
1297
+ "title": "ContextCompactionThreadItemType"
1298
+ }
1299
+ },
1300
+ "title": "ContextCompactionThreadItem"
1301
+ }
1302
+ ]
1303
+ },
1304
+ "Turn": {
1305
+ "type": "object",
1306
+ "required": [
1307
+ "id",
1308
+ "items",
1309
+ "status"
1310
+ ],
1311
+ "properties": {
1312
+ "completedAt": {
1313
+ "description": "Unix timestamp (in seconds) when the turn completed.",
1314
+ "type": [
1315
+ "integer",
1316
+ "null"
1317
+ ],
1318
+ "format": "int64"
1319
+ },
1320
+ "durationMs": {
1321
+ "description": "Duration between turn start and completion in milliseconds, if known.",
1322
+ "type": [
1323
+ "integer",
1324
+ "null"
1325
+ ],
1326
+ "format": "int64"
1327
+ },
1328
+ "error": {
1329
+ "description": "Only populated when the Turn's status is failed.",
1330
+ "anyOf": [
1331
+ {
1332
+ "$ref": "#/definitions/TurnError"
1333
+ },
1334
+ {
1335
+ "type": "null"
1336
+ }
1337
+ ]
1338
+ },
1339
+ "id": {
1340
+ "type": "string"
1341
+ },
1342
+ "items": {
1343
+ "description": "Thread items currently included in this turn payload.",
1344
+ "type": "array",
1345
+ "items": {
1346
+ "$ref": "#/definitions/ThreadItem"
1347
+ }
1348
+ },
1349
+ "itemsView": {
1350
+ "description": "Describes how much of `items` has been loaded for this turn.",
1351
+ "default": "full",
1352
+ "allOf": [
1353
+ {
1354
+ "$ref": "#/definitions/TurnItemsView"
1355
+ }
1356
+ ]
1357
+ },
1358
+ "startedAt": {
1359
+ "description": "Unix timestamp (in seconds) when the turn started.",
1360
+ "type": [
1361
+ "integer",
1362
+ "null"
1363
+ ],
1364
+ "format": "int64"
1365
+ },
1366
+ "status": {
1367
+ "$ref": "#/definitions/TurnStatus"
1368
+ }
1369
+ }
1370
+ },
1371
+ "TurnError": {
1372
+ "type": "object",
1373
+ "required": [
1374
+ "message"
1375
+ ],
1376
+ "properties": {
1377
+ "additionalDetails": {
1378
+ "default": null,
1379
+ "type": [
1380
+ "string",
1381
+ "null"
1382
+ ]
1383
+ },
1384
+ "codexErrorInfo": {
1385
+ "anyOf": [
1386
+ {
1387
+ "$ref": "#/definitions/CodexErrorInfo"
1388
+ },
1389
+ {
1390
+ "type": "null"
1391
+ }
1392
+ ]
1393
+ },
1394
+ "message": {
1395
+ "type": "string"
1396
+ }
1397
+ }
1398
+ },
1399
+ "TurnItemsView": {
1400
+ "oneOf": [
1401
+ {
1402
+ "description": "`items` was not loaded for this turn. The field is intentionally empty.",
1403
+ "type": "string",
1404
+ "enum": [
1405
+ "notLoaded"
1406
+ ]
1407
+ },
1408
+ {
1409
+ "description": "`items` contains only a display summary for this turn.",
1410
+ "type": "string",
1411
+ "enum": [
1412
+ "summary"
1413
+ ]
1414
+ },
1415
+ {
1416
+ "description": "`items` contains every ThreadItem available from persisted app-server history for this turn.",
1417
+ "type": "string",
1418
+ "enum": [
1419
+ "full"
1420
+ ]
1421
+ }
1422
+ ]
1423
+ },
1424
+ "TurnStatus": {
1425
+ "type": "string",
1426
+ "enum": [
1427
+ "completed",
1428
+ "interrupted",
1429
+ "failed",
1430
+ "inProgress"
1431
+ ]
1432
+ },
1433
+ "UserInput": {
1434
+ "oneOf": [
1435
+ {
1436
+ "type": "object",
1437
+ "required": [
1438
+ "text",
1439
+ "type"
1440
+ ],
1441
+ "properties": {
1442
+ "text": {
1443
+ "type": "string"
1444
+ },
1445
+ "text_elements": {
1446
+ "description": "UI-defined spans within `text` used to render or persist special elements.",
1447
+ "default": [],
1448
+ "type": "array",
1449
+ "items": {
1450
+ "$ref": "#/definitions/TextElement"
1451
+ }
1452
+ },
1453
+ "type": {
1454
+ "type": "string",
1455
+ "enum": [
1456
+ "text"
1457
+ ],
1458
+ "title": "TextUserInputType"
1459
+ }
1460
+ },
1461
+ "title": "TextUserInput"
1462
+ },
1463
+ {
1464
+ "type": "object",
1465
+ "required": [
1466
+ "type",
1467
+ "url"
1468
+ ],
1469
+ "properties": {
1470
+ "type": {
1471
+ "type": "string",
1472
+ "enum": [
1473
+ "image"
1474
+ ],
1475
+ "title": "ImageUserInputType"
1476
+ },
1477
+ "url": {
1478
+ "type": "string"
1479
+ }
1480
+ },
1481
+ "title": "ImageUserInput"
1482
+ },
1483
+ {
1484
+ "type": "object",
1485
+ "required": [
1486
+ "path",
1487
+ "type"
1488
+ ],
1489
+ "properties": {
1490
+ "path": {
1491
+ "type": "string"
1492
+ },
1493
+ "type": {
1494
+ "type": "string",
1495
+ "enum": [
1496
+ "localImage"
1497
+ ],
1498
+ "title": "LocalImageUserInputType"
1499
+ }
1500
+ },
1501
+ "title": "LocalImageUserInput"
1502
+ },
1503
+ {
1504
+ "type": "object",
1505
+ "required": [
1506
+ "name",
1507
+ "path",
1508
+ "type"
1509
+ ],
1510
+ "properties": {
1511
+ "name": {
1512
+ "type": "string"
1513
+ },
1514
+ "path": {
1515
+ "type": "string"
1516
+ },
1517
+ "type": {
1518
+ "type": "string",
1519
+ "enum": [
1520
+ "skill"
1521
+ ],
1522
+ "title": "SkillUserInputType"
1523
+ }
1524
+ },
1525
+ "title": "SkillUserInput"
1526
+ },
1527
+ {
1528
+ "type": "object",
1529
+ "required": [
1530
+ "name",
1531
+ "path",
1532
+ "type"
1533
+ ],
1534
+ "properties": {
1535
+ "name": {
1536
+ "type": "string"
1537
+ },
1538
+ "path": {
1539
+ "type": "string"
1540
+ },
1541
+ "type": {
1542
+ "type": "string",
1543
+ "enum": [
1544
+ "mention"
1545
+ ],
1546
+ "title": "MentionUserInputType"
1547
+ }
1548
+ },
1549
+ "title": "MentionUserInput"
1550
+ }
1551
+ ]
1552
+ },
1553
+ "WebSearchAction": {
1554
+ "oneOf": [
1555
+ {
1556
+ "type": "object",
1557
+ "required": [
1558
+ "type"
1559
+ ],
1560
+ "properties": {
1561
+ "queries": {
1562
+ "type": [
1563
+ "array",
1564
+ "null"
1565
+ ],
1566
+ "items": {
1567
+ "type": "string"
1568
+ }
1569
+ },
1570
+ "query": {
1571
+ "type": [
1572
+ "string",
1573
+ "null"
1574
+ ]
1575
+ },
1576
+ "type": {
1577
+ "type": "string",
1578
+ "enum": [
1579
+ "search"
1580
+ ],
1581
+ "title": "SearchWebSearchActionType"
1582
+ }
1583
+ },
1584
+ "title": "SearchWebSearchAction"
1585
+ },
1586
+ {
1587
+ "type": "object",
1588
+ "required": [
1589
+ "type"
1590
+ ],
1591
+ "properties": {
1592
+ "type": {
1593
+ "type": "string",
1594
+ "enum": [
1595
+ "openPage"
1596
+ ],
1597
+ "title": "OpenPageWebSearchActionType"
1598
+ },
1599
+ "url": {
1600
+ "type": [
1601
+ "string",
1602
+ "null"
1603
+ ]
1604
+ }
1605
+ },
1606
+ "title": "OpenPageWebSearchAction"
1607
+ },
1608
+ {
1609
+ "type": "object",
1610
+ "required": [
1611
+ "type"
1612
+ ],
1613
+ "properties": {
1614
+ "pattern": {
1615
+ "type": [
1616
+ "string",
1617
+ "null"
1618
+ ]
1619
+ },
1620
+ "type": {
1621
+ "type": "string",
1622
+ "enum": [
1623
+ "findInPage"
1624
+ ],
1625
+ "title": "FindInPageWebSearchActionType"
1626
+ },
1627
+ "url": {
1628
+ "type": [
1629
+ "string",
1630
+ "null"
1631
+ ]
1632
+ }
1633
+ },
1634
+ "title": "FindInPageWebSearchAction"
1635
+ },
1636
+ {
1637
+ "type": "object",
1638
+ "required": [
1639
+ "type"
1640
+ ],
1641
+ "properties": {
1642
+ "type": {
1643
+ "type": "string",
1644
+ "enum": [
1645
+ "other"
1646
+ ],
1647
+ "title": "OtherWebSearchActionType"
1648
+ }
1649
+ },
1650
+ "title": "OtherWebSearchAction"
1651
+ }
1652
+ ]
1653
+ }
1654
+ }
1655
+ }