Repository navigation
Expand file tree
/
Copy pathschema.json
More file actions
944 lines (944 loc) · 32.7 KB
/
Copy pathschema.json
File metadata and controls
944 lines (944 loc) · 32.7 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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/edimuj/callmux/main/schema.json",
"title": "callmux configuration",
"description": "Configuration for the callmux MCP multiplexer proxy",
"type": "object",
"oneOf": [
{
"required": ["servers"],
"not": { "required": ["mcpServers"] }
},
{
"required": ["mcpServers"],
"not": { "required": ["servers"] }
}
],
"allOf": [
{
"not": {
"required": ["metaOnly", "exposeMetaTools"],
"properties": {
"metaOnly": { "const": true },
"exposeMetaTools": { "const": false }
}
}
}
],
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema reference for editor autocomplete"
},
"servers": {
"type": "object",
"description": "Downstream MCP servers to proxy (native format)",
"additionalProperties": { "$ref": "#/$defs/serverConfig" }
},
"mcpServers": {
"type": "object",
"description": "Downstream MCP servers to proxy (MCP-compatible format)",
"additionalProperties": { "$ref": "#/$defs/serverConfig" }
},
"recipes": {
"type": "object",
"description": "Named reusable callmux meta-tool recipes",
"additionalProperties": { "$ref": "#/$defs/recipeConfig" }
},
"cacheTtlSeconds": {
"type": "integer",
"minimum": 0,
"default": 0,
"description": "Cache TTL in seconds for read operations (0 = disabled)"
},
"cachePolicy": { "$ref": "#/$defs/cachePolicy" },
"maxConcurrency": {
"type": "integer",
"minimum": 1,
"default": 20,
"description": "Service-wide max concurrent downstream tool calls across direct and meta-tool requests"
},
"connectTimeoutMs": {
"type": "integer",
"minimum": 1,
"default": 30000,
"description": "Timeout in milliseconds for downstream startup connect/list-tools"
},
"callTimeoutMs": {
"type": "integer",
"minimum": 1,
"default": 180000,
"description": "Timeout in milliseconds for downstream tool calls"
},
"reloadDrainTimeoutMs": {
"type": "integer",
"minimum": 1,
"description": "Maximum time to drain calls from an old upstream generation after hot reload (default: longest configured call timeout plus 1000ms)"
},
"reconnectPolicy": { "$ref": "#/$defs/reconnectPolicy" },
"sessionCwdIdleTtlSeconds": {
"type": "integer",
"minimum": 0,
"default": 600,
"description": "Idle TTL in seconds for listener-mode session cwd stdio clients (0 = close after each call)"
},
"listenerSessionInactivityTtlSeconds": {
"type": "integer",
"minimum": 0,
"default": 1800,
"description": "Inactivity TTL for streamable HTTP MCP sessions (0 disables expiry)"
},
"listenerMaxSessions": {
"type": "integer",
"minimum": 1,
"default": 1000,
"description": "Maximum live listener MCP sessions across streamable HTTP and legacy SSE"
},
"maxScopedClients": {
"type": "integer",
"minimum": 1,
"default": 64,
"description": "Service-wide cap for cached or connecting cwd/header-scoped downstream clients"
},
"maxScopedClientsPerServer": {
"type": "integer",
"minimum": 1,
"default": 16,
"description": "Default per-server cap for cached or connecting cwd/header-scoped downstream clients"
},
"fileReferenceRoots": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"description": "Local filesystem roots that listener-origin $file/$jsonFile/$yamlFile references may read. Relative paths resolve beside the config file; omit to disable file-backed references for listener callers."
},
"strictStartup": {
"type": "boolean",
"default": false,
"description": "Fail startup if any downstream server fails to connect (default: degraded mode)"
},
"maxCacheEntries": {
"type": "integer",
"minimum": 1,
"default": 1000,
"description": "Maximum cached entries before oldest entries are evicted"
},
"maxCacheEntryBytes": {
"type": "integer",
"minimum": 1,
"default": 8388608,
"description": "Maximum serialized bytes retained for one cached result"
},
"maxCacheBytes": {
"type": "integer",
"minimum": 1,
"default": 134217728,
"description": "Maximum serialized bytes retained across all cached results"
},
"metaOnly": {
"type": "boolean",
"default": false,
"description": "Hide proxied tools, expose only meta-tools (callmux_call, parallel, batch, etc.)"
},
"exposeMetaTools": {
"type": "boolean",
"default": true,
"description": "Expose callmux_* meta-tools in tools/list. Set false to expose only proxied downstream tools."
},
"descriptionMaxLength": {
"type": "integer",
"minimum": 1,
"description": "Default max chars for tool descriptions in callmux_status (omit = no limit)"
},
"outputFormat": {
"type": "string",
"enum": ["json", "toon", "auto"],
"default": "json",
"description": "Model-facing text format for callmux-owned structured results. structuredContent remains JSON."
},
"responseShield": { "$ref": "#/$defs/globalResponseShield" },
"schemaCompression": { "$ref": "#/$defs/schemaCompression" },
"requestBodyMaxBytes": {
"type": "integer",
"minimum": 0,
"default": 1048576,
"description": "Global max inbound request payload bytes (0 = unlimited)"
},
"allowRequestBodyMaxOverride": {
"type": "boolean",
"default": false,
"description": "Allow per-request x-callmux-max-body-bytes override header"
},
"auth": { "$ref": "#/$defs/authConfig" },
"authorization": { "$ref": "#/$defs/authorizationConfig" },
"abuseControls": { "$ref": "#/$defs/abuseControlsConfig" },
"auditLog": { "$ref": "#/$defs/auditLogConfig" },
"metrics": { "$ref": "#/$defs/metricsConfig" },
"dashboard": { "$ref": "#/$defs/dashboardConfig" },
"eventStore": { "$ref": "#/$defs/eventStoreConfig" },
"management": { "$ref": "#/$defs/managementConfig" },
"allowInsecureRemoteListener": {
"type": "boolean",
"default": false,
"description": "Allow non-loopback listener startup without auth (unsafe, not recommended)"
}
},
"additionalProperties": false,
"$defs": {
"serverConfig": {
"type": "object",
"description": "Downstream MCP server configuration — either stdio (command) or HTTP (url)",
"oneOf": [
{ "$ref": "#/$defs/stdioServerConfig" },
{ "$ref": "#/$defs/httpServerConfig" }
]
},
"stdioServerConfig": {
"type": "object",
"required": ["command"],
"properties": {
"command": {
"type": "string",
"minLength": 1,
"description": "Command to launch the MCP server process"
},
"args": {
"type": "array",
"items": { "type": "string" },
"description": "Arguments passed to the command"
},
"env": {
"type": "object",
"additionalProperties": { "type": "string" },
"description": "Literal environment variables for the server process. Prefer envRefs for secrets."
},
"envRefs": {
"type": "object",
"additionalProperties": {
"type": "string",
"pattern": "^(env:[A-Za-z_][A-Za-z0-9_]*|file:.+)$"
},
"description": "Secret environment values resolved at process start from env:NAME or file:PATH. Values override env entries with the same key."
},
"cwd": {
"type": "string",
"description": "Working directory for the server process"
},
"cwdMode": {
"type": "string",
"enum": ["global", "session"],
"description": "Working directory behavior for listener mode stdio calls. Omit to use per-session cwd when available; set global to always use the configured/process cwd."
},
"requireSessionCwd": {
"type": "boolean",
"description": "For session-cwd (path-sensitive) servers: refuse a call with an actionable error when the caller's working directory cannot be resolved, instead of silently running relative paths against callmux's own cwd. Default false."
},
"tools": {
"type": "array",
"items": { "type": "string" },
"description": "Whitelist of tool names to expose (omit to expose all)"
},
"alwaysLoad": {
"type": "array",
"items": { "type": "string" },
"description": "Tool names eagerly loaded by the MCP client (sets _meta anthropic/alwaysLoad)"
},
"prefix": {
"type": "string",
"pattern": "^[A-Za-z0-9_]*$",
"description": "Override the multi-server sub-prefix for this server's tools (default: the server key). \"\" drops the prefix entirely. Ignored in single-server mode."
},
"cachePolicy": { "$ref": "#/$defs/cachePolicy" },
"maxConcurrency": {
"type": "integer",
"minimum": 1,
"description": "Max concurrent calls to this server (omit to use global maxConcurrency)"
},
"maxScopedClients": {
"type": "integer",
"minimum": 1,
"description": "Max cached or connecting cwd/header-scoped clients for this server (omit to use maxScopedClientsPerServer)"
},
"callTimeoutMs": {
"type": "integer",
"minimum": 1,
"description": "Timeout in milliseconds for tool calls to this server (omit to use global callTimeoutMs)"
},
"requestBodyMaxBytes": {
"type": "integer",
"minimum": 0,
"description": "Per-server max inbound request payload bytes for calls targeting this server (0 = unlimited, omit = use global)"
},
"responseShield": { "$ref": "#/$defs/serverResponseShield" },
"schemaCompression": { "$ref": "#/$defs/schemaCompression" },
"disabled": {
"type": "boolean",
"default": false,
"description": "Exclude this server from downstream connection and tool exposure"
}
},
"not": { "required": ["url"] },
"additionalProperties": false
},
"httpServerConfig": {
"type": "object",
"required": ["url"],
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "URL of the remote MCP server"
},
"transport": {
"type": "string",
"enum": ["streamable-http", "sse"],
"description": "Transport protocol (auto-detected with fallback if omitted)"
},
"headers": {
"type": "object",
"additionalProperties": { "type": "string" },
"description": "HTTP headers sent with requests (e.g. authorization)"
},
"forwardHeaders": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
},
"description": "Incoming listener headers to forward to this downstream per client session (opaque passthrough)"
},
"tools": {
"type": "array",
"items": { "type": "string" },
"description": "Whitelist of tool names to expose (omit to expose all)"
},
"alwaysLoad": {
"type": "array",
"items": { "type": "string" },
"description": "Tool names eagerly loaded by the MCP client (sets _meta anthropic/alwaysLoad)"
},
"prefix": {
"type": "string",
"pattern": "^[A-Za-z0-9_]*$",
"description": "Override the multi-server sub-prefix for this server's tools (default: the server key). \"\" drops the prefix entirely. Ignored in single-server mode."
},
"cachePolicy": { "$ref": "#/$defs/cachePolicy" },
"maxConcurrency": {
"type": "integer",
"minimum": 1,
"description": "Max concurrent calls to this server (omit to use global maxConcurrency)"
},
"maxScopedClients": {
"type": "integer",
"minimum": 1,
"description": "Max cached or connecting cwd/header-scoped clients for this server (omit to use maxScopedClientsPerServer)"
},
"callTimeoutMs": {
"type": "integer",
"minimum": 1,
"description": "Timeout in milliseconds for tool calls to this server (omit to use global callTimeoutMs)"
},
"requestBodyMaxBytes": {
"type": "integer",
"minimum": 0,
"description": "Per-server max inbound request payload bytes for calls targeting this server (0 = unlimited, omit = use global)"
},
"responseShield": { "$ref": "#/$defs/serverResponseShield" },
"schemaCompression": { "$ref": "#/$defs/schemaCompression" },
"disabled": {
"type": "boolean",
"default": false,
"description": "Exclude this server from downstream connection and tool exposure"
}
},
"not": { "required": ["command"] },
"additionalProperties": false
},
"cachePolicy": {
"type": "object",
"description": "Cache policy controlling which tools are cached. Supports exact names or trailing '*' wildcards.",
"properties": {
"allowTools": {
"type": "array",
"items": { "type": "string" },
"description": "Only cache matching tools (exact names or 'prefix*' wildcards)"
},
"denyTools": {
"type": "array",
"items": { "type": "string" },
"description": "Never cache matching tools (exact names or 'prefix*' wildcards). Takes precedence over allowTools."
}
},
"additionalProperties": false
},
"reconnectPolicy": {
"type": "object",
"description": "Downstream reconnect retry/backoff policy. By default callmux retries forever with bounded jittered backoff.",
"properties": {
"initialDelayMs": {
"type": "integer",
"minimum": 1,
"default": 250,
"description": "Initial reconnect backoff in milliseconds"
},
"maxDelayMs": {
"type": "integer",
"minimum": 1,
"default": 10000,
"description": "Maximum reconnect backoff in milliseconds"
},
"jitterRatio": {
"type": "number",
"minimum": 0,
"maximum": 1,
"default": 0.2,
"description": "Random jitter ratio applied to reconnect delays"
},
"maxAttempts": {
"type": ["integer", "null"],
"minimum": 1,
"default": null,
"description": "Maximum failed reconnect attempts before stopping; null retries forever"
},
"fastFailDuringBackoff": {
"type": "boolean",
"default": true,
"description": "Return downstream_unavailable during scheduled backoff instead of blocking each call on connect"
}
},
"additionalProperties": false
},
"responseShieldBase": {
"type": "object",
"description": "Response shielding policy. Large results are compacted, stored, and returned with a callmux_get_result ref.",
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "Enable response shielding"
},
"maxResultBytes": {
"type": "integer",
"minimum": 1,
"default": 65536,
"description": "Store and compact responses larger than this many serialized bytes"
},
"maxStringChars": {
"type": "integer",
"minimum": 1,
"default": 8192,
"description": "Truncate individual string fields longer than this many characters"
},
"maxArrayItems": {
"type": "integer",
"minimum": 1,
"default": 50,
"description": "Truncate arrays longer than this many items"
},
"allowTools": {
"type": "array",
"items": { "type": "string" },
"description": "Only shield matching tools (exact names or '*' wildcards)"
},
"denyTools": {
"type": "array",
"items": { "type": "string" },
"description": "Never shield matching tools (exact names or '*' wildcards). Takes precedence over allowTools."
}
},
"additionalProperties": false
},
"globalResponseShield": {
"type": "object",
"description": "Global response shielding policy. Large results are compacted, stored, and returned with a callmux_get_result ref.",
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "Enable response shielding"
},
"maxResultBytes": {
"type": "integer",
"minimum": 1,
"default": 65536,
"description": "Store and compact responses larger than this many serialized bytes"
},
"maxStringChars": {
"type": "integer",
"minimum": 1,
"default": 8192,
"description": "Truncate individual string fields longer than this many characters"
},
"maxArrayItems": {
"type": "integer",
"minimum": 1,
"default": 50,
"description": "Truncate arrays longer than this many items"
},
"maxStoredResults": {
"type": "integer",
"minimum": 1,
"default": 100,
"description": "Maximum stored full results before oldest refs are evicted"
},
"maxStoredResultBytes": {
"type": "integer",
"minimum": 1,
"default": 67108864,
"description": "Maximum serialized bytes retained for one stored full result; oversized results are truncated without a retrieval ref"
},
"maxStoredBytes": {
"type": "integer",
"minimum": 1,
"default": 268435456,
"description": "Maximum serialized bytes retained across all stored full results"
},
"allowTools": {
"type": "array",
"items": { "type": "string" },
"description": "Only shield matching tools (exact names or '*' wildcards)"
},
"denyTools": {
"type": "array",
"items": { "type": "string" },
"description": "Never shield matching tools (exact names or '*' wildcards). Takes precedence over allowTools."
}
},
"additionalProperties": false
},
"serverResponseShield": { "$ref": "#/$defs/responseShieldBase" },
"schemaCompression": {
"type": "object",
"description": "Tool schema compression policy. Reduces prompt tokens by minimizing tool and parameter descriptions without changing schema semantics.",
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "Enable tool schema compression"
},
"mode": {
"type": "string",
"enum": ["off", "balanced", "aggressive"],
"default": "balanced",
"description": "Compression mode for tool and parameter descriptions"
},
"maxDescriptionChars": {
"type": "integer",
"minimum": 1,
"default": 160,
"description": "Maximum characters for retained descriptions"
}
},
"additionalProperties": false
},
"dashboardConfig": {
"type": "object",
"description": "Read-only listener dashboard configuration. Disabled by default.",
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "Enable read-only dashboard endpoints"
},
"path": {
"type": "string",
"default": "/dashboard",
"description": "Dashboard base path"
},
"maxEvents": {
"type": "integer",
"minimum": 1,
"default": 500,
"description": "Maximum runtime events kept in memory"
}
},
"additionalProperties": false
},
"eventStoreConfig": {
"type": "object",
"description": "Optional node:sqlite call event history store. Disabled by default.",
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "Enable SQLite-backed per-call event history"
},
"path": {
"type": "string",
"minLength": 1,
"description": "SQLite database path (default: callmux-events.sqlite beside the config file)"
},
"maxRows": {
"type": "integer",
"minimum": 0,
"default": 100000,
"description": "Maximum retained call event rows (0 = age-only retention)"
},
"retentionDays": {
"type": "integer",
"minimum": 0,
"default": 14,
"description": "Maximum retained event age in days (0 = row-count-only retention)"
},
"pruneEvery": {
"type": "integer",
"minimum": 1,
"default": 100,
"description": "Completed calls between retention prune passes"
}
},
"additionalProperties": false
},
"managementConfig": {
"type": "object",
"description": "Standalone listener management API configuration. Disabled by default.",
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "Enable management API endpoints"
},
"path": {
"type": "string",
"default": "/management/v1",
"description": "Management API base path"
},
"statePath": {
"type": "string",
"description": "Persistent managed overlay path. Defaults to <config>.management.json in listener mode."
},
"auth": {
"$ref": "#/$defs/bearerAuthConfig",
"description": "Bearer auth required for management mutations"
},
"allowUnauthenticatedRead": {
"type": "boolean",
"default": false,
"description": "Allow read-only management endpoints without management auth. Mutations still require auth."
}
},
"additionalProperties": false
},
"recipeArguments": {
"type": "object",
"description": "Arguments object. Use {\"$param\":\"name\"} as a value to substitute callmux_recipe_run arguments.",
"additionalProperties": true
},
"recipeCall": {
"type": "object",
"required": ["tool"],
"properties": {
"server": { "type": "string", "minLength": 1 },
"tool": { "type": "string", "minLength": 1 },
"arguments": { "$ref": "#/$defs/recipeArguments" },
"timeoutMs": { "type": "integer", "minimum": 1 },
"cwd": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"recipeBatchItem": {
"type": "object",
"required": ["arguments"],
"properties": {
"arguments": { "$ref": "#/$defs/recipeArguments" },
"timeoutMs": { "type": "integer", "minimum": 1 },
"cwd": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"recipePipelineStep": {
"type": "object",
"required": ["tool"],
"properties": {
"server": { "type": "string", "minLength": 1 },
"tool": { "type": "string", "minLength": 1 },
"arguments": { "$ref": "#/$defs/recipeArguments" },
"timeoutMs": { "type": "integer", "minimum": 1 },
"cwd": { "type": "string", "minLength": 1 },
"inputMapping": {
"type": "object",
"additionalProperties": { "type": "string" }
}
},
"additionalProperties": false
},
"recipeConfig": {
"type": "object",
"description": "Reusable named callmux workflow. Runs as callmux_call, callmux_parallel, callmux_batch, or callmux_pipeline.",
"required": ["mode"],
"properties": {
"description": { "type": "string", "minLength": 1 },
"mode": {
"type": "string",
"enum": ["call", "parallel", "batch", "pipeline"]
},
"server": { "type": "string", "minLength": 1 },
"tool": { "type": "string", "minLength": 1 },
"arguments": { "$ref": "#/$defs/recipeArguments" },
"timeoutMs": { "type": "integer", "minimum": 1 },
"cwd": { "type": "string", "minLength": 1 },
"calls": {
"type": "array",
"items": { "$ref": "#/$defs/recipeCall" }
},
"items": {
"type": "array",
"items": { "$ref": "#/$defs/recipeBatchItem" }
},
"steps": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/recipePipelineStep" }
}
},
"oneOf": [
{ "properties": { "mode": { "const": "call" } }, "required": ["tool"] },
{ "properties": { "mode": { "const": "parallel" } }, "required": ["calls"] },
{ "properties": { "mode": { "const": "batch" } }, "required": ["tool", "items"] },
{ "properties": { "mode": { "const": "pipeline" } }, "required": ["steps"] }
],
"additionalProperties": false
},
"authConfig": {
"description": "Listener authentication configuration",
"oneOf": [
{ "$ref": "#/$defs/bearerAuthConfig" },
{ "$ref": "#/$defs/oidcJwtAuthConfig" }
]
},
"bearerAuthToken": {
"type": "object",
"required": ["id"],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Stable token identifier for audit/logging"
},
"hash": {
"type": "string",
"minLength": 1,
"description": "Scrypt hash of bearer token"
},
"hashRef": {
"type": "string",
"minLength": 1,
"description": "Secret reference for hash (`env:NAME` or `file:/path`)"
},
"token": {
"type": "string",
"minLength": 1,
"description": "Bearer token value (legacy migration mode)"
},
"tokenRef": {
"type": "string",
"minLength": 1,
"description": "Secret reference for plaintext token (`env:NAME` or `file:/path`)"
}
},
"oneOf": [
{ "required": ["hash"], "not": { "anyOf": [{ "required": ["token"] }, { "required": ["hashRef"] }, { "required": ["tokenRef"] }] } },
{ "required": ["hashRef"], "not": { "anyOf": [{ "required": ["token"] }, { "required": ["hash"] }, { "required": ["tokenRef"] }] } },
{ "required": ["token"], "not": { "anyOf": [{ "required": ["hash"] }, { "required": ["hashRef"] }, { "required": ["tokenRef"] }] } },
{ "required": ["tokenRef"], "not": { "anyOf": [{ "required": ["token"] }, { "required": ["hash"] }, { "required": ["hashRef"] }] } }
],
"additionalProperties": false
},
"bearerAuthConfig": {
"type": "object",
"required": ["mode", "tokens"],
"properties": {
"mode": {
"type": "string",
"enum": ["bearer"],
"description": "Authentication mode"
},
"tokens": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/bearerAuthToken" }
},
"allowUnauthenticatedHealth": {
"type": "boolean",
"default": false,
"description": "Allow unauthenticated access to /health"
}
},
"additionalProperties": false
},
"oidcJwtAuthConfig": {
"type": "object",
"required": ["mode", "issuer", "audience", "jwksUri"],
"properties": {
"mode": {
"type": "string",
"enum": ["oidc_jwt"],
"description": "OIDC JWT bearer authentication mode"
},
"issuer": {
"type": "string",
"minLength": 1,
"description": "Expected issuer claim (`iss`)"
},
"audience": {
"description": "Expected audience claim (`aud`)",
"oneOf": [
{ "type": "string", "minLength": 1 },
{
"type": "array",
"minItems": 1,
"items": { "type": "string", "minLength": 1 }
}
]
},
"jwksUri": {
"type": "string",
"minLength": 1,
"description": "JWKS endpoint URL for signature verification"
},
"algorithms": {
"type": "array",
"items": {
"type": "string",
"enum": ["RS256", "RS384", "RS512", "ES256", "ES384", "ES512"]
},
"description": "Allowed JWT signature algorithms (default: RS256)"
},
"clockSkewSeconds": {
"type": "integer",
"minimum": 0,
"description": "Clock skew tolerance for exp/nbf checks"
},
"jwksCacheTtlSeconds": {
"type": "integer",
"minimum": 0,
"description": "JWKS cache TTL in seconds"
},
"jwksFetchTimeoutMs": {
"type": "integer",
"minimum": 1,
"description": "JWKS fetch timeout in milliseconds"
},
"allowUnauthenticatedHealth": {
"type": "boolean",
"default": false,
"description": "Allow unauthenticated access to /health"
}
},
"additionalProperties": false
},
"authorizationRuleConfig": {
"type": "object",
"required": ["effect"],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Stable policy rule identifier"
},
"effect": {
"type": "string",
"enum": ["allow", "deny"],
"description": "Rule effect"
},
"principals": {
"type": "array",
"items": { "type": "string" },
"description": "Principal patterns (supports '*' wildcards)"
},
"tools": {
"type": "array",
"items": { "type": "string" },
"description": "Tool patterns (supports '*' wildcards, including server__tool)"
}
},
"additionalProperties": false
},
"authorizationConfig": {
"type": "object",
"required": ["rules"],
"properties": {
"defaultEffect": {
"type": "string",
"enum": ["allow", "deny"],
"description": "Default effect when no rule matches"
},
"rules": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/authorizationRuleConfig" },
"description": "Ordered authorization policy rules"
}
},
"additionalProperties": false
},
"abuseControlsConfig": {
"type": "object",
"properties": {
"globalRequestsPerMinute": {
"type": "integer",
"minimum": 1,
"description": "Max total requests per minute across all principals"
},
"principalRequestsPerMinute": {
"type": "integer",
"minimum": 1,
"description": "Max requests per minute for each principal"
},
"principalMaxInFlight": {
"type": "integer",
"minimum": 1,
"description": "Max concurrent in-flight requests per principal"
},
"cidrAllowlist": {
"type": "array",
"items": { "type": "string" },
"description": "Allowed source CIDRs/IPs for listener requests"
}
},
"additionalProperties": false
},
"auditLogConfig": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable structured audit logging"
},
"includeRequestBody": {
"type": "boolean",
"description": "Include redacted request payload details when available"
},
"maxPayloadChars": {
"type": "integer",
"minimum": 0,
"description": "Maximum serialized payload chars in audit log (0 = omit payload)"
},
"redactKeys": {
"type": "array",
"items": { "type": "string" },
"description": "Additional payload keys to redact"
}
},
"additionalProperties": false
},
"metricsConfig": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable Prometheus metrics endpoint"
},
"path": {
"type": "string",
"minLength": 1,
"description": "Metrics endpoint path (default: /metrics)"
},
"allowUnauthenticated": {
"type": "boolean",
"description": "Allow unauthenticated metrics access"
}
},
"additionalProperties": false
}
}
}