melchizedek-agents 1.0.2 → 1.1.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.
Files changed (122) hide show
  1. package/.env.example +19 -2
  2. package/CHANGELOG.md +333 -0
  3. package/DOCUMENTATION.md +99 -39
  4. package/README.md +1 -0
  5. package/config/agents/README.md +2 -2
  6. package/config/agents/examples/ares.yaml +6 -10
  7. package/config/agents/examples/assistant.yaml +6 -6
  8. package/config/agents/examples/augustin.yaml +9 -15
  9. package/config/agents/examples/cartographers.yaml +6 -6
  10. package/config/agents/examples/council.yaml +6 -6
  11. package/config/agents/examples/critic.yaml +16 -16
  12. package/config/agents/examples/harness.yaml +4 -4
  13. package/config/agents/examples/image_production.yaml +33 -32
  14. package/config/agents/examples/librarian.yaml +4 -4
  15. package/config/agents/examples/patient_advocate.yaml +6 -10
  16. package/config/agents/examples/pipeline.yaml +20 -19
  17. package/config/agents/examples/research.yaml +36 -43
  18. package/config/agents/examples/scribe.yaml +31 -32
  19. package/config/agents/examples/scriptorium.yaml +6 -6
  20. package/config/agents/examples/structured_critic.yaml +82 -0
  21. package/config/agents/examples/style_council.yaml +9 -11
  22. package/config/agents/examples/syndicate.yaml +3 -5
  23. package/config/agents/examples/tutor.yaml +2 -2
  24. package/config/agents/examples/weather.yaml +2 -2
  25. package/config/agents/syndicate.schema.json +1979 -0
  26. package/config/agents/syndicateSchema.yaml +109 -72
  27. package/config/agents/templates/README.md +1 -1
  28. package/config/agents/templates/account_memory.yaml +4 -4
  29. package/config/agents/templates/case_desk.yaml +6 -6
  30. package/config/agents/templates/conversational.yaml +2 -2
  31. package/config/agents/templates/draft_review.yaml +6 -6
  32. package/config/agents/templates/intake_extractor.yaml +61 -60
  33. package/config/agents/templates/research_brief.yaml +6 -6
  34. package/config/agents/templates/research_desk.yaml +6 -6
  35. package/config/agents/templates/review_panel.yaml +8 -8
  36. package/config/agents/templates/support_triage.yaml +30 -29
  37. package/config/agents/templates/systems_operator.yaml +21 -5
  38. package/db/migrations/0014_durable_runs.sql +31 -0
  39. package/dist/lib/a2a/app.d.ts +15 -0
  40. package/dist/lib/a2a/app.js +53 -5
  41. package/dist/lib/a2a/executor.d.ts +7 -1
  42. package/dist/lib/a2a/executor.js +34 -4
  43. package/dist/lib/a2a/oauthSetup.d.ts +90 -0
  44. package/dist/lib/a2a/oauthSetup.js +205 -0
  45. package/dist/lib/agentDialect.d.ts +66 -0
  46. package/dist/lib/agentDialect.js +134 -0
  47. package/dist/lib/compile.d.ts +10 -5
  48. package/dist/lib/compile.js +69 -37
  49. package/dist/lib/compileNative.js +2 -0
  50. package/dist/lib/dispatch.d.ts +10 -5
  51. package/dist/lib/dispatch.js +10 -5
  52. package/dist/lib/doctor.d.ts +34 -1
  53. package/dist/lib/doctor.js +47 -3
  54. package/dist/lib/loadSyndicate.d.ts +45 -2
  55. package/dist/lib/loadSyndicate.js +22 -2
  56. package/dist/lib/memory/namespace.d.ts +6 -5
  57. package/dist/lib/memory/namespace.js +6 -5
  58. package/dist/lib/memory/providers.js +3 -4
  59. package/dist/lib/models/capabilities.d.ts +16 -1
  60. package/dist/lib/models/capabilities.js +55 -1
  61. package/dist/lib/observability/tracer.d.ts +8 -1
  62. package/dist/lib/observability/tracer.js +33 -5
  63. package/dist/lib/runtime/approvals.d.ts +6 -0
  64. package/dist/lib/runtime/native/agentLoop.d.ts +18 -1
  65. package/dist/lib/runtime/native/agentLoop.js +105 -11
  66. package/dist/lib/runtime/native/checkpoint.d.ts +164 -0
  67. package/dist/lib/runtime/native/checkpoint.js +365 -0
  68. package/dist/lib/runtime/native/delegate.d.ts +141 -18
  69. package/dist/lib/runtime/native/delegate.js +235 -39
  70. package/dist/lib/runtime/native/interrupts.d.ts +101 -2
  71. package/dist/lib/runtime/native/interrupts.js +201 -1
  72. package/dist/lib/runtime/native/request.d.ts +13 -3
  73. package/dist/lib/runtime/native/request.js +28 -4
  74. package/dist/lib/runtime/native/telemetry.js +10 -15
  75. package/dist/lib/runtime/questions.d.ts +7 -4
  76. package/dist/lib/runtime/sessions.d.ts +1 -1
  77. package/dist/lib/runtime/syndicateTurn.d.ts +7 -1
  78. package/dist/lib/runtime/syndicateTurn.js +74 -22
  79. package/dist/lib/runtime/turnControl.d.ts +15 -0
  80. package/dist/lib/runtime/turnControl.js +10 -0
  81. package/dist/lib/storage/postgres/index.d.ts +6 -1
  82. package/dist/lib/storage/postgres/index.js +7 -2
  83. package/dist/lib/storage/postgres/taskQueue.d.ts +14 -2
  84. package/dist/lib/storage/postgres/taskQueue.js +20 -3
  85. package/dist/lib/storage/postgres/taskStore.d.ts +26 -2
  86. package/dist/lib/storage/postgres/taskStore.js +74 -8
  87. package/dist/lib/syndicateSchema.d.ts +278 -0
  88. package/dist/lib/syndicateSchema.js +182 -15
  89. package/dist/lib/tools/auth.d.ts +7 -5
  90. package/dist/lib/tools/auth.js +12 -4
  91. package/dist/lib/tools/credentialEnv.d.ts +28 -0
  92. package/dist/lib/tools/credentialEnv.js +52 -0
  93. package/dist/lib/tools/credentialStore.js +9 -2
  94. package/dist/lib/tools/mcpToolFactory.d.ts +25 -2
  95. package/dist/lib/tools/mcpToolFactory.js +179 -21
  96. package/dist/lib/tools/oauthHosts.d.ts +71 -0
  97. package/dist/lib/tools/oauthHosts.js +154 -0
  98. package/dist/lib/tools/oauthTools.d.ts +233 -0
  99. package/dist/lib/tools/oauthTools.js +421 -0
  100. package/dist/lib/tools/openapiTools.d.ts +4 -6
  101. package/dist/lib/tools/openapiTools.js +40 -36
  102. package/dist/lib/tools/taskTools.d.ts +30 -5
  103. package/dist/lib/tools/taskTools.js +74 -10
  104. package/dist/lib/workflow.d.ts +8 -4
  105. package/dist/lib/workflow.js +8 -4
  106. package/dist/lib/workflowConfig.d.ts +6 -0
  107. package/dist/scripts/a2a_server.d.ts +36 -0
  108. package/dist/scripts/a2a_server.js +122 -1
  109. package/dist/scripts/assistant_worker.d.ts +10 -0
  110. package/dist/scripts/assistant_worker.js +69 -19
  111. package/dist/scripts/doctor.d.ts +4 -1
  112. package/dist/scripts/doctor.js +5 -2
  113. package/dist/scripts/yaml_codemod.d.ts +52 -0
  114. package/dist/scripts/yaml_codemod.js +570 -0
  115. package/package.json +11 -7
  116. package/skills/briefs/melchizedek-author.md +7 -5
  117. package/skills/briefs/melchizedek-models.md +4 -3
  118. package/skills/briefs/melchizedek.md +1 -0
  119. package/skills/melchizedek/SKILL.md +1 -0
  120. package/skills/melchizedek-author/SKILL.md +7 -4
  121. package/skills/melchizedek-author/assets/minimal.yaml +13 -13
  122. package/skills/melchizedek-models/SKILL.md +6 -3
