-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathtypes.gen.ts
More file actions
6475 lines (6213 loc) · 173 KB
/
Copy pathtypes.gen.ts
File metadata and controls
6475 lines (6213 loc) · 173 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
// This file is auto-generated by @hey-api/openapi-ts
// eslint-disable-next-line @typescript-eslint/no-unused-vars
type ClientOptions = {
baseUrl: `${string}://${string}` | (string & {});
};
/**
* A JSON-RPC request object.
*/
export type AgentRequest = {
/**
* The request id used to correlate the matching response.
*/
id: RequestId;
/**
* The method name to invoke.
*/
method: string;
/**
* Method-specific request parameters.
*/
params?:
| WriteTextFileRequest
| ReadTextFileRequest
| RequestPermissionRequest
| CreateTerminalRequest
| TerminalOutputRequest
| ReleaseTerminalRequest
| WaitForTerminalExitRequest
| KillTerminalRequest
| CreateElicitationRequest
| ConnectMcpRequest
| MessageMcpRequest
| DisconnectMcpRequest
| ExtRequest
| null;
};
/**
* JSON RPC Request Id
*
* An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \[1\] and Numbers SHOULD NOT contain fractional parts \[2\]
*
* The Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.
*
* \[1\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.
*
* \[2\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions.
*/
export type RequestId = null | number | string;
/**
* Request to write content to a text file.
*
* Only available if the client supports the `fs.writeTextFile` capability.
*/
export type WriteTextFileRequest = {
/**
* The session ID for this request.
*/
sessionId: SessionId;
/**
* Absolute path to the file to write.
*/
path: string;
/**
* The text content to write to the file.
*/
content: string;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* A unique identifier for a conversation session between a client and agent.
*
* Sessions maintain their own context, conversation history, and state,
* allowing multiple independent interactions with the same agent.
*
* See protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session-setup#session-id)
*/
export type SessionId = string;
/**
* Request to read content from a text file.
*
* Only available if the client supports the `fs.readTextFile` capability.
*/
export type ReadTextFileRequest = {
/**
* The session ID for this request.
*/
sessionId: SessionId;
/**
* Absolute path to the file to read.
*/
path: string;
/**
* Line number to start reading from (1-based).
*/
line?: number | null;
/**
* Maximum number of lines to read.
*/
limit?: number | null;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Request for user permission to execute a tool call.
*
* Sent when the agent needs authorization before performing a sensitive operation.
*
* See protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)
*/
export type RequestPermissionRequest = {
/**
* The session ID for this request.
*/
sessionId: SessionId;
/**
* Details about the tool call requiring permission.
*/
toolCall: ToolCallUpdate;
/**
* Available permission options for the user to choose from.
*/
options: Array<PermissionOption>;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* An update to an existing tool call.
*
* Used to report progress and results as tools execute. All fields except
* the tool call ID are optional - only changed fields need to be included.
*
* See protocol docs: [Updating](https://agentclientprotocol.com/protocol/tool-calls#updating)
*/
export type ToolCallUpdate = {
/**
* The ID of the tool call being updated.
*/
toolCallId: ToolCallId;
/**
* Update the tool kind.
*/
kind?: ToolKind | null;
/**
* Update the execution status.
*/
status?: ToolCallStatus | null;
/**
* Update the human-readable title.
*/
title?: string | null;
/**
* Replace the content collection.
*/
content?: Array<ToolCallContent> | null;
/**
* Replace the locations collection.
*/
locations?: Array<ToolCallLocation> | null;
/**
* Update the raw input.
*/
rawInput?: unknown;
/**
* Update the raw output.
*/
rawOutput?: unknown;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Unique identifier for a tool call within a session.
*/
export type ToolCallId = string;
/**
* Categories of tools that can be invoked.
*
* Tool kinds help clients choose appropriate icons and optimize how they
* display tool execution progress.
*
* See protocol docs: [Creating](https://agentclientprotocol.com/protocol/tool-calls#creating)
*/
export type ToolKind =
| "read"
| "edit"
| "delete"
| "move"
| "search"
| "execute"
| "think"
| "fetch"
| "switch_mode"
| "other";
/**
* Execution status of a tool call.
*
* Tool calls progress through different statuses during their lifecycle.
*
* See protocol docs: [Status](https://agentclientprotocol.com/protocol/tool-calls#status)
*/
export type ToolCallStatus = "pending" | "in_progress" | "completed" | "failed";
/**
* Content produced by a tool call.
*
* Tool calls can produce different types of content including
* standard content blocks (text, images) or file diffs.
*
* See protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)
*/
export type ToolCallContent =
| (Content & {
type: "content";
})
| (Diff & {
type: "diff";
})
| (Terminal & {
type: "terminal";
});
/**
* Content blocks represent displayable information in the Agent Client Protocol.
*
* They provide a structured way to handle various types of user-facing content—whether
* it's text from language models, images for analysis, or embedded resources for context.
*
* Content blocks appear in:
* - User prompts sent via `session/prompt`
* - Language model output streamed through `session/update` notifications
* - Progress updates and results from tool calls
*
* This structure is compatible with the Model Context Protocol (MCP), enabling
* agents to seamlessly forward content from MCP tool outputs without transformation.
*
* See protocol docs: [Content](https://agentclientprotocol.com/protocol/content)
*/
export type ContentBlock =
| (TextContent & {
type: "text";
})
| (ImageContent & {
type: "image";
})
| (AudioContent & {
type: "audio";
})
| (ResourceLink & {
type: "resource_link";
})
| (EmbeddedResource & {
type: "resource";
});
/**
* Optional annotations for the client. The client can use annotations to inform how objects are used or displayed
*/
export type Annotations = {
/**
* Intended recipients for this content, such as the user or assistant.
*/
audience?: Array<Role> | null;
/**
* Timestamp indicating when the underlying resource was last modified.
*/
lastModified?: string | null;
/**
* Relative importance of this content when clients choose what to surface.
*/
priority?: number | null;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* The sender or recipient of messages and data in a conversation.
*/
export type Role = "assistant" | "user";
/**
* Text provided to or from an LLM.
*/
export type TextContent = {
/**
* Optional annotations that help clients decide how to display or route this content.
*/
annotations?: Annotations | null;
/**
* Text payload carried by this content block.
*/
text: string;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* An image provided to or from an LLM.
*/
export type ImageContent = {
/**
* Optional annotations that help clients decide how to display or route this content.
*/
annotations?: Annotations | null;
/**
* Base64-encoded media payload.
*/
data: string;
/**
* MIME type describing the encoded media payload.
*/
mimeType: string;
/**
* URI associated with this resource or media payload.
*/
uri?: string | null;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Audio provided to or from an LLM.
*/
export type AudioContent = {
/**
* Optional annotations that help clients decide how to display or route this content.
*/
annotations?: Annotations | null;
/**
* Base64-encoded media payload.
*/
data: string;
/**
* MIME type describing the encoded media payload.
*/
mimeType: string;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* A resource that the server is capable of reading, included in a prompt or tool call result.
*/
export type ResourceLink = {
/**
* Optional annotations that help clients decide how to display or route this content.
*/
annotations?: Annotations | null;
/**
* Optional human-readable details shown with this protocol object.
*/
description?: string | null;
/**
* MIME type describing the encoded media payload.
*/
mimeType?: string | null;
/**
* Human-readable name shown for this protocol object.
*/
name: string;
/**
* Optional size of the linked resource in bytes, if known.
*/
size?: number | null;
/**
* Optional display title for end-user UI.
*/
title?: string | null;
/**
* URI associated with this resource or media payload.
*/
uri: string;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Resource content that can be embedded in a message.
*/
export type EmbeddedResourceResource =
TextResourceContents | BlobResourceContents;
/**
* Text-based resource contents.
*/
export type TextResourceContents = {
/**
* MIME type describing the encoded media payload.
*/
mimeType?: string | null;
/**
* Text payload carried by this content block.
*/
text: string;
/**
* URI associated with this resource or media payload.
*/
uri: string;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Binary resource contents.
*/
export type BlobResourceContents = {
/**
* Base64-encoded bytes for a binary resource payload.
*/
blob: string;
/**
* MIME type describing the encoded media payload.
*/
mimeType?: string | null;
/**
* URI associated with this resource or media payload.
*/
uri: string;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* The contents of a resource, embedded into a prompt or tool call result.
*/
export type EmbeddedResource = {
/**
* Optional annotations that help clients decide how to display or route this content.
*/
annotations?: Annotations | null;
/**
* Embedded resource payload, either text or binary data.
*/
resource: EmbeddedResourceResource;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Standard content block (text, images, resources).
*/
export type Content = {
/**
* The actual content block.
*/
content: ContentBlock;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* A diff representing file modifications.
*
* Shows changes to files in a format suitable for display in the client UI.
*
* See protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)
*/
export type Diff = {
/**
* The file path being modified.
*/
path: string;
/**
* The original content (None for new files).
*/
oldText?: string | null;
/**
* The new content after modification.
*/
newText: string;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Typed identifier used for terminal values on the wire.
*/
export type TerminalId = string;
/**
* Embed a terminal created with `terminal/create` by its id.
*
* The terminal must be added before calling `terminal/release`.
*
* See protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)
*/
export type Terminal = {
/**
* Identifier of the terminal instance to embed in the content stream.
*/
terminalId: TerminalId;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* A file location being accessed or modified by a tool.
*
* Enables clients to implement "follow-along" features that track
* which files the agent is working with in real-time.
*
* See protocol docs: [Following the Agent](https://agentclientprotocol.com/protocol/tool-calls#following-the-agent)
*/
export type ToolCallLocation = {
/**
* The file path being accessed or modified.
*/
path: string;
/**
* Optional line number within the file.
*/
line?: number | null;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* An option presented to the user when requesting permission.
*/
export type PermissionOption = {
/**
* Unique identifier for this permission option.
*/
optionId: PermissionOptionId;
/**
* Human-readable label to display to the user.
*/
name: string;
/**
* Hint about the nature of this permission option.
*/
kind: PermissionOptionKind;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Unique identifier for a permission option.
*/
export type PermissionOptionId = string;
/**
* The type of permission option being presented to the user.
*
* Helps clients choose appropriate icons and UI treatment.
*/
export type PermissionOptionKind =
"allow_once" | "allow_always" | "reject_once" | "reject_always";
/**
* Request to create a new terminal and execute a command.
*/
export type CreateTerminalRequest = {
/**
* The session ID for this request.
*/
sessionId: SessionId;
/**
* The command to execute.
*/
command: string;
/**
* Array of command arguments.
*/
args?: Array<string>;
/**
* Environment variables for the command.
*/
env?: Array<EnvVariable>;
/**
* Working directory for the command (absolute path).
*/
cwd?: string | null;
/**
* Maximum number of output bytes to retain.
*
* When the limit is exceeded, the Client truncates from the beginning of the output
* to stay within the limit.
*
* The Client MUST ensure truncation happens at a character boundary to maintain valid
* string output, even if this means the retained output is slightly less than the
* specified limit.
*/
outputByteLimit?: number | null;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* An environment variable to set when launching an MCP server.
*/
export type EnvVariable = {
/**
* The name of the environment variable.
*/
name: string;
/**
* The value to set for the environment variable.
*/
value: string;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Request to get the current output and status of a terminal.
*/
export type TerminalOutputRequest = {
/**
* The session ID for this request.
*/
sessionId: SessionId;
/**
* The ID of the terminal to get output from.
*/
terminalId: TerminalId;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Request to release a terminal and free its resources.
*/
export type ReleaseTerminalRequest = {
/**
* The session ID for this request.
*/
sessionId: SessionId;
/**
* The ID of the terminal to release.
*/
terminalId: TerminalId;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Request to wait for a terminal command to exit.
*/
export type WaitForTerminalExitRequest = {
/**
* The session ID for this request.
*/
sessionId: SessionId;
/**
* The ID of the terminal to wait for.
*/
terminalId: TerminalId;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Request to kill a terminal without releasing it.
*/
export type KillTerminalRequest = {
/**
* The session ID for this request.
*/
sessionId: SessionId;
/**
* The ID of the terminal to kill.
*/
terminalId: TerminalId;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* **UNSTABLE**
*
* This capability is not part of the spec yet, and may be removed or changed at any point.
*
* Request from the agent to elicit structured user input.
*
* The agent sends this to the client to request information from the user,
* either via a form or by directing them to a URL.
* Elicitations are tied to a session (optionally a tool call) or a request.
*
* @experimental
*/
export type CreateElicitationRequest = (
| (ElicitationFormMode & {
mode: "form";
})
| (ElicitationUrlMode & {
mode: "url";
})
) & {
/**
* A human-readable message describing what input is needed.
*/
message: string;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* **UNSTABLE**
*
* This capability is not part of the spec yet, and may be removed or changed at any point.
*
* Session-scoped elicitation, optionally tied to a specific tool call.
*
* When `tool_call_id` is set, the elicitation is tied to a specific tool call.
* This is useful when an agent receives an elicitation from an MCP server
* during a tool call and needs to redirect it to the user.
*
* @experimental
*/
export type ElicitationSessionScope = {
/**
* The session this elicitation is tied to.
*/
sessionId: SessionId;
/**
* Optional tool call within the session.
*/
toolCallId?: ToolCallId | null;
};
/**
* **UNSTABLE**
*
* This capability is not part of the spec yet, and may be removed or changed at any point.
*
* Request-scoped elicitation, tied to a specific JSON-RPC request outside of a session
* (e.g., during auth/configuration phases before any session is started).
*
* @experimental
*/
export type ElicitationRequestScope = {
/**
* The request this elicitation is tied to.
*/
requestId: RequestId;
};
/**
* Type-safe elicitation schema for requesting structured user input.
*
* This represents a JSON Schema object with primitive-typed properties,
* as required by the elicitation specification.
*/
export type ElicitationSchema = {
/**
* Type discriminator. Always `"object"`.
*/
type?: ElicitationSchemaType;
/**
* Optional title for the schema.
*/
title?: string | null;
/**
* Property definitions (must be primitive types).
*/
properties?: {
[key: string]: ElicitationPropertySchema;
};
/**
* List of required property names.
*/
required?: Array<string> | null;
/**
* Optional description of what this schema represents.
*/
description?: string | null;
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
* these keys.
*
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
*/
_meta?: {
[key: string]: unknown;
} | null;
};
/**
* Object schema type.
*/
export type ElicitationSchemaType = "object";
/**
* Property schema for elicitation form fields.
*
* Each variant corresponds to a JSON Schema `"type"` value.
* Single-select enums use the `String` variant with `enum` or `oneOf` set.
* Multi-select enums use the `Array` variant.
*/
export type ElicitationPropertySchema =
| (StringPropertySchema & {
type: "string";
})
| (NumberPropertySchema & {
type: "number";
})