-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathstate.schema.json
More file actions
3811 lines (3811 loc) · 139 KB
/
Copy pathstate.schema.json
File metadata and controls
3811 lines (3811 loc) · 139 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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$comment": "Generated from types/state.ts — do not edit",
"$id": "https://microsoft.github.io/agent-host-protocol/schema/state.schema.json",
"title": "AHP State Types",
"description": "All state types in the Agent Host Protocol.",
"$defs": {
"Icon": {
"type": "object",
"description": "An optionally-sized icon that can be displayed in a user interface.",
"properties": {
"src": {
"$ref": "#/$defs/URI",
"description": "A standard URI pointing to an icon resource. May be an HTTP/HTTPS URL or a\n`data:` URI with Base64-encoded image data.\n\nConsumers SHOULD take steps to ensure URLs serving icons are from the\nsame domain as the client/server or a trusted domain.\n\nConsumers SHOULD take appropriate precautions when consuming SVGs as they can contain\nexecutable JavaScript."
},
"contentType": {
"type": "string",
"description": "Optional MIME type override if the source MIME type is missing or generic.\nFor example: `\"image/png\"`, `\"image/jpeg\"`, or `\"image/svg+xml\"`."
},
"sizes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional array of strings that specify sizes at which the icon can be used.\nEach string should be in WxH format (e.g., `\"48x48\"`, `\"96x96\"`) or `\"any\"` for scalable formats like SVG.\n\nIf not provided, the client should assume that the icon can be used at any size."
},
"theme": {
"type": "string",
"enum": [
"light",
"dark"
],
"description": "Optional specifier for the theme this icon is designed for. `\"light\"` indicates\nthe icon is designed to be used with a light background, and `\"dark\"` indicates\nthe icon is designed to be used with a dark background.\n\nIf not provided, the client should assume the icon can be used with any theme."
}
},
"required": [
"src"
]
},
"ProtectedResourceMetadata": {
"type": "object",
"description": "Describes a protected resource's authentication requirements using\n[RFC 9728](https://datatracker.ietf.org/doc/html/rfc9728) (OAuth 2.0\nProtected Resource Metadata) semantics.\n\nField names use snake_case to match the RFC 9728 JSON format.",
"properties": {
"resource": {
"type": "string",
"description": "REQUIRED. The protected resource's resource identifier, a URL using the\n`https` scheme with no fragment component (e.g. `\"https://api.github.com\"`)."
},
"resource_name": {
"type": "string",
"description": "OPTIONAL. Human-readable name of the protected resource."
},
"authorization_servers": {
"type": "array",
"items": {
"type": "string"
},
"description": "OPTIONAL. JSON array of OAuth authorization server identifier URLs."
},
"jwks_uri": {
"type": "string",
"description": "OPTIONAL. URL of the protected resource's JWK Set document."
},
"scopes_supported": {
"type": "array",
"items": {
"type": "string"
},
"description": "RECOMMENDED. JSON array of OAuth 2.0 scope values used in authorization requests."
},
"bearer_methods_supported": {
"type": "array",
"items": {
"type": "string"
},
"description": "OPTIONAL. JSON array of Bearer Token presentation methods supported."
},
"resource_signing_alg_values_supported": {
"type": "array",
"items": {
"type": "string"
},
"description": "OPTIONAL. JSON array of JWS signing algorithms supported."
},
"resource_encryption_alg_values_supported": {
"type": "array",
"items": {
"type": "string"
},
"description": "OPTIONAL. JSON array of JWE encryption algorithms (alg) supported."
},
"resource_encryption_enc_values_supported": {
"type": "array",
"items": {
"type": "string"
},
"description": "OPTIONAL. JSON array of JWE encryption algorithms (enc) supported."
},
"resource_documentation": {
"type": "string",
"description": "OPTIONAL. URL of human-readable documentation for the resource."
},
"resource_policy_uri": {
"type": "string",
"description": "OPTIONAL. URL of the resource's data-usage policy."
},
"resource_tos_uri": {
"type": "string",
"description": "OPTIONAL. URL of the resource's terms of service."
},
"required": {
"type": "boolean",
"description": "AHP extension. Whether authentication is required for this resource.\n\n- `true` (default) — the agent cannot be used without a valid token.\n The server SHOULD return `AuthRequired` (`-32007`) if the client\n attempts to use the agent without authenticating.\n- `false` — the agent works without authentication but MAY offer\n enhanced capabilities when a token is provided.\n\nClients SHOULD treat an absent field the same as `true`."
}
},
"required": [
"resource"
]
},
"ConfigPropertySchema": {
"type": "object",
"description": "A JSON Schema-compatible property descriptor with display extensions.\n\nStandard JSON Schema fields (`type`, `title`, `description`, `default`,\n`enum`) allow validators to process the schema. Display extensions\n(`enumLabels`, `enumDescriptions`) are parallel arrays that provide UI\nmetadata for each `enum` value.\n\nThis is the generic base type. See {@link SessionConfigPropertySchema} for\nsession-specific extensions.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"array",
"object"
],
"description": "JSON Schema: property type"
},
"title": {
"type": "string",
"description": "JSON Schema: human-readable label for the property"
},
"description": {
"type": "string",
"description": "JSON Schema: description / tooltip"
},
"default": {
"description": "JSON Schema: default value"
},
"enum": {
"type": "array",
"items": {
"type": "string"
},
"description": "JSON Schema: allowed values (typically used with `string` type)"
},
"enumLabels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Display extension: human-readable label per enum value (parallel array)"
},
"enumDescriptions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Display extension: description per enum value (parallel array)"
},
"readOnly": {
"type": "boolean",
"description": "JSON Schema: when `true`, the property is displayed but cannot be modified by the user"
},
"items": {
"$ref": "#/$defs/ConfigPropertySchema",
"description": "JSON Schema: schema for array items (used when `type` is `'array'`)"
},
"properties": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/ConfigPropertySchema"
},
"description": "JSON Schema: property descriptors for object properties (used when `type` is `'object'`)"
},
"required": {
"type": "array",
"items": {
"type": "string"
},
"description": "JSON Schema: list of required property ids (used when `type` is `'object'`)"
}
},
"required": [
"type",
"title"
]
},
"ConfigSchema": {
"type": "object",
"description": "A JSON Schema object describing available configuration properties.\n\nThis is the generic base type. See {@link SessionConfigSchema} for\nsession-specific usage.",
"properties": {
"type": {
"type": "string",
"enum": [
"object"
],
"description": "JSON Schema: always `'object'`"
},
"properties": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/ConfigPropertySchema"
},
"description": "JSON Schema: property descriptors keyed by property id"
},
"required": {
"type": "array",
"items": {
"type": "string"
},
"description": "JSON Schema: list of required property ids"
}
},
"required": [
"type",
"properties"
]
},
"TextPosition": {
"type": "object",
"description": "A zero-based position within a textual document.",
"properties": {
"line": {
"type": "number",
"description": "Zero-based line number."
},
"character": {
"type": "number",
"description": "Zero-based character offset within the line."
}
},
"required": [
"line",
"character"
]
},
"TextRange": {
"type": "object",
"description": "A range within a textual document.",
"properties": {
"start": {
"$ref": "#/$defs/TextPosition",
"description": "Start position of the range."
},
"end": {
"$ref": "#/$defs/TextPosition",
"description": "End position of the range."
}
},
"required": [
"start",
"end"
]
},
"TextSelection": {
"type": "object",
"description": "A selection within a textual resource.\n\nThis is only meaningful for textual resources. Binary resources may still\nuse resource or embedded resource attachments, but they should not use this\ntext selection field.",
"properties": {
"range": {
"$ref": "#/$defs/TextRange",
"description": "The range covered by the selection."
}
},
"required": [
"range"
]
},
"ContentRef": {
"type": "object",
"description": "A reference to large content stored outside the state tree.",
"properties": {
"uri": {
"$ref": "#/$defs/URI",
"description": "Content URI"
},
"sizeHint": {
"type": "number",
"description": "Approximate size in bytes"
},
"contentType": {
"type": "string",
"description": "Content MIME type"
}
},
"required": [
"uri"
]
},
"FileEdit": {
"type": "object",
"description": "Describes a file modification with before/after state and diff metadata.\n\nSupports creates (only `after`), deletes (only `before`), renames/moves\n(different `uri` in `before` and `after`), and edits (same `uri`, different content).",
"properties": {
"before": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"uri",
"content"
],
"description": "The file state before the edit. Absent for file creations or for in-place file edits."
},
"after": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"uri",
"content"
],
"description": "The file state after the edit. Absent for file deletions."
},
"diff": {
"type": "object",
"properties": {
"added": {
"type": "number"
},
"removed": {
"type": "number"
}
},
"description": "Optional diff display metadata"
}
}
},
"UsageInfo": {
"type": "object",
"properties": {
"inputTokens": {
"type": "number",
"description": "Input tokens consumed"
},
"outputTokens": {
"type": "number",
"description": "Output tokens generated"
},
"model": {
"type": "string",
"description": "Model used"
},
"cacheReadTokens": {
"type": "number",
"description": "Tokens read from cache"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional provider-specific metadata for this usage report.\nClients MAY look for well-known optional keys here to provide enhanced UI."
}
}
},
"ErrorInfo": {
"type": "object",
"properties": {
"errorType": {
"type": "string",
"description": "Error type identifier"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"stack": {
"type": "string",
"description": "Stack trace"
}
},
"required": [
"errorType",
"message"
]
},
"Snapshot": {
"type": "object",
"description": "A point-in-time snapshot of a subscribed resource's state, returned by\n`initialize`, `reconnect`, and `subscribe`.",
"properties": {
"resource": {
"$ref": "#/$defs/URI",
"description": "The subscribed channel URI (e.g. `ahp-root://` or `ahp-session:/<uuid>`)"
},
"state": {
"oneOf": [
{
"$ref": "#/$defs/RootState"
},
{
"$ref": "#/$defs/SessionState"
},
{
"$ref": "#/$defs/TerminalState"
},
{
"$ref": "#/$defs/ChangesetState"
}
],
"description": "The current state of the resource"
},
"fromSeq": {
"type": "number",
"description": "The `serverSeq` at which this snapshot was taken. Subsequent actions will have `serverSeq > fromSeq`."
}
},
"required": [
"resource",
"state",
"fromSeq"
]
},
"RootState": {
"type": "object",
"description": "Global state shared with every client subscribed to `ahp-root://`.",
"properties": {
"agents": {
"type": "array",
"items": {
"$ref": "#/$defs/AgentInfo"
},
"description": "Available agent backends and their models"
},
"activeSessions": {
"type": "number",
"description": "Number of active (non-disposed) sessions on the server"
},
"terminals": {
"type": "array",
"items": {
"$ref": "#/$defs/TerminalInfo"
},
"description": "Known terminals on the server. Subscribe to individual terminal URIs for full state."
},
"config": {
"$ref": "#/$defs/RootConfigState",
"description": "Agent host configuration schema and current values"
}
},
"required": [
"agents"
]
},
"AgentInfo": {
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "Agent provider ID (e.g. `'copilot'`)"
},
"displayName": {
"type": "string",
"description": "Human-readable name"
},
"description": {
"type": "string",
"description": "Description string"
},
"models": {
"type": "array",
"items": {
"$ref": "#/$defs/SessionModelInfo"
},
"description": "Available models for this agent"
},
"protectedResources": {
"type": "array",
"items": {
"$ref": "#/$defs/ProtectedResourceMetadata"
},
"description": "Protected resources this agent requires authentication for.\n\nEach entry describes an OAuth 2.0 protected resource using\n[RFC 9728](https://datatracker.ietf.org/doc/html/rfc9728) semantics.\nClients should obtain tokens from the declared `authorization_servers`\nand push them via the `authenticate` command before creating sessions\nwith this agent."
},
"customizations": {
"type": "array",
"items": {
"$ref": "#/$defs/Customization"
},
"description": "Customizations associated with this agent.\n\nAlways container customizations —\n{@link PluginCustomization | `PluginCustomization`} entries the agent\nbundles, plus {@link DirectoryCustomization | `DirectoryCustomization`}\nentries it watches in any workspace it's used with. When a session is\ncreated with this agent, these entries are augmented (e.g. directory\nURIs are resolved against the workspace, children are parsed) and\npropagated into the session's `customizations` list."
}
},
"required": [
"provider",
"displayName",
"description",
"models"
]
},
"SessionModelInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Model identifier"
},
"provider": {
"type": "string",
"description": "Provider this model belongs to"
},
"name": {
"type": "string",
"description": "Human-readable model name"
},
"maxContextWindow": {
"type": "number",
"description": "Maximum context window size"
},
"supportsVision": {
"type": "boolean",
"description": "Whether the model supports vision"
},
"policyState": {
"$ref": "#/$defs/PolicyState",
"description": "Policy configuration state"
},
"configSchema": {
"$ref": "#/$defs/ConfigSchema",
"description": "Configuration schema describing model-specific options (e.g. thinking\nlevel). Clients present this as a form and pass the resolved values in\n{@link ModelSelection.config} when creating or changing sessions."
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional provider-specific metadata for this model.\n\nClients MAY look for well-known keys here to provide enhanced UI.\nFor example, a `pricing` key may carry model pricing metadata."
}
},
"required": [
"id",
"provider",
"name"
]
},
"ModelSelection": {
"type": "object",
"description": "A model selection: the chosen model ID together with any model-specific\nconfiguration values whose keys correspond to the model's\n{@link SessionModelInfo.configSchema}.",
"properties": {
"id": {
"type": "string",
"description": "Model identifier"
},
"config": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Model-specific configuration values"
}
},
"required": [
"id"
]
},
"RootConfigState": {
"type": "object",
"description": "Live agent-host configuration metadata.\n\nThe schema describes the available configuration properties and the values\ncontain the current value for each resolved property.",
"properties": {
"schema": {
"$ref": "#/$defs/ConfigSchema",
"description": "JSON Schema describing available configuration properties"
},
"values": {
"type": "object",
"additionalProperties": {},
"description": "Current configuration values"
}
},
"required": [
"schema",
"values"
]
},
"PendingMessage": {
"type": "object",
"description": "A message queued for future delivery to the agent.\n\nSteering messages are injected into the current turn mid-flight.\nQueued messages are automatically started as new turns after the\ncurrent turn naturally finishes.",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for this pending message"
},
"message": {
"$ref": "#/$defs/Message",
"description": "The message that will start the next turn"
}
},
"required": [
"id",
"message"
]
},
"SessionState": {
"type": "object",
"description": "Full state for a single session, loaded when a client subscribes to the session's URI.",
"properties": {
"summary": {
"$ref": "#/$defs/SessionSummary",
"description": "Lightweight session metadata"
},
"lifecycle": {
"$ref": "#/$defs/SessionLifecycle",
"description": "Session initialization state"
},
"creationError": {
"$ref": "#/$defs/ErrorInfo",
"description": "Error details if creation failed"
},
"serverTools": {
"type": "array",
"items": {
"$ref": "#/$defs/ToolDefinition"
},
"description": "Tools provided by the server (agent host) for this session"
},
"activeClient": {
"$ref": "#/$defs/SessionActiveClient",
"description": "The client currently providing tools and interactive capabilities to this session"
},
"turns": {
"type": "array",
"items": {
"$ref": "#/$defs/Turn"
},
"description": "Completed turns"
},
"activeTurn": {
"$ref": "#/$defs/ActiveTurn",
"description": "Currently in-progress turn"
},
"steeringMessage": {
"$ref": "#/$defs/PendingMessage",
"description": "Message to inject into the current turn at a convenient point"
},
"queuedMessages": {
"type": "array",
"items": {
"$ref": "#/$defs/PendingMessage"
},
"description": "Messages to send automatically as new turns after the current turn finishes"
},
"inputRequests": {
"type": "array",
"items": {
"$ref": "#/$defs/SessionInputRequest"
},
"description": "Requests for user input that are currently blocking or informing session progress"
},
"config": {
"$ref": "#/$defs/SessionConfigState",
"description": "Session configuration schema and current values"
},
"customizations": {
"type": "array",
"items": {
"$ref": "#/$defs/Customization"
},
"description": "Top-level customizations active in this session.\n\nAlways container customizations — {@link PluginCustomization} or\n{@link DirectoryCustomization}. Children (agents, skills, prompts,\nrules, hooks, MCP servers) live in each container's\n{@link ContainerCustomizationBase.children | `children`} array.\n\nClient-published plugins arrive via\n{@link SessionActiveClient.customizations | `activeClient.customizations`}\nand the host propagates them into this list (typically with the\ncontainer's `clientId` set and `children` populated)."
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional provider-specific metadata for this session.\n\nClients MAY look for well-known keys here to provide enhanced UI.\nFor example, a `git` key may provide extra git metadata about the session's\nworkingDirectory."
}
},
"required": [
"summary",
"lifecycle",
"turns"
]
},
"SessionActiveClient": {
"type": "object",
"description": "The client currently providing tools and interactive capabilities to a session.\n\nOnly one client may be active per session at a time. The server SHOULD\nautomatically unset the active client if that client disconnects.",
"properties": {
"clientId": {
"type": "string",
"description": "Client identifier (matches `clientId` from `initialize`)"
},
"displayName": {
"type": "string",
"description": "Human-readable client name (e.g. `\"VS Code\"`)"
},
"tools": {
"type": "array",
"items": {
"$ref": "#/$defs/ToolDefinition"
},
"description": "Tools this client provides to the session"
},
"customizations": {
"type": "array",
"items": {
"$ref": "#/$defs/ClientPluginCustomization"
},
"description": "Plugin customizations this client contributes to the session.\n\nClients publish in [Open Plugins](https://open-plugins.com/) format\n— i.e. always container-shaped plugins. They MAY synthesize virtual\nplugins in memory and rely on the host to expand them into concrete\nchildren inside {@link SessionState.customizations}."
}
},
"required": [
"clientId",
"tools"
]
},
"ProjectInfo": {
"type": "object",
"description": "Server-owned project metadata for a session.",
"properties": {
"uri": {
"$ref": "#/$defs/URI",
"description": "Project URI"
},
"displayName": {
"type": "string",
"description": "Human-readable project name"
}
},
"required": [
"uri",
"displayName"
]
},
"SessionSummary": {
"type": "object",
"properties": {
"resource": {
"$ref": "#/$defs/URI",
"description": "Session URI"
},
"provider": {
"type": "string",
"description": "Agent provider ID"
},
"title": {
"type": "string",
"description": "Session title"
},
"status": {
"$ref": "#/$defs/SessionStatus",
"description": "Current session status"
},
"activity": {
"type": "string",
"description": "Human-readable description of what the session is currently doing"
},
"createdAt": {
"type": "number",
"description": "Creation timestamp"
},
"modifiedAt": {
"type": "number",
"description": "Last modification timestamp"
},
"project": {
"$ref": "#/$defs/ProjectInfo",
"description": "Server-owned project for this session"
},
"model": {
"$ref": "#/$defs/ModelSelection",
"description": "Currently selected model"
},
"agent": {
"$ref": "#/$defs/AgentSelection",
"description": "Currently selected custom agent.\n\nAbsent (`undefined`) means no custom agent is selected for this session\n— the session uses the provider's default behavior."
},
"workingDirectory": {
"$ref": "#/$defs/URI",
"description": "The working directory URI for this session"
},
"changesets": {
"type": "array",
"items": {
"$ref": "#/$defs/ChangesetSummary"
},
"description": "Catalogue of changesets the server can produce for this session. Each\nentry advertises a subscribable view of file changes (uncommitted,\nsession-wide, per-turn, etc.) and the URI template the client expands\nbefore subscribing. See {@link ChangesetSummary} for the full shape and\n{@link /guide/changesets | Changesets} for an overview of the model."
}
},
"required": [
"resource",
"provider",
"title",
"status",
"createdAt",
"modifiedAt"
]
},
"AgentSelection": {
"type": "object",
"description": "A selected custom agent for a session.\n\nThe `uri` identifies a specific custom agent (matching an\n{@link AgentCustomization.uri | `AgentCustomization.uri`} exposed via\nthe session's effective customizations). Consumers resolve the agent's\ndisplay name by looking up `uri` in the session's customization tree.\n\nA session with no `agent` selected uses the provider's default behavior.",
"properties": {
"uri": {
"$ref": "#/$defs/URI",
"description": "Stable agent URI (matches an {@link AgentCustomization.uri})."
}
},
"required": [
"uri"
]
},
"SessionConfigPropertySchema": {
"type": "object",
"description": "A session configuration property descriptor.\n\nExtends the generic {@link ConfigPropertySchema} with session-specific\ndisplay extensions.",
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"array",
"object"
],
"description": "JSON Schema: property type"
},
"title": {
"type": "string",
"description": "JSON Schema: human-readable label for the property"
},
"description": {
"type": "string",
"description": "JSON Schema: description / tooltip"
},
"default": {
"description": "JSON Schema: default value"
},
"enum": {
"type": "array",
"items": {
"type": "string"
},
"description": "JSON Schema: allowed values (typically used with `string` type)"
},
"enumLabels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Display extension: human-readable label per enum value (parallel array)"
},
"enumDescriptions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Display extension: description per enum value (parallel array)"
},
"readOnly": {
"type": "boolean",
"description": "JSON Schema: when `true`, the property is displayed but cannot be modified by the user"
},
"items": {
"$ref": "#/$defs/ConfigPropertySchema",
"description": "JSON Schema: schema for array items (used when `type` is `'array'`)"
},
"properties": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/ConfigPropertySchema"
},
"description": "JSON Schema: property descriptors for object properties (used when `type` is `'object'`)"
},
"required": {
"type": "array",
"items": {
"type": "string"
},
"description": "JSON Schema: list of required property ids (used when `type` is `'object'`)"
},
"enumDynamic": {
"type": "boolean",
"description": "Display extension: when `true`, the full set of allowed values is too large\nto enumerate statically. The client SHOULD use `sessionConfigCompletions`\nto fetch matching values based on user input. Any values in `enum` are\nseed/recent values for initial display."
},
"sessionMutable": {
"type": "boolean",
"description": "When `true`, the user may change this property after session creation"
}
},
"required": [
"type",
"title"
]
},
"SessionConfigSchema": {
"type": "object",
"description": "A JSON Schema object describing available session configuration metadata.",
"properties": {
"type": {
"type": "string",
"enum": [
"object"
],
"description": "JSON Schema: always `'object'`"
},
"properties": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/SessionConfigPropertySchema"
},
"description": "JSON Schema: property descriptors keyed by property id"
},
"required": {
"type": "array",
"items": {
"type": "string"
},
"description": "JSON Schema: list of required property ids"
}
},
"required": [
"type",
"properties"
]
},
"SessionConfigState": {
"type": "object",
"description": "Live session configuration metadata.\n\nThe schema describes the available configuration properties and the values\ncontain the current value for each resolved property.",
"properties": {
"schema": {
"$ref": "#/$defs/SessionConfigSchema",
"description": "JSON Schema describing available configuration properties"
},
"values": {
"type": "object",
"additionalProperties": {},
"description": "Current configuration values"
}
},
"required": [
"schema",
"values"
]
},
"SessionInputOption": {
"type": "object",
"description": "A choice in a select-style question.",
"properties": {
"id": {
"type": "string",
"description": "Stable option identifier; for MCP enum values this is the enum string"
},
"label": {
"type": "string",
"description": "Display label"
},
"description": {
"type": "string",
"description": "Optional secondary text"
},
"recommended": {
"type": "boolean",
"description": "Whether this option is the recommended/default choice"
}
},
"required": [
"id",
"label"
]
},
"SessionInputQuestionBase": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Stable question identifier used as the key in `answers`"
},
"title": {
"type": "string",
"description": "Short display title"
},
"message": {
"type": "string",
"description": "Prompt shown to the user"
},
"required": {
"type": "boolean",
"description": "Whether the user must answer this question to accept the request"
}
},
"required": [
"id",
"message"
]
},
"SessionInputTextQuestion": {
"type": "object",
"description": "Text question within a session input request.",
"properties": {
"id": {
"type": "string",
"description": "Stable question identifier used as the key in `answers`"
},