opencode-swarm 7.122.1 → 7.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/skills/issue-tracer/SKILL.md +341 -0
- package/.opencode/skills/issue-tracer/assets/pr-template.md +59 -0
- package/.opencode/skills/issue-tracer/references/critic-gate.md +245 -0
- package/.opencode/skills/issue-tracer/references/evidence-artifacts.md +267 -0
- package/.opencode/skills/issue-tracer/references/install.md +63 -0
- package/.opencode/skills/issue-tracer/references/localization-playbook.md +95 -0
- package/.opencode/skills/issue-tracer/references/method-provenance.md +13 -0
- package/.opencode/skills/issue-tracer/references/untrusted-content.md +22 -0
- package/.opencode/skills/issue-tracer/scripts/scan-deferred.sh +103 -0
- package/.opencode/skills/issue-tracer/scripts/trace-init.sh +119 -0
- package/README.md +3 -0
- package/dist/cli/{config-doctor-3ksh1534.js → config-doctor-53mnpeke.js} +6 -6
- package/dist/cli/{core-cwgb7ev8.js → core-d38hc85b.js} +4 -4
- package/dist/cli/{curation-policy-4j4qce5a.js → curation-policy-ny033330.js} +2 -2
- package/dist/cli/{curator-drift-6b2fjsgr.js → curator-drift-h9a2sjvf.js} +7 -7
- package/dist/cli/curator-llm-factory-e0tjz8qq.js +53 -0
- package/dist/cli/{curator-qfh07497.js → curator-nvn1pdq6.js} +30 -29
- package/dist/cli/{dispatch-07jgc3hn.js → dispatch-f4hj1cj7.js} +3 -3
- package/dist/cli/{evidence-summary-service-96ndczbk.js → evidence-summary-service-9hq7n9k9.js} +12 -12
- package/dist/cli/{gate-evidence-xqks3kk2.js → gate-evidence-cy2te3x8.js} +2 -2
- package/dist/cli/guardrail-explain-d3dd57nf.js +54 -0
- package/dist/cli/guardrail-log-3q2z9axs.js +16 -0
- package/dist/cli/{hive-promoter-00mktxkk.js → hive-promoter-9gbpepgm.js} +30 -29
- package/dist/cli/index-134d35c1.js +116 -0
- package/dist/cli/{index-cqsak7bf.js → index-13d2g7k9.js} +1 -1
- package/dist/cli/{index-m1abzg93.js → index-1kz6da87.js} +4 -2
- package/dist/cli/{index-22e127jw.js → index-23zsx7dm.js} +5 -3
- package/dist/cli/{index-kzj3fp7c.js → index-2445sx3d.js} +1 -1
- package/dist/cli/{index-ctpgsj84.js → index-2tn5h2zp.js} +1 -1
- package/dist/cli/{index-n2712byd.js → index-2x4maxte.js} +8 -5
- package/dist/cli/{index-6xnxz6z0.js → index-3x761jqv.js} +4 -2
- package/dist/cli/{index-3rr0ese8.js → index-3yyr4ynk.js} +41 -9
- package/dist/cli/{index-7cspygmb.js → index-4rzzzjtg.js} +11 -8
- package/dist/cli/{index-nprawcc0.js → index-6n2jpz7x.js} +1 -1
- package/dist/cli/{index-jm81nhks.js → index-8pz0ypxz.js} +38 -31
- package/dist/cli/index-bk5tah7q.js +19 -0
- package/dist/cli/{index-293f68mj.js → index-bpmtbmy9.js} +4680 -4342
- package/dist/cli/index-c6crt5rs.js +2494 -0
- package/dist/cli/{index-19zn67q6.js → index-e19mxn9f.js} +5 -1
- package/dist/cli/{index-hns7xjm7.js → index-eeg04r0x.js} +4 -2
- package/dist/cli/{index-ye3fndsw.js → index-gacm5s2n.js} +9 -5
- package/dist/cli/{index-d6h5hq91.js → index-gnvg72y1.js} +2 -2
- package/dist/cli/{index-17eybc3z.js → index-htbjqftb.js} +1 -1
- package/dist/cli/{index-vcgfqd8f.js → index-k5jrywpr.js} +4 -2
- package/dist/cli/{index-kanrv3sv.js → index-mkkx1a4f.js} +2436 -1435
- package/dist/cli/{index-gnp9x6se.js → index-n832052r.js} +4 -2
- package/dist/cli/{index-6srk9a5q.js → index-qd77aft9.js} +2 -2
- package/dist/cli/{index-816rkp4y.js → index-s9mj4rb9.js} +5 -3
- package/dist/cli/{index-5he0kwnx.js → index-tyg0zezw.js} +13 -8
- package/dist/cli/{index-gw3m5fw0.js → index-v2rdhwx8.js} +5 -3
- package/dist/cli/{index-det5jwfk.js → index-v5ecczts.js} +5 -1
- package/dist/cli/{index-2j25br0p.js → index-wqwpzhv1.js} +9 -9
- package/dist/cli/{index-dywekeen.js → index-x2mmnrnx.js} +1 -1
- package/dist/cli/{index-j9kxwshw.js → index-z0m4angq.js} +8 -6
- package/dist/cli/{index-5e4e2hvv.js → index-z6xqpmqg.js} +4 -0
- package/dist/cli/{index-m0bmh3w0.js → index-zjedv2bd.js} +2 -2
- package/dist/cli/{index-p0arc26j.js → index-zjygnfay.js} +7 -2
- package/dist/cli/index.js +33 -30
- package/dist/cli/{knowledge-escalator-dyxsm78k.js → knowledge-escalator-r1s01m3z.js} +4 -4
- package/dist/cli/{knowledge-events-36q6nvae.js → knowledge-events-a9hmxvke.js} +1 -1
- package/dist/cli/{knowledge-store-e07b4s54.js → knowledge-store-jt31br5k.js} +2 -2
- package/dist/cli/{knowledge-validator-sfyf7wn2.js → knowledge-validator-9vrwxr3z.js} +5 -5
- package/dist/cli/{pending-delegations-68cbaqv2.js → pending-delegations-e3bcqj77.js} +7 -5
- package/dist/cli/{pr-subscriptions-x653151h.js → pr-subscriptions-bxpqde8w.js} +5 -5
- package/dist/cli/{scan-cursor-hm0aqqae.js → scan-cursor-bkjtsawg.js} +3 -3
- package/dist/cli/{schema-13bnng2n.js → schema-y3z416z7.js} +7 -4
- package/dist/cli/{scope-persistence-d9erwnvb.js → scope-persistence-habn4q8a.js} +4 -4
- package/dist/cli/{skill-generator-g6r52x94.js → skill-generator-794hyndw.js} +7 -7
- package/dist/cli/sqlite-loader-r1kgt2pq.js +12 -0
- package/dist/commands/memory-link.d.ts +28 -0
- package/dist/commands/registry.d.ts +25 -0
- package/dist/config/bundled-skills.d.ts +1 -1
- package/dist/config/schema.d.ts +6 -0
- package/dist/index.js +331 -318
- package/dist/knowledge/family-migration-shared.d.ts +24 -0
- package/dist/knowledge/family-migration.d.ts +5 -0
- package/dist/memory/config.d.ts +11 -0
- package/dist/memory/consolidation-log.d.ts +8 -2
- package/dist/memory/finalize-reward-sweep.d.ts +2 -1
- package/dist/memory/gateway.d.ts +13 -0
- package/dist/memory/index.d.ts +4 -2
- package/dist/memory/local-jsonl-provider.d.ts +25 -1
- package/dist/memory/memory-family-manifest.d.ts +52 -0
- package/dist/memory/memory-family-migration.d.ts +94 -0
- package/dist/memory/memory-link.d.ts +103 -0
- package/dist/memory/provider-pool.d.ts +35 -0
- package/dist/memory/redaction.d.ts +31 -0
- package/dist/memory/schema.d.ts +21 -0
- package/dist/memory/sqlite-provider.d.ts +58 -1
- package/dist/memory/storage-root.d.ts +93 -0
- package/dist/memory/types.d.ts +20 -1
- package/dist/services/knowledge-diagnostics.d.ts +25 -0
- package/dist/services/status-service.d.ts +16 -0
- package/package.json +2 -1
- package/dist/cli/curator-llm-factory-x769hn66.js +0 -52
- package/dist/cli/guardrail-explain-kj0e9r25.js +0 -53
- package/dist/cli/guardrail-log-z291m4gw.js +0 -16
- package/dist/cli/index-4rhcth7a.js +0 -14
- package/dist/cli/index-wr8qgpz5.js +0 -2463
|
@@ -1,2463 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
OUTCOME_BLOCK_THRESHOLD
|
|
4
|
-
} from "./index-4rhcth7a.js";
|
|
5
|
-
import {
|
|
6
|
-
exports_external
|
|
7
|
-
} from "./index-293f68mj.js";
|
|
8
|
-
|
|
9
|
-
// src/config/agent-names.ts
|
|
10
|
-
var QA_AGENTS = ["reviewer", "critic", "critic_oversight"];
|
|
11
|
-
var PIPELINE_AGENTS = ["explorer", "coder", "test_engineer"];
|
|
12
|
-
var ORCHESTRATOR_NAME = "architect";
|
|
13
|
-
var ALL_SUBAGENT_NAMES = [
|
|
14
|
-
"sme",
|
|
15
|
-
"researcher",
|
|
16
|
-
"docs",
|
|
17
|
-
"docs_design",
|
|
18
|
-
"designer",
|
|
19
|
-
"critic_sounding_board",
|
|
20
|
-
"critic_drift_verifier",
|
|
21
|
-
"critic_hallucination_verifier",
|
|
22
|
-
"critic_architecture_supervisor",
|
|
23
|
-
"curator_init",
|
|
24
|
-
"curator_phase",
|
|
25
|
-
"curator_postmortem",
|
|
26
|
-
"curator_consolidation",
|
|
27
|
-
"council_generalist",
|
|
28
|
-
"council_skeptic",
|
|
29
|
-
"council_domain_expert",
|
|
30
|
-
"skill_improver",
|
|
31
|
-
"spec_writer",
|
|
32
|
-
...QA_AGENTS,
|
|
33
|
-
...PIPELINE_AGENTS
|
|
34
|
-
];
|
|
35
|
-
var ALL_AGENT_NAMES = [
|
|
36
|
-
ORCHESTRATOR_NAME,
|
|
37
|
-
...ALL_SUBAGENT_NAMES
|
|
38
|
-
];
|
|
39
|
-
|
|
40
|
-
// src/tools/tool-metadata.ts
|
|
41
|
-
var TOOL_METADATA = {
|
|
42
|
-
diff: {
|
|
43
|
-
description: "structured git diff with contract change detection",
|
|
44
|
-
agents: [
|
|
45
|
-
"architect",
|
|
46
|
-
"reviewer",
|
|
47
|
-
"critic_oversight",
|
|
48
|
-
"coder",
|
|
49
|
-
"test_engineer"
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
diff_summary: {
|
|
53
|
-
description: "filter classified AST changes by category, risk level, or file for reviewer drill-down",
|
|
54
|
-
agents: ["architect", "reviewer", "critic_oversight"]
|
|
55
|
-
},
|
|
56
|
-
syntax_check: {
|
|
57
|
-
description: "check syntax of source files using tree-sitter parsers across multiple languages, returning per-file errors",
|
|
58
|
-
agents: ["architect", "coder", "test_engineer"]
|
|
59
|
-
},
|
|
60
|
-
placeholder_scan: {
|
|
61
|
-
description: "todo and FIXME comment detection",
|
|
62
|
-
agents: ["architect", "reviewer"]
|
|
63
|
-
},
|
|
64
|
-
imports: {
|
|
65
|
-
description: "find all consumers that import from a given file \u2014 use before refactoring shared modules to avoid breaking unseen dependents",
|
|
66
|
-
agents: [
|
|
67
|
-
"architect",
|
|
68
|
-
"sme",
|
|
69
|
-
"researcher",
|
|
70
|
-
"docs",
|
|
71
|
-
"docs_design",
|
|
72
|
-
"critic_sounding_board",
|
|
73
|
-
"critic_drift_verifier",
|
|
74
|
-
"critic_hallucination_verifier",
|
|
75
|
-
"reviewer",
|
|
76
|
-
"critic",
|
|
77
|
-
"coder",
|
|
78
|
-
"test_engineer"
|
|
79
|
-
]
|
|
80
|
-
},
|
|
81
|
-
lint: {
|
|
82
|
-
description: "run project linter in check or fix mode; supports biome, eslint, ruff, clippy, and more, returns structured results",
|
|
83
|
-
agents: ["architect", "reviewer", "coder"]
|
|
84
|
-
},
|
|
85
|
-
secretscan: {
|
|
86
|
-
description: "scan for secrets (API keys, tokens, passwords) via regex and entropy; returns redacted previews, excludes common dirs",
|
|
87
|
-
agents: ["architect", "reviewer", "critic_oversight"]
|
|
88
|
-
},
|
|
89
|
-
sast_scan: {
|
|
90
|
-
description: "static analysis security scan",
|
|
91
|
-
agents: ["architect", "reviewer", "critic_oversight"]
|
|
92
|
-
},
|
|
93
|
-
build_check: {
|
|
94
|
-
description: "discover and run build, typecheck, and test commands for various project ecosystems in the working directory",
|
|
95
|
-
agents: ["architect", "coder", "test_engineer"]
|
|
96
|
-
},
|
|
97
|
-
pre_check_batch: {
|
|
98
|
-
description: "parallel verification: lint:check + secretscan + sast_scan + quality_budget",
|
|
99
|
-
agents: ["architect", "reviewer"]
|
|
100
|
-
},
|
|
101
|
-
quality_budget: {
|
|
102
|
-
description: "code quality budget check",
|
|
103
|
-
agents: ["architect"]
|
|
104
|
-
},
|
|
105
|
-
symbols: {
|
|
106
|
-
description: "extract exported symbols (functions, classes, interfaces, types) from source files; supports TypeScript, JavaScript, and Python",
|
|
107
|
-
agents: [
|
|
108
|
-
"architect",
|
|
109
|
-
"sme",
|
|
110
|
-
"researcher",
|
|
111
|
-
"docs",
|
|
112
|
-
"docs_design",
|
|
113
|
-
"designer",
|
|
114
|
-
"critic_sounding_board",
|
|
115
|
-
"critic_drift_verifier",
|
|
116
|
-
"critic_hallucination_verifier",
|
|
117
|
-
"spec_writer",
|
|
118
|
-
"reviewer",
|
|
119
|
-
"critic",
|
|
120
|
-
"coder",
|
|
121
|
-
"test_engineer"
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
|
-
complexity_hotspots: {
|
|
125
|
-
description: "git churn \xD7 complexity risk map",
|
|
126
|
-
agents: [
|
|
127
|
-
"architect",
|
|
128
|
-
"sme",
|
|
129
|
-
"researcher",
|
|
130
|
-
"critic_sounding_board",
|
|
131
|
-
"critic_drift_verifier",
|
|
132
|
-
"critic_hallucination_verifier",
|
|
133
|
-
"reviewer",
|
|
134
|
-
"critic",
|
|
135
|
-
"critic_oversight",
|
|
136
|
-
"explorer",
|
|
137
|
-
"test_engineer"
|
|
138
|
-
]
|
|
139
|
-
},
|
|
140
|
-
schema_drift: {
|
|
141
|
-
description: "OpenAPI spec vs route drift",
|
|
142
|
-
agents: ["architect", "sme", "researcher", "docs", "explorer"]
|
|
143
|
-
},
|
|
144
|
-
todo_extract: {
|
|
145
|
-
description: "structured TODO/FIXME extraction",
|
|
146
|
-
agents: ["architect", "researcher", "docs", "explorer"]
|
|
147
|
-
},
|
|
148
|
-
evidence_check: {
|
|
149
|
-
description: "verify task evidence completeness",
|
|
150
|
-
agents: ["architect", "critic_oversight"]
|
|
151
|
-
},
|
|
152
|
-
check_gate_status: {
|
|
153
|
-
description: "check the gate status of a specific task",
|
|
154
|
-
agents: ["architect", "critic_oversight"]
|
|
155
|
-
},
|
|
156
|
-
completion_verify: {
|
|
157
|
-
description: "verify completed tasks have required evidence",
|
|
158
|
-
agents: ["architect", "critic_oversight"]
|
|
159
|
-
},
|
|
160
|
-
submit_council_verdicts: {
|
|
161
|
-
description: "submit pre-collected council member verdicts for synthesis (architect MUST dispatch critic/reviewer/sme/test_engineer/explorer as Agent tasks first; this tool synthesizes only, it does not contact members)",
|
|
162
|
-
agents: []
|
|
163
|
-
},
|
|
164
|
-
submit_phase_council_verdicts: {
|
|
165
|
-
description: "submit pre-collected phase-level council member verdicts for holistic phase synthesis (architect MUST dispatch all 5 council members with phase-scoped context first; this tool synthesizes only, it does not contact members)",
|
|
166
|
-
agents: []
|
|
167
|
-
},
|
|
168
|
-
declare_council_criteria: {
|
|
169
|
-
description: "pre-declare acceptance criteria for a task before the coder starts work; criteria are read back during council evaluation",
|
|
170
|
-
agents: []
|
|
171
|
-
},
|
|
172
|
-
sbom_generate: {
|
|
173
|
-
description: "SBOM generation for dependency inventory",
|
|
174
|
-
agents: ["architect"]
|
|
175
|
-
},
|
|
176
|
-
checkpoint: {
|
|
177
|
-
description: "create named git checkpoints for save, restore, and delete \u2014 use before risky operations to enable rollback",
|
|
178
|
-
agents: ["architect"]
|
|
179
|
-
},
|
|
180
|
-
pkg_audit: {
|
|
181
|
-
description: "dependency vulnerability scan \u2014 npm/pip/cargo",
|
|
182
|
-
agents: [
|
|
183
|
-
"architect",
|
|
184
|
-
"critic_hallucination_verifier",
|
|
185
|
-
"reviewer",
|
|
186
|
-
"critic_oversight",
|
|
187
|
-
"test_engineer"
|
|
188
|
-
]
|
|
189
|
-
},
|
|
190
|
-
parse_lane_candidates: {
|
|
191
|
-
description: "Parse [CANDIDATE] rows from a dispatch_lanes or collect_lane_results artifact (by output_ref), produce structured records with provenance, optionally persist to a per-batch sidecar JSONL. Pure-parser variant exists as internal module.",
|
|
192
|
-
agents: ["architect"]
|
|
193
|
-
},
|
|
194
|
-
write_pr_review_trigger_eval: {
|
|
195
|
-
description: "persist the complete PR-review trigger evaluation with exact-set validation and dispatch provenance",
|
|
196
|
-
agents: ["architect"]
|
|
197
|
-
},
|
|
198
|
-
test_runner: {
|
|
199
|
-
description: "auto-detect and run tests",
|
|
200
|
-
agents: ["architect", "reviewer", "test_engineer"]
|
|
201
|
-
},
|
|
202
|
-
test_impact: {
|
|
203
|
-
description: "identify test files impacted by changed source files via import analysis",
|
|
204
|
-
agents: ["architect", "reviewer", "critic_oversight", "test_engineer"]
|
|
205
|
-
},
|
|
206
|
-
mutation_test: {
|
|
207
|
-
description: "executes pre-generated mutation patches against tests, evaluates kill rate against quality gate thresholds",
|
|
208
|
-
agents: ["architect", "test_engineer"]
|
|
209
|
-
},
|
|
210
|
-
generate_mutants: {
|
|
211
|
-
description: "generate LLM-based mutation testing patches for source files; returns MutationPatch[] for direct consumption by the mutation_test tool",
|
|
212
|
-
agents: ["architect"]
|
|
213
|
-
},
|
|
214
|
-
detect_domains: {
|
|
215
|
-
description: "detect which SME domains are relevant for a given text",
|
|
216
|
-
agents: [
|
|
217
|
-
"architect",
|
|
218
|
-
"sme",
|
|
219
|
-
"docs",
|
|
220
|
-
"docs_design",
|
|
221
|
-
"critic_sounding_board",
|
|
222
|
-
"critic_drift_verifier",
|
|
223
|
-
"critic_hallucination_verifier",
|
|
224
|
-
"critic",
|
|
225
|
-
"critic_oversight",
|
|
226
|
-
"explorer"
|
|
227
|
-
]
|
|
228
|
-
},
|
|
229
|
-
git_blame: {
|
|
230
|
-
description: "per-line git blame metadata: sha, author, date, summary for each line in a file",
|
|
231
|
-
agents: ["reviewer", "explorer", "architect"]
|
|
232
|
-
},
|
|
233
|
-
gitingest: {
|
|
234
|
-
description: "fetch a GitHub repository full content via gitingest.com",
|
|
235
|
-
agents: ["architect", "docs", "explorer"]
|
|
236
|
-
},
|
|
237
|
-
retrieve_summary: {
|
|
238
|
-
description: "retrieve the full content of a stored tool output summary",
|
|
239
|
-
agents: [
|
|
240
|
-
"architect",
|
|
241
|
-
"sme",
|
|
242
|
-
"docs",
|
|
243
|
-
"docs_design",
|
|
244
|
-
"designer",
|
|
245
|
-
"critic_sounding_board",
|
|
246
|
-
"critic_drift_verifier",
|
|
247
|
-
"critic_hallucination_verifier",
|
|
248
|
-
"critic_architecture_supervisor",
|
|
249
|
-
"spec_writer",
|
|
250
|
-
"reviewer",
|
|
251
|
-
"critic",
|
|
252
|
-
"coder",
|
|
253
|
-
"test_engineer"
|
|
254
|
-
]
|
|
255
|
-
},
|
|
256
|
-
retrieve_lane_output: {
|
|
257
|
-
description: "retrieve paged full dispatch lane output by output_ref; use before consuming truncated lane previews or routing candidates from lane results",
|
|
258
|
-
agents: ["architect"]
|
|
259
|
-
},
|
|
260
|
-
extract_code_blocks: {
|
|
261
|
-
description: "extract code blocks from text content and save them to files",
|
|
262
|
-
agents: [
|
|
263
|
-
"docs",
|
|
264
|
-
"docs_design",
|
|
265
|
-
"designer",
|
|
266
|
-
"spec_writer",
|
|
267
|
-
"coder",
|
|
268
|
-
"test_engineer"
|
|
269
|
-
]
|
|
270
|
-
},
|
|
271
|
-
phase_complete: {
|
|
272
|
-
description: "mark a phase as complete and track dispatched agents",
|
|
273
|
-
agents: ["architect"]
|
|
274
|
-
},
|
|
275
|
-
save_plan: {
|
|
276
|
-
description: "save a structured implementation plan",
|
|
277
|
-
agents: ["architect"]
|
|
278
|
-
},
|
|
279
|
-
update_task_status: {
|
|
280
|
-
description: "mark tasks complete, track phase progress",
|
|
281
|
-
agents: ["architect"]
|
|
282
|
-
},
|
|
283
|
-
lint_spec: {
|
|
284
|
-
description: "validate .swarm/spec.md format and required fields",
|
|
285
|
-
agents: ["architect", "spec_writer"]
|
|
286
|
-
},
|
|
287
|
-
write_retro: {
|
|
288
|
-
description: "document phase retrospectives via phase_complete workflow, capture lessons learned",
|
|
289
|
-
agents: ["architect"]
|
|
290
|
-
},
|
|
291
|
-
write_drift_evidence: {
|
|
292
|
-
description: "write drift verification evidence for a completed phase",
|
|
293
|
-
agents: ["architect"]
|
|
294
|
-
},
|
|
295
|
-
write_hallucination_evidence: {
|
|
296
|
-
description: "write hallucination verification evidence for a completed phase",
|
|
297
|
-
agents: ["architect"]
|
|
298
|
-
},
|
|
299
|
-
write_mutation_evidence: {
|
|
300
|
-
description: "write mutation gate evidence for a completed phase; normalizes PASS/WARN/FAIL/SKIP verdicts and writes .swarm/evidence/{phase}/mutation-gate.json",
|
|
301
|
-
agents: ["architect"]
|
|
302
|
-
},
|
|
303
|
-
declare_scope: {
|
|
304
|
-
description: "declare file scope for next coder delegation",
|
|
305
|
-
agents: ["architect"]
|
|
306
|
-
},
|
|
307
|
-
knowledge_query: {
|
|
308
|
-
description: "query swarm or hive knowledge with optional filters",
|
|
309
|
-
agents: ["architect", "skill_improver", "spec_writer"]
|
|
310
|
-
},
|
|
311
|
-
doc_scan: {
|
|
312
|
-
description: "scan project documentation files and build an index manifest",
|
|
313
|
-
agents: [
|
|
314
|
-
"architect",
|
|
315
|
-
"docs_design",
|
|
316
|
-
"skill_improver",
|
|
317
|
-
"spec_writer",
|
|
318
|
-
"explorer"
|
|
319
|
-
]
|
|
320
|
-
},
|
|
321
|
-
doc_extract: {
|
|
322
|
-
description: "extract actionable constraints from project documentation",
|
|
323
|
-
agents: ["architect", "docs_design", "skill_improver", "spec_writer"]
|
|
324
|
-
},
|
|
325
|
-
curator_analyze: {
|
|
326
|
-
description: "run curator phase analysis and optionally apply knowledge recommendations",
|
|
327
|
-
agents: ["architect"]
|
|
328
|
-
},
|
|
329
|
-
knowledge_add: {
|
|
330
|
-
description: "store a new lesson in the knowledge base",
|
|
331
|
-
agents: ["architect", "coder"]
|
|
332
|
-
},
|
|
333
|
-
knowledge_recall: {
|
|
334
|
-
description: "search the knowledge base for relevant past decisions",
|
|
335
|
-
agents: [
|
|
336
|
-
"architect",
|
|
337
|
-
"sme",
|
|
338
|
-
"docs",
|
|
339
|
-
"docs_design",
|
|
340
|
-
"designer",
|
|
341
|
-
"critic_sounding_board",
|
|
342
|
-
"critic_drift_verifier",
|
|
343
|
-
"critic_hallucination_verifier",
|
|
344
|
-
"critic_architecture_supervisor",
|
|
345
|
-
"curator_init",
|
|
346
|
-
"curator_phase",
|
|
347
|
-
"skill_improver",
|
|
348
|
-
"spec_writer",
|
|
349
|
-
"reviewer",
|
|
350
|
-
"critic",
|
|
351
|
-
"critic_oversight",
|
|
352
|
-
"explorer",
|
|
353
|
-
"coder",
|
|
354
|
-
"test_engineer"
|
|
355
|
-
]
|
|
356
|
-
},
|
|
357
|
-
knowledge_remove: {
|
|
358
|
-
description: "delete an outdated swarm knowledge entry by ID (swarm tier only)",
|
|
359
|
-
agents: ["architect"]
|
|
360
|
-
},
|
|
361
|
-
co_change_analyzer: {
|
|
362
|
-
description: "detect hidden couplings by analyzing git history",
|
|
363
|
-
agents: ["architect"]
|
|
364
|
-
},
|
|
365
|
-
context_status: {
|
|
366
|
-
description: "report current context-window headroom for the active session \u2014 returns tokens-used, model-limit, usage-percent, threshold-state (none/warn/critical), model name, and provider. Pure read-only: no state mutation, no warning injection. Works whether context_budget.enabled is true or false.",
|
|
367
|
-
agents: ["architect"]
|
|
368
|
-
},
|
|
369
|
-
search: {
|
|
370
|
-
description: "Workspace-scoped ripgrep-style text search with structured JSON output. Supports literal and regex modes, glob filtering, and result limits. NOTE: This is text search, not structural AST search \u2014 use symbols and imports tools for structural queries.",
|
|
371
|
-
agents: [
|
|
372
|
-
"architect",
|
|
373
|
-
"sme",
|
|
374
|
-
"docs",
|
|
375
|
-
"docs_design",
|
|
376
|
-
"designer",
|
|
377
|
-
"critic_hallucination_verifier",
|
|
378
|
-
"skill_improver",
|
|
379
|
-
"spec_writer",
|
|
380
|
-
"reviewer",
|
|
381
|
-
"critic_oversight",
|
|
382
|
-
"explorer",
|
|
383
|
-
"coder",
|
|
384
|
-
"test_engineer",
|
|
385
|
-
"researcher"
|
|
386
|
-
]
|
|
387
|
-
},
|
|
388
|
-
ast_grep: {
|
|
389
|
-
description: "Read-only structural AST search using ast-grep patterns with optional language and glob filters. Use for syntax-aware code pattern searches; does not rewrite files.",
|
|
390
|
-
agents: [
|
|
391
|
-
"architect",
|
|
392
|
-
"sme",
|
|
393
|
-
"docs",
|
|
394
|
-
"docs_design",
|
|
395
|
-
"critic_hallucination_verifier",
|
|
396
|
-
"spec_writer",
|
|
397
|
-
"explorer",
|
|
398
|
-
"coder",
|
|
399
|
-
"test_engineer",
|
|
400
|
-
"researcher"
|
|
401
|
-
]
|
|
402
|
-
},
|
|
403
|
-
actionlint_scan: {
|
|
404
|
-
description: "Run actionlint against GitHub Actions workflow YAML files with structured findings. Resolves actionlint lazily and does not modify files.",
|
|
405
|
-
agents: ["architect", "test_engineer"]
|
|
406
|
-
},
|
|
407
|
-
osv_scan: {
|
|
408
|
-
description: "Run OSV-Scanner against a workspace path and return structured dependency vulnerability findings. Resolves osv-scanner lazily and does not modify files.",
|
|
409
|
-
agents: ["architect", "test_engineer"]
|
|
410
|
-
},
|
|
411
|
-
gh_evidence: {
|
|
412
|
-
description: "Fetch bounded GitHub pull request or issue metadata through gh for review and CI evidence. Resolves gh lazily and is read-only.",
|
|
413
|
-
agents: ["architect", "researcher"]
|
|
414
|
-
},
|
|
415
|
-
batch_symbols: {
|
|
416
|
-
description: "Batched symbol extraction across multiple files. Returns per-file symbol summaries with isolated error handling.",
|
|
417
|
-
agents: [
|
|
418
|
-
"architect",
|
|
419
|
-
"critic_hallucination_verifier",
|
|
420
|
-
"reviewer",
|
|
421
|
-
"critic_oversight",
|
|
422
|
-
"explorer"
|
|
423
|
-
]
|
|
424
|
-
},
|
|
425
|
-
suggest_patch: {
|
|
426
|
-
description: "Reviewer-safe structured patch suggestion tool. Produces context-anchored patch artifacts without file modification. Returns structured diagnostics on context mismatch.",
|
|
427
|
-
agents: ["architect", "reviewer"]
|
|
428
|
-
},
|
|
429
|
-
req_coverage: {
|
|
430
|
-
description: "query requirement coverage status for tracked functional requirements",
|
|
431
|
-
agents: [
|
|
432
|
-
"critic_sounding_board",
|
|
433
|
-
"critic_drift_verifier",
|
|
434
|
-
"critic_hallucination_verifier",
|
|
435
|
-
"spec_writer",
|
|
436
|
-
"critic",
|
|
437
|
-
"critic_oversight"
|
|
438
|
-
]
|
|
439
|
-
},
|
|
440
|
-
get_approved_plan: {
|
|
441
|
-
description: "retrieve the last critic-approved immutable plan snapshot for baseline drift comparison",
|
|
442
|
-
agents: ["critic_drift_verifier", "critic", "critic_oversight"]
|
|
443
|
-
},
|
|
444
|
-
repo_map: {
|
|
445
|
-
description: "query the repo code graph: importers, dependencies, blast radius, localization, ontology facts, package boundaries, and heuristic preflight packets before refactoring; ontology findings are advisory, not formal proofs",
|
|
446
|
-
agents: [
|
|
447
|
-
"architect",
|
|
448
|
-
"critic_sounding_board",
|
|
449
|
-
"critic_drift_verifier",
|
|
450
|
-
"critic_hallucination_verifier",
|
|
451
|
-
"critic_architecture_supervisor",
|
|
452
|
-
"reviewer",
|
|
453
|
-
"critic",
|
|
454
|
-
"critic_oversight",
|
|
455
|
-
"explorer",
|
|
456
|
-
"coder"
|
|
457
|
-
]
|
|
458
|
-
},
|
|
459
|
-
get_qa_gate_profile: {
|
|
460
|
-
description: "retrieve the QA gate profile for the current plan: gates (reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, council_mode, hallucination_guard, mutation_test, phase_council, drift_check, final_council), lock state, and profile hash. Read-only.",
|
|
461
|
-
agents: ["architect"]
|
|
462
|
-
},
|
|
463
|
-
set_qa_gates: {
|
|
464
|
-
description: "configure the QA gate profile for the current plan. Architect-only. Ratchet-tighter only \u2014 rejected once the profile is locked after critic approval. Supports: reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, council_mode, hallucination_guard, mutation_test, phase_council, drift_check, final_council.",
|
|
465
|
-
agents: ["architect"]
|
|
466
|
-
},
|
|
467
|
-
web_search: {
|
|
468
|
-
description: "External web search (Tavily or Brave) for architect-driven council research, SME domain research, researcher auto-research, and skill-improver research. Returns titled results with snippets, URLs, normalized query metadata, temporal intent, freshness, and removed stale years. Config-gated on council.general.enabled in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides. Requires a search API key. Used by the architect in MODE: COUNCIL to gather a RESEARCH CONTEXT before dispatching council agents, by SME for opt-in external skill/source evaluation, and by the researcher agent for multi-source auto-research.",
|
|
469
|
-
agents: ["sme", "researcher", "skill_improver"]
|
|
470
|
-
},
|
|
471
|
-
web_fetch: {
|
|
472
|
-
description: "Fetch the readable text of a single http(s) URL (architect-only). Returns decoded page text, document title, final URL after redirects, and an evidence reference. Reads primary sources that web_search only surfaces as snippets. Config-gated on council.general.enabled. Blocks private/loopback/link-local/metadata addresses (re-validated and re-pinned across redirects); enforces timeout and body size cap.",
|
|
473
|
-
agents: []
|
|
474
|
-
},
|
|
475
|
-
convene_general_council: {
|
|
476
|
-
description: "Synthesize responses from a multi-model General Council. Accepts parallel member responses (Round 1, optionally Round 2), detects disagreements, and returns consensus points, persisting disagreements, and a structured synthesis. Architect-only. Config-gated on council.general.enabled in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides.",
|
|
477
|
-
agents: []
|
|
478
|
-
},
|
|
479
|
-
write_final_council_evidence: {
|
|
480
|
-
description: "Persist project-scoped final council evidence to .swarm/evidence/final-council.json. PREREQUISITE: dispatch critic, reviewer, sme, test_engineer, and explorer as project-scoped Agent tasks and collect their CouncilMemberVerdict JSON \u2014 this tool synthesizes only. Rejects on insufficient quorum or CONCERNS with unresolved requiredFixes; normalizes verdicts to approved/concerns/rejected. Architect-only.",
|
|
481
|
-
agents: []
|
|
482
|
-
},
|
|
483
|
-
skill_generate: {
|
|
484
|
-
description: "compile knowledge entries into a structured SKILL.md draft",
|
|
485
|
-
agents: ["skill_improver"]
|
|
486
|
-
},
|
|
487
|
-
skill_list: {
|
|
488
|
-
description: "list generated skill files and their status",
|
|
489
|
-
agents: ["skill_improver"]
|
|
490
|
-
},
|
|
491
|
-
skill_apply: {
|
|
492
|
-
description: "activate a draft skill proposal",
|
|
493
|
-
agents: []
|
|
494
|
-
},
|
|
495
|
-
skill_inspect: {
|
|
496
|
-
description: "inspect the content and source entries of a skill file",
|
|
497
|
-
agents: ["skill_improver"]
|
|
498
|
-
},
|
|
499
|
-
run_stale_reconciliation: {
|
|
500
|
-
description: "reconcile skills against the knowledge store: mark skills stale when source knowledge is archived or deleted, or clear stale markers",
|
|
501
|
-
agents: ["architect"]
|
|
502
|
-
},
|
|
503
|
-
skill_regenerate: {
|
|
504
|
-
description: "regenerate an active skill by re-clustering its source knowledge entries and updating the SKILL.md in place",
|
|
505
|
-
agents: []
|
|
506
|
-
},
|
|
507
|
-
skill_retire: {
|
|
508
|
-
description: "retire a generated skill by adding a retired.marker file; retired skills are excluded from scoring and injection",
|
|
509
|
-
agents: []
|
|
510
|
-
},
|
|
511
|
-
skill_improve: {
|
|
512
|
-
description: "run the skill_improver agent to review and refine skills",
|
|
513
|
-
agents: ["skill_improver"]
|
|
514
|
-
},
|
|
515
|
-
spec_write: {
|
|
516
|
-
description: "author or update .swarm/spec.md for the current project",
|
|
517
|
-
agents: ["spec_writer"]
|
|
518
|
-
},
|
|
519
|
-
knowledge_receipt: {
|
|
520
|
-
description: "file a receipt for retrieved knowledge (applied/ignored/contradicted + new lessons), recorded as immutable knowledge events",
|
|
521
|
-
agents: [
|
|
522
|
-
"architect",
|
|
523
|
-
"sme",
|
|
524
|
-
"docs",
|
|
525
|
-
"docs_design",
|
|
526
|
-
"designer",
|
|
527
|
-
"critic_sounding_board",
|
|
528
|
-
"critic_drift_verifier",
|
|
529
|
-
"critic_hallucination_verifier",
|
|
530
|
-
"critic_architecture_supervisor",
|
|
531
|
-
"curator_init",
|
|
532
|
-
"curator_phase",
|
|
533
|
-
"skill_improver",
|
|
534
|
-
"spec_writer",
|
|
535
|
-
"reviewer",
|
|
536
|
-
"critic",
|
|
537
|
-
"coder",
|
|
538
|
-
"test_engineer"
|
|
539
|
-
]
|
|
540
|
-
},
|
|
541
|
-
knowledge_archive: {
|
|
542
|
-
description: "archive (default), quarantine, or purge a swarm or hive knowledge entry by ID with an immutable audit tombstone; purge requires an admin flag",
|
|
543
|
-
agents: ["architect"]
|
|
544
|
-
},
|
|
545
|
-
swarm_memory_recall: {
|
|
546
|
-
description: "recall scoped Swarm memory for the current repository as untrusted background",
|
|
547
|
-
agents: []
|
|
548
|
-
},
|
|
549
|
-
swarm_memory_propose: {
|
|
550
|
-
description: "create a pending Swarm memory proposal; does not write durable memory directly",
|
|
551
|
-
agents: []
|
|
552
|
-
},
|
|
553
|
-
swarm_command: {
|
|
554
|
-
description: "run supported /swarm commands through the canonical command registry",
|
|
555
|
-
agents: [
|
|
556
|
-
"architect",
|
|
557
|
-
"sme",
|
|
558
|
-
"researcher",
|
|
559
|
-
"docs",
|
|
560
|
-
"docs_design",
|
|
561
|
-
"designer",
|
|
562
|
-
"reviewer",
|
|
563
|
-
"critic",
|
|
564
|
-
"explorer",
|
|
565
|
-
"coder",
|
|
566
|
-
"test_engineer"
|
|
567
|
-
]
|
|
568
|
-
},
|
|
569
|
-
dispatch_lanes: {
|
|
570
|
-
description: "dispatch read-only exploration/review lanes concurrently and BLOCK until all finish; prefer dispatch_lanes_async for non-blocking dispatch, use this only when promptAsync is unavailable",
|
|
571
|
-
agents: ["architect"]
|
|
572
|
-
},
|
|
573
|
-
dispatch_lanes_async: {
|
|
574
|
-
description: "launch read-only advisory lanes non-blockingly and return a batch id plus lane session handles immediately so you can keep working; launch_timeout_ms is only a promptAsync acceptance budget, not a lane runtime timeout; poll incrementally with collect_lane_results (wait omitted or false) while doing independent investigation, or join with wait: true when you need all results",
|
|
575
|
-
agents: ["architect"]
|
|
576
|
-
},
|
|
577
|
-
collect_lane_results: {
|
|
578
|
-
description: "collect or poll results for a dispatch_lanes_async batch; supports both non-blocking polling (wait omitted or false) and blocking join (wait: true). Non-blocking polls include pending lane identities by default and process settled lanes incrementally while continuing independent work; busy/retry lanes are not timed out just because they run for a long time. Does not advance workflow gates.",
|
|
579
|
-
agents: ["architect"]
|
|
580
|
-
},
|
|
581
|
-
summarize_work: {
|
|
582
|
-
description: "emit a short structured summary of completed work (key decisions, assumptions, risks, constraints) at task completion; rolls up per phase for architecture-supervisor review. Advisory, never blocks.",
|
|
583
|
-
agents: [
|
|
584
|
-
"architect",
|
|
585
|
-
"sme",
|
|
586
|
-
"researcher",
|
|
587
|
-
"docs",
|
|
588
|
-
"docs_design",
|
|
589
|
-
"designer",
|
|
590
|
-
"explorer",
|
|
591
|
-
"coder",
|
|
592
|
-
"test_engineer"
|
|
593
|
-
]
|
|
594
|
-
},
|
|
595
|
-
write_architecture_supervisor_evidence: {
|
|
596
|
-
description: "persist the architecture supervisor verdict for a phase (architect MUST dispatch critic_architecture_supervisor first and collect its JSON verdict; this tool persists only, it does not contact the supervisor)",
|
|
597
|
-
agents: ["architect"]
|
|
598
|
-
},
|
|
599
|
-
lean_turbo_plan_lanes: {
|
|
600
|
-
description: "partition phase tasks into parallel lanes based on file-scope conflicts for Lean Turbo execution",
|
|
601
|
-
agents: []
|
|
602
|
-
},
|
|
603
|
-
lean_turbo_acquire_locks: {
|
|
604
|
-
description: "acquire file locks for all files in a lane (all-or-nothing) before lane execution",
|
|
605
|
-
agents: []
|
|
606
|
-
},
|
|
607
|
-
lean_turbo_runner_status: {
|
|
608
|
-
description: "read Lean Turbo run state from .swarm/turbo-state.json",
|
|
609
|
-
agents: []
|
|
610
|
-
},
|
|
611
|
-
lean_turbo_review: {
|
|
612
|
-
description: "dispatch a read-only reviewer agent to evaluate a completed Lean Turbo phase",
|
|
613
|
-
agents: []
|
|
614
|
-
},
|
|
615
|
-
lean_turbo_run_phase: {
|
|
616
|
-
description: "Execute a phase using Lean Turbo parallel lane execution. Plans lanes, acquires file locks, and dispatches coder agents concurrently. Use when Lean Turbo is active and you want to execute all tasks in a phase in parallel lanes.",
|
|
617
|
-
agents: []
|
|
618
|
-
},
|
|
619
|
-
lean_turbo_status: {
|
|
620
|
-
description: "returns Lean Turbo configuration and active status for the current session",
|
|
621
|
-
agents: []
|
|
622
|
-
},
|
|
623
|
-
swarm_apply_patch: {
|
|
624
|
-
description: "Apply a unified diff patch to workspace files with exact context matching, atomic writes, and path validation. Use standard unified diff format only \u2014 does NOT support *** Begin Patch / *** Update File payloads (use native apply_patch for those).",
|
|
625
|
-
agents: ["coder", "test_engineer"]
|
|
626
|
-
},
|
|
627
|
-
external_skill_discover: {
|
|
628
|
-
description: "Discover external skill candidates from configured sources. Returns a disabled message when external_skills.curation_enabled is false.",
|
|
629
|
-
agents: []
|
|
630
|
-
},
|
|
631
|
-
external_skill_list: {
|
|
632
|
-
description: "List external skill candidates in the quarantine store. Returns a disabled message when external_skills.curation_enabled is false.",
|
|
633
|
-
agents: []
|
|
634
|
-
},
|
|
635
|
-
external_skill_inspect: {
|
|
636
|
-
description: "Inspect a specific external skill candidate by ID. Returns a disabled message when external_skills.curation_enabled is false.",
|
|
637
|
-
agents: []
|
|
638
|
-
},
|
|
639
|
-
external_skill_promote: {
|
|
640
|
-
description: "Promote a validated external skill candidate to an active generated skill. Returns a disabled message when external_skills.curation_enabled is false.",
|
|
641
|
-
agents: []
|
|
642
|
-
},
|
|
643
|
-
external_skill_reject: {
|
|
644
|
-
description: "Reject an external skill candidate after evaluation. Returns a disabled message when external_skills.curation_enabled is false.",
|
|
645
|
-
agents: []
|
|
646
|
-
},
|
|
647
|
-
external_skill_delete: {
|
|
648
|
-
description: "Delete an external skill candidate from the quarantine store. Returns a disabled message when external_skills.curation_enabled is false.",
|
|
649
|
-
agents: []
|
|
650
|
-
},
|
|
651
|
-
external_skill_revoke: {
|
|
652
|
-
description: "Revoke a previously promoted external skill. Returns a disabled message when external_skills.curation_enabled is false.",
|
|
653
|
-
agents: []
|
|
654
|
-
},
|
|
655
|
-
epic_decide_phase: {
|
|
656
|
-
description: "Compute the Epic Mode verdict for a phase WITHOUT dispatching coders. Runs preflight + calibration + the three gates (p-threshold, hot-module, greenfield), persists the decision, and returns the verdict so the architect can dispatch waves via the visible Task tool (promote) or fall back to per-task serial (demote). Pair with `epic_plan_waves` to get the wave plan when promoted. Use when /swarm epic is on for the session.",
|
|
657
|
-
agents: ["architect"]
|
|
658
|
-
},
|
|
659
|
-
epic_plan_waves: {
|
|
660
|
-
description: "Partition a phase's pending tasks into ordered concurrent waves for Epic Mode dispatch. " + "A wave is a set of tasks with mutually disjoint declared scopes and all dependencies satisfied by prior waves. " + "Returns `{ waves: [{ waveId, taskIds, files }, ...], serializedTasks, degradedTasks }`. " + 'For each wave in order, the architect dispatches one `Task(subagent_type="coder", ...)` per `taskId` \u2014 all in one assistant message \u2014 so the wave runs concurrently and each coder appears as a visible subagent. ' + "Wait for the wave to finish before dispatching the next. " + "Pair with `epic_decide_phase` (called first; this tool is only relevant on a `promote` verdict). " + "Preflight reject reasons: `no-plan`, `no-phase`, `phase-empty`, `phase-already-complete`, `scopes-missing` (call `declare_scope` for `missingScopes`), `git-failed` (transient \u2014 retry), `planner-error`.",
|
|
661
|
-
agents: ["architect"]
|
|
662
|
-
},
|
|
663
|
-
epic_record_divergence: {
|
|
664
|
-
description: "After every `update_task_status(completed)`, record the task's declared-vs-actual divergence to .swarm/epic/divergence.jsonl. Feeds Epic Mode's self-calibration loop (Capability D). Best-effort: never blocks.",
|
|
665
|
-
agents: ["architect"]
|
|
666
|
-
}
|
|
667
|
-
};
|
|
668
|
-
var TOOL_NAMES = Object.keys(TOOL_METADATA);
|
|
669
|
-
var TOOL_NAME_SET = new Set(TOOL_NAMES);
|
|
670
|
-
var TOOL_DESCRIPTIONS = Object.fromEntries(Object.entries(TOOL_METADATA).map(([name, meta]) => [
|
|
671
|
-
name,
|
|
672
|
-
meta.description
|
|
673
|
-
]));
|
|
674
|
-
var AGENT_TOOL_MAP = (() => {
|
|
675
|
-
const map = Object.fromEntries(ALL_AGENT_NAMES.map((agent) => [agent, []]));
|
|
676
|
-
for (const [name, meta] of Object.entries(TOOL_METADATA)) {
|
|
677
|
-
for (const agent of meta.agents) {
|
|
678
|
-
map[agent].push(name);
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
return map;
|
|
682
|
-
})();
|
|
683
|
-
// src/config/constants.ts
|
|
684
|
-
var OPENCODE_NATIVE_AGENTS = new Set([
|
|
685
|
-
"build",
|
|
686
|
-
"plan",
|
|
687
|
-
"general",
|
|
688
|
-
"explore",
|
|
689
|
-
"compaction",
|
|
690
|
-
"title",
|
|
691
|
-
"summary"
|
|
692
|
-
]);
|
|
693
|
-
function freezeSet(items) {
|
|
694
|
-
const set = new Set(items);
|
|
695
|
-
const proxy = new Proxy(set, {
|
|
696
|
-
get(target, prop) {
|
|
697
|
-
if (prop === "add" || prop === "delete" || prop === "clear") {
|
|
698
|
-
return () => {
|
|
699
|
-
throw new TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly");
|
|
700
|
-
};
|
|
701
|
-
}
|
|
702
|
-
if (prop === "forEach") {
|
|
703
|
-
return (callback, thisArg) => {
|
|
704
|
-
const wrapped = (v, k) => callback.call(thisArg ?? undefined, v, k, proxy);
|
|
705
|
-
return set.forEach(wrapped);
|
|
706
|
-
};
|
|
707
|
-
}
|
|
708
|
-
const value = Reflect.get(target, prop);
|
|
709
|
-
return typeof value === "function" ? value.bind(target) : value;
|
|
710
|
-
},
|
|
711
|
-
set() {
|
|
712
|
-
throw new TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly");
|
|
713
|
-
},
|
|
714
|
-
deleteProperty() {
|
|
715
|
-
throw new TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly");
|
|
716
|
-
},
|
|
717
|
-
defineProperty() {
|
|
718
|
-
throw new TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly");
|
|
719
|
-
},
|
|
720
|
-
setPrototypeOf() {
|
|
721
|
-
throw new TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly");
|
|
722
|
-
}
|
|
723
|
-
});
|
|
724
|
-
return proxy;
|
|
725
|
-
}
|
|
726
|
-
var CLAUDE_CODE_NATIVE_COMMANDS = freezeSet([
|
|
727
|
-
"clear",
|
|
728
|
-
"new",
|
|
729
|
-
"reset",
|
|
730
|
-
"resume",
|
|
731
|
-
"continue",
|
|
732
|
-
"exit",
|
|
733
|
-
"quit",
|
|
734
|
-
"compact",
|
|
735
|
-
"fork",
|
|
736
|
-
"branch",
|
|
737
|
-
"undo",
|
|
738
|
-
"checkpoint",
|
|
739
|
-
"rewind",
|
|
740
|
-
"rename",
|
|
741
|
-
"doctor",
|
|
742
|
-
"help",
|
|
743
|
-
"status",
|
|
744
|
-
"statusline",
|
|
745
|
-
"cost",
|
|
746
|
-
"usage",
|
|
747
|
-
"stats",
|
|
748
|
-
"context",
|
|
749
|
-
"debug",
|
|
750
|
-
"insights",
|
|
751
|
-
"recap",
|
|
752
|
-
"release-notes",
|
|
753
|
-
"heapdump",
|
|
754
|
-
"powerup",
|
|
755
|
-
"config",
|
|
756
|
-
"settings",
|
|
757
|
-
"model",
|
|
758
|
-
"effort",
|
|
759
|
-
"fast",
|
|
760
|
-
"theme",
|
|
761
|
-
"color",
|
|
762
|
-
"keybindings",
|
|
763
|
-
"privacy-settings",
|
|
764
|
-
"init",
|
|
765
|
-
"focus",
|
|
766
|
-
"sandbox",
|
|
767
|
-
"terminal-setup",
|
|
768
|
-
"permissions",
|
|
769
|
-
"allowed-tools",
|
|
770
|
-
"security-review",
|
|
771
|
-
"fewer-permission-prompts",
|
|
772
|
-
"plugin",
|
|
773
|
-
"reload-plugins",
|
|
774
|
-
"hooks",
|
|
775
|
-
"mcp",
|
|
776
|
-
"ide",
|
|
777
|
-
"chrome",
|
|
778
|
-
"desktop",
|
|
779
|
-
"app",
|
|
780
|
-
"mobile",
|
|
781
|
-
"ios",
|
|
782
|
-
"android",
|
|
783
|
-
"remote-control",
|
|
784
|
-
"rc",
|
|
785
|
-
"remote-env",
|
|
786
|
-
"login",
|
|
787
|
-
"logout",
|
|
788
|
-
"review",
|
|
789
|
-
"pr-comments",
|
|
790
|
-
"agents",
|
|
791
|
-
"batch",
|
|
792
|
-
"loop",
|
|
793
|
-
"proactive",
|
|
794
|
-
"claude-api",
|
|
795
|
-
"schedule",
|
|
796
|
-
"routines",
|
|
797
|
-
"autofix-pr",
|
|
798
|
-
"plan",
|
|
799
|
-
"diff",
|
|
800
|
-
"export",
|
|
801
|
-
"copy",
|
|
802
|
-
"feedback",
|
|
803
|
-
"bug",
|
|
804
|
-
"btw",
|
|
805
|
-
"add-dir",
|
|
806
|
-
"memory",
|
|
807
|
-
"skills",
|
|
808
|
-
"upgrade",
|
|
809
|
-
"vim",
|
|
810
|
-
"voice",
|
|
811
|
-
"extra-usage",
|
|
812
|
-
"install-github-app",
|
|
813
|
-
"install-slack-app",
|
|
814
|
-
"passes",
|
|
815
|
-
"setup-bedrock",
|
|
816
|
-
"install",
|
|
817
|
-
"tasks",
|
|
818
|
-
"history",
|
|
819
|
-
"term",
|
|
820
|
-
"teleport",
|
|
821
|
-
"ultrareview",
|
|
822
|
-
"ultraplan",
|
|
823
|
-
"web-setup",
|
|
824
|
-
"setup-vertex",
|
|
825
|
-
"tui",
|
|
826
|
-
"simplify",
|
|
827
|
-
"summary",
|
|
828
|
-
"stickers",
|
|
829
|
-
"tp",
|
|
830
|
-
"team-onboarding",
|
|
831
|
-
"bashes"
|
|
832
|
-
]);
|
|
833
|
-
var EXTERNAL_SKILL_TOOL_NAMES = [
|
|
834
|
-
"external_skill_discover",
|
|
835
|
-
"external_skill_list",
|
|
836
|
-
"external_skill_inspect",
|
|
837
|
-
"external_skill_promote",
|
|
838
|
-
"external_skill_reject",
|
|
839
|
-
"external_skill_delete",
|
|
840
|
-
"external_skill_revoke"
|
|
841
|
-
];
|
|
842
|
-
var EXTERNAL_SKILL_AGENT_TOOL_MAP = {
|
|
843
|
-
architect: [...EXTERNAL_SKILL_TOOL_NAMES]
|
|
844
|
-
};
|
|
845
|
-
var COUNCIL_TOOL_NAMES = [
|
|
846
|
-
"submit_council_verdicts",
|
|
847
|
-
"submit_phase_council_verdicts",
|
|
848
|
-
"declare_council_criteria",
|
|
849
|
-
"write_final_council_evidence"
|
|
850
|
-
];
|
|
851
|
-
var COUNCIL_AGENT_TOOL_MAP = {
|
|
852
|
-
architect: [...COUNCIL_TOOL_NAMES]
|
|
853
|
-
};
|
|
854
|
-
var GENERAL_COUNCIL_TOOL_NAMES = [
|
|
855
|
-
"convene_general_council",
|
|
856
|
-
"web_search",
|
|
857
|
-
"web_fetch"
|
|
858
|
-
];
|
|
859
|
-
var GENERAL_COUNCIL_AGENT_TOOL_MAP = {
|
|
860
|
-
architect: [...GENERAL_COUNCIL_TOOL_NAMES]
|
|
861
|
-
};
|
|
862
|
-
var TURBO_TOOL_NAMES = [
|
|
863
|
-
"lean_turbo_plan_lanes",
|
|
864
|
-
"lean_turbo_acquire_locks",
|
|
865
|
-
"lean_turbo_runner_status",
|
|
866
|
-
"lean_turbo_review",
|
|
867
|
-
"lean_turbo_run_phase",
|
|
868
|
-
"lean_turbo_status"
|
|
869
|
-
];
|
|
870
|
-
var TURBO_AGENT_TOOL_MAP = {
|
|
871
|
-
architect: [...TURBO_TOOL_NAMES]
|
|
872
|
-
};
|
|
873
|
-
var SKILL_TOOL_NAMES = [
|
|
874
|
-
"skill_generate",
|
|
875
|
-
"skill_list",
|
|
876
|
-
"skill_apply",
|
|
877
|
-
"skill_inspect",
|
|
878
|
-
"skill_regenerate",
|
|
879
|
-
"skill_retire",
|
|
880
|
-
"skill_improve"
|
|
881
|
-
];
|
|
882
|
-
var SKILL_AGENT_TOOL_MAP = {
|
|
883
|
-
architect: [...SKILL_TOOL_NAMES]
|
|
884
|
-
};
|
|
885
|
-
var DEFAULT_MODELS = {
|
|
886
|
-
explorer: "opencode/big-pickle",
|
|
887
|
-
coder: "opencode/minimax-m2.5-free",
|
|
888
|
-
reviewer: "opencode/big-pickle",
|
|
889
|
-
test_engineer: "opencode/gpt-5-nano",
|
|
890
|
-
sme: "opencode/big-pickle",
|
|
891
|
-
researcher: "opencode/big-pickle",
|
|
892
|
-
critic: "opencode/big-pickle",
|
|
893
|
-
critic_sounding_board: "opencode/gpt-5-nano",
|
|
894
|
-
critic_drift_verifier: "opencode/gpt-5-nano",
|
|
895
|
-
critic_hallucination_verifier: "opencode/gpt-5-nano",
|
|
896
|
-
critic_oversight: "opencode/gpt-5-nano",
|
|
897
|
-
critic_architecture_supervisor: "opencode/big-pickle",
|
|
898
|
-
docs: "opencode/big-pickle",
|
|
899
|
-
docs_design: "opencode/big-pickle",
|
|
900
|
-
designer: "opencode/big-pickle",
|
|
901
|
-
curator_init: "opencode/gpt-5-nano",
|
|
902
|
-
curator_phase: "opencode/gpt-5-nano",
|
|
903
|
-
curator_postmortem: "opencode/gpt-5-nano",
|
|
904
|
-
curator_consolidation: "opencode/gpt-5-nano",
|
|
905
|
-
skill_improver: "opencode/big-pickle",
|
|
906
|
-
spec_writer: "opencode/big-pickle",
|
|
907
|
-
default: "opencode/big-pickle"
|
|
908
|
-
};
|
|
909
|
-
var DEFAULT_AGENT_CONFIGS = {
|
|
910
|
-
coder: {
|
|
911
|
-
model: "opencode/minimax-m2.5-free",
|
|
912
|
-
fallback_models: ["opencode/gpt-5-nano", "opencode/big-pickle"]
|
|
913
|
-
},
|
|
914
|
-
reviewer: {
|
|
915
|
-
model: "opencode/big-pickle",
|
|
916
|
-
fallback_models: ["opencode/gpt-5-nano", "opencode/big-pickle"]
|
|
917
|
-
},
|
|
918
|
-
test_engineer: {
|
|
919
|
-
model: "opencode/gpt-5-nano",
|
|
920
|
-
fallback_models: ["opencode/big-pickle"]
|
|
921
|
-
},
|
|
922
|
-
explorer: {
|
|
923
|
-
model: "opencode/big-pickle",
|
|
924
|
-
fallback_models: ["opencode/gpt-5-nano", "opencode/big-pickle"]
|
|
925
|
-
},
|
|
926
|
-
sme: {
|
|
927
|
-
model: "opencode/big-pickle",
|
|
928
|
-
fallback_models: ["opencode/gpt-5-nano", "opencode/big-pickle"]
|
|
929
|
-
},
|
|
930
|
-
researcher: {
|
|
931
|
-
model: "opencode/big-pickle",
|
|
932
|
-
fallback_models: ["opencode/gpt-5-nano", "opencode/big-pickle"]
|
|
933
|
-
},
|
|
934
|
-
critic: {
|
|
935
|
-
model: "opencode/big-pickle",
|
|
936
|
-
fallback_models: ["opencode/gpt-5-nano", "opencode/big-pickle"]
|
|
937
|
-
},
|
|
938
|
-
docs: {
|
|
939
|
-
model: "opencode/big-pickle",
|
|
940
|
-
fallback_models: ["opencode/gpt-5-nano", "opencode/big-pickle"]
|
|
941
|
-
},
|
|
942
|
-
docs_design: {
|
|
943
|
-
model: "opencode/big-pickle",
|
|
944
|
-
fallback_models: ["opencode/gpt-5-nano", "opencode/big-pickle"]
|
|
945
|
-
},
|
|
946
|
-
designer: {
|
|
947
|
-
model: "opencode/big-pickle",
|
|
948
|
-
fallback_models: ["opencode/gpt-5-nano", "opencode/big-pickle"]
|
|
949
|
-
},
|
|
950
|
-
critic_sounding_board: {
|
|
951
|
-
model: "opencode/gpt-5-nano",
|
|
952
|
-
fallback_models: ["opencode/big-pickle"]
|
|
953
|
-
},
|
|
954
|
-
critic_drift_verifier: {
|
|
955
|
-
model: "opencode/gpt-5-nano",
|
|
956
|
-
fallback_models: ["opencode/big-pickle"]
|
|
957
|
-
},
|
|
958
|
-
critic_hallucination_verifier: {
|
|
959
|
-
model: "opencode/gpt-5-nano",
|
|
960
|
-
fallback_models: ["opencode/big-pickle"]
|
|
961
|
-
},
|
|
962
|
-
critic_oversight: {
|
|
963
|
-
model: "opencode/gpt-5-nano",
|
|
964
|
-
fallback_models: ["opencode/big-pickle"]
|
|
965
|
-
},
|
|
966
|
-
critic_architecture_supervisor: {
|
|
967
|
-
model: "opencode/big-pickle",
|
|
968
|
-
fallback_models: ["opencode/gpt-5-nano"]
|
|
969
|
-
},
|
|
970
|
-
curator_init: {
|
|
971
|
-
model: "opencode/gpt-5-nano",
|
|
972
|
-
fallback_models: ["opencode/big-pickle"]
|
|
973
|
-
},
|
|
974
|
-
curator_phase: {
|
|
975
|
-
model: "opencode/gpt-5-nano",
|
|
976
|
-
fallback_models: ["opencode/big-pickle"]
|
|
977
|
-
},
|
|
978
|
-
curator_postmortem: {
|
|
979
|
-
model: "opencode/gpt-5-nano",
|
|
980
|
-
fallback_models: ["opencode/big-pickle"]
|
|
981
|
-
},
|
|
982
|
-
curator_consolidation: {
|
|
983
|
-
model: "opencode/gpt-5-nano",
|
|
984
|
-
fallback_models: ["opencode/big-pickle"]
|
|
985
|
-
},
|
|
986
|
-
skill_improver: {
|
|
987
|
-
model: "opencode/big-pickle",
|
|
988
|
-
fallback_models: ["opencode/gpt-5-nano"]
|
|
989
|
-
},
|
|
990
|
-
spec_writer: {
|
|
991
|
-
model: "opencode/big-pickle",
|
|
992
|
-
fallback_models: ["opencode/gpt-5-nano"]
|
|
993
|
-
}
|
|
994
|
-
};
|
|
995
|
-
function isQAAgent(name) {
|
|
996
|
-
return QA_AGENTS.includes(name);
|
|
997
|
-
}
|
|
998
|
-
function isSubagent(name) {
|
|
999
|
-
return ALL_SUBAGENT_NAMES.includes(name);
|
|
1000
|
-
}
|
|
1001
|
-
var DEFAULT_WORKTREE_ISOLATION_CONFIG = {
|
|
1002
|
-
policy: "auto",
|
|
1003
|
-
merge_strategy: "merge",
|
|
1004
|
-
worktree_dir: undefined,
|
|
1005
|
-
deps_strategy: "skip",
|
|
1006
|
-
serialization_release_after_dispatches: 5,
|
|
1007
|
-
serialization_release_after_ms: 60000,
|
|
1008
|
-
runtime_isolation: {
|
|
1009
|
-
enabled: false,
|
|
1010
|
-
port_stride: 1
|
|
1011
|
-
}
|
|
1012
|
-
};
|
|
1013
|
-
|
|
1014
|
-
// src/config/schema.ts
|
|
1015
|
-
var _internals = {
|
|
1016
|
-
stripKnownSwarmPrefix,
|
|
1017
|
-
getCanonicalAgentRole,
|
|
1018
|
-
resolveGuardrailsConfig
|
|
1019
|
-
};
|
|
1020
|
-
var SEPARATORS = ["_", "-", " "];
|
|
1021
|
-
var CANONICAL_ROLES_LONGEST_FIRST = [
|
|
1022
|
-
...ALL_AGENT_NAMES
|
|
1023
|
-
].sort((a, b) => b.length - a.length);
|
|
1024
|
-
var CANONICAL_ROLES_SET = new Set(ALL_AGENT_NAMES);
|
|
1025
|
-
function isKnownCanonicalRole(role) {
|
|
1026
|
-
if (!role)
|
|
1027
|
-
return false;
|
|
1028
|
-
return CANONICAL_ROLES_SET.has(role);
|
|
1029
|
-
}
|
|
1030
|
-
function getCanonicalAgentRole(agentName, generatedAgentNames) {
|
|
1031
|
-
if (!agentName)
|
|
1032
|
-
return agentName;
|
|
1033
|
-
const normalized = agentName.toLowerCase();
|
|
1034
|
-
if (CANONICAL_ROLES_SET.has(normalized)) {
|
|
1035
|
-
return normalized;
|
|
1036
|
-
}
|
|
1037
|
-
if (generatedAgentNames) {
|
|
1038
|
-
const registry = new Set;
|
|
1039
|
-
for (const n of generatedAgentNames)
|
|
1040
|
-
registry.add(n.toLowerCase());
|
|
1041
|
-
if (!registry.has(normalized)) {
|
|
1042
|
-
return agentName;
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
for (const role of CANONICAL_ROLES_LONGEST_FIRST) {
|
|
1046
|
-
for (const sep of SEPARATORS) {
|
|
1047
|
-
const suffix = sep + role;
|
|
1048
|
-
if (normalized.length > suffix.length && normalized.endsWith(suffix)) {
|
|
1049
|
-
return role;
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
return agentName;
|
|
1054
|
-
}
|
|
1055
|
-
function resolveGeneratedAgentRole(agentName, generatedAgentNames) {
|
|
1056
|
-
return _internals.getCanonicalAgentRole(agentName, generatedAgentNames);
|
|
1057
|
-
}
|
|
1058
|
-
function stripKnownSwarmPrefix(agentName) {
|
|
1059
|
-
return getCanonicalAgentRole(agentName);
|
|
1060
|
-
}
|
|
1061
|
-
var AgentReasoningConfigSchema = exports_external.object({
|
|
1062
|
-
effort: exports_external.enum(["low", "medium", "high", "max"]).optional()
|
|
1063
|
-
});
|
|
1064
|
-
var AgentThinkingConfigSchema = exports_external.object({
|
|
1065
|
-
type: exports_external.enum(["enabled", "disabled"]).optional(),
|
|
1066
|
-
budget_tokens: exports_external.number().int().positive().optional()
|
|
1067
|
-
});
|
|
1068
|
-
var AgentOverrideConfigSchema = exports_external.object({
|
|
1069
|
-
model: exports_external.string().optional(),
|
|
1070
|
-
variant: exports_external.string().min(1).optional(),
|
|
1071
|
-
temperature: exports_external.number().min(0).max(2).optional(),
|
|
1072
|
-
disabled: exports_external.boolean().optional(),
|
|
1073
|
-
fallback_models: exports_external.array(exports_external.string()).max(3).optional(),
|
|
1074
|
-
reasoning: AgentReasoningConfigSchema.optional(),
|
|
1075
|
-
thinking: AgentThinkingConfigSchema.optional()
|
|
1076
|
-
});
|
|
1077
|
-
var SwarmConfigSchema = exports_external.object({
|
|
1078
|
-
name: exports_external.string().optional(),
|
|
1079
|
-
agents: exports_external.record(exports_external.string(), AgentOverrideConfigSchema).optional()
|
|
1080
|
-
});
|
|
1081
|
-
var ModelPricingConfigSchema = exports_external.object({
|
|
1082
|
-
input_per_million: exports_external.number().min(0),
|
|
1083
|
-
output_per_million: exports_external.number().min(0),
|
|
1084
|
-
reasoning_per_million: exports_external.number().min(0).optional(),
|
|
1085
|
-
cache_per_million: exports_external.number().min(0).optional()
|
|
1086
|
-
});
|
|
1087
|
-
var PricingConfigSchema = exports_external.object({
|
|
1088
|
-
models: exports_external.record(exports_external.string().min(1), ModelPricingConfigSchema).optional().default({})
|
|
1089
|
-
});
|
|
1090
|
-
var HooksConfigSchema = exports_external.object({
|
|
1091
|
-
system_enhancer: exports_external.boolean().default(true),
|
|
1092
|
-
compaction: exports_external.boolean().default(true),
|
|
1093
|
-
agent_activity: exports_external.boolean().default(true),
|
|
1094
|
-
delegation_tracker: exports_external.boolean().default(false),
|
|
1095
|
-
agent_awareness_max_chars: exports_external.number().min(50).max(2000).default(300),
|
|
1096
|
-
delegation_gate: exports_external.boolean().default(true),
|
|
1097
|
-
delegation_max_chars: exports_external.number().min(500).max(20000).default(4000),
|
|
1098
|
-
background_subagents: exports_external.boolean().default(false),
|
|
1099
|
-
background_pending_timeout_minutes: exports_external.number().int().min(1).max(1440).default(30)
|
|
1100
|
-
});
|
|
1101
|
-
var ScoringWeightsSchema = exports_external.object({
|
|
1102
|
-
phase: exports_external.number().min(0).max(5).default(1),
|
|
1103
|
-
current_task: exports_external.number().min(0).max(5).default(2),
|
|
1104
|
-
blocked_task: exports_external.number().min(0).max(5).default(1.5),
|
|
1105
|
-
recent_failure: exports_external.number().min(0).max(5).default(2.5),
|
|
1106
|
-
recent_success: exports_external.number().min(0).max(5).default(0.5),
|
|
1107
|
-
evidence_presence: exports_external.number().min(0).max(5).default(1),
|
|
1108
|
-
decision_recency: exports_external.number().min(0).max(5).default(1.5),
|
|
1109
|
-
dependency_proximity: exports_external.number().min(0).max(5).default(1)
|
|
1110
|
-
});
|
|
1111
|
-
var DecisionDecaySchema = exports_external.object({
|
|
1112
|
-
mode: exports_external.enum(["linear", "exponential"]).default("exponential"),
|
|
1113
|
-
half_life_hours: exports_external.number().min(1).max(168).default(24)
|
|
1114
|
-
});
|
|
1115
|
-
var TokenRatiosSchema = exports_external.object({
|
|
1116
|
-
prose: exports_external.number().min(0.1).max(1).default(0.25),
|
|
1117
|
-
code: exports_external.number().min(0.1).max(1).default(0.4),
|
|
1118
|
-
markdown: exports_external.number().min(0.1).max(1).default(0.3),
|
|
1119
|
-
json: exports_external.number().min(0.1).max(1).default(0.35)
|
|
1120
|
-
});
|
|
1121
|
-
var ScoringConfigSchema = exports_external.object({
|
|
1122
|
-
enabled: exports_external.boolean().default(false),
|
|
1123
|
-
max_candidates: exports_external.number().min(10).max(500).default(100),
|
|
1124
|
-
weights: ScoringWeightsSchema.optional(),
|
|
1125
|
-
decision_decay: DecisionDecaySchema.optional(),
|
|
1126
|
-
token_ratios: TokenRatiosSchema.optional()
|
|
1127
|
-
});
|
|
1128
|
-
var ContextBudgetConfigSchema = exports_external.object({
|
|
1129
|
-
enabled: exports_external.boolean().default(true),
|
|
1130
|
-
warn_threshold: exports_external.number().min(0).max(1).default(0.7),
|
|
1131
|
-
critical_threshold: exports_external.number().min(0).max(1).default(0.9),
|
|
1132
|
-
model_limits: exports_external.record(exports_external.string(), exports_external.number().min(1000)).default({ default: 128000 }),
|
|
1133
|
-
max_injection_tokens: exports_external.number().min(100).max(50000).default(4000),
|
|
1134
|
-
unified_injection_tokens: exports_external.number().min(100).max(50000).optional(),
|
|
1135
|
-
tracked_agents: exports_external.array(exports_external.string()).default(["architect"]),
|
|
1136
|
-
scoring: ScoringConfigSchema.optional(),
|
|
1137
|
-
enforce: exports_external.boolean().default(true),
|
|
1138
|
-
prune_target: exports_external.number().min(0).max(1).default(0.7),
|
|
1139
|
-
preserve_last_n_turns: exports_external.number().min(0).max(100).default(4),
|
|
1140
|
-
recent_window: exports_external.number().min(1).max(100).default(10),
|
|
1141
|
-
enforce_on_agent_switch: exports_external.boolean().default(true),
|
|
1142
|
-
tool_output_mask_threshold: exports_external.number().min(100).max(1e5).default(2000)
|
|
1143
|
-
});
|
|
1144
|
-
var EvidenceConfigSchema = exports_external.object({
|
|
1145
|
-
enabled: exports_external.boolean().default(true),
|
|
1146
|
-
max_age_days: exports_external.number().min(1).max(365).default(90),
|
|
1147
|
-
max_bundles: exports_external.number().min(10).max(1e4).default(1000),
|
|
1148
|
-
auto_archive: exports_external.boolean().default(false)
|
|
1149
|
-
});
|
|
1150
|
-
var GateFeatureSchema = exports_external.object({
|
|
1151
|
-
enabled: exports_external.boolean().default(true)
|
|
1152
|
-
});
|
|
1153
|
-
var PlaceholderScanConfigSchema = GateFeatureSchema.extend({
|
|
1154
|
-
deny_patterns: exports_external.array(exports_external.string()).default([
|
|
1155
|
-
"TODO",
|
|
1156
|
-
"FIXME",
|
|
1157
|
-
"TBD",
|
|
1158
|
-
"XXX",
|
|
1159
|
-
"placeholder",
|
|
1160
|
-
"stub",
|
|
1161
|
-
"wip",
|
|
1162
|
-
"not implemented"
|
|
1163
|
-
]),
|
|
1164
|
-
allow_globs: exports_external.array(exports_external.string()).default([
|
|
1165
|
-
"docs/**",
|
|
1166
|
-
"examples/**",
|
|
1167
|
-
"tests/**",
|
|
1168
|
-
"**/*.test.*",
|
|
1169
|
-
"**/*.spec.*",
|
|
1170
|
-
"**/mocks/**",
|
|
1171
|
-
"**/__tests__/**"
|
|
1172
|
-
]),
|
|
1173
|
-
max_allowed_findings: exports_external.number().min(0).default(0),
|
|
1174
|
-
sentinel_allowlist: exports_external.array(exports_external.string()).default([])
|
|
1175
|
-
});
|
|
1176
|
-
var QualityBudgetConfigSchema = GateFeatureSchema.extend({
|
|
1177
|
-
max_complexity_delta: exports_external.number().default(5),
|
|
1178
|
-
max_public_api_delta: exports_external.number().default(10),
|
|
1179
|
-
max_duplication_ratio: exports_external.number().default(0.05),
|
|
1180
|
-
min_test_to_code_ratio: exports_external.number().default(0.3),
|
|
1181
|
-
enforce_on_globs: exports_external.array(exports_external.string()).default(["src/**"]),
|
|
1182
|
-
exclude_globs: exports_external.array(exports_external.string()).default(["docs/**", "tests/**", "**/*.test.*"])
|
|
1183
|
-
});
|
|
1184
|
-
var GATE_CONFIG_KNOWN_SECTION_KEYS = {
|
|
1185
|
-
syntax_check: ["enabled"],
|
|
1186
|
-
placeholder_scan: [
|
|
1187
|
-
"enabled",
|
|
1188
|
-
"deny_patterns",
|
|
1189
|
-
"allow_globs",
|
|
1190
|
-
"max_allowed_findings"
|
|
1191
|
-
],
|
|
1192
|
-
sast_scan: ["enabled"],
|
|
1193
|
-
sbom_generate: ["enabled"],
|
|
1194
|
-
build_check: ["enabled"],
|
|
1195
|
-
quality_budget: [
|
|
1196
|
-
"enabled",
|
|
1197
|
-
"max_complexity_delta",
|
|
1198
|
-
"max_public_api_delta",
|
|
1199
|
-
"max_duplication_ratio",
|
|
1200
|
-
"min_test_to_code_ratio",
|
|
1201
|
-
"enforce_on_globs",
|
|
1202
|
-
"exclude_globs"
|
|
1203
|
-
]
|
|
1204
|
-
};
|
|
1205
|
-
var GateConfigSchema = exports_external.object({
|
|
1206
|
-
syntax_check: GateFeatureSchema.default({ enabled: true }),
|
|
1207
|
-
placeholder_scan: PlaceholderScanConfigSchema.default({
|
|
1208
|
-
enabled: true,
|
|
1209
|
-
deny_patterns: [
|
|
1210
|
-
"TODO",
|
|
1211
|
-
"FIXME",
|
|
1212
|
-
"TBD",
|
|
1213
|
-
"XXX",
|
|
1214
|
-
"placeholder",
|
|
1215
|
-
"stub",
|
|
1216
|
-
"wip",
|
|
1217
|
-
"not implemented"
|
|
1218
|
-
],
|
|
1219
|
-
allow_globs: [
|
|
1220
|
-
"docs/**",
|
|
1221
|
-
"examples/**",
|
|
1222
|
-
"tests/**",
|
|
1223
|
-
"**/*.test.*",
|
|
1224
|
-
"**/*.spec.*",
|
|
1225
|
-
"**/mocks/**",
|
|
1226
|
-
"**/__tests__/**"
|
|
1227
|
-
],
|
|
1228
|
-
max_allowed_findings: 0,
|
|
1229
|
-
sentinel_allowlist: []
|
|
1230
|
-
}),
|
|
1231
|
-
sast_scan: GateFeatureSchema.default({ enabled: true }),
|
|
1232
|
-
sbom_generate: GateFeatureSchema.default({ enabled: true }),
|
|
1233
|
-
build_check: GateFeatureSchema.default({ enabled: true }),
|
|
1234
|
-
quality_budget: QualityBudgetConfigSchema.default(() => QualityBudgetConfigSchema.parse({}))
|
|
1235
|
-
});
|
|
1236
|
-
var PipelineConfigSchema = exports_external.object({
|
|
1237
|
-
parallel_precheck: exports_external.boolean().default(true)
|
|
1238
|
-
});
|
|
1239
|
-
var PhaseCompleteConfigSchema = exports_external.object({
|
|
1240
|
-
enabled: exports_external.boolean().default(true),
|
|
1241
|
-
required_agents: exports_external.array(exports_external.enum(["coder", "reviewer", "test_engineer"])).default(["coder", "reviewer", "test_engineer"]),
|
|
1242
|
-
require_docs: exports_external.boolean().default(true),
|
|
1243
|
-
policy: exports_external.enum(["enforce", "warn"]).default("enforce"),
|
|
1244
|
-
regression_sweep: exports_external.object({
|
|
1245
|
-
enforce: exports_external.boolean().default(false)
|
|
1246
|
-
}).optional()
|
|
1247
|
-
});
|
|
1248
|
-
var SummaryConfigSchema = exports_external.object({
|
|
1249
|
-
enabled: exports_external.boolean().default(true),
|
|
1250
|
-
threshold_bytes: exports_external.number().min(1024).max(1048576).default(16384),
|
|
1251
|
-
max_summary_chars: exports_external.number().min(100).max(5000).default(1000),
|
|
1252
|
-
max_stored_bytes: exports_external.number().min(10240).max(104857600).default(10485760),
|
|
1253
|
-
retention_days: exports_external.number().min(1).max(365).default(7),
|
|
1254
|
-
exempt_tools: exports_external.array(exports_external.string()).default(["retrieve_summary", "retrieve_lane_output", "task", "read"])
|
|
1255
|
-
});
|
|
1256
|
-
var ReviewPassesConfigSchema = exports_external.object({
|
|
1257
|
-
always_security_review: exports_external.boolean().default(false),
|
|
1258
|
-
security_globs: exports_external.array(exports_external.string()).default([
|
|
1259
|
-
"**/auth/**",
|
|
1260
|
-
"**/api/**",
|
|
1261
|
-
"**/crypto/**",
|
|
1262
|
-
"**/security/**",
|
|
1263
|
-
"**/middleware/**",
|
|
1264
|
-
"**/session/**",
|
|
1265
|
-
"**/token/**"
|
|
1266
|
-
])
|
|
1267
|
-
});
|
|
1268
|
-
var AutoReviewConfigSchema = exports_external.object({
|
|
1269
|
-
enabled: exports_external.boolean().default(false),
|
|
1270
|
-
trigger: exports_external.enum(["task_completion", "phase_boundary", "both"]).default("phase_boundary"),
|
|
1271
|
-
timeout_ms: exports_external.number().int().min(1e4).max(1800000).default(300000),
|
|
1272
|
-
max_diff_kb: exports_external.number().int().min(16).max(2048).default(256)
|
|
1273
|
-
});
|
|
1274
|
-
var AdversarialDetectionConfigSchema = exports_external.object({
|
|
1275
|
-
enabled: exports_external.boolean().default(true),
|
|
1276
|
-
policy: exports_external.enum(["warn", "gate", "ignore"]).default("warn"),
|
|
1277
|
-
pairs: exports_external.array(exports_external.tuple([exports_external.string(), exports_external.string()])).default([["coder", "reviewer"]])
|
|
1278
|
-
});
|
|
1279
|
-
var AdversarialTestingConfigSchemaBase = exports_external.object({
|
|
1280
|
-
enabled: exports_external.boolean().default(true),
|
|
1281
|
-
scope: exports_external.enum(["all", "security-only"]).default("all")
|
|
1282
|
-
});
|
|
1283
|
-
var AdversarialTestingConfigSchema = AdversarialTestingConfigSchemaBase.default(() => ({
|
|
1284
|
-
enabled: true,
|
|
1285
|
-
scope: "all"
|
|
1286
|
-
}));
|
|
1287
|
-
var IntegrationAnalysisConfigSchema = exports_external.object({
|
|
1288
|
-
enabled: exports_external.boolean().default(true)
|
|
1289
|
-
});
|
|
1290
|
-
var DocsConfigSchema = exports_external.object({
|
|
1291
|
-
enabled: exports_external.boolean().default(true),
|
|
1292
|
-
doc_patterns: exports_external.array(exports_external.string()).default([
|
|
1293
|
-
"README.md",
|
|
1294
|
-
"CONTRIBUTING.md",
|
|
1295
|
-
"docs/**/*.md",
|
|
1296
|
-
"docs/**/*.rst",
|
|
1297
|
-
"**/CHANGELOG.md"
|
|
1298
|
-
])
|
|
1299
|
-
});
|
|
1300
|
-
var DesignDocsConfigSchema = exports_external.object({
|
|
1301
|
-
enabled: exports_external.boolean().default(false),
|
|
1302
|
-
out_dir: exports_external.string().default("docs").refine((v) => v.length > 0 && v !== "." && !v.includes("..") && !v.startsWith("/") && !v.startsWith("\\") && !/^[A-Za-z]:/.test(v), {
|
|
1303
|
-
message: 'design_docs.out_dir must be a non-empty project-relative path with no "..", leading slash, or drive letter'
|
|
1304
|
-
}),
|
|
1305
|
-
language: exports_external.string().optional()
|
|
1306
|
-
});
|
|
1307
|
-
var UIReviewConfigSchema = exports_external.object({
|
|
1308
|
-
enabled: exports_external.boolean().default(false),
|
|
1309
|
-
trigger_paths: exports_external.array(exports_external.string()).default([
|
|
1310
|
-
"**/pages/**",
|
|
1311
|
-
"**/components/**",
|
|
1312
|
-
"**/views/**",
|
|
1313
|
-
"**/screens/**",
|
|
1314
|
-
"**/ui/**",
|
|
1315
|
-
"**/layouts/**"
|
|
1316
|
-
]),
|
|
1317
|
-
trigger_keywords: exports_external.array(exports_external.string()).default([
|
|
1318
|
-
"new page",
|
|
1319
|
-
"new screen",
|
|
1320
|
-
"new component",
|
|
1321
|
-
"redesign",
|
|
1322
|
-
"layout change",
|
|
1323
|
-
"form",
|
|
1324
|
-
"modal",
|
|
1325
|
-
"dialog",
|
|
1326
|
-
"dropdown",
|
|
1327
|
-
"sidebar",
|
|
1328
|
-
"navbar",
|
|
1329
|
-
"dashboard",
|
|
1330
|
-
"landing page",
|
|
1331
|
-
"signup",
|
|
1332
|
-
"login form",
|
|
1333
|
-
"settings page",
|
|
1334
|
-
"profile page"
|
|
1335
|
-
])
|
|
1336
|
-
});
|
|
1337
|
-
var CompactionAdvisoryConfigSchema = exports_external.object({
|
|
1338
|
-
enabled: exports_external.boolean().default(true),
|
|
1339
|
-
thresholds: exports_external.array(exports_external.number().int().min(10).max(500)).default([50, 75, 100, 125, 150]),
|
|
1340
|
-
message: exports_external.string().default("[SWARM HINT] Session has " + "$" + "{totalToolCalls} tool calls. Consider compacting at next phase boundary to maintain context quality.")
|
|
1341
|
-
});
|
|
1342
|
-
var LintConfigSchema = exports_external.object({
|
|
1343
|
-
enabled: exports_external.boolean().default(true),
|
|
1344
|
-
mode: exports_external.enum(["check", "fix"]).default("check"),
|
|
1345
|
-
linter: exports_external.enum(["biome", "eslint", "auto"]).default("auto"),
|
|
1346
|
-
patterns: exports_external.array(exports_external.string()).default([
|
|
1347
|
-
"**/*.{ts,tsx,js,jsx,mjs,cjs}",
|
|
1348
|
-
"**/biome.json",
|
|
1349
|
-
"**/biome.jsonc"
|
|
1350
|
-
]),
|
|
1351
|
-
exclude: exports_external.array(exports_external.string()).default([
|
|
1352
|
-
"**/node_modules/**",
|
|
1353
|
-
"**/dist/**",
|
|
1354
|
-
"**/.git/**",
|
|
1355
|
-
"**/coverage/**",
|
|
1356
|
-
"**/*.min.js"
|
|
1357
|
-
])
|
|
1358
|
-
});
|
|
1359
|
-
var SecretscanConfigSchema = exports_external.object({
|
|
1360
|
-
enabled: exports_external.boolean().default(true),
|
|
1361
|
-
patterns: exports_external.array(exports_external.string()).default([
|
|
1362
|
-
"**/*.{env,properties,yml,yaml,json,js,ts}",
|
|
1363
|
-
"**/.env*",
|
|
1364
|
-
"**/secrets/**",
|
|
1365
|
-
"**/credentials/**",
|
|
1366
|
-
"**/config/**/*.ts",
|
|
1367
|
-
"**/config/**/*.js"
|
|
1368
|
-
]),
|
|
1369
|
-
exclude: exports_external.array(exports_external.string()).default([
|
|
1370
|
-
"**/node_modules/**",
|
|
1371
|
-
"**/dist/**",
|
|
1372
|
-
"**/.git/**",
|
|
1373
|
-
"**/coverage/**",
|
|
1374
|
-
"**/test/**",
|
|
1375
|
-
"**/tests/**",
|
|
1376
|
-
"**/__tests__/**",
|
|
1377
|
-
"**/*.test.ts",
|
|
1378
|
-
"**/*.test.js",
|
|
1379
|
-
"**/*.spec.ts",
|
|
1380
|
-
"**/*.spec.js"
|
|
1381
|
-
]),
|
|
1382
|
-
extensions: exports_external.array(exports_external.string()).default([
|
|
1383
|
-
".env",
|
|
1384
|
-
".properties",
|
|
1385
|
-
".yml",
|
|
1386
|
-
".yaml",
|
|
1387
|
-
".json",
|
|
1388
|
-
".js",
|
|
1389
|
-
".ts",
|
|
1390
|
-
".py",
|
|
1391
|
-
".rb",
|
|
1392
|
-
".go",
|
|
1393
|
-
".java",
|
|
1394
|
-
".cs",
|
|
1395
|
-
".php"
|
|
1396
|
-
])
|
|
1397
|
-
});
|
|
1398
|
-
var GuardrailsProfileSchema = exports_external.object({
|
|
1399
|
-
max_tool_calls: exports_external.number().min(0).max(1000).optional(),
|
|
1400
|
-
max_duration_minutes: exports_external.number().min(0).max(480).optional(),
|
|
1401
|
-
max_repetitions: exports_external.number().min(3).max(50).optional(),
|
|
1402
|
-
max_consecutive_errors: exports_external.number().min(2).max(20).optional(),
|
|
1403
|
-
warning_threshold: exports_external.number().min(0.1).max(0.9).optional(),
|
|
1404
|
-
idle_timeout_minutes: exports_external.number().min(5).max(240).optional(),
|
|
1405
|
-
max_transient_retries: exports_external.number().min(0).max(20).optional()
|
|
1406
|
-
});
|
|
1407
|
-
var DEFAULT_AGENT_PROFILES = {
|
|
1408
|
-
architect: {
|
|
1409
|
-
max_tool_calls: 0,
|
|
1410
|
-
max_duration_minutes: 0,
|
|
1411
|
-
max_consecutive_errors: 8,
|
|
1412
|
-
warning_threshold: 0.75
|
|
1413
|
-
},
|
|
1414
|
-
coder: {
|
|
1415
|
-
max_tool_calls: 400,
|
|
1416
|
-
max_duration_minutes: 45,
|
|
1417
|
-
max_consecutive_errors: 8,
|
|
1418
|
-
warning_threshold: 0.85
|
|
1419
|
-
},
|
|
1420
|
-
test_engineer: {
|
|
1421
|
-
max_tool_calls: 400,
|
|
1422
|
-
max_duration_minutes: 45,
|
|
1423
|
-
max_consecutive_errors: 8,
|
|
1424
|
-
warning_threshold: 0.85
|
|
1425
|
-
},
|
|
1426
|
-
explorer: {
|
|
1427
|
-
max_tool_calls: 150,
|
|
1428
|
-
max_duration_minutes: 20,
|
|
1429
|
-
max_consecutive_errors: 8,
|
|
1430
|
-
warning_threshold: 0.75
|
|
1431
|
-
},
|
|
1432
|
-
reviewer: {
|
|
1433
|
-
max_tool_calls: 200,
|
|
1434
|
-
max_duration_minutes: 30,
|
|
1435
|
-
max_consecutive_errors: 8,
|
|
1436
|
-
warning_threshold: 0.65
|
|
1437
|
-
},
|
|
1438
|
-
critic: {
|
|
1439
|
-
max_tool_calls: 200,
|
|
1440
|
-
max_duration_minutes: 30,
|
|
1441
|
-
warning_threshold: 0.65
|
|
1442
|
-
},
|
|
1443
|
-
sme: {
|
|
1444
|
-
max_tool_calls: 200,
|
|
1445
|
-
max_duration_minutes: 30,
|
|
1446
|
-
warning_threshold: 0.65
|
|
1447
|
-
},
|
|
1448
|
-
docs: {
|
|
1449
|
-
max_tool_calls: 200,
|
|
1450
|
-
max_duration_minutes: 30,
|
|
1451
|
-
warning_threshold: 0.75
|
|
1452
|
-
},
|
|
1453
|
-
designer: {
|
|
1454
|
-
max_tool_calls: 150,
|
|
1455
|
-
max_duration_minutes: 20,
|
|
1456
|
-
warning_threshold: 0.75
|
|
1457
|
-
}
|
|
1458
|
-
};
|
|
1459
|
-
var DEFAULT_ARCHITECT_PROFILE = DEFAULT_AGENT_PROFILES.architect;
|
|
1460
|
-
var GuardrailsConfigSchema = exports_external.object({
|
|
1461
|
-
enabled: exports_external.boolean().default(true),
|
|
1462
|
-
max_tool_calls: exports_external.number().min(0).max(1000).default(200),
|
|
1463
|
-
max_duration_minutes: exports_external.number().min(0).max(480).default(30),
|
|
1464
|
-
max_repetitions: exports_external.number().min(3).max(50).default(10),
|
|
1465
|
-
max_consecutive_errors: exports_external.number().min(2).max(20).default(5),
|
|
1466
|
-
max_transient_retries: exports_external.number().min(0).max(20).default(5),
|
|
1467
|
-
warning_threshold: exports_external.number().min(0.1).max(0.9).default(0.75),
|
|
1468
|
-
idle_timeout_minutes: exports_external.number().min(5).max(240).default(60),
|
|
1469
|
-
no_op_warning_threshold: exports_external.number().min(1).max(100).default(15),
|
|
1470
|
-
max_coder_revisions: exports_external.number().int().min(1).max(20).default(5),
|
|
1471
|
-
runaway_output_max_turns: exports_external.number().int().min(1).max(20).default(5),
|
|
1472
|
-
qa_gates: exports_external.object({
|
|
1473
|
-
required_tools: exports_external.array(exports_external.string().min(1)).default([
|
|
1474
|
-
"diff",
|
|
1475
|
-
"syntax_check",
|
|
1476
|
-
"placeholder_scan",
|
|
1477
|
-
"lint",
|
|
1478
|
-
"pre_check_batch"
|
|
1479
|
-
]),
|
|
1480
|
-
require_reviewer_test_engineer: exports_external.boolean().default(true)
|
|
1481
|
-
}).optional(),
|
|
1482
|
-
profiles: exports_external.record(exports_external.string(), GuardrailsProfileSchema).optional(),
|
|
1483
|
-
block_destructive_commands: exports_external.boolean().default(true),
|
|
1484
|
-
interpreter_allowed_agents: exports_external.array(exports_external.string().min(1)).optional(),
|
|
1485
|
-
shell_audit_log: exports_external.boolean().default(true)
|
|
1486
|
-
});
|
|
1487
|
-
var WatchdogConfigSchema = exports_external.object({
|
|
1488
|
-
scope_guard: exports_external.boolean().default(true),
|
|
1489
|
-
skip_in_turbo: exports_external.boolean().default(false),
|
|
1490
|
-
delegation_ledger: exports_external.boolean().default(true)
|
|
1491
|
-
});
|
|
1492
|
-
var SelfReviewConfigSchema = exports_external.object({
|
|
1493
|
-
enabled: exports_external.boolean().default(true),
|
|
1494
|
-
skip_in_turbo: exports_external.boolean().default(true)
|
|
1495
|
-
});
|
|
1496
|
-
function resolveGuardrailsConfig(config, agentName) {
|
|
1497
|
-
if (!agentName) {
|
|
1498
|
-
return config;
|
|
1499
|
-
}
|
|
1500
|
-
const canonicalName = _internals.stripKnownSwarmPrefix(agentName);
|
|
1501
|
-
const hasBuiltInProfile = canonicalName in DEFAULT_AGENT_PROFILES;
|
|
1502
|
-
const userProfile = config.profiles?.[agentName] ?? config.profiles?.[canonicalName];
|
|
1503
|
-
if (!hasBuiltInProfile) {
|
|
1504
|
-
if (userProfile) {
|
|
1505
|
-
return { ...config, ...userProfile };
|
|
1506
|
-
}
|
|
1507
|
-
return config;
|
|
1508
|
-
}
|
|
1509
|
-
const builtInProfile = DEFAULT_AGENT_PROFILES[canonicalName];
|
|
1510
|
-
const resolved = {
|
|
1511
|
-
...config,
|
|
1512
|
-
...builtInProfile,
|
|
1513
|
-
...userProfile || {}
|
|
1514
|
-
};
|
|
1515
|
-
return resolved;
|
|
1516
|
-
}
|
|
1517
|
-
var ToolFilterConfigSchema = exports_external.object({
|
|
1518
|
-
enabled: exports_external.boolean().default(true),
|
|
1519
|
-
overrides: exports_external.record(exports_external.string(), exports_external.array(exports_external.string())).default({})
|
|
1520
|
-
});
|
|
1521
|
-
var PlanCursorConfigSchema = exports_external.object({
|
|
1522
|
-
enabled: exports_external.boolean().default(true),
|
|
1523
|
-
max_tokens: exports_external.number().min(500).max(4000).default(1500),
|
|
1524
|
-
lookahead_tasks: exports_external.number().min(0).max(5).default(2)
|
|
1525
|
-
});
|
|
1526
|
-
var ContextMapConfigSchema = exports_external.object({
|
|
1527
|
-
enabled: exports_external.boolean().default(false),
|
|
1528
|
-
mode: exports_external.enum(["conservative", "balanced", "aggressive"]).default("balanced"),
|
|
1529
|
-
max_capsule_tokens: exports_external.number().int().positive().default(2000),
|
|
1530
|
-
invalidate_on_hash_change: exports_external.boolean().default(true),
|
|
1531
|
-
agent_profiles: exports_external.record(exports_external.string(), exports_external.string()).default({})
|
|
1532
|
-
});
|
|
1533
|
-
var RepoGraphConfigSchema = exports_external.object({
|
|
1534
|
-
exclude_dirs: exports_external.array(exports_external.string().trim().min(1)).default([])
|
|
1535
|
-
});
|
|
1536
|
-
var CheckpointConfigSchema = exports_external.object({
|
|
1537
|
-
enabled: exports_external.boolean().default(true),
|
|
1538
|
-
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3),
|
|
1539
|
-
allow_empty_commits: exports_external.boolean().default(false)
|
|
1540
|
-
}).strict();
|
|
1541
|
-
var ApplyPatchConfigSchema = exports_external.object({
|
|
1542
|
-
fuzzy_match: exports_external.boolean().default(false),
|
|
1543
|
-
fuzzy_match_context_aware: exports_external.boolean().default(false)
|
|
1544
|
-
}).strict();
|
|
1545
|
-
var AutomationModeSchema = exports_external.enum(["manual", "hybrid", "auto"]);
|
|
1546
|
-
var AutomationCapabilitiesSchema = exports_external.object({
|
|
1547
|
-
plan_sync: exports_external.boolean().default(true),
|
|
1548
|
-
phase_preflight: exports_external.boolean().default(false),
|
|
1549
|
-
config_doctor_on_startup: exports_external.boolean().default(false),
|
|
1550
|
-
config_doctor_autofix: exports_external.boolean().default(false),
|
|
1551
|
-
evidence_auto_summaries: exports_external.boolean().default(true),
|
|
1552
|
-
decision_drift_detection: exports_external.boolean().default(true)
|
|
1553
|
-
});
|
|
1554
|
-
var AutomationConfigSchemaBase = exports_external.object({
|
|
1555
|
-
mode: AutomationModeSchema.default("manual"),
|
|
1556
|
-
capabilities: AutomationCapabilitiesSchema.default({
|
|
1557
|
-
plan_sync: true,
|
|
1558
|
-
phase_preflight: false,
|
|
1559
|
-
config_doctor_on_startup: false,
|
|
1560
|
-
config_doctor_autofix: false,
|
|
1561
|
-
evidence_auto_summaries: true,
|
|
1562
|
-
decision_drift_detection: true
|
|
1563
|
-
})
|
|
1564
|
-
});
|
|
1565
|
-
var AutomationConfigSchema = AutomationConfigSchemaBase;
|
|
1566
|
-
var KnowledgeConfigSchema = exports_external.object({
|
|
1567
|
-
enabled: exports_external.boolean().default(true),
|
|
1568
|
-
swarm_max_entries: exports_external.number().min(1).max(1e4).default(100),
|
|
1569
|
-
hive_max_entries: exports_external.number().min(1).max(1e5).default(200),
|
|
1570
|
-
auto_promote_days: exports_external.number().min(1).max(3650).default(90),
|
|
1571
|
-
max_inject_count: exports_external.number().min(0).max(50).default(5),
|
|
1572
|
-
delegate_max_inject_count: exports_external.number().min(0).max(50).default(8),
|
|
1573
|
-
inject_char_budget: exports_external.number().min(200).max(1e4).default(2000),
|
|
1574
|
-
context_budget_threshold: exports_external.number().int().positive().optional(),
|
|
1575
|
-
max_lesson_display_chars: exports_external.number().min(40).max(280).default(120),
|
|
1576
|
-
dedup_threshold: exports_external.number().min(0).max(1).default(0.6),
|
|
1577
|
-
scope_filter: exports_external.array(exports_external.string()).default(["global"]),
|
|
1578
|
-
hive_enabled: exports_external.boolean().default(true),
|
|
1579
|
-
rejected_max_entries: exports_external.number().min(1).max(1000).default(20),
|
|
1580
|
-
validation_enabled: exports_external.boolean().default(true),
|
|
1581
|
-
evergreen_confidence: exports_external.number().min(0).max(1).default(0.9),
|
|
1582
|
-
evergreen_utility: exports_external.number().min(0).max(1).default(0.8),
|
|
1583
|
-
low_utility_threshold: exports_external.number().min(0).max(1).default(0.3),
|
|
1584
|
-
min_retrievals_for_utility: exports_external.number().min(1).max(100).default(3),
|
|
1585
|
-
schema_version: exports_external.number().int().min(1).default(1),
|
|
1586
|
-
directive_min_confidence: exports_external.number().min(0).max(1).default(0.75),
|
|
1587
|
-
same_project_weight: exports_external.number().min(0).max(5).default(1),
|
|
1588
|
-
cross_project_weight: exports_external.number().min(0).max(5).default(0.5),
|
|
1589
|
-
min_encounter_score: exports_external.number().min(0).max(1).default(0.1),
|
|
1590
|
-
initial_encounter_score: exports_external.number().min(0).max(5).default(1),
|
|
1591
|
-
encounter_increment: exports_external.number().min(0).max(1).default(0.1),
|
|
1592
|
-
max_encounter_score: exports_external.number().min(1).max(20).default(10),
|
|
1593
|
-
default_max_phases: exports_external.number().int().positive().default(10),
|
|
1594
|
-
todo_max_phases: exports_external.number().int().positive().default(3),
|
|
1595
|
-
sweep_enabled: exports_external.boolean().default(true),
|
|
1596
|
-
confidence_floor_action: exports_external.enum(["none", "demote", "quarantine"]).default("demote"),
|
|
1597
|
-
confidence_floor_min_outcomes: exports_external.number().int().min(0).default(3),
|
|
1598
|
-
confidence_floor_signal_threshold: exports_external.number().min(-1).max(1).default(0),
|
|
1599
|
-
contradiction_threshold_action: exports_external.enum(["tag_only", "quarantine"]).default("quarantine"),
|
|
1600
|
-
contradiction_quarantine_threshold: exports_external.number().int().positive().default(3),
|
|
1601
|
-
contradiction_quarantine_window_days: exports_external.number().int().positive().default(30),
|
|
1602
|
-
promoted_demotion_min_negative_phases: exports_external.number().int().positive().default(3),
|
|
1603
|
-
promoted_demotion_signal_threshold: exports_external.number().min(-1).max(1).default(OUTCOME_BLOCK_THRESHOLD),
|
|
1604
|
-
promotion_min_terminal_applications: exports_external.number().min(0).max(100).default(0),
|
|
1605
|
-
promotion_min_distinct_cohorts: exports_external.number().min(0).max(50).default(0),
|
|
1606
|
-
realtime_learning_nudge: exports_external.object({
|
|
1607
|
-
enabled: exports_external.boolean().default(true),
|
|
1608
|
-
first_after_tool_calls: exports_external.number().int().min(1).max(1000).default(10),
|
|
1609
|
-
repeat_after_tool_calls: exports_external.number().int().min(1).max(1000).default(25)
|
|
1610
|
-
}).default({
|
|
1611
|
-
enabled: true,
|
|
1612
|
-
first_after_tool_calls: 10,
|
|
1613
|
-
repeat_after_tool_calls: 25
|
|
1614
|
-
}),
|
|
1615
|
-
retrieval: exports_external.object({
|
|
1616
|
-
mmr_lambda: exports_external.number().min(0).max(1).default(0.5),
|
|
1617
|
-
cold_start_bonus: exports_external.number().min(0).max(0.5).default(0.08),
|
|
1618
|
-
cold_start_max_age_phases: exports_external.number().int().min(0).max(100).default(3),
|
|
1619
|
-
synonym_min_cooccurrence: exports_external.number().int().min(1).max(100).default(3),
|
|
1620
|
-
synonym_map_max_pairs: exports_external.number().int().min(1).max(1e4).default(500)
|
|
1621
|
-
}).optional(),
|
|
1622
|
-
enrichment: exports_external.object({
|
|
1623
|
-
max_calls_per_day: exports_external.number().int().min(0).max(1000).default(30),
|
|
1624
|
-
quota_window: exports_external.enum(["utc", "local"]).default("utc"),
|
|
1625
|
-
batch_size: exports_external.number().int().min(1).max(100).optional()
|
|
1626
|
-
}).default({ max_calls_per_day: 30, quota_window: "utc" })
|
|
1627
|
-
});
|
|
1628
|
-
var MemoryConfigSchema = exports_external.object({
|
|
1629
|
-
enabled: exports_external.boolean().default(false),
|
|
1630
|
-
provider: exports_external.enum(["local-jsonl", "sqlite"]).default("sqlite"),
|
|
1631
|
-
storageDir: exports_external.string().default(".swarm/memory"),
|
|
1632
|
-
sqlite: exports_external.object({
|
|
1633
|
-
path: exports_external.string().default(".swarm/memory/memory.db"),
|
|
1634
|
-
busyTimeoutMs: exports_external.number().int().min(0).max(60000).default(5000)
|
|
1635
|
-
}).default({ path: ".swarm/memory/memory.db", busyTimeoutMs: 5000 }),
|
|
1636
|
-
recall: exports_external.object({
|
|
1637
|
-
defaultMaxItems: exports_external.number().int().min(1).max(20).default(8),
|
|
1638
|
-
defaultTokenBudget: exports_external.number().int().min(100).max(5000).default(1200),
|
|
1639
|
-
minScore: exports_external.number().min(0).max(1).default(0.05),
|
|
1640
|
-
injection: exports_external.object({
|
|
1641
|
-
enabled: exports_external.boolean().default(true),
|
|
1642
|
-
minScore: exports_external.number().min(0).max(1).default(0.25),
|
|
1643
|
-
requireQuerySignal: exports_external.boolean().default(true),
|
|
1644
|
-
maxItems: exports_external.number().int().min(1).max(20).default(6),
|
|
1645
|
-
tokenBudget: exports_external.number().int().min(100).max(5000).default(1000)
|
|
1646
|
-
}).default({
|
|
1647
|
-
enabled: true,
|
|
1648
|
-
minScore: 0.25,
|
|
1649
|
-
requireQuerySignal: true,
|
|
1650
|
-
maxItems: 6,
|
|
1651
|
-
tokenBudget: 1000
|
|
1652
|
-
})
|
|
1653
|
-
}).default({
|
|
1654
|
-
defaultMaxItems: 8,
|
|
1655
|
-
defaultTokenBudget: 1200,
|
|
1656
|
-
minScore: 0.05,
|
|
1657
|
-
injection: {
|
|
1658
|
-
enabled: true,
|
|
1659
|
-
minScore: 0.25,
|
|
1660
|
-
requireQuerySignal: true,
|
|
1661
|
-
maxItems: 6,
|
|
1662
|
-
tokenBudget: 1000
|
|
1663
|
-
}
|
|
1664
|
-
}),
|
|
1665
|
-
learning: exports_external.object({
|
|
1666
|
-
learningRate: exports_external.number().min(0).max(1).default(0.1),
|
|
1667
|
-
propagationFactor: exports_external.number().min(0).max(1).default(0.3),
|
|
1668
|
-
qValueBoostWeight: exports_external.number().min(0).max(1).default(0.1),
|
|
1669
|
-
suppressionThreshold: exports_external.number().min(0).max(1).default(0.15),
|
|
1670
|
-
promotionThreshold: exports_external.number().min(0).max(1).default(0.85),
|
|
1671
|
-
propagationTokenOverlapThreshold: exports_external.number().min(0).max(1).default(0.4),
|
|
1672
|
-
propagationEmbeddingCosineThreshold: exports_external.number().min(0).max(1).default(0.7),
|
|
1673
|
-
propagationFanout: exports_external.number().int().min(0).max(1000).default(20),
|
|
1674
|
-
propagationLookbackDays: exports_external.number().int().min(1).max(3650).default(30)
|
|
1675
|
-
}).default({
|
|
1676
|
-
learningRate: 0.1,
|
|
1677
|
-
propagationFactor: 0.3,
|
|
1678
|
-
qValueBoostWeight: 0.1,
|
|
1679
|
-
suppressionThreshold: 0.15,
|
|
1680
|
-
promotionThreshold: 0.85,
|
|
1681
|
-
propagationTokenOverlapThreshold: 0.4,
|
|
1682
|
-
propagationEmbeddingCosineThreshold: 0.7,
|
|
1683
|
-
propagationFanout: 20,
|
|
1684
|
-
propagationLookbackDays: 30
|
|
1685
|
-
}),
|
|
1686
|
-
writes: exports_external.object({
|
|
1687
|
-
mode: exports_external.literal("propose").default("propose")
|
|
1688
|
-
}).default({ mode: "propose" }),
|
|
1689
|
-
redaction: exports_external.object({
|
|
1690
|
-
rejectDurableSecrets: exports_external.boolean().default(true)
|
|
1691
|
-
}).default({ rejectDurableSecrets: true }),
|
|
1692
|
-
maintenance: exports_external.object({
|
|
1693
|
-
lowUtilityMaxConfidence: exports_external.number().min(0).max(1).default(0.45),
|
|
1694
|
-
lowUtilityMinAgeDays: exports_external.number().int().min(1).max(3650).default(30),
|
|
1695
|
-
importance: exports_external.object({
|
|
1696
|
-
wRecency: exports_external.number().min(0).max(1).default(0.2),
|
|
1697
|
-
wFrequency: exports_external.number().min(0).max(1).default(0.2),
|
|
1698
|
-
wFreshness: exports_external.number().min(0).max(1).default(0.15),
|
|
1699
|
-
wConfidence: exports_external.number().min(0).max(1).default(0.25),
|
|
1700
|
-
lambda: exports_external.number().min(0).max(10).default(0.05),
|
|
1701
|
-
mu: exports_external.number().min(0).max(10).default(0.01),
|
|
1702
|
-
n: exports_external.number().int().min(1).max(1e5).default(50),
|
|
1703
|
-
threshold: exports_external.number().min(0).max(1).default(0.2)
|
|
1704
|
-
}).default({
|
|
1705
|
-
wRecency: 0.2,
|
|
1706
|
-
wFrequency: 0.2,
|
|
1707
|
-
wFreshness: 0.15,
|
|
1708
|
-
wConfidence: 0.25,
|
|
1709
|
-
lambda: 0.05,
|
|
1710
|
-
mu: 0.01,
|
|
1711
|
-
n: 50,
|
|
1712
|
-
threshold: 0.2
|
|
1713
|
-
})
|
|
1714
|
-
}).default({
|
|
1715
|
-
lowUtilityMaxConfidence: 0.45,
|
|
1716
|
-
lowUtilityMinAgeDays: 30,
|
|
1717
|
-
importance: {
|
|
1718
|
-
wRecency: 0.2,
|
|
1719
|
-
wFrequency: 0.2,
|
|
1720
|
-
wFreshness: 0.15,
|
|
1721
|
-
wConfidence: 0.25,
|
|
1722
|
-
lambda: 0.05,
|
|
1723
|
-
mu: 0.01,
|
|
1724
|
-
n: 50,
|
|
1725
|
-
threshold: 0.2
|
|
1726
|
-
}
|
|
1727
|
-
}),
|
|
1728
|
-
qLearning: exports_external.object({
|
|
1729
|
-
learningRate: exports_external.number().min(0).max(1).default(0.1),
|
|
1730
|
-
qValueBoostWeight: exports_external.number().min(0).max(1).default(0.1),
|
|
1731
|
-
suppressionThreshold: exports_external.number().min(0).max(1).default(0.15),
|
|
1732
|
-
promotionThreshold: exports_external.number().min(0).max(1).default(0.85),
|
|
1733
|
-
promotionMinRetrievals: exports_external.number().int().min(0).max(1e5).default(5),
|
|
1734
|
-
propagationFraction: exports_external.number().min(0).max(1).default(0.3),
|
|
1735
|
-
propagationFanoutCap: exports_external.number().int().min(0).max(1e4).default(20),
|
|
1736
|
-
propagationWindowDays: exports_external.number().int().min(0).max(3650).default(30),
|
|
1737
|
-
propagationRelatednessThreshold: exports_external.number().min(0).max(1).default(0.7),
|
|
1738
|
-
explorationRate: exports_external.number().min(0).max(1).default(0.05),
|
|
1739
|
-
verdictPayloadCapBytes: exports_external.number().int().min(0).max(1048576).default(8192),
|
|
1740
|
-
initialQValue: exports_external.number().min(0).max(1).default(0.5)
|
|
1741
|
-
}).default({
|
|
1742
|
-
learningRate: 0.1,
|
|
1743
|
-
qValueBoostWeight: 0.1,
|
|
1744
|
-
suppressionThreshold: 0.15,
|
|
1745
|
-
promotionThreshold: 0.85,
|
|
1746
|
-
promotionMinRetrievals: 5,
|
|
1747
|
-
propagationFraction: 0.3,
|
|
1748
|
-
propagationFanoutCap: 20,
|
|
1749
|
-
propagationWindowDays: 30,
|
|
1750
|
-
propagationRelatednessThreshold: 0.7,
|
|
1751
|
-
explorationRate: 0.05,
|
|
1752
|
-
verdictPayloadCapBytes: 8192,
|
|
1753
|
-
initialQValue: 0.5
|
|
1754
|
-
}),
|
|
1755
|
-
consolidation: exports_external.object({
|
|
1756
|
-
enabled: exports_external.boolean().default(false),
|
|
1757
|
-
maxClustersPerPass: exports_external.number().int().min(1).max(100).default(10),
|
|
1758
|
-
jaccardThreshold: exports_external.number().min(0).max(1).default(0.3),
|
|
1759
|
-
autoApplyMinConfidence: exports_external.number().min(0).max(1).default(0.6),
|
|
1760
|
-
decayHalfLifeDays: exports_external.object({
|
|
1761
|
-
user_preference: exports_external.number().int().min(0).max(36500).default(0),
|
|
1762
|
-
project_fact: exports_external.number().int().min(0).max(36500).default(0),
|
|
1763
|
-
architecture_decision: exports_external.number().int().min(0).max(36500).default(0),
|
|
1764
|
-
repo_convention: exports_external.number().int().min(0).max(36500).default(0),
|
|
1765
|
-
api_finding: exports_external.number().int().min(0).max(36500).default(180),
|
|
1766
|
-
code_pattern: exports_external.number().int().min(0).max(36500).default(90),
|
|
1767
|
-
test_pattern: exports_external.number().int().min(0).max(36500).default(90),
|
|
1768
|
-
failure_pattern: exports_external.number().int().min(0).max(36500).default(90),
|
|
1769
|
-
security_note: exports_external.number().int().min(0).max(36500).default(0),
|
|
1770
|
-
evidence: exports_external.number().int().min(0).max(36500).default(180),
|
|
1771
|
-
todo: exports_external.number().int().min(0).max(36500).default(30),
|
|
1772
|
-
scratch: exports_external.number().int().min(0).max(36500).default(7)
|
|
1773
|
-
}).default({
|
|
1774
|
-
user_preference: 0,
|
|
1775
|
-
project_fact: 0,
|
|
1776
|
-
architecture_decision: 0,
|
|
1777
|
-
repo_convention: 0,
|
|
1778
|
-
api_finding: 180,
|
|
1779
|
-
code_pattern: 90,
|
|
1780
|
-
test_pattern: 90,
|
|
1781
|
-
failure_pattern: 90,
|
|
1782
|
-
security_note: 0,
|
|
1783
|
-
evidence: 180,
|
|
1784
|
-
todo: 30,
|
|
1785
|
-
scratch: 7
|
|
1786
|
-
})
|
|
1787
|
-
}).default({
|
|
1788
|
-
enabled: false,
|
|
1789
|
-
maxClustersPerPass: 10,
|
|
1790
|
-
jaccardThreshold: 0.3,
|
|
1791
|
-
autoApplyMinConfidence: 0.6,
|
|
1792
|
-
decayHalfLifeDays: {
|
|
1793
|
-
user_preference: 0,
|
|
1794
|
-
project_fact: 0,
|
|
1795
|
-
architecture_decision: 0,
|
|
1796
|
-
repo_convention: 0,
|
|
1797
|
-
api_finding: 180,
|
|
1798
|
-
code_pattern: 90,
|
|
1799
|
-
test_pattern: 90,
|
|
1800
|
-
failure_pattern: 90,
|
|
1801
|
-
security_note: 0,
|
|
1802
|
-
evidence: 180,
|
|
1803
|
-
todo: 30,
|
|
1804
|
-
scratch: 7
|
|
1805
|
-
}
|
|
1806
|
-
}),
|
|
1807
|
-
hardDelete: exports_external.boolean().default(false),
|
|
1808
|
-
embeddings: exports_external.object({
|
|
1809
|
-
enabled: exports_external.boolean().default(false),
|
|
1810
|
-
model: exports_external.string().default("Xenova/all-MiniLM-L6-v2"),
|
|
1811
|
-
dimension: exports_external.number().int().min(1).default(384),
|
|
1812
|
-
version: exports_external.string().optional(),
|
|
1813
|
-
cacheSize: exports_external.number().int().min(1).default(256)
|
|
1814
|
-
}).default({
|
|
1815
|
-
enabled: false,
|
|
1816
|
-
model: "Xenova/all-MiniLM-L6-v2",
|
|
1817
|
-
dimension: 384,
|
|
1818
|
-
cacheSize: 256
|
|
1819
|
-
}),
|
|
1820
|
-
retrieval: exports_external.object({
|
|
1821
|
-
rrfK: exports_external.number().int().min(1).default(60),
|
|
1822
|
-
weights: exports_external.object({
|
|
1823
|
-
lexical: exports_external.number().min(0).max(1).default(0.5),
|
|
1824
|
-
dense: exports_external.number().min(0).max(1).default(0.4),
|
|
1825
|
-
metadata: exports_external.number().min(0).max(1).default(0.1)
|
|
1826
|
-
}).default({
|
|
1827
|
-
lexical: 0.5,
|
|
1828
|
-
dense: 0.4,
|
|
1829
|
-
metadata: 0.1
|
|
1830
|
-
}),
|
|
1831
|
-
rerank: exports_external.object({
|
|
1832
|
-
enabled: exports_external.boolean().default(false),
|
|
1833
|
-
model: exports_external.string().optional()
|
|
1834
|
-
}).default({ enabled: false }),
|
|
1835
|
-
latencyBudgetMs: exports_external.number().int().min(0).default(250)
|
|
1836
|
-
}).default({
|
|
1837
|
-
rrfK: 60,
|
|
1838
|
-
weights: {
|
|
1839
|
-
lexical: 0.5,
|
|
1840
|
-
dense: 0.4,
|
|
1841
|
-
metadata: 0.1
|
|
1842
|
-
},
|
|
1843
|
-
rerank: {
|
|
1844
|
-
enabled: false
|
|
1845
|
-
},
|
|
1846
|
-
latencyBudgetMs: 250
|
|
1847
|
-
})
|
|
1848
|
-
});
|
|
1849
|
-
var CuratorConfigSchema = exports_external.object({
|
|
1850
|
-
enabled: exports_external.boolean().default(true),
|
|
1851
|
-
init_enabled: exports_external.boolean().default(true),
|
|
1852
|
-
phase_enabled: exports_external.boolean().default(true),
|
|
1853
|
-
postmortem_enabled: exports_external.boolean().default(true),
|
|
1854
|
-
max_summary_tokens: exports_external.number().min(500).max(8000).default(2000),
|
|
1855
|
-
min_knowledge_confidence: exports_external.number().min(0).max(1).default(0.7),
|
|
1856
|
-
compliance_report: exports_external.boolean().default(true),
|
|
1857
|
-
suppress_warnings: exports_external.boolean().default(true),
|
|
1858
|
-
drift_inject_max_chars: exports_external.number().min(100).max(2000).default(500),
|
|
1859
|
-
llm_timeout_ms: exports_external.number().int().min(5000).max(600000).default(300000),
|
|
1860
|
-
skill_generation_enabled: exports_external.boolean().default(true),
|
|
1861
|
-
skill_generation_mode: exports_external.enum(["draft", "active"]).default("draft"),
|
|
1862
|
-
min_skill_confidence: exports_external.number().min(0).max(1).default(0.7),
|
|
1863
|
-
min_skill_confirmations: exports_external.number().int().min(1).max(50).default(2)
|
|
1864
|
-
});
|
|
1865
|
-
var ArchitecturalSupervisionConfigSchema = exports_external.object({
|
|
1866
|
-
enabled: exports_external.boolean().default(false),
|
|
1867
|
-
mode: exports_external.enum(["advisory", "gate"]).default("advisory"),
|
|
1868
|
-
run_on: exports_external.enum(["phase_complete"]).default("phase_complete"),
|
|
1869
|
-
summary_model: exports_external.string().min(1).optional(),
|
|
1870
|
-
max_agent_summary_words: exports_external.number().int().min(20).max(500).default(100),
|
|
1871
|
-
max_phase_summary_words: exports_external.number().int().min(50).max(1000).default(250),
|
|
1872
|
-
allow_concerns_to_complete: exports_external.boolean().default(true),
|
|
1873
|
-
persist_knowledge_recommendations: exports_external.boolean().default(false),
|
|
1874
|
-
provenance_verify: exports_external.boolean().default(false)
|
|
1875
|
-
});
|
|
1876
|
-
var KnowledgeApplicationConfigSchema = exports_external.object({
|
|
1877
|
-
enabled: exports_external.boolean().default(true),
|
|
1878
|
-
mode: exports_external.enum(["warn", "enforce"]).default("warn"),
|
|
1879
|
-
min_confidence: exports_external.number().min(0).max(1).default(0.85),
|
|
1880
|
-
critical_requires_ack: exports_external.boolean().default(true),
|
|
1881
|
-
require_skill_refs: exports_external.boolean().default(true),
|
|
1882
|
-
high_risk_tools: exports_external.array(exports_external.string()).default([
|
|
1883
|
-
"save_plan",
|
|
1884
|
-
"update_task_status",
|
|
1885
|
-
"phase_complete",
|
|
1886
|
-
"task",
|
|
1887
|
-
"Task"
|
|
1888
|
-
])
|
|
1889
|
-
});
|
|
1890
|
-
var SkillPropagationAudienceSchema = exports_external.string().max(64).refine((value) => value !== "swarm-plugin", {
|
|
1891
|
-
message: "swarm-plugin is reserved for plugin-internal skill routing"
|
|
1892
|
-
}).refine((value) => !value.startsWith("runner:"), {
|
|
1893
|
-
message: "runner:* values are derived from the active runner"
|
|
1894
|
-
}).regex(/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/, {
|
|
1895
|
-
message: "audiences must be lowercase domain tokens"
|
|
1896
|
-
});
|
|
1897
|
-
var SkillPropagationConfigSchema = exports_external.object({
|
|
1898
|
-
enabled: exports_external.boolean().default(true),
|
|
1899
|
-
enforce: exports_external.boolean().default(false),
|
|
1900
|
-
audiences: exports_external.array(SkillPropagationAudienceSchema).max(16).transform((values) => [...new Set(values)]).default([])
|
|
1901
|
-
});
|
|
1902
|
-
var SkillImproverConfigSchema = exports_external.object({
|
|
1903
|
-
enabled: exports_external.boolean().default(false),
|
|
1904
|
-
model: exports_external.string().nullable().default(null),
|
|
1905
|
-
fallback_models: exports_external.array(exports_external.string()).default([]),
|
|
1906
|
-
max_calls_per_day: exports_external.number().int().min(1).max(1000).default(10),
|
|
1907
|
-
trigger: exports_external.enum(["manual", "scheduled"]).default("manual"),
|
|
1908
|
-
consolidation_interval_hours: exports_external.number().int().min(1).max(24 * 30).default(24),
|
|
1909
|
-
consolidation_max_calls_per_run: exports_external.number().int().min(1).max(100).default(1),
|
|
1910
|
-
targets: exports_external.array(exports_external.enum(["skills", "spec", "architect_prompt", "knowledge"])).default(["skills", "spec", "architect_prompt", "knowledge"]),
|
|
1911
|
-
write_mode: exports_external.enum(["proposal", "draft_skills"]).default("proposal"),
|
|
1912
|
-
require_user_approval: exports_external.boolean().default(true),
|
|
1913
|
-
quota_window: exports_external.enum(["utc", "local"]).default("utc"),
|
|
1914
|
-
allow_deterministic_fallback: exports_external.boolean().default(true)
|
|
1915
|
-
});
|
|
1916
|
-
var SkillsConfigSchema = exports_external.object({
|
|
1917
|
-
enabled: exports_external.boolean().default(false)
|
|
1918
|
-
});
|
|
1919
|
-
var SpecWriterConfigSchema = exports_external.object({
|
|
1920
|
-
enabled: exports_external.boolean().default(true),
|
|
1921
|
-
model: exports_external.string().nullable().default(null),
|
|
1922
|
-
fallback_models: exports_external.array(exports_external.string()).default([]),
|
|
1923
|
-
allow_spec_write: exports_external.boolean().default(true)
|
|
1924
|
-
});
|
|
1925
|
-
var SlopDetectorConfigSchema = exports_external.object({
|
|
1926
|
-
enabled: exports_external.boolean().default(true),
|
|
1927
|
-
classThreshold: exports_external.number().int().min(1).default(3),
|
|
1928
|
-
commentStripThreshold: exports_external.number().int().min(1).default(5),
|
|
1929
|
-
diffLineThreshold: exports_external.number().int().min(10).default(200),
|
|
1930
|
-
importHygieneThreshold: exports_external.number().int().min(1).default(2)
|
|
1931
|
-
});
|
|
1932
|
-
var IncrementalVerifyConfigSchema = exports_external.object({
|
|
1933
|
-
enabled: exports_external.boolean().default(true),
|
|
1934
|
-
command: exports_external.union([exports_external.string(), exports_external.array(exports_external.string())]).nullable().default(null),
|
|
1935
|
-
timeoutMs: exports_external.number().int().min(1000).max(300000).default(30000),
|
|
1936
|
-
triggerAgents: exports_external.array(exports_external.string()).default(["coder"])
|
|
1937
|
-
});
|
|
1938
|
-
var CompactionConfigSchema = exports_external.object({
|
|
1939
|
-
enabled: exports_external.boolean().default(true),
|
|
1940
|
-
observationThreshold: exports_external.number().min(1).max(99).default(40),
|
|
1941
|
-
reflectionThreshold: exports_external.number().min(1).max(99).default(60),
|
|
1942
|
-
emergencyThreshold: exports_external.number().min(1).max(99).default(80),
|
|
1943
|
-
preserveLastNTurns: exports_external.number().int().min(1).default(5)
|
|
1944
|
-
});
|
|
1945
|
-
var PrmConfigSchema = exports_external.object({
|
|
1946
|
-
enabled: exports_external.boolean().default(true),
|
|
1947
|
-
pattern_thresholds: exports_external.object({
|
|
1948
|
-
repetition_loop: exports_external.number().min(1).default(2),
|
|
1949
|
-
ping_pong: exports_external.number().min(1).default(2),
|
|
1950
|
-
expansion_drift: exports_external.number().min(1).default(3),
|
|
1951
|
-
stuck_on_test: exports_external.number().min(1).default(3),
|
|
1952
|
-
context_thrash: exports_external.number().min(1).default(3)
|
|
1953
|
-
}).default(() => ({
|
|
1954
|
-
repetition_loop: 2,
|
|
1955
|
-
ping_pong: 2,
|
|
1956
|
-
expansion_drift: 3,
|
|
1957
|
-
stuck_on_test: 3,
|
|
1958
|
-
context_thrash: 3
|
|
1959
|
-
})),
|
|
1960
|
-
max_trajectory_lines: exports_external.number().min(10).default(1000),
|
|
1961
|
-
escalation_enabled: exports_external.boolean().default(true),
|
|
1962
|
-
detection_timeout_ms: exports_external.number().min(10).default(100)
|
|
1963
|
-
});
|
|
1964
|
-
var AgentAuthorityRuleSchema = exports_external.object({
|
|
1965
|
-
readOnly: exports_external.boolean().optional(),
|
|
1966
|
-
blockedExact: exports_external.array(exports_external.string()).optional(),
|
|
1967
|
-
allowedExact: exports_external.array(exports_external.string()).optional(),
|
|
1968
|
-
blockedPrefix: exports_external.array(exports_external.string()).optional(),
|
|
1969
|
-
allowedPrefix: exports_external.array(exports_external.string()).optional(),
|
|
1970
|
-
blockedZones: exports_external.array(exports_external.enum(["production", "test", "config", "generated", "docs", "build"])).optional(),
|
|
1971
|
-
blockedGlobs: exports_external.array(exports_external.string()).optional(),
|
|
1972
|
-
allowedGlobs: exports_external.array(exports_external.string()).optional(),
|
|
1973
|
-
allowedCaseSensitiveGlobs: exports_external.array(exports_external.string()).optional()
|
|
1974
|
-
});
|
|
1975
|
-
var AuthorityConfigSchema = exports_external.object({
|
|
1976
|
-
enabled: exports_external.boolean().default(true),
|
|
1977
|
-
rules: exports_external.record(exports_external.string(), AgentAuthorityRuleSchema).default({}),
|
|
1978
|
-
universal_deny_prefixes: exports_external.array(exports_external.string().min(1)).default([]),
|
|
1979
|
-
verifier_config_paths: exports_external.array(exports_external.string()).optional().describe("Additional glob patterns for verifier config files that are merged into the architect agent's blockedGlobs at plugin init. Writes to matching files are blocked by the authority layer.")
|
|
1980
|
-
});
|
|
1981
|
-
var GeneralCouncilMemberConfigSchema = exports_external.object({
|
|
1982
|
-
memberId: exports_external.string().min(1),
|
|
1983
|
-
model: exports_external.string().min(1),
|
|
1984
|
-
role: exports_external.enum([
|
|
1985
|
-
"generalist",
|
|
1986
|
-
"skeptic",
|
|
1987
|
-
"domain_expert",
|
|
1988
|
-
"devil_advocate",
|
|
1989
|
-
"synthesizer"
|
|
1990
|
-
]),
|
|
1991
|
-
persona: exports_external.string().optional()
|
|
1992
|
-
}).strict();
|
|
1993
|
-
var GeneralCouncilConfigSchema = exports_external.object({
|
|
1994
|
-
enabled: exports_external.boolean().default(false),
|
|
1995
|
-
searchProvider: exports_external.enum(["tavily", "brave"]).default("tavily"),
|
|
1996
|
-
searchApiKey: exports_external.string().optional(),
|
|
1997
|
-
members: exports_external.array(GeneralCouncilMemberConfigSchema).default([]),
|
|
1998
|
-
presets: exports_external.record(exports_external.string(), exports_external.array(GeneralCouncilMemberConfigSchema)).default({}),
|
|
1999
|
-
deliberate: exports_external.boolean().default(true),
|
|
2000
|
-
moderator: exports_external.boolean().default(true),
|
|
2001
|
-
moderatorModel: exports_external.string().optional(),
|
|
2002
|
-
maxSourcesPerMember: exports_external.number().int().min(1).max(20).default(5)
|
|
2003
|
-
}).strict();
|
|
2004
|
-
var CouncilConfigSchema = exports_external.object({
|
|
2005
|
-
enabled: exports_external.boolean().default(false),
|
|
2006
|
-
maxRounds: exports_external.number().int().min(1).max(10).default(3),
|
|
2007
|
-
parallelTimeoutMs: exports_external.number().int().min(5000).max(120000).default(30000),
|
|
2008
|
-
vetoPriority: exports_external.boolean().default(true),
|
|
2009
|
-
requireAllMembers: exports_external.boolean().default(false).describe("When true, submit_council_verdicts rejects if fewer than 5 member verdicts are provided. Equivalent to minimumMembers: 5."),
|
|
2010
|
-
minimumMembers: exports_external.number().int().min(1).max(5).default(3).describe("Minimum distinct council member verdicts required for synthesis. Default 3. Set to 1 to disable quorum enforcement. requireAllMembers: true overrides this to 5 (stricter constraint wins)."),
|
|
2011
|
-
escalateOnMaxRounds: exports_external.string().optional().describe("Optional webhook URL or handler name invoked when maxRounds is reached without APPROVE. Declared for forward compatibility; no behavior is implemented yet."),
|
|
2012
|
-
phaseConcernsAllowComplete: exports_external.boolean().default(true).describe("When true, a phase-level council CONCERNS verdict with only MEDIUM/LOW findings does NOT block phase completion \u2014 the advisory notes are logged as warnings and the phase proceeds. When false, CONCERNS blocks like REJECT. Note: HIGH/CRITICAL findings from CONCERNS members are always promoted to requiredFixes and block at the tool level regardless of this setting. Default: true."),
|
|
2013
|
-
general: GeneralCouncilConfigSchema.optional()
|
|
2014
|
-
}).strict();
|
|
2015
|
-
var PrMonitorConfigSchema = exports_external.object({
|
|
2016
|
-
enabled: exports_external.boolean().default(false),
|
|
2017
|
-
poll_interval_seconds: exports_external.number().int().min(30).max(300).default(60),
|
|
2018
|
-
max_subscriptions: exports_external.number().int().min(1).max(100).default(20),
|
|
2019
|
-
max_prs_per_cycle: exports_external.number().int().min(1).max(20).default(5),
|
|
2020
|
-
max_concurrent_pr_polls: exports_external.number().int().min(1).max(10).default(3),
|
|
2021
|
-
poll_timeout_ms: exports_external.number().int().min(5000).max(120000).default(30000),
|
|
2022
|
-
failure_threshold: exports_external.number().int().min(1).max(20).default(5),
|
|
2023
|
-
cooldown_seconds: exports_external.number().int().min(5).max(600).default(30),
|
|
2024
|
-
max_cooldown_seconds: exports_external.number().int().min(30).max(3600).default(300),
|
|
2025
|
-
cleanup_ttl_days: exports_external.number().int().min(1).max(90).default(7),
|
|
2026
|
-
auto_unsubscribe_on_merge: exports_external.boolean().default(true),
|
|
2027
|
-
auto_unsubscribe_on_close: exports_external.boolean().default(true),
|
|
2028
|
-
notify_ci_failure: exports_external.boolean().default(true),
|
|
2029
|
-
notify_new_comments: exports_external.boolean().default(true),
|
|
2030
|
-
notify_merge_conflict: exports_external.boolean().default(true),
|
|
2031
|
-
notify_review_activity: exports_external.boolean().default(true),
|
|
2032
|
-
notify_merged: exports_external.boolean().default(true),
|
|
2033
|
-
notify_closed: exports_external.boolean().default(true),
|
|
2034
|
-
notify_ci_success: exports_external.boolean().default(false),
|
|
2035
|
-
auto_pr_feedback: exports_external.boolean().default(false),
|
|
2036
|
-
event_delivery: exports_external.enum(["advisory", "prompt"]).default("prompt"),
|
|
2037
|
-
auto_subscribe_on_pr_create: exports_external.boolean().default(true)
|
|
2038
|
-
}).strict();
|
|
2039
|
-
var ParallelizationConfigSchema = exports_external.object({
|
|
2040
|
-
enabled: exports_external.boolean().default(false),
|
|
2041
|
-
maxConcurrentTasks: exports_external.number().int().min(1).max(64).default(1),
|
|
2042
|
-
evidenceLockTimeoutMs: exports_external.number().int().min(1000).max(300000).default(60000),
|
|
2043
|
-
max_coders: exports_external.number().int().min(1).max(16).default(3),
|
|
2044
|
-
max_reviewers: exports_external.number().int().min(1).max(16).default(2)
|
|
2045
|
-
});
|
|
2046
|
-
var WorktreeIsolationConfigSchema = exports_external.object({
|
|
2047
|
-
policy: exports_external.enum(["auto", "required", "disabled"]).default("auto"),
|
|
2048
|
-
merge_strategy: exports_external.enum(["merge", "rebase", "cherry-pick"]).default("merge"),
|
|
2049
|
-
worktree_dir: exports_external.string().optional(),
|
|
2050
|
-
deps_strategy: exports_external.enum(["skip", "copy", "link"]).default("skip"),
|
|
2051
|
-
serialization_release_after_dispatches: exports_external.number().int().positive().default(5),
|
|
2052
|
-
serialization_release_after_ms: exports_external.number().int().positive().default(60000),
|
|
2053
|
-
runtime_isolation: exports_external.object({
|
|
2054
|
-
enabled: exports_external.boolean().default(false),
|
|
2055
|
-
port_base: exports_external.number().int().nonnegative().max(65535).optional(),
|
|
2056
|
-
port_stride: exports_external.number().int().positive().default(1),
|
|
2057
|
-
env_overrides: exports_external.record(exports_external.string(), exports_external.string()).optional(),
|
|
2058
|
-
cache_redirects: exports_external.record(exports_external.string(), exports_external.string()).optional()
|
|
2059
|
-
}).optional()
|
|
2060
|
-
});
|
|
2061
|
-
var LeanTurboConfigSchema = exports_external.object({
|
|
2062
|
-
max_parallel_coders: exports_external.number().int().min(1).max(6).default(4),
|
|
2063
|
-
require_declared_scope: exports_external.boolean().default(true),
|
|
2064
|
-
conflict_policy: exports_external.enum(["serialize", "degrade"]).default("serialize"),
|
|
2065
|
-
degrade_on_risk: exports_external.boolean().default(true),
|
|
2066
|
-
phase_reviewer: exports_external.boolean().default(true),
|
|
2067
|
-
phase_critic: exports_external.boolean().default(true),
|
|
2068
|
-
integrated_diff_required: exports_external.boolean().default(true),
|
|
2069
|
-
allow_docs_only_without_reviewer: exports_external.boolean().default(false),
|
|
2070
|
-
worktree_isolation: exports_external.boolean().default(true),
|
|
2071
|
-
merge_strategy: exports_external.enum(["merge", "rebase", "cherry-pick"]).default("merge").optional(),
|
|
2072
|
-
worktree_dir: exports_external.string().optional(),
|
|
2073
|
-
deps_strategy: exports_external.enum(["skip", "copy", "link"]).optional(),
|
|
2074
|
-
runtime_isolation: exports_external.object({
|
|
2075
|
-
enabled: exports_external.boolean().default(false),
|
|
2076
|
-
port_base: exports_external.number().int().nonnegative().max(65535).optional(),
|
|
2077
|
-
port_stride: exports_external.number().int().positive().default(1),
|
|
2078
|
-
env_overrides: exports_external.record(exports_external.string(), exports_external.string()).optional(),
|
|
2079
|
-
cache_redirects: exports_external.record(exports_external.string(), exports_external.string()).optional()
|
|
2080
|
-
}).optional()
|
|
2081
|
-
});
|
|
2082
|
-
var EpicConfigSchema = exports_external.object({
|
|
2083
|
-
cochange: exports_external.object({
|
|
2084
|
-
enabled: exports_external.boolean().default(false),
|
|
2085
|
-
threshold: exports_external.number().min(-1).max(1).default(0.6),
|
|
2086
|
-
min_co_changes: exports_external.number().int().min(1).default(5)
|
|
2087
|
-
}).strict().optional(),
|
|
2088
|
-
mode: exports_external.object({
|
|
2089
|
-
enabled: exports_external.boolean().default(false),
|
|
2090
|
-
activation_threshold: exports_external.number().min(0).max(1).default(0.3),
|
|
2091
|
-
min_commits_for_signal: exports_external.number().int().min(1).default(20)
|
|
2092
|
-
}).strict().optional(),
|
|
2093
|
-
calibration: exports_external.object({
|
|
2094
|
-
enabled: exports_external.boolean().default(true),
|
|
2095
|
-
floor_threshold: exports_external.number().min(0).max(1).default(0.05),
|
|
2096
|
-
tighten_step: exports_external.number().min(0).max(1).default(0.02),
|
|
2097
|
-
loosen_step: exports_external.number().min(0).max(1).default(0.01),
|
|
2098
|
-
loosen_window: exports_external.number().int().min(1).default(10)
|
|
2099
|
-
}).strict().optional()
|
|
2100
|
-
}).strict();
|
|
2101
|
-
var StandardTurboConfigSchema = exports_external.object({
|
|
2102
|
-
strategy: exports_external.literal("standard"),
|
|
2103
|
-
lean: LeanTurboConfigSchema.optional(),
|
|
2104
|
-
epic: EpicConfigSchema.optional()
|
|
2105
|
-
});
|
|
2106
|
-
var LeanTurboStrategyConfigSchema = exports_external.object({
|
|
2107
|
-
strategy: exports_external.literal("lean"),
|
|
2108
|
-
lean: LeanTurboConfigSchema,
|
|
2109
|
-
epic: EpicConfigSchema.optional()
|
|
2110
|
-
});
|
|
2111
|
-
var TurboConfigSchema = exports_external.discriminatedUnion("strategy", [
|
|
2112
|
-
StandardTurboConfigSchema,
|
|
2113
|
-
LeanTurboStrategyConfigSchema
|
|
2114
|
-
]);
|
|
2115
|
-
var ExternalSkillCandidateSourceTypeSchema = exports_external.enum([
|
|
2116
|
-
"github",
|
|
2117
|
-
"url",
|
|
2118
|
-
"collection",
|
|
2119
|
-
"manual_import"
|
|
2120
|
-
]);
|
|
2121
|
-
var ExternalSkillCandidateEvaluationVerdictSchema = exports_external.enum([
|
|
2122
|
-
"pending",
|
|
2123
|
-
"in_review",
|
|
2124
|
-
"quarantined",
|
|
2125
|
-
"passed",
|
|
2126
|
-
"rejected",
|
|
2127
|
-
"promoted",
|
|
2128
|
-
"revoked"
|
|
2129
|
-
]);
|
|
2130
|
-
var DiscoverySourceSchema = exports_external.object({
|
|
2131
|
-
type: ExternalSkillCandidateSourceTypeSchema,
|
|
2132
|
-
location: exports_external.string().min(1),
|
|
2133
|
-
enabled: exports_external.boolean().default(true),
|
|
2134
|
-
trust_level: exports_external.enum(["low", "medium", "high"]).default("low").optional()
|
|
2135
|
-
});
|
|
2136
|
-
var ExternalSkillCandidateSchema = exports_external.object({
|
|
2137
|
-
id: exports_external.string().uuid(),
|
|
2138
|
-
source_url: exports_external.string().url(),
|
|
2139
|
-
source_type: ExternalSkillCandidateSourceTypeSchema,
|
|
2140
|
-
publisher: exports_external.string().min(1),
|
|
2141
|
-
sha256: exports_external.string().regex(/^[a-f0-9]{64}$/),
|
|
2142
|
-
fetched_at: exports_external.string().datetime(),
|
|
2143
|
-
skill_name: exports_external.string().optional(),
|
|
2144
|
-
skill_description: exports_external.string().optional(),
|
|
2145
|
-
skill_body: exports_external.string(),
|
|
2146
|
-
risk_flags: exports_external.array(exports_external.string()).default([]),
|
|
2147
|
-
evaluation_verdict: ExternalSkillCandidateEvaluationVerdictSchema.default("pending"),
|
|
2148
|
-
evaluation_history: exports_external.array(exports_external.object({
|
|
2149
|
-
verdict: ExternalSkillCandidateEvaluationVerdictSchema,
|
|
2150
|
-
timestamp: exports_external.string().datetime(),
|
|
2151
|
-
actor: exports_external.string(),
|
|
2152
|
-
reason: exports_external.string().optional(),
|
|
2153
|
-
candidate_id: exports_external.string().optional(),
|
|
2154
|
-
original_verdict: ExternalSkillCandidateEvaluationVerdictSchema.optional(),
|
|
2155
|
-
gate_results: exports_external.array(exports_external.object({
|
|
2156
|
-
gate: exports_external.string(),
|
|
2157
|
-
verdict: exports_external.string()
|
|
2158
|
-
})).optional(),
|
|
2159
|
-
risk_assessment: exports_external.object({
|
|
2160
|
-
total_flags: exports_external.number().int().nonnegative(),
|
|
2161
|
-
findings: exports_external.array(exports_external.object({
|
|
2162
|
-
severity: exports_external.enum(["error", "warning"]),
|
|
2163
|
-
category: exports_external.string()
|
|
2164
|
-
}))
|
|
2165
|
-
}).optional(),
|
|
2166
|
-
risk_flags_count: exports_external.number().int().nonnegative().optional(),
|
|
2167
|
-
provenance_snapshot: exports_external.object({
|
|
2168
|
-
sha256: exports_external.string(),
|
|
2169
|
-
source_url: exports_external.string(),
|
|
2170
|
-
publisher: exports_external.string(),
|
|
2171
|
-
fetched_at: exports_external.string().datetime().optional()
|
|
2172
|
-
}).optional(),
|
|
2173
|
-
target_path: exports_external.string().optional(),
|
|
2174
|
-
promoted_content_hash: exports_external.string().regex(/^[a-f0-9]{64}$/).optional(),
|
|
2175
|
-
original_evaluation: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
2176
|
-
})).default([])
|
|
2177
|
-
});
|
|
2178
|
-
var ExternalSkillsConfigSchema = exports_external.object({
|
|
2179
|
-
curation_enabled: exports_external.boolean().default(false),
|
|
2180
|
-
max_candidates: exports_external.number().int().min(1).max(1e4).default(500),
|
|
2181
|
-
max_bytes_per_candidate: exports_external.number().int().min(1024).max(10485760).default(1048576),
|
|
2182
|
-
eviction_policy: exports_external.enum(["fifo"]).default("fifo"),
|
|
2183
|
-
ttl_days: exports_external.number().int().min(1).max(3650).default(90),
|
|
2184
|
-
evaluation_enabled: exports_external.boolean().default(false),
|
|
2185
|
-
sources: exports_external.array(DiscoverySourceSchema).default([]),
|
|
2186
|
-
max_candidates_per_discovery: exports_external.number().int().min(1).max(1000).default(50),
|
|
2187
|
-
max_concurrent_fetches: exports_external.number().int().min(1).max(20).default(5),
|
|
2188
|
-
fetch_timeout_ms: exports_external.number().int().min(1000).max(300000).default(30000)
|
|
2189
|
-
});
|
|
2190
|
-
var DEFAULT_EXTERNAL_SKILLS_CONFIG = {
|
|
2191
|
-
curation_enabled: false,
|
|
2192
|
-
max_candidates: 500,
|
|
2193
|
-
max_bytes_per_candidate: 1048576,
|
|
2194
|
-
eviction_policy: "fifo",
|
|
2195
|
-
ttl_days: 90,
|
|
2196
|
-
evaluation_enabled: false,
|
|
2197
|
-
sources: [],
|
|
2198
|
-
max_candidates_per_discovery: 50,
|
|
2199
|
-
max_concurrent_fetches: 5,
|
|
2200
|
-
fetch_timeout_ms: 30000
|
|
2201
|
-
};
|
|
2202
|
-
var DEFAULT_SKILLS_CONFIG = {
|
|
2203
|
-
enabled: false
|
|
2204
|
-
};
|
|
2205
|
-
function resolveExternalSkillsConfig(input) {
|
|
2206
|
-
if (input === undefined || input === null || typeof input !== "object" || Array.isArray(input)) {
|
|
2207
|
-
return { ...DEFAULT_EXTERNAL_SKILLS_CONFIG };
|
|
2208
|
-
}
|
|
2209
|
-
const config = input;
|
|
2210
|
-
const merged = {
|
|
2211
|
-
curation_enabled: config.curation_enabled ?? DEFAULT_EXTERNAL_SKILLS_CONFIG.curation_enabled,
|
|
2212
|
-
max_candidates: config.max_candidates ?? DEFAULT_EXTERNAL_SKILLS_CONFIG.max_candidates,
|
|
2213
|
-
max_bytes_per_candidate: config.max_bytes_per_candidate ?? DEFAULT_EXTERNAL_SKILLS_CONFIG.max_bytes_per_candidate,
|
|
2214
|
-
eviction_policy: config.eviction_policy ?? DEFAULT_EXTERNAL_SKILLS_CONFIG.eviction_policy,
|
|
2215
|
-
ttl_days: config.ttl_days ?? DEFAULT_EXTERNAL_SKILLS_CONFIG.ttl_days,
|
|
2216
|
-
evaluation_enabled: config.evaluation_enabled ?? DEFAULT_EXTERNAL_SKILLS_CONFIG.evaluation_enabled,
|
|
2217
|
-
sources: Array.isArray(config.sources) ? config.sources : [],
|
|
2218
|
-
max_candidates_per_discovery: config.max_candidates_per_discovery ?? DEFAULT_EXTERNAL_SKILLS_CONFIG.max_candidates_per_discovery,
|
|
2219
|
-
max_concurrent_fetches: config.max_concurrent_fetches ?? DEFAULT_EXTERNAL_SKILLS_CONFIG.max_concurrent_fetches,
|
|
2220
|
-
fetch_timeout_ms: config.fetch_timeout_ms ?? DEFAULT_EXTERNAL_SKILLS_CONFIG.fetch_timeout_ms
|
|
2221
|
-
};
|
|
2222
|
-
return merged;
|
|
2223
|
-
}
|
|
2224
|
-
var PluginConfigSchema = exports_external.object({
|
|
2225
|
-
agents: exports_external.record(exports_external.string(), AgentOverrideConfigSchema).optional(),
|
|
2226
|
-
default_agent: exports_external.string().optional().transform((v) => {
|
|
2227
|
-
if (v === undefined)
|
|
2228
|
-
return;
|
|
2229
|
-
const trimmed = v.trim();
|
|
2230
|
-
return trimmed === "" ? undefined : trimmed;
|
|
2231
|
-
}),
|
|
2232
|
-
auto_select_architect: exports_external.union([exports_external.boolean(), exports_external.string()]).optional().transform((v) => {
|
|
2233
|
-
if (v === undefined)
|
|
2234
|
-
return;
|
|
2235
|
-
if (typeof v === "boolean")
|
|
2236
|
-
return v;
|
|
2237
|
-
const trimmed = v.trim();
|
|
2238
|
-
return trimmed === "" ? false : trimmed;
|
|
2239
|
-
}),
|
|
2240
|
-
swarms: exports_external.record(exports_external.string().regex(/^[^_]+$/, "Swarm ID must not contain underscores"), SwarmConfigSchema).optional(),
|
|
2241
|
-
max_iterations: exports_external.number().min(1).max(10).default(5),
|
|
2242
|
-
pipeline: PipelineConfigSchema.optional(),
|
|
2243
|
-
phase_complete: PhaseCompleteConfigSchema.optional(),
|
|
2244
|
-
qa_retry_limit: exports_external.number().min(1).max(10).default(3),
|
|
2245
|
-
execution_mode: exports_external.enum(["strict", "balanced", "fast"]).default("balanced"),
|
|
2246
|
-
inject_phase_reminders: exports_external.boolean().default(true),
|
|
2247
|
-
hooks: HooksConfigSchema.optional(),
|
|
2248
|
-
gates: GateConfigSchema.optional(),
|
|
2249
|
-
context_budget: ContextBudgetConfigSchema.optional(),
|
|
2250
|
-
pricing: PricingConfigSchema.optional(),
|
|
2251
|
-
guardrails: GuardrailsConfigSchema.optional(),
|
|
2252
|
-
watchdog: WatchdogConfigSchema.optional(),
|
|
2253
|
-
self_review: SelfReviewConfigSchema.optional(),
|
|
2254
|
-
auto_review: AutoReviewConfigSchema.optional(),
|
|
2255
|
-
tool_filter: ToolFilterConfigSchema.optional(),
|
|
2256
|
-
authority: AuthorityConfigSchema.optional(),
|
|
2257
|
-
plan_cursor: PlanCursorConfigSchema.optional(),
|
|
2258
|
-
context_map: ContextMapConfigSchema.optional(),
|
|
2259
|
-
repo_graph: RepoGraphConfigSchema.optional(),
|
|
2260
|
-
evidence: EvidenceConfigSchema.optional(),
|
|
2261
|
-
summaries: SummaryConfigSchema.optional(),
|
|
2262
|
-
review_passes: ReviewPassesConfigSchema.optional(),
|
|
2263
|
-
adversarial_detection: AdversarialDetectionConfigSchema.optional(),
|
|
2264
|
-
adversarial_testing: AdversarialTestingConfigSchema.optional(),
|
|
2265
|
-
integration_analysis: IntegrationAnalysisConfigSchema.optional(),
|
|
2266
|
-
docs: DocsConfigSchema.optional(),
|
|
2267
|
-
design_docs: DesignDocsConfigSchema.optional(),
|
|
2268
|
-
ui_review: UIReviewConfigSchema.optional(),
|
|
2269
|
-
compaction_advisory: CompactionAdvisoryConfigSchema.optional(),
|
|
2270
|
-
lint: LintConfigSchema.optional(),
|
|
2271
|
-
secretscan: SecretscanConfigSchema.optional(),
|
|
2272
|
-
checkpoint: CheckpointConfigSchema.optional(),
|
|
2273
|
-
apply_patch: ApplyPatchConfigSchema.optional(),
|
|
2274
|
-
automation: AutomationConfigSchema.optional(),
|
|
2275
|
-
knowledge: KnowledgeConfigSchema.optional(),
|
|
2276
|
-
memory: MemoryConfigSchema.optional(),
|
|
2277
|
-
curator: CuratorConfigSchema.optional(),
|
|
2278
|
-
architectural_supervision: ArchitecturalSupervisionConfigSchema.optional(),
|
|
2279
|
-
knowledge_application: KnowledgeApplicationConfigSchema.optional(),
|
|
2280
|
-
skillPropagation: SkillPropagationConfigSchema.optional(),
|
|
2281
|
-
skill_improver: SkillImproverConfigSchema.optional(),
|
|
2282
|
-
spec_writer: SpecWriterConfigSchema.optional(),
|
|
2283
|
-
tool_output: exports_external.object({
|
|
2284
|
-
truncation_enabled: exports_external.boolean().default(true),
|
|
2285
|
-
max_lines: exports_external.number().min(10).max(500).default(150),
|
|
2286
|
-
per_tool: exports_external.record(exports_external.string(), exports_external.number()).optional(),
|
|
2287
|
-
truncation_tools: exports_external.array(exports_external.string()).optional().describe("Tools to apply output truncation to. Defaults to diff, symbols, bash, shell, test_runner, lint, pre_check_batch, complexity_hotspots, pkg_audit, sbom_generate, schema_drift.")
|
|
2288
|
-
}).optional(),
|
|
2289
|
-
slop_detector: SlopDetectorConfigSchema.optional(),
|
|
2290
|
-
todo_gate: exports_external.object({
|
|
2291
|
-
enabled: exports_external.boolean().default(true),
|
|
2292
|
-
max_high_priority: exports_external.number().int().min(-1).default(0).describe("Max new high-priority TODOs (FIXME/HACK/XXX) before warning. 0 = warn on any. Set to -1 to disable."),
|
|
2293
|
-
block_on_threshold: exports_external.boolean().default(false).describe("If true, block phase completion when threshold exceeded. Default: advisory only.")
|
|
2294
|
-
}).optional(),
|
|
2295
|
-
incremental_verify: IncrementalVerifyConfigSchema.optional(),
|
|
2296
|
-
compaction_service: CompactionConfigSchema.optional(),
|
|
2297
|
-
prm: PrmConfigSchema.optional(),
|
|
2298
|
-
council: CouncilConfigSchema.optional(),
|
|
2299
|
-
parallelization: ParallelizationConfigSchema.optional(),
|
|
2300
|
-
worktree: WorktreeIsolationConfigSchema.optional(),
|
|
2301
|
-
turbo: TurboConfigSchema.optional(),
|
|
2302
|
-
turbo_mode: exports_external.boolean().default(false).optional(),
|
|
2303
|
-
quiet: exports_external.boolean().default(true).optional(),
|
|
2304
|
-
version_check: exports_external.boolean().default(true).optional(),
|
|
2305
|
-
full_auto: exports_external.object({
|
|
2306
|
-
enabled: exports_external.boolean().default(false),
|
|
2307
|
-
locked: exports_external.boolean().default(false),
|
|
2308
|
-
critic_model: exports_external.string().optional(),
|
|
2309
|
-
max_interactions_per_phase: exports_external.number().int().min(5).max(200).default(50),
|
|
2310
|
-
deadlock_threshold: exports_external.number().int().min(2).max(10).default(3),
|
|
2311
|
-
escalation_mode: exports_external.enum(["pause", "terminate"]).default("pause"),
|
|
2312
|
-
mode: exports_external.enum(["assisted", "supervised", "strict"]).default("supervised"),
|
|
2313
|
-
fail_closed: exports_external.boolean().default(true),
|
|
2314
|
-
permission_policy: exports_external.object({
|
|
2315
|
-
enabled: exports_external.boolean().default(true),
|
|
2316
|
-
trusted_roots: exports_external.array(exports_external.string()).default(["."]),
|
|
2317
|
-
trusted_domains: exports_external.array(exports_external.string()).default([]),
|
|
2318
|
-
protected_paths: exports_external.array(exports_external.string()).default([
|
|
2319
|
-
".git",
|
|
2320
|
-
".github/workflows",
|
|
2321
|
-
".opencode",
|
|
2322
|
-
".swarm",
|
|
2323
|
-
"package.json",
|
|
2324
|
-
"package-lock.json",
|
|
2325
|
-
"bun.lock",
|
|
2326
|
-
"CHANGELOG.md",
|
|
2327
|
-
".release-please-manifest.json",
|
|
2328
|
-
"release-please-config.json",
|
|
2329
|
-
"src/index.ts",
|
|
2330
|
-
"src/hooks/guardrails.ts",
|
|
2331
|
-
"src/hooks/delegation-gate.ts",
|
|
2332
|
-
"src/hooks/scope-guard.ts",
|
|
2333
|
-
"src/hooks/full-auto-permission.ts",
|
|
2334
|
-
"src/hooks/full-auto-intercept.ts",
|
|
2335
|
-
"src/full-auto",
|
|
2336
|
-
"src/config/schema.ts",
|
|
2337
|
-
"src/config/constants.ts",
|
|
2338
|
-
"src/tools/phase-complete.ts",
|
|
2339
|
-
"dist"
|
|
2340
|
-
]),
|
|
2341
|
-
allow_defaults: exports_external.boolean().default(true)
|
|
2342
|
-
}).default(() => ({
|
|
2343
|
-
enabled: true,
|
|
2344
|
-
trusted_roots: ["."],
|
|
2345
|
-
trusted_domains: [],
|
|
2346
|
-
protected_paths: [
|
|
2347
|
-
".git",
|
|
2348
|
-
".github/workflows",
|
|
2349
|
-
".opencode",
|
|
2350
|
-
".swarm",
|
|
2351
|
-
"package.json",
|
|
2352
|
-
"package-lock.json",
|
|
2353
|
-
"bun.lock",
|
|
2354
|
-
"CHANGELOG.md",
|
|
2355
|
-
".release-please-manifest.json",
|
|
2356
|
-
"release-please-config.json",
|
|
2357
|
-
"src/index.ts",
|
|
2358
|
-
"src/hooks/guardrails.ts",
|
|
2359
|
-
"src/hooks/delegation-gate.ts",
|
|
2360
|
-
"src/hooks/scope-guard.ts",
|
|
2361
|
-
"src/hooks/full-auto-permission.ts",
|
|
2362
|
-
"src/hooks/full-auto-intercept.ts",
|
|
2363
|
-
"src/full-auto",
|
|
2364
|
-
"src/config/schema.ts",
|
|
2365
|
-
"src/config/constants.ts",
|
|
2366
|
-
"src/tools/phase-complete.ts",
|
|
2367
|
-
"dist"
|
|
2368
|
-
],
|
|
2369
|
-
allow_defaults: true
|
|
2370
|
-
})),
|
|
2371
|
-
denials: exports_external.object({
|
|
2372
|
-
max_consecutive: exports_external.number().int().min(1).max(50).default(3),
|
|
2373
|
-
max_total: exports_external.number().int().min(1).max(500).default(20),
|
|
2374
|
-
on_limit: exports_external.enum(["pause", "terminate"]).default("pause")
|
|
2375
|
-
}).default(() => ({
|
|
2376
|
-
max_consecutive: 3,
|
|
2377
|
-
max_total: 20,
|
|
2378
|
-
on_limit: "pause"
|
|
2379
|
-
})),
|
|
2380
|
-
oversight: exports_external.object({
|
|
2381
|
-
on_plan_change: exports_external.boolean().default(true),
|
|
2382
|
-
on_task_completion: exports_external.boolean().default(false),
|
|
2383
|
-
on_phase_boundary: exports_external.boolean().default(true),
|
|
2384
|
-
on_high_risk_action: exports_external.boolean().default(true),
|
|
2385
|
-
on_subagent_return_warning: exports_external.boolean().default(true),
|
|
2386
|
-
every_tool_calls: exports_external.number().int().min(0).max(1e4).default(25),
|
|
2387
|
-
every_architect_turns: exports_external.number().int().min(0).max(1000).default(5),
|
|
2388
|
-
every_minutes: exports_external.number().int().min(0).max(1440).default(20),
|
|
2389
|
-
max_dispatch_retries: exports_external.number().int().min(0).max(10).default(2),
|
|
2390
|
-
max_consecutive_dispatch_failures: exports_external.number().int().min(0).max(50).default(3)
|
|
2391
|
-
}).default(() => ({
|
|
2392
|
-
on_plan_change: true,
|
|
2393
|
-
on_task_completion: false,
|
|
2394
|
-
on_phase_boundary: true,
|
|
2395
|
-
on_high_risk_action: true,
|
|
2396
|
-
on_subagent_return_warning: true,
|
|
2397
|
-
every_tool_calls: 25,
|
|
2398
|
-
every_architect_turns: 5,
|
|
2399
|
-
every_minutes: 20,
|
|
2400
|
-
max_dispatch_retries: 2,
|
|
2401
|
-
max_consecutive_dispatch_failures: 3
|
|
2402
|
-
}))
|
|
2403
|
-
}).optional().default(() => ({
|
|
2404
|
-
enabled: false,
|
|
2405
|
-
locked: false,
|
|
2406
|
-
max_interactions_per_phase: 50,
|
|
2407
|
-
deadlock_threshold: 3,
|
|
2408
|
-
escalation_mode: "pause",
|
|
2409
|
-
mode: "supervised",
|
|
2410
|
-
fail_closed: true,
|
|
2411
|
-
permission_policy: {
|
|
2412
|
-
enabled: true,
|
|
2413
|
-
trusted_roots: ["."],
|
|
2414
|
-
trusted_domains: [],
|
|
2415
|
-
protected_paths: [
|
|
2416
|
-
".git",
|
|
2417
|
-
".github/workflows",
|
|
2418
|
-
".opencode",
|
|
2419
|
-
".swarm",
|
|
2420
|
-
"package.json",
|
|
2421
|
-
"package-lock.json",
|
|
2422
|
-
"bun.lock",
|
|
2423
|
-
"CHANGELOG.md",
|
|
2424
|
-
".release-please-manifest.json",
|
|
2425
|
-
"release-please-config.json",
|
|
2426
|
-
"src/index.ts",
|
|
2427
|
-
"src/hooks/guardrails.ts",
|
|
2428
|
-
"src/hooks/delegation-gate.ts",
|
|
2429
|
-
"src/hooks/scope-guard.ts",
|
|
2430
|
-
"src/hooks/full-auto-permission.ts",
|
|
2431
|
-
"src/hooks/full-auto-intercept.ts",
|
|
2432
|
-
"src/full-auto",
|
|
2433
|
-
"src/config/schema.ts",
|
|
2434
|
-
"src/config/constants.ts",
|
|
2435
|
-
"src/tools/phase-complete.ts",
|
|
2436
|
-
"dist"
|
|
2437
|
-
],
|
|
2438
|
-
allow_defaults: true
|
|
2439
|
-
},
|
|
2440
|
-
denials: {
|
|
2441
|
-
max_consecutive: 3,
|
|
2442
|
-
max_total: 20,
|
|
2443
|
-
on_limit: "pause"
|
|
2444
|
-
},
|
|
2445
|
-
oversight: {
|
|
2446
|
-
on_plan_change: true,
|
|
2447
|
-
on_task_completion: false,
|
|
2448
|
-
on_phase_boundary: true,
|
|
2449
|
-
on_high_risk_action: true,
|
|
2450
|
-
on_subagent_return_warning: true,
|
|
2451
|
-
every_tool_calls: 25,
|
|
2452
|
-
every_architect_turns: 5,
|
|
2453
|
-
every_minutes: 20,
|
|
2454
|
-
max_dispatch_retries: 2,
|
|
2455
|
-
max_consecutive_dispatch_failures: 3
|
|
2456
|
-
}
|
|
2457
|
-
})),
|
|
2458
|
-
pr_monitor: PrMonitorConfigSchema.optional(),
|
|
2459
|
-
external_skills: ExternalSkillsConfigSchema.optional(),
|
|
2460
|
-
skills: SkillsConfigSchema.optional()
|
|
2461
|
-
});
|
|
2462
|
-
|
|
2463
|
-
export { QA_AGENTS, PIPELINE_AGENTS, ORCHESTRATOR_NAME, ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, TOOL_NAMES, TOOL_NAME_SET, AGENT_TOOL_MAP, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, isQAAgent, isSubagent, DEFAULT_WORKTREE_ISOLATION_CONFIG, _internals, isKnownCanonicalRole, getCanonicalAgentRole, resolveGeneratedAgentRole, stripKnownSwarmPrefix, AgentReasoningConfigSchema, AgentThinkingConfigSchema, AgentOverrideConfigSchema, SwarmConfigSchema, ModelPricingConfigSchema, PricingConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GATE_CONFIG_KNOWN_SECTION_KEYS, GateConfigSchema, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, ReviewPassesConfigSchema, AutoReviewConfigSchema, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, resolveGuardrailsConfig, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, CheckpointConfigSchema, ApplyPatchConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, KnowledgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, SkillImproverConfigSchema, SkillsConfigSchema, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, EpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, resolveExternalSkillsConfig, PluginConfigSchema };
|