@@ -0,0 +1,1979 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "syndicate_name": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "description": "Display name for this syndicate."
9
+ },
10
+ "orchestrator": {
11
+ "type": "object",
12
+ "properties": {
13
+ "name": {
14
+ "type": "string",
15
+ "pattern": "^[A-Za-z_$][A-Za-z0-9_$-]*$",
16
+ "description": "Unique agent name within the tree. A valid identifier; cannot be \"user\"."
17
+ },
18
+ "description": {
19
+ "description": "One line other agents read to decide when to delegate here.",
20
+ "type": "string"
21
+ },
22
+ "model": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "description": "Model id; its prefix picks the provider (gemini-*, claude-*, gpt-*/o*, grok-*, ollama/*)."
26
+ },
27
+ "fallback_model": {
28
+ "description": "A model on another provider that answers when this agent's model fails provider-side (5xx, 429, network) before producing anything, or while that provider's circuit is open (ADR 0044).",
29
+ "type": "string",
30
+ "minLength": 1
31
+ },
32
+ "instruction": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "description": "System prompt / persona."
36
+ },
37
+ "globalInstruction": {
38
+ "description": "Instruction applied to every agent in the tree; only the root agent's value takes effect.",
39
+ "type": "string"
40
+ },
41
+ "tools": {
42
+ "description": "Named tools from lib/toolRegistry.ts (e.g. web_search, web_extract, wiki_search).",
43
+ "type": "array",
44
+ "items": {
45
+ "type": "string",
46
+ "minLength": 1
47
+ }
48
+ },
49
+ "require_approval": {
50
+ "description": "Tools from this agent's `tools` that run only after a person approves the exact call (ADR 0028): the A2A task ends input-required until the caller answers approve or reject. Allowed on any agent but one a workflow map node runs; inside a delegated subagent the pause reaches the caller through its open call (ADR 0110).",
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string",
54
+ "minLength": 1
55
+ }
56
+ },
57
+ "includeContents": {
58
+ "description": "\"default\" = include conversation history, \"none\" = stateless.",
59
+ "type": "string",
60
+ "enum": [
61
+ "default",
62
+ "none"
63
+ ]
64
+ },
65
+ "disallowTransferToParent": {
66
+ "type": "boolean"
67
+ },
68
+ "disallowTransferToPeers": {
69
+ "type": "boolean"
70
+ },
71
+ "outputKey": {
72
+ "description": "Session-state key the final reply is saved under.",
73
+ "type": "string"
74
+ },
75
+ "generateContentConfig": {
76
+ "type": "object",
77
+ "properties": {
78
+ "temperature": {
79
+ "type": "number"
80
+ },
81
+ "topP": {
82
+ "type": "number"
83
+ },
84
+ "topK": {
85
+ "type": "number"
86
+ },
87
+ "maxOutputTokens": {
88
+ "type": "integer",
89
+ "exclusiveMinimum": 0,
90
+ "maximum": 9007199254740991
91
+ },
92
+ "stopSequences": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "string"
96
+ }
97
+ },
98
+ "candidateCount": {
99
+ "type": "integer",
100
+ "exclusiveMinimum": 0,
101
+ "maximum": 9007199254740991
102
+ },
103
+ "presencePenalty": {
104
+ "type": "number"
105
+ },
106
+ "frequencyPenalty": {
107
+ "type": "number"
108
+ },
109
+ "seed": {
110
+ "type": "integer",
111
+ "minimum": -9007199254740991,
112
+ "maximum": 9007199254740991
113
+ },
114
+ "responseMimeType": {
115
+ "type": "string"
116
+ },
117
+ "safetySettings": {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "object",
121
+ "properties": {
122
+ "category": {
123
+ "type": "string"
124
+ },
125
+ "threshold": {
126
+ "type": "string"
127
+ }
128
+ },
129
+ "required": [
130
+ "category",
131
+ "threshold"
132
+ ],
133
+ "additionalProperties": {}
134
+ }
135
+ },
136
+ "thinkingConfig": {
137
+ "type": "object",
138
+ "properties": {
139
+ "thinkingBudget": {
140
+ "description": "Reasoning token budget. 0 = off, -1 = dynamic.",
141
+ "type": "integer",
142
+ "minimum": -9007199254740991,
143
+ "maximum": 9007199254740991
144
+ },
145
+ "includeThoughts": {
146
+ "description": "Stream the thinking trace in the response.",
147
+ "type": "boolean"
148
+ }
149
+ },
150
+ "additionalProperties": {},
151
+ "description": "Older spelling of `reasoning` for Gemini and Claude (thinkingLevel or thinkingBudget). Cannot be combined with `reasoning`."
152
+ },
153
+ "reasoningEffort": {
154
+ "description": "Older spelling of `reasoning` for the chat-completions and Responses providers. Cannot be combined with `reasoning`.",
155
+ "type": "string"
156
+ }
157
+ },
158
+ "additionalProperties": {},
159
+ "description": "Deprecated v1 spelling (ADR 0115): write `sampling` (temperature, top_p, max_output_tokens, stop), `output.mime` (responseMimeType) and `reasoning` (thinkingConfig, reasoningEffort) instead; npx melchizedek-codemod rewrites a file. Still read: the Gemini GenerateContentConfig shape the engine takes. Do not set tools here.",
160
+ "deprecated": true
161
+ },
162
+ "reasoning": {
163
+ "anyOf": [
164
+ {
165
+ "type": "string",
166
+ "enum": [
167
+ "none",
168
+ "low",
169
+ "medium",
170
+ "high"
171
+ ]
172
+ },
173
+ {
174
+ "type": "object",
175
+ "properties": {
176
+ "budget_tokens": {
177
+ "type": "integer",
178
+ "minimum": 0,
179
+ "maximum": 9007199254740991,
180
+ "description": "Thinking tokens; 0 = none. Effort-only providers take the nearest level at or above it."
181
+ }
182
+ },
183
+ "required": [
184
+ "budget_tokens"
185
+ ],
186
+ "additionalProperties": false
187
+ }
188
+ ],
189
+ "description": "How hard this agent reasons, on any provider: none | low | medium | high, or { budget_tokens: <int> }. Replaces generateContentConfig.thinkingConfig and reasoningEffort (ADR 0047)."
190
+ },
191
+ "sampling": {
192
+ "type": "object",
193
+ "properties": {
194
+ "temperature": {
195
+ "description": "Sampling temperature. Replaces generateContentConfig.temperature.",
196
+ "type": "number"
197
+ },
198
+ "top_p": {
199
+ "description": "Nucleus sampling. Replaces generateContentConfig.topP.",
200
+ "type": "number"
201
+ },
202
+ "max_output_tokens": {
203
+ "description": "Cap on the reply's tokens. Replaces generateContentConfig.maxOutputTokens.",
204
+ "type": "integer",
205
+ "exclusiveMinimum": 0,
206
+ "maximum": 9007199254740991
207
+ },
208
+ "stop": {
209
+ "description": "Stop sequences. Replaces generateContentConfig.stopSequences.",
210
+ "minItems": 1,
211
+ "type": "array",
212
+ "items": {
213
+ "type": "string"
214
+ }
215
+ }
216
+ },
217
+ "additionalProperties": false,
218
+ "description": "How this agent samples, on any provider (ADR 0115). Replaces the same keys under generateContentConfig; cannot be combined with them.",
219
+ "minProperties": 1
220
+ },
221
+ "output": {
222
+ "type": "object",
223
+ "properties": {
224
+ "schema": {
225
+ "description": "JSON Schema the final reply is one object of. Replaces outputSchema; same behaviour beside tools and subagents (ADR 0109).",
226
+ "type": "object",
227
+ "propertyNames": {
228
+ "type": "string"
229
+ },
230
+ "additionalProperties": {}
231
+ },
232
+ "mime": {
233
+ "description": "application/json: JSON mode without a schema. Replaces generateContentConfig.responseMimeType.",
234
+ "type": "string",
235
+ "enum": [
236
+ "application/json",
237
+ "text/plain"
238
+ ]
239
+ }
240
+ },
241
+ "additionalProperties": false,
242
+ "description": "What this agent's final reply is (ADR 0115). Replaces outputSchema and generateContentConfig.responseMimeType; cannot be combined with them.",
243
+ "minProperties": 1
244
+ },
245
+ "model_overrides": {
246
+ "type": "object",
247
+ "properties": {
248
+ "gemini": {
249
+ "type": "object",
250
+ "properties": {
251
+ "instruction": {
252
+ "description": "Replaces the agent's instruction on this provider.",
253
+ "type": "string",
254
+ "minLength": 1
255
+ },
256
+ "instruction_append": {
257
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
258
+ "type": "string",
259
+ "minLength": 1
260
+ }
261
+ },
262
+ "additionalProperties": false,
263
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
264
+ "oneOf": [
265
+ {
266
+ "required": [
267
+ "instruction"
268
+ ]
269
+ },
270
+ {
271
+ "required": [
272
+ "instruction_append"
273
+ ]
274
+ }
275
+ ]
276
+ },
277
+ "anthropic": {
278
+ "type": "object",
279
+ "properties": {
280
+ "instruction": {
281
+ "description": "Replaces the agent's instruction on this provider.",
282
+ "type": "string",
283
+ "minLength": 1
284
+ },
285
+ "instruction_append": {
286
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
287
+ "type": "string",
288
+ "minLength": 1
289
+ }
290
+ },
291
+ "additionalProperties": false,
292
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
293
+ "oneOf": [
294
+ {
295
+ "required": [
296
+ "instruction"
297
+ ]
298
+ },
299
+ {
300
+ "required": [
301
+ "instruction_append"
302
+ ]
303
+ }
304
+ ]
305
+ },
306
+ "openai": {
307
+ "type": "object",
308
+ "properties": {
309
+ "instruction": {
310
+ "description": "Replaces the agent's instruction on this provider.",
311
+ "type": "string",
312
+ "minLength": 1
313
+ },
314
+ "instruction_append": {
315
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
316
+ "type": "string",
317
+ "minLength": 1
318
+ }
319
+ },
320
+ "additionalProperties": false,
321
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
322
+ "oneOf": [
323
+ {
324
+ "required": [
325
+ "instruction"
326
+ ]
327
+ },
328
+ {
329
+ "required": [
330
+ "instruction_append"
331
+ ]
332
+ }
333
+ ]
334
+ },
335
+ "xai": {
336
+ "type": "object",
337
+ "properties": {
338
+ "instruction": {
339
+ "description": "Replaces the agent's instruction on this provider.",
340
+ "type": "string",
341
+ "minLength": 1
342
+ },
343
+ "instruction_append": {
344
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
345
+ "type": "string",
346
+ "minLength": 1
347
+ }
348
+ },
349
+ "additionalProperties": false,
350
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
351
+ "oneOf": [
352
+ {
353
+ "required": [
354
+ "instruction"
355
+ ]
356
+ },
357
+ {
358
+ "required": [
359
+ "instruction_append"
360
+ ]
361
+ }
362
+ ]
363
+ },
364
+ "moonshot": {
365
+ "type": "object",
366
+ "properties": {
367
+ "instruction": {
368
+ "description": "Replaces the agent's instruction on this provider.",
369
+ "type": "string",
370
+ "minLength": 1
371
+ },
372
+ "instruction_append": {
373
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
374
+ "type": "string",
375
+ "minLength": 1
376
+ }
377
+ },
378
+ "additionalProperties": false,
379
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
380
+ "oneOf": [
381
+ {
382
+ "required": [
383
+ "instruction"
384
+ ]
385
+ },
386
+ {
387
+ "required": [
388
+ "instruction_append"
389
+ ]
390
+ }
391
+ ]
392
+ },
393
+ "ollama": {
394
+ "type": "object",
395
+ "properties": {
396
+ "instruction": {
397
+ "description": "Replaces the agent's instruction on this provider.",
398
+ "type": "string",
399
+ "minLength": 1
400
+ },
401
+ "instruction_append": {
402
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
403
+ "type": "string",
404
+ "minLength": 1
405
+ }
406
+ },
407
+ "additionalProperties": false,
408
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
409
+ "oneOf": [
410
+ {
411
+ "required": [
412
+ "instruction"
413
+ ]
414
+ },
415
+ {
416
+ "required": [
417
+ "instruction_append"
418
+ ]
419
+ }
420
+ ]
421
+ }
422
+ },
423
+ "additionalProperties": false,
424
+ "description": "Per-provider instruction, keyed by the provider of the agent's model id (lib/models/providerMap.ts). Applied at compile time before the skills index; not to fallback_model, and never to globalInstruction (ADR 0115)."
425
+ },
426
+ "outputSchema": {
427
+ "description": "Deprecated v1 spelling (ADR 0115): write output.schema. JSON Schema for structured output: the agent answers with one JSON object matching it. An agent that also calls tools or delegates to subagents does that first, then ends its turn on that JSON: the schema travels beside the tools where the model takes both in one request, as a set_model_response tool elsewhere (the capability matrix's structured_output_with_tools, ADR 0109).",
428
+ "type": "object",
429
+ "propertyNames": {
430
+ "type": "string"
431
+ },
432
+ "additionalProperties": {},
433
+ "deprecated": true
434
+ },
435
+ "mcp_server_url": {
436
+ "description": "MCP server (SSE) whose tools are discovered at runtime and merged with `tools`.",
437
+ "type": "string"
438
+ },
439
+ "mcp_tools": {
440
+ "description": "The MCP server's tools this agent may use, by name; any other tool the server lists is not exposed. Without it, every listed tool is. require_approval may name these. Needs mcp_server_url.",
441
+ "minItems": 1,
442
+ "type": "array",
443
+ "items": {
444
+ "type": "string",
445
+ "minLength": 1
446
+ }
447
+ },
448
+ "mcp_auth": {
449
+ "description": "The OAuth grant the MCP server takes (ADR 0112). With authorization_code, each user's own token on their own connection, and mcp_tools is required. Needs mcp_server_url; replaces MCP_BEARER_TOKENS for this server.",
450
+ "type": "object",
451
+ "properties": {
452
+ "oauth2": {
453
+ "type": "object",
454
+ "properties": {
455
+ "provider": {
456
+ "type": "string",
457
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$",
458
+ "description": "The credential store's name for the provider (e.g. github). Every tool naming it shares one grant."
459
+ },
460
+ "grant": {
461
+ "type": "string",
462
+ "enum": [
463
+ "authorization_code",
464
+ "client_credentials"
465
+ ],
466
+ "description": "authorization_code: each user's own token, granted through the consent pause (ADR 0085). client_credentials: the server's own token, from the token endpoint."
467
+ },
468
+ "authorization_url": {
469
+ "description": "The provider's authorization endpoint (https). authorization_code only.",
470
+ "type": "string",
471
+ "format": "uri"
472
+ },
473
+ "token_url": {
474
+ "type": "string",
475
+ "format": "uri",
476
+ "description": "The provider's token endpoint (https)."
477
+ },
478
+ "client_id": {
479
+ "description": "The OAuth client id, written out (it is not a secret). Or client_id_env.",
480
+ "type": "string",
481
+ "minLength": 1,
482
+ "maxLength": 512
483
+ },
484
+ "client_id_env": {
485
+ "description": "Environment variable holding the client id. Or client_id.",
486
+ "type": "string",
487
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
488
+ },
489
+ "client_secret_env": {
490
+ "description": "Environment variable NAME holding the client secret, never the value. Required for client_credentials; omit for a public client (PKCE alone).",
491
+ "type": "string",
492
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
493
+ },
494
+ "scopes": {
495
+ "description": "The scopes the grant asks for.",
496
+ "maxItems": 64,
497
+ "type": "array",
498
+ "items": {
499
+ "type": "string",
500
+ "pattern": "^[\\x21\\x23-\\x5b\\x5d-\\x7e]{1,256}$"
501
+ }
502
+ },
503
+ "authorization_params": {
504
+ "description": "Extra authorization parameters (e.g. access_type: offline). authorization_code only; never state, redirect_uri, scope, client_id or the PKCE pair.",
505
+ "type": "object",
506
+ "propertyNames": {
507
+ "type": "string",
508
+ "pattern": "^[A-Za-z0-9_.-]{1,64}$"
509
+ },
510
+ "additionalProperties": {
511
+ "type": "string",
512
+ "maxLength": 512
513
+ }
514
+ }
515
+ },
516
+ "required": [
517
+ "provider",
518
+ "grant",
519
+ "token_url"
520
+ ],
521
+ "additionalProperties": false,
522
+ "description": "An OAuth 2 access token sent as a bearer token on every call (lib/tools/oauthTools.ts). Secrets come from environment variable names, never values."
523
+ }
524
+ },
525
+ "required": [
526
+ "oauth2"
527
+ ],
528
+ "additionalProperties": false
529
+ },
530
+ "skills": {
531
+ "type": "object",
532
+ "properties": {
533
+ "dir": {
534
+ "type": "string",
535
+ "minLength": 1,
536
+ "description": "A directory of skills: one subdirectory per skill, named as its SKILL.md frontmatter names it. Relative to the working directory."
537
+ },
538
+ "scripts": {
539
+ "description": "Whether a skill's scripts/ may run. \"local\" runs them on this machine, each after a person approves (ADR 0028); default \"none\".",
540
+ "type": "string",
541
+ "enum": [
542
+ "none",
543
+ "local"
544
+ ]
545
+ },
546
+ "tools": {
547
+ "description": "Registry tool names a skill may unlock through its `allowed-tools` frontmatter once it is loaded. Omitted, no skill unlocks anything.",
548
+ "type": "array",
549
+ "items": {
550
+ "type": "string",
551
+ "minLength": 1
552
+ }
553
+ },
554
+ "env": {
555
+ "description": "Environment variable NAMES (never values) a skill script gets, beyond PATH, HOME, the temp directory, the locale and the OS essentials (ADR 0086). A name that looks like a secret (KEY, TOKEN, SECRET, PASSWORD, AUTH, DATABASE, …) belongs under secret_env.",
556
+ "type": "array",
557
+ "items": {
558
+ "type": "string",
559
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
560
+ }
561
+ },
562
+ "secret_env": {
563
+ "description": "Secret-shaped environment variable names a skill script gets, listed here so passing a credential to a script is a deliberate, reviewable act (ADR 0086).",
564
+ "type": "array",
565
+ "items": {
566
+ "type": "string",
567
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
568
+ }
569
+ }
570
+ },
571
+ "required": [
572
+ "dir"
573
+ ],
574
+ "additionalProperties": false,
575
+ "description": "Agent Skills (SKILL.md directories) this agent reads the way a coding harness does."
576
+ },
577
+ "openapi": {
578
+ "minItems": 1,
579
+ "type": "array",
580
+ "items": {
581
+ "type": "object",
582
+ "properties": {
583
+ "spec": {
584
+ "type": "string",
585
+ "minLength": 1,
586
+ "description": "An OpenAPI 3 spec file (.yaml, .yml, .json), relative to this syndicate file. Files only, never URLs."
587
+ },
588
+ "operations": {
589
+ "description": "Operations to expose, by operationId or tool name. Omitted: every GET operation, and nothing that writes.",
590
+ "minItems": 1,
591
+ "type": "array",
592
+ "items": {
593
+ "type": "string",
594
+ "minLength": 1
595
+ }
596
+ },
597
+ "base_url": {
598
+ "description": "Overrides the spec's servers[0].url. Checked by the SSRF guard.",
599
+ "type": "string",
600
+ "format": "uri"
601
+ },
602
+ "prefix": {
603
+ "description": "Prepended to each tool name, to keep two APIs apart.",
604
+ "type": "string",
605
+ "pattern": "^[a-z][a-z0-9_]*$"
606
+ },
607
+ "auth": {
608
+ "description": "Credentials, always from the environment, never written in YAML.",
609
+ "type": "object",
610
+ "properties": {
611
+ "bearer_env": {
612
+ "description": "Environment variable holding a bearer token.",
613
+ "type": "string",
614
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
615
+ },
616
+ "api_key": {
617
+ "description": "An API key read from `env`, sent in a header or the query under `name`.",
618
+ "type": "object",
619
+ "properties": {
620
+ "env": {
621
+ "type": "string",
622
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
623
+ },
624
+ "in": {
625
+ "type": "string",
626
+ "enum": [
627
+ "header",
628
+ "query"
629
+ ]
630
+ },
631
+ "name": {
632
+ "type": "string",
633
+ "minLength": 1
634
+ }
635
+ },
636
+ "required": [
637
+ "env",
638
+ "in",
639
+ "name"
640
+ ],
641
+ "additionalProperties": false
642
+ },
643
+ "oauth2": {
644
+ "type": "object",
645
+ "properties": {
646
+ "provider": {
647
+ "type": "string",
648
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$",
649
+ "description": "The credential store's name for the provider (e.g. github). Every tool naming it shares one grant."
650
+ },
651
+ "grant": {
652
+ "type": "string",
653
+ "enum": [
654
+ "authorization_code",
655
+ "client_credentials"
656
+ ],
657
+ "description": "authorization_code: each user's own token, granted through the consent pause (ADR 0085). client_credentials: the server's own token, from the token endpoint."
658
+ },
659
+ "authorization_url": {
660
+ "description": "The provider's authorization endpoint (https). authorization_code only.",
661
+ "type": "string",
662
+ "format": "uri"
663
+ },
664
+ "token_url": {
665
+ "type": "string",
666
+ "format": "uri",
667
+ "description": "The provider's token endpoint (https)."
668
+ },
669
+ "client_id": {
670
+ "description": "The OAuth client id, written out (it is not a secret). Or client_id_env.",
671
+ "type": "string",
672
+ "minLength": 1,
673
+ "maxLength": 512
674
+ },
675
+ "client_id_env": {
676
+ "description": "Environment variable holding the client id. Or client_id.",
677
+ "type": "string",
678
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
679
+ },
680
+ "client_secret_env": {
681
+ "description": "Environment variable NAME holding the client secret, never the value. Required for client_credentials; omit for a public client (PKCE alone).",
682
+ "type": "string",
683
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
684
+ },
685
+ "scopes": {
686
+ "description": "The scopes the grant asks for.",
687
+ "maxItems": 64,
688
+ "type": "array",
689
+ "items": {
690
+ "type": "string",
691
+ "pattern": "^[\\x21\\x23-\\x5b\\x5d-\\x7e]{1,256}$"
692
+ }
693
+ },
694
+ "authorization_params": {
695
+ "description": "Extra authorization parameters (e.g. access_type: offline). authorization_code only; never state, redirect_uri, scope, client_id or the PKCE pair.",
696
+ "type": "object",
697
+ "propertyNames": {
698
+ "type": "string",
699
+ "pattern": "^[A-Za-z0-9_.-]{1,64}$"
700
+ },
701
+ "additionalProperties": {
702
+ "type": "string",
703
+ "maxLength": 512
704
+ }
705
+ }
706
+ },
707
+ "required": [
708
+ "provider",
709
+ "grant",
710
+ "token_url"
711
+ ],
712
+ "additionalProperties": false,
713
+ "description": "An OAuth 2 access token sent as a bearer token on every call (lib/tools/oauthTools.ts). Secrets come from environment variable names, never values."
714
+ }
715
+ },
716
+ "additionalProperties": false
717
+ }
718
+ },
719
+ "required": [
720
+ "spec"
721
+ ],
722
+ "additionalProperties": false,
723
+ "description": "An HTTP API as tools, from its OpenAPI spec (lib/tools/openapiTools.ts)."
724
+ }
725
+ },
726
+ "code_execution": {
727
+ "description": "\"gemini\": the model writes and runs Python in Gemini's server-side sandbox; nothing runs on this host. Gemini models only.",
728
+ "type": "string",
729
+ "const": "gemini"
730
+ },
731
+ "context": {
732
+ "description": "Summarize a long conversation instead of overflowing the window. The orchestrator of a delegate syndicate only.",
733
+ "type": "object",
734
+ "properties": {
735
+ "compact_after_tokens": {
736
+ "type": "integer",
737
+ "minimum": 1000,
738
+ "maximum": 9007199254740991,
739
+ "description": "Compact when the last request's prompt passed this many tokens."
740
+ },
741
+ "keep_recent_events": {
742
+ "description": "Events kept verbatim after the summary. Default 6.",
743
+ "type": "integer",
744
+ "minimum": 1,
745
+ "maximum": 100
746
+ },
747
+ "summary_model": {
748
+ "description": "The model that writes the summary. Default: the agent's own.",
749
+ "type": "string",
750
+ "minLength": 1
751
+ }
752
+ },
753
+ "required": [
754
+ "compact_after_tokens"
755
+ ],
756
+ "additionalProperties": false
757
+ },
758
+ "examples": {
759
+ "description": "Few-shot exchanges (input, output) added to every request's instruction.",
760
+ "minItems": 1,
761
+ "maxItems": 20,
762
+ "type": "array",
763
+ "items": {
764
+ "type": "object",
765
+ "properties": {
766
+ "input": {
767
+ "type": "string",
768
+ "minLength": 1
769
+ },
770
+ "output": {
771
+ "type": "string",
772
+ "minLength": 1
773
+ }
774
+ },
775
+ "required": [
776
+ "input",
777
+ "output"
778
+ ],
779
+ "additionalProperties": false
780
+ }
781
+ },
782
+ "mode": {
783
+ "description": "\"task\": the agent works until it calls finish_task; its arguments (matching outputSchema) are the node's output. Workflow nodes only.",
784
+ "type": "string",
785
+ "const": "task"
786
+ },
787
+ "orchestration": {
788
+ "type": "object",
789
+ "properties": {
790
+ "role": {
791
+ "type": "string",
792
+ "enum": [
793
+ "primary",
794
+ "sub-agent"
795
+ ]
796
+ },
797
+ "delegates": {
798
+ "type": "array",
799
+ "items": {
800
+ "type": "string"
801
+ }
802
+ }
803
+ },
804
+ "additionalProperties": false
805
+ }
806
+ },
807
+ "required": [
808
+ "name",
809
+ "model",
810
+ "instruction"
811
+ ],
812
+ "additionalProperties": false,
813
+ "description": "The root agent, which the engine's agent loop runs (keys spelled after ADK's LlmAgentConfig)."
814
+ },
815
+ "subagents": {
816
+ "description": "The orchestrator's team. Omit it (or write `subagents: []`) for a single-agent syndicate.",
817
+ "type": "array",
818
+ "items": {
819
+ "type": "object",
820
+ "properties": {
821
+ "name": {
822
+ "type": "string",
823
+ "pattern": "^[A-Za-z_$][A-Za-z0-9_$-]*$",
824
+ "description": "Unique agent name within the tree. A valid identifier; cannot be \"user\"."
825
+ },
826
+ "description": {
827
+ "type": "string",
828
+ "minLength": 1,
829
+ "description": "Required: the orchestrator reads it to decide when to call this subagent."
830
+ },
831
+ "model": {
832
+ "description": "Model id. Inherits the orchestrator's when omitted.",
833
+ "type": "string",
834
+ "minLength": 1
835
+ },
836
+ "fallback_model": {
837
+ "description": "A model on another provider that answers when this agent's model fails provider-side (5xx, 429, network) before producing anything, or while that provider's circuit is open (ADR 0044).",
838
+ "type": "string",
839
+ "minLength": 1
840
+ },
841
+ "instruction": {
842
+ "type": "string",
843
+ "minLength": 1,
844
+ "description": "System prompt / persona."
845
+ },
846
+ "globalInstruction": {
847
+ "description": "Instruction applied to every agent in the tree; only the root agent's value takes effect.",
848
+ "type": "string"
849
+ },
850
+ "tools": {
851
+ "description": "Named tools from lib/toolRegistry.ts (e.g. web_search, web_extract, wiki_search).",
852
+ "type": "array",
853
+ "items": {
854
+ "type": "string",
855
+ "minLength": 1
856
+ }
857
+ },
858
+ "require_approval": {
859
+ "description": "Tools from this agent's `tools` that run only after a person approves the exact call (ADR 0028): the A2A task ends input-required until the caller answers approve or reject. Allowed on any agent but one a workflow map node runs; inside a delegated subagent the pause reaches the caller through its open call (ADR 0110).",
860
+ "type": "array",
861
+ "items": {
862
+ "type": "string",
863
+ "minLength": 1
864
+ }
865
+ },
866
+ "includeContents": {
867
+ "description": "\"default\" = include conversation history, \"none\" = stateless.",
868
+ "type": "string",
869
+ "enum": [
870
+ "default",
871
+ "none"
872
+ ]
873
+ },
874
+ "disallowTransferToParent": {
875
+ "type": "boolean"
876
+ },
877
+ "disallowTransferToPeers": {
878
+ "type": "boolean"
879
+ },
880
+ "outputKey": {
881
+ "description": "Session-state key the final reply is saved under.",
882
+ "type": "string"
883
+ },
884
+ "generateContentConfig": {
885
+ "type": "object",
886
+ "properties": {
887
+ "temperature": {
888
+ "type": "number"
889
+ },
890
+ "topP": {
891
+ "type": "number"
892
+ },
893
+ "topK": {
894
+ "type": "number"
895
+ },
896
+ "maxOutputTokens": {
897
+ "type": "integer",
898
+ "exclusiveMinimum": 0,
899
+ "maximum": 9007199254740991
900
+ },
901
+ "stopSequences": {
902
+ "type": "array",
903
+ "items": {
904
+ "type": "string"
905
+ }
906
+ },
907
+ "candidateCount": {
908
+ "type": "integer",
909
+ "exclusiveMinimum": 0,
910
+ "maximum": 9007199254740991
911
+ },
912
+ "presencePenalty": {
913
+ "type": "number"
914
+ },
915
+ "frequencyPenalty": {
916
+ "type": "number"
917
+ },
918
+ "seed": {
919
+ "type": "integer",
920
+ "minimum": -9007199254740991,
921
+ "maximum": 9007199254740991
922
+ },
923
+ "responseMimeType": {
924
+ "type": "string"
925
+ },
926
+ "safetySettings": {
927
+ "type": "array",
928
+ "items": {
929
+ "type": "object",
930
+ "properties": {
931
+ "category": {
932
+ "type": "string"
933
+ },
934
+ "threshold": {
935
+ "type": "string"
936
+ }
937
+ },
938
+ "required": [
939
+ "category",
940
+ "threshold"
941
+ ],
942
+ "additionalProperties": {}
943
+ }
944
+ },
945
+ "thinkingConfig": {
946
+ "type": "object",
947
+ "properties": {
948
+ "thinkingBudget": {
949
+ "description": "Reasoning token budget. 0 = off, -1 = dynamic.",
950
+ "type": "integer",
951
+ "minimum": -9007199254740991,
952
+ "maximum": 9007199254740991
953
+ },
954
+ "includeThoughts": {
955
+ "description": "Stream the thinking trace in the response.",
956
+ "type": "boolean"
957
+ }
958
+ },
959
+ "additionalProperties": {},
960
+ "description": "Older spelling of `reasoning` for Gemini and Claude (thinkingLevel or thinkingBudget). Cannot be combined with `reasoning`."
961
+ },
962
+ "reasoningEffort": {
963
+ "description": "Older spelling of `reasoning` for the chat-completions and Responses providers. Cannot be combined with `reasoning`.",
964
+ "type": "string"
965
+ }
966
+ },
967
+ "additionalProperties": {},
968
+ "description": "Deprecated v1 spelling (ADR 0115): write `sampling` (temperature, top_p, max_output_tokens, stop), `output.mime` (responseMimeType) and `reasoning` (thinkingConfig, reasoningEffort) instead; npx melchizedek-codemod rewrites a file. Still read: the Gemini GenerateContentConfig shape the engine takes. Do not set tools here.",
969
+ "deprecated": true
970
+ },
971
+ "reasoning": {
972
+ "anyOf": [
973
+ {
974
+ "type": "string",
975
+ "enum": [
976
+ "none",
977
+ "low",
978
+ "medium",
979
+ "high"
980
+ ]
981
+ },
982
+ {
983
+ "type": "object",
984
+ "properties": {
985
+ "budget_tokens": {
986
+ "type": "integer",
987
+ "minimum": 0,
988
+ "maximum": 9007199254740991,
989
+ "description": "Thinking tokens; 0 = none. Effort-only providers take the nearest level at or above it."
990
+ }
991
+ },
992
+ "required": [
993
+ "budget_tokens"
994
+ ],
995
+ "additionalProperties": false
996
+ }
997
+ ],
998
+ "description": "How hard this agent reasons, on any provider: none | low | medium | high, or { budget_tokens: <int> }. Replaces generateContentConfig.thinkingConfig and reasoningEffort (ADR 0047)."
999
+ },
1000
+ "sampling": {
1001
+ "type": "object",
1002
+ "properties": {
1003
+ "temperature": {
1004
+ "description": "Sampling temperature. Replaces generateContentConfig.temperature.",
1005
+ "type": "number"
1006
+ },
1007
+ "top_p": {
1008
+ "description": "Nucleus sampling. Replaces generateContentConfig.topP.",
1009
+ "type": "number"
1010
+ },
1011
+ "max_output_tokens": {
1012
+ "description": "Cap on the reply's tokens. Replaces generateContentConfig.maxOutputTokens.",
1013
+ "type": "integer",
1014
+ "exclusiveMinimum": 0,
1015
+ "maximum": 9007199254740991
1016
+ },
1017
+ "stop": {
1018
+ "description": "Stop sequences. Replaces generateContentConfig.stopSequences.",
1019
+ "minItems": 1,
1020
+ "type": "array",
1021
+ "items": {
1022
+ "type": "string"
1023
+ }
1024
+ }
1025
+ },
1026
+ "additionalProperties": false,
1027
+ "description": "How this agent samples, on any provider (ADR 0115). Replaces the same keys under generateContentConfig; cannot be combined with them.",
1028
+ "minProperties": 1
1029
+ },
1030
+ "output": {
1031
+ "type": "object",
1032
+ "properties": {
1033
+ "schema": {
1034
+ "description": "JSON Schema the final reply is one object of. Replaces outputSchema; same behaviour beside tools and subagents (ADR 0109).",
1035
+ "type": "object",
1036
+ "propertyNames": {
1037
+ "type": "string"
1038
+ },
1039
+ "additionalProperties": {}
1040
+ },
1041
+ "mime": {
1042
+ "description": "application/json: JSON mode without a schema. Replaces generateContentConfig.responseMimeType.",
1043
+ "type": "string",
1044
+ "enum": [
1045
+ "application/json",
1046
+ "text/plain"
1047
+ ]
1048
+ }
1049
+ },
1050
+ "additionalProperties": false,
1051
+ "description": "What this agent's final reply is (ADR 0115). Replaces outputSchema and generateContentConfig.responseMimeType; cannot be combined with them.",
1052
+ "minProperties": 1
1053
+ },
1054
+ "model_overrides": {
1055
+ "type": "object",
1056
+ "properties": {
1057
+ "gemini": {
1058
+ "type": "object",
1059
+ "properties": {
1060
+ "instruction": {
1061
+ "description": "Replaces the agent's instruction on this provider.",
1062
+ "type": "string",
1063
+ "minLength": 1
1064
+ },
1065
+ "instruction_append": {
1066
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
1067
+ "type": "string",
1068
+ "minLength": 1
1069
+ }
1070
+ },
1071
+ "additionalProperties": false,
1072
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
1073
+ "oneOf": [
1074
+ {
1075
+ "required": [
1076
+ "instruction"
1077
+ ]
1078
+ },
1079
+ {
1080
+ "required": [
1081
+ "instruction_append"
1082
+ ]
1083
+ }
1084
+ ]
1085
+ },
1086
+ "anthropic": {
1087
+ "type": "object",
1088
+ "properties": {
1089
+ "instruction": {
1090
+ "description": "Replaces the agent's instruction on this provider.",
1091
+ "type": "string",
1092
+ "minLength": 1
1093
+ },
1094
+ "instruction_append": {
1095
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
1096
+ "type": "string",
1097
+ "minLength": 1
1098
+ }
1099
+ },
1100
+ "additionalProperties": false,
1101
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
1102
+ "oneOf": [
1103
+ {
1104
+ "required": [
1105
+ "instruction"
1106
+ ]
1107
+ },
1108
+ {
1109
+ "required": [
1110
+ "instruction_append"
1111
+ ]
1112
+ }
1113
+ ]
1114
+ },
1115
+ "openai": {
1116
+ "type": "object",
1117
+ "properties": {
1118
+ "instruction": {
1119
+ "description": "Replaces the agent's instruction on this provider.",
1120
+ "type": "string",
1121
+ "minLength": 1
1122
+ },
1123
+ "instruction_append": {
1124
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
1125
+ "type": "string",
1126
+ "minLength": 1
1127
+ }
1128
+ },
1129
+ "additionalProperties": false,
1130
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
1131
+ "oneOf": [
1132
+ {
1133
+ "required": [
1134
+ "instruction"
1135
+ ]
1136
+ },
1137
+ {
1138
+ "required": [
1139
+ "instruction_append"
1140
+ ]
1141
+ }
1142
+ ]
1143
+ },
1144
+ "xai": {
1145
+ "type": "object",
1146
+ "properties": {
1147
+ "instruction": {
1148
+ "description": "Replaces the agent's instruction on this provider.",
1149
+ "type": "string",
1150
+ "minLength": 1
1151
+ },
1152
+ "instruction_append": {
1153
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
1154
+ "type": "string",
1155
+ "minLength": 1
1156
+ }
1157
+ },
1158
+ "additionalProperties": false,
1159
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
1160
+ "oneOf": [
1161
+ {
1162
+ "required": [
1163
+ "instruction"
1164
+ ]
1165
+ },
1166
+ {
1167
+ "required": [
1168
+ "instruction_append"
1169
+ ]
1170
+ }
1171
+ ]
1172
+ },
1173
+ "moonshot": {
1174
+ "type": "object",
1175
+ "properties": {
1176
+ "instruction": {
1177
+ "description": "Replaces the agent's instruction on this provider.",
1178
+ "type": "string",
1179
+ "minLength": 1
1180
+ },
1181
+ "instruction_append": {
1182
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
1183
+ "type": "string",
1184
+ "minLength": 1
1185
+ }
1186
+ },
1187
+ "additionalProperties": false,
1188
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
1189
+ "oneOf": [
1190
+ {
1191
+ "required": [
1192
+ "instruction"
1193
+ ]
1194
+ },
1195
+ {
1196
+ "required": [
1197
+ "instruction_append"
1198
+ ]
1199
+ }
1200
+ ]
1201
+ },
1202
+ "ollama": {
1203
+ "type": "object",
1204
+ "properties": {
1205
+ "instruction": {
1206
+ "description": "Replaces the agent's instruction on this provider.",
1207
+ "type": "string",
1208
+ "minLength": 1
1209
+ },
1210
+ "instruction_append": {
1211
+ "description": "Appended to the agent's instruction, after a blank line, on this provider.",
1212
+ "type": "string",
1213
+ "minLength": 1
1214
+ }
1215
+ },
1216
+ "additionalProperties": false,
1217
+ "description": "The instruction on one provider: exactly one of instruction or instruction_append.",
1218
+ "oneOf": [
1219
+ {
1220
+ "required": [
1221
+ "instruction"
1222
+ ]
1223
+ },
1224
+ {
1225
+ "required": [
1226
+ "instruction_append"
1227
+ ]
1228
+ }
1229
+ ]
1230
+ }
1231
+ },
1232
+ "additionalProperties": false,
1233
+ "description": "Per-provider instruction, keyed by the provider of the agent's model id (lib/models/providerMap.ts). Applied at compile time before the skills index; not to fallback_model, and never to globalInstruction (ADR 0115)."
1234
+ },
1235
+ "outputSchema": {
1236
+ "description": "Deprecated v1 spelling (ADR 0115): write output.schema. JSON Schema for structured output: the agent answers with one JSON object matching it. An agent that also calls tools or delegates to subagents does that first, then ends its turn on that JSON: the schema travels beside the tools where the model takes both in one request, as a set_model_response tool elsewhere (the capability matrix's structured_output_with_tools, ADR 0109).",
1237
+ "type": "object",
1238
+ "propertyNames": {
1239
+ "type": "string"
1240
+ },
1241
+ "additionalProperties": {},
1242
+ "deprecated": true
1243
+ },
1244
+ "mcp_server_url": {
1245
+ "description": "MCP server (SSE) whose tools are discovered at runtime and merged with `tools`.",
1246
+ "type": "string"
1247
+ },
1248
+ "mcp_tools": {
1249
+ "description": "The MCP server's tools this agent may use, by name; any other tool the server lists is not exposed. Without it, every listed tool is. require_approval may name these. Needs mcp_server_url.",
1250
+ "minItems": 1,
1251
+ "type": "array",
1252
+ "items": {
1253
+ "type": "string",
1254
+ "minLength": 1
1255
+ }
1256
+ },
1257
+ "mcp_auth": {
1258
+ "description": "The OAuth grant the MCP server takes (ADR 0112). With authorization_code, each user's own token on their own connection, and mcp_tools is required. Needs mcp_server_url; replaces MCP_BEARER_TOKENS for this server.",
1259
+ "type": "object",
1260
+ "properties": {
1261
+ "oauth2": {
1262
+ "type": "object",
1263
+ "properties": {
1264
+ "provider": {
1265
+ "type": "string",
1266
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$",
1267
+ "description": "The credential store's name for the provider (e.g. github). Every tool naming it shares one grant."
1268
+ },
1269
+ "grant": {
1270
+ "type": "string",
1271
+ "enum": [
1272
+ "authorization_code",
1273
+ "client_credentials"
1274
+ ],
1275
+ "description": "authorization_code: each user's own token, granted through the consent pause (ADR 0085). client_credentials: the server's own token, from the token endpoint."
1276
+ },
1277
+ "authorization_url": {
1278
+ "description": "The provider's authorization endpoint (https). authorization_code only.",
1279
+ "type": "string",
1280
+ "format": "uri"
1281
+ },
1282
+ "token_url": {
1283
+ "type": "string",
1284
+ "format": "uri",
1285
+ "description": "The provider's token endpoint (https)."
1286
+ },
1287
+ "client_id": {
1288
+ "description": "The OAuth client id, written out (it is not a secret). Or client_id_env.",
1289
+ "type": "string",
1290
+ "minLength": 1,
1291
+ "maxLength": 512
1292
+ },
1293
+ "client_id_env": {
1294
+ "description": "Environment variable holding the client id. Or client_id.",
1295
+ "type": "string",
1296
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1297
+ },
1298
+ "client_secret_env": {
1299
+ "description": "Environment variable NAME holding the client secret, never the value. Required for client_credentials; omit for a public client (PKCE alone).",
1300
+ "type": "string",
1301
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1302
+ },
1303
+ "scopes": {
1304
+ "description": "The scopes the grant asks for.",
1305
+ "maxItems": 64,
1306
+ "type": "array",
1307
+ "items": {
1308
+ "type": "string",
1309
+ "pattern": "^[\\x21\\x23-\\x5b\\x5d-\\x7e]{1,256}$"
1310
+ }
1311
+ },
1312
+ "authorization_params": {
1313
+ "description": "Extra authorization parameters (e.g. access_type: offline). authorization_code only; never state, redirect_uri, scope, client_id or the PKCE pair.",
1314
+ "type": "object",
1315
+ "propertyNames": {
1316
+ "type": "string",
1317
+ "pattern": "^[A-Za-z0-9_.-]{1,64}$"
1318
+ },
1319
+ "additionalProperties": {
1320
+ "type": "string",
1321
+ "maxLength": 512
1322
+ }
1323
+ }
1324
+ },
1325
+ "required": [
1326
+ "provider",
1327
+ "grant",
1328
+ "token_url"
1329
+ ],
1330
+ "additionalProperties": false,
1331
+ "description": "An OAuth 2 access token sent as a bearer token on every call (lib/tools/oauthTools.ts). Secrets come from environment variable names, never values."
1332
+ }
1333
+ },
1334
+ "required": [
1335
+ "oauth2"
1336
+ ],
1337
+ "additionalProperties": false
1338
+ },
1339
+ "skills": {
1340
+ "type": "object",
1341
+ "properties": {
1342
+ "dir": {
1343
+ "type": "string",
1344
+ "minLength": 1,
1345
+ "description": "A directory of skills: one subdirectory per skill, named as its SKILL.md frontmatter names it. Relative to the working directory."
1346
+ },
1347
+ "scripts": {
1348
+ "description": "Whether a skill's scripts/ may run. \"local\" runs them on this machine, each after a person approves (ADR 0028); default \"none\".",
1349
+ "type": "string",
1350
+ "enum": [
1351
+ "none",
1352
+ "local"
1353
+ ]
1354
+ },
1355
+ "tools": {
1356
+ "description": "Registry tool names a skill may unlock through its `allowed-tools` frontmatter once it is loaded. Omitted, no skill unlocks anything.",
1357
+ "type": "array",
1358
+ "items": {
1359
+ "type": "string",
1360
+ "minLength": 1
1361
+ }
1362
+ },
1363
+ "env": {
1364
+ "description": "Environment variable NAMES (never values) a skill script gets, beyond PATH, HOME, the temp directory, the locale and the OS essentials (ADR 0086). A name that looks like a secret (KEY, TOKEN, SECRET, PASSWORD, AUTH, DATABASE, …) belongs under secret_env.",
1365
+ "type": "array",
1366
+ "items": {
1367
+ "type": "string",
1368
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1369
+ }
1370
+ },
1371
+ "secret_env": {
1372
+ "description": "Secret-shaped environment variable names a skill script gets, listed here so passing a credential to a script is a deliberate, reviewable act (ADR 0086).",
1373
+ "type": "array",
1374
+ "items": {
1375
+ "type": "string",
1376
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1377
+ }
1378
+ }
1379
+ },
1380
+ "required": [
1381
+ "dir"
1382
+ ],
1383
+ "additionalProperties": false,
1384
+ "description": "Agent Skills (SKILL.md directories) this agent reads the way a coding harness does."
1385
+ },
1386
+ "openapi": {
1387
+ "minItems": 1,
1388
+ "type": "array",
1389
+ "items": {
1390
+ "type": "object",
1391
+ "properties": {
1392
+ "spec": {
1393
+ "type": "string",
1394
+ "minLength": 1,
1395
+ "description": "An OpenAPI 3 spec file (.yaml, .yml, .json), relative to this syndicate file. Files only, never URLs."
1396
+ },
1397
+ "operations": {
1398
+ "description": "Operations to expose, by operationId or tool name. Omitted: every GET operation, and nothing that writes.",
1399
+ "minItems": 1,
1400
+ "type": "array",
1401
+ "items": {
1402
+ "type": "string",
1403
+ "minLength": 1
1404
+ }
1405
+ },
1406
+ "base_url": {
1407
+ "description": "Overrides the spec's servers[0].url. Checked by the SSRF guard.",
1408
+ "type": "string",
1409
+ "format": "uri"
1410
+ },
1411
+ "prefix": {
1412
+ "description": "Prepended to each tool name, to keep two APIs apart.",
1413
+ "type": "string",
1414
+ "pattern": "^[a-z][a-z0-9_]*$"
1415
+ },
1416
+ "auth": {
1417
+ "description": "Credentials, always from the environment, never written in YAML.",
1418
+ "type": "object",
1419
+ "properties": {
1420
+ "bearer_env": {
1421
+ "description": "Environment variable holding a bearer token.",
1422
+ "type": "string",
1423
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1424
+ },
1425
+ "api_key": {
1426
+ "description": "An API key read from `env`, sent in a header or the query under `name`.",
1427
+ "type": "object",
1428
+ "properties": {
1429
+ "env": {
1430
+ "type": "string",
1431
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1432
+ },
1433
+ "in": {
1434
+ "type": "string",
1435
+ "enum": [
1436
+ "header",
1437
+ "query"
1438
+ ]
1439
+ },
1440
+ "name": {
1441
+ "type": "string",
1442
+ "minLength": 1
1443
+ }
1444
+ },
1445
+ "required": [
1446
+ "env",
1447
+ "in",
1448
+ "name"
1449
+ ],
1450
+ "additionalProperties": false
1451
+ },
1452
+ "oauth2": {
1453
+ "type": "object",
1454
+ "properties": {
1455
+ "provider": {
1456
+ "type": "string",
1457
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$",
1458
+ "description": "The credential store's name for the provider (e.g. github). Every tool naming it shares one grant."
1459
+ },
1460
+ "grant": {
1461
+ "type": "string",
1462
+ "enum": [
1463
+ "authorization_code",
1464
+ "client_credentials"
1465
+ ],
1466
+ "description": "authorization_code: each user's own token, granted through the consent pause (ADR 0085). client_credentials: the server's own token, from the token endpoint."
1467
+ },
1468
+ "authorization_url": {
1469
+ "description": "The provider's authorization endpoint (https). authorization_code only.",
1470
+ "type": "string",
1471
+ "format": "uri"
1472
+ },
1473
+ "token_url": {
1474
+ "type": "string",
1475
+ "format": "uri",
1476
+ "description": "The provider's token endpoint (https)."
1477
+ },
1478
+ "client_id": {
1479
+ "description": "The OAuth client id, written out (it is not a secret). Or client_id_env.",
1480
+ "type": "string",
1481
+ "minLength": 1,
1482
+ "maxLength": 512
1483
+ },
1484
+ "client_id_env": {
1485
+ "description": "Environment variable holding the client id. Or client_id.",
1486
+ "type": "string",
1487
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1488
+ },
1489
+ "client_secret_env": {
1490
+ "description": "Environment variable NAME holding the client secret, never the value. Required for client_credentials; omit for a public client (PKCE alone).",
1491
+ "type": "string",
1492
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1493
+ },
1494
+ "scopes": {
1495
+ "description": "The scopes the grant asks for.",
1496
+ "maxItems": 64,
1497
+ "type": "array",
1498
+ "items": {
1499
+ "type": "string",
1500
+ "pattern": "^[\\x21\\x23-\\x5b\\x5d-\\x7e]{1,256}$"
1501
+ }
1502
+ },
1503
+ "authorization_params": {
1504
+ "description": "Extra authorization parameters (e.g. access_type: offline). authorization_code only; never state, redirect_uri, scope, client_id or the PKCE pair.",
1505
+ "type": "object",
1506
+ "propertyNames": {
1507
+ "type": "string",
1508
+ "pattern": "^[A-Za-z0-9_.-]{1,64}$"
1509
+ },
1510
+ "additionalProperties": {
1511
+ "type": "string",
1512
+ "maxLength": 512
1513
+ }
1514
+ }
1515
+ },
1516
+ "required": [
1517
+ "provider",
1518
+ "grant",
1519
+ "token_url"
1520
+ ],
1521
+ "additionalProperties": false,
1522
+ "description": "An OAuth 2 access token sent as a bearer token on every call (lib/tools/oauthTools.ts). Secrets come from environment variable names, never values."
1523
+ }
1524
+ },
1525
+ "additionalProperties": false
1526
+ }
1527
+ },
1528
+ "required": [
1529
+ "spec"
1530
+ ],
1531
+ "additionalProperties": false,
1532
+ "description": "An HTTP API as tools, from its OpenAPI spec (lib/tools/openapiTools.ts)."
1533
+ }
1534
+ },
1535
+ "code_execution": {
1536
+ "description": "\"gemini\": the model writes and runs Python in Gemini's server-side sandbox; nothing runs on this host. Gemini models only.",
1537
+ "type": "string",
1538
+ "const": "gemini"
1539
+ },
1540
+ "context": {
1541
+ "description": "Summarize a long conversation instead of overflowing the window. The orchestrator of a delegate syndicate only.",
1542
+ "type": "object",
1543
+ "properties": {
1544
+ "compact_after_tokens": {
1545
+ "type": "integer",
1546
+ "minimum": 1000,
1547
+ "maximum": 9007199254740991,
1548
+ "description": "Compact when the last request's prompt passed this many tokens."
1549
+ },
1550
+ "keep_recent_events": {
1551
+ "description": "Events kept verbatim after the summary. Default 6.",
1552
+ "type": "integer",
1553
+ "minimum": 1,
1554
+ "maximum": 100
1555
+ },
1556
+ "summary_model": {
1557
+ "description": "The model that writes the summary. Default: the agent's own.",
1558
+ "type": "string",
1559
+ "minLength": 1
1560
+ }
1561
+ },
1562
+ "required": [
1563
+ "compact_after_tokens"
1564
+ ],
1565
+ "additionalProperties": false
1566
+ },
1567
+ "examples": {
1568
+ "description": "Few-shot exchanges (input, output) added to every request's instruction.",
1569
+ "minItems": 1,
1570
+ "maxItems": 20,
1571
+ "type": "array",
1572
+ "items": {
1573
+ "type": "object",
1574
+ "properties": {
1575
+ "input": {
1576
+ "type": "string",
1577
+ "minLength": 1
1578
+ },
1579
+ "output": {
1580
+ "type": "string",
1581
+ "minLength": 1
1582
+ }
1583
+ },
1584
+ "required": [
1585
+ "input",
1586
+ "output"
1587
+ ],
1588
+ "additionalProperties": false
1589
+ }
1590
+ },
1591
+ "mode": {
1592
+ "description": "\"task\": the agent works until it calls finish_task; its arguments (matching outputSchema) are the node's output. Workflow nodes only.",
1593
+ "type": "string",
1594
+ "const": "task"
1595
+ },
1596
+ "orchestration": {
1597
+ "type": "object",
1598
+ "properties": {
1599
+ "role": {
1600
+ "type": "string",
1601
+ "enum": [
1602
+ "primary",
1603
+ "sub-agent"
1604
+ ]
1605
+ },
1606
+ "delegates": {
1607
+ "type": "array",
1608
+ "items": {
1609
+ "type": "string"
1610
+ }
1611
+ }
1612
+ },
1613
+ "additionalProperties": false
1614
+ },
1615
+ "yaml_reference": {
1616
+ "description": "A whole nested syndicate (filename under the agents dir) used as this subagent. An approval request or ask_user question raised inside it pauses the turn with the agent path (ADR 0110, ADR 0111): a delegate syndicate's gates anywhere, a dispatch syndicate's on its classifier (its routes never run nested), and a workflow's ask_user nodes and gates when it is delegated to as a subagent.",
1617
+ "type": "string",
1618
+ "minLength": 1
1619
+ },
1620
+ "a2a_agent_url": {
1621
+ "description": "A remote agent over A2A: the server base URL or its agent-card URL. Needs no model or instruction; credentials come from A2A_AGENT_TOKENS, never YAML.",
1622
+ "type": "string",
1623
+ "minLength": 1
1624
+ }
1625
+ },
1626
+ "required": [
1627
+ "name",
1628
+ "description"
1629
+ ],
1630
+ "additionalProperties": false,
1631
+ "description": "A subagent: an inline agent, a nested syndicate (yaml_reference), or a remote A2A agent (a2a_agent_url).",
1632
+ "anyOf": [
1633
+ {
1634
+ "required": [
1635
+ "instruction"
1636
+ ]
1637
+ },
1638
+ {
1639
+ "required": [
1640
+ "yaml_reference"
1641
+ ]
1642
+ },
1643
+ {
1644
+ "required": [
1645
+ "a2a_agent_url"
1646
+ ]
1647
+ }
1648
+ ],
1649
+ "not": {
1650
+ "required": [
1651
+ "yaml_reference",
1652
+ "a2a_agent_url"
1653
+ ]
1654
+ }
1655
+ }
1656
+ },
1657
+ "dispatch": {
1658
+ "type": "object",
1659
+ "properties": {
1660
+ "default_route": {
1661
+ "type": "string",
1662
+ "minLength": 1,
1663
+ "description": "Subagent used whenever routing yields no usable answer. Must name a declared subagent."
1664
+ },
1665
+ "route_key": {
1666
+ "description": "JSON property holding the chosen route. Default \"route\".",
1667
+ "type": "string"
1668
+ },
1669
+ "reason_key": {
1670
+ "description": "JSON property holding the justification. Default \"reason\".",
1671
+ "type": "string"
1672
+ },
1673
+ "route_overrides": {
1674
+ "type": "array",
1675
+ "items": {
1676
+ "type": "object",
1677
+ "properties": {
1678
+ "route": {
1679
+ "type": "string",
1680
+ "minLength": 1,
1681
+ "description": "Subagent to run on a match."
1682
+ },
1683
+ "pattern": {
1684
+ "type": "string",
1685
+ "minLength": 1,
1686
+ "description": "JS regular expression source tested against the raw message."
1687
+ },
1688
+ "flags": {
1689
+ "description": "Regex flags. Default \"i\".",
1690
+ "type": "string"
1691
+ },
1692
+ "reason": {
1693
+ "description": "Shown to the waiting user as the [STATUS] route note.",
1694
+ "type": "string"
1695
+ }
1696
+ },
1697
+ "required": [
1698
+ "route",
1699
+ "pattern"
1700
+ ],
1701
+ "additionalProperties": false
1702
+ }
1703
+ }
1704
+ },
1705
+ "required": [
1706
+ "default_route"
1707
+ ],
1708
+ "additionalProperties": false,
1709
+ "description": "Opts into PLAN-DISPATCH orchestration (lib/dispatch.ts)."
1710
+ },
1711
+ "workflow": {
1712
+ "type": "object",
1713
+ "properties": {
1714
+ "edges": {
1715
+ "minItems": 1,
1716
+ "type": "array",
1717
+ "items": {
1718
+ "minItems": 2,
1719
+ "type": "array",
1720
+ "items": {
1721
+ "anyOf": [
1722
+ {
1723
+ "type": "string",
1724
+ "minLength": 1
1725
+ },
1726
+ {
1727
+ "minItems": 1,
1728
+ "type": "array",
1729
+ "items": {
1730
+ "type": "string",
1731
+ "minLength": 1
1732
+ },
1733
+ "description": "Several nodes: fan-out when they follow one node, fan-in when one node follows them."
1734
+ },
1735
+ {
1736
+ "type": "object",
1737
+ "propertyNames": {
1738
+ "type": "string",
1739
+ "minLength": 1
1740
+ },
1741
+ "additionalProperties": {
1742
+ "anyOf": [
1743
+ {
1744
+ "type": "string",
1745
+ "minLength": 1
1746
+ },
1747
+ {
1748
+ "minItems": 1,
1749
+ "type": "array",
1750
+ "items": {
1751
+ "type": "string",
1752
+ "minLength": 1
1753
+ }
1754
+ }
1755
+ ]
1756
+ },
1757
+ "description": "A routing map after a node: `{ <route>: <node or nodes>, default: <node> }`, matched against that node's output."
1758
+ }
1759
+ ]
1760
+ }
1761
+ },
1762
+ "description": "Chains of nodes, each a list; `START` begins at least one. A routing map follows the node whose output it routes."
1763
+ },
1764
+ "nodes": {
1765
+ "type": "object",
1766
+ "propertyNames": {
1767
+ "type": "string",
1768
+ "minLength": 1
1769
+ },
1770
+ "additionalProperties": {
1771
+ "type": "object",
1772
+ "properties": {
1773
+ "ask_user": {
1774
+ "description": "Pause and ask the person this; the reply becomes the node's output.",
1775
+ "type": "string",
1776
+ "minLength": 1
1777
+ },
1778
+ "schema": {
1779
+ "description": "JSON Schema a structured reply to ask_user must satisfy; plain text passes as is.",
1780
+ "type": "object",
1781
+ "propertyNames": {
1782
+ "type": "string"
1783
+ },
1784
+ "additionalProperties": {}
1785
+ },
1786
+ "join": {
1787
+ "description": "Wait for every predecessor; output `{ <predecessor>: <output> }`.",
1788
+ "type": "boolean",
1789
+ "const": true
1790
+ },
1791
+ "map": {
1792
+ "description": "Run this agent once per item of a list input, concurrently; output the list of results.",
1793
+ "type": "string",
1794
+ "minLength": 1
1795
+ },
1796
+ "max_parallel": {
1797
+ "description": "Concurrency of map. Default 8.",
1798
+ "type": "integer",
1799
+ "exclusiveMinimum": 0,
1800
+ "maximum": 9007199254740991
1801
+ },
1802
+ "tool": {
1803
+ "description": "Run this registry tool with the node input as its arguments.",
1804
+ "type": "string",
1805
+ "minLength": 1
1806
+ },
1807
+ "route_key": {
1808
+ "description": "Property of a JSON output holding the route. Default \"route\".",
1809
+ "type": "string",
1810
+ "minLength": 1
1811
+ },
1812
+ "retry": {
1813
+ "description": "Retry this node on failure. Not on a map node: each item runs under its agent's own retry.",
1814
+ "type": "object",
1815
+ "properties": {
1816
+ "max_attempts": {
1817
+ "description": "Attempts including the first; 1 = no retry. Default 5.",
1818
+ "type": "integer",
1819
+ "exclusiveMinimum": 0,
1820
+ "maximum": 9007199254740991
1821
+ },
1822
+ "initial_delay": {
1823
+ "description": "Seconds before the first retry.",
1824
+ "type": "number",
1825
+ "minimum": 0
1826
+ },
1827
+ "max_delay": {
1828
+ "type": "number",
1829
+ "minimum": 0
1830
+ },
1831
+ "backoff_factor": {
1832
+ "type": "number",
1833
+ "exclusiveMinimum": 0
1834
+ },
1835
+ "jitter": {
1836
+ "description": "Randomness of the backoff; 0 = none. Default 1.",
1837
+ "type": "number",
1838
+ "minimum": 0
1839
+ },
1840
+ "exceptions": {
1841
+ "description": "Error names to retry on (the error's class or its `name`); every error when absent.",
1842
+ "minItems": 1,
1843
+ "type": "array",
1844
+ "items": {
1845
+ "type": "string",
1846
+ "pattern": "^[A-Za-z_$][\\w$]*$"
1847
+ }
1848
+ }
1849
+ },
1850
+ "additionalProperties": false
1851
+ },
1852
+ "timeout": {
1853
+ "description": "Seconds this node may run before it fails. Not on a map node: each item runs under its agent's own timeout.",
1854
+ "type": "number",
1855
+ "exclusiveMinimum": 0
1856
+ }
1857
+ },
1858
+ "additionalProperties": false,
1859
+ "description": "A declared node (exactly one of ask_user, join, map, tool) or modifiers for an agent node (retry, timeout, route_key)."
1860
+ }
1861
+ },
1862
+ "max_concurrency": {
1863
+ "description": "Nodes that may run at once. Default: unbounded.",
1864
+ "type": "integer",
1865
+ "exclusiveMinimum": 0,
1866
+ "maximum": 9007199254740991
1867
+ }
1868
+ },
1869
+ "required": [
1870
+ "edges"
1871
+ ],
1872
+ "additionalProperties": false,
1873
+ "description": "Opts into a WORKFLOW: the syndicate as a graph (lib/workflow.ts). Cannot be combined with dispatch."
1874
+ },
1875
+ "retries": {
1876
+ "description": "Self-correction on model and tool errors: the engine's reflect-and-retry. On by default.",
1877
+ "type": "object",
1878
+ "properties": {
1879
+ "model_errors": {
1880
+ "description": "Retries of a malformed model reply. Default 2; 0 off.",
1881
+ "type": "integer",
1882
+ "minimum": 0,
1883
+ "maximum": 5
1884
+ },
1885
+ "tool_errors": {
1886
+ "description": "Retries of a tool that threw, with reflection guidance. Default 3; 0 off.",
1887
+ "type": "integer",
1888
+ "minimum": 0,
1889
+ "maximum": 5
1890
+ }
1891
+ },
1892
+ "additionalProperties": false
1893
+ },
1894
+ "variables": {
1895
+ "description": "Defaults for {{token}} interpolation. {{current_date}} is built in.",
1896
+ "type": "object",
1897
+ "propertyNames": {
1898
+ "type": "string"
1899
+ },
1900
+ "additionalProperties": {
1901
+ "type": [
1902
+ "string",
1903
+ "number",
1904
+ "boolean"
1905
+ ]
1906
+ }
1907
+ },
1908
+ "memory_system": {
1909
+ "description": "Persistence and semantic-memory layer.",
1910
+ "type": "string",
1911
+ "enum": [
1912
+ "internal-only",
1913
+ "session-only",
1914
+ "long-term"
1915
+ ]
1916
+ },
1917
+ "guards": {
1918
+ "description": "Post-answer guards by name (lib/guards/index.ts).",
1919
+ "type": "array",
1920
+ "items": {
1921
+ "type": "string",
1922
+ "minLength": 1
1923
+ }
1924
+ },
1925
+ "memory_namespace": {
1926
+ "description": "Where long-term memory is stored: the syndicate name plus a generated id, written once and never recomputed (ADR 0020). Syndicates that declare the same namespace share memory.",
1927
+ "type": "string",
1928
+ "pattern": "^[A-Za-z0-9._-]{1,96}$"
1929
+ },
1930
+ "memory_extraction_rules": {
1931
+ "description": "Domain rules appended to the fact-extraction prompt (long-term memory only).",
1932
+ "type": "string"
1933
+ },
1934
+ "memory_extraction_model": {
1935
+ "description": "The model that distils this syndicate's turns into memory records; default MEMORY_EXTRACTION_MODEL (ADR 0020).",
1936
+ "type": "string",
1937
+ "minLength": 1
1938
+ },
1939
+ "memory_retention_days": {
1940
+ "description": "Days a memory fact is kept in this syndicate's namespace; older facts are deleted daily. Needs memory_namespace (ADR 0020).",
1941
+ "type": "integer",
1942
+ "exclusiveMinimum": 0,
1943
+ "maximum": 9007199254740991
1944
+ },
1945
+ "max_steps": {
1946
+ "description": "Hard cap on model calls per turn, subagents included. Default 50 (DEFAULT_MAX_STEPS) when unset.",
1947
+ "type": "integer",
1948
+ "exclusiveMinimum": 0,
1949
+ "maximum": 9007199254740991
1950
+ },
1951
+ "max_concurrency": {
1952
+ "description": "Subagent calls from one orchestrator step that run at once; the rest wait their turn, in call order. Default 4; 1 runs them one after another. A delegate syndicate only (ADR 0116).",
1953
+ "type": "integer",
1954
+ "exclusiveMinimum": 0,
1955
+ "maximum": 32
1956
+ },
1957
+ "bundled_references": {
1958
+ "description": "Written by the registry publisher, not by hand: every nested yaml_reference this syndicate reaches, as it was when published, so a registry version is one unit (ADR 0018). Nested references load from here instead of from files.",
1959
+ "type": "object",
1960
+ "propertyNames": {
1961
+ "type": "string"
1962
+ },
1963
+ "additionalProperties": {
1964
+ "type": "object",
1965
+ "propertyNames": {
1966
+ "type": "string"
1967
+ },
1968
+ "additionalProperties": {}
1969
+ }
1970
+ }
1971
+ },
1972
+ "required": [
1973
+ "syndicate_name",
1974
+ "orchestrator"
1975
+ ],
1976
+ "additionalProperties": false,
1977
+ "description": "A Melchizedek syndicate definition (lib/loadSyndicate.ts).",
1978
+ "title": "Melchizedek syndicate"
1979
+ }