forked from omnigent-ai/omnigent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
7762 lines (7762 loc) · 303 KB
/
Copy pathopenapi.json
File metadata and controls
7762 lines (7762 loc) · 303 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"components": {
"schemas": {
"AddCommentRequest": {
"description": "Request body for ``POST /sessions/{id}/comments``.\n\n:param path: File path relative to workspace root,\n e.g. ``\"src/App.tsx\"``.\n:param body: The comment text.\n:param start_index: 0-based absolute character offset (inclusive)\n within the file where the anchor range begins.\n:param end_index: 0-based absolute character offset (exclusive)\n within the file where the anchor range ends.\n:param anchor_content: Plain-text snapshot of the selected range, used\n to re-anchor the comment after file edits. ``None`` if not provided.",
"properties": {
"anchor_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Anchor Content"
},
"body": {
"title": "Body",
"type": "string"
},
"end_index": {
"title": "End Index",
"type": "integer"
},
"path": {
"title": "Path",
"type": "string"
},
"start_index": {
"title": "Start Index",
"type": "integer"
}
},
"required": [
"path",
"body",
"start_index",
"end_index"
],
"title": "AddCommentRequest",
"type": "object"
},
"AgentObject": {
"description": "API representation of a registered agent.\n\n:param id: Unique agent identifier, e.g. ``\"ag_abc123\"``.\n:param object: Fixed resource type, always ``\"agent\"``.\n:param name: Human-readable agent name,\n e.g. ``\"research-agent\"``.\n:param version: Monotonic version counter. Starts at 1,\n incremented on each update.\n:param description: Optional free-text description of the\n agent's purpose.\n:param created_at: Unix epoch timestamp of creation.\n:param updated_at: Unix epoch timestamp of the last update,\n or ``None`` if never updated.\n:param harness: The agent's harness/kind, e.g. ``\"codex\"``,\n ``\"codex-native\"``, or ``\"claude-native\"`` for\n ``executor.type: omnigent`` agents, otherwise the executor\n type (``\"claude_sdk\"``, ``\"agents_sdk\"``). ``None`` when the\n bundle cannot be loaded. Lets the Web UI Add Agent picker\n recognise an agent's kind (Codex vs Claude) without\n hardcoding by name slug.\n:param mcp_servers: MCP servers the agent is connected to\n (secret fields omitted). Empty list when the spec\n declares no MCP servers or when the bundle cannot be\n loaded.\n:param policies: Guardrails policies declared on the agent.\n Each entry summarises the policy name, type, and\n phases. Empty list when the spec declares no policies\n or when the bundle cannot be loaded.\n:param skills: Skills bundled in the agent spec\n (``skills/<name>/SKILL.md``). Lets the Web UI's\n new-session composer offer a slash-command menu before a\n session (and its runner) exists. Host-discovered skills\n are runner-owned, so they are NOT listed here \u2014 the\n session snapshot's ``skills`` field carries the merged\n set once a runner is bound. Empty list when the spec\n bundles no skills or when the bundle cannot be loaded.\n:param terminals: Terminal names declared in the spec's\n ``terminals:`` block, in declaration order, e.g.\n ``[\"shell\"]``. The Web UI gates its \"new terminal\"\n affordance on this list (creation is only offered for\n agents with terminal access) and offers these names as\n the launchable choices. Empty list when the spec\n declares no terminals or when the bundle cannot be\n loaded.",
"properties": {
"created_at": {
"title": "Created At",
"type": "integer"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"harness": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Harness"
},
"id": {
"title": "Id",
"type": "string"
},
"mcp_servers": {
"items": {
"$ref": "#/components/schemas/MCPServerSummary"
},
"title": "Mcp Servers",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"object": {
"default": "agent",
"title": "Object",
"type": "string"
},
"policies": {
"items": {
"$ref": "#/components/schemas/PolicySummary"
},
"title": "Policies",
"type": "array"
},
"skills": {
"items": {
"$ref": "#/components/schemas/SkillSummary"
},
"title": "Skills",
"type": "array"
},
"terminals": {
"items": {
"type": "string"
},
"title": "Terminals",
"type": "array"
},
"updated_at": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Updated At"
},
"version": {
"default": 1,
"title": "Version",
"type": "integer"
}
},
"required": [
"id",
"name",
"created_at"
],
"title": "AgentObject",
"type": "object"
},
"Body_update_session_agent_v1_sessions__session_id__agent_put": {
"properties": {
"bundle": {
"contentMediaType": "application/octet-stream",
"title": "Bundle",
"type": "string"
}
},
"required": [
"bundle"
],
"title": "Body_update_session_agent_v1_sessions__session_id__agent_put",
"type": "object"
},
"Body_upload_session_file_v1_sessions__session_id__resources_files_post": {
"properties": {
"file": {
"contentMediaType": "application/octet-stream",
"title": "File",
"type": "string"
}
},
"required": [
"file"
],
"title": "Body_upload_session_file_v1_sessions__session_id__resources_files_post",
"type": "object"
},
"CancelledEvent": {
"description": "Terminal event for a turn cancelled before completion.\n\n:param type: Always ``\"response.cancelled\"``.\n:param response: The final response object with\n ``status=\"cancelled\"``.",
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseObject"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"type": {
"const": "response.cancelled",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"response"
],
"title": "CancelledEvent",
"type": "object"
},
"ClientTaskCancelEvent": {
"description": "Server-side request that the client cancel a tunneled tool call.\n\nEmitted by ``omnigent/runtime/workflow.py`` when a parent\ncancellation needs to propagate to a long-running async client\ntool. Wire shape matches ``workflow.py:4258-4266``.\n\n:param type: Always ``\"response.client_task.cancel\"``.\n:param task_id: Identifier of the client-side task being\n cancelled, e.g. ``\"resp_async_abc\"``.\n:param call_id: Synthetic ``call_id`` the SDK uses to\n reconcile the local task; ``None`` when no pending tool\n call row exists for the task.",
"properties": {
"call_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Call Id"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"task_id": {
"title": "Task Id",
"type": "string"
},
"type": {
"const": "response.client_task.cancel",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"task_id"
],
"title": "ClientTaskCancelEvent",
"type": "object"
},
"CompactionCompletedEvent": {
"description": "Conversation history compaction has finished.\n\nEmitted by ``omnigent/server/routes/sessions.py`` after\n``compact_conversation_now()`` returns successfully. Clients\nthat rendered a \"Compacting\u2026\" spinner on\n:class:`CompactionInProgressEvent` should upgrade it to the\npermanent \"Conversation compacted\" marker on this event.\n\n:param type: Always ``\"response.compaction.completed\"``.\n:param total_tokens: Tiktoken estimate of the post-compaction\n message context size, e.g. ``8421``. Used by clients to\n update the context-ring immediately without waiting for the\n next ``response.completed`` usage report. ``None`` when\n token counting is unavailable.",
"properties": {
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"total_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Total Tokens"
},
"type": {
"const": "response.compaction.completed",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "CompactionCompletedEvent",
"type": "object"
},
"CompactionFailedEvent": {
"description": "Conversation history compaction failed.\n\nEmitted by ``omnigent/server/routes/sessions.py`` when\n``compact_conversation_now()`` raises. Clients that rendered a\n\"Compacting\u2026\" spinner on :class:`CompactionInProgressEvent`\nshould dismiss it without leaving a permanent marker, since the\nconversation history was not modified.\n\n:param type: Always ``\"response.compaction.failed\"``.",
"properties": {
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"type": {
"const": "response.compaction.failed",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "CompactionFailedEvent",
"type": "object"
},
"CompactionInProgressEvent": {
"description": "Conversation history is being compacted.\n\nEmitted by ``omnigent/runtime/compaction.py`` while a\ncompaction step runs so clients can render a \"summarizing\nhistory\u2026\" indicator. Wire shape matches ``compaction.py:765``.\n\n:param type: Always ``\"response.compaction.in_progress\"``.",
"properties": {
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"type": {
"const": "response.compaction.in_progress",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "CompactionInProgressEvent",
"type": "object"
},
"CompletedEvent": {
"description": "Terminal event for a successfully completed turn.\n\nCarries the final\n:class:`omnigent.server.schemas.ResponseObject`.\n\n:param type: Always ``\"response.completed\"``.\n:param response: The final response object with\n ``status=\"completed\"``.",
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseObject"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"type": {
"const": "response.completed",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"response"
],
"title": "CompletedEvent",
"type": "object"
},
"ConversationRef": {
"description": "Lightweight reference to a conversation, used in request and\nresponse bodies where only the conversation ID is needed.\n\n:param id: Conversation identifier, e.g. ``\"conv_abc123\"``.",
"properties": {
"id": {
"title": "Id",
"type": "string"
}
},
"required": [
"id"
],
"title": "ConversationRef",
"type": "object"
},
"CreateDefaultPolicyRequest": {
"description": "Request body for ``POST /v1/policies``.\n\n:param name: Human-readable policy name. Must be globally\n unique, e.g. ``\"block_non_feature_branch_push\"``.\n:param type: Handler discriminator: ``\"python\"``, ``\"url\"``,\n:param handler: Dotted import path (python) or HTTPS URL\n (url), e.g.\n ``\"github_mcp_policy.block_non_misc_push\"``\n or ``\"https://example.com/policies/eval\"``.\n:param factory_params: Optional dict of kwargs passed to the\n handler when it is a factory function. Only valid for\n ``type=\"python\"``, e.g. ``{\"limit\": 10}``.",
"properties": {
"factory_params": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Factory Params"
},
"handler": {
"title": "Handler",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"name",
"type",
"handler"
],
"title": "CreateDefaultPolicyRequest",
"type": "object"
},
"CreateSessionPolicyRequest": {
"description": "Request body for ``POST /v1/sessions/{session_id}/policies``.\n\n:param name: Human-readable policy name. Must be unique\n within the session, e.g.\n ``\"block_non_feature_branch_push\"``.\n:param type: Handler discriminator: ``\"python\"`` or\n ``\"url\"``.\n:param handler: Dotted import path (python) or HTTPS URL\n (url), e.g.\n ``\"github_mcp_policy.block_non_misc_push\"``\n or ``\"https://example.com/policies/eval\"``.\n:param factory_params: Optional dict of kwargs passed to the\n handler when it is a factory function. Only valid for\n ``type=\"python\"``, e.g. ``{\"limit\": 10}``.",
"properties": {
"factory_params": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Factory Params"
},
"handler": {
"title": "Handler",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"name",
"type",
"handler"
],
"title": "CreateSessionPolicyRequest",
"type": "object"
},
"CreatedEvent": {
"description": "Initial event emitted at the start of every streaming response.\n\nCarries the freshly-allocated\n:class:`omnigent.server.schemas.ResponseObject` (status will\nbe ``\"queued\"`` or ``\"in_progress\"`` depending on whether the\ntask started immediately).\n\n:param type: Always ``\"response.created\"``.\n:param response: The newly-allocated response object.",
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseObject"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"type": {
"const": "response.created",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"response"
],
"title": "CreatedEvent",
"type": "object"
},
"ElicitationRequestEvent": {
"description": "Synchronous request for a decision from upstream.\n\nEmitted by Omnigent (or, under the new contract, by a harness)\nwhen the LLM / a tool / a policy needs a verdict before\nproceeding. The consumer replies via\n``POST /v1/sessions/{session_id}/events`` with\n``type == \"approval\"`` and\n:class:`omnigent.server.schemas.ElicitationResult` fields in\n``data``. This preserves MCP request/reply correlation by id\nwithout threading elicitations through PATCH.\n\nWire shape matches the existing emit at\n``omnigent/runtime/policies/approval.py:175``.\n\n:param type: Always ``\"response.elicitation_request\"``.\n:param elicitation_id: Unique correlation id for this\n request \u2014 appears in the consumer's approval event payload,\n e.g. ``\"elicit_abc123\"``.\n:param method: MCP method literal \u2014 always\n ``\"elicitation/create\"`` (the value of\n ``_MCP_ELICITATION_METHOD`` in\n ``omnigent/runtime/policies/approval.py``).\n:param params: The MCP-shaped params block carrying the\n prompt and (form-mode only) the requested schema.",
"properties": {
"elicitation_id": {
"title": "Elicitation Id",
"type": "string"
},
"method": {
"const": "elicitation/create",
"default": "elicitation/create",
"title": "Method",
"type": "string"
},
"params": {
"$ref": "#/components/schemas/ElicitationRequestParams"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"type": {
"const": "response.elicitation_request",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"elicitation_id",
"params"
],
"title": "ElicitationRequestEvent",
"type": "object"
},
"ElicitationRequestParams": {
"additionalProperties": true,
"description": "Inner ``params`` block of a :class:`ElicitationRequestEvent`.\n\nThe standard fields (``mode``, ``message``, ``requestedSchema``,\n``url``) mirror MCP's ``ElicitRequestFormParams`` /\n``ElicitRequestUrlParams`` byte-for-byte (Principle 8 \u2014 adopt\nMCP's wire shape verbatim where it overlaps). The\nAP-specific extensions (``phase``, ``policy_name``,\n``content_preview``, ``target_session_id``) carry policy-engine\ncontext and mirrored-child routing for the consumer's renderer;\nMCP's ``extra=\"allow\"`` config permits them under the same params\nblock. Wire shape matches\n``omnigent/runtime/policies/approval.py:175``.\n\n:param mode: MCP-standard discriminator. ``\"form\"`` collects\n structured input via ``requestedSchema``; ``\"url\"``\n directs upstream to an external URL for OAuth /\n out-of-band interaction.\n:param message: Human-readable prompt the consumer renders,\n e.g. ``\"Approve running 'rm -rf /tmp/cache'?\"``.\n:param requestedSchema: JSON-Schema dict for form mode (or\n ``None`` for url mode). camelCase preserved per MCP\n spec, e.g.\n ``{\"type\": \"object\", \"properties\": {\"approve\":\n {\"type\": \"boolean\"}}}``.\n:param url: External URL for url mode (or ``None`` for form\n mode), e.g. ``\"https://oauth.example.com/authorize?...\"``.\n:param phase: Omnigent policy-engine phase the elicitation\n belongs to, e.g. ``\"pre_tool_use\"``.\n:param policy_name: Omnigent policy that triggered the\n elicitation, e.g. ``\"approve_shell_commands\"``.\n:param content_preview: Truncated preview of the underlying\n request payload (\u22641024 chars in current AP), for the\n consumer's renderer.\n:param target_session_id: AP session whose resolve endpoint owns\n this elicitation, e.g. ``\"conv_child123\"``. Present when a\n child/sub-agent prompt is mirrored into an ancestor stream;\n ``None`` means resolve against the current session.",
"properties": {
"content_preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Content Preview"
},
"message": {
"title": "Message",
"type": "string"
},
"mode": {
"default": "form",
"enum": [
"form",
"url"
],
"title": "Mode",
"type": "string"
},
"phase": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phase"
},
"policy_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Policy Name"
},
"requestedSchema": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Requestedschema"
},
"target_session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Target Session Id"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
}
},
"required": [
"message"
],
"title": "ElicitationRequestParams",
"type": "object"
},
"ElicitationResolvedEvent": {
"description": "Signal that a previously-published elicitation is no longer\noutstanding, even though no UI ``approval`` verdict was\ndelivered through ``POST /v1/sessions/{id}/events``.\n\nEmitted by the runner when its own ``_pending_approvals``\nFuture is popped without a verdict (the runner's wait timed\nout, the turn was cancelled, the harness exited) so the AP\nserver's :mod:`omnigent.runtime.pending_elicitations`\nindex can decrement the sidebar badge in lockstep with the\nunderlying awaiter's lifecycle. Without this signal, the AP\nserver has no way to learn that the prompt is dead and the\nbadge stays stuck.\n\nIdempotent on the consumer side: the Omnigent server's index\ndecrement is a no-op when the id isn't tracked, so the\nrunner can fire-and-forget on every Future cleanup.\n\n:param type: Always ``\"response.elicitation_resolved\"``.\n:param elicitation_id: Correlation id of the elicitation\n being cleared, e.g. ``\"elicit_abc123\"``. Must match the\n id of a prior :class:`ElicitationRequestEvent`.",
"properties": {
"elicitation_id": {
"title": "Elicitation Id",
"type": "string"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"type": {
"const": "response.elicitation_resolved",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"elicitation_id"
],
"title": "ElicitationResolvedEvent",
"type": "object"
},
"ElicitationResult": {
"description": "Consumer reply to an outstanding elicitation.\n\nField names + semantics mirror MCP's ``ElicitResult`` verbatim.\nOmnigent clients deliver this shape inside the session-scoped\n``approval`` event body, alongside the ``elicitation_id``\ncorrelation key.\n\n:param action: User action per MCP semantics. ``\"accept\"`` =\n approved (form submitted / confirmation given).\n ``\"decline\"`` = explicit refusal. ``\"cancel\"`` = dismissed\n without an explicit choice (also the verdict the server\n synthesizes on elicitation timeout).\n:param content: Form data when ``action == \"accept\"`` and the\n ``requestedSchema`` had fields. ``None`` (or omitted) for\n binary approve/reject elicitations and for ``decline`` /\n ``cancel`` actions. Values are restricted to JSON scalars\n and string lists per the MCP spec.",
"properties": {
"action": {
"enum": [
"accept",
"decline",
"cancel"
],
"title": "Action",
"type": "string"
},
"content": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"title": "Content"
}
},
"required": [
"action"
],
"title": "ElicitationResult",
"type": "object"
},
"ErrorDetail": {
"description": "Machine-readable error information attached to a failed response.\n\n:param code: Error code string, e.g. ``\"server_error\"``,\n ``\"invalid_input\"``.\n:param message: Human-readable error description.",
"properties": {
"code": {
"title": "Code",
"type": "string"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"code",
"message"
],
"title": "ErrorDetail",
"type": "object"
},
"ErrorEvent": {
"description": "Non-recoverable error reported during the turn.\n\nEmitted from multiple sites in\n``omnigent/runtime/workflow.py`` \u2014 terminal LLM failures\n(``_emit_llm_error_event``), execution timeouts\n(``_handle_execution_timeout``), and the agent-loop catch-all\n(``except Exception``). Wire shape matches those emits.\n\n:param type: Always ``\"response.error\"``.\n:param source: Origin of the error \u2014 ``\"llm\"`` for LLM-call\n failures, ``\"execution\"`` for timeouts, ``\"tool\"`` for\n tool failures (currently emitted by retry exhaustion paths).\n:param tool_name: Tool identifier when ``source == \"tool\"``;\n ``None`` for the other sources.\n:param error: Classified error description.",
"properties": {
"error": {
"$ref": "#/components/schemas/RetryErrorDetail"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"source": {
"enum": [
"llm",
"execution",
"tool"
],
"title": "Source",
"type": "string"
},
"tool_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Tool Name"
},
"type": {
"const": "response.error",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"source",
"error"
],
"title": "ErrorEvent",
"type": "object"
},
"FailedEvent": {
"description": "Terminal event for a turn that ended with an error.\n\nCarries the final\n:class:`omnigent.server.schemas.ResponseObject` whose\n``error`` field describes the failure.\n\n:param type: Always ``\"response.failed\"``.\n:param response: The final response object with\n ``status=\"failed\"`` and ``error`` populated.",
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseObject"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"type": {
"const": "response.failed",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"response"
],
"title": "FailedEvent",
"type": "object"
},
"GrantPermissionRequest": {
"description": "Request body for ``PUT /v1/sessions/{id}/permissions``.\n\n:param user_id: The user to grant access to, e.g.\n ``\"alice@example.com\"`` or ``\"__public__\"`` for public\n read access.\n:param level: Numeric permission level: ``1`` = read,\n ``2`` = edit, ``3`` = manage.",
"properties": {
"level": {
"maximum": 3.0,
"minimum": 1.0,
"title": "Level",
"type": "integer"
},
"user_id": {
"title": "User Id",
"type": "string"
}
},
"required": [
"user_id",
"level"
],
"title": "GrantPermissionRequest",
"type": "object"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
},
"HeartbeatEvent": {
"description": "Keepalive event emitted on a fixed cadence during streaming.\n\nLets consumers detect stalled producers via missed-interval\ntiming. Cadence is set by ``_HEARTBEAT_INTERVAL_S`` in\n``omnigent/runtime/workflow.py`` (15 seconds at the time of\nwriting). Wire shape matches the existing emit at\n``omnigent/runtime/workflow.py:4636-4639``.\n\nPer ``designs/SERVER_HARNESS_CONTRACT.md`` \u00a7Heartbeats, the\nevent MAY carry timing metadata so consumers can do richer\ndead-detection than \"did anything arrive\":\n\n- ``server_time`` is the producer's wall-clock at emission,\n letting consumers detect clock drift between producer and\n consumer.\n- ``last_event_seq`` is the ``sequence_number`` of the most\n recent NON-heartbeat event (or ``None`` when this is the\n first heartbeat before any user-visible event), letting\n consumers detect dropped events on reconnect.\n\nBoth fields are optional on the wire (``None`` round-trips as\nomitted) so older AP\u2192harness pairs that pre-date the field\naddition still parse cleanly.\n\n:param type: Always ``\"response.heartbeat\"``.\n:param server_time: ISO 8601 UTC timestamp at emission, e.g.\n ``\"2026-04-27T15:30:00Z\"``. ``None`` when the producer\n chose not to populate it (legacy emitters).\n:param last_event_seq: Sequence number of the last non-\n heartbeat event seen on the same stream, e.g. ``42``.\n ``None`` before any user-visible event has fired (first\n heartbeat of the turn, before deltas land), or when the\n producer chose not to populate it.",
"properties": {
"last_event_seq": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Event Seq"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"server_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Server Time"
},
"type": {
"const": "response.heartbeat",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "HeartbeatEvent",
"type": "object"
},
"InProgressEvent": {
"description": "Event emitted once the task transitions to in-progress.\n\nAlways follows ``response.created`` (and ``response.queued``\nfor background tasks).\n\n:param type: Always ``\"response.in_progress\"``.\n:param response: The response object with\n ``status=\"in_progress\"``.",
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseObject"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"type": {
"const": "response.in_progress",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"response"
],
"title": "InProgressEvent",
"type": "object"
},
"IncompleteDetails": {
"description": "Details explaining why a response is incomplete.\n\n:param reason: Reason the response stopped early, e.g.\n ``\"max_output_tokens\"``, ``\"max_tool_calls\"``.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "IncompleteDetails",
"type": "object"
},
"IncompleteEvent": {
"description": "Terminal event for a turn that ended without completing\n(e.g. hit the iteration cap or token budget).\n\n:param type: Always ``\"response.incomplete\"``.\n:param response: The final response object with\n ``status=\"incomplete\"`` and ``incomplete_details``\n populated describing the reason.",
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseObject"
},
"sequence_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sequence Number"
},
"type": {
"const": "response.incomplete",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"response"
],
"title": "IncompleteEvent",
"type": "object"
},
"LaunchRunnerRequest": {
"description": "Request body for ``POST /v1/hosts/{host_id}/runners``.\n\n:param session_id: Session to bind the new runner to, e.g.\n ``\"conv_abc123\"``.\n:param workspace: Absolute path on the host machine to use\n as the runner's working directory, e.g.\n ``\"/Users/corey/projects/frontend\"``. When ``git`` is set,\n this is interpreted as the source repository directory and\n the runner starts in the created worktree instead.\n:param git: Optional git worktree options. When set, the server\n creates a worktree for a new branch off ``workspace`` on the\n host and binds the runner to it (the fork-resume path; mirrors\n ``POST /v1/sessions``). ``None`` binds ``workspace`` directly.\n ``host_id`` is always present (it is in the path), so no\n host requirement check is needed here.",
"properties": {
"git": {
"anyOf": [
{
"$ref": "#/components/schemas/SessionGitOptions"
},
{
"type": "null"
}
]
},
"session_id": {
"title": "Session Id",
"type": "string"
},
"workspace": {
"title": "Workspace",
"type": "string"
}
},
"required": [
"session_id",
"workspace"
],
"title": "LaunchRunnerRequest",
"type": "object"