berget 1.4.0 → 2.0.0
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/.env.example +5 -0
- package/AGENTS.md +184 -0
- package/TODO.md +2 -0
- package/blog-post.md +176 -0
- package/dist/index.js +11 -8
- package/dist/package.json +7 -2
- package/dist/src/commands/api-keys.js +4 -2
- package/dist/src/commands/chat.js +21 -11
- package/dist/src/commands/code.js +1424 -0
- package/dist/src/commands/index.js +2 -0
- package/dist/src/constants/command-structure.js +12 -0
- package/dist/src/schemas/opencode-schema.json +1121 -0
- package/dist/src/services/cluster-service.js +1 -1
- package/dist/src/utils/default-api-key.js +2 -2
- package/dist/src/utils/env-manager.js +86 -0
- package/dist/src/utils/error-handler.js +10 -3
- package/dist/src/utils/markdown-renderer.js +4 -4
- package/dist/src/utils/opencode-validator.js +122 -0
- package/dist/src/utils/token-manager.js +2 -2
- package/dist/tests/commands/chat.test.js +20 -18
- package/dist/tests/commands/code.test.js +414 -0
- package/dist/tests/utils/env-manager.test.js +148 -0
- package/dist/tests/utils/opencode-validator.test.js +103 -0
- package/index.ts +67 -32
- package/opencode.json +182 -0
- package/package.json +7 -2
- package/src/client.ts +20 -20
- package/src/commands/api-keys.ts +93 -60
- package/src/commands/auth.ts +4 -2
- package/src/commands/billing.ts +6 -3
- package/src/commands/chat.ts +149 -107
- package/src/commands/clusters.ts +2 -2
- package/src/commands/code.ts +1696 -0
- package/src/commands/index.ts +2 -0
- package/src/commands/models.ts +3 -3
- package/src/commands/users.ts +2 -2
- package/src/constants/command-structure.ts +112 -58
- package/src/schemas/opencode-schema.json +991 -0
- package/src/services/api-key-service.ts +1 -1
- package/src/services/auth-service.ts +27 -25
- package/src/services/chat-service.ts +26 -23
- package/src/services/cluster-service.ts +5 -5
- package/src/services/collaborator-service.ts +3 -3
- package/src/services/flux-service.ts +2 -2
- package/src/services/helm-service.ts +2 -2
- package/src/services/kubectl-service.ts +3 -6
- package/src/types/api.d.ts +1032 -1010
- package/src/types/json.d.ts +3 -3
- package/src/utils/default-api-key.ts +54 -42
- package/src/utils/env-manager.ts +98 -0
- package/src/utils/error-handler.ts +24 -15
- package/src/utils/logger.ts +12 -12
- package/src/utils/markdown-renderer.ts +18 -18
- package/src/utils/opencode-validator.ts +134 -0
- package/src/utils/token-manager.ts +35 -23
- package/tests/commands/chat.test.ts +43 -31
- package/tests/commands/code.test.ts +505 -0
- package/tests/utils/env-manager.test.ts +199 -0
- package/tests/utils/opencode-validator.test.ts +118 -0
- package/tsconfig.json +8 -8
- package/-27b-it +0 -0
- package/examples/README.md +0 -95
- package/examples/ai-review.sh +0 -30
- package/examples/install-global-security-hook.sh +0 -170
- package/examples/security-check.sh +0 -102
- package/examples/smart-commit.sh +0 -26
|
@@ -0,0 +1,991 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"ref": "Config",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"$schema": {
|
|
7
|
+
"description": "JSON schema reference for configuration validation",
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"theme": {
|
|
11
|
+
"description": "Theme name to use for the interface",
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"keybinds": {
|
|
15
|
+
"description": "Custom keybind configurations",
|
|
16
|
+
"ref": "KeybindsConfig",
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"leader": {
|
|
20
|
+
"description": "Leader key for keybind combinations\n\ndefault: `ctrl+x`",
|
|
21
|
+
"default": "ctrl+x",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"examples": ["ctrl+x"]
|
|
24
|
+
},
|
|
25
|
+
"app_exit": {
|
|
26
|
+
"description": "Exit the application\n\ndefault: `ctrl+c,ctrl+d,<leader>q`",
|
|
27
|
+
"default": "ctrl+c,ctrl+d,<leader>q",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"examples": ["ctrl+c,ctrl+d,<leader>q"]
|
|
30
|
+
},
|
|
31
|
+
"editor_open": {
|
|
32
|
+
"description": "Open external editor\n\ndefault: `<leader>e`",
|
|
33
|
+
"default": "<leader>e",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"examples": ["<leader>e"]
|
|
36
|
+
},
|
|
37
|
+
"theme_list": {
|
|
38
|
+
"description": "List available themes\n\ndefault: `<leader>t`",
|
|
39
|
+
"default": "<leader>t",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"examples": ["<leader>t"]
|
|
42
|
+
},
|
|
43
|
+
"sidebar_toggle": {
|
|
44
|
+
"description": "Toggle sidebar\n\ndefault: `<leader>b`",
|
|
45
|
+
"default": "<leader>b",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"examples": ["<leader>b"]
|
|
48
|
+
},
|
|
49
|
+
"status_view": {
|
|
50
|
+
"description": "View status\n\ndefault: `<leader>s`",
|
|
51
|
+
"default": "<leader>s",
|
|
52
|
+
"type": "string",
|
|
53
|
+
"examples": ["<leader>s"]
|
|
54
|
+
},
|
|
55
|
+
"session_export": {
|
|
56
|
+
"description": "Export session to editor\n\ndefault: `<leader>x`",
|
|
57
|
+
"default": "<leader>x",
|
|
58
|
+
"type": "string",
|
|
59
|
+
"examples": ["<leader>x"]
|
|
60
|
+
},
|
|
61
|
+
"session_new": {
|
|
62
|
+
"description": "Create a new session\n\ndefault: `<leader>n`",
|
|
63
|
+
"default": "<leader>n",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"examples": ["<leader>n"]
|
|
66
|
+
},
|
|
67
|
+
"session_list": {
|
|
68
|
+
"description": "List all sessions\n\ndefault: `<leader>l`",
|
|
69
|
+
"default": "<leader>l",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"examples": ["<leader>l"]
|
|
72
|
+
},
|
|
73
|
+
"session_timeline": {
|
|
74
|
+
"description": "Show session timeline\n\ndefault: `<leader>g`",
|
|
75
|
+
"default": "<leader>g",
|
|
76
|
+
"type": "string",
|
|
77
|
+
"examples": ["<leader>g"]
|
|
78
|
+
},
|
|
79
|
+
"session_share": {
|
|
80
|
+
"description": "Share current session\n\ndefault: `none`",
|
|
81
|
+
"default": "none",
|
|
82
|
+
"type": "string",
|
|
83
|
+
"examples": ["none"]
|
|
84
|
+
},
|
|
85
|
+
"session_unshare": {
|
|
86
|
+
"description": "Unshare current session\n\ndefault: `none`",
|
|
87
|
+
"default": "none",
|
|
88
|
+
"type": "string",
|
|
89
|
+
"examples": ["none"]
|
|
90
|
+
},
|
|
91
|
+
"session_interrupt": {
|
|
92
|
+
"description": "Interrupt current session\n\ndefault: `escape`",
|
|
93
|
+
"default": "escape",
|
|
94
|
+
"type": "string",
|
|
95
|
+
"examples": ["escape"]
|
|
96
|
+
},
|
|
97
|
+
"session_compact": {
|
|
98
|
+
"description": "Compact the session\n\ndefault: `<leader>c`",
|
|
99
|
+
"default": "<leader>c",
|
|
100
|
+
"type": "string",
|
|
101
|
+
"examples": ["<leader>c"]
|
|
102
|
+
},
|
|
103
|
+
"messages_page_up": {
|
|
104
|
+
"description": "Scroll messages up by one page\n\ndefault: `pageup`",
|
|
105
|
+
"default": "pageup",
|
|
106
|
+
"type": "string",
|
|
107
|
+
"examples": ["pageup"]
|
|
108
|
+
},
|
|
109
|
+
"messages_page_down": {
|
|
110
|
+
"description": "Scroll messages down by one page\n\ndefault: `pagedown`",
|
|
111
|
+
"default": "pagedown",
|
|
112
|
+
"type": "string",
|
|
113
|
+
"examples": ["pagedown"]
|
|
114
|
+
},
|
|
115
|
+
"messages_half_page_up": {
|
|
116
|
+
"description": "Scroll messages up by half page\n\ndefault: `ctrl+alt+u`",
|
|
117
|
+
"default": "ctrl+alt+u",
|
|
118
|
+
"type": "string",
|
|
119
|
+
"examples": ["ctrl+alt+u"]
|
|
120
|
+
},
|
|
121
|
+
"messages_half_page_down": {
|
|
122
|
+
"description": "Scroll messages down by half page\n\ndefault: `ctrl+alt+d`",
|
|
123
|
+
"default": "ctrl+alt+d",
|
|
124
|
+
"type": "string",
|
|
125
|
+
"examples": ["ctrl+alt+d"]
|
|
126
|
+
},
|
|
127
|
+
"messages_first": {
|
|
128
|
+
"description": "Navigate to first message\n\ndefault: `ctrl+g,home`",
|
|
129
|
+
"default": "ctrl+g,home",
|
|
130
|
+
"type": "string",
|
|
131
|
+
"examples": ["ctrl+g,home"]
|
|
132
|
+
},
|
|
133
|
+
"messages_last": {
|
|
134
|
+
"description": "Navigate to last message\n\ndefault: `ctrl+alt+g,end`",
|
|
135
|
+
"default": "ctrl+alt+g,end",
|
|
136
|
+
"type": "string",
|
|
137
|
+
"examples": ["ctrl+alt+g,end"]
|
|
138
|
+
},
|
|
139
|
+
"messages_copy": {
|
|
140
|
+
"description": "Copy message\n\ndefault: `<leader>y`",
|
|
141
|
+
"default": "<leader>y",
|
|
142
|
+
"type": "string",
|
|
143
|
+
"examples": ["<leader>y"]
|
|
144
|
+
},
|
|
145
|
+
"messages_undo": {
|
|
146
|
+
"description": "Undo message\n\ndefault: `<leader>u`",
|
|
147
|
+
"default": "<leader>u",
|
|
148
|
+
"type": "string",
|
|
149
|
+
"examples": ["<leader>u"]
|
|
150
|
+
},
|
|
151
|
+
"messages_redo": {
|
|
152
|
+
"description": "Redo message\n\ndefault: `<leader>r`",
|
|
153
|
+
"default": "<leader>r",
|
|
154
|
+
"type": "string",
|
|
155
|
+
"examples": ["<leader>r"]
|
|
156
|
+
},
|
|
157
|
+
"messages_toggle_conceal": {
|
|
158
|
+
"description": "Toggle code block concealment in messages\n\ndefault: `<leader>h`",
|
|
159
|
+
"default": "<leader>h",
|
|
160
|
+
"type": "string",
|
|
161
|
+
"examples": ["<leader>h"]
|
|
162
|
+
},
|
|
163
|
+
"model_list": {
|
|
164
|
+
"description": "List available models\n\ndefault: `<leader>m`",
|
|
165
|
+
"default": "<leader>m",
|
|
166
|
+
"type": "string",
|
|
167
|
+
"examples": ["<leader>m"]
|
|
168
|
+
},
|
|
169
|
+
"model_cycle_recent": {
|
|
170
|
+
"description": "Next recently used model\n\ndefault: `f2`",
|
|
171
|
+
"default": "f2",
|
|
172
|
+
"type": "string",
|
|
173
|
+
"examples": ["f2"]
|
|
174
|
+
},
|
|
175
|
+
"model_cycle_recent_reverse": {
|
|
176
|
+
"description": "Previous recently used model\n\ndefault: `shift+f2`",
|
|
177
|
+
"default": "shift+f2",
|
|
178
|
+
"type": "string",
|
|
179
|
+
"examples": ["shift+f2"]
|
|
180
|
+
},
|
|
181
|
+
"command_list": {
|
|
182
|
+
"description": "List available commands\n\ndefault: `ctrl+p`",
|
|
183
|
+
"default": "ctrl+p",
|
|
184
|
+
"type": "string",
|
|
185
|
+
"examples": ["ctrl+p"]
|
|
186
|
+
},
|
|
187
|
+
"agent_list": {
|
|
188
|
+
"description": "List agents\n\ndefault: `<leader>a`",
|
|
189
|
+
"default": "<leader>a",
|
|
190
|
+
"type": "string",
|
|
191
|
+
"examples": ["<leader>a"]
|
|
192
|
+
},
|
|
193
|
+
"agent_cycle": {
|
|
194
|
+
"description": "Next agent\n\ndefault: `tab`",
|
|
195
|
+
"default": "tab",
|
|
196
|
+
"type": "string",
|
|
197
|
+
"examples": ["tab"]
|
|
198
|
+
},
|
|
199
|
+
"agent_cycle_reverse": {
|
|
200
|
+
"description": "Previous agent\n\ndefault: `shift+tab`",
|
|
201
|
+
"default": "shift+tab",
|
|
202
|
+
"type": "string",
|
|
203
|
+
"examples": ["shift+tab"]
|
|
204
|
+
},
|
|
205
|
+
"input_clear": {
|
|
206
|
+
"description": "Clear input field\n\ndefault: `ctrl+c`",
|
|
207
|
+
"default": "ctrl+c",
|
|
208
|
+
"type": "string",
|
|
209
|
+
"examples": ["ctrl+c"]
|
|
210
|
+
},
|
|
211
|
+
"input_forward_delete": {
|
|
212
|
+
"description": "Forward delete\n\ndefault: `ctrl+d`",
|
|
213
|
+
"default": "ctrl+d",
|
|
214
|
+
"type": "string",
|
|
215
|
+
"examples": ["ctrl+d"]
|
|
216
|
+
},
|
|
217
|
+
"input_paste": {
|
|
218
|
+
"description": "Paste from clipboard\n\ndefault: `ctrl+v`",
|
|
219
|
+
"default": "ctrl+v",
|
|
220
|
+
"type": "string",
|
|
221
|
+
"examples": ["ctrl+v"]
|
|
222
|
+
},
|
|
223
|
+
"input_submit": {
|
|
224
|
+
"description": "Submit input\n\ndefault: `return`",
|
|
225
|
+
"default": "return",
|
|
226
|
+
"type": "string",
|
|
227
|
+
"examples": ["return"]
|
|
228
|
+
},
|
|
229
|
+
"input_newline": {
|
|
230
|
+
"description": "Insert newline in input\n\ndefault: `shift+return,ctrl+j`",
|
|
231
|
+
"default": "shift+return,ctrl+j",
|
|
232
|
+
"type": "string",
|
|
233
|
+
"examples": ["shift+return,ctrl+j"]
|
|
234
|
+
},
|
|
235
|
+
"history_previous": {
|
|
236
|
+
"description": "Previous history item\n\ndefault: `up`",
|
|
237
|
+
"default": "up",
|
|
238
|
+
"type": "string",
|
|
239
|
+
"examples": ["up"]
|
|
240
|
+
},
|
|
241
|
+
"history_next": {
|
|
242
|
+
"description": "Next history item\n\ndefault: `down`",
|
|
243
|
+
"default": "down",
|
|
244
|
+
"type": "string",
|
|
245
|
+
"examples": ["down"]
|
|
246
|
+
},
|
|
247
|
+
"session_child_cycle": {
|
|
248
|
+
"description": "Next child session\n\ndefault: `ctrl+right`",
|
|
249
|
+
"default": "ctrl+right",
|
|
250
|
+
"type": "string",
|
|
251
|
+
"examples": ["ctrl+right"]
|
|
252
|
+
},
|
|
253
|
+
"session_child_cycle_reverse": {
|
|
254
|
+
"description": "Previous child session\n\ndefault: `ctrl+left`",
|
|
255
|
+
"default": "ctrl+left",
|
|
256
|
+
"type": "string",
|
|
257
|
+
"examples": ["ctrl+left"]
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"additionalProperties": false
|
|
261
|
+
},
|
|
262
|
+
"tui": {
|
|
263
|
+
"description": "TUI specific settings",
|
|
264
|
+
"type": "object",
|
|
265
|
+
"properties": {
|
|
266
|
+
"scroll_speed": {
|
|
267
|
+
"description": "TUI scroll speed",
|
|
268
|
+
"default": 2,
|
|
269
|
+
"type": "number",
|
|
270
|
+
"minimum": 1
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"additionalProperties": false
|
|
274
|
+
},
|
|
275
|
+
"command": {
|
|
276
|
+
"description": "Command configuration, see https://opencode.ai/docs/commands",
|
|
277
|
+
"type": "object",
|
|
278
|
+
"propertyNames": {
|
|
279
|
+
"type": "string"
|
|
280
|
+
},
|
|
281
|
+
"additionalProperties": {
|
|
282
|
+
"type": "object",
|
|
283
|
+
"properties": {
|
|
284
|
+
"template": {
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
287
|
+
"description": {
|
|
288
|
+
"type": "string"
|
|
289
|
+
},
|
|
290
|
+
"agent": {
|
|
291
|
+
"type": "string"
|
|
292
|
+
},
|
|
293
|
+
"model": {
|
|
294
|
+
"type": "string"
|
|
295
|
+
},
|
|
296
|
+
"subtask": {
|
|
297
|
+
"type": "boolean"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"required": ["template"],
|
|
301
|
+
"additionalProperties": false
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"watcher": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"properties": {
|
|
307
|
+
"ignore": {
|
|
308
|
+
"type": "array",
|
|
309
|
+
"items": {
|
|
310
|
+
"type": "string"
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"additionalProperties": false
|
|
315
|
+
},
|
|
316
|
+
"plugin": {
|
|
317
|
+
"type": "array",
|
|
318
|
+
"items": {
|
|
319
|
+
"type": "string"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"snapshot": {
|
|
323
|
+
"type": "boolean"
|
|
324
|
+
},
|
|
325
|
+
"share": {
|
|
326
|
+
"description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
|
|
327
|
+
"type": "string",
|
|
328
|
+
"enum": ["manual", "auto", "disabled"]
|
|
329
|
+
},
|
|
330
|
+
"autoshare": {
|
|
331
|
+
"description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
|
|
332
|
+
"type": "boolean"
|
|
333
|
+
},
|
|
334
|
+
"autoupdate": {
|
|
335
|
+
"description": "Automatically update to the latest version",
|
|
336
|
+
"type": "boolean"
|
|
337
|
+
},
|
|
338
|
+
"disabled_providers": {
|
|
339
|
+
"description": "Disable providers that are loaded automatically",
|
|
340
|
+
"type": "array",
|
|
341
|
+
"items": {
|
|
342
|
+
"type": "string"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"model": {
|
|
346
|
+
"description": "Model to use in the format of provider/model, eg anthropic/claude-2",
|
|
347
|
+
"type": "string"
|
|
348
|
+
},
|
|
349
|
+
"small_model": {
|
|
350
|
+
"description": "Small model to use for tasks like title generation in the format of provider/model",
|
|
351
|
+
"type": "string"
|
|
352
|
+
},
|
|
353
|
+
"username": {
|
|
354
|
+
"description": "Custom username to display in conversations instead of system username",
|
|
355
|
+
"type": "string"
|
|
356
|
+
},
|
|
357
|
+
"mode": {
|
|
358
|
+
"description": "@deprecated Use `agent` field instead.",
|
|
359
|
+
"type": "object",
|
|
360
|
+
"additionalProperties": {
|
|
361
|
+
"ref": "AgentConfig",
|
|
362
|
+
"type": "object",
|
|
363
|
+
"properties": {
|
|
364
|
+
"model": {
|
|
365
|
+
"type": "string"
|
|
366
|
+
},
|
|
367
|
+
"temperature": {
|
|
368
|
+
"type": "number"
|
|
369
|
+
},
|
|
370
|
+
"top_p": {
|
|
371
|
+
"type": "number"
|
|
372
|
+
},
|
|
373
|
+
"prompt": {
|
|
374
|
+
"type": "string"
|
|
375
|
+
},
|
|
376
|
+
"tools": {
|
|
377
|
+
"type": "object",
|
|
378
|
+
"propertyNames": {
|
|
379
|
+
"type": "string"
|
|
380
|
+
},
|
|
381
|
+
"additionalProperties": {
|
|
382
|
+
"type": "boolean"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"disable": {
|
|
386
|
+
"type": "boolean"
|
|
387
|
+
},
|
|
388
|
+
"description": {
|
|
389
|
+
"description": "Description of when to use the agent",
|
|
390
|
+
"type": "string"
|
|
391
|
+
},
|
|
392
|
+
"mode": {
|
|
393
|
+
"enum": ["subagent", "primary", "all"]
|
|
394
|
+
},
|
|
395
|
+
"permission": {
|
|
396
|
+
"type": "object",
|
|
397
|
+
"properties": {
|
|
398
|
+
"edit": {
|
|
399
|
+
"enum": ["ask", "allow", "deny"]
|
|
400
|
+
},
|
|
401
|
+
"bash": {
|
|
402
|
+
"anyOf": [
|
|
403
|
+
{
|
|
404
|
+
"enum": ["ask", "allow", "deny"]
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"type": "object",
|
|
408
|
+
"propertyNames": {
|
|
409
|
+
"type": "string"
|
|
410
|
+
},
|
|
411
|
+
"additionalProperties": {
|
|
412
|
+
"enum": ["ask", "allow", "deny"]
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
"webfetch": {
|
|
418
|
+
"enum": ["ask", "allow", "deny"]
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"additionalProperties": false
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
"additionalProperties": true
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"agent": {
|
|
428
|
+
"description": "Agent configuration, see https://opencode.ai/docs/agent",
|
|
429
|
+
"type": "object",
|
|
430
|
+
"additionalProperties": {
|
|
431
|
+
"ref": "AgentConfig",
|
|
432
|
+
"type": "object",
|
|
433
|
+
"properties": {
|
|
434
|
+
"model": {
|
|
435
|
+
"type": "string"
|
|
436
|
+
},
|
|
437
|
+
"temperature": {
|
|
438
|
+
"type": "number"
|
|
439
|
+
},
|
|
440
|
+
"top_p": {
|
|
441
|
+
"type": "number"
|
|
442
|
+
},
|
|
443
|
+
"prompt": {
|
|
444
|
+
"type": "string"
|
|
445
|
+
},
|
|
446
|
+
"tools": {
|
|
447
|
+
"type": "object",
|
|
448
|
+
"propertyNames": {
|
|
449
|
+
"type": "string"
|
|
450
|
+
},
|
|
451
|
+
"additionalProperties": {
|
|
452
|
+
"type": "boolean"
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"disable": {
|
|
456
|
+
"type": "boolean"
|
|
457
|
+
},
|
|
458
|
+
"description": {
|
|
459
|
+
"description": "Description of when to use the agent",
|
|
460
|
+
"type": "string"
|
|
461
|
+
},
|
|
462
|
+
"mode": {
|
|
463
|
+
"enum": ["subagent", "primary", "all"]
|
|
464
|
+
},
|
|
465
|
+
"permission": {
|
|
466
|
+
"type": "object",
|
|
467
|
+
"properties": {
|
|
468
|
+
"edit": {
|
|
469
|
+
"enum": ["ask", "allow", "deny"]
|
|
470
|
+
},
|
|
471
|
+
"bash": {
|
|
472
|
+
"anyOf": [
|
|
473
|
+
{
|
|
474
|
+
"enum": ["ask", "allow", "deny"]
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"type": "object",
|
|
478
|
+
"propertyNames": {
|
|
479
|
+
"type": "string"
|
|
480
|
+
},
|
|
481
|
+
"additionalProperties": {
|
|
482
|
+
"enum": ["ask", "allow", "deny"]
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
]
|
|
486
|
+
},
|
|
487
|
+
"webfetch": {
|
|
488
|
+
"enum": ["ask", "allow", "deny"]
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
"additionalProperties": false
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"additionalProperties": true
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"provider": {
|
|
498
|
+
"description": "Custom provider configurations and model overrides",
|
|
499
|
+
"type": "object",
|
|
500
|
+
"propertyNames": {
|
|
501
|
+
"type": "string"
|
|
502
|
+
},
|
|
503
|
+
"additionalProperties": {
|
|
504
|
+
"type": "object",
|
|
505
|
+
"properties": {
|
|
506
|
+
"api": {
|
|
507
|
+
"type": "string"
|
|
508
|
+
},
|
|
509
|
+
"name": {
|
|
510
|
+
"type": "string"
|
|
511
|
+
},
|
|
512
|
+
"env": {
|
|
513
|
+
"type": "array",
|
|
514
|
+
"items": {
|
|
515
|
+
"type": "string"
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"id": {
|
|
519
|
+
"type": "string"
|
|
520
|
+
},
|
|
521
|
+
"npm": {
|
|
522
|
+
"type": "string"
|
|
523
|
+
},
|
|
524
|
+
"models": {
|
|
525
|
+
"type": "object",
|
|
526
|
+
"propertyNames": {
|
|
527
|
+
"type": "string"
|
|
528
|
+
},
|
|
529
|
+
"additionalProperties": {
|
|
530
|
+
"type": "object",
|
|
531
|
+
"properties": {
|
|
532
|
+
"id": {
|
|
533
|
+
"type": "string"
|
|
534
|
+
},
|
|
535
|
+
"name": {
|
|
536
|
+
"type": "string"
|
|
537
|
+
},
|
|
538
|
+
"release_date": {
|
|
539
|
+
"type": "string"
|
|
540
|
+
},
|
|
541
|
+
"attachment": {
|
|
542
|
+
"type": "boolean"
|
|
543
|
+
},
|
|
544
|
+
"reasoning": {
|
|
545
|
+
"type": "boolean"
|
|
546
|
+
},
|
|
547
|
+
"temperature": {
|
|
548
|
+
"type": "boolean"
|
|
549
|
+
},
|
|
550
|
+
"tool_call": {
|
|
551
|
+
"type": "boolean"
|
|
552
|
+
},
|
|
553
|
+
"cost": {
|
|
554
|
+
"type": "object",
|
|
555
|
+
"properties": {
|
|
556
|
+
"input": {
|
|
557
|
+
"type": "number"
|
|
558
|
+
},
|
|
559
|
+
"output": {
|
|
560
|
+
"type": "number"
|
|
561
|
+
},
|
|
562
|
+
"cache_read": {
|
|
563
|
+
"type": "number"
|
|
564
|
+
},
|
|
565
|
+
"cache_write": {
|
|
566
|
+
"type": "number"
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"required": ["input", "output"],
|
|
570
|
+
"additionalProperties": false
|
|
571
|
+
},
|
|
572
|
+
"limit": {
|
|
573
|
+
"type": "object",
|
|
574
|
+
"properties": {
|
|
575
|
+
"context": {
|
|
576
|
+
"type": "number"
|
|
577
|
+
},
|
|
578
|
+
"output": {
|
|
579
|
+
"type": "number"
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
"required": ["context", "output"],
|
|
583
|
+
"additionalProperties": false
|
|
584
|
+
},
|
|
585
|
+
"modalities": {
|
|
586
|
+
"type": "object",
|
|
587
|
+
"properties": {
|
|
588
|
+
"input": {
|
|
589
|
+
"type": "array",
|
|
590
|
+
"items": {
|
|
591
|
+
"type": "string",
|
|
592
|
+
"enum": ["text", "audio", "image", "video", "pdf"]
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
"output": {
|
|
596
|
+
"type": "array",
|
|
597
|
+
"items": {
|
|
598
|
+
"type": "string",
|
|
599
|
+
"enum": ["text", "audio", "image", "video", "pdf"]
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
"required": ["input", "output"],
|
|
604
|
+
"additionalProperties": false
|
|
605
|
+
},
|
|
606
|
+
"experimental": {
|
|
607
|
+
"type": "boolean"
|
|
608
|
+
},
|
|
609
|
+
"status": {
|
|
610
|
+
"type": "string",
|
|
611
|
+
"enum": ["alpha", "beta", "deprecated"]
|
|
612
|
+
},
|
|
613
|
+
"options": {
|
|
614
|
+
"type": "object",
|
|
615
|
+
"propertyNames": {
|
|
616
|
+
"type": "string"
|
|
617
|
+
},
|
|
618
|
+
"additionalProperties": {}
|
|
619
|
+
},
|
|
620
|
+
"headers": {
|
|
621
|
+
"type": "object",
|
|
622
|
+
"propertyNames": {
|
|
623
|
+
"type": "string"
|
|
624
|
+
},
|
|
625
|
+
"additionalProperties": {
|
|
626
|
+
"type": "string"
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"provider": {
|
|
630
|
+
"type": "object",
|
|
631
|
+
"properties": {
|
|
632
|
+
"npm": {
|
|
633
|
+
"type": "string"
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
"required": ["npm"],
|
|
637
|
+
"additionalProperties": false
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
"additionalProperties": false
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
"options": {
|
|
644
|
+
"type": "object",
|
|
645
|
+
"properties": {
|
|
646
|
+
"apiKey": {
|
|
647
|
+
"type": "string"
|
|
648
|
+
},
|
|
649
|
+
"baseURL": {
|
|
650
|
+
"type": "string"
|
|
651
|
+
},
|
|
652
|
+
"enterpriseUrl": {
|
|
653
|
+
"description": "GitHub Enterprise URL for copilot authentication",
|
|
654
|
+
"type": "string"
|
|
655
|
+
},
|
|
656
|
+
"timeout": {
|
|
657
|
+
"description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
|
|
658
|
+
"anyOf": [
|
|
659
|
+
{
|
|
660
|
+
"description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
|
|
661
|
+
"type": "integer",
|
|
662
|
+
"exclusiveMinimum": 0,
|
|
663
|
+
"maximum": 9007199254740991
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"description": "Disable timeout for this provider entirely.",
|
|
667
|
+
"type": "boolean",
|
|
668
|
+
"const": false
|
|
669
|
+
}
|
|
670
|
+
]
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"additionalProperties": {}
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
"additionalProperties": false
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
"mcp": {
|
|
680
|
+
"description": "MCP (Model Context Protocol) server configurations",
|
|
681
|
+
"type": "object",
|
|
682
|
+
"propertyNames": {
|
|
683
|
+
"type": "string"
|
|
684
|
+
},
|
|
685
|
+
"additionalProperties": {
|
|
686
|
+
"anyOf": [
|
|
687
|
+
{
|
|
688
|
+
"ref": "McpLocalConfig",
|
|
689
|
+
"type": "object",
|
|
690
|
+
"properties": {
|
|
691
|
+
"type": {
|
|
692
|
+
"description": "Type of MCP server connection",
|
|
693
|
+
"type": "string",
|
|
694
|
+
"const": "local"
|
|
695
|
+
},
|
|
696
|
+
"command": {
|
|
697
|
+
"description": "Command and arguments to run the MCP server",
|
|
698
|
+
"type": "array",
|
|
699
|
+
"items": {
|
|
700
|
+
"type": "string"
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
"environment": {
|
|
704
|
+
"description": "Environment variables to set when running the MCP server",
|
|
705
|
+
"type": "object",
|
|
706
|
+
"propertyNames": {
|
|
707
|
+
"type": "string"
|
|
708
|
+
},
|
|
709
|
+
"additionalProperties": {
|
|
710
|
+
"type": "string"
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"enabled": {
|
|
714
|
+
"description": "Enable or disable the MCP server on startup",
|
|
715
|
+
"type": "boolean"
|
|
716
|
+
},
|
|
717
|
+
"timeout": {
|
|
718
|
+
"description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
|
|
719
|
+
"type": "integer",
|
|
720
|
+
"exclusiveMinimum": 0,
|
|
721
|
+
"maximum": 9007199254740991
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
"required": ["type", "command"],
|
|
725
|
+
"additionalProperties": false
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"ref": "McpRemoteConfig",
|
|
729
|
+
"type": "object",
|
|
730
|
+
"properties": {
|
|
731
|
+
"type": {
|
|
732
|
+
"description": "Type of MCP server connection",
|
|
733
|
+
"type": "string",
|
|
734
|
+
"const": "remote"
|
|
735
|
+
},
|
|
736
|
+
"url": {
|
|
737
|
+
"description": "URL of the remote MCP server",
|
|
738
|
+
"type": "string"
|
|
739
|
+
},
|
|
740
|
+
"enabled": {
|
|
741
|
+
"description": "Enable or disable the MCP server on startup",
|
|
742
|
+
"type": "boolean"
|
|
743
|
+
},
|
|
744
|
+
"headers": {
|
|
745
|
+
"description": "Headers to send with the request",
|
|
746
|
+
"type": "object",
|
|
747
|
+
"propertyNames": {
|
|
748
|
+
"type": "string"
|
|
749
|
+
},
|
|
750
|
+
"additionalProperties": {
|
|
751
|
+
"type": "string"
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
"timeout": {
|
|
755
|
+
"description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
|
|
756
|
+
"type": "integer",
|
|
757
|
+
"exclusiveMinimum": 0,
|
|
758
|
+
"maximum": 9007199254740991
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
"required": ["type", "url"],
|
|
762
|
+
"additionalProperties": false
|
|
763
|
+
}
|
|
764
|
+
]
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
"formatter": {
|
|
768
|
+
"type": "object",
|
|
769
|
+
"propertyNames": {
|
|
770
|
+
"type": "string"
|
|
771
|
+
},
|
|
772
|
+
"additionalProperties": {
|
|
773
|
+
"type": "object",
|
|
774
|
+
"properties": {
|
|
775
|
+
"disabled": {
|
|
776
|
+
"type": "boolean"
|
|
777
|
+
},
|
|
778
|
+
"command": {
|
|
779
|
+
"type": "array",
|
|
780
|
+
"items": {
|
|
781
|
+
"type": "string"
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
"environment": {
|
|
785
|
+
"type": "object",
|
|
786
|
+
"propertyNames": {
|
|
787
|
+
"type": "string"
|
|
788
|
+
},
|
|
789
|
+
"additionalProperties": {
|
|
790
|
+
"type": "string"
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
"extensions": {
|
|
794
|
+
"type": "array",
|
|
795
|
+
"items": {
|
|
796
|
+
"type": "string"
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
"additionalProperties": false
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"lsp": {
|
|
804
|
+
"type": "object",
|
|
805
|
+
"propertyNames": {
|
|
806
|
+
"type": "string"
|
|
807
|
+
},
|
|
808
|
+
"additionalProperties": {
|
|
809
|
+
"anyOf": [
|
|
810
|
+
{
|
|
811
|
+
"type": "object",
|
|
812
|
+
"properties": {
|
|
813
|
+
"disabled": {
|
|
814
|
+
"type": "boolean",
|
|
815
|
+
"const": true
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
"required": ["disabled"],
|
|
819
|
+
"additionalProperties": false
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"type": "object",
|
|
823
|
+
"properties": {
|
|
824
|
+
"command": {
|
|
825
|
+
"type": "array",
|
|
826
|
+
"items": {
|
|
827
|
+
"type": "string"
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
"extensions": {
|
|
831
|
+
"type": "array",
|
|
832
|
+
"items": {
|
|
833
|
+
"type": "string"
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
"disabled": {
|
|
837
|
+
"type": "boolean"
|
|
838
|
+
},
|
|
839
|
+
"env": {
|
|
840
|
+
"type": "object",
|
|
841
|
+
"propertyNames": {
|
|
842
|
+
"type": "string"
|
|
843
|
+
},
|
|
844
|
+
"additionalProperties": {
|
|
845
|
+
"type": "string"
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
"initialization": {
|
|
849
|
+
"type": "object",
|
|
850
|
+
"propertyNames": {
|
|
851
|
+
"type": "string"
|
|
852
|
+
},
|
|
853
|
+
"additionalProperties": {}
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
"required": ["command"],
|
|
857
|
+
"additionalProperties": false
|
|
858
|
+
}
|
|
859
|
+
]
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
"instructions": {
|
|
863
|
+
"description": "Additional instruction files or patterns to include",
|
|
864
|
+
"type": "array",
|
|
865
|
+
"items": {
|
|
866
|
+
"type": "string"
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
"layout": {
|
|
870
|
+
"description": "@deprecated Always uses stretch layout.",
|
|
871
|
+
"ref": "LayoutConfig",
|
|
872
|
+
"type": "string",
|
|
873
|
+
"enum": ["auto", "stretch"]
|
|
874
|
+
},
|
|
875
|
+
"permission": {
|
|
876
|
+
"type": "object",
|
|
877
|
+
"properties": {
|
|
878
|
+
"edit": {
|
|
879
|
+
"enum": ["ask", "allow", "deny"]
|
|
880
|
+
},
|
|
881
|
+
"bash": {
|
|
882
|
+
"anyOf": [
|
|
883
|
+
{
|
|
884
|
+
"enum": ["ask", "allow", "deny"]
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"type": "object",
|
|
888
|
+
"propertyNames": {
|
|
889
|
+
"type": "string"
|
|
890
|
+
},
|
|
891
|
+
"additionalProperties": {
|
|
892
|
+
"enum": ["ask", "allow", "deny"]
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
]
|
|
896
|
+
},
|
|
897
|
+
"webfetch": {
|
|
898
|
+
"enum": ["ask", "allow", "deny"]
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
"additionalProperties": false
|
|
902
|
+
},
|
|
903
|
+
"tools": {
|
|
904
|
+
"type": "object",
|
|
905
|
+
"propertyNames": {
|
|
906
|
+
"type": "string"
|
|
907
|
+
},
|
|
908
|
+
"additionalProperties": {
|
|
909
|
+
"type": "boolean"
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
"experimental": {
|
|
913
|
+
"type": "object",
|
|
914
|
+
"properties": {
|
|
915
|
+
"hook": {
|
|
916
|
+
"type": "object",
|
|
917
|
+
"properties": {
|
|
918
|
+
"file_edited": {
|
|
919
|
+
"type": "object",
|
|
920
|
+
"propertyNames": {
|
|
921
|
+
"type": "string"
|
|
922
|
+
},
|
|
923
|
+
"additionalProperties": {
|
|
924
|
+
"type": "array",
|
|
925
|
+
"items": {
|
|
926
|
+
"type": "object",
|
|
927
|
+
"properties": {
|
|
928
|
+
"command": {
|
|
929
|
+
"type": "array",
|
|
930
|
+
"items": {
|
|
931
|
+
"type": "string"
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
"environment": {
|
|
935
|
+
"type": "object",
|
|
936
|
+
"propertyNames": {
|
|
937
|
+
"type": "string"
|
|
938
|
+
},
|
|
939
|
+
"additionalProperties": {
|
|
940
|
+
"type": "string"
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
"required": ["command"],
|
|
945
|
+
"additionalProperties": false
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
"session_completed": {
|
|
950
|
+
"type": "array",
|
|
951
|
+
"items": {
|
|
952
|
+
"type": "object",
|
|
953
|
+
"properties": {
|
|
954
|
+
"command": {
|
|
955
|
+
"type": "array",
|
|
956
|
+
"items": {
|
|
957
|
+
"type": "string"
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
"environment": {
|
|
961
|
+
"type": "object",
|
|
962
|
+
"propertyNames": {
|
|
963
|
+
"type": "string"
|
|
964
|
+
},
|
|
965
|
+
"additionalProperties": {
|
|
966
|
+
"type": "string"
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
"required": ["command"],
|
|
971
|
+
"additionalProperties": false
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
},
|
|
975
|
+
"additionalProperties": false
|
|
976
|
+
},
|
|
977
|
+
"chatMaxRetries": {
|
|
978
|
+
"description": "Number of retries for chat completions on failure",
|
|
979
|
+
"type": "number"
|
|
980
|
+
},
|
|
981
|
+
"disable_paste_summary": {
|
|
982
|
+
"type": "boolean"
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
"additionalProperties": false
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
"additionalProperties": false,
|
|
989
|
+
"allowComments": true,
|
|
990
|
+
"allowTrailingCommas": true
|
|
991
|
+
}
|