happy-imou-cloud 2.1.43 → 2.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/compat/acp-sdk-schema/index.d.ts +16 -3
  2. package/compat/acp-sdk-schema/index.js +15 -2
  3. package/compat/acp-sdk-schema/types.gen.d.ts +1801 -313
  4. package/compat/acp-sdk-schema/zod.gen.d.ts +3267 -1775
  5. package/compat/acp-sdk-schema/zod.gen.js +1007 -316
  6. package/dist/{BaseReasoningProcessor-D6itItnT.cjs → BaseReasoningProcessor-CMyFNQ1O.cjs} +2 -2
  7. package/dist/{BaseReasoningProcessor-CWCPAVJ3.mjs → BaseReasoningProcessor-DVSN7PCw.mjs} +2 -2
  8. package/dist/{ProviderSelectionHandler-CYUH1U8F.mjs → ProviderSelectionHandler-2IaDlDBx.mjs} +2 -2
  9. package/dist/{ProviderSelectionHandler-CXwqOJpC.cjs → ProviderSelectionHandler-Dqa4j1pD.cjs} +2 -2
  10. package/dist/{api-B89O-SC-.mjs → api-BhMVpzwg.mjs} +12 -8
  11. package/dist/{api-zMic8QXq.cjs → api-BoWVQeVe.cjs} +12 -8
  12. package/dist/{command-_qNFoJ-l.cjs → command-DoF8oaxg.cjs} +2 -2
  13. package/dist/{command-W01qXC9C.mjs → command-h3Rr4Abu.mjs} +2 -2
  14. package/dist/{index-CiHiCC31.mjs → index-DxF1W0nt.mjs} +57 -14
  15. package/dist/{index-DVVbyQGZ.cjs → index-kIN8gN9G.cjs} +60 -17
  16. package/dist/index.cjs +2 -2
  17. package/dist/index.mjs +2 -2
  18. package/dist/lib.cjs +1 -1
  19. package/dist/lib.d.cts +335 -336
  20. package/dist/lib.d.mts +335 -336
  21. package/dist/lib.mjs +1 -1
  22. package/dist/{registerKillSessionHandler-CDYAY5Ev.cjs → registerKillSessionHandler-CBm2WFM0.cjs} +2 -2
  23. package/dist/{registerKillSessionHandler-BnS3ozFX.mjs → registerKillSessionHandler-Dsg63Cx6.mjs} +2 -2
  24. package/dist/{runClaude-0U7kV07_.mjs → runClaude-BpwlCyVT.mjs} +4 -4
  25. package/dist/{runClaude-C1xfptKt.cjs → runClaude-Dq9OISKt.cjs} +4 -4
  26. package/dist/{runCodex-DnDmHm7E.mjs → runCodex-BMNR2hNp.mjs} +5 -5
  27. package/dist/{runCodex-BBgKpYLO.cjs → runCodex-BnzErOK_.cjs} +5 -5
  28. package/dist/{runGemini-CUwQHJ9y.cjs → runGemini-CYc9Ufxo.cjs} +4 -4
  29. package/dist/{runGemini-DcsIBQSc.mjs → runGemini-D4Af8oH1.mjs} +4 -4
  30. package/package.json +2 -2
  31. package/scripts/ensureAcpSdkCompat.mjs +37 -11
  32. package/scripts/release-smoke.mjs +1 -0
@@ -1,3 +1,26 @@
1
+ /**
2
+ * Notification sent when a suggestion is accepted.
3
+ */
4
+ export type AcceptNesNotification = {
5
+ /**
6
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
7
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
8
+ * these keys.
9
+ *
10
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
11
+ */
12
+ _meta?: {
13
+ [key: string]: unknown;
14
+ } | null;
15
+ /**
16
+ * The ID of the accepted suggestion.
17
+ */
18
+ id: string;
19
+ /**
20
+ * The session ID for this notification.
21
+ */
22
+ sessionId: SessionId;
23
+ };
1
24
  /**
2
25
  * **UNSTABLE**
3
26
  *
@@ -62,20 +85,52 @@ export type AgentCapabilities = {
62
85
  * MCP capabilities supported by the agent.
63
86
  */
64
87
  mcpCapabilities?: McpCapabilities;
88
+ /**
89
+ * **UNSTABLE**
90
+ *
91
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
92
+ *
93
+ * NES (Next Edit Suggestions) capabilities supported by the agent.
94
+ *
95
+ * @experimental
96
+ */
97
+ nes?: NesCapabilities | null;
98
+ /**
99
+ * **UNSTABLE**
100
+ *
101
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
102
+ *
103
+ * The position encoding selected by the agent from the client's supported encodings.
104
+ *
105
+ * @experimental
106
+ */
107
+ positionEncoding?: PositionEncodingKind | null;
65
108
  /**
66
109
  * Prompt capabilities supported by the agent.
67
110
  */
68
111
  promptCapabilities?: PromptCapabilities;
112
+ /**
113
+ * **UNSTABLE**
114
+ *
115
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
116
+ *
117
+ * Provider configuration capabilities supported by the agent.
118
+ *
119
+ * By supplying `{}` it means that the agent supports provider configuration methods.
120
+ *
121
+ * @experimental
122
+ */
123
+ providers?: ProvidersCapabilities | null;
69
124
  sessionCapabilities?: SessionCapabilities;
70
125
  };
71
126
  export type AgentNotification = {
72
127
  method: string;
73
- params?: SessionNotification | ElicitationCompleteNotification | ExtNotification | null;
128
+ params?: SessionNotification | CompleteElicitationNotification | ExtNotification | null;
74
129
  };
75
130
  export type AgentRequest = {
76
131
  id: RequestId;
77
132
  method: string;
78
- params?: WriteTextFileRequest | ReadTextFileRequest | RequestPermissionRequest | CreateTerminalRequest | TerminalOutputRequest | ReleaseTerminalRequest | WaitForTerminalExitRequest | KillTerminalRequest | ElicitationRequest | ExtRequest | null;
133
+ params?: WriteTextFileRequest | ReadTextFileRequest | RequestPermissionRequest | CreateTerminalRequest | TerminalOutputRequest | ReleaseTerminalRequest | WaitForTerminalExitRequest | KillTerminalRequest | CreateElicitationRequest | ExtRequest | null;
79
134
  };
