@tickernelz/paperclip-pro-adapter-utils 2026.1016.0 → 2026.1016.2
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.
- package/node_modules/@agentclientprotocol/sdk/dist/acp.d.ts +8 -191
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js +10 -165
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js +132 -52
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js +29 -21
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js +6 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/nes/acp.d.ts +563 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/acp.js +106 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/acp.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/types.gen.d.ts +1261 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/types.gen.js +4 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/types.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/zod.gen.d.ts +962 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/zod.gen.js +526 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/zod.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.d.ts +5 -6
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js +13 -25
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js +6 -6
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.js +0 -9
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js +0 -10
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.d.ts +1 -11
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js +0 -10
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts +1675 -2753
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.d.ts +863 -1434
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +91 -534
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.d.ts +42 -48
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +86 -139
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js +46 -17
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.d.ts +55 -57
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +0 -59
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.d.ts +1 -11
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js +0 -10
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.d.ts +1870 -2874
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.d.ts +3373 -2844
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +191 -563
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/package.json +7 -1
- package/node_modules/@agentclientprotocol/sdk/schema/schema.json +1541 -3196
- package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +875 -2664
- package/package.json +2 -2
|
@@ -0,0 +1,1261 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A unique identifier for a conversation session between a client and agent.
|
|
3
|
+
*
|
|
4
|
+
* Sessions maintain their own context, conversation history, and state,
|
|
5
|
+
* allowing multiple independent interactions with the same agent.
|
|
6
|
+
*
|
|
7
|
+
* See protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session-setup#session-id)
|
|
8
|
+
*/
|
|
9
|
+
export type SessionId = string;
|
|
10
|
+
/**
|
|
11
|
+
* NES capabilities advertised by the agent during initialization.
|
|
12
|
+
*/
|
|
13
|
+
export type NesCapabilities = {
|
|
14
|
+
/**
|
|
15
|
+
* Events the agent wants to receive.
|
|
16
|
+
*/
|
|
17
|
+
events?: NesEventCapabilities | null;
|
|
18
|
+
/**
|
|
19
|
+
* Context the agent wants attached to each suggestion request.
|
|
20
|
+
*/
|
|
21
|
+
context?: NesContextCapabilities | null;
|
|
22
|
+
/**
|
|
23
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
24
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
25
|
+
* these keys.
|
|
26
|
+
*
|
|
27
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
28
|
+
*/
|
|
29
|
+
_meta?: {
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
} | null;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Event capabilities the agent can consume.
|
|
35
|
+
*/
|
|
36
|
+
export type NesEventCapabilities = {
|
|
37
|
+
/**
|
|
38
|
+
* Document event capabilities.
|
|
39
|
+
*/
|
|
40
|
+
document?: NesDocumentEventCapabilities | null;
|
|
41
|
+
/**
|
|
42
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
43
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
44
|
+
* these keys.
|
|
45
|
+
*
|
|
46
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
47
|
+
*/
|
|
48
|
+
_meta?: {
|
|
49
|
+
[key: string]: unknown;
|
|
50
|
+
} | null;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Document event capabilities the agent wants to receive.
|
|
54
|
+
*/
|
|
55
|
+
export type NesDocumentEventCapabilities = {
|
|
56
|
+
/**
|
|
57
|
+
* Whether the agent wants `document/didOpen` events.
|
|
58
|
+
*/
|
|
59
|
+
didOpen?: NesDocumentDidOpenCapabilities | null;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the agent wants `document/didChange` events, and the sync kind.
|
|
62
|
+
*/
|
|
63
|
+
didChange?: NesDocumentDidChangeCapabilities | null;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the agent wants `document/didClose` events.
|
|
66
|
+
*/
|
|
67
|
+
didClose?: NesDocumentDidCloseCapabilities | null;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the agent wants `document/didSave` events.
|
|
70
|
+
*/
|
|
71
|
+
didSave?: NesDocumentDidSaveCapabilities | null;
|
|
72
|
+
/**
|
|
73
|
+
* Whether the agent wants `document/didFocus` events.
|
|
74
|
+
*/
|
|
75
|
+
didFocus?: NesDocumentDidFocusCapabilities | null;
|
|
76
|
+
/**
|
|
77
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
78
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
79
|
+
* these keys.
|
|
80
|
+
*
|
|
81
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
82
|
+
*/
|
|
83
|
+
_meta?: {
|
|
84
|
+
[key: string]: unknown;
|
|
85
|
+
} | null;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Marker for `document/didOpen` capability support.
|
|
89
|
+
*/
|
|
90
|
+
export type NesDocumentDidOpenCapabilities = {
|
|
91
|
+
/**
|
|
92
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
93
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
94
|
+
* these keys.
|
|
95
|
+
*
|
|
96
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
97
|
+
*/
|
|
98
|
+
_meta?: {
|
|
99
|
+
[key: string]: unknown;
|
|
100
|
+
} | null;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Capabilities for `document/didChange` events.
|
|
104
|
+
*/
|
|
105
|
+
export type NesDocumentDidChangeCapabilities = {
|
|
106
|
+
/**
|
|
107
|
+
* The sync kind the agent wants: `"full"` or `"incremental"`.
|
|
108
|
+
*/
|
|
109
|
+
syncKind: TextDocumentSyncKind;
|
|
110
|
+
/**
|
|
111
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
112
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
113
|
+
* these keys.
|
|
114
|
+
*
|
|
115
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
116
|
+
*/
|
|
117
|
+
_meta?: {
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
} | null;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* How the agent wants document changes delivered.
|
|
123
|
+
*/
|
|
124
|
+
export type TextDocumentSyncKind = "full" | "incremental";
|
|
125
|
+
/**
|
|
126
|
+
* Marker for `document/didClose` capability support.
|
|
127
|
+
*/
|
|
128
|
+
export type NesDocumentDidCloseCapabilities = {
|
|
129
|
+
/**
|
|
130
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
131
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
132
|
+
* these keys.
|
|
133
|
+
*
|
|
134
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
135
|
+
*/
|
|
136
|
+
_meta?: {
|
|
137
|
+
[key: string]: unknown;
|
|
138
|
+
} | null;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Marker for `document/didSave` capability support.
|
|
142
|
+
*/
|
|
143
|
+
export type NesDocumentDidSaveCapabilities = {
|
|
144
|
+
/**
|
|
145
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
146
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
147
|
+
* these keys.
|
|
148
|
+
*
|
|
149
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
150
|
+
*/
|
|
151
|
+
_meta?: {
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
} | null;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Marker for `document/didFocus` capability support.
|
|
157
|
+
*/
|
|
158
|
+
export type NesDocumentDidFocusCapabilities = {
|
|
159
|
+
/**
|
|
160
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
161
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
162
|
+
* these keys.
|
|
163
|
+
*
|
|
164
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
165
|
+
*/
|
|
166
|
+
_meta?: {
|
|
167
|
+
[key: string]: unknown;
|
|
168
|
+
} | null;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Context capabilities the agent wants attached to each suggestion request.
|
|
172
|
+
*/
|
|
173
|
+
export type NesContextCapabilities = {
|
|
174
|
+
/**
|
|
175
|
+
* Whether the agent wants recent files context.
|
|
176
|
+
*/
|
|
177
|
+
recentFiles?: NesRecentFilesCapabilities | null;
|
|
178
|
+
/**
|
|
179
|
+
* Whether the agent wants related snippets context.
|
|
180
|
+
*/
|
|
181
|
+
relatedSnippets?: NesRelatedSnippetsCapabilities | null;
|
|
182
|
+
/**
|
|
183
|
+
* Whether the agent wants edit history context.
|
|
184
|
+
*/
|
|
185
|
+
editHistory?: NesEditHistoryCapabilities | null;
|
|
186
|
+
/**
|
|
187
|
+
* Whether the agent wants user actions context.
|
|
188
|
+
*/
|
|
189
|
+
userActions?: NesUserActionsCapabilities | null;
|
|
190
|
+
/**
|
|
191
|
+
* Whether the agent wants open files context.
|
|
192
|
+
*/
|
|
193
|
+
openFiles?: NesOpenFilesCapabilities | null;
|
|
194
|
+
/**
|
|
195
|
+
* Whether the agent wants diagnostics context.
|
|
196
|
+
*/
|
|
197
|
+
diagnostics?: NesDiagnosticsCapabilities | null;
|
|
198
|
+
/**
|
|
199
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
200
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
201
|
+
* these keys.
|
|
202
|
+
*
|
|
203
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
204
|
+
*/
|
|
205
|
+
_meta?: {
|
|
206
|
+
[key: string]: unknown;
|
|
207
|
+
} | null;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Capabilities for recent files context.
|
|
211
|
+
*/
|
|
212
|
+
export type NesRecentFilesCapabilities = {
|
|
213
|
+
/**
|
|
214
|
+
* Maximum number of recent files the agent can use.
|
|
215
|
+
*/
|
|
216
|
+
maxCount?: number | null;
|
|
217
|
+
/**
|
|
218
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
219
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
220
|
+
* these keys.
|
|
221
|
+
*
|
|
222
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
223
|
+
*/
|
|
224
|
+
_meta?: {
|
|
225
|
+
[key: string]: unknown;
|
|
226
|
+
} | null;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Capabilities for related snippets context.
|
|
230
|
+
*/
|
|
231
|
+
export type NesRelatedSnippetsCapabilities = {
|
|
232
|
+
/**
|
|
233
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
234
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
235
|
+
* these keys.
|
|
236
|
+
*
|
|
237
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
238
|
+
*/
|
|
239
|
+
_meta?: {
|
|
240
|
+
[key: string]: unknown;
|
|
241
|
+
} | null;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Capabilities for edit history context.
|
|
245
|
+
*/
|
|
246
|
+
export type NesEditHistoryCapabilities = {
|
|
247
|
+
/**
|
|
248
|
+
* Maximum number of edit history entries the agent can use.
|
|
249
|
+
*/
|
|
250
|
+
maxCount?: number | null;
|
|
251
|
+
/**
|
|
252
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
253
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
254
|
+
* these keys.
|
|
255
|
+
*
|
|
256
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
257
|
+
*/
|
|
258
|
+
_meta?: {
|
|
259
|
+
[key: string]: unknown;
|
|
260
|
+
} | null;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Capabilities for user actions context.
|
|
264
|
+
*/
|
|
265
|
+
export type NesUserActionsCapabilities = {
|
|
266
|
+
/**
|
|
267
|
+
* Maximum number of user actions the agent can use.
|
|
268
|
+
*/
|
|
269
|
+
maxCount?: number | null;
|
|
270
|
+
/**
|
|
271
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
272
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
273
|
+
* these keys.
|
|
274
|
+
*
|
|
275
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
276
|
+
*/
|
|
277
|
+
_meta?: {
|
|
278
|
+
[key: string]: unknown;
|
|
279
|
+
} | null;
|
|
280
|
+
};
|
|
281
|
+
/**
|
|
282
|
+
* Capabilities for open files context.
|
|
283
|
+
*/
|
|
284
|
+
export type NesOpenFilesCapabilities = {
|
|
285
|
+
/**
|
|
286
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
287
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
288
|
+
* these keys.
|
|
289
|
+
*
|
|
290
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
291
|
+
*/
|
|
292
|
+
_meta?: {
|
|
293
|
+
[key: string]: unknown;
|
|
294
|
+
} | null;
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* Capabilities for diagnostics context.
|
|
298
|
+
*/
|
|
299
|
+
export type NesDiagnosticsCapabilities = {
|
|
300
|
+
/**
|
|
301
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
302
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
303
|
+
* these keys.
|
|
304
|
+
*
|
|
305
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
306
|
+
*/
|
|
307
|
+
_meta?: {
|
|
308
|
+
[key: string]: unknown;
|
|
309
|
+
} | null;
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* The encoding used for character offsets in positions.
|
|
313
|
+
*
|
|
314
|
+
* Follows the same conventions as LSP 3.17. The default is UTF-16.
|
|
315
|
+
*/
|
|
316
|
+
export type PositionEncodingKind = "utf-16" | "utf-32" | "utf-8";
|
|
317
|
+
/**
|
|
318
|
+
* Response to `nes/start`.
|
|
319
|
+
*/
|
|
320
|
+
export type StartNesResponse = {
|
|
321
|
+
/**
|
|
322
|
+
* The session ID for the newly started NES session.
|
|
323
|
+
*/
|
|
324
|
+
sessionId: SessionId;
|
|
325
|
+
/**
|
|
326
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
327
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
328
|
+
* these keys.
|
|
329
|
+
*
|
|
330
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
331
|
+
*/
|
|
332
|
+
_meta?: {
|
|
333
|
+
[key: string]: unknown;
|
|
334
|
+
} | null;
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* Response to `nes/suggest`.
|
|
338
|
+
*/
|
|
339
|
+
export type SuggestNesResponse = {
|
|
340
|
+
/**
|
|
341
|
+
* The list of suggestions.
|
|
342
|
+
*/
|
|
343
|
+
suggestions: Array<NesSuggestion>;
|
|
344
|
+
/**
|
|
345
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
346
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
347
|
+
* these keys.
|
|
348
|
+
*
|
|
349
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
350
|
+
*/
|
|
351
|
+
_meta?: {
|
|
352
|
+
[key: string]: unknown;
|
|
353
|
+
} | null;
|
|
354
|
+
};
|
|
355
|
+
/**
|
|
356
|
+
* A suggestion returned by the agent.
|
|
357
|
+
*/
|
|
358
|
+
export type NesSuggestion = (NesEditSuggestion & {
|
|
359
|
+
kind: "edit";
|
|
360
|
+
}) | (NesJumpSuggestion & {
|
|
361
|
+
kind: "jump";
|
|
362
|
+
}) | (NesRenameSuggestion & {
|
|
363
|
+
kind: "rename";
|
|
364
|
+
}) | (NesSearchAndReplaceSuggestion & {
|
|
365
|
+
kind: "searchAndReplace";
|
|
366
|
+
});
|
|
367
|
+
/**
|
|
368
|
+
* Unique identifier for a next edit suggestion.
|
|
369
|
+
*/
|
|
370
|
+
export type NesSuggestionId = string;
|
|
371
|
+
/**
|
|
372
|
+
* A text edit within a suggestion.
|
|
373
|
+
*/
|
|
374
|
+
export type NesTextEdit = {
|
|
375
|
+
/**
|
|
376
|
+
* The range to replace.
|
|
377
|
+
*/
|
|
378
|
+
range: Range;
|
|
379
|
+
/**
|
|
380
|
+
* The replacement text.
|
|
381
|
+
*/
|
|
382
|
+
newText: string;
|
|
383
|
+
/**
|
|
384
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
385
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
386
|
+
* these keys.
|
|
387
|
+
*
|
|
388
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
389
|
+
*/
|
|
390
|
+
_meta?: {
|
|
391
|
+
[key: string]: unknown;
|
|
392
|
+
} | null;
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* A range in a text document, expressed as start and end positions.
|
|
396
|
+
*/
|
|
397
|
+
export type Range = {
|
|
398
|
+
/**
|
|
399
|
+
* The start position (inclusive).
|
|
400
|
+
*/
|
|
401
|
+
start: Position;
|
|
402
|
+
/**
|
|
403
|
+
* The end position (exclusive).
|
|
404
|
+
*/
|
|
405
|
+
end: Position;
|
|
406
|
+
/**
|
|
407
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
408
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
409
|
+
* these keys.
|
|
410
|
+
*
|
|
411
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
412
|
+
*/
|
|
413
|
+
_meta?: {
|
|
414
|
+
[key: string]: unknown;
|
|
415
|
+
} | null;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* A zero-based position in a text document.
|
|
419
|
+
*
|
|
420
|
+
* The meaning of `character` depends on the negotiated position encoding.
|
|
421
|
+
*/
|
|
422
|
+
export type Position = {
|
|
423
|
+
/**
|
|
424
|
+
* Zero-based line number.
|
|
425
|
+
*/
|
|
426
|
+
line: number;
|
|
427
|
+
/**
|
|
428
|
+
* Zero-based character offset (encoding-dependent).
|
|
429
|
+
*/
|
|
430
|
+
character: number;
|
|
431
|
+
/**
|
|
432
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
433
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
434
|
+
* these keys.
|
|
435
|
+
*
|
|
436
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
437
|
+
*/
|
|
438
|
+
_meta?: {
|
|
439
|
+
[key: string]: unknown;
|
|
440
|
+
} | null;
|
|
441
|
+
};
|
|
442
|
+
/**
|
|
443
|
+
* A text edit suggestion.
|
|
444
|
+
*/
|
|
445
|
+
export type NesEditSuggestion = {
|
|
446
|
+
/**
|
|
447
|
+
* Unique identifier for accept/reject tracking.
|
|
448
|
+
*/
|
|
449
|
+
id: NesSuggestionId;
|
|
450
|
+
/**
|
|
451
|
+
* The URI of the file to edit.
|
|
452
|
+
*/
|
|
453
|
+
uri: string;
|
|
454
|
+
/**
|
|
455
|
+
* The text edits to apply.
|
|
456
|
+
*/
|
|
457
|
+
edits: Array<NesTextEdit>;
|
|
458
|
+
/**
|
|
459
|
+
* Optional suggested cursor position after applying edits.
|
|
460
|
+
*/
|
|
461
|
+
cursorPosition?: Position | null;
|
|
462
|
+
/**
|
|
463
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
464
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
465
|
+
* these keys.
|
|
466
|
+
*
|
|
467
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
468
|
+
*/
|
|
469
|
+
_meta?: {
|
|
470
|
+
[key: string]: unknown;
|
|
471
|
+
} | null;
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* A jump-to-location suggestion.
|
|
475
|
+
*/
|
|
476
|
+
export type NesJumpSuggestion = {
|
|
477
|
+
/**
|
|
478
|
+
* Unique identifier for accept/reject tracking.
|
|
479
|
+
*/
|
|
480
|
+
id: NesSuggestionId;
|
|
481
|
+
/**
|
|
482
|
+
* The file to navigate to.
|
|
483
|
+
*/
|
|
484
|
+
uri: string;
|
|
485
|
+
/**
|
|
486
|
+
* The target position within the file.
|
|
487
|
+
*/
|
|
488
|
+
position: Position;
|
|
489
|
+
/**
|
|
490
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
491
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
492
|
+
* these keys.
|
|
493
|
+
*
|
|
494
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
495
|
+
*/
|
|
496
|
+
_meta?: {
|
|
497
|
+
[key: string]: unknown;
|
|
498
|
+
} | null;
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* A rename symbol suggestion.
|
|
502
|
+
*/
|
|
503
|
+
export type NesRenameSuggestion = {
|
|
504
|
+
/**
|
|
505
|
+
* Unique identifier for accept/reject tracking.
|
|
506
|
+
*/
|
|
507
|
+
id: NesSuggestionId;
|
|
508
|
+
/**
|
|
509
|
+
* The file URI containing the symbol.
|
|
510
|
+
*/
|
|
511
|
+
uri: string;
|
|
512
|
+
/**
|
|
513
|
+
* The position of the symbol to rename.
|
|
514
|
+
*/
|
|
515
|
+
position: Position;
|
|
516
|
+
/**
|
|
517
|
+
* The new name for the symbol.
|
|
518
|
+
*/
|
|
519
|
+
newName: string;
|
|
520
|
+
/**
|
|
521
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
522
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
523
|
+
* these keys.
|
|
524
|
+
*
|
|
525
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
526
|
+
*/
|
|
527
|
+
_meta?: {
|
|
528
|
+
[key: string]: unknown;
|
|
529
|
+
} | null;
|
|
530
|
+
};
|
|
531
|
+
/**
|
|
532
|
+
* A search-and-replace suggestion.
|
|
533
|
+
*/
|
|
534
|
+
export type NesSearchAndReplaceSuggestion = {
|
|
535
|
+
/**
|
|
536
|
+
* Unique identifier for accept/reject tracking.
|
|
537
|
+
*/
|
|
538
|
+
id: NesSuggestionId;
|
|
539
|
+
/**
|
|
540
|
+
* The file URI to search within.
|
|
541
|
+
*/
|
|
542
|
+
uri: string;
|
|
543
|
+
/**
|
|
544
|
+
* The text or pattern to find.
|
|
545
|
+
*/
|
|
546
|
+
search: string;
|
|
547
|
+
/**
|
|
548
|
+
* The replacement text.
|
|
549
|
+
*/
|
|
550
|
+
replace: string;
|
|
551
|
+
/**
|
|
552
|
+
* Whether `search` is a regular expression. Defaults to `false`.
|
|
553
|
+
*/
|
|
554
|
+
isRegex?: boolean | null;
|
|
555
|
+
/**
|
|
556
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
557
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
558
|
+
* these keys.
|
|
559
|
+
*
|
|
560
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
561
|
+
*/
|
|
562
|
+
_meta?: {
|
|
563
|
+
[key: string]: unknown;
|
|
564
|
+
} | null;
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* Response from closing an NES session.
|
|
568
|
+
*/
|
|
569
|
+
export type CloseNesResponse = {
|
|
570
|
+
/**
|
|
571
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
572
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
573
|
+
* these keys.
|
|
574
|
+
*
|
|
575
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
576
|
+
*/
|
|
577
|
+
_meta?: {
|
|
578
|
+
[key: string]: unknown;
|
|
579
|
+
} | null;
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
* NES capabilities advertised by the client during initialization.
|
|
583
|
+
*/
|
|
584
|
+
export type ClientNesCapabilities = {
|
|
585
|
+
/**
|
|
586
|
+
* Whether the client supports the `jump` suggestion kind.
|
|
587
|
+
*/
|
|
588
|
+
jump?: NesJumpCapabilities | null;
|
|
589
|
+
/**
|
|
590
|
+
* Whether the client supports the `rename` suggestion kind.
|
|
591
|
+
*/
|
|
592
|
+
rename?: NesRenameCapabilities | null;
|
|
593
|
+
/**
|
|
594
|
+
* Whether the client supports the `searchAndReplace` suggestion kind.
|
|
595
|
+
*/
|
|
596
|
+
searchAndReplace?: NesSearchAndReplaceCapabilities | null;
|
|
597
|
+
/**
|
|
598
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
599
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
600
|
+
* these keys.
|
|
601
|
+
*
|
|
602
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
603
|
+
*/
|
|
604
|
+
_meta?: {
|
|
605
|
+
[key: string]: unknown;
|
|
606
|
+
} | null;
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
* Marker for jump suggestion support.
|
|
610
|
+
*/
|
|
611
|
+
export type NesJumpCapabilities = {
|
|
612
|
+
/**
|
|
613
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
614
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
615
|
+
* these keys.
|
|
616
|
+
*
|
|
617
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
618
|
+
*/
|
|
619
|
+
_meta?: {
|
|
620
|
+
[key: string]: unknown;
|
|
621
|
+
} | null;
|
|
622
|
+
};
|
|
623
|
+
/**
|
|
624
|
+
* Marker for rename suggestion support.
|
|
625
|
+
*/
|
|
626
|
+
export type NesRenameCapabilities = {
|
|
627
|
+
/**
|
|
628
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
629
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
630
|
+
* these keys.
|
|
631
|
+
*
|
|
632
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
633
|
+
*/
|
|
634
|
+
_meta?: {
|
|
635
|
+
[key: string]: unknown;
|
|
636
|
+
} | null;
|
|
637
|
+
};
|
|
638
|
+
/**
|
|
639
|
+
* Marker for search and replace suggestion support.
|
|
640
|
+
*/
|
|
641
|
+
export type NesSearchAndReplaceCapabilities = {
|
|
642
|
+
/**
|
|
643
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
644
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
645
|
+
* these keys.
|
|
646
|
+
*
|
|
647
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
648
|
+
*/
|
|
649
|
+
_meta?: {
|
|
650
|
+
[key: string]: unknown;
|
|
651
|
+
} | null;
|
|
652
|
+
};
|
|
653
|
+
/**
|
|
654
|
+
* Request to start an NES session.
|
|
655
|
+
*/
|
|
656
|
+
export type StartNesRequest = {
|
|
657
|
+
/**
|
|
658
|
+
* The root URI of the workspace.
|
|
659
|
+
*/
|
|
660
|
+
workspaceUri?: string | null;
|
|
661
|
+
/**
|
|
662
|
+
* The workspace folders.
|
|
663
|
+
*/
|
|
664
|
+
workspaceFolders?: Array<WorkspaceFolder> | null;
|
|
665
|
+
/**
|
|
666
|
+
* Repository metadata, if the workspace is a git repository.
|
|
667
|
+
*/
|
|
668
|
+
repository?: NesRepository | null;
|
|
669
|
+
/**
|
|
670
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
671
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
672
|
+
* these keys.
|
|
673
|
+
*
|
|
674
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
675
|
+
*/
|
|
676
|
+
_meta?: {
|
|
677
|
+
[key: string]: unknown;
|
|
678
|
+
} | null;
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* A workspace folder.
|
|
682
|
+
*/
|
|
683
|
+
export type WorkspaceFolder = {
|
|
684
|
+
/**
|
|
685
|
+
* The URI of the folder.
|
|
686
|
+
*/
|
|
687
|
+
uri: string;
|
|
688
|
+
/**
|
|
689
|
+
* The display name of the folder.
|
|
690
|
+
*/
|
|
691
|
+
name: string;
|
|
692
|
+
/**
|
|
693
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
694
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
695
|
+
* these keys.
|
|
696
|
+
*
|
|
697
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
698
|
+
*/
|
|
699
|
+
_meta?: {
|
|
700
|
+
[key: string]: unknown;
|
|
701
|
+
} | null;
|
|
702
|
+
};
|
|
703
|
+
/**
|
|
704
|
+
* Repository metadata for an NES session.
|
|
705
|
+
*/
|
|
706
|
+
export type NesRepository = {
|
|
707
|
+
/**
|
|
708
|
+
* The repository name.
|
|
709
|
+
*/
|
|
710
|
+
name: string;
|
|
711
|
+
/**
|
|
712
|
+
* The repository owner.
|
|
713
|
+
*/
|
|
714
|
+
owner: string;
|
|
715
|
+
/**
|
|
716
|
+
* The remote URL of the repository.
|
|
717
|
+
*/
|
|
718
|
+
remoteUrl: string;
|
|
719
|
+
/**
|
|
720
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
721
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
722
|
+
* these keys.
|
|
723
|
+
*
|
|
724
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
725
|
+
*/
|
|
726
|
+
_meta?: {
|
|
727
|
+
[key: string]: unknown;
|
|
728
|
+
} | null;
|
|
729
|
+
};
|
|
730
|
+
/**
|
|
731
|
+
* Request for a code suggestion.
|
|
732
|
+
*/
|
|
733
|
+
export type SuggestNesRequest = {
|
|
734
|
+
/**
|
|
735
|
+
* The session ID for this request.
|
|
736
|
+
*/
|
|
737
|
+
sessionId: SessionId;
|
|
738
|
+
/**
|
|
739
|
+
* The URI of the document to suggest for.
|
|
740
|
+
*/
|
|
741
|
+
uri: string;
|
|
742
|
+
/**
|
|
743
|
+
* The version number of the document.
|
|
744
|
+
*/
|
|
745
|
+
version: number;
|
|
746
|
+
/**
|
|
747
|
+
* The current cursor position.
|
|
748
|
+
*/
|
|
749
|
+
position: Position;
|
|
750
|
+
/**
|
|
751
|
+
* The current text selection range, if any.
|
|
752
|
+
*/
|
|
753
|
+
selection?: Range | null;
|
|
754
|
+
/**
|
|
755
|
+
* What triggered this suggestion request.
|
|
756
|
+
*/
|
|
757
|
+
triggerKind: NesTriggerKind;
|
|
758
|
+
/**
|
|
759
|
+
* Context for the suggestion, included based on agent capabilities.
|
|
760
|
+
*/
|
|
761
|
+
context?: NesSuggestContext | null;
|
|
762
|
+
/**
|
|
763
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
764
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
765
|
+
* these keys.
|
|
766
|
+
*
|
|
767
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
768
|
+
*/
|
|
769
|
+
_meta?: {
|
|
770
|
+
[key: string]: unknown;
|
|
771
|
+
} | null;
|
|
772
|
+
};
|
|
773
|
+
/**
|
|
774
|
+
* What triggered the suggestion request.
|
|
775
|
+
*/
|
|
776
|
+
export type NesTriggerKind = "automatic" | "diagnostic" | "manual";
|
|
777
|
+
/**
|
|
778
|
+
* Context attached to a suggestion request.
|
|
779
|
+
*/
|
|
780
|
+
export type NesSuggestContext = {
|
|
781
|
+
/**
|
|
782
|
+
* Recently accessed files.
|
|
783
|
+
*/
|
|
784
|
+
recentFiles?: Array<NesRecentFile> | null;
|
|
785
|
+
/**
|
|
786
|
+
* Related code snippets.
|
|
787
|
+
*/
|
|
788
|
+
relatedSnippets?: Array<NesRelatedSnippet> | null;
|
|
789
|
+
/**
|
|
790
|
+
* Recent edit history.
|
|
791
|
+
*/
|
|
792
|
+
editHistory?: Array<NesEditHistoryEntry> | null;
|
|
793
|
+
/**
|
|
794
|
+
* Recent user actions (typing, navigation, etc.).
|
|
795
|
+
*/
|
|
796
|
+
userActions?: Array<NesUserAction> | null;
|
|
797
|
+
/**
|
|
798
|
+
* Currently open files in the editor.
|
|
799
|
+
*/
|
|
800
|
+
openFiles?: Array<NesOpenFile> | null;
|
|
801
|
+
/**
|
|
802
|
+
* Current diagnostics (errors, warnings).
|
|
803
|
+
*/
|
|
804
|
+
diagnostics?: Array<NesDiagnostic> | null;
|
|
805
|
+
/**
|
|
806
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
807
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
808
|
+
* these keys.
|
|
809
|
+
*
|
|
810
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
811
|
+
*/
|
|
812
|
+
_meta?: {
|
|
813
|
+
[key: string]: unknown;
|
|
814
|
+
} | null;
|
|
815
|
+
};
|
|
816
|
+
/**
|
|
817
|
+
* A recently accessed file.
|
|
818
|
+
*/
|
|
819
|
+
export type NesRecentFile = {
|
|
820
|
+
/**
|
|
821
|
+
* The URI of the file.
|
|
822
|
+
*/
|
|
823
|
+
uri: string;
|
|
824
|
+
/**
|
|
825
|
+
* The language identifier.
|
|
826
|
+
*/
|
|
827
|
+
languageId: string;
|
|
828
|
+
/**
|
|
829
|
+
* The full text content of the file.
|
|
830
|
+
*/
|
|
831
|
+
text: string;
|
|
832
|
+
/**
|
|
833
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
834
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
835
|
+
* these keys.
|
|
836
|
+
*
|
|
837
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
838
|
+
*/
|
|
839
|
+
_meta?: {
|
|
840
|
+
[key: string]: unknown;
|
|
841
|
+
} | null;
|
|
842
|
+
};
|
|
843
|
+
/**
|
|
844
|
+
* A related code snippet from a file.
|
|
845
|
+
*/
|
|
846
|
+
export type NesRelatedSnippet = {
|
|
847
|
+
/**
|
|
848
|
+
* The URI of the file containing the snippets.
|
|
849
|
+
*/
|
|
850
|
+
uri: string;
|
|
851
|
+
/**
|
|
852
|
+
* The code excerpts.
|
|
853
|
+
*/
|
|
854
|
+
excerpts: Array<NesExcerpt>;
|
|
855
|
+
/**
|
|
856
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
857
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
858
|
+
* these keys.
|
|
859
|
+
*
|
|
860
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
861
|
+
*/
|
|
862
|
+
_meta?: {
|
|
863
|
+
[key: string]: unknown;
|
|
864
|
+
} | null;
|
|
865
|
+
};
|
|
866
|
+
/**
|
|
867
|
+
* A code excerpt from a file.
|
|
868
|
+
*/
|
|
869
|
+
export type NesExcerpt = {
|
|
870
|
+
/**
|
|
871
|
+
* The start line of the excerpt (zero-based).
|
|
872
|
+
*/
|
|
873
|
+
startLine: number;
|
|
874
|
+
/**
|
|
875
|
+
* The end line of the excerpt (zero-based).
|
|
876
|
+
*/
|
|
877
|
+
endLine: number;
|
|
878
|
+
/**
|
|
879
|
+
* The text content of the excerpt.
|
|
880
|
+
*/
|
|
881
|
+
text: string;
|
|
882
|
+
/**
|
|
883
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
884
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
885
|
+
* these keys.
|
|
886
|
+
*
|
|
887
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
888
|
+
*/
|
|
889
|
+
_meta?: {
|
|
890
|
+
[key: string]: unknown;
|
|
891
|
+
} | null;
|
|
892
|
+
};
|
|
893
|
+
/**
|
|
894
|
+
* An entry in the edit history.
|
|
895
|
+
*/
|
|
896
|
+
export type NesEditHistoryEntry = {
|
|
897
|
+
/**
|
|
898
|
+
* The URI of the edited file.
|
|
899
|
+
*/
|
|
900
|
+
uri: string;
|
|
901
|
+
/**
|
|
902
|
+
* A diff representing the edit.
|
|
903
|
+
*/
|
|
904
|
+
diff: string;
|
|
905
|
+
/**
|
|
906
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
907
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
908
|
+
* these keys.
|
|
909
|
+
*
|
|
910
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
911
|
+
*/
|
|
912
|
+
_meta?: {
|
|
913
|
+
[key: string]: unknown;
|
|
914
|
+
} | null;
|
|
915
|
+
};
|
|
916
|
+
/**
|
|
917
|
+
* A user action (typing, cursor movement, etc.).
|
|
918
|
+
*/
|
|
919
|
+
export type NesUserAction = {
|
|
920
|
+
/**
|
|
921
|
+
* The kind of action (e.g., "insertChar", "cursorMovement").
|
|
922
|
+
*/
|
|
923
|
+
action: string;
|
|
924
|
+
/**
|
|
925
|
+
* The URI of the file where the action occurred.
|
|
926
|
+
*/
|
|
927
|
+
uri: string;
|
|
928
|
+
/**
|
|
929
|
+
* The position where the action occurred.
|
|
930
|
+
*/
|
|
931
|
+
position: Position;
|
|
932
|
+
/**
|
|
933
|
+
* Timestamp in milliseconds since epoch.
|
|
934
|
+
*/
|
|
935
|
+
timestampMs: number;
|
|
936
|
+
/**
|
|
937
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
938
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
939
|
+
* these keys.
|
|
940
|
+
*
|
|
941
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
942
|
+
*/
|
|
943
|
+
_meta?: {
|
|
944
|
+
[key: string]: unknown;
|
|
945
|
+
} | null;
|
|
946
|
+
};
|
|
947
|
+
/**
|
|
948
|
+
* An open file in the editor.
|
|
949
|
+
*/
|
|
950
|
+
export type NesOpenFile = {
|
|
951
|
+
/**
|
|
952
|
+
* The URI of the file.
|
|
953
|
+
*/
|
|
954
|
+
uri: string;
|
|
955
|
+
/**
|
|
956
|
+
* The language identifier.
|
|
957
|
+
*/
|
|
958
|
+
languageId: string;
|
|
959
|
+
/**
|
|
960
|
+
* The visible range in the editor, if any.
|
|
961
|
+
*/
|
|
962
|
+
visibleRange?: Range | null;
|
|
963
|
+
/**
|
|
964
|
+
* Timestamp in milliseconds since epoch of when the file was last focused.
|
|
965
|
+
*/
|
|
966
|
+
lastFocusedMs?: number | null;
|
|
967
|
+
/**
|
|
968
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
969
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
970
|
+
* these keys.
|
|
971
|
+
*
|
|
972
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
973
|
+
*/
|
|
974
|
+
_meta?: {
|
|
975
|
+
[key: string]: unknown;
|
|
976
|
+
} | null;
|
|
977
|
+
};
|
|
978
|
+
/**
|
|
979
|
+
* A diagnostic (error, warning, etc.).
|
|
980
|
+
*/
|
|
981
|
+
export type NesDiagnostic = {
|
|
982
|
+
/**
|
|
983
|
+
* The URI of the file containing the diagnostic.
|
|
984
|
+
*/
|
|
985
|
+
uri: string;
|
|
986
|
+
/**
|
|
987
|
+
* The range of the diagnostic.
|
|
988
|
+
*/
|
|
989
|
+
range: Range;
|
|
990
|
+
/**
|
|
991
|
+
* The severity of the diagnostic.
|
|
992
|
+
*/
|
|
993
|
+
severity: NesDiagnosticSeverity;
|
|
994
|
+
/**
|
|
995
|
+
* The diagnostic message.
|
|
996
|
+
*/
|
|
997
|
+
message: string;
|
|
998
|
+
/**
|
|
999
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1000
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1001
|
+
* these keys.
|
|
1002
|
+
*
|
|
1003
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1004
|
+
*/
|
|
1005
|
+
_meta?: {
|
|
1006
|
+
[key: string]: unknown;
|
|
1007
|
+
} | null;
|
|
1008
|
+
};
|
|
1009
|
+
/**
|
|
1010
|
+
* Severity of a diagnostic.
|
|
1011
|
+
*/
|
|
1012
|
+
export type NesDiagnosticSeverity = "error" | "warning" | "information" | "hint";
|
|
1013
|
+
/**
|
|
1014
|
+
* Request to close an NES session.
|
|
1015
|
+
*
|
|
1016
|
+
* The agent **must** cancel any ongoing work related to the NES session
|
|
1017
|
+
* and then free up any resources associated with the session.
|
|
1018
|
+
*/
|
|
1019
|
+
export type CloseNesRequest = {
|
|
1020
|
+
/**
|
|
1021
|
+
* The ID of the NES session to close.
|
|
1022
|
+
*/
|
|
1023
|
+
sessionId: SessionId;
|
|
1024
|
+
/**
|
|
1025
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1026
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1027
|
+
* these keys.
|
|
1028
|
+
*
|
|
1029
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1030
|
+
*/
|
|
1031
|
+
_meta?: {
|
|
1032
|
+
[key: string]: unknown;
|
|
1033
|
+
} | null;
|
|
1034
|
+
};
|
|
1035
|
+
/**
|
|
1036
|
+
* Notification sent when a file is opened in the editor.
|
|
1037
|
+
*/
|
|
1038
|
+
export type DidOpenDocumentNotification = {
|
|
1039
|
+
/**
|
|
1040
|
+
* The session ID for this notification.
|
|
1041
|
+
*/
|
|
1042
|
+
sessionId: SessionId;
|
|
1043
|
+
/**
|
|
1044
|
+
* The URI of the opened document.
|
|
1045
|
+
*/
|
|
1046
|
+
uri: string;
|
|
1047
|
+
/**
|
|
1048
|
+
* The language identifier of the document (e.g., "rust", "python").
|
|
1049
|
+
*/
|
|
1050
|
+
languageId: string;
|
|
1051
|
+
/**
|
|
1052
|
+
* The version number of the document.
|
|
1053
|
+
*/
|
|
1054
|
+
version: number;
|
|
1055
|
+
/**
|
|
1056
|
+
* The full text content of the document.
|
|
1057
|
+
*/
|
|
1058
|
+
text: string;
|
|
1059
|
+
/**
|
|
1060
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1061
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1062
|
+
* these keys.
|
|
1063
|
+
*
|
|
1064
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1065
|
+
*/
|
|
1066
|
+
_meta?: {
|
|
1067
|
+
[key: string]: unknown;
|
|
1068
|
+
} | null;
|
|
1069
|
+
};
|
|
1070
|
+
/**
|
|
1071
|
+
* Notification sent when a file is edited.
|
|
1072
|
+
*/
|
|
1073
|
+
export type DidChangeDocumentNotification = {
|
|
1074
|
+
/**
|
|
1075
|
+
* The session ID for this notification.
|
|
1076
|
+
*/
|
|
1077
|
+
sessionId: SessionId;
|
|
1078
|
+
/**
|
|
1079
|
+
* The URI of the changed document.
|
|
1080
|
+
*/
|
|
1081
|
+
uri: string;
|
|
1082
|
+
/**
|
|
1083
|
+
* The new version number of the document.
|
|
1084
|
+
*/
|
|
1085
|
+
version: number;
|
|
1086
|
+
/**
|
|
1087
|
+
* The content changes.
|
|
1088
|
+
*/
|
|
1089
|
+
contentChanges: Array<TextDocumentContentChangeEvent>;
|
|
1090
|
+
/**
|
|
1091
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1092
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1093
|
+
* these keys.
|
|
1094
|
+
*
|
|
1095
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1096
|
+
*/
|
|
1097
|
+
_meta?: {
|
|
1098
|
+
[key: string]: unknown;
|
|
1099
|
+
} | null;
|
|
1100
|
+
};
|
|
1101
|
+
/**
|
|
1102
|
+
* A content change event for a document.
|
|
1103
|
+
*
|
|
1104
|
+
* When `range` is `None`, `text` is the full content of the document.
|
|
1105
|
+
* When `range` is `Some`, `text` replaces the given range.
|
|
1106
|
+
*/
|
|
1107
|
+
export type TextDocumentContentChangeEvent = {
|
|
1108
|
+
/**
|
|
1109
|
+
* The range of the document that changed. If `None`, the entire content is replaced.
|
|
1110
|
+
*/
|
|
1111
|
+
range?: Range | null;
|
|
1112
|
+
/**
|
|
1113
|
+
* The new text for the range, or the full document content if `range` is `None`.
|
|
1114
|
+
*/
|
|
1115
|
+
text: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1118
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1119
|
+
* these keys.
|
|
1120
|
+
*
|
|
1121
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1122
|
+
*/
|
|
1123
|
+
_meta?: {
|
|
1124
|
+
[key: string]: unknown;
|
|
1125
|
+
} | null;
|
|
1126
|
+
};
|
|
1127
|
+
/**
|
|
1128
|
+
* Notification sent when a file is closed.
|
|
1129
|
+
*/
|
|
1130
|
+
export type DidCloseDocumentNotification = {
|
|
1131
|
+
/**
|
|
1132
|
+
* The session ID for this notification.
|
|
1133
|
+
*/
|
|
1134
|
+
sessionId: SessionId;
|
|
1135
|
+
/**
|
|
1136
|
+
* The URI of the closed document.
|
|
1137
|
+
*/
|
|
1138
|
+
uri: string;
|
|
1139
|
+
/**
|
|
1140
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1141
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1142
|
+
* these keys.
|
|
1143
|
+
*
|
|
1144
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1145
|
+
*/
|
|
1146
|
+
_meta?: {
|
|
1147
|
+
[key: string]: unknown;
|
|
1148
|
+
} | null;
|
|
1149
|
+
};
|
|
1150
|
+
/**
|
|
1151
|
+
* Notification sent when a file is saved.
|
|
1152
|
+
*/
|
|
1153
|
+
export type DidSaveDocumentNotification = {
|
|
1154
|
+
/**
|
|
1155
|
+
* The session ID for this notification.
|
|
1156
|
+
*/
|
|
1157
|
+
sessionId: SessionId;
|
|
1158
|
+
/**
|
|
1159
|
+
* The URI of the saved document.
|
|
1160
|
+
*/
|
|
1161
|
+
uri: string;
|
|
1162
|
+
/**
|
|
1163
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1164
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1165
|
+
* these keys.
|
|
1166
|
+
*
|
|
1167
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1168
|
+
*/
|
|
1169
|
+
_meta?: {
|
|
1170
|
+
[key: string]: unknown;
|
|
1171
|
+
} | null;
|
|
1172
|
+
};
|
|
1173
|
+
/**
|
|
1174
|
+
* Notification sent when a file becomes the active editor tab.
|
|
1175
|
+
*/
|
|
1176
|
+
export type DidFocusDocumentNotification = {
|
|
1177
|
+
/**
|
|
1178
|
+
* The session ID for this notification.
|
|
1179
|
+
*/
|
|
1180
|
+
sessionId: SessionId;
|
|
1181
|
+
/**
|
|
1182
|
+
* The URI of the focused document.
|
|
1183
|
+
*/
|
|
1184
|
+
uri: string;
|
|
1185
|
+
/**
|
|
1186
|
+
* The version number of the document.
|
|
1187
|
+
*/
|
|
1188
|
+
version: number;
|
|
1189
|
+
/**
|
|
1190
|
+
* The current cursor position.
|
|
1191
|
+
*/
|
|
1192
|
+
position: Position;
|
|
1193
|
+
/**
|
|
1194
|
+
* The portion of the file currently visible in the editor viewport.
|
|
1195
|
+
*/
|
|
1196
|
+
visibleRange: Range;
|
|
1197
|
+
/**
|
|
1198
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1199
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1200
|
+
* these keys.
|
|
1201
|
+
*
|
|
1202
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1203
|
+
*/
|
|
1204
|
+
_meta?: {
|
|
1205
|
+
[key: string]: unknown;
|
|
1206
|
+
} | null;
|
|
1207
|
+
};
|
|
1208
|
+
/**
|
|
1209
|
+
* Notification sent when a suggestion is accepted.
|
|
1210
|
+
*/
|
|
1211
|
+
export type AcceptNesNotification = {
|
|
1212
|
+
/**
|
|
1213
|
+
* The session ID for this notification.
|
|
1214
|
+
*/
|
|
1215
|
+
sessionId: SessionId;
|
|
1216
|
+
/**
|
|
1217
|
+
* The ID of the accepted suggestion.
|
|
1218
|
+
*/
|
|
1219
|
+
id: NesSuggestionId;
|
|
1220
|
+
/**
|
|
1221
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1222
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1223
|
+
* these keys.
|
|
1224
|
+
*
|
|
1225
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1226
|
+
*/
|
|
1227
|
+
_meta?: {
|
|
1228
|
+
[key: string]: unknown;
|
|
1229
|
+
} | null;
|
|
1230
|
+
};
|
|
1231
|
+
/**
|
|
1232
|
+
* Notification sent when a suggestion is rejected.
|
|
1233
|
+
*/
|
|
1234
|
+
export type RejectNesNotification = {
|
|
1235
|
+
/**
|
|
1236
|
+
* The session ID for this notification.
|
|
1237
|
+
*/
|
|
1238
|
+
sessionId: SessionId;
|
|
1239
|
+
/**
|
|
1240
|
+
* The ID of the rejected suggestion.
|
|
1241
|
+
*/
|
|
1242
|
+
id: NesSuggestionId;
|
|
1243
|
+
/**
|
|
1244
|
+
* The reason for rejection.
|
|
1245
|
+
*/
|
|
1246
|
+
reason?: NesRejectReason | null;
|
|
1247
|
+
/**
|
|
1248
|
+
* The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1249
|
+
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1250
|
+
* these keys.
|
|
1251
|
+
*
|
|
1252
|
+
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1253
|
+
*/
|
|
1254
|
+
_meta?: {
|
|
1255
|
+
[key: string]: unknown;
|
|
1256
|
+
} | null;
|
|
1257
|
+
};
|
|
1258
|
+
/**
|
|
1259
|
+
* The reason a suggestion was rejected.
|
|
1260
|
+
*/
|
|
1261
|
+
export type NesRejectReason = "rejected" | "ignored" | "replaced" | "cancelled";
|