@opencode-ai/sdk 0.0.0-opentui-202510312235 → 0.0.0-test-bedrock-202511260007
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/dist/client.d.ts +3 -1
- package/dist/client.js +16 -0
- package/dist/gen/client/client.gen.js +1 -3
- package/dist/gen/client/utils.gen.d.ts +1 -1
- package/dist/gen/client/utils.gen.js +3 -5
- package/dist/gen/client.gen.js +1 -1
- package/dist/gen/core/pathSerializer.gen.d.ts +1 -1
- package/dist/gen/core/pathSerializer.gen.js +1 -1
- package/dist/gen/sdk.gen.d.ts +58 -3
- package/dist/gen/sdk.gen.js +122 -1
- package/dist/gen/types.gen.d.ts +1225 -781
- package/package.json +1 -1
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -1,3 +1,563 @@
|
|
|
1
|
+
export type EventInstallationUpdated = {
|
|
2
|
+
type: "installation.updated";
|
|
3
|
+
properties: {
|
|
4
|
+
version: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export type EventInstallationUpdateAvailable = {
|
|
8
|
+
type: "installation.update-available";
|
|
9
|
+
properties: {
|
|
10
|
+
version: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type EventLspClientDiagnostics = {
|
|
14
|
+
type: "lsp.client.diagnostics";
|
|
15
|
+
properties: {
|
|
16
|
+
serverID: string;
|
|
17
|
+
path: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export type EventLspUpdated = {
|
|
21
|
+
type: "lsp.updated";
|
|
22
|
+
properties: {
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type FileDiff = {
|
|
27
|
+
file: string;
|
|
28
|
+
before: string;
|
|
29
|
+
after: string;
|
|
30
|
+
additions: number;
|
|
31
|
+
deletions: number;
|
|
32
|
+
};
|
|
33
|
+
export type UserMessage = {
|
|
34
|
+
id: string;
|
|
35
|
+
sessionID: string;
|
|
36
|
+
role: "user";
|
|
37
|
+
time: {
|
|
38
|
+
created: number;
|
|
39
|
+
};
|
|
40
|
+
summary?: {
|
|
41
|
+
title?: string;
|
|
42
|
+
body?: string;
|
|
43
|
+
diffs: Array<FileDiff>;
|
|
44
|
+
};
|
|
45
|
+
agent: string;
|
|
46
|
+
model: {
|
|
47
|
+
providerID: string;
|
|
48
|
+
modelID: string;
|
|
49
|
+
};
|
|
50
|
+
system?: string;
|
|
51
|
+
tools?: {
|
|
52
|
+
[key: string]: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export type ProviderAuthError = {
|
|
56
|
+
name: "ProviderAuthError";
|
|
57
|
+
data: {
|
|
58
|
+
providerID: string;
|
|
59
|
+
message: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export type UnknownError = {
|
|
63
|
+
name: "UnknownError";
|
|
64
|
+
data: {
|
|
65
|
+
message: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export type MessageOutputLengthError = {
|
|
69
|
+
name: "MessageOutputLengthError";
|
|
70
|
+
data: {
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export type MessageAbortedError = {
|
|
75
|
+
name: "MessageAbortedError";
|
|
76
|
+
data: {
|
|
77
|
+
message: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export type ApiError = {
|
|
81
|
+
name: "APIError";
|
|
82
|
+
data: {
|
|
83
|
+
message: string;
|
|
84
|
+
statusCode?: number;
|
|
85
|
+
isRetryable: boolean;
|
|
86
|
+
responseHeaders?: {
|
|
87
|
+
[key: string]: string;
|
|
88
|
+
};
|
|
89
|
+
responseBody?: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
export type AssistantMessage = {
|
|
93
|
+
id: string;
|
|
94
|
+
sessionID: string;
|
|
95
|
+
role: "assistant";
|
|
96
|
+
time: {
|
|
97
|
+
created: number;
|
|
98
|
+
completed?: number;
|
|
99
|
+
};
|
|
100
|
+
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
|
|
101
|
+
parentID: string;
|
|
102
|
+
modelID: string;
|
|
103
|
+
providerID: string;
|
|
104
|
+
mode: string;
|
|
105
|
+
path: {
|
|
106
|
+
cwd: string;
|
|
107
|
+
root: string;
|
|
108
|
+
};
|
|
109
|
+
summary?: boolean;
|
|
110
|
+
cost: number;
|
|
111
|
+
tokens: {
|
|
112
|
+
input: number;
|
|
113
|
+
output: number;
|
|
114
|
+
reasoning: number;
|
|
115
|
+
cache: {
|
|
116
|
+
read: number;
|
|
117
|
+
write: number;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
finish?: string;
|
|
121
|
+
};
|
|
122
|
+
export type Message = UserMessage | AssistantMessage;
|
|
123
|
+
export type EventMessageUpdated = {
|
|
124
|
+
type: "message.updated";
|
|
125
|
+
properties: {
|
|
126
|
+
info: Message;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
export type EventMessageRemoved = {
|
|
130
|
+
type: "message.removed";
|
|
131
|
+
properties: {
|
|
132
|
+
sessionID: string;
|
|
133
|
+
messageID: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
export type TextPart = {
|
|
137
|
+
id: string;
|
|
138
|
+
sessionID: string;
|
|
139
|
+
messageID: string;
|
|
140
|
+
type: "text";
|
|
141
|
+
text: string;
|
|
142
|
+
synthetic?: boolean;
|
|
143
|
+
ignored?: boolean;
|
|
144
|
+
time?: {
|
|
145
|
+
start: number;
|
|
146
|
+
end?: number;
|
|
147
|
+
};
|
|
148
|
+
metadata?: {
|
|
149
|
+
[key: string]: unknown;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
export type ReasoningPart = {
|
|
153
|
+
id: string;
|
|
154
|
+
sessionID: string;
|
|
155
|
+
messageID: string;
|
|
156
|
+
type: "reasoning";
|
|
157
|
+
text: string;
|
|
158
|
+
metadata?: {
|
|
159
|
+
[key: string]: unknown;
|
|
160
|
+
};
|
|
161
|
+
time: {
|
|
162
|
+
start: number;
|
|
163
|
+
end?: number;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
export type FilePartSourceText = {
|
|
167
|
+
value: string;
|
|
168
|
+
start: number;
|
|
169
|
+
end: number;
|
|
170
|
+
};
|
|
171
|
+
export type FileSource = {
|
|
172
|
+
text: FilePartSourceText;
|
|
173
|
+
type: "file";
|
|
174
|
+
path: string;
|
|
175
|
+
};
|
|
176
|
+
export type Range = {
|
|
177
|
+
start: {
|
|
178
|
+
line: number;
|
|
179
|
+
character: number;
|
|
180
|
+
};
|
|
181
|
+
end: {
|
|
182
|
+
line: number;
|
|
183
|
+
character: number;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
export type SymbolSource = {
|
|
187
|
+
text: FilePartSourceText;
|
|
188
|
+
type: "symbol";
|
|
189
|
+
path: string;
|
|
190
|
+
range: Range;
|
|
191
|
+
name: string;
|
|
192
|
+
kind: number;
|
|
193
|
+
};
|
|
194
|
+
export type FilePartSource = FileSource | SymbolSource;
|
|
195
|
+
export type FilePart = {
|
|
196
|
+
id: string;
|
|
197
|
+
sessionID: string;
|
|
198
|
+
messageID: string;
|
|
199
|
+
type: "file";
|
|
200
|
+
mime: string;
|
|
201
|
+
filename?: string;
|
|
202
|
+
url: string;
|
|
203
|
+
source?: FilePartSource;
|
|
204
|
+
};
|
|
205
|
+
export type ToolStatePending = {
|
|
206
|
+
status: "pending";
|
|
207
|
+
input: {
|
|
208
|
+
[key: string]: unknown;
|
|
209
|
+
};
|
|
210
|
+
raw: string;
|
|
211
|
+
};
|
|
212
|
+
export type ToolStateRunning = {
|
|
213
|
+
status: "running";
|
|
214
|
+
input: {
|
|
215
|
+
[key: string]: unknown;
|
|
216
|
+
};
|
|
217
|
+
title?: string;
|
|
218
|
+
metadata?: {
|
|
219
|
+
[key: string]: unknown;
|
|
220
|
+
};
|
|
221
|
+
time: {
|
|
222
|
+
start: number;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
export type ToolStateCompleted = {
|
|
226
|
+
status: "completed";
|
|
227
|
+
input: {
|
|
228
|
+
[key: string]: unknown;
|
|
229
|
+
};
|
|
230
|
+
output: string;
|
|
231
|
+
title: string;
|
|
232
|
+
metadata: {
|
|
233
|
+
[key: string]: unknown;
|
|
234
|
+
};
|
|
235
|
+
time: {
|
|
236
|
+
start: number;
|
|
237
|
+
end: number;
|
|
238
|
+
compacted?: number;
|
|
239
|
+
};
|
|
240
|
+
attachments?: Array<FilePart>;
|
|
241
|
+
};
|
|
242
|
+
export type ToolStateError = {
|
|
243
|
+
status: "error";
|
|
244
|
+
input: {
|
|
245
|
+
[key: string]: unknown;
|
|
246
|
+
};
|
|
247
|
+
error: string;
|
|
248
|
+
metadata?: {
|
|
249
|
+
[key: string]: unknown;
|
|
250
|
+
};
|
|
251
|
+
time: {
|
|
252
|
+
start: number;
|
|
253
|
+
end: number;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
export type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;
|
|
257
|
+
export type ToolPart = {
|
|
258
|
+
id: string;
|
|
259
|
+
sessionID: string;
|
|
260
|
+
messageID: string;
|
|
261
|
+
type: "tool";
|
|
262
|
+
callID: string;
|
|
263
|
+
tool: string;
|
|
264
|
+
state: ToolState;
|
|
265
|
+
metadata?: {
|
|
266
|
+
[key: string]: unknown;
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
export type StepStartPart = {
|
|
270
|
+
id: string;
|
|
271
|
+
sessionID: string;
|
|
272
|
+
messageID: string;
|
|
273
|
+
type: "step-start";
|
|
274
|
+
snapshot?: string;
|
|
275
|
+
};
|
|
276
|
+
export type StepFinishPart = {
|
|
277
|
+
id: string;
|
|
278
|
+
sessionID: string;
|
|
279
|
+
messageID: string;
|
|
280
|
+
type: "step-finish";
|
|
281
|
+
reason: string;
|
|
282
|
+
snapshot?: string;
|
|
283
|
+
cost: number;
|
|
284
|
+
tokens: {
|
|
285
|
+
input: number;
|
|
286
|
+
output: number;
|
|
287
|
+
reasoning: number;
|
|
288
|
+
cache: {
|
|
289
|
+
read: number;
|
|
290
|
+
write: number;
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
export type SnapshotPart = {
|
|
295
|
+
id: string;
|
|
296
|
+
sessionID: string;
|
|
297
|
+
messageID: string;
|
|
298
|
+
type: "snapshot";
|
|
299
|
+
snapshot: string;
|
|
300
|
+
};
|
|
301
|
+
export type PatchPart = {
|
|
302
|
+
id: string;
|
|
303
|
+
sessionID: string;
|
|
304
|
+
messageID: string;
|
|
305
|
+
type: "patch";
|
|
306
|
+
hash: string;
|
|
307
|
+
files: Array<string>;
|
|
308
|
+
};
|
|
309
|
+
export type AgentPart = {
|
|
310
|
+
id: string;
|
|
311
|
+
sessionID: string;
|
|
312
|
+
messageID: string;
|
|
313
|
+
type: "agent";
|
|
314
|
+
name: string;
|
|
315
|
+
source?: {
|
|
316
|
+
value: string;
|
|
317
|
+
start: number;
|
|
318
|
+
end: number;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
export type RetryPart = {
|
|
322
|
+
id: string;
|
|
323
|
+
sessionID: string;
|
|
324
|
+
messageID: string;
|
|
325
|
+
type: "retry";
|
|
326
|
+
attempt: number;
|
|
327
|
+
error: ApiError;
|
|
328
|
+
time: {
|
|
329
|
+
created: number;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
export type CompactionPart = {
|
|
333
|
+
id: string;
|
|
334
|
+
sessionID: string;
|
|
335
|
+
messageID: string;
|
|
336
|
+
type: "compaction";
|
|
337
|
+
auto: boolean;
|
|
338
|
+
};
|
|
339
|
+
export type Part = TextPart | {
|
|
340
|
+
id: string;
|
|
341
|
+
sessionID: string;
|
|
342
|
+
messageID: string;
|
|
343
|
+
type: "subtask";
|
|
344
|
+
prompt: string;
|
|
345
|
+
description: string;
|
|
346
|
+
agent: string;
|
|
347
|
+
} | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;
|
|
348
|
+
export type EventMessagePartUpdated = {
|
|
349
|
+
type: "message.part.updated";
|
|
350
|
+
properties: {
|
|
351
|
+
part: Part;
|
|
352
|
+
delta?: string;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
export type EventMessagePartRemoved = {
|
|
356
|
+
type: "message.part.removed";
|
|
357
|
+
properties: {
|
|
358
|
+
sessionID: string;
|
|
359
|
+
messageID: string;
|
|
360
|
+
partID: string;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
export type Permission = {
|
|
364
|
+
id: string;
|
|
365
|
+
type: string;
|
|
366
|
+
pattern?: string | Array<string>;
|
|
367
|
+
sessionID: string;
|
|
368
|
+
messageID: string;
|
|
369
|
+
callID?: string;
|
|
370
|
+
title: string;
|
|
371
|
+
metadata: {
|
|
372
|
+
[key: string]: unknown;
|
|
373
|
+
};
|
|
374
|
+
time: {
|
|
375
|
+
created: number;
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
export type EventPermissionUpdated = {
|
|
379
|
+
type: "permission.updated";
|
|
380
|
+
properties: Permission;
|
|
381
|
+
};
|
|
382
|
+
export type EventPermissionReplied = {
|
|
383
|
+
type: "permission.replied";
|
|
384
|
+
properties: {
|
|
385
|
+
sessionID: string;
|
|
386
|
+
permissionID: string;
|
|
387
|
+
response: string;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
export type SessionStatus = {
|
|
391
|
+
type: "idle";
|
|
392
|
+
} | {
|
|
393
|
+
type: "retry";
|
|
394
|
+
attempt: number;
|
|
395
|
+
message: string;
|
|
396
|
+
next: number;
|
|
397
|
+
} | {
|
|
398
|
+
type: "busy";
|
|
399
|
+
};
|
|
400
|
+
export type EventSessionStatus = {
|
|
401
|
+
type: "session.status";
|
|
402
|
+
properties: {
|
|
403
|
+
sessionID: string;
|
|
404
|
+
status: SessionStatus;
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
export type EventSessionIdle = {
|
|
408
|
+
type: "session.idle";
|
|
409
|
+
properties: {
|
|
410
|
+
sessionID: string;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
export type EventSessionCompacted = {
|
|
414
|
+
type: "session.compacted";
|
|
415
|
+
properties: {
|
|
416
|
+
sessionID: string;
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
export type EventFileEdited = {
|
|
420
|
+
type: "file.edited";
|
|
421
|
+
properties: {
|
|
422
|
+
file: string;
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
export type Todo = {
|
|
426
|
+
/**
|
|
427
|
+
* Brief description of the task
|
|
428
|
+
*/
|
|
429
|
+
content: string;
|
|
430
|
+
/**
|
|
431
|
+
* Current status of the task: pending, in_progress, completed, cancelled
|
|
432
|
+
*/
|
|
433
|
+
status: string;
|
|
434
|
+
/**
|
|
435
|
+
* Priority level of the task: high, medium, low
|
|
436
|
+
*/
|
|
437
|
+
priority: string;
|
|
438
|
+
/**
|
|
439
|
+
* Unique identifier for the todo item
|
|
440
|
+
*/
|
|
441
|
+
id: string;
|
|
442
|
+
};
|
|
443
|
+
export type EventTodoUpdated = {
|
|
444
|
+
type: "todo.updated";
|
|
445
|
+
properties: {
|
|
446
|
+
sessionID: string;
|
|
447
|
+
todos: Array<Todo>;
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
export type EventCommandExecuted = {
|
|
451
|
+
type: "command.executed";
|
|
452
|
+
properties: {
|
|
453
|
+
name: string;
|
|
454
|
+
sessionID: string;
|
|
455
|
+
arguments: string;
|
|
456
|
+
messageID: string;
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
export type Session = {
|
|
460
|
+
id: string;
|
|
461
|
+
projectID: string;
|
|
462
|
+
directory: string;
|
|
463
|
+
parentID?: string;
|
|
464
|
+
summary?: {
|
|
465
|
+
additions: number;
|
|
466
|
+
deletions: number;
|
|
467
|
+
files: number;
|
|
468
|
+
diffs?: Array<FileDiff>;
|
|
469
|
+
};
|
|
470
|
+
share?: {
|
|
471
|
+
url: string;
|
|
472
|
+
};
|
|
473
|
+
title: string;
|
|
474
|
+
version: string;
|
|
475
|
+
time: {
|
|
476
|
+
created: number;
|
|
477
|
+
updated: number;
|
|
478
|
+
compacting?: number;
|
|
479
|
+
};
|
|
480
|
+
revert?: {
|
|
481
|
+
messageID: string;
|
|
482
|
+
partID?: string;
|
|
483
|
+
snapshot?: string;
|
|
484
|
+
diff?: string;
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
export type EventSessionCreated = {
|
|
488
|
+
type: "session.created";
|
|
489
|
+
properties: {
|
|
490
|
+
info: Session;
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
export type EventSessionUpdated = {
|
|
494
|
+
type: "session.updated";
|
|
495
|
+
properties: {
|
|
496
|
+
info: Session;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
export type EventSessionDeleted = {
|
|
500
|
+
type: "session.deleted";
|
|
501
|
+
properties: {
|
|
502
|
+
info: Session;
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
export type EventSessionDiff = {
|
|
506
|
+
type: "session.diff";
|
|
507
|
+
properties: {
|
|
508
|
+
sessionID: string;
|
|
509
|
+
diff: Array<FileDiff>;
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
export type EventSessionError = {
|
|
513
|
+
type: "session.error";
|
|
514
|
+
properties: {
|
|
515
|
+
sessionID?: string;
|
|
516
|
+
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
export type EventTuiPromptAppend = {
|
|
520
|
+
type: "tui.prompt.append";
|
|
521
|
+
properties: {
|
|
522
|
+
text: string;
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
export type EventTuiCommandExecute = {
|
|
526
|
+
type: "tui.command.execute";
|
|
527
|
+
properties: {
|
|
528
|
+
command: ("session.list" | "session.new" | "session.share" | "session.interrupt" | "session.compact" | "session.page.up" | "session.page.down" | "session.half.page.up" | "session.half.page.down" | "session.first" | "session.last" | "prompt.clear" | "prompt.submit" | "agent.cycle") | string;
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
export type EventTuiToastShow = {
|
|
532
|
+
type: "tui.toast.show";
|
|
533
|
+
properties: {
|
|
534
|
+
title?: string;
|
|
535
|
+
message: string;
|
|
536
|
+
variant: "info" | "success" | "warning" | "error";
|
|
537
|
+
/**
|
|
538
|
+
* Duration in milliseconds
|
|
539
|
+
*/
|
|
540
|
+
duration?: number;
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
export type EventServerConnected = {
|
|
544
|
+
type: "server.connected";
|
|
545
|
+
properties: {
|
|
546
|
+
[key: string]: unknown;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
export type EventFileWatcherUpdated = {
|
|
550
|
+
type: "file.watcher.updated";
|
|
551
|
+
properties: {
|
|
552
|
+
file: string;
|
|
553
|
+
event: "add" | "change" | "unlink";
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionUpdated | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventServerConnected | EventFileWatcherUpdated;
|
|
557
|
+
export type GlobalEvent = {
|
|
558
|
+
directory: string;
|
|
559
|
+
payload: Event;
|
|
560
|
+
};
|
|
1
561
|
export type Project = {
|
|
2
562
|
id: string;
|
|
3
563
|
worktree: string;
|
|
@@ -111,6 +671,14 @@ export type KeybindsConfig = {
|
|
|
111
671
|
* List available models
|
|
112
672
|
*/
|
|
113
673
|
model_list?: string;
|
|
674
|
+
/**
|
|
675
|
+
* Next recently used model
|
|
676
|
+
*/
|
|
677
|
+
model_cycle_recent?: string;
|
|
678
|
+
/**
|
|
679
|
+
* Previous recently used model
|
|
680
|
+
*/
|
|
681
|
+
model_cycle_recent_reverse?: string;
|
|
114
682
|
/**
|
|
115
683
|
* List available commands
|
|
116
684
|
*/
|
|
@@ -131,6 +699,10 @@ export type KeybindsConfig = {
|
|
|
131
699
|
* Clear input field
|
|
132
700
|
*/
|
|
133
701
|
input_clear?: string;
|
|
702
|
+
/**
|
|
703
|
+
* Forward delete
|
|
704
|
+
*/
|
|
705
|
+
input_forward_delete?: string;
|
|
134
706
|
/**
|
|
135
707
|
* Paste from clipboard
|
|
136
708
|
*/
|
|
@@ -143,656 +715,395 @@ export type KeybindsConfig = {
|
|
|
143
715
|
* Insert newline in input
|
|
144
716
|
*/
|
|
145
717
|
input_newline?: string;
|
|
146
|
-
};
|
|
147
|
-
export type AgentConfig = {
|
|
148
|
-
model?: string;
|
|
149
|
-
temperature?: number;
|
|
150
|
-
top_p?: number;
|
|
151
|
-
prompt?: string;
|
|
152
|
-
tools?: {
|
|
153
|
-
[key: string]: boolean;
|
|
154
|
-
};
|
|
155
|
-
disable?: boolean;
|
|
156
|
-
/**
|
|
157
|
-
* Description of when to use the agent
|
|
158
|
-
*/
|
|
159
|
-
description?: string;
|
|
160
|
-
mode?: "subagent" | "primary" | "all";
|
|
161
|
-
permission?: {
|
|
162
|
-
edit?: "ask" | "allow" | "deny";
|
|
163
|
-
bash?: ("ask" | "allow" | "deny") | {
|
|
164
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
165
|
-
};
|
|
166
|
-
webfetch?: "ask" | "allow" | "deny";
|
|
167
|
-
};
|
|
168
|
-
[key: string]: unknown | string | number | {
|
|
169
|
-
[key: string]: boolean;
|
|
170
|
-
} | boolean | ("subagent" | "primary" | "all") | {
|
|
171
|
-
edit?: "ask" | "allow" | "deny";
|
|
172
|
-
bash?: ("ask" | "allow" | "deny") | {
|
|
173
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
174
|
-
};
|
|
175
|
-
webfetch?: "ask" | "allow" | "deny";
|
|
176
|
-
} | undefined;
|
|
177
|
-
};
|
|
178
|
-
export type McpLocalConfig = {
|
|
179
|
-
/**
|
|
180
|
-
* Type of MCP server connection
|
|
181
|
-
*/
|
|
182
|
-
type: "local";
|
|
183
|
-
/**
|
|
184
|
-
* Command and arguments to run the MCP server
|
|
185
|
-
*/
|
|
186
|
-
command: Array<string>;
|
|
187
|
-
/**
|
|
188
|
-
* Environment variables to set when running the MCP server
|
|
189
|
-
*/
|
|
190
|
-
environment?: {
|
|
191
|
-
[key: string]: string;
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* Enable or disable the MCP server on startup
|
|
195
|
-
*/
|
|
196
|
-
enabled?: boolean;
|
|
197
|
-
/**
|
|
198
|
-
* Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.
|
|
199
|
-
*/
|
|
200
|
-
timeout?: number;
|
|
201
|
-
};
|
|
202
|
-
export type McpRemoteConfig = {
|
|
203
718
|
/**
|
|
204
|
-
*
|
|
719
|
+
* Previous history item
|
|
205
720
|
*/
|
|
206
|
-
|
|
721
|
+
history_previous?: string;
|
|
207
722
|
/**
|
|
208
|
-
*
|
|
723
|
+
* Next history item
|
|
209
724
|
*/
|
|
210
|
-
|
|
725
|
+
history_next?: string;
|
|
211
726
|
/**
|
|
212
|
-
*
|
|
727
|
+
* Next child session
|
|
213
728
|
*/
|
|
214
|
-
|
|
729
|
+
session_child_cycle?: string;
|
|
215
730
|
/**
|
|
216
|
-
*
|
|
731
|
+
* Previous child session
|
|
217
732
|
*/
|
|
218
|
-
|
|
219
|
-
[key: string]: string;
|
|
220
|
-
};
|
|
733
|
+
session_child_cycle_reverse?: string;
|
|
221
734
|
/**
|
|
222
|
-
*
|
|
735
|
+
* Suspend terminal
|
|
223
736
|
*/
|
|
224
|
-
|
|
737
|
+
terminal_suspend?: string;
|
|
225
738
|
};
|
|
226
|
-
|
|
227
|
-
* @deprecated Always uses stretch layout.
|
|
228
|
-
*/
|
|
229
|
-
export type LayoutConfig = "auto" | "stretch";
|
|
230
|
-
export type Config = {
|
|
231
|
-
/**
|
|
232
|
-
* JSON schema reference for configuration validation
|
|
233
|
-
*/
|
|
234
|
-
$schema?: string;
|
|
235
|
-
/**
|
|
236
|
-
* Theme name to use for the interface
|
|
237
|
-
*/
|
|
238
|
-
theme?: string;
|
|
239
|
-
keybinds?: KeybindsConfig;
|
|
240
|
-
/**
|
|
241
|
-
* TUI specific settings
|
|
242
|
-
*/
|
|
243
|
-
tui?: {
|
|
244
|
-
/**
|
|
245
|
-
* TUI scroll speed
|
|
246
|
-
*/
|
|
247
|
-
scroll_speed?: number;
|
|
248
|
-
};
|
|
249
|
-
/**
|
|
250
|
-
* Command configuration, see https://opencode.ai/docs/commands
|
|
251
|
-
*/
|
|
252
|
-
command?: {
|
|
253
|
-
[key: string]: {
|
|
254
|
-
template: string;
|
|
255
|
-
description?: string;
|
|
256
|
-
agent?: string;
|
|
257
|
-
model?: string;
|
|
258
|
-
subtask?: boolean;
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
watcher?: {
|
|
262
|
-
ignore?: Array<string>;
|
|
263
|
-
};
|
|
264
|
-
plugin?: Array<string>;
|
|
265
|
-
snapshot?: boolean;
|
|
266
|
-
/**
|
|
267
|
-
* Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
|
|
268
|
-
*/
|
|
269
|
-
share?: "manual" | "auto" | "disabled";
|
|
270
|
-
/**
|
|
271
|
-
* @deprecated Use 'share' field instead. Share newly created sessions automatically
|
|
272
|
-
*/
|
|
273
|
-
autoshare?: boolean;
|
|
274
|
-
/**
|
|
275
|
-
* Automatically update to the latest version
|
|
276
|
-
*/
|
|
277
|
-
autoupdate?: boolean;
|
|
278
|
-
/**
|
|
279
|
-
* Disable providers that are loaded automatically
|
|
280
|
-
*/
|
|
281
|
-
disabled_providers?: Array<string>;
|
|
282
|
-
/**
|
|
283
|
-
* Model to use in the format of provider/model, eg anthropic/claude-2
|
|
284
|
-
*/
|
|
739
|
+
export type AgentConfig = {
|
|
285
740
|
model?: string;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
* Custom username to display in conversations instead of system username
|
|
292
|
-
*/
|
|
293
|
-
username?: string;
|
|
294
|
-
/**
|
|
295
|
-
* @deprecated Use `agent` field instead.
|
|
296
|
-
*/
|
|
297
|
-
mode?: {
|
|
298
|
-
build?: AgentConfig;
|
|
299
|
-
plan?: AgentConfig;
|
|
300
|
-
[key: string]: AgentConfig | undefined;
|
|
301
|
-
};
|
|
302
|
-
/**
|
|
303
|
-
* Agent configuration, see https://opencode.ai/docs/agent
|
|
304
|
-
*/
|
|
305
|
-
agent?: {
|
|
306
|
-
plan?: AgentConfig;
|
|
307
|
-
build?: AgentConfig;
|
|
308
|
-
general?: AgentConfig;
|
|
309
|
-
[key: string]: AgentConfig | undefined;
|
|
310
|
-
};
|
|
311
|
-
/**
|
|
312
|
-
* Custom provider configurations and model overrides
|
|
313
|
-
*/
|
|
314
|
-
provider?: {
|
|
315
|
-
[key: string]: {
|
|
316
|
-
api?: string;
|
|
317
|
-
name?: string;
|
|
318
|
-
env?: Array<string>;
|
|
319
|
-
id?: string;
|
|
320
|
-
npm?: string;
|
|
321
|
-
models?: {
|
|
322
|
-
[key: string]: {
|
|
323
|
-
id?: string;
|
|
324
|
-
name?: string;
|
|
325
|
-
release_date?: string;
|
|
326
|
-
attachment?: boolean;
|
|
327
|
-
reasoning?: boolean;
|
|
328
|
-
temperature?: boolean;
|
|
329
|
-
tool_call?: boolean;
|
|
330
|
-
cost?: {
|
|
331
|
-
input: number;
|
|
332
|
-
output: number;
|
|
333
|
-
cache_read?: number;
|
|
334
|
-
cache_write?: number;
|
|
335
|
-
};
|
|
336
|
-
limit?: {
|
|
337
|
-
context: number;
|
|
338
|
-
output: number;
|
|
339
|
-
};
|
|
340
|
-
modalities?: {
|
|
341
|
-
input: Array<"text" | "audio" | "image" | "video" | "pdf">;
|
|
342
|
-
output: Array<"text" | "audio" | "image" | "video" | "pdf">;
|
|
343
|
-
};
|
|
344
|
-
experimental?: boolean;
|
|
345
|
-
status?: "alpha" | "beta" | "deprecated";
|
|
346
|
-
options?: {
|
|
347
|
-
[key: string]: unknown;
|
|
348
|
-
};
|
|
349
|
-
headers?: {
|
|
350
|
-
[key: string]: string;
|
|
351
|
-
};
|
|
352
|
-
provider?: {
|
|
353
|
-
npm: string;
|
|
354
|
-
};
|
|
355
|
-
};
|
|
356
|
-
};
|
|
357
|
-
options?: {
|
|
358
|
-
apiKey?: string;
|
|
359
|
-
baseURL?: string;
|
|
360
|
-
/**
|
|
361
|
-
* Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
|
|
362
|
-
*/
|
|
363
|
-
timeout?: number | false;
|
|
364
|
-
[key: string]: unknown | string | (number | false) | undefined;
|
|
365
|
-
};
|
|
366
|
-
};
|
|
741
|
+
temperature?: number;
|
|
742
|
+
top_p?: number;
|
|
743
|
+
prompt?: string;
|
|
744
|
+
tools?: {
|
|
745
|
+
[key: string]: boolean;
|
|
367
746
|
};
|
|
747
|
+
disable?: boolean;
|
|
368
748
|
/**
|
|
369
|
-
*
|
|
749
|
+
* Description of when to use the agent
|
|
370
750
|
*/
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
};
|
|
374
|
-
formatter?: {
|
|
375
|
-
[key: string]: {
|
|
376
|
-
disabled?: boolean;
|
|
377
|
-
command?: Array<string>;
|
|
378
|
-
environment?: {
|
|
379
|
-
[key: string]: string;
|
|
380
|
-
};
|
|
381
|
-
extensions?: Array<string>;
|
|
382
|
-
};
|
|
383
|
-
};
|
|
384
|
-
lsp?: {
|
|
385
|
-
[key: string]: {
|
|
386
|
-
disabled: true;
|
|
387
|
-
} | {
|
|
388
|
-
command: Array<string>;
|
|
389
|
-
extensions?: Array<string>;
|
|
390
|
-
disabled?: boolean;
|
|
391
|
-
env?: {
|
|
392
|
-
[key: string]: string;
|
|
393
|
-
};
|
|
394
|
-
initialization?: {
|
|
395
|
-
[key: string]: unknown;
|
|
396
|
-
};
|
|
397
|
-
};
|
|
398
|
-
};
|
|
751
|
+
description?: string;
|
|
752
|
+
mode?: "subagent" | "primary" | "all";
|
|
399
753
|
/**
|
|
400
|
-
*
|
|
401
|
-
*/
|
|
402
|
-
|
|
403
|
-
layout?: LayoutConfig;
|
|
754
|
+
* Hex color code for the agent (e.g., #FF5733)
|
|
755
|
+
*/
|
|
756
|
+
color?: string;
|
|
404
757
|
permission?: {
|
|
405
758
|
edit?: "ask" | "allow" | "deny";
|
|
406
759
|
bash?: ("ask" | "allow" | "deny") | {
|
|
407
760
|
[key: string]: "ask" | "allow" | "deny";
|
|
408
761
|
};
|
|
409
762
|
webfetch?: "ask" | "allow" | "deny";
|
|
763
|
+
doom_loop?: "ask" | "allow" | "deny";
|
|
764
|
+
external_directory?: "ask" | "allow" | "deny";
|
|
410
765
|
};
|
|
411
|
-
|
|
766
|
+
[key: string]: unknown | string | number | {
|
|
412
767
|
[key: string]: boolean;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
[key: string]: Array<{
|
|
418
|
-
command: Array<string>;
|
|
419
|
-
environment?: {
|
|
420
|
-
[key: string]: string;
|
|
421
|
-
};
|
|
422
|
-
}>;
|
|
423
|
-
};
|
|
424
|
-
session_completed?: Array<{
|
|
425
|
-
command: Array<string>;
|
|
426
|
-
environment?: {
|
|
427
|
-
[key: string]: string;
|
|
428
|
-
};
|
|
429
|
-
}>;
|
|
768
|
+
} | boolean | ("subagent" | "primary" | "all") | {
|
|
769
|
+
edit?: "ask" | "allow" | "deny";
|
|
770
|
+
bash?: ("ask" | "allow" | "deny") | {
|
|
771
|
+
[key: string]: "ask" | "allow" | "deny";
|
|
430
772
|
};
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
disable_paste_summary?: boolean;
|
|
436
|
-
};
|
|
437
|
-
};
|
|
438
|
-
export type BadRequestError = {
|
|
439
|
-
data: unknown | null;
|
|
440
|
-
errors: Array<{
|
|
441
|
-
[key: string]: unknown;
|
|
442
|
-
}>;
|
|
443
|
-
success: false;
|
|
444
|
-
};
|
|
445
|
-
export type ToolIds = Array<string>;
|
|
446
|
-
export type ToolListItem = {
|
|
447
|
-
id: string;
|
|
448
|
-
description: string;
|
|
449
|
-
parameters: unknown;
|
|
450
|
-
};
|
|
451
|
-
export type ToolList = Array<ToolListItem>;
|
|
452
|
-
export type Path = {
|
|
453
|
-
state: string;
|
|
454
|
-
config: string;
|
|
455
|
-
worktree: string;
|
|
456
|
-
directory: string;
|
|
457
|
-
};
|
|
458
|
-
export type FileDiff = {
|
|
459
|
-
file: string;
|
|
460
|
-
before: string;
|
|
461
|
-
after: string;
|
|
462
|
-
additions: number;
|
|
463
|
-
deletions: number;
|
|
464
|
-
};
|
|
465
|
-
export type Session = {
|
|
466
|
-
id: string;
|
|
467
|
-
projectID: string;
|
|
468
|
-
directory: string;
|
|
469
|
-
parentID?: string;
|
|
470
|
-
summary?: {
|
|
471
|
-
diffs: Array<FileDiff>;
|
|
472
|
-
};
|
|
473
|
-
share?: {
|
|
474
|
-
url: string;
|
|
475
|
-
};
|
|
476
|
-
title: string;
|
|
477
|
-
version: string;
|
|
478
|
-
time: {
|
|
479
|
-
created: number;
|
|
480
|
-
updated: number;
|
|
481
|
-
compacting?: number;
|
|
482
|
-
};
|
|
483
|
-
revert?: {
|
|
484
|
-
messageID: string;
|
|
485
|
-
partID?: string;
|
|
486
|
-
snapshot?: string;
|
|
487
|
-
diff?: string;
|
|
488
|
-
};
|
|
489
|
-
};
|
|
490
|
-
export type NotFoundError = {
|
|
491
|
-
name: "NotFoundError";
|
|
492
|
-
data: {
|
|
493
|
-
message: string;
|
|
494
|
-
};
|
|
773
|
+
webfetch?: "ask" | "allow" | "deny";
|
|
774
|
+
doom_loop?: "ask" | "allow" | "deny";
|
|
775
|
+
external_directory?: "ask" | "allow" | "deny";
|
|
776
|
+
} | undefined;
|
|
495
777
|
};
|
|
496
|
-
export type
|
|
778
|
+
export type McpLocalConfig = {
|
|
497
779
|
/**
|
|
498
|
-
*
|
|
780
|
+
* Type of MCP server connection
|
|
499
781
|
*/
|
|
500
|
-
|
|
782
|
+
type: "local";
|
|
501
783
|
/**
|
|
502
|
-
*
|
|
784
|
+
* Command and arguments to run the MCP server
|
|
503
785
|
*/
|
|
504
|
-
|
|
786
|
+
command: Array<string>;
|
|
505
787
|
/**
|
|
506
|
-
*
|
|
788
|
+
* Environment variables to set when running the MCP server
|
|
507
789
|
*/
|
|
508
|
-
|
|
790
|
+
environment?: {
|
|
791
|
+
[key: string]: string;
|
|
792
|
+
};
|
|
509
793
|
/**
|
|
510
|
-
*
|
|
794
|
+
* Enable or disable the MCP server on startup
|
|
511
795
|
*/
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
role: "user";
|
|
518
|
-
time: {
|
|
519
|
-
created: number;
|
|
520
|
-
};
|
|
521
|
-
summary?: {
|
|
522
|
-
title?: string;
|
|
523
|
-
body?: string;
|
|
524
|
-
diffs: Array<FileDiff>;
|
|
525
|
-
};
|
|
526
|
-
};
|
|
527
|
-
export type ProviderAuthError = {
|
|
528
|
-
name: "ProviderAuthError";
|
|
529
|
-
data: {
|
|
530
|
-
providerID: string;
|
|
531
|
-
message: string;
|
|
532
|
-
};
|
|
533
|
-
};
|
|
534
|
-
export type UnknownError = {
|
|
535
|
-
name: "UnknownError";
|
|
536
|
-
data: {
|
|
537
|
-
message: string;
|
|
538
|
-
};
|
|
539
|
-
};
|
|
540
|
-
export type MessageOutputLengthError = {
|
|
541
|
-
name: "MessageOutputLengthError";
|
|
542
|
-
data: {
|
|
543
|
-
[key: string]: unknown;
|
|
544
|
-
};
|
|
545
|
-
};
|
|
546
|
-
export type MessageAbortedError = {
|
|
547
|
-
name: "MessageAbortedError";
|
|
548
|
-
data: {
|
|
549
|
-
message: string;
|
|
550
|
-
};
|
|
551
|
-
};
|
|
552
|
-
export type ApiError = {
|
|
553
|
-
name: "APIError";
|
|
554
|
-
data: {
|
|
555
|
-
message: string;
|
|
556
|
-
statusCode?: number;
|
|
557
|
-
isRetryable: boolean;
|
|
558
|
-
responseHeaders?: {
|
|
559
|
-
[key: string]: string;
|
|
560
|
-
};
|
|
561
|
-
responseBody?: string;
|
|
562
|
-
};
|
|
563
|
-
};
|
|
564
|
-
export type AssistantMessage = {
|
|
565
|
-
id: string;
|
|
566
|
-
sessionID: string;
|
|
567
|
-
role: "assistant";
|
|
568
|
-
time: {
|
|
569
|
-
created: number;
|
|
570
|
-
completed?: number;
|
|
571
|
-
};
|
|
572
|
-
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
|
|
573
|
-
system: Array<string>;
|
|
574
|
-
parentID: string;
|
|
575
|
-
modelID: string;
|
|
576
|
-
providerID: string;
|
|
577
|
-
mode: string;
|
|
578
|
-
path: {
|
|
579
|
-
cwd: string;
|
|
580
|
-
root: string;
|
|
581
|
-
};
|
|
582
|
-
summary?: boolean;
|
|
583
|
-
cost: number;
|
|
584
|
-
tokens: {
|
|
585
|
-
input: number;
|
|
586
|
-
output: number;
|
|
587
|
-
reasoning: number;
|
|
588
|
-
cache: {
|
|
589
|
-
read: number;
|
|
590
|
-
write: number;
|
|
591
|
-
};
|
|
592
|
-
};
|
|
593
|
-
};
|
|
594
|
-
export type Message = UserMessage | AssistantMessage;
|
|
595
|
-
export type TextPart = {
|
|
596
|
-
id: string;
|
|
597
|
-
sessionID: string;
|
|
598
|
-
messageID: string;
|
|
599
|
-
type: "text";
|
|
600
|
-
text: string;
|
|
601
|
-
synthetic?: boolean;
|
|
602
|
-
time?: {
|
|
603
|
-
start: number;
|
|
604
|
-
end?: number;
|
|
605
|
-
};
|
|
606
|
-
metadata?: {
|
|
607
|
-
[key: string]: unknown;
|
|
608
|
-
};
|
|
609
|
-
};
|
|
610
|
-
export type ReasoningPart = {
|
|
611
|
-
id: string;
|
|
612
|
-
sessionID: string;
|
|
613
|
-
messageID: string;
|
|
614
|
-
type: "reasoning";
|
|
615
|
-
text: string;
|
|
616
|
-
metadata?: {
|
|
617
|
-
[key: string]: unknown;
|
|
618
|
-
};
|
|
619
|
-
time: {
|
|
620
|
-
start: number;
|
|
621
|
-
end?: number;
|
|
622
|
-
};
|
|
623
|
-
};
|
|
624
|
-
export type FilePartSourceText = {
|
|
625
|
-
value: string;
|
|
626
|
-
start: number;
|
|
627
|
-
end: number;
|
|
628
|
-
};
|
|
629
|
-
export type FileSource = {
|
|
630
|
-
text: FilePartSourceText;
|
|
631
|
-
type: "file";
|
|
632
|
-
path: string;
|
|
633
|
-
};
|
|
634
|
-
export type Range = {
|
|
635
|
-
start: {
|
|
636
|
-
line: number;
|
|
637
|
-
character: number;
|
|
638
|
-
};
|
|
639
|
-
end: {
|
|
640
|
-
line: number;
|
|
641
|
-
character: number;
|
|
642
|
-
};
|
|
643
|
-
};
|
|
644
|
-
export type SymbolSource = {
|
|
645
|
-
text: FilePartSourceText;
|
|
646
|
-
type: "symbol";
|
|
647
|
-
path: string;
|
|
648
|
-
range: Range;
|
|
649
|
-
name: string;
|
|
650
|
-
kind: number;
|
|
651
|
-
};
|
|
652
|
-
export type FilePartSource = FileSource | SymbolSource;
|
|
653
|
-
export type FilePart = {
|
|
654
|
-
id: string;
|
|
655
|
-
sessionID: string;
|
|
656
|
-
messageID: string;
|
|
657
|
-
type: "file";
|
|
658
|
-
mime: string;
|
|
659
|
-
filename?: string;
|
|
660
|
-
url: string;
|
|
661
|
-
source?: FilePartSource;
|
|
796
|
+
enabled?: boolean;
|
|
797
|
+
/**
|
|
798
|
+
* Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.
|
|
799
|
+
*/
|
|
800
|
+
timeout?: number;
|
|
662
801
|
};
|
|
663
|
-
export type
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
802
|
+
export type McpRemoteConfig = {
|
|
803
|
+
/**
|
|
804
|
+
* Type of MCP server connection
|
|
805
|
+
*/
|
|
806
|
+
type: "remote";
|
|
807
|
+
/**
|
|
808
|
+
* URL of the remote MCP server
|
|
809
|
+
*/
|
|
810
|
+
url: string;
|
|
811
|
+
/**
|
|
812
|
+
* Enable or disable the MCP server on startup
|
|
813
|
+
*/
|
|
814
|
+
enabled?: boolean;
|
|
815
|
+
/**
|
|
816
|
+
* Headers to send with the request
|
|
817
|
+
*/
|
|
818
|
+
headers?: {
|
|
819
|
+
[key: string]: string;
|
|
667
820
|
};
|
|
668
|
-
|
|
821
|
+
/**
|
|
822
|
+
* Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.
|
|
823
|
+
*/
|
|
824
|
+
timeout?: number;
|
|
669
825
|
};
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
826
|
+
/**
|
|
827
|
+
* @deprecated Always uses stretch layout.
|
|
828
|
+
*/
|
|
829
|
+
export type LayoutConfig = "auto" | "stretch";
|
|
830
|
+
export type Config = {
|
|
831
|
+
/**
|
|
832
|
+
* JSON schema reference for configuration validation
|
|
833
|
+
*/
|
|
834
|
+
$schema?: string;
|
|
835
|
+
/**
|
|
836
|
+
* Theme name to use for the interface
|
|
837
|
+
*/
|
|
838
|
+
theme?: string;
|
|
839
|
+
keybinds?: KeybindsConfig;
|
|
840
|
+
/**
|
|
841
|
+
* TUI specific settings
|
|
842
|
+
*/
|
|
843
|
+
tui?: {
|
|
844
|
+
/**
|
|
845
|
+
* TUI scroll speed
|
|
846
|
+
*/
|
|
847
|
+
scroll_speed?: number;
|
|
848
|
+
/**
|
|
849
|
+
* Scroll acceleration settings
|
|
850
|
+
*/
|
|
851
|
+
scroll_acceleration?: {
|
|
852
|
+
/**
|
|
853
|
+
* Enable scroll acceleration
|
|
854
|
+
*/
|
|
855
|
+
enabled: boolean;
|
|
856
|
+
};
|
|
674
857
|
};
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
858
|
+
/**
|
|
859
|
+
* Command configuration, see https://opencode.ai/docs/commands
|
|
860
|
+
*/
|
|
861
|
+
command?: {
|
|
862
|
+
[key: string]: {
|
|
863
|
+
template: string;
|
|
864
|
+
description?: string;
|
|
865
|
+
agent?: string;
|
|
866
|
+
model?: string;
|
|
867
|
+
subtask?: boolean;
|
|
868
|
+
};
|
|
678
869
|
};
|
|
679
|
-
|
|
680
|
-
|
|
870
|
+
watcher?: {
|
|
871
|
+
ignore?: Array<string>;
|
|
681
872
|
};
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
873
|
+
plugin?: Array<string>;
|
|
874
|
+
snapshot?: boolean;
|
|
875
|
+
/**
|
|
876
|
+
* Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
|
|
877
|
+
*/
|
|
878
|
+
share?: "manual" | "auto" | "disabled";
|
|
879
|
+
/**
|
|
880
|
+
* @deprecated Use 'share' field instead. Share newly created sessions automatically
|
|
881
|
+
*/
|
|
882
|
+
autoshare?: boolean;
|
|
883
|
+
/**
|
|
884
|
+
* Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications
|
|
885
|
+
*/
|
|
886
|
+
autoupdate?: boolean | "notify";
|
|
887
|
+
/**
|
|
888
|
+
* Disable providers that are loaded automatically
|
|
889
|
+
*/
|
|
890
|
+
disabled_providers?: Array<string>;
|
|
891
|
+
/**
|
|
892
|
+
* When set, ONLY these providers will be enabled. All other providers will be ignored
|
|
893
|
+
*/
|
|
894
|
+
enabled_providers?: Array<string>;
|
|
895
|
+
/**
|
|
896
|
+
* Model to use in the format of provider/model, eg anthropic/claude-2
|
|
897
|
+
*/
|
|
898
|
+
model?: string;
|
|
899
|
+
/**
|
|
900
|
+
* Small model to use for tasks like title generation in the format of provider/model
|
|
901
|
+
*/
|
|
902
|
+
small_model?: string;
|
|
903
|
+
/**
|
|
904
|
+
* Custom username to display in conversations instead of system username
|
|
905
|
+
*/
|
|
906
|
+
username?: string;
|
|
907
|
+
/**
|
|
908
|
+
* @deprecated Use `agent` field instead.
|
|
909
|
+
*/
|
|
910
|
+
mode?: {
|
|
911
|
+
build?: AgentConfig;
|
|
912
|
+
plan?: AgentConfig;
|
|
913
|
+
[key: string]: AgentConfig | undefined;
|
|
687
914
|
};
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
915
|
+
/**
|
|
916
|
+
* Agent configuration, see https://opencode.ai/docs/agent
|
|
917
|
+
*/
|
|
918
|
+
agent?: {
|
|
919
|
+
plan?: AgentConfig;
|
|
920
|
+
build?: AgentConfig;
|
|
921
|
+
general?: AgentConfig;
|
|
922
|
+
[key: string]: AgentConfig | undefined;
|
|
692
923
|
};
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
924
|
+
/**
|
|
925
|
+
* Custom provider configurations and model overrides
|
|
926
|
+
*/
|
|
927
|
+
provider?: {
|
|
928
|
+
[key: string]: {
|
|
929
|
+
api?: string;
|
|
930
|
+
name?: string;
|
|
931
|
+
env?: Array<string>;
|
|
932
|
+
id?: string;
|
|
933
|
+
npm?: string;
|
|
934
|
+
models?: {
|
|
935
|
+
[key: string]: {
|
|
936
|
+
id?: string;
|
|
937
|
+
name?: string;
|
|
938
|
+
release_date?: string;
|
|
939
|
+
attachment?: boolean;
|
|
940
|
+
reasoning?: boolean;
|
|
941
|
+
temperature?: boolean;
|
|
942
|
+
tool_call?: boolean;
|
|
943
|
+
cost?: {
|
|
944
|
+
input: number;
|
|
945
|
+
output: number;
|
|
946
|
+
cache_read?: number;
|
|
947
|
+
cache_write?: number;
|
|
948
|
+
context_over_200k?: {
|
|
949
|
+
input: number;
|
|
950
|
+
output: number;
|
|
951
|
+
cache_read?: number;
|
|
952
|
+
cache_write?: number;
|
|
953
|
+
};
|
|
954
|
+
};
|
|
955
|
+
limit?: {
|
|
956
|
+
context: number;
|
|
957
|
+
output: number;
|
|
958
|
+
};
|
|
959
|
+
modalities?: {
|
|
960
|
+
input: Array<"text" | "audio" | "image" | "video" | "pdf">;
|
|
961
|
+
output: Array<"text" | "audio" | "image" | "video" | "pdf">;
|
|
962
|
+
};
|
|
963
|
+
experimental?: boolean;
|
|
964
|
+
status?: "alpha" | "beta" | "deprecated";
|
|
965
|
+
options?: {
|
|
966
|
+
[key: string]: unknown;
|
|
967
|
+
};
|
|
968
|
+
headers?: {
|
|
969
|
+
[key: string]: string;
|
|
970
|
+
};
|
|
971
|
+
provider?: {
|
|
972
|
+
npm: string;
|
|
973
|
+
};
|
|
974
|
+
};
|
|
975
|
+
};
|
|
976
|
+
whitelist?: Array<string>;
|
|
977
|
+
blacklist?: Array<string>;
|
|
978
|
+
options?: {
|
|
979
|
+
apiKey?: string;
|
|
980
|
+
baseURL?: string;
|
|
981
|
+
/**
|
|
982
|
+
* GitHub Enterprise URL for copilot authentication
|
|
983
|
+
*/
|
|
984
|
+
enterpriseUrl?: string;
|
|
985
|
+
/**
|
|
986
|
+
* Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
|
|
987
|
+
*/
|
|
988
|
+
timeout?: number | false;
|
|
989
|
+
[key: string]: unknown | string | (number | false) | undefined;
|
|
990
|
+
};
|
|
991
|
+
};
|
|
697
992
|
};
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
[key: string]: unknown;
|
|
993
|
+
/**
|
|
994
|
+
* MCP (Model Context Protocol) server configurations
|
|
995
|
+
*/
|
|
996
|
+
mcp?: {
|
|
997
|
+
[key: string]: McpLocalConfig | McpRemoteConfig;
|
|
704
998
|
};
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
999
|
+
formatter?: false | {
|
|
1000
|
+
[key: string]: {
|
|
1001
|
+
disabled?: boolean;
|
|
1002
|
+
command?: Array<string>;
|
|
1003
|
+
environment?: {
|
|
1004
|
+
[key: string]: string;
|
|
1005
|
+
};
|
|
1006
|
+
extensions?: Array<string>;
|
|
1007
|
+
};
|
|
708
1008
|
};
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
1009
|
+
lsp?: false | {
|
|
1010
|
+
[key: string]: {
|
|
1011
|
+
disabled: true;
|
|
1012
|
+
} | {
|
|
1013
|
+
command: Array<string>;
|
|
1014
|
+
extensions?: Array<string>;
|
|
1015
|
+
disabled?: boolean;
|
|
1016
|
+
env?: {
|
|
1017
|
+
[key: string]: string;
|
|
1018
|
+
};
|
|
1019
|
+
initialization?: {
|
|
1020
|
+
[key: string]: unknown;
|
|
1021
|
+
};
|
|
1022
|
+
};
|
|
712
1023
|
};
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
1024
|
+
/**
|
|
1025
|
+
* Additional instruction files or patterns to include
|
|
1026
|
+
*/
|
|
1027
|
+
instructions?: Array<string>;
|
|
1028
|
+
layout?: LayoutConfig;
|
|
1029
|
+
permission?: {
|
|
1030
|
+
edit?: "ask" | "allow" | "deny";
|
|
1031
|
+
bash?: ("ask" | "allow" | "deny") | {
|
|
1032
|
+
[key: string]: "ask" | "allow" | "deny";
|
|
1033
|
+
};
|
|
1034
|
+
webfetch?: "ask" | "allow" | "deny";
|
|
1035
|
+
doom_loop?: "ask" | "allow" | "deny";
|
|
1036
|
+
external_directory?: "ask" | "allow" | "deny";
|
|
725
1037
|
};
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
1038
|
+
tools?: {
|
|
1039
|
+
[key: string]: boolean;
|
|
1040
|
+
};
|
|
1041
|
+
enterprise?: {
|
|
1042
|
+
/**
|
|
1043
|
+
* Enterprise URL
|
|
1044
|
+
*/
|
|
1045
|
+
url?: string;
|
|
1046
|
+
};
|
|
1047
|
+
experimental?: {
|
|
1048
|
+
hook?: {
|
|
1049
|
+
file_edited?: {
|
|
1050
|
+
[key: string]: Array<{
|
|
1051
|
+
command: Array<string>;
|
|
1052
|
+
environment?: {
|
|
1053
|
+
[key: string]: string;
|
|
1054
|
+
};
|
|
1055
|
+
}>;
|
|
1056
|
+
};
|
|
1057
|
+
session_completed?: Array<{
|
|
1058
|
+
command: Array<string>;
|
|
1059
|
+
environment?: {
|
|
1060
|
+
[key: string]: string;
|
|
1061
|
+
};
|
|
1062
|
+
}>;
|
|
749
1063
|
};
|
|
1064
|
+
/**
|
|
1065
|
+
* Number of retries for chat completions on failure
|
|
1066
|
+
*/
|
|
1067
|
+
chatMaxRetries?: number;
|
|
1068
|
+
disable_paste_summary?: boolean;
|
|
1069
|
+
/**
|
|
1070
|
+
* Enable the batch tool
|
|
1071
|
+
*/
|
|
1072
|
+
batch_tool?: boolean;
|
|
750
1073
|
};
|
|
751
1074
|
};
|
|
752
|
-
export type
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
1075
|
+
export type BadRequestError = {
|
|
1076
|
+
data: unknown;
|
|
1077
|
+
errors: Array<{
|
|
1078
|
+
[key: string]: unknown;
|
|
1079
|
+
}>;
|
|
1080
|
+
success: false;
|
|
758
1081
|
};
|
|
759
|
-
export type
|
|
1082
|
+
export type ToolIds = Array<string>;
|
|
1083
|
+
export type ToolListItem = {
|
|
760
1084
|
id: string;
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
type: "patch";
|
|
764
|
-
hash: string;
|
|
765
|
-
files: Array<string>;
|
|
1085
|
+
description: string;
|
|
1086
|
+
parameters: unknown;
|
|
766
1087
|
};
|
|
767
|
-
export type
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
source?: {
|
|
774
|
-
value: string;
|
|
775
|
-
start: number;
|
|
776
|
-
end: number;
|
|
777
|
-
};
|
|
1088
|
+
export type ToolList = Array<ToolListItem>;
|
|
1089
|
+
export type Path = {
|
|
1090
|
+
state: string;
|
|
1091
|
+
config: string;
|
|
1092
|
+
worktree: string;
|
|
1093
|
+
directory: string;
|
|
778
1094
|
};
|
|
779
|
-
export type
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
type: "retry";
|
|
784
|
-
attempt: number;
|
|
785
|
-
error: ApiError;
|
|
786
|
-
time: {
|
|
787
|
-
created: number;
|
|
1095
|
+
export type NotFoundError = {
|
|
1096
|
+
name: "NotFoundError";
|
|
1097
|
+
data: {
|
|
1098
|
+
message: string;
|
|
788
1099
|
};
|
|
789
1100
|
};
|
|
790
|
-
export type Part = TextPart | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart;
|
|
791
1101
|
export type TextPartInput = {
|
|
792
1102
|
id?: string;
|
|
793
1103
|
type: "text";
|
|
794
1104
|
text: string;
|
|
795
1105
|
synthetic?: boolean;
|
|
1106
|
+
ignored?: boolean;
|
|
796
1107
|
time?: {
|
|
797
1108
|
start: number;
|
|
798
1109
|
end?: number;
|
|
@@ -819,6 +1130,13 @@ export type AgentPartInput = {
|
|
|
819
1130
|
end: number;
|
|
820
1131
|
};
|
|
821
1132
|
};
|
|
1133
|
+
export type SubtaskPartInput = {
|
|
1134
|
+
id?: string;
|
|
1135
|
+
type: "subtask";
|
|
1136
|
+
prompt: string;
|
|
1137
|
+
description: string;
|
|
1138
|
+
agent: string;
|
|
1139
|
+
};
|
|
822
1140
|
export type Command = {
|
|
823
1141
|
name: string;
|
|
824
1142
|
description?: string;
|
|
@@ -840,6 +1158,12 @@ export type Model = {
|
|
|
840
1158
|
output: number;
|
|
841
1159
|
cache_read?: number;
|
|
842
1160
|
cache_write?: number;
|
|
1161
|
+
context_over_200k?: {
|
|
1162
|
+
input: number;
|
|
1163
|
+
output: number;
|
|
1164
|
+
cache_read?: number;
|
|
1165
|
+
cache_write?: number;
|
|
1166
|
+
};
|
|
843
1167
|
};
|
|
844
1168
|
limit: {
|
|
845
1169
|
context: number;
|
|
@@ -871,6 +1195,15 @@ export type Provider = {
|
|
|
871
1195
|
[key: string]: Model;
|
|
872
1196
|
};
|
|
873
1197
|
};
|
|
1198
|
+
export type ProviderAuthMethod = {
|
|
1199
|
+
type: "oauth" | "api";
|
|
1200
|
+
label: string;
|
|
1201
|
+
};
|
|
1202
|
+
export type ProviderAuthAuthorization = {
|
|
1203
|
+
url: string;
|
|
1204
|
+
method: "auto" | "code";
|
|
1205
|
+
instructions: string;
|
|
1206
|
+
};
|
|
874
1207
|
export type Symbol = {
|
|
875
1208
|
name: string;
|
|
876
1209
|
kind: number;
|
|
@@ -920,12 +1253,15 @@ export type Agent = {
|
|
|
920
1253
|
builtIn: boolean;
|
|
921
1254
|
topP?: number;
|
|
922
1255
|
temperature?: number;
|
|
1256
|
+
color?: string;
|
|
923
1257
|
permission: {
|
|
924
1258
|
edit: "ask" | "allow" | "deny";
|
|
925
1259
|
bash: {
|
|
926
1260
|
[key: string]: "ask" | "allow" | "deny";
|
|
927
1261
|
};
|
|
928
1262
|
webfetch?: "ask" | "allow" | "deny";
|
|
1263
|
+
doom_loop?: "ask" | "allow" | "deny";
|
|
1264
|
+
external_directory?: "ask" | "allow" | "deny";
|
|
929
1265
|
};
|
|
930
1266
|
model?: {
|
|
931
1267
|
modelID: string;
|
|
@@ -935,205 +1271,62 @@ export type Agent = {
|
|
|
935
1271
|
tools: {
|
|
936
1272
|
[key: string]: boolean;
|
|
937
1273
|
};
|
|
938
|
-
options: {
|
|
939
|
-
[key: string]: unknown;
|
|
940
|
-
};
|
|
941
|
-
};
|
|
942
|
-
export type McpStatusConnected = {
|
|
943
|
-
status: "connected";
|
|
944
|
-
};
|
|
945
|
-
export type McpStatusDisabled = {
|
|
946
|
-
status: "disabled";
|
|
947
|
-
};
|
|
948
|
-
export type McpStatusFailed = {
|
|
949
|
-
status: "failed";
|
|
950
|
-
error: string;
|
|
951
|
-
};
|
|
952
|
-
export type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed;
|
|
953
|
-
export type LspStatus = {
|
|
954
|
-
id: string;
|
|
955
|
-
name: string;
|
|
956
|
-
root: string;
|
|
957
|
-
status: "connected" | "error";
|
|
958
|
-
};
|
|
959
|
-
export type EventTuiPromptAppend = {
|
|
960
|
-
type: "tui.prompt.append";
|
|
961
|
-
properties: {
|
|
962
|
-
text: string;
|
|
963
|
-
};
|
|
964
|
-
};
|
|
965
|
-
export type EventTuiCommandExecute = {
|
|
966
|
-
type: "tui.command.execute";
|
|
967
|
-
properties: {
|
|
968
|
-
command: ("session.list" | "session.new" | "session.share" | "session.interrupt" | "session.compact" | "session.page.up" | "session.page.down" | "session.half.page.up" | "session.half.page.down" | "session.first" | "session.last" | "prompt.clear" | "prompt.submit" | "agent.cycle") | string;
|
|
969
|
-
};
|
|
970
|
-
};
|
|
971
|
-
export type EventTuiToastShow = {
|
|
972
|
-
type: "tui.toast.show";
|
|
973
|
-
properties: {
|
|
974
|
-
title?: string;
|
|
975
|
-
message: string;
|
|
976
|
-
variant: "info" | "success" | "warning" | "error";
|
|
977
|
-
/**
|
|
978
|
-
* Duration in milliseconds
|
|
979
|
-
*/
|
|
980
|
-
duration?: number;
|
|
981
|
-
};
|
|
982
|
-
};
|
|
983
|
-
export type OAuth = {
|
|
984
|
-
type: "oauth";
|
|
985
|
-
refresh: string;
|
|
986
|
-
access: string;
|
|
987
|
-
expires: number;
|
|
988
|
-
};
|
|
989
|
-
export type ApiAuth = {
|
|
990
|
-
type: "api";
|
|
991
|
-
key: string;
|
|
992
|
-
};
|
|
993
|
-
export type WellKnownAuth = {
|
|
994
|
-
type: "wellknown";
|
|
995
|
-
key: string;
|
|
996
|
-
token: string;
|
|
997
|
-
};
|
|
998
|
-
export type Auth = OAuth | ApiAuth | WellKnownAuth;
|
|
999
|
-
export type EventInstallationUpdated = {
|
|
1000
|
-
type: "installation.updated";
|
|
1001
|
-
properties: {
|
|
1002
|
-
version: string;
|
|
1003
|
-
};
|
|
1004
|
-
};
|
|
1005
|
-
export type EventLspClientDiagnostics = {
|
|
1006
|
-
type: "lsp.client.diagnostics";
|
|
1007
|
-
properties: {
|
|
1008
|
-
serverID: string;
|
|
1009
|
-
path: string;
|
|
1010
|
-
};
|
|
1011
|
-
};
|
|
1012
|
-
export type EventLspUpdated = {
|
|
1013
|
-
type: "lsp.updated";
|
|
1014
|
-
properties: {
|
|
1015
|
-
[key: string]: unknown;
|
|
1016
|
-
};
|
|
1017
|
-
};
|
|
1018
|
-
export type EventMessageUpdated = {
|
|
1019
|
-
type: "message.updated";
|
|
1020
|
-
properties: {
|
|
1021
|
-
info: Message;
|
|
1022
|
-
};
|
|
1023
|
-
};
|
|
1024
|
-
export type EventMessageRemoved = {
|
|
1025
|
-
type: "message.removed";
|
|
1026
|
-
properties: {
|
|
1027
|
-
sessionID: string;
|
|
1028
|
-
messageID: string;
|
|
1029
|
-
};
|
|
1030
|
-
};
|
|
1031
|
-
export type EventMessagePartUpdated = {
|
|
1032
|
-
type: "message.part.updated";
|
|
1033
|
-
properties: {
|
|
1034
|
-
part: Part;
|
|
1035
|
-
delta?: string;
|
|
1036
|
-
};
|
|
1037
|
-
};
|
|
1038
|
-
export type EventMessagePartRemoved = {
|
|
1039
|
-
type: "message.part.removed";
|
|
1040
|
-
properties: {
|
|
1041
|
-
sessionID: string;
|
|
1042
|
-
messageID: string;
|
|
1043
|
-
partID: string;
|
|
1044
|
-
};
|
|
1045
|
-
};
|
|
1046
|
-
export type EventSessionCompacted = {
|
|
1047
|
-
type: "session.compacted";
|
|
1048
|
-
properties: {
|
|
1049
|
-
sessionID: string;
|
|
1050
|
-
};
|
|
1051
|
-
};
|
|
1052
|
-
export type Permission = {
|
|
1053
|
-
id: string;
|
|
1054
|
-
type: string;
|
|
1055
|
-
pattern?: string | Array<string>;
|
|
1056
|
-
sessionID: string;
|
|
1057
|
-
messageID: string;
|
|
1058
|
-
callID?: string;
|
|
1059
|
-
title: string;
|
|
1060
|
-
metadata: {
|
|
1061
|
-
[key: string]: unknown;
|
|
1062
|
-
};
|
|
1063
|
-
time: {
|
|
1064
|
-
created: number;
|
|
1065
|
-
};
|
|
1066
|
-
};
|
|
1067
|
-
export type EventPermissionUpdated = {
|
|
1068
|
-
type: "permission.updated";
|
|
1069
|
-
properties: Permission;
|
|
1070
|
-
};
|
|
1071
|
-
export type EventPermissionReplied = {
|
|
1072
|
-
type: "permission.replied";
|
|
1073
|
-
properties: {
|
|
1074
|
-
sessionID: string;
|
|
1075
|
-
permissionID: string;
|
|
1076
|
-
response: string;
|
|
1077
|
-
};
|
|
1078
|
-
};
|
|
1079
|
-
export type EventFileEdited = {
|
|
1080
|
-
type: "file.edited";
|
|
1081
|
-
properties: {
|
|
1082
|
-
file: string;
|
|
1083
|
-
};
|
|
1084
|
-
};
|
|
1085
|
-
export type EventFileWatcherUpdated = {
|
|
1086
|
-
type: "file.watcher.updated";
|
|
1087
|
-
properties: {
|
|
1088
|
-
file: string;
|
|
1089
|
-
event: "add" | "change" | "unlink";
|
|
1274
|
+
options: {
|
|
1275
|
+
[key: string]: unknown;
|
|
1090
1276
|
};
|
|
1091
1277
|
};
|
|
1092
|
-
export type
|
|
1093
|
-
|
|
1094
|
-
properties: {
|
|
1095
|
-
sessionID: string;
|
|
1096
|
-
todos: Array<Todo>;
|
|
1097
|
-
};
|
|
1278
|
+
export type McpStatusConnected = {
|
|
1279
|
+
status: "connected";
|
|
1098
1280
|
};
|
|
1099
|
-
export type
|
|
1100
|
-
|
|
1101
|
-
properties: {
|
|
1102
|
-
sessionID: string;
|
|
1103
|
-
};
|
|
1281
|
+
export type McpStatusDisabled = {
|
|
1282
|
+
status: "disabled";
|
|
1104
1283
|
};
|
|
1105
|
-
export type
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
info: Session;
|
|
1109
|
-
};
|
|
1284
|
+
export type McpStatusFailed = {
|
|
1285
|
+
status: "failed";
|
|
1286
|
+
error: string;
|
|
1110
1287
|
};
|
|
1111
|
-
export type
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1288
|
+
export type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed;
|
|
1289
|
+
export type LspStatus = {
|
|
1290
|
+
id: string;
|
|
1291
|
+
name: string;
|
|
1292
|
+
root: string;
|
|
1293
|
+
status: "connected" | "error";
|
|
1116
1294
|
};
|
|
1117
|
-
export type
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
};
|
|
1295
|
+
export type FormatterStatus = {
|
|
1296
|
+
name: string;
|
|
1297
|
+
extensions: Array<string>;
|
|
1298
|
+
enabled: boolean;
|
|
1122
1299
|
};
|
|
1123
|
-
export type
|
|
1124
|
-
type: "
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1300
|
+
export type OAuth = {
|
|
1301
|
+
type: "oauth";
|
|
1302
|
+
refresh: string;
|
|
1303
|
+
access: string;
|
|
1304
|
+
expires: number;
|
|
1305
|
+
enterpriseUrl?: string;
|
|
1129
1306
|
};
|
|
1130
|
-
export type
|
|
1131
|
-
type: "
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1307
|
+
export type ApiAuth = {
|
|
1308
|
+
type: "api";
|
|
1309
|
+
key: string;
|
|
1310
|
+
};
|
|
1311
|
+
export type WellKnownAuth = {
|
|
1312
|
+
type: "wellknown";
|
|
1313
|
+
key: string;
|
|
1314
|
+
token: string;
|
|
1315
|
+
};
|
|
1316
|
+
export type Auth = OAuth | ApiAuth | WellKnownAuth;
|
|
1317
|
+
export type GlobalEventData = {
|
|
1318
|
+
body?: never;
|
|
1319
|
+
path?: never;
|
|
1320
|
+
query?: never;
|
|
1321
|
+
url: "/global/event";
|
|
1322
|
+
};
|
|
1323
|
+
export type GlobalEventResponses = {
|
|
1324
|
+
/**
|
|
1325
|
+
* Event stream
|
|
1326
|
+
*/
|
|
1327
|
+
200: GlobalEvent;
|
|
1135
1328
|
};
|
|
1136
|
-
export type
|
|
1329
|
+
export type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses];
|
|
1137
1330
|
export type ProjectListData = {
|
|
1138
1331
|
body?: never;
|
|
1139
1332
|
path?: never;
|
|
@@ -1247,6 +1440,21 @@ export type ToolListResponses = {
|
|
|
1247
1440
|
200: ToolList;
|
|
1248
1441
|
};
|
|
1249
1442
|
export type ToolListResponse = ToolListResponses[keyof ToolListResponses];
|
|
1443
|
+
export type InstanceDisposeData = {
|
|
1444
|
+
body?: never;
|
|
1445
|
+
path?: never;
|
|
1446
|
+
query?: {
|
|
1447
|
+
directory?: string;
|
|
1448
|
+
};
|
|
1449
|
+
url: "/instance/dispose";
|
|
1450
|
+
};
|
|
1451
|
+
export type InstanceDisposeResponses = {
|
|
1452
|
+
/**
|
|
1453
|
+
* Instance disposed
|
|
1454
|
+
*/
|
|
1455
|
+
200: boolean;
|
|
1456
|
+
};
|
|
1457
|
+
export type InstanceDisposeResponse = InstanceDisposeResponses[keyof InstanceDisposeResponses];
|
|
1250
1458
|
export type PathGetData = {
|
|
1251
1459
|
body?: never;
|
|
1252
1460
|
path?: never;
|
|
@@ -1302,6 +1510,30 @@ export type SessionCreateResponses = {
|
|
|
1302
1510
|
200: Session;
|
|
1303
1511
|
};
|
|
1304
1512
|
export type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses];
|
|
1513
|
+
export type SessionStatusData = {
|
|
1514
|
+
body?: never;
|
|
1515
|
+
path?: never;
|
|
1516
|
+
query?: {
|
|
1517
|
+
directory?: string;
|
|
1518
|
+
};
|
|
1519
|
+
url: "/session/status";
|
|
1520
|
+
};
|
|
1521
|
+
export type SessionStatusErrors = {
|
|
1522
|
+
/**
|
|
1523
|
+
* Bad request
|
|
1524
|
+
*/
|
|
1525
|
+
400: BadRequestError;
|
|
1526
|
+
};
|
|
1527
|
+
export type SessionStatusError = SessionStatusErrors[keyof SessionStatusErrors];
|
|
1528
|
+
export type SessionStatusResponses = {
|
|
1529
|
+
/**
|
|
1530
|
+
* Get session status
|
|
1531
|
+
*/
|
|
1532
|
+
200: {
|
|
1533
|
+
[key: string]: SessionStatus;
|
|
1534
|
+
};
|
|
1535
|
+
};
|
|
1536
|
+
export type SessionStatusResponse = SessionStatusResponses[keyof SessionStatusResponses];
|
|
1305
1537
|
export type SessionDeleteData = {
|
|
1306
1538
|
body?: never;
|
|
1307
1539
|
path: {
|
|
@@ -1588,6 +1820,9 @@ export type SessionShareResponse = SessionShareResponses[keyof SessionShareRespo
|
|
|
1588
1820
|
export type SessionDiffData = {
|
|
1589
1821
|
body?: never;
|
|
1590
1822
|
path: {
|
|
1823
|
+
/**
|
|
1824
|
+
* Session ID
|
|
1825
|
+
*/
|
|
1591
1826
|
id: string;
|
|
1592
1827
|
};
|
|
1593
1828
|
query?: {
|
|
@@ -1596,9 +1831,20 @@ export type SessionDiffData = {
|
|
|
1596
1831
|
};
|
|
1597
1832
|
url: "/session/{id}/diff";
|
|
1598
1833
|
};
|
|
1834
|
+
export type SessionDiffErrors = {
|
|
1835
|
+
/**
|
|
1836
|
+
* Bad request
|
|
1837
|
+
*/
|
|
1838
|
+
400: BadRequestError;
|
|
1839
|
+
/**
|
|
1840
|
+
* Not found
|
|
1841
|
+
*/
|
|
1842
|
+
404: NotFoundError;
|
|
1843
|
+
};
|
|
1844
|
+
export type SessionDiffError = SessionDiffErrors[keyof SessionDiffErrors];
|
|
1599
1845
|
export type SessionDiffResponses = {
|
|
1600
1846
|
/**
|
|
1601
|
-
*
|
|
1847
|
+
* List of diffs
|
|
1602
1848
|
*/
|
|
1603
1849
|
200: Array<FileDiff>;
|
|
1604
1850
|
};
|
|
@@ -1647,6 +1893,7 @@ export type SessionMessagesData = {
|
|
|
1647
1893
|
};
|
|
1648
1894
|
query?: {
|
|
1649
1895
|
directory?: string;
|
|
1896
|
+
limit?: number;
|
|
1650
1897
|
};
|
|
1651
1898
|
url: "/session/{id}/message";
|
|
1652
1899
|
};
|
|
@@ -1684,7 +1931,7 @@ export type SessionPromptData = {
|
|
|
1684
1931
|
tools?: {
|
|
1685
1932
|
[key: string]: boolean;
|
|
1686
1933
|
};
|
|
1687
|
-
parts: Array<TextPartInput | FilePartInput | AgentPartInput>;
|
|
1934
|
+
parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
|
|
1688
1935
|
};
|
|
1689
1936
|
path: {
|
|
1690
1937
|
/**
|
|
@@ -1756,6 +2003,50 @@ export type SessionMessageResponses = {
|
|
|
1756
2003
|
};
|
|
1757
2004
|
};
|
|
1758
2005
|
export type SessionMessageResponse = SessionMessageResponses[keyof SessionMessageResponses];
|
|
2006
|
+
export type SessionPromptAsyncData = {
|
|
2007
|
+
body?: {
|
|
2008
|
+
messageID?: string;
|
|
2009
|
+
model?: {
|
|
2010
|
+
providerID: string;
|
|
2011
|
+
modelID: string;
|
|
2012
|
+
};
|
|
2013
|
+
agent?: string;
|
|
2014
|
+
noReply?: boolean;
|
|
2015
|
+
system?: string;
|
|
2016
|
+
tools?: {
|
|
2017
|
+
[key: string]: boolean;
|
|
2018
|
+
};
|
|
2019
|
+
parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
|
|
2020
|
+
};
|
|
2021
|
+
path: {
|
|
2022
|
+
/**
|
|
2023
|
+
* Session ID
|
|
2024
|
+
*/
|
|
2025
|
+
id: string;
|
|
2026
|
+
};
|
|
2027
|
+
query?: {
|
|
2028
|
+
directory?: string;
|
|
2029
|
+
};
|
|
2030
|
+
url: "/session/{id}/prompt_async";
|
|
2031
|
+
};
|
|
2032
|
+
export type SessionPromptAsyncErrors = {
|
|
2033
|
+
/**
|
|
2034
|
+
* Bad request
|
|
2035
|
+
*/
|
|
2036
|
+
400: BadRequestError;
|
|
2037
|
+
/**
|
|
2038
|
+
* Not found
|
|
2039
|
+
*/
|
|
2040
|
+
404: NotFoundError;
|
|
2041
|
+
};
|
|
2042
|
+
export type SessionPromptAsyncError = SessionPromptAsyncErrors[keyof SessionPromptAsyncErrors];
|
|
2043
|
+
export type SessionPromptAsyncResponses = {
|
|
2044
|
+
/**
|
|
2045
|
+
* Prompt accepted
|
|
2046
|
+
*/
|
|
2047
|
+
204: void;
|
|
2048
|
+
};
|
|
2049
|
+
export type SessionPromptAsyncResponse = SessionPromptAsyncResponses[keyof SessionPromptAsyncResponses];
|
|
1759
2050
|
export type SessionCommandData = {
|
|
1760
2051
|
body?: {
|
|
1761
2052
|
messageID?: string;
|
|
@@ -1799,6 +2090,10 @@ export type SessionCommandResponse = SessionCommandResponses[keyof SessionComman
|
|
|
1799
2090
|
export type SessionShellData = {
|
|
1800
2091
|
body?: {
|
|
1801
2092
|
agent: string;
|
|
2093
|
+
model?: {
|
|
2094
|
+
providerID: string;
|
|
2095
|
+
modelID: string;
|
|
2096
|
+
};
|
|
1802
2097
|
command: string;
|
|
1803
2098
|
};
|
|
1804
2099
|
path: {
|
|
@@ -1955,6 +2250,112 @@ export type ConfigProvidersResponses = {
|
|
|
1955
2250
|
};
|
|
1956
2251
|
};
|
|
1957
2252
|
export type ConfigProvidersResponse = ConfigProvidersResponses[keyof ConfigProvidersResponses];
|
|
2253
|
+
export type ProviderListData = {
|
|
2254
|
+
body?: never;
|
|
2255
|
+
path?: never;
|
|
2256
|
+
query?: {
|
|
2257
|
+
directory?: string;
|
|
2258
|
+
};
|
|
2259
|
+
url: "/provider";
|
|
2260
|
+
};
|
|
2261
|
+
export type ProviderListResponses = {
|
|
2262
|
+
/**
|
|
2263
|
+
* List of providers
|
|
2264
|
+
*/
|
|
2265
|
+
200: {
|
|
2266
|
+
all: Array<Provider>;
|
|
2267
|
+
default: {
|
|
2268
|
+
[key: string]: string;
|
|
2269
|
+
};
|
|
2270
|
+
connected: Array<string>;
|
|
2271
|
+
};
|
|
2272
|
+
};
|
|
2273
|
+
export type ProviderListResponse = ProviderListResponses[keyof ProviderListResponses];
|
|
2274
|
+
export type ProviderAuthData = {
|
|
2275
|
+
body?: never;
|
|
2276
|
+
path?: never;
|
|
2277
|
+
query?: {
|
|
2278
|
+
directory?: string;
|
|
2279
|
+
};
|
|
2280
|
+
url: "/provider/auth";
|
|
2281
|
+
};
|
|
2282
|
+
export type ProviderAuthResponses = {
|
|
2283
|
+
/**
|
|
2284
|
+
* Provider auth methods
|
|
2285
|
+
*/
|
|
2286
|
+
200: {
|
|
2287
|
+
[key: string]: Array<ProviderAuthMethod>;
|
|
2288
|
+
};
|
|
2289
|
+
};
|
|
2290
|
+
export type ProviderAuthResponse = ProviderAuthResponses[keyof ProviderAuthResponses];
|
|
2291
|
+
export type ProviderOauthAuthorizeData = {
|
|
2292
|
+
body?: {
|
|
2293
|
+
/**
|
|
2294
|
+
* Auth method index
|
|
2295
|
+
*/
|
|
2296
|
+
method: number;
|
|
2297
|
+
};
|
|
2298
|
+
path: {
|
|
2299
|
+
/**
|
|
2300
|
+
* Provider ID
|
|
2301
|
+
*/
|
|
2302
|
+
id: string;
|
|
2303
|
+
};
|
|
2304
|
+
query?: {
|
|
2305
|
+
directory?: string;
|
|
2306
|
+
};
|
|
2307
|
+
url: "/provider/{id}/oauth/authorize";
|
|
2308
|
+
};
|
|
2309
|
+
export type ProviderOauthAuthorizeErrors = {
|
|
2310
|
+
/**
|
|
2311
|
+
* Bad request
|
|
2312
|
+
*/
|
|
2313
|
+
400: BadRequestError;
|
|
2314
|
+
};
|
|
2315
|
+
export type ProviderOauthAuthorizeError = ProviderOauthAuthorizeErrors[keyof ProviderOauthAuthorizeErrors];
|
|
2316
|
+
export type ProviderOauthAuthorizeResponses = {
|
|
2317
|
+
/**
|
|
2318
|
+
* Authorization URL and method
|
|
2319
|
+
*/
|
|
2320
|
+
200: ProviderAuthAuthorization;
|
|
2321
|
+
};
|
|
2322
|
+
export type ProviderOauthAuthorizeResponse = ProviderOauthAuthorizeResponses[keyof ProviderOauthAuthorizeResponses];
|
|
2323
|
+
export type ProviderOauthCallbackData = {
|
|
2324
|
+
body?: {
|
|
2325
|
+
/**
|
|
2326
|
+
* Auth method index
|
|
2327
|
+
*/
|
|
2328
|
+
method: number;
|
|
2329
|
+
/**
|
|
2330
|
+
* OAuth authorization code
|
|
2331
|
+
*/
|
|
2332
|
+
code?: string;
|
|
2333
|
+
};
|
|
2334
|
+
path: {
|
|
2335
|
+
/**
|
|
2336
|
+
* Provider ID
|
|
2337
|
+
*/
|
|
2338
|
+
id: string;
|
|
2339
|
+
};
|
|
2340
|
+
query?: {
|
|
2341
|
+
directory?: string;
|
|
2342
|
+
};
|
|
2343
|
+
url: "/provider/{id}/oauth/callback";
|
|
2344
|
+
};
|
|
2345
|
+
export type ProviderOauthCallbackErrors = {
|
|
2346
|
+
/**
|
|
2347
|
+
* Bad request
|
|
2348
|
+
*/
|
|
2349
|
+
400: BadRequestError;
|
|
2350
|
+
};
|
|
2351
|
+
export type ProviderOauthCallbackError = ProviderOauthCallbackErrors[keyof ProviderOauthCallbackErrors];
|
|
2352
|
+
export type ProviderOauthCallbackResponses = {
|
|
2353
|
+
/**
|
|
2354
|
+
* OAuth callback processed successfully
|
|
2355
|
+
*/
|
|
2356
|
+
200: boolean;
|
|
2357
|
+
};
|
|
2358
|
+
export type ProviderOauthCallbackResponse = ProviderOauthCallbackResponses[keyof ProviderOauthCallbackResponses];
|
|
1958
2359
|
export type FindTextData = {
|
|
1959
2360
|
body?: never;
|
|
1960
2361
|
path?: never;
|
|
@@ -1993,6 +2394,7 @@ export type FindFilesData = {
|
|
|
1993
2394
|
query: {
|
|
1994
2395
|
directory?: string;
|
|
1995
2396
|
query: string;
|
|
2397
|
+
dirs?: "true" | "false";
|
|
1996
2398
|
};
|
|
1997
2399
|
url: "/find/file";
|
|
1998
2400
|
};
|
|
@@ -2139,6 +2541,33 @@ export type McpStatusResponses = {
|
|
|
2139
2541
|
};
|
|
2140
2542
|
};
|
|
2141
2543
|
export type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses];
|
|
2544
|
+
export type McpAddData = {
|
|
2545
|
+
body?: {
|
|
2546
|
+
name: string;
|
|
2547
|
+
config: McpLocalConfig | McpRemoteConfig;
|
|
2548
|
+
};
|
|
2549
|
+
path?: never;
|
|
2550
|
+
query?: {
|
|
2551
|
+
directory?: string;
|
|
2552
|
+
};
|
|
2553
|
+
url: "/mcp";
|
|
2554
|
+
};
|
|
2555
|
+
export type McpAddErrors = {
|
|
2556
|
+
/**
|
|
2557
|
+
* Bad request
|
|
2558
|
+
*/
|
|
2559
|
+
400: BadRequestError;
|
|
2560
|
+
};
|
|
2561
|
+
export type McpAddError = McpAddErrors[keyof McpAddErrors];
|
|
2562
|
+
export type McpAddResponses = {
|
|
2563
|
+
/**
|
|
2564
|
+
* MCP server added successfully
|
|
2565
|
+
*/
|
|
2566
|
+
200: {
|
|
2567
|
+
[key: string]: McpStatus;
|
|
2568
|
+
};
|
|
2569
|
+
};
|
|
2570
|
+
export type McpAddResponse = McpAddResponses[keyof McpAddResponses];
|
|
2142
2571
|
export type LspStatusData = {
|
|
2143
2572
|
body?: never;
|
|
2144
2573
|
path?: never;
|
|
@@ -2154,6 +2583,21 @@ export type LspStatusResponses = {
|
|
|
2154
2583
|
200: Array<LspStatus>;
|
|
2155
2584
|
};
|
|
2156
2585
|
export type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses];
|
|
2586
|
+
export type FormatterStatusData = {
|
|
2587
|
+
body?: never;
|
|
2588
|
+
path?: never;
|
|
2589
|
+
query?: {
|
|
2590
|
+
directory?: string;
|
|
2591
|
+
};
|
|
2592
|
+
url: "/formatter";
|
|
2593
|
+
};
|
|
2594
|
+
export type FormatterStatusResponses = {
|
|
2595
|
+
/**
|
|
2596
|
+
* Formatter status
|
|
2597
|
+
*/
|
|
2598
|
+
200: Array<FormatterStatus>;
|
|
2599
|
+
};
|
|
2600
|
+
export type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses];
|
|
2157
2601
|
export type TuiAppendPromptData = {
|
|
2158
2602
|
body?: {
|
|
2159
2603
|
text: string;
|