80
135
  export type AgentResponse = {
81
136
  id: RequestId;
@@ -87,7 +142,7 @@ export type AgentResponse = {
87
142
  *
88
143
  * These are responses to the corresponding `ClientRequest` variants.
89
144
  */
90
- result: InitializeResponse | AuthenticateResponse | LogoutResponse | NewSessionResponse | LoadSessionResponse | ListSessionsResponse | ForkSessionResponse | ResumeSessionResponse | CloseSessionResponse | SetSessionModeResponse | SetSessionConfigOptionResponse | PromptResponse | SetSessionModelResponse | ExtResponse;
145
+ result: InitializeResponse | AuthenticateResponse | ListProvidersResponse | SetProvidersResponse | DisableProvidersResponse | LogoutResponse | NewSessionResponse | LoadSessionResponse | ListSessionsResponse | ForkSessionResponse | ResumeSessionResponse | CloseSessionResponse | SetSessionModeResponse | SetSessionConfigOptionResponse | PromptResponse | SetSessionModelResponse | StartNesResponse | SuggestNesResponse | CloseNesResponse | ExtResponse;
91
146
  } | {
92
147
  error: Error;
93
148
  id: RequestId;
@@ -548,19 +603,66 @@ export type ClientCapabilities = {
548
603
  * Determines which file operations the agent can request.
549
604
  */
550
605
  fs?: FileSystemCapabilities;
606
+ /**
607
+ * **UNSTABLE**
608
+ *
609
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
610
+ *
611
+ * NES (Next Edit Suggestions) capabilities supported by the client.
612
+ *
613
+ * @experimental
614
+ */
615
+ nes?: ClientNesCapabilities | null;
616
+ /**
617
+ * **UNSTABLE**
618
+ *
619
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
620
+ *
621
+ * The position encodings supported by the client, in order of preference.
622
+ *
623
+ * @experimental
624
+ */
625
+ positionEncodings?: Array<PositionEncodingKind>;
551
626
  /**
552
627
  * Whether the Client support all `terminal*` methods.
553
628
  */
554
629
  terminal?: boolean;
555
630
  };
631
+ /**
632
+ * NES capabilities advertised by the client during initialization.
633
+ */
634
+ export type ClientNesCapabilities = {
635
+ /**
636
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
637
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
638
+ * these keys.
639
+ *
640
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
641
+ */
642
+ _meta?: {
643
+ [key: string]: unknown;
644
+ } | null;
645
+ /**
646
+ * Whether the client supports the `jump` suggestion kind.
647
+ */
648
+ jump?: NesJumpCapabilities | null;
649
+ /**
650
+ * Whether the client supports the `rename` suggestion kind.
651
+ */
652
+ rename?: NesRenameCapabilities | null;
653
+ /**
654
+ * Whether the client supports the `searchAndReplace` suggestion kind.
655
+ */
656
+ searchAndReplace?: NesSearchAndReplaceCapabilities | null;
657
+ };
556
658
  export type ClientNotification = {
557
659
  method: string;
558
- params?: CancelNotification | ExtNotification | null;
660
+ params?: CancelNotification | DidOpenDocumentNotification | DidChangeDocumentNotification | DidCloseDocumentNotification | DidSaveDocumentNotification | DidFocusDocumentNotification | AcceptNesNotification | RejectNesNotification | ExtNotification | null;
559
661
  };
560
662
  export type ClientRequest = {
561
663
  id: RequestId;
562
664
  method: string;
563
- params?: InitializeRequest | AuthenticateRequest | LogoutRequest | NewSessionRequest | LoadSessionRequest | ListSessionsRequest | ForkSessionRequest | ResumeSessionRequest | CloseSessionRequest | SetSessionModeRequest | SetSessionConfigOptionRequest | PromptRequest | SetSessionModelRequest | ExtRequest | null;
665
+ params?: InitializeRequest | AuthenticateRequest | ListProvidersRequest | SetProvidersRequest | DisableProvidersRequest | LogoutRequest | NewSessionRequest | LoadSessionRequest | ListSessionsRequest | ForkSessionRequest | ResumeSessionRequest | CloseSessionRequest | SetSessionModeRequest | SetSessionConfigOptionRequest | PromptRequest | SetSessionModelRequest | StartNesRequest | SuggestNesRequest | CloseNesRequest | ExtRequest | null;
564
666
  };
565
667
  export type ClientResponse = {
566
668
  id: RequestId;
@@ -572,25 +674,56 @@ export type ClientResponse = {
572
674
  *
573
675
  * These are responses to the corresponding `AgentRequest` variants.
574
676
  */
575
- result: WriteTextFileResponse | ReadTextFileResponse | RequestPermissionResponse | CreateTerminalResponse | TerminalOutputResponse | ReleaseTerminalResponse | WaitForTerminalExitResponse | KillTerminalResponse | ElicitationResponse | ExtResponse;
677
+ result: WriteTextFileResponse | ReadTextFileResponse | RequestPermissionResponse | CreateTerminalResponse | TerminalOutputResponse | ReleaseTerminalResponse | WaitForTerminalExitResponse | KillTerminalResponse | CreateElicitationResponse | ExtResponse;
576
678
  } | {
577
679
  error: Error;
578
680
  id: RequestId;
579
681
  };
580
682
  /**
581
- * **UNSTABLE**
582
- *
583
- * This capability is not part of the spec yet, and may be removed or changed at any point.
683
+ * Request to close an NES session.
584
684
  *
685
+ * The agent **must** cancel any ongoing work related to the NES session
686
+ * and then free up any resources associated with the session.
687
+ */
688
+ export type CloseNesRequest = {
689
+ /**
690
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
691
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
692
+ * these keys.
693
+ *
694
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
695
+ */
696
+ _meta?: {
697
+ [key: string]: unknown;
698
+ } | null;
699
+ /**
700
+ * The ID of the NES session to close.
701
+ */
702
+ sessionId: SessionId;
703
+ };
704
+ /**
705
+ * Response from closing an NES session.
706
+ */
707
+ export type CloseNesResponse = {
708
+ /**
709
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
710
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
711
+ * these keys.
712
+ *
713
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
714
+ */
715
+ _meta?: {
716
+ [key: string]: unknown;
717
+ } | null;
718
+ };
719
+ /**
585
720
  * Request parameters for closing an active session.
586
721
  *
587
722
  * If supported, the agent **must** cancel any ongoing work related to the session
588
723
  * (treat it as if `session/cancel` was called) and then free up any resources
589
724
  * associated with the session.
590
725
  *
591
- * Only available if the Agent supports the `session.close` capability.
592
- *
593
- * @experimental
726
+ * Only available if the Agent supports the `sessionCapabilities.close` capability.
594
727
  */
595
728
  export type CloseSessionRequest = {
596
729
  /**
@@ -608,16 +741,31 @@ export type CloseSessionRequest = {
608
741
  */
609
742
  sessionId: SessionId;
610
743
  };
744
+ /**
745
+ * Response from closing a session.
746
+ */
747
+ export type CloseSessionResponse = {
748
+ /**
749
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
750
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
751
+ * these keys.
752
+ *
753
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
754
+ */
755
+ _meta?: {
756
+ [key: string]: unknown;
757
+ } | null;
758
+ };
611
759
  /**
612
760
  * **UNSTABLE**
613
761
  *
614
762
  * This capability is not part of the spec yet, and may be removed or changed at any point.
615
763
  *
616
- * Response from closing a session.
764
+ * Notification sent by the agent when a URL-based elicitation is complete.
617
765
  *
618
766
  * @experimental
619
767
  */
620
- export type CloseSessionResponse = {
768
+ export type CompleteElicitationNotification = {
621
769
  /**
622
770
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
623
771
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -628,6 +776,10 @@ export type CloseSessionResponse = {
628
776
  _meta?: {
629
777
  [key: string]: unknown;
630
778
  } | null;
779
+ /**
780
+ * The ID of the elicitation that completed.
781
+ */
782
+ elicitationId: ElicitationId;
631
783
  };
632
784
  /**
633
785
  * Session configuration options have been updated.
@@ -746,6 +898,66 @@ export type Cost = {
746
898
  */
747
899
  currency: string;
748
900
  };
901
+ /**
902
+ * **UNSTABLE**
903
+ *
904
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
905
+ *
906
+ * Request from the agent to elicit structured user input.
907
+ *
908
+ * The agent sends this to the client to request information from the user,
909
+ * either via a form or by directing them to a URL.
910
+ * Elicitations are tied to a session (optionally a tool call) or a request.
911
+ *
912
+ * @experimental
913
+ */
914
+ export type CreateElicitationRequest = ((ElicitationFormMode & {
915
+ mode: "form";
916
+ }) | (ElicitationUrlMode & {
917
+ mode: "url";
918
+ })) & {
919
+ /**
920
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
921
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
922
+ * these keys.
923
+ *
924
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
925
+ */
926
+ _meta?: {
927
+ [key: string]: unknown;
928
+ } | null;
929
+ /**
930
+ * A human-readable message describing what input is needed.
931
+ */
932
+ message: string;
933
+ };
934
+ /**
935
+ * **UNSTABLE**
936
+ *
937
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
938
+ *
939
+ * Response from the client to an elicitation request.
940
+ *
941
+ * @experimental
942
+ */
943
+ export type CreateElicitationResponse = ((ElicitationAcceptAction & {
944
+ action: "accept";
945
+ }) | {
946
+ action: "decline";
947
+ } | {
948
+ action: "cancel";
949
+ }) & {
950
+ /**
951
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
952
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
953
+ * these keys.
954
+ *
955
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
956
+ */
957
+ _meta?: {
958
+ [key: string]: unknown;
959
+ } | null;
960
+ };
749
961
  /**
750
962
  * Request to create a new terminal and execute a command.
751
963
  */
@@ -833,13 +1045,9 @@ export type CurrentModeUpdate = {
833
1045
  currentModeId: SessionModeId;
834
1046
  };
835
1047
  /**
836
- * A diff representing file modifications.
837
- *
838
- * Shows changes to files in a format suitable for display in the client UI.
839
- *
840
- * See protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)
1048
+ * Notification sent when a file is edited.
841
1049
  */
842
- export type Diff = {
1050
+ export type DidChangeDocumentNotification = {
843
1051
  /**
844
1052
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
845
1053
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -851,61 +1059,26 @@ export type Diff = {
851
1059
  [key: string]: unknown;
852
1060
  } | null;
853
1061
  /**
854
- * The new content after modification.
1062
+ * The content changes.
855
1063
  */
856
- newText: string;
1064
+ contentChanges: Array<TextDocumentContentChangeEvent>;
857
1065
  /**
858
- * The original content (None for new files).
1066
+ * The session ID for this notification.
859
1067
  */
860
- oldText?: string | null;
1068
+ sessionId: SessionId;
861
1069
  /**
862
- * The file path being modified.
1070
+ * The URI of the changed document.
863
1071
  */
864
- path: string;
865
- };
866
- /**
867
- * **UNSTABLE**
868
- *
869
- * This capability is not part of the spec yet, and may be removed or changed at any point.
870
- *
871
- * The user accepted the elicitation and provided content.
872
- *
873
- * @experimental
874
- */
875
- export type ElicitationAcceptAction = {
1072
+ uri: string;
876
1073
  /**
877
- * The user-provided content, if any, as an object matching the requested schema.
1074
+ * The new version number of the document.
878
1075
  */
879
- content?: {
880
- [key: string]: ElicitationContentValue;
881
- } | null;
882
- };
883
- /**
884
- * **UNSTABLE**
885
- *
886
- * This capability is not part of the spec yet, and may be removed or changed at any point.
887
- *
888
- * The user's action in response to an elicitation.
889
- *
890
- * @experimental
891
- */
892
- export type ElicitationAction = (ElicitationAcceptAction & {
893
- action: "accept";
894
- }) | {
895
- action: "decline";
896
- } | {
897
- action: "cancel";
1076
+ version: number;
898
1077
  };
899
1078
  /**
900
- * **UNSTABLE**
901
- *
902
- * This capability is not part of the spec yet, and may be removed or changed at any point.
903
- *
904
- * Elicitation capabilities supported by the client.
905
- *
906
- * @experimental
1079
+ * Notification sent when a file is closed.
907
1080
  */
908
- export type ElicitationCapabilities = {
1081
+ export type DidCloseDocumentNotification = {
909
1082
  /**
910
1083
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
911
1084
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -917,24 +1090,18 @@ export type ElicitationCapabilities = {
917
1090
  [key: string]: unknown;
918
1091
  } | null;
919
1092
  /**
920
- * Whether the client supports form-based elicitation.
1093
+ * The session ID for this notification.
921
1094
  */
922
- form?: ElicitationFormCapabilities | null;
1095
+ sessionId: SessionId;
923
1096
  /**
924
- * Whether the client supports URL-based elicitation.
1097
+ * The URI of the closed document.
925
1098
  */
926
- url?: ElicitationUrlCapabilities | null;
1099
+ uri: string;
927
1100
  };
928
1101
  /**
929
- * **UNSTABLE**
930
- *
931
- * This capability is not part of the spec yet, and may be removed or changed at any point.
932
- *
933
- * Notification sent by the agent when a URL-based elicitation is complete.
934
- *
935
- * @experimental
1102
+ * Notification sent when a file becomes the active editor tab.
936
1103
  */
937
- export type ElicitationCompleteNotification = {
1104
+ export type DidFocusDocumentNotification = {
938
1105
  /**
939
1106
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
940
1107
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -946,21 +1113,125 @@ export type ElicitationCompleteNotification = {
946
1113
  [key: string]: unknown;
947
1114
  } | null;
948
1115
  /**
949
- * The ID of the elicitation that completed.
1116
+ * The current cursor position.
950
1117
  */
951
- elicitationId: ElicitationId;
952
- };
953
- export type ElicitationContentValue = string | number | number | boolean | Array<string>;
1118
+ position: Position;
1119
+ /**
1120
+ * The session ID for this notification.
1121
+ */
1122
+ sessionId: SessionId;
1123
+ /**
1124
+ * The URI of the focused document.
1125
+ */
1126
+ uri: string;
1127
+ /**
1128
+ * The version number of the document.
1129
+ */
1130
+ version: number;
1131
+ /**
1132
+ * The portion of the file currently visible in the editor viewport.
1133
+ */
1134
+ visibleRange: Range;
1135
+ };
1136
+ /**
1137
+ * Notification sent when a file is opened in the editor.
1138
+ */
1139
+ export type DidOpenDocumentNotification = {
1140
+ /**
1141
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
1142
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
1143
+ * these keys.
1144
+ *
1145
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1146
+ */
1147
+ _meta?: {
1148
+ [key: string]: unknown;
1149
+ } | null;
1150
+ /**
1151
+ * The language identifier of the document (e.g., "rust", "python").
1152
+ */
1153
+ languageId: string;
1154
+ /**
1155
+ * The session ID for this notification.
1156
+ */
1157
+ sessionId: SessionId;
1158
+ /**
1159
+ * The full text content of the document.
1160
+ */
1161
+ text: string;
1162
+ /**
1163
+ * The URI of the opened document.
1164
+ */
1165
+ uri: string;
1166
+ /**
1167
+ * The version number of the document.
1168
+ */
1169
+ version: number;
1170
+ };
1171
+ /**
1172
+ * Notification sent when a file is saved.
1173
+ */
1174
+ export type DidSaveDocumentNotification = {
1175
+ /**
1176
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
1177
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
1178
+ * these keys.
1179
+ *
1180
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1181
+ */
1182
+ _meta?: {
1183
+ [key: string]: unknown;
1184
+ } | null;
1185
+ /**
1186
+ * The session ID for this notification.
1187
+ */
1188
+ sessionId: SessionId;
1189
+ /**
1190
+ * The URI of the saved document.
1191
+ */
1192
+ uri: string;
1193
+ };
1194
+ /**
1195
+ * A diff representing file modifications.
1196
+ *
1197
+ * Shows changes to files in a format suitable for display in the client UI.
1198
+ *
1199
+ * See protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)
1200
+ */
1201
+ export type Diff = {
1202
+ /**
1203
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
1204
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
1205
+ * these keys.
1206
+ *
1207
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1208
+ */
1209
+ _meta?: {
1210
+ [key: string]: unknown;
1211
+ } | null;
1212
+ /**
1213
+ * The new content after modification.
1214
+ */
1215
+ newText: string;
1216
+ /**
1217
+ * The original content (None for new files).
1218
+ */
1219
+ oldText?: string | null;
1220
+ /**
1221
+ * The file path being modified.
1222
+ */
1223
+ path: string;
1224
+ };
954
1225
  /**
955
1226
  * **UNSTABLE**
956
1227
  *
957
1228
  * This capability is not part of the spec yet, and may be removed or changed at any point.
958
1229
  *
959
- * Form-based elicitation capabilities.
1230
+ * Request parameters for `providers/disable`.
960
1231
  *
961
1232
  * @experimental
962
1233
  */
963
- export type ElicitationFormCapabilities = {
1234
+ export type DisableProvidersRequest = {
964
1235
  /**
965
1236
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
966
1237
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -971,55 +1242,59 @@ export type ElicitationFormCapabilities = {
971
1242
  _meta?: {
972
1243
  [key: string]: unknown;
973
1244
  } | null;
1245
+ /**
1246
+ * Provider id to disable.
1247
+ */
1248
+ id: string;
974
1249
  };
975
1250
  /**
976
1251
  * **UNSTABLE**
977
1252
  *
978
1253
  * This capability is not part of the spec yet, and may be removed or changed at any point.
979
1254
  *
980
- * Form-based elicitation mode where the client renders a form from the provided schema.
1255
+ * Response to `providers/disable`.
981
1256
  *
982
1257
  * @experimental
983
1258
  */
984
- export type ElicitationFormMode = {
1259
+ export type DisableProvidersResponse = {
985
1260
  /**
986
- * A JSON Schema describing the form fields to present to the user.
1261
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
1262
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
1263
+ * these keys.
1264
+ *
1265
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
987
1266
  */
988
- requestedSchema: ElicitationSchema;
1267
+ _meta?: {
1268
+ [key: string]: unknown;
1269
+ } | null;
989
1270
  };
990
1271
  /**
991
1272
  * **UNSTABLE**
992
1273
  *
993
1274
  * This capability is not part of the spec yet, and may be removed or changed at any point.
994
1275
  *
995
- * Unique identifier for an elicitation.
1276
+ * The user accepted the elicitation and provided content.
996
1277
  *
997
1278
  * @experimental
998
1279
  */
999
- export type ElicitationId = string;
1280
+ export type ElicitationAcceptAction = {
1281
+ /**
1282
+ * The user-provided content, if any, as an object matching the requested schema.
1283
+ */
1284
+ content?: {
1285
+ [key: string]: ElicitationContentValue;
1286
+ } | null;
1287
+ };
1000
1288
  /**
1001
- * Property schema for elicitation form fields.
1289
+ * **UNSTABLE**
1002
1290
  *
1003
- * Each variant corresponds to a JSON Schema `"type"` value.
1004
- * Single-select enums use the `String` variant with `enum` or `oneOf` set.
1005
- * Multi-select enums use the `Array` variant.
1291
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
1292
+ *
1293
+ * Elicitation capabilities supported by the client.
1294
+ *
1295
+ * @experimental
1006
1296
  */
1007
- export type ElicitationPropertySchema = (StringPropertySchema & {
1008
- type: "string";
1009
- }) | (NumberPropertySchema & {
1010
- type: "number";
1011
- }) | (IntegerPropertySchema & {
1012
- type: "integer";
1013
- }) | (BooleanPropertySchema & {
1014
- type: "boolean";
1015
- }) | (MultiSelectPropertySchema & {
1016
- type: "array";
1017
- });
1018
- export type ElicitationRequest = ((ElicitationFormMode & {
1019
- mode: "form";
1020
- }) | (ElicitationUrlMode & {
1021
- mode: "url";
1022
- })) & {
1297
+ export type ElicitationCapabilities = {
1023
1298
  /**
1024
1299
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
1025
1300
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -1031,24 +1306,25 @@ export type ElicitationRequest = ((ElicitationFormMode & {
1031
1306
  [key: string]: unknown;
1032
1307
  } | null;
1033
1308
  /**
1034
- * A human-readable message describing what input is needed.
1309
+ * Whether the client supports form-based elicitation.
1035
1310
  */
1036
- message: string;
1311
+ form?: ElicitationFormCapabilities | null;
1037
1312
  /**
1038
- * The session ID for this request.
1313
+ * Whether the client supports URL-based elicitation.
1039
1314
  */
1040
- sessionId: SessionId;
1315
+ url?: ElicitationUrlCapabilities | null;
1041
1316
  };
1317
+ export type ElicitationContentValue = string | number | number | boolean | Array<string>;
1042
1318
  /**
1043
1319
  * **UNSTABLE**
1044
1320
  *
1045
1321
  * This capability is not part of the spec yet, and may be removed or changed at any point.
1046
1322
  *
1047
- * Response from the client to an elicitation request.
1323
+ * Form-based elicitation capabilities.
1048
1324
  *
1049
1325
  * @experimental
1050
1326
  */
1051
- export type ElicitationResponse = {
1327
+ export type ElicitationFormCapabilities = {
1052
1328
  /**
1053
1329
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
1054
1330
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -1059,10 +1335,65 @@ export type ElicitationResponse = {
1059
1335
  _meta?: {
1060
1336
  [key: string]: unknown;
1061
1337
  } | null;
1338
+ };
1339
+ /**
1340
+ * **UNSTABLE**
1341
+ *
1342
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
1343
+ *
1344
+ * Form-based elicitation mode where the client renders a form from the provided schema.
1345
+ *
1346
+ * @experimental
1347
+ */
1348
+ export type ElicitationFormMode = (ElicitationSessionScope | ElicitationRequestScope) & {
1349
+ /**
1350
+ * A JSON Schema describing the form fields to present to the user.
1351
+ */
1352
+ requestedSchema: ElicitationSchema;
1353
+ };
1354
+ /**
1355
+ * **UNSTABLE**
1356
+ *
1357
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
1358
+ *
1359
+ * Unique identifier for an elicitation.
1360
+ *
1361
+ * @experimental
1362
+ */
1363
+ export type ElicitationId = string;
1364
+ /**
1365
+ * Property schema for elicitation form fields.
1366
+ *
1367
+ * Each variant corresponds to a JSON Schema `"type"` value.
1368
+ * Single-select enums use the `String` variant with `enum` or `oneOf` set.
1369
+ * Multi-select enums use the `Array` variant.
1370
+ */
1371
+ export type ElicitationPropertySchema = (StringPropertySchema & {
1372
+ type: "string";
1373
+ }) | (NumberPropertySchema & {
1374
+ type: "number";
1375
+ }) | (IntegerPropertySchema & {
1376
+ type: "integer";
1377
+ }) | (BooleanPropertySchema & {
1378
+ type: "boolean";
1379
+ }) | (MultiSelectPropertySchema & {
1380
+ type: "array";
1381
+ });
1382
+ /**
1383
+ * **UNSTABLE**
1384
+ *
1385
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
1386
+ *
1387
+ * Request-scoped elicitation, tied to a specific JSON-RPC request outside of a session
1388
+ * (e.g., during auth/configuration phases before any session is started).
1389
+ *
1390
+ * @experimental
1391
+ */
1392
+ export type ElicitationRequestScope = {
1062
1393
  /**
1063
- * The user's action in response to the elicitation.
1394
+ * The request this elicitation is tied to.
1064
1395
  */
1065
- action: ElicitationAction;
1396
+ requestId: RequestId;
1066
1397
  };
1067
1398
  /**
1068
1399
  * Type-safe elicitation schema for requesting structured user input.
@@ -1098,6 +1429,29 @@ export type ElicitationSchema = {
1098
1429
  * Object schema type.
1099
1430
  */
1100
1431
  export type ElicitationSchemaType = "object";
1432
+ /**
1433
+ * **UNSTABLE**
1434
+ *
1435
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
1436
+ *
1437
+ * Session-scoped elicitation, optionally tied to a specific tool call.
1438
+ *
1439
+ * When `tool_call_id` is set, the elicitation is tied to a specific tool call.
1440
+ * This is useful when an agent receives an elicitation from an MCP server
1441
+ * during a tool call and needs to redirect it to the user.
1442
+ *
1443
+ * @experimental
1444
+ */
1445
+ export type ElicitationSessionScope = {
1446
+ /**
1447
+ * The session this elicitation is tied to.
1448
+ */
1449
+ sessionId: SessionId;
1450
+ /**
1451
+ * Optional tool call within the session.
1452
+ */
1453
+ toolCallId?: ToolCallId | null;
1454
+ };
1101
1455
  /**
1102
1456
  * String schema type.
1103
1457
  */
@@ -1132,7 +1486,7 @@ export type ElicitationUrlCapabilities = {
1132
1486
  *
1133
1487
  * @experimental
1134
1488
  */
1135
- export type ElicitationUrlMode = {
1489
+ export type ElicitationUrlMode = (ElicitationSessionScope | ElicitationRequestScope) & {
1136
1490
  /**
1137
1491
  * The unique identifier for this elicitation.
1138
1492
  */
@@ -1305,6 +1659,20 @@ export type ForkSessionRequest = {
1305
1659
  _meta?: {
1306
1660
  [key: string]: unknown;
1307
1661
  } | null;
1662
+ /**
1663
+ * **UNSTABLE**
1664
+ *
1665
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
1666
+ *
1667
+ * Additional workspace roots to activate for this session. Each path must be absolute.
1668
+ *
1669
+ * When omitted or empty, no additional roots are activated. When non-empty,
1670
+ * this is the complete resulting additional-root list for the forked
1671
+ * session.
1672
+ *
1673
+ * @experimental
1674
+ */
1675
+ additionalDirectories?: Array<string>;
1308
1676
  /**
1309
1677
  * The working directory for this session.
1310
1678
  */
@@ -1576,11 +1944,15 @@ export type KillTerminalResponse = {
1576
1944
  } | null;
1577
1945
  };
1578
1946
  /**
1579
- * Request parameters for listing existing sessions.
1947
+ * **UNSTABLE**
1580
1948
  *
1581
- * Only available if the Agent supports the `sessionCapabilities.list` capability.
1949
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
1950
+ *
1951
+ * Request parameters for `providers/list`.
1952
+ *
1953
+ * @experimental
1582
1954
  */
1583
- export type ListSessionsRequest = {
1955
+ export type ListProvidersRequest = {
1584
1956
  /**
1585
1957
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
1586
1958
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -1591,19 +1963,17 @@ export type ListSessionsRequest = {
1591
1963
  _meta?: {
1592
1964
  [key: string]: unknown;
1593
1965
  } | null;
1594
- /**
1595
- * Opaque cursor token from a previous response's nextCursor field for cursor-based pagination
1596
- */
1597
- cursor?: string | null;
1598
- /**
1599
- * Filter sessions by working directory. Must be an absolute path.
1600
- */
1601
- cwd?: string | null;
1602
1966
  };
1603
1967
  /**
1604
- * Response from listing sessions.
1968
+ * **UNSTABLE**
1969
+ *
1970
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
1971
+ *
1972
+ * Response to `providers/list`.
1973
+ *
1974
+ * @experimental
1605
1975
  */
1606
- export type ListSessionsResponse = {
1976
+ export type ListProvidersResponse = {
1607
1977
  /**
1608
1978
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
1609
1979
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -1615,15 +1985,87 @@ export type ListSessionsResponse = {
1615
1985
  [key: string]: unknown;
1616
1986
  } | null;
1617
1987
  /**
1618
- * Opaque cursor token. If present, pass this in the next request's cursor parameter
1619
- * to fetch the next page. If absent, there are no more results.
1988
+ * Configurable providers with current routing info suitable for UI display.
1620
1989
  */
1621
- nextCursor?: string | null;
1990
+ providers: Array<ProviderInfo>;
1991
+ };
1992
+ /**
1993
+ * Request parameters for listing existing sessions.
1994
+ *
1995
+ * Only available if the Agent supports the `sessionCapabilities.list` capability.
1996
+ */
1997
+ export type ListSessionsRequest = {
1998
+ /**
1999
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2000
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2001
+ * these keys.
2002
+ *
2003
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2004
+ */
2005
+ _meta?: {
2006
+ [key: string]: unknown;
2007
+ } | null;
2008
+ /**
2009
+ * **UNSTABLE**
2010
+ *
2011
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
2012
+ *
2013
+ * Filter sessions by the exact ordered additional workspace roots. Each path must be absolute.
2014
+ *
2015
+ * This filter applies only when the field is present and non-empty. When
2016
+ * omitted or empty, no additional-root filter is applied.
2017
+ *
2018
+ * @experimental
2019
+ */
2020
+ additionalDirectories?: Array<string>;
2021
+ /**
2022
+ * Opaque cursor token from a previous response's nextCursor field for cursor-based pagination
2023
+ */
2024
+ cursor?: string | null;
2025
+ /**
2026
+ * Filter sessions by working directory. Must be an absolute path.
2027
+ */
2028
+ cwd?: string | null;
2029
+ };
2030
+ /**
2031
+ * Response from listing sessions.
2032
+ */
2033
+ export type ListSessionsResponse = {
2034
+ /**
2035
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2036
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2037
+ * these keys.
2038
+ *
2039
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2040
+ */
2041
+ _meta?: {
2042
+ [key: string]: unknown;
2043
+ } | null;
2044
+ /**
2045
+ * Opaque cursor token. If present, pass this in the next request's cursor parameter
2046
+ * to fetch the next page. If absent, there are no more results.
2047
+ */
2048
+ nextCursor?: string | null;
1622
2049
  /**
1623
2050
  * Array of session information objects
1624
2051
  */
1625
2052
  sessions: Array<SessionInfo>;
1626
2053
  };
2054
+ /**
2055
+ * **UNSTABLE**
2056
+ *
2057
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
2058
+ *
2059
+ * Well-known API protocol identifiers for LLM providers.
2060
+ *
2061
+ * Agents and clients MUST handle unknown protocol identifiers gracefully.
2062
+ *
2063
+ * Protocol names beginning with `_` are free for custom use, like other ACP extension methods.
2064
+ * Protocol names that do not begin with `_` are reserved for the ACP spec.
2065
+ *
2066
+ * @experimental
2067
+ */
2068
+ export type LlmProtocol = "anthropic" | "openai" | "azure" | "vertex" | "bedrock" | string;
1627
2069
  /**
1628
2070
  * Request parameters for loading an existing session.
1629
2071
  *
@@ -1642,6 +2084,20 @@ export type LoadSessionRequest = {
1642
2084
  _meta?: {
1643
2085
  [key: string]: unknown;
1644
2086
  } | null;
2087
+ /**
2088
+ * **UNSTABLE**
2089
+ *
2090
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
2091
+ *
2092
+ * Additional workspace roots to activate for this session. Each path must be absolute.
2093
+ *
2094
+ * When omitted or empty, no additional roots are activated. When non-empty,
2095
+ * this is the complete resulting additional-root list for the loaded
2096
+ * session.
2097
+ *
2098
+ * @experimental
2099
+ */
2100
+ additionalDirectories?: Array<string>;
1645
2101
  /**
1646
2102
  * The working directory for this session.
1647
2103
  */
@@ -1955,11 +2411,9 @@ export type MultiSelectPropertySchema = {
1955
2411
  title?: string | null;
1956
2412
  };
1957
2413
  /**
1958
- * Request parameters for creating a new session.
1959
- *
1960
- * See protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)
2414
+ * NES capabilities advertised by the agent during initialization.
1961
2415
  */
1962
- export type NewSessionRequest = {
2416
+ export type NesCapabilities = {
1963
2417
  /**
1964
2418
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
1965
2419
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -1971,20 +2425,18 @@ export type NewSessionRequest = {
1971
2425
  [key: string]: unknown;
1972
2426
  } | null;
1973
2427
  /**
1974
- * The working directory for this session. Must be an absolute path.
2428
+ * Context the agent wants attached to each suggestion request.
1975
2429
  */
1976
- cwd: string;
2430
+ context?: NesContextCapabilities | null;
1977
2431
  /**
1978
- * List of MCP (Model Context Protocol) servers the agent should connect to.
2432
+ * Events the agent wants to receive.
1979
2433
  */
1980
- mcpServers: Array<McpServer>;
2434
+ events?: NesEventCapabilities | null;
1981
2435
  };
1982
2436
  /**
1983
- * Response from creating a new session.
1984
- *
1985
- * See protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)
2437
+ * Context capabilities the agent wants attached to each suggestion request.
1986
2438
  */
1987
- export type NewSessionResponse = {
2439
+ export type NesContextCapabilities = {
1988
2440
  /**
1989
2441
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
1990
2442
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -1996,61 +2448,59 @@ export type NewSessionResponse = {
1996
2448
  [key: string]: unknown;
1997
2449
  } | null;
1998
2450
  /**
1999
- * Initial session configuration options if supported by the Agent.
2451
+ * Whether the agent wants diagnostics context.
2000
2452
  */
2001
- configOptions?: Array<SessionConfigOption> | null;
2453
+ diagnostics?: NesDiagnosticsCapabilities | null;
2002
2454
  /**
2003
- * **UNSTABLE**
2004
- *
2005
- * This capability is not part of the spec yet, and may be removed or changed at any point.
2006
- *
2007
- * Initial model state if supported by the Agent
2008
- *
2009
- * @experimental
2455
+ * Whether the agent wants edit history context.
2010
2456
  */
2011
- models?: SessionModelState | null;
2457
+ editHistory?: NesEditHistoryCapabilities | null;
2012
2458
  /**
2013
- * Initial mode state if supported by the Agent
2014
- *
2015
- * See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)
2459
+ * Whether the agent wants open files context.
2016
2460
  */
2017
- modes?: SessionModeState | null;
2461
+ openFiles?: NesOpenFilesCapabilities | null;
2018
2462
  /**
2019
- * Unique identifier for the created session.
2020
- *
2021
- * Used in all subsequent requests for this conversation.
2463
+ * Whether the agent wants recent files context.
2022
2464
  */
2023
- sessionId: SessionId;
2465
+ recentFiles?: NesRecentFilesCapabilities | null;
2466
+ /**
2467
+ * Whether the agent wants related snippets context.
2468
+ */
2469
+ relatedSnippets?: NesRelatedSnippetsCapabilities | null;
2470
+ /**
2471
+ * Whether the agent wants user actions context.
2472
+ */
2473
+ userActions?: NesUserActionsCapabilities | null;
2024
2474
  };
2025
2475
  /**
2026
- * Schema for number (floating-point) properties in an elicitation form.
2476
+ * A diagnostic (error, warning, etc.).
2027
2477
  */
2028
- export type NumberPropertySchema = {
2029
- /**
2030
- * Default value.
2031
- */
2032
- default?: number | null;
2478
+ export type NesDiagnostic = {
2033
2479
  /**
2034
- * Human-readable description.
2480
+ * The diagnostic message.
2035
2481
  */
2036
- description?: string | null;
2482
+ message: string;
2037
2483
  /**
2038
- * Maximum value (inclusive).
2484
+ * The range of the diagnostic.
2039
2485
  */
2040
- maximum?: number | null;
2486
+ range: Range;
2041
2487
  /**
2042
- * Minimum value (inclusive).
2488
+ * The severity of the diagnostic.
2043
2489
  */
2044
- minimum?: number | null;
2490
+ severity: NesDiagnosticSeverity;
2045
2491
  /**
2046
- * Optional title for the property.
2492
+ * The URI of the file containing the diagnostic.
2047
2493
  */
2048
- title?: string | null;
2494
+ uri: string;
2049
2495
  };
2050
2496
  /**
2051
- * An option presented to the user when requesting permission.
2497
+ * Severity of a diagnostic.
2052
2498
  */
2053
- export type PermissionOption = {
2499
+ export type NesDiagnosticSeverity = "error" | "warning" | "information" | "hint";
2500
+ /**
2501
+ * Capabilities for diagnostics context.
2502
+ */
2503
+ export type NesDiagnosticsCapabilities = {
2054
2504
  /**
2055
2505
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
2056
2506
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -2061,39 +2511,30 @@ export type PermissionOption = {
2061
2511
  _meta?: {
2062
2512
  [key: string]: unknown;
2063
2513
  } | null;
2514
+ };
2515
+ /**
2516
+ * Capabilities for `document/didChange` events.
2517
+ */
2518
+ export type NesDocumentDidChangeCapabilities = {
2064
2519
  /**
2065
- * Hint about the nature of this permission option.
2066
- */
2067
- kind: PermissionOptionKind;
2068
- /**
2069
- * Human-readable label to display to the user.
2520
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2521
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2522
+ * these keys.
2523
+ *
2524
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2070
2525
  */
2071
- name: string;
2526
+ _meta?: {
2527
+ [key: string]: unknown;
2528
+ } | null;
2072
2529
  /**
2073
- * Unique identifier for this permission option.
2530
+ * The sync kind the agent wants: `"full"` or `"incremental"`.
2074
2531
  */
2075
- optionId: PermissionOptionId;
2532
+ syncKind: TextDocumentSyncKind;
2076
2533
  };
2077
2534
  /**
2078
- * Unique identifier for a permission option.
2079
- */
2080
- export type PermissionOptionId = string;
2081
- /**
2082
- * The type of permission option being presented to the user.
2083
- *
2084
- * Helps clients choose appropriate icons and UI treatment.
2085
- */
2086
- export type PermissionOptionKind = "allow_once" | "allow_always" | "reject_once" | "reject_always";
2087
- /**
2088
- * An execution plan for accomplishing complex tasks.
2089
- *
2090
- * Plans consist of multiple entries representing individual tasks or goals.
2091
- * Agents report plans to clients to provide visibility into their execution strategy.
2092
- * Plans can evolve during execution as the agent discovers new requirements or completes tasks.
2093
- *
2094
- * See protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)
2535
+ * Marker for `document/didClose` capability support.
2095
2536
  */
2096
- export type Plan = {
2537
+ export type NesDocumentDidCloseCapabilities = {
2097
2538
  /**
2098
2539
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
2099
2540
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -2104,22 +2545,26 @@ export type Plan = {
2104
2545
  _meta?: {
2105
2546
  [key: string]: unknown;
2106
2547
  } | null;
2548
+ };
2549
+ /**
2550
+ * Marker for `document/didFocus` capability support.
2551
+ */
2552
+ export type NesDocumentDidFocusCapabilities = {
2107
2553
  /**
2108
- * The list of tasks to be accomplished.
2554
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2555
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2556
+ * these keys.
2109
2557
  *
2110
- * When updating a plan, the agent must send a complete list of all entries
2111
- * with their current status. The client replaces the entire plan with each update.
2558
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2112
2559
  */
2113
- entries: Array<PlanEntry>;
2560
+ _meta?: {
2561
+ [key: string]: unknown;
2562
+ } | null;
2114
2563
  };
2115
2564
  /**
2116
- * A single entry in the execution plan.
2117
- *
2118
- * Represents a task or goal that the assistant intends to accomplish
2119
- * as part of fulfilling the user's request.
2120
- * See protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)
2565
+ * Marker for `document/didOpen` capability support.
2121
2566
  */
2122
- export type PlanEntry = {
2567
+ export type NesDocumentDidOpenCapabilities = {
2123
2568
  /**
2124
2569
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
2125
2570
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -2130,50 +2575,26 @@ export type PlanEntry = {
2130
2575
  _meta?: {
2131
2576
  [key: string]: unknown;
2132
2577
  } | null;
2133
- /**
2134
- * Human-readable description of what this task aims to accomplish.
2135
- */
2136
- content: string;
2137
- /**
2138
- * The relative importance of this task.
2139
- * Used to indicate which tasks are most critical to the overall goal.
2140
- */
2141
- priority: PlanEntryPriority;
2142
- /**
2143
- * Current execution status of this task.
2144
- */
2145
- status: PlanEntryStatus;
2146
2578
  };
2147
2579
  /**
2148
- * Priority levels for plan entries.
2149
- *
2150
- * Used to indicate the relative importance or urgency of different
2151
- * tasks in the execution plan.
2152
- * See protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)
2153
- */
2154
- export type PlanEntryPriority = "high" | "medium" | "low";
2155
- /**
2156
- * Status of a plan entry in the execution flow.
2157
- *
2158
- * Tracks the lifecycle of each task from planning through completion.
2159
- * See protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)
2580
+ * Marker for `document/didSave` capability support.
2160
2581
  */
2161
- export type PlanEntryStatus = "pending" | "in_progress" | "completed";
2582
+ export type NesDocumentDidSaveCapabilities = {
2583
+ /**
2584
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2585
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2586
+ * these keys.
2587
+ *
2588
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2589
+ */
2590
+ _meta?: {
2591
+ [key: string]: unknown;
2592
+ } | null;
2593
+ };
2162
2594
  /**
2163
- * Prompt capabilities supported by the agent in `session/prompt` requests.
2164
- *
2165
- * Baseline agent functionality requires support for [`ContentBlock::Text`]
2166
- * and [`ContentBlock::ResourceLink`] in prompt requests.
2167
- *
2168
- * Other variants must be explicitly opted in to.
2169
- * Capabilities for different types of content in prompt requests.
2170
- *
2171
- * Indicates which content types beyond the baseline (text and resource links)
2172
- * the agent can process.
2173
- *
2174
- * See protocol docs: [Prompt Capabilities](https://agentclientprotocol.com/protocol/initialization#prompt-capabilities)
2595
+ * Document event capabilities the agent wants to receive.
2175
2596
  */
2176
- export type PromptCapabilities = {
2597
+ export type NesDocumentEventCapabilities = {
2177
2598
  /**
2178
2599
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
2179
2600
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -2185,29 +2606,30 @@ export type PromptCapabilities = {
2185
2606
  [key: string]: unknown;
2186
2607
  } | null;
2187
2608
  /**
2188
- * Agent supports [`ContentBlock::Audio`].
2609
+ * Whether the agent wants `document/didChange` events, and the sync kind.
2189
2610
  */
2190
- audio?: boolean;
2611
+ didChange?: NesDocumentDidChangeCapabilities | null;
2191
2612
  /**
2192
- * Agent supports embedded context in `session/prompt` requests.
2193
- *
2194
- * When enabled, the Client is allowed to include [`ContentBlock::Resource`]
2195
- * in prompt requests for pieces of context that are referenced in the message.
2613
+ * Whether the agent wants `document/didClose` events.
2196
2614
  */
2197
- embeddedContext?: boolean;
2615
+ didClose?: NesDocumentDidCloseCapabilities | null;
2198
2616
  /**
2199
- * Agent supports [`ContentBlock::Image`].
2617
+ * Whether the agent wants `document/didFocus` events.
2200
2618
  */
2201
- image?: boolean;
2619
+ didFocus?: NesDocumentDidFocusCapabilities | null;
2620
+ /**
2621
+ * Whether the agent wants `document/didOpen` events.
2622
+ */
2623
+ didOpen?: NesDocumentDidOpenCapabilities | null;
2624
+ /**
2625
+ * Whether the agent wants `document/didSave` events.
2626
+ */
2627
+ didSave?: NesDocumentDidSaveCapabilities | null;
2202
2628
  };
2203
2629
  /**
2204
- * Request parameters for sending a user prompt to the agent.
2205
- *
2206
- * Contains the user's message and any additional context.
2207
- *
2208
- * See protocol docs: [User Message](https://agentclientprotocol.com/protocol/prompt-turn#1-user-message)
2630
+ * Capabilities for edit history context.
2209
2631
  */
2210
- export type PromptRequest = {
2632
+ export type NesEditHistoryCapabilities = {
2211
2633
  /**
2212
2634
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
2213
2635
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
@@ -2219,9 +2641,720 @@ export type PromptRequest = {
2219
2641
  [key: string]: unknown;
2220
2642
  } | null;
2221
2643
  /**
2222
- * **UNSTABLE**
2223
- *
2224
- * This capability is not part of the spec yet, and may be removed or changed at any point.
2644
+ * Maximum number of edit history entries the agent can use.
2645
+ */
2646
+ maxCount?: number | null;
2647
+ };
2648
+ /**
2649
+ * An entry in the edit history.
2650
+ */
2651
+ export type NesEditHistoryEntry = {
2652
+ /**
2653
+ * A diff representing the edit.
2654
+ */
2655
+ diff: string;
2656
+ /**
2657
+ * The URI of the edited file.
2658
+ */
2659
+ uri: string;
2660
+ };
2661
+ /**
2662
+ * A text edit suggestion.
2663
+ */
2664
+ export type NesEditSuggestion = {
2665
+ /**
2666
+ * Optional suggested cursor position after applying edits.
2667
+ */
2668
+ cursorPosition?: Position | null;
2669
+ /**
2670
+ * The text edits to apply.
2671
+ */
2672
+ edits: Array<NesTextEdit>;
2673
+ /**
2674
+ * Unique identifier for accept/reject tracking.
2675
+ */
2676
+ id: string;
2677
+ /**
2678
+ * The URI of the file to edit.
2679
+ */
2680
+ uri: string;
2681
+ };
2682
+ /**
2683
+ * Event capabilities the agent can consume.
2684
+ */
2685
+ export type NesEventCapabilities = {
2686
+ /**
2687
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2688
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2689
+ * these keys.
2690
+ *
2691
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2692
+ */
2693
+ _meta?: {
2694
+ [key: string]: unknown;
2695
+ } | null;
2696
+ /**
2697
+ * Document event capabilities.
2698
+ */
2699
+ document?: NesDocumentEventCapabilities | null;
2700
+ };
2701
+ /**
2702
+ * A code excerpt from a file.
2703
+ */
2704
+ export type NesExcerpt = {
2705
+ /**
2706
+ * The end line of the excerpt (zero-based).
2707
+ */
2708
+ endLine: number;
2709
+ /**
2710
+ * The start line of the excerpt (zero-based).
2711
+ */
2712
+ startLine: number;
2713
+ /**
2714
+ * The text content of the excerpt.
2715
+ */
2716
+ text: string;
2717
+ };
2718
+ /**
2719
+ * Marker for jump suggestion support.
2720
+ */
2721
+ export type NesJumpCapabilities = {
2722
+ /**
2723
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2724
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2725
+ * these keys.
2726
+ *
2727
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2728
+ */
2729
+ _meta?: {
2730
+ [key: string]: unknown;
2731
+ } | null;
2732
+ };
2733
+ /**
2734
+ * A jump-to-location suggestion.
2735
+ */
2736
+ export type NesJumpSuggestion = {
2737
+ /**
2738
+ * Unique identifier for accept/reject tracking.
2739
+ */
2740
+ id: string;
2741
+ /**
2742
+ * The target position within the file.
2743
+ */
2744
+ position: Position;
2745
+ /**
2746
+ * The file to navigate to.
2747
+ */
2748
+ uri: string;
2749
+ };
2750
+ /**
2751
+ * An open file in the editor.
2752
+ */
2753
+ export type NesOpenFile = {
2754
+ /**
2755
+ * The language identifier.
2756
+ */
2757
+ languageId: string;
2758
+ /**
2759
+ * Timestamp in milliseconds since epoch of when the file was last focused.
2760
+ */
2761
+ lastFocusedMs?: number | null;
2762
+ /**
2763
+ * The URI of the file.
2764
+ */
2765
+ uri: string;
2766
+ /**
2767
+ * The visible range in the editor, if any.
2768
+ */
2769
+ visibleRange?: Range | null;
2770
+ };
2771
+ /**
2772
+ * Capabilities for open files context.
2773
+ */
2774
+ export type NesOpenFilesCapabilities = {
2775
+ /**
2776
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2777
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2778
+ * these keys.
2779
+ *
2780
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2781
+ */
2782
+ _meta?: {
2783
+ [key: string]: unknown;
2784
+ } | null;
2785
+ };
2786
+ /**
2787
+ * A recently accessed file.
2788
+ */
2789
+ export type NesRecentFile = {
2790
+ /**
2791
+ * The language identifier.
2792
+ */
2793
+ languageId: string;
2794
+ /**
2795
+ * The full text content of the file.
2796
+ */
2797
+ text: string;
2798
+ /**
2799
+ * The URI of the file.
2800
+ */
2801
+ uri: string;
2802
+ };
2803
+ /**
2804
+ * Capabilities for recent files context.
2805
+ */
2806
+ export type NesRecentFilesCapabilities = {
2807
+ /**
2808
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2809
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2810
+ * these keys.
2811
+ *
2812
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2813
+ */
2814
+ _meta?: {
2815
+ [key: string]: unknown;
2816
+ } | null;
2817
+ /**
2818
+ * Maximum number of recent files the agent can use.
2819
+ */
2820
+ maxCount?: number | null;
2821
+ };
2822
+ /**
2823
+ * The reason a suggestion was rejected.
2824
+ */
2825
+ export type NesRejectReason = "rejected" | "ignored" | "replaced" | "cancelled";
2826
+ /**
2827
+ * A related code snippet from a file.
2828
+ */
2829
+ export type NesRelatedSnippet = {
2830
+ /**
2831
+ * The code excerpts.
2832
+ */
2833
+ excerpts: Array<NesExcerpt>;
2834
+ /**
2835
+ * The URI of the file containing the snippets.
2836
+ */
2837
+ uri: string;
2838
+ };
2839
+ /**
2840
+ * Capabilities for related snippets context.
2841
+ */
2842
+ export type NesRelatedSnippetsCapabilities = {
2843
+ /**
2844
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2845
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2846
+ * these keys.
2847
+ *
2848
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2849
+ */
2850
+ _meta?: {
2851
+ [key: string]: unknown;
2852
+ } | null;
2853
+ };
2854
+ /**
2855
+ * Marker for rename suggestion support.
2856
+ */
2857
+ export type NesRenameCapabilities = {
2858
+ /**
2859
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2860
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2861
+ * these keys.
2862
+ *
2863
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2864
+ */
2865
+ _meta?: {
2866
+ [key: string]: unknown;
2867
+ } | null;
2868
+ };
2869
+ /**
2870
+ * A rename symbol suggestion.
2871
+ */
2872
+ export type NesRenameSuggestion = {
2873
+ /**
2874
+ * Unique identifier for accept/reject tracking.
2875
+ */
2876
+ id: string;
2877
+ /**
2878
+ * The new name for the symbol.
2879
+ */
2880
+ newName: string;
2881
+ /**
2882
+ * The position of the symbol to rename.
2883
+ */
2884
+ position: Position;
2885
+ /**
2886
+ * The file URI containing the symbol.
2887
+ */
2888
+ uri: string;
2889
+ };
2890
+ /**
2891
+ * Repository metadata for an NES session.
2892
+ */
2893
+ export type NesRepository = {
2894
+ /**
2895
+ * The repository name.
2896
+ */
2897
+ name: string;
2898
+ /**
2899
+ * The repository owner.
2900
+ */
2901
+ owner: string;
2902
+ /**
2903
+ * The remote URL of the repository.
2904
+ */
2905
+ remoteUrl: string;
2906
+ };
2907
+ /**
2908
+ * Marker for search and replace suggestion support.
2909
+ */
2910
+ export type NesSearchAndReplaceCapabilities = {
2911
+ /**
2912
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2913
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2914
+ * these keys.
2915
+ *
2916
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2917
+ */
2918
+ _meta?: {
2919
+ [key: string]: unknown;
2920
+ } | null;
2921
+ };
2922
+ /**
2923
+ * A search-and-replace suggestion.
2924
+ */
2925
+ export type NesSearchAndReplaceSuggestion = {
2926
+ /**
2927
+ * Unique identifier for accept/reject tracking.
2928
+ */
2929
+ id: string;
2930
+ /**
2931
+ * Whether `search` is a regular expression. Defaults to `false`.
2932
+ */
2933
+ isRegex?: boolean | null;
2934
+ /**
2935
+ * The replacement text.
2936
+ */
2937
+ replace: string;
2938
+ /**
2939
+ * The text or pattern to find.
2940
+ */
2941
+ search: string;
2942
+ /**
2943
+ * The file URI to search within.
2944
+ */
2945
+ uri: string;
2946
+ };
2947
+ /**
2948
+ * Context attached to a suggestion request.
2949
+ */
2950
+ export type NesSuggestContext = {
2951
+ /**
2952
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
2953
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
2954
+ * these keys.
2955
+ *
2956
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
2957
+ */
2958
+ _meta?: {
2959
+ [key: string]: unknown;
2960
+ } | null;
2961
+ /**
2962
+ * Current diagnostics (errors, warnings).
2963
+ */
2964
+ diagnostics?: Array<NesDiagnostic> | null;
2965
+ /**
2966
+ * Recent edit history.
2967
+ */
2968
+ editHistory?: Array<NesEditHistoryEntry> | null;
2969
+ /**
2970
+ * Currently open files in the editor.
2971
+ */
2972
+ openFiles?: Array<NesOpenFile> | null;
2973
+ /**
2974
+ * Recently accessed files.
2975
+ */
2976
+ recentFiles?: Array<NesRecentFile> | null;
2977
+ /**
2978
+ * Related code snippets.
2979
+ */
2980
+ relatedSnippets?: Array<NesRelatedSnippet> | null;
2981
+ /**
2982
+ * Recent user actions (typing, navigation, etc.).
2983
+ */
2984
+ userActions?: Array<NesUserAction> | null;
2985
+ };
2986
+ /**
2987
+ * A suggestion returned by the agent.
2988
+ */
2989
+ export type NesSuggestion = (NesEditSuggestion & {
2990
+ kind: "edit";
2991
+ }) | (NesJumpSuggestion & {
2992
+ kind: "jump";
2993
+ }) | (NesRenameSuggestion & {
2994
+ kind: "rename";
2995
+ }) | (NesSearchAndReplaceSuggestion & {
2996
+ kind: "searchAndReplace";
2997
+ });
2998
+ /**
2999
+ * A text edit within a suggestion.
3000
+ */
3001
+ export type NesTextEdit = {
3002
+ /**
3003
+ * The replacement text.
3004
+ */
3005
+ newText: string;
3006
+ /**
3007
+ * The range to replace.
3008
+ */
3009
+ range: Range;
3010
+ };
3011
+ /**
3012
+ * What triggered the suggestion request.
3013
+ */
3014
+ export type NesTriggerKind = "automatic" | "diagnostic" | "manual";
3015
+ /**
3016
+ * A user action (typing, cursor movement, etc.).
3017
+ */
3018
+ export type NesUserAction = {
3019
+ /**
3020
+ * The kind of action (e.g., "insertChar", "cursorMovement").
3021
+ */
3022
+ action: string;
3023
+ /**
3024
+ * The position where the action occurred.
3025
+ */
3026
+ position: Position;
3027
+ /**
3028
+ * Timestamp in milliseconds since epoch.
3029
+ */
3030
+ timestampMs: number;
3031
+ /**
3032
+ * The URI of the file where the action occurred.
3033
+ */
3034
+ uri: string;
3035
+ };
3036
+ /**
3037
+ * Capabilities for user actions context.
3038
+ */
3039
+ export type NesUserActionsCapabilities = {
3040
+ /**
3041
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3042
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3043
+ * these keys.
3044
+ *
3045
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3046
+ */
3047
+ _meta?: {
3048
+ [key: string]: unknown;
3049
+ } | null;
3050
+ /**
3051
+ * Maximum number of user actions the agent can use.
3052
+ */
3053
+ maxCount?: number | null;
3054
+ };
3055
+ /**
3056
+ * Request parameters for creating a new session.
3057
+ *
3058
+ * See protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)
3059
+ */
3060
+ export type NewSessionRequest = {
3061
+ /**
3062
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3063
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3064
+ * these keys.
3065
+ *
3066
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3067
+ */
3068
+ _meta?: {
3069
+ [key: string]: unknown;
3070
+ } | null;
3071
+ /**
3072
+ * **UNSTABLE**
3073
+ *
3074
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
3075
+ *
3076
+ * Additional workspace roots for this session. Each path must be absolute.
3077
+ *
3078
+ * These expand the session's filesystem scope without changing `cwd`, which
3079
+ * remains the base for relative paths. When omitted or empty, no
3080
+ * additional roots are activated for the new session.
3081
+ *
3082
+ * @experimental
3083
+ */
3084
+ additionalDirectories?: Array<string>;
3085
+ /**
3086
+ * The working directory for this session. Must be an absolute path.
3087
+ */
3088
+ cwd: string;
3089
+ /**
3090
+ * List of MCP (Model Context Protocol) servers the agent should connect to.
3091
+ */
3092
+ mcpServers: Array<McpServer>;
3093
+ };
3094
+ /**
3095
+ * Response from creating a new session.
3096
+ *
3097
+ * See protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)
3098
+ */
3099
+ export type NewSessionResponse = {
3100
+ /**
3101
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3102
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3103
+ * these keys.
3104
+ *
3105
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3106
+ */
3107
+ _meta?: {
3108
+ [key: string]: unknown;
3109
+ } | null;
3110
+ /**
3111
+ * Initial session configuration options if supported by the Agent.
3112
+ */
3113
+ configOptions?: Array<SessionConfigOption> | null;
3114
+ /**
3115
+ * **UNSTABLE**
3116
+ *
3117
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
3118
+ *
3119
+ * Initial model state if supported by the Agent
3120
+ *
3121
+ * @experimental
3122
+ */
3123
+ models?: SessionModelState | null;
3124
+ /**
3125
+ * Initial mode state if supported by the Agent
3126
+ *
3127
+ * See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)
3128
+ */
3129
+ modes?: SessionModeState | null;
3130
+ /**
3131
+ * Unique identifier for the created session.
3132
+ *
3133
+ * Used in all subsequent requests for this conversation.
3134
+ */
3135
+ sessionId: SessionId;
3136
+ };
3137
+ /**
3138
+ * Schema for number (floating-point) properties in an elicitation form.
3139
+ */
3140
+ export type NumberPropertySchema = {
3141
+ /**
3142
+ * Default value.
3143
+ */
3144
+ default?: number | null;
3145
+ /**
3146
+ * Human-readable description.
3147
+ */
3148
+ description?: string | null;
3149
+ /**
3150
+ * Maximum value (inclusive).
3151
+ */
3152
+ maximum?: number | null;
3153
+ /**
3154
+ * Minimum value (inclusive).
3155
+ */
3156
+ minimum?: number | null;
3157
+ /**
3158
+ * Optional title for the property.
3159
+ */
3160
+ title?: string | null;
3161
+ };
3162
+ /**
3163
+ * An option presented to the user when requesting permission.
3164
+ */
3165
+ export type PermissionOption = {
3166
+ /**
3167
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3168
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3169
+ * these keys.
3170
+ *
3171
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3172
+ */
3173
+ _meta?: {
3174
+ [key: string]: unknown;
3175
+ } | null;
3176
+ /**
3177
+ * Hint about the nature of this permission option.
3178
+ */
3179
+ kind: PermissionOptionKind;
3180
+ /**
3181
+ * Human-readable label to display to the user.
3182
+ */
3183
+ name: string;
3184
+ /**
3185
+ * Unique identifier for this permission option.
3186
+ */
3187
+ optionId: PermissionOptionId;
3188
+ };
3189
+ /**
3190
+ * Unique identifier for a permission option.
3191
+ */
3192
+ export type PermissionOptionId = string;
3193
+ /**
3194
+ * The type of permission option being presented to the user.
3195
+ *
3196
+ * Helps clients choose appropriate icons and UI treatment.
3197
+ */
3198
+ export type PermissionOptionKind = "allow_once" | "allow_always" | "reject_once" | "reject_always";
3199
+ /**
3200
+ * An execution plan for accomplishing complex tasks.
3201
+ *
3202
+ * Plans consist of multiple entries representing individual tasks or goals.
3203
+ * Agents report plans to clients to provide visibility into their execution strategy.
3204
+ * Plans can evolve during execution as the agent discovers new requirements or completes tasks.
3205
+ *
3206
+ * See protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)
3207
+ */
3208
+ export type Plan = {
3209
+ /**
3210
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3211
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3212
+ * these keys.
3213
+ *
3214
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3215
+ */
3216
+ _meta?: {
3217
+ [key: string]: unknown;
3218
+ } | null;
3219
+ /**
3220
+ * The list of tasks to be accomplished.
3221
+ *
3222
+ * When updating a plan, the agent must send a complete list of all entries
3223
+ * with their current status. The client replaces the entire plan with each update.
3224
+ */
3225
+ entries: Array<PlanEntry>;
3226
+ };
3227
+ /**
3228
+ * A single entry in the execution plan.
3229
+ *
3230
+ * Represents a task or goal that the assistant intends to accomplish
3231
+ * as part of fulfilling the user's request.
3232
+ * See protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)
3233
+ */
3234
+ export type PlanEntry = {
3235
+ /**
3236
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3237
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3238
+ * these keys.
3239
+ *
3240
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3241
+ */
3242
+ _meta?: {
3243
+ [key: string]: unknown;
3244
+ } | null;
3245
+ /**
3246
+ * Human-readable description of what this task aims to accomplish.
3247
+ */
3248
+ content: string;
3249
+ /**
3250
+ * The relative importance of this task.
3251
+ * Used to indicate which tasks are most critical to the overall goal.
3252
+ */
3253
+ priority: PlanEntryPriority;
3254
+ /**
3255
+ * Current execution status of this task.
3256
+ */
3257
+ status: PlanEntryStatus;
3258
+ };
3259
+ /**
3260
+ * Priority levels for plan entries.
3261
+ *
3262
+ * Used to indicate the relative importance or urgency of different
3263
+ * tasks in the execution plan.
3264
+ * See protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)
3265
+ */
3266
+ export type PlanEntryPriority = "high" | "medium" | "low";
3267
+ /**
3268
+ * Status of a plan entry in the execution flow.
3269
+ *
3270
+ * Tracks the lifecycle of each task from planning through completion.
3271
+ * See protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)
3272
+ */
3273
+ export type PlanEntryStatus = "pending" | "in_progress" | "completed";
3274
+ /**
3275
+ * A zero-based position in a text document.
3276
+ *
3277
+ * The meaning of `character` depends on the negotiated position encoding.
3278
+ */
3279
+ export type Position = {
3280
+ /**
3281
+ * Zero-based character offset (encoding-dependent).
3282
+ */
3283
+ character: number;
3284
+ /**
3285
+ * Zero-based line number.
3286
+ */
3287
+ line: number;
3288
+ };
3289
+ /**
3290
+ * The encoding used for character offsets in positions.
3291
+ *
3292
+ * Follows the same conventions as LSP 3.17. The default is UTF-16.
3293
+ */
3294
+ export type PositionEncodingKind = "utf-16" | "utf-32" | "utf-8";
3295
+ /**
3296
+ * Prompt capabilities supported by the agent in `session/prompt` requests.
3297
+ *
3298
+ * Baseline agent functionality requires support for [`ContentBlock::Text`]
3299
+ * and [`ContentBlock::ResourceLink`] in prompt requests.
3300
+ *
3301
+ * Other variants must be explicitly opted in to.
3302
+ * Capabilities for different types of content in prompt requests.
3303
+ *
3304
+ * Indicates which content types beyond the baseline (text and resource links)
3305
+ * the agent can process.
3306
+ *
3307
+ * See protocol docs: [Prompt Capabilities](https://agentclientprotocol.com/protocol/initialization#prompt-capabilities)
3308
+ */
3309
+ export type PromptCapabilities = {
3310
+ /**
3311
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3312
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3313
+ * these keys.
3314
+ *
3315
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3316
+ */
3317
+ _meta?: {
3318
+ [key: string]: unknown;
3319
+ } | null;
3320
+ /**
3321
+ * Agent supports [`ContentBlock::Audio`].
3322
+ */
3323
+ audio?: boolean;
3324
+ /**
3325
+ * Agent supports embedded context in `session/prompt` requests.
3326
+ *
3327
+ * When enabled, the Client is allowed to include [`ContentBlock::Resource`]
3328
+ * in prompt requests for pieces of context that are referenced in the message.
3329
+ */
3330
+ embeddedContext?: boolean;
3331
+ /**
3332
+ * Agent supports [`ContentBlock::Image`].
3333
+ */
3334
+ image?: boolean;
3335
+ };
3336
+ /**
3337
+ * Request parameters for sending a user prompt to the agent.
3338
+ *
3339
+ * Contains the user's message and any additional context.
3340
+ *
3341
+ * See protocol docs: [User Message](https://agentclientprotocol.com/protocol/prompt-turn#1-user-message)
3342
+ */
3343
+ export type PromptRequest = {
3344
+ /**
3345
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3346
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3347
+ * these keys.
3348
+ *
3349
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3350
+ */
3351
+ _meta?: {
3352
+ [key: string]: unknown;
3353
+ } | null;
3354
+ /**
3355
+ * **UNSTABLE**
3356
+ *
3357
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
2225
3358
  *
2226
3359
  * A client-generated unique identifier for this user message.
2227
3360
  *
@@ -2296,15 +3429,109 @@ export type PromptResponse = {
2296
3429
  *
2297
3430
  * @experimental
2298
3431
  */
2299
- userMessageId?: string | null;
3432
+ userMessageId?: string | null;
3433
+ };
3434
+ /**
3435
+ * Protocol version identifier.
3436
+ *
3437
+ * This version is only bumped for breaking changes.
3438
+ * Non-breaking changes should be introduced via capabilities.
3439
+ */
3440
+ export type ProtocolVersion = number;
3441
+ /**
3442
+ * **UNSTABLE**
3443
+ *
3444
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
3445
+ *
3446
+ * Current effective non-secret routing configuration for a provider.
3447
+ *
3448
+ * @experimental
3449
+ */
3450
+ export type ProviderCurrentConfig = {
3451
+ /**
3452
+ * Protocol currently used by this provider.
3453
+ */
3454
+ apiType: LlmProtocol;
3455
+ /**
3456
+ * Base URL currently used by this provider.
3457
+ */
3458
+ baseUrl: string;
3459
+ };
3460
+ /**
3461
+ * **UNSTABLE**
3462
+ *
3463
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
3464
+ *
3465
+ * Information about a configurable LLM provider.
3466
+ *
3467
+ * @experimental
3468
+ */
3469
+ export type ProviderInfo = {
3470
+ /**
3471
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3472
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3473
+ * these keys.
3474
+ *
3475
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3476
+ */
3477
+ _meta?: {
3478
+ [key: string]: unknown;
3479
+ } | null;
3480
+ /**
3481
+ * Current effective non-secret routing config.
3482
+ * Null or omitted means provider is disabled.
3483
+ */
3484
+ current?: ProviderCurrentConfig | null;
3485
+ /**
3486
+ * Provider identifier, for example "main" or "openai".
3487
+ */
3488
+ id: string;
3489
+ /**
3490
+ * Whether this provider is mandatory and cannot be disabled via `providers/disable`.
3491
+ * If true, clients must not call `providers/disable` for this id.
3492
+ */
3493
+ required: boolean;
3494
+ /**
3495
+ * Supported protocol types for this provider.
3496
+ */
3497
+ supported: Array<LlmProtocol>;
3498
+ };
3499
+ /**
3500
+ * **UNSTABLE**
3501
+ *
3502
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
3503
+ *
3504
+ * Provider configuration capabilities supported by the agent.
3505
+ *
3506
+ * By supplying `{}` it means that the agent supports provider configuration methods.
3507
+ *
3508
+ * @experimental
3509
+ */
3510
+ export type ProvidersCapabilities = {
3511
+ /**
3512
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3513
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3514
+ * these keys.
3515
+ *
3516
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3517
+ */
3518
+ _meta?: {
3519
+ [key: string]: unknown;
3520
+ } | null;
3521
+ };
3522
+ /**
3523
+ * A range in a text document, expressed as start and end positions.
3524
+ */
3525
+ export type Range = {
3526
+ /**
3527
+ * The end position (exclusive).
3528
+ */
3529
+ end: Position;
3530
+ /**
3531
+ * The start position (inclusive).
3532
+ */
3533
+ start: Position;
2300
3534
  };
2301
- /**
2302
- * Protocol version identifier.
2303
- *
2304
- * This version is only bumped for breaking changes.
2305
- * Non-breaking changes should be introduced via capabilities.
2306
- */
2307
- export type ProtocolVersion = number;
2308
3535
  /**
2309
3536
  * Request to read content from a text file.
2310
3537
  *
@@ -2354,6 +3581,33 @@ export type ReadTextFileResponse = {
2354
3581
  } | null;
2355
3582
  content: string;
2356
3583
  };
3584
+ /**
3585
+ * Notification sent when a suggestion is rejected.
3586
+ */
3587
+ export type RejectNesNotification = {
3588
+ /**
3589
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3590
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3591
+ * these keys.
3592
+ *
3593
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3594
+ */
3595
+ _meta?: {
3596
+ [key: string]: unknown;
3597
+ } | null;
3598
+ /**
3599
+ * The ID of the rejected suggestion.
3600
+ */
3601
+ id: string;
3602
+ /**
3603
+ * The reason for rejection.
3604
+ */
3605
+ reason?: NesRejectReason | null;
3606
+ /**
3607
+ * The session ID for this notification.
3608
+ */
3609
+ sessionId: SessionId;
3610
+ };
2357
3611
  /**
2358
3612
  * Request to release a terminal and free its resources.
2359
3613
  */
@@ -2485,18 +3739,12 @@ export type ResourceLink = {
2485
3739
  uri: string;
2486
3740
  };
2487
3741
  /**
2488
- * **UNSTABLE**
2489
- *
2490
- * This capability is not part of the spec yet, and may be removed or changed at any point.
2491
- *
2492
3742
  * Request parameters for resuming an existing session.
2493
3743
  *
2494
3744
  * Resumes an existing session without returning previous messages (unlike `session/load`).
2495
3745
  * This is useful for agents that can resume sessions but don't implement full session loading.
2496
3746
  *
2497
- * Only available if the Agent supports the `session.resume` capability.
2498
- *
2499
- * @experimental
3747
+ * Only available if the Agent supports the `sessionCapabilities.resume` capability.
2500
3748
  */
2501
3749
  export type ResumeSessionRequest = {
2502
3750
  /**
@@ -2509,6 +3757,20 @@ export type ResumeSessionRequest = {
2509
3757
  _meta?: {
2510
3758
  [key: string]: unknown;
2511
3759
  } | null;
3760
+ /**
3761
+ * **UNSTABLE**
3762
+ *
3763
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
3764
+ *
3765
+ * Additional workspace roots to activate for this session. Each path must be absolute.
3766
+ *
3767
+ * When omitted or empty, no additional roots are activated. When non-empty,
3768
+ * this is the complete resulting additional-root list for the resumed
3769
+ * session.
3770
+ *
3771
+ * @experimental
3772
+ */
3773
+ additionalDirectories?: Array<string>;
2512
3774
  /**
2513
3775
  * The working directory for this session.
2514
3776
  */
@@ -2523,13 +3785,7 @@ export type ResumeSessionRequest = {
2523
3785
  sessionId: SessionId;
2524
3786
  };
2525
3787
  /**
2526
- * **UNSTABLE**
2527
- *
2528
- * This capability is not part of the spec yet, and may be removed or changed at any point.
2529
- *
2530
3788
  * Response from resuming an existing session.
2531
- *
2532
- * @experimental
2533
3789
  */
2534
3790
  export type ResumeSessionResponse = {
2535
3791
  /**
@@ -2586,6 +3842,30 @@ export type SelectedPermissionOutcome = {
2586
3842
  */
2587
3843
  optionId: PermissionOptionId;
2588
3844
  };
3845
+ /**
3846
+ * **UNSTABLE**
3847
+ *
3848
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
3849
+ *
3850
+ * Capabilities for additional session directories support.
3851
+ *
3852
+ * By supplying `{}` it means that the agent supports the `additionalDirectories` field on
3853
+ * supported session lifecycle requests and `session/list`.
3854
+ *
3855
+ * @experimental
3856
+ */
3857
+ export type SessionAdditionalDirectoriesCapabilities = {
3858
+ /**
3859
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
3860
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
3861
+ * these keys.
3862
+ *
3863
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3864
+ */
3865
+ _meta?: {
3866
+ [key: string]: unknown;
3867
+ } | null;
3868
+ };
2589
3869
  /**
2590
3870
  * Session capabilities supported by the agent.
2591
3871
  *
@@ -2613,10 +3893,14 @@ export type SessionCapabilities = {
2613
3893
  *
2614
3894
  * This capability is not part of the spec yet, and may be removed or changed at any point.
2615
3895
  *
2616
- * Whether the agent supports `session/close`.
3896
+ * Whether the agent supports `additionalDirectories` on supported session lifecycle requests and `session/list`.
2617
3897
  *
2618
3898
  * @experimental
2619
3899
  */
3900
+ additionalDirectories?: SessionAdditionalDirectoriesCapabilities | null;
3901
+ /**
3902
+ * Whether the agent supports `session/close`.
3903
+ */
2620
3904
  close?: SessionCloseCapabilities | null;
2621
3905
  /**
2622
3906
  * **UNSTABLE**
@@ -2633,26 +3917,14 @@ export type SessionCapabilities = {
2633
3917
  */
2634
3918
  list?: SessionListCapabilities | null;
2635
3919
  /**
2636
- * **UNSTABLE**
2637
- *
2638
- * This capability is not part of the spec yet, and may be removed or changed at any point.
2639
- *
2640
3920
  * Whether the agent supports `session/resume`.
2641
- *
2642
- * @experimental
2643
3921
  */
2644
3922
  resume?: SessionResumeCapabilities | null;
2645
3923
  };
2646
3924
  /**
2647
- * **UNSTABLE**
2648
- *
2649
- * This capability is not part of the spec yet, and may be removed or changed at any point.
2650
- *
2651
3925
  * Capabilities for the `session/close` method.
2652
3926
  *
2653
3927
  * By supplying `{}` it means that the agent supports closing of sessions.
2654
- *
2655
- * @experimental
2656
3928
  */
2657
3929
  export type SessionCloseCapabilities = {
2658
3930
  /**
@@ -2689,6 +3961,9 @@ export type SessionConfigGroupId = string;
2689
3961
  * Unique identifier for a session configuration option.
2690
3962
  */
2691
3963
  export type SessionConfigId = string;
3964
+ /**
3965
+ * A session configuration option selector and its current state.
3966
+ */
2692
3967
  export type SessionConfigOption = ((SessionConfigSelect & {
2693
3968
  type: "select";
2694
3969
  }) | (SessionConfigBoolean & {
@@ -2854,6 +4129,18 @@ export type SessionInfo = {
2854
4129
  _meta?: {
2855
4130
  [key: string]: unknown;
2856
4131
  } | null;
4132
+ /**
4133
+ * **UNSTABLE**
4134
+ *
4135
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4136
+ *
4137
+ * Authoritative ordered additional workspace roots for this session. Each path must be absolute.
4138
+ *
4139
+ * When omitted or empty, there are no additional roots for the session.
4140
+ *
4141
+ * @experimental
4142
+ */
4143
+ additionalDirectories?: Array<string>;
2857
4144
  /**
2858
4145
  * The working directory for this session. Must be an absolute path.
2859
4146
  */
@@ -3018,15 +4305,9 @@ export type SessionNotification = {
3018
4305
  update: SessionUpdate;
3019
4306
  };
3020
4307
  /**
3021
- * **UNSTABLE**
3022
- *
3023
- * This capability is not part of the spec yet, and may be removed or changed at any point.
3024
- *
3025
4308
  * Capabilities for the `session/resume` method.
3026
4309
  *
3027
4310
  * By supplying `{}` it means that the agent supports resuming of sessions.
3028
- *
3029
- * @experimental
3030
4311
  */
3031
4312
  export type SessionResumeCapabilities = {
3032
4313
  /**
@@ -3070,6 +4351,72 @@ export type SessionUpdate = (ContentChunk & {
3070
4351
  }) | (UsageUpdate & {
3071
4352
  sessionUpdate: "usage_update";
3072
4353
  });
4354
+ /**
4355
+ * **UNSTABLE**
4356
+ *
4357
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4358
+ *
4359
+ * Request parameters for `providers/set`.
4360
+ *
4361
+ * Replaces the full configuration for one provider id.
4362
+ *
4363
+ * @experimental
4364
+ */
4365
+ export type SetProvidersRequest = {
4366
+ /**
4367
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
4368
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4369
+ * these keys.
4370
+ *
4371
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
4372
+ */
4373
+ _meta?: {
4374
+ [key: string]: unknown;
4375
+ } | null;
4376
+ /**
4377
+ * Protocol type for this provider.
4378
+ */
4379
+ apiType: LlmProtocol;
4380
+ /**
4381
+ * Base URL for requests sent through this provider.
4382
+ */
4383
+ baseUrl: string;
4384
+ /**
4385
+ * Full headers map for this provider.
4386
+ * May include authorization, routing, or other integration-specific headers.
4387
+ */
4388
+ headers?: {
4389
+ [key: string]: string;
4390
+ };
4391
+ /**
4392
+ * Provider id to configure.
4393
+ */
4394
+ id: string;
4395
+ };
4396
+ /**
4397
+ * **UNSTABLE**
4398
+ *
4399
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4400
+ *
4401
+ * Response to `providers/set`.
4402
+ *
4403
+ * @experimental
4404
+ */
4405
+ export type SetProvidersResponse = {
4406
+ /**
4407
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
4408
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4409
+ * these keys.
4410
+ *
4411
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
4412
+ */
4413
+ _meta?: {
4414
+ [key: string]: unknown;
4415
+ } | null;
4416
+ };
4417
+ /**
4418
+ * Request parameters for setting a session configuration option.
4419
+ */
3073
4420
  export type SetSessionConfigOptionRequest = ({
3074
4421
  type: "boolean";
3075
4422
  /**
@@ -3208,6 +4555,52 @@ export type SetSessionModelResponse = {
3208
4555
  [key: string]: unknown;
3209
4556
  } | null;
3210
4557
  };
4558
+ /**
4559
+ * Request to start an NES session.
4560
+ */
4561
+ export type StartNesRequest = {
4562
+ /**
4563
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
4564
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4565
+ * these keys.
4566
+ *
4567
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
4568
+ */
4569
+ _meta?: {
4570
+ [key: string]: unknown;
4571
+ } | null;
4572
+ /**
4573
+ * Repository metadata, if the workspace is a git repository.
4574
+ */
4575
+ repository?: NesRepository | null;
4576
+ /**
4577
+ * The workspace folders.
4578
+ */
4579
+ workspaceFolders?: Array<WorkspaceFolder> | null;
4580
+ /**
4581
+ * The root URI of the workspace.
4582
+ */
4583
+ workspaceUri?: string | null;
4584
+ };
4585
+ /**
4586
+ * Response to `nes/start`.
4587
+ */
4588
+ export type StartNesResponse = {
4589
+ /**
4590
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
4591
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4592
+ * these keys.
4593
+ *
4594
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
4595
+ */
4596
+ _meta?: {
4597
+ [key: string]: unknown;
4598
+ } | null;
4599
+ /**
4600
+ * The session ID for the newly started NES session.
4601
+ */
4602
+ sessionId: SessionId;
4603
+ };
3211
4604
  /**
3212
4605
  * Reasons why an agent stops processing a prompt turn.
3213
4606
  *
@@ -3262,6 +4655,68 @@ export type StringPropertySchema = {
3262
4655
  */
3263
4656
  title?: string | null;
3264
4657
  };
4658
+ /**
4659
+ * Request for a code suggestion.
4660
+ */
4661
+ export type SuggestNesRequest = {
4662
+ /**
4663
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
4664
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4665
+ * these keys.
4666
+ *
4667
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
4668
+ */
4669
+ _meta?: {
4670
+ [key: string]: unknown;
4671
+ } | null;
4672
+ /**
4673
+ * Context for the suggestion, included based on agent capabilities.
4674
+ */
4675
+ context?: NesSuggestContext | null;
4676
+ /**
4677
+ * The current cursor position.
4678
+ */
4679
+ position: Position;
4680
+ /**
4681
+ * The current text selection range, if any.
4682
+ */
4683
+ selection?: Range | null;
4684
+ /**
4685
+ * The session ID for this request.
4686
+ */
4687
+ sessionId: SessionId;
4688
+ /**
4689
+ * What triggered this suggestion request.
4690
+ */
4691
+ triggerKind: NesTriggerKind;
4692
+ /**
4693
+ * The URI of the document to suggest for.
4694
+ */
4695
+ uri: string;
4696
+ /**
4697
+ * The version number of the document.
4698
+ */
4699
+ version: number;
4700
+ };
4701
+ /**
4702
+ * Response to `nes/suggest`.
4703
+ */
4704
+ export type SuggestNesResponse = {
4705
+ /**
4706
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
4707
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4708
+ * these keys.
4709
+ *
4710
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
4711
+ */
4712
+ _meta?: {
4713
+ [key: string]: unknown;
4714
+ } | null;
4715
+ /**
4716
+ * The list of suggestions.
4717
+ */
4718
+ suggestions: Array<NesSuggestion>;
4719
+ };
3265
4720
  /**
3266
4721
  * Embed a terminal created with `terminal/create` by its id.
3267
4722
  *
@@ -3372,6 +4827,26 @@ export type TextContent = {
3372
4827
  annotations?: Annotations | null;
3373
4828
  text: string;
3374
4829
  };
4830
+ /**
4831
+ * A content change event for a document.
4832
+ *
4833
+ * When `range` is `None`, `text` is the full content of the document.
4834
+ * When `range` is `Some`, `text` replaces the given range.
4835
+ */
4836
+ export type TextDocumentContentChangeEvent = {
4837
+ /**
4838
+ * The range of the document that changed. If `None`, the entire content is replaced.
4839
+ */
4840
+ range?: Range | null;
4841
+ /**
4842
+ * The new text for the range, or the full document content if `range` is `None`.
4843
+ */
4844
+ text: string;
4845
+ };
4846
+ /**
4847
+ * How the agent wants document changes delivered.
4848
+ */
4849
+ export type TextDocumentSyncKind = "full" | "incremental";
3375
4850
  /**
3376
4851
  * Text-based resource contents.
3377
4852
  */
@@ -3715,6 +5190,19 @@ export type WaitForTerminalExitResponse = {
3715
5190
  */
3716
5191
  signal?: string | null;
3717
5192
  };
5193
+ /**
5194
+ * A workspace folder.
5195
+ */
5196
+ export type WorkspaceFolder = {
5197
+ /**
5198
+ * The display name of the folder.
5199
+ */
5200
+ name: string;
5201
+ /**
5202
+ * The URI of the folder.
5203
+ */
5204
+ uri: string;
5205
+ };
3718
5206
  /**
3719
5207
  * Request to write content to a text file.
3720
5208
  *