-
-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathconfig.json
More file actions
1131 lines (1131 loc) · 48.3 KB
/
config.json
File metadata and controls
1131 lines (1131 loc) · 48.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://eca.dev/config.json",
"title": "ECA Configuration",
"description": "Configuration schema for ECA (Editor Code Assistant). See https://eca.dev/config/introduction for full documentation.",
"markdownDescription": "Configuration schema for ECA (Editor Code Assistant). See https://eca.dev/config/introduction for full documentation.",
"type": "object",
"additionalProperties": false,
"allowComments": true,
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema reference for editor validation support.",
"markdownDescription": "JSON Schema reference for editor validation support."
},
"providers": {
"type": "object",
"description": "LLM provider configurations. Each key is the provider name.",
"markdownDescription": "LLM provider configurations. Each key is the provider name.",
"additionalProperties": {
"$ref": "#/definitions/provider"
}
},
"defaultModel": {
"type": [
"string",
"null"
],
"description": "Default model in format 'provider/model'. When null, ECA decides the default model.",
"markdownDescription": "Default model in format 'provider/model'. When null, ECA decides the default model.",
"examples": [
"anthropic/claude-sonnet-4-6",
"openai/gpt-5.2"
]
},
"defaultAgent": {
"type": "string",
"description": "The default agent to use for new chats.",
"markdownDescription": "The default agent to use for new chats.",
"default": "code",
"examples": ["code", "plan"]
},
"chatRetentionDays": {
"type": "integer",
"description": "Number of days to keep old chats and tool call output cache before cleanup. Set to 0 to disable cleanup entirely.",
"markdownDescription": "Number of days to keep old chats and tool call output cache before cleanup. Set to `0` to disable cleanup entirely.",
"default": 14
},
"agent": {
"type": "object",
"description": "Named agent configurations for different workflows.",
"markdownDescription": "Named agent configurations for different workflows.",
"additionalProperties": {
"$ref": "#/definitions/agent"
}
},
"defaultBehavior": {
"type": "string",
"description": "Deprecated: use 'defaultAgent' instead. Backward compatible alias.",
"markdownDescription": "Deprecated: use 'defaultAgent' instead. Backward compatible alias.",
"examples": ["code", "plan"]
},
"behavior": {
"type": "object",
"description": "Deprecated: use 'agent' instead. Backward compatible alias.",
"markdownDescription": "Deprecated: use 'agent' instead. Backward compatible alias.",
"additionalProperties": {
"$ref": "#/definitions/agent"
}
},
"hooks": {
"type": "object",
"description": "Shell actions that run before or after specific events.",
"markdownDescription": "Shell actions that run before or after specific events.",
"additionalProperties": {
"$ref": "#/definitions/hook"
}
},
"rules": {
"type": "array",
"description": "Rules are contexts passed to the LLM during a prompt, useful to tune prompts or LLM responses.",
"markdownDescription": "Rules are contexts passed to the LLM during a prompt, useful to tune prompts or LLM responses.",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to a rule file or directory (relative to workspace root or absolute). Directories are loaded recursively.",
"markdownDescription": "Path to a rule file or directory (relative to workspace root or absolute). Directories are loaded recursively."
}
},
"required": [
"path"
],
"additionalProperties": false
}
},
"disabledTools": {
"type": "array",
"description": "List of tool names to disable globally.",
"markdownDescription": "List of tool names to disable globally.",
"items": {
"type": "string"
}
},
"commands": {
"type": "array",
"description": "Custom command prompt files.",
"markdownDescription": "Custom command prompt files.",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to a command prompt markdown file or directory. Directories load markdown files recursively.",
"markdownDescription": "Path to a command prompt markdown file or directory. Directories load markdown files recursively."
}
},
"required": [
"path"
],
"additionalProperties": false
}
},
"skills": {
"type": "array",
"description": "Skill files or directories to load.",
"markdownDescription": "Skill files or directories to load.",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to a skill file or directory. Directories load SKILL.md files recursively.",
"markdownDescription": "Path to a skill file or directory. Directories load SKILL.md files recursively."
}
},
"required": [
"path"
],
"additionalProperties": false
}
},
"customTools": {
"type": "object",
"description": "User-defined command-line tools the LLM can use.",
"markdownDescription": "User-defined command-line tools the LLM can use.",
"additionalProperties": {
"$ref": "#/definitions/customTool"
}
},
"toolCall": {
"$ref": "#/definitions/toolCallConfig"
},
"mcpTimeoutSeconds": {
"type": "integer",
"description": "Timeout in seconds for MCP server operations.",
"markdownDescription": "Timeout in seconds for MCP server operations.",
"default": 60
},
"lspTimeoutSeconds": {
"type": "integer",
"description": "Timeout in seconds for LSP operations.",
"markdownDescription": "Timeout in seconds for LSP operations.",
"default": 30
},
"streamIdleTimeoutSeconds": {
"type": "integer",
"description": "Timeout in seconds to wait without receiving data before considering a LLM stream stalled.",
"markdownDescription": "Timeout in seconds to wait without receiving data before considering a LLM stream stalled.",
"default": 120
},
"mcpServers": {
"type": "object",
"description": "MCP (Model Context Protocol) server configurations.",
"markdownDescription": "MCP (Model Context Protocol) server configurations.",
"additionalProperties": {
"$ref": "#/definitions/mcpServer"
}
},
"prompts": {
"$ref": "#/definitions/prompts"
},
"welcomeMessage": {
"type": "string",
"description": "Custom welcome message shown when ECA starts.",
"markdownDescription": "Custom welcome message shown when ECA starts."
},
"autoCompactPercentage": {
"type": "integer",
"description": "Context window usage percentage at which auto-compact triggers.",
"markdownDescription": "Context window usage percentage at which auto-compact triggers.",
"minimum": 0,
"maximum": 100,
"default": 75
},
"index": {
"type": "object",
"description": "Indexing configuration for workspace files.",
"markdownDescription": "Indexing configuration for workspace files.",
"additionalProperties": false,
"properties": {
"ignoreFiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of ignore file to use.",
"markdownDescription": "Type of ignore file to use.",
"examples": [
"gitignore"
]
}
}
}
},
"repoMap": {
"type": "object",
"description": "Repository map configuration for context building.",
"markdownDescription": "Repository map configuration for context building.",
"additionalProperties": false,
"properties": {
"maxTotalEntries": {
"type": "integer",
"description": "Maximum total entries in the repo map.",
"markdownDescription": "Maximum total entries in the repo map.",
"default": 800
},
"maxEntriesPerDir": {
"type": "integer",
"description": "Maximum entries per directory in the repo map.",
"markdownDescription": "Maximum entries per directory in the repo map.",
"default": 50
}
}
}
}
},
"completion": {
"type": "object",
"description": "Inline completion configuration.",
"markdownDescription": "Inline completion configuration.",
"additionalProperties": false,
"properties": {
"model": {
"type": "string",
"description": "Model to use for inline completions.",
"markdownDescription": "Model to use for inline completions.",
"default": "openai/gpt-4.1",
"examples": [
"openai/gpt-4.1",
"github-copilot/gpt-4.1"
]
}
}
},
"rewrite": {
"type": "object",
"description": "Rewrite feature configuration.",
"markdownDescription": "Rewrite feature configuration.",
"additionalProperties": false,
"properties": {
"model": {
"type": "string",
"description": "Model to use for rewrites. Defaults to the same model selection as chat.",
"markdownDescription": "Model to use for rewrites. Defaults to the same model selection as chat.",
"examples": [
"openai/gpt-4.1",
"github-copilot/gpt-4.1"
]
},
"fullFileMaxLines": {
"type": "integer",
"description": "Maximum number of lines of the target file to inline as context in the rewrite prompt. When the file exceeds this, a window of this many lines centered on the selection is used instead.",
"markdownDescription": "Maximum number of lines of the target file to inline as context in the rewrite prompt. When the file exceeds this, a window of this many lines centered on the selection is used instead.",
"default": 2000
}
}
},
"variantsByModel": {
"type": "object",
"description": "Built-in variant definitions keyed by model-name regex pattern.",
"markdownDescription": "Built-in variant definitions keyed by model-name regex pattern.",
"additionalProperties": {
"$ref": "#/definitions/variantsByModelEntry"
}
},
"otlp": {
"type": "object",
"description": "OpenTelemetry OTLP collector configuration. Keys follow otlp auto-configure settings.",
"markdownDescription": "OpenTelemetry OTLP collector configuration. Keys follow otlp auto-configure settings.",
"additionalProperties": {
"type": "string"
}
},
"netrcFile": {
"type": [
"string",
"null"
],
"description": "Path to a custom netrc credential file. When null, searches ~/.netrc or ~/_netrc.",
"markdownDescription": "Path to a custom netrc credential file. When null, searches ~/.netrc or ~/_netrc.",
"default": null
},
"chat": {
"type": "object",
"description": "Chat feature settings.",
"markdownDescription": "Chat feature settings.",
"additionalProperties": false,
"properties": {
"title": {
"type": "boolean",
"description": "Whether to automatically generate a title for new chats.",
"markdownDescription": "Whether to automatically generate a title for new chats.",
"default": true
}
}
},
"plugins": {
"type": "object",
"description": "Plugin system for loading external configuration from git repos or local paths. Each key (except 'install') is a named plugin source with a 'source' URL or path. 'install' lists plugin names to install from any registered source.",
"markdownDescription": "Plugin system for loading external configuration from git repos or local paths. Each key (except `install`) is a named plugin source with a `source` URL or path. `install` lists plugin names to install from any registered source.",
"examples": [
{
"my-org": {
"source": "https://github.com/org/ai-plugins.git"
},
"install": ["plugin-a", "plugin-b"]
}
],
"properties": {
"install": {
"type": "array",
"description": "List of plugin names to install from registered sources.",
"markdownDescription": "List of plugin names to install from registered sources.",
"items": {
"type": "string"
}
}
},
"additionalProperties": {
"oneOf": [
{
"type": "object",
"description": "A named plugin source.",
"properties": {
"source": {
"type": "string",
"description": "Git URL or local path to a plugin repository containing .eca-plugin/marketplace.json.",
"markdownDescription": "Git URL or local path to a plugin repository containing `.eca-plugin/marketplace.json`.",
"examples": [
"https://github.com/org/ai-plugins.git",
"git@github.com:org/ai-plugins.git",
"/home/user/local-plugins"
]
}
},
"required": ["source"],
"additionalProperties": false
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"remote": {
"type": "object",
"description": "Remote web control server configuration. When enabled, starts an embedded HTTP server allowing a web frontend (web.eca.dev) to observe and control chat sessions in real-time.",
"markdownDescription": "Remote web control server configuration. When enabled, starts an embedded HTTP server allowing a web frontend (`web.eca.dev`) to observe and control chat sessions in real-time.",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"description": "Enables the remote HTTP server.",
"markdownDescription": "Enables the remote HTTP server."
},
"host": {
"type": "string",
"description": "Host used in the logged URL for web.eca.dev to connect back to. Can be a LAN IP, public IP, domain, or tunnel URL. When unset, auto-detected via InetAddress/getLocalHost.",
"markdownDescription": "Host used in the logged URL for `web.eca.dev` to connect back to. Can be a LAN IP, public IP, domain, or tunnel URL. When unset, auto-detected via `InetAddress/getLocalHost`.",
"examples": [
"192.168.1.42",
"myserver.example.com"
]
},
"port": {
"type": "integer",
"description": "Port the HTTP server listens on. When unset, tries port 7777, then 7778, 7779, etc. up to 20 attempts.",
"markdownDescription": "Port the HTTP server listens on. When unset, tries port `7777`, then `7778`, `7779`, etc. up to 20 attempts.",
"examples": [
7777
]
},
"password": {
"type": "string",
"description": "Auth token for Bearer authentication. When unset, a 32-byte hex token is auto-generated and logged to stderr.",
"markdownDescription": "Auth token for Bearer authentication. When unset, a 32-byte hex token is auto-generated and logged to stderr."
}
}
},
"network": {
"type": "object",
"description": "Network configuration for custom CA certificates and mTLS client certificates. Values support dynamic string interpolation (e.g. '${env:SSL_CERT_FILE}').",
"markdownDescription": "Network configuration for custom CA certificates and mTLS client certificates. Values support dynamic string interpolation (e.g. `${env:SSL_CERT_FILE}`).",
"additionalProperties": false,
"properties": {
"caCertFile": {
"type": "string",
"description": "Path to a PEM file containing custom CA certificates. These are added to the JVM default trust store, so public CAs remain trusted. Falls back to SSL_CERT_FILE or NODE_EXTRA_CA_CERTS environment variables.",
"markdownDescription": "Path to a PEM file containing custom CA certificates. These are added to the JVM default trust store, so public CAs remain trusted. Falls back to `SSL_CERT_FILE` or `NODE_EXTRA_CA_CERTS` environment variables.",
"examples": [
"/etc/ssl/certs/corporate-ca.pem",
"${env:SSL_CERT_FILE}"
]
},
"clientCert": {
"type": "string",
"description": "Path to a PEM file containing the client certificate for mutual TLS (mTLS). Falls back to ECA_CLIENT_CERT environment variable.",
"markdownDescription": "Path to a PEM file containing the client certificate for mutual TLS (mTLS). Falls back to `ECA_CLIENT_CERT` environment variable.",
"examples": [
"/etc/ssl/certs/client.pem",
"${env:ECA_CLIENT_CERT}"
]
},
"clientKey": {
"type": "string",
"description": "Path to a PEM file containing the client private key for mutual TLS (mTLS). Supports both unencrypted and encrypted PKCS8 keys. Falls back to ECA_CLIENT_KEY environment variable.",
"markdownDescription": "Path to a PEM file containing the client private key for mutual TLS (mTLS). Supports both unencrypted and encrypted PKCS8 keys. Falls back to `ECA_CLIENT_KEY` environment variable.",
"examples": [
"/etc/ssl/private/client-key.pem",
"${env:ECA_CLIENT_KEY}"
]
},
"clientKeyPassphrase": {
"type": "string",
"description": "Passphrase for an encrypted client private key. Only needed when the key file is encrypted. Falls back to ECA_CLIENT_KEY_PASSPHRASE environment variable.",
"markdownDescription": "Passphrase for an encrypted client private key. Only needed when the key file is encrypted. Falls back to `ECA_CLIENT_KEY_PASSPHRASE` environment variable.",
"examples": [
"${env:ECA_CLIENT_KEY_PASSPHRASE}"
]
}
}
}
},
"definitions": {
"variantPayload": {
"type": "object",
"description": "Additional request payload fields applied when a variant is selected. Empty object (`{}`) can be used to remove a built-in variant override.",
"markdownDescription": "Additional request payload fields applied when a variant is selected. Empty object (`{}`) can be used to remove a built-in variant override.",
"additionalProperties": true
},
"variantsByModelEntry": {
"type": "object",
"description": "Variant set applied when the model name matches this regex key.",
"markdownDescription": "Variant set applied when the model name matches this regex key.",
"properties": {
"variants": {
"type": "object",
"description": "Named variants provided for matching models.",
"markdownDescription": "Named variants provided for matching models.",
"additionalProperties": {
"$ref": "#/definitions/variantPayload"
}
},
"excludeProviders": {
"type": "array",
"description": "Provider names for which this regex-based variant set should not apply.",
"markdownDescription": "Provider names for which this regex-based variant set should not apply.",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"provider": {
"type": "object",
"description": "Configuration for an LLM provider.",
"markdownDescription": "Configuration for an LLM provider.",
"properties": {
"api": {
"type": "string",
"description": "The API protocol to use for this provider.",
"markdownDescription": "The API protocol to use for this provider.",
"enum": [
"openai-responses",
"openai-chat",
"anthropic"
]
},
"fetchModels": {
"type": "boolean",
"description": "Whether to fetch available models from the provider's API.",
"markdownDescription": "Whether to fetch available models from the provider's API."
},
"url": {
"type": "string",
"description": "Base URL for the provider's API. Supports dynamic strings like ${env:VAR} or ${cmd:command}.",
"markdownDescription": "Base URL for the provider's API. Supports dynamic strings like `${env:VAR}` or `${cmd:command}`.",
"format": "uri"
},
"key": {
"type": [
"string",
"null"
],
"description": "API key for authentication. Supports dynamic strings like ${env:MY_API_KEY}, ${netrc:host} or ${cmd:pass show eca/api-key}.",
"markdownDescription": "API key for authentication. Supports dynamic strings like `${env:MY_API_KEY}`, `${netrc:host}` or `${cmd:pass show eca/api-key}`."
},
"keyRc": {
"type": "string",
"description": "Credential file lookup in format [login@]machine[:port] for netrc-based authentication.",
"markdownDescription": "Credential file lookup in format [login@]machine[:port] for netrc-based authentication."
},
"requiresAuth": {
"type": "boolean",
"description": "Whether this provider requires authentication.",
"markdownDescription": "Whether this provider requires authentication."
},
"auth": {
"type": "object",
"description": "Authentication endpoint overrides for providers that use OAuth device flow. Used when the provider's identity server differs from the default (e.g. enterprise or self-hosted instances).",
"markdownDescription": "Authentication endpoint overrides for providers that use OAuth device flow. Used when the provider's identity server differs from the default (e.g. enterprise or self-hosted instances).",
"additionalProperties": false,
"properties": {
"url": {
"type": "string",
"description": "Base URL of the identity provider. OAuth device-flow endpoints are derived from this URL.",
"markdownDescription": "Base URL of the identity provider. OAuth device-flow endpoints are derived from this URL.",
"format": "uri",
"examples": ["https://github.mycompany.com"]
},
"clientId": {
"type": "string",
"description": "OAuth client ID to use for the device-flow. Defaults to the provider's public client ID when omitted.",
"markdownDescription": "OAuth client ID to use for the device-flow. Defaults to the provider's public client ID when omitted."
}
}
},
"completionUrlRelativePath": {
"type": "string",
"description": "Custom relative URL path for completion requests.",
"markdownDescription": "Custom relative URL path for completion requests."
},
"thinkTagStart": {
"type": "string",
"description": "Custom start tag for thinking/reasoning blocks in model responses.",
"markdownDescription": "Custom start tag for thinking/reasoning blocks in model responses."
},
"thinkTagEnd": {
"type": "string",
"description": "Custom end tag for thinking/reasoning blocks in model responses.",
"markdownDescription": "Custom end tag for thinking/reasoning blocks in model responses."
},
"httpClient": {
"type": "string",
"description": "HTTP client implementation to use.",
"markdownDescription": "HTTP client implementation to use.",
"enum": [
"jdk",
"okhttp"
]
},
"retryRules": {
"type": "array",
"description": "Custom retry rules. Each rule can match by HTTP status code and/or error text regex pattern. When matched, the request is retried with exponential backoff.",
"markdownDescription": "Custom retry rules. Each rule can match by HTTP status code and/or error text regex pattern. When matched, the request is retried with exponential backoff.",
"items": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "HTTP status code to match.",
"markdownDescription": "HTTP status code to match."
},
"errorPattern": {
"type": "string",
"description": "Regex pattern to match against any error text — response body, error message, or exception message (case-insensitive). Useful for connection-level errors that have no HTTP status.",
"markdownDescription": "Regex pattern to match against any error text — response body, error message, or exception message (case-insensitive). Useful for connection-level errors that have no HTTP status."
},
"label": {
"type": "string",
"description": "Human-readable label shown in the retry progress message (e.g. 'Rate limited').",
"markdownDescription": "Human-readable label shown in the retry progress message (e.g. 'Rate limited')."
}
},
"anyOf": [
{ "required": ["status"] },
{ "required": ["errorPattern"] }
],
"additionalProperties": false
}
},
"models": {
"type": "object",
"description": "Available models for this provider. Each key is the model alias.",
"markdownDescription": "Available models for this provider. Each key is the model alias.",
"additionalProperties": {
"$ref": "#/definitions/model"
}
},
"cacheRetention": {
"type": "string",
"description": "Prompt cache retention for Anthropic. 'short' uses 5-min TTL (default), 'long' uses 1-hour TTL at higher write cost. Only applies when hitting the direct Anthropic API.",
"markdownDescription": "Prompt cache retention for Anthropic. `short` uses 5-min TTL (default), `long` uses 1-hour TTL at higher write cost. Only applies when hitting the direct Anthropic API.",
"enum": ["short", "long"],
"default": "short"
}
},
"additionalProperties": false
},
"model": {
"type": "object",
"description": "Configuration for a specific model.",
"markdownDescription": "Configuration for a specific model.",
"properties": {
"modelName": {
"type": "string",
"description": "The actual model identifier sent to the API, if different from the alias key.",
"markdownDescription": "The actual model identifier sent to the API, if different from the alias key."
},
"extraPayload": {
"type": "object",
"description": "Additional fields to include in the API request payload.",
"markdownDescription": "Additional fields to include in the API request payload.",
"additionalProperties": true
},
"extraHeaders": {
"type": "object",
"description": "Additional HTTP headers to include in API requests.",
"markdownDescription": "Additional HTTP headers to include in API requests.",
"additionalProperties": {
"type": "string"
}
},
"reasoningHistory": {
"type": "string",
"description": "How to handle reasoning/thinking history in conversation context.",
"markdownDescription": "How to handle reasoning/thinking history in conversation context.",
"enum": [
"all",
"turn",
"off"
],
"default": "all"
},
"variants": {
"type": "object",
"description": "Named payload presets for this model. Merged with built-in variants; same-name entries override built-ins. Setting a variant to {} removes that built-in variant.",
"markdownDescription": "Named payload presets for this model. Merged with built-in variants; same-name entries override built-ins. Setting a variant to `{}` removes that built-in variant.",
"additionalProperties": {
"$ref": "#/definitions/variantPayload"
}
}
},
"additionalProperties": false
},
"agent": {
"type": "object",
"description": "A named agent configuration.",
"markdownDescription": "A named agent configuration.",
"properties": {
"inherit": {
"type": "string",
"description": "Name of another agent to inherit configuration from. The current agent's settings are deep-merged on top of the inherited agent's settings.",
"markdownDescription": "Name of another agent to inherit configuration from. The current agent's settings are deep-merged on top of the inherited agent's settings.",
"examples": ["code", "plan", "explorer"]
},
"mode": {
"type": "string",
"description": "Agent mode. 'primary' for standalone agents, 'subagent' for agent-spawnable agents.",
"markdownDescription": "Agent mode. 'primary' for standalone agents, 'subagent' for agent-spawnable agents.",
"enum": ["primary", "subagent"]
},
"description": {
"type": "string",
"description": "Description of this agent's purpose. Required for subagents — shown to the LLM so it knows when to spawn this agent. Supports dynamic strings like ${file:path} and ${classpath:path}.",
"markdownDescription": "Description of this agent's purpose. Required for subagents — shown to the LLM so it knows when to spawn this agent. Supports dynamic strings like `${file:path}` and `${classpath:path}`."
},
"systemPrompt": {
"type": "string",
"description": "System prompt for this agent. Overrides the default system prompt. Supports dynamic strings like ${file:path} and ${classpath:path}.",
"markdownDescription": "System prompt for this agent. Overrides the default system prompt. Supports dynamic strings like `${file:path}` and `${classpath:path}`."
},
"maxSteps": {
"type": "integer",
"description": "Maximum number of tool-call steps before the agent is halted. Useful for limiting subagent execution.",
"markdownDescription": "Maximum number of tool-call steps before the agent is halted. Useful for limiting subagent execution.",
"minimum": 1
},
"defaultModel": {
"type": "string",
"description": "Default model for this agent, overriding the global default.",
"markdownDescription": "Default model for this agent, overriding the global default.",
"examples": ["anthropic/claude-sonnet-4-6"]
},
"variant": {
"type": "string",
"description": "Default variant for this agent. Used when available for the selected model.",
"markdownDescription": "Default variant for this agent. Used when available for the selected model.",
"examples": ["medium", "high"]
},
"disabledTools": {
"type": "array",
"description": "Tools to disable for this agent.",
"markdownDescription": "Tools to disable for this agent.",
"items": {
"type": "string"
}
},
"autoCompactPercentage": {
"type": "integer",
"description": "Context window usage percentage at which auto-compact triggers for this agent.",
"markdownDescription": "Context window usage percentage at which auto-compact triggers for this agent.",
"minimum": 0,
"maximum": 100
},
"toolCall": {
"$ref": "#/definitions/toolCallConfig"
},
"prompts": {
"$ref": "#/definitions/prompts"
}
},
"additionalProperties": false
},
"hook": {
"type": "object",
"description": "A hook configuration for running shell actions on events.",
"markdownDescription": "A hook configuration for running shell actions on events.",
"required": [
"type",
"actions"
],
"properties": {
"type": {
"type": "string",
"description": "The event type that triggers this hook.",
"markdownDescription": "The event type that triggers this hook.",
"enum": [
"sessionStart",
"sessionEnd",
"chatStart",
"chatEnd",
"preRequest",
"postRequest",
"preToolCall",
"postToolCall"
]
},
"matcher": {
"type": "string",
"description": "Regex pattern for matching server__tool-name. Only for *ToolCall hook types.",
"markdownDescription": "Regex pattern for matching server__tool-name. Only for *ToolCall hook types."
},
"visible": {
"type": "boolean",
"description": "Whether to show hook execution in chat.",
"markdownDescription": "Whether to show hook execution in chat.",
"default": true
},
"runOnError": {
"type": "boolean",
"description": "For postToolCall hooks, whether to run even if the tool errored.",
"markdownDescription": "For postToolCall hooks, whether to run even if the tool errored.",
"default": false
},
"actions": {
"type": "array",
"description": "List of actions to execute when the hook triggers.",
"markdownDescription": "List of actions to execute when the hook triggers.",
"items": {
"$ref": "#/definitions/hookAction"
}
}
},
"additionalProperties": false
},
"hookAction": {
"type": "object",
"description": "A shell action executed by a hook.",
"markdownDescription": "A shell action executed by a hook.",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"description": "Action type.",
"markdownDescription": "Action type.",
"enum": [
"shell"
]
},
"shell": {
"type": "string",
"description": "Inline shell script to execute.",
"markdownDescription": "Inline shell script to execute."
},
"file": {
"type": "string",
"description": "Path to a shell script file to execute.",
"markdownDescription": "Path to a shell script file to execute."
},
"timeout": {
"type": "integer",
"description": "Timeout in milliseconds for this action.",
"markdownDescription": "Timeout in milliseconds for this action.",
"default": 30000
}
},
"additionalProperties": false
},
"customTool": {
"type": "object",
"description": "A user-defined command-line tool.",
"markdownDescription": "A user-defined command-line tool.",
"required": [
"description",
"command",
"schema"
],
"properties": {
"description": {
"type": "string",
"description": "Description of what the tool does. Used by the LLM to decide when to use it.",
"markdownDescription": "Description of what the tool does. Used by the LLM to decide when to use it."
},
"command": {
"type": "string",
"description": "Command template with {{argument_name}} placeholders.",
"markdownDescription": "Command template with {{argument_name}} placeholders."
},
"schema": {
"type": "object",
"description": "Schema defining the tool's parameters.",
"markdownDescription": "Schema defining the tool's parameters.",
"properties": {
"properties": {
"type": "object",
"description": "Parameter definitions.",
"markdownDescription": "Parameter definitions.",
"additionalProperties": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Parameter type.",
"markdownDescription": "Parameter type."
},
"description": {
"type": "string",
"description": "Parameter description for the LLM.",
"markdownDescription": "Parameter description for the LLM."
}
}
}
},
"required": {
"type": "array",
"description": "List of required parameter names.",
"markdownDescription": "List of required parameter names.",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"toolCallConfig": {
"type": "object",
"description": "Tool call configuration including approval rules and tool-specific settings.",
"markdownDescription": "Tool call configuration including approval rules and tool-specific settings.",
"properties": {
"approval": {
"$ref": "#/definitions/approval"
},
"readFile": {
"type": "object",
"description": "Configuration for the read_file tool.",
"markdownDescription": "Configuration for the read_file tool.",
"additionalProperties": false,
"properties": {
"maxLines": {
"type": "integer",
"description": "Maximum number of lines returned by read_file.",
"markdownDescription": "Maximum number of lines returned by read_file.",
"default": 2000
}
}
},
"shellCommand": {
"type": "object",
"description": "Configuration for the shell_command tool.",
"markdownDescription": "Configuration for the shell_command tool.",
"additionalProperties": false,
"properties": {
"path": {
"type": "string",
"description": "Custom shell executable path. Overrides the default platform shell (bash on Linux/macOS, powershell on Windows).",
"markdownDescription": "Custom shell executable path. Overrides the default platform shell (`bash` on Linux/macOS, `powershell` on Windows)."
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Arguments passed to the shell before the script argument. E.g. [\"-l\", \"-c\"] for bash.",
"markdownDescription": "Arguments passed to the shell before the script argument. E.g. `[\"-l\", \"-c\"]` for bash."
},
"summaryMaxLength": {
"type": "integer",
"description": "Maximum length of shell command summary.",
"markdownDescription": "Maximum length of shell command summary.",
"default": 25
}
}
},
"outputTruncation": {
"type": "object",
"description": "Output truncation settings for tool results.",
"markdownDescription": "Output truncation settings for tool results.",
"additionalProperties": false,
"properties": {
"lines": {
"type": "integer",
"description": "Maximum number of lines in tool output.",
"markdownDescription": "Maximum number of lines in tool output.",
"default": 2000
},
"sizeKb": {
"type": "integer",
"description": "Maximum size in kilobytes for tool output.",
"markdownDescription": "Maximum size in kilobytes for tool output.",
"default": 50
}
}
}
},
"additionalProperties": false
},
"approval": {
"type": "object",
"description": "Tool approval configuration.",
"markdownDescription": "Tool approval configuration.",
"properties": {
"byDefault": {
"type": "string",
"description": "Default approval mode for tools not explicitly configured.",
"markdownDescription": "Default approval mode for tools not explicitly configured.",
"enum": [
"ask",
"allow",
"deny"
],
"default": "ask"
},
"allow": {
"type": "object",
"description": "Tools that are automatically allowed. Key is tool or server name.",
"markdownDescription": "Tools that are automatically allowed. Key is tool or server name.",
"additionalProperties": {
"$ref": "#/definitions/approvalMatcher"
}
},
"ask": {
"type": "object",
"description": "Tools that require user approval. Key is tool or server name.",
"markdownDescription": "Tools that require user approval. Key is tool or server name.",
"additionalProperties": {
"$ref": "#/definitions/approvalMatcher"
}
},
"deny": {
"type": "object",
"description": "Tools that are denied. Key is tool or server name.",
"markdownDescription": "Tools that are denied. Key is tool or server name.",
"additionalProperties": {
"$ref": "#/definitions/approvalMatcher"
}
}
},
"additionalProperties": false
},
"approvalMatcher": {
"type": "object",
"description": "Matcher configuration for a tool approval rule.",
"markdownDescription": "Matcher configuration for a tool approval rule.",
"properties": {
"argsMatchers": {
"type": "object",