opencode-swarm 7.126.0 → 7.126.2
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/swarm-pr-feedback/SKILL.md +24 -16
- package/.opencode/skills/swarm-pr-review/SKILL.md +18 -14
- package/dist/cli/{config-doctor-akxywx0c.js → config-doctor-mfx27331.js} +2 -2
- package/dist/cli/{core-v1kp7anb.js → core-wg3re04e.js} +1 -1
- package/dist/cli/{curation-policy-dptr1rfe.js → curation-policy-n944aq62.js} +2 -2
- package/dist/cli/{curator-llm-factory-r648jn8e.js → curator-llm-factory-0rf29gfq.js} +14 -14
- package/dist/cli/{curator-23hynz78.js → curator-qfh9xty4.js} +14 -14
- package/dist/cli/{guardrail-explain-6atsd4vr.js → guardrail-explain-jsrjqps1.js} +15 -15
- package/dist/cli/{guardrail-log-222xyxfp.js → guardrail-log-61gya05m.js} +3 -3
- package/dist/cli/{hive-promoter-bnkhzd46.js → hive-promoter-ktt17fyf.js} +14 -14
- package/dist/cli/{index-jt7hnr7q.js → index-3xd9a2g7.js} +1 -1
- package/dist/cli/{index-gnvg72y1.js → index-4ff0x4cg.js} +79 -1
- package/dist/cli/{index-68fpa7ff.js → index-5nq8dp63.js} +16 -16
- package/dist/cli/{index-yfzn5r9s.js → index-7bxw3v5w.js} +3 -3
- package/dist/cli/{index-kwnsatzq.js → index-88dt7c9z.js} +2 -2
- package/dist/cli/{index-qzkcy22e.js → index-bf76q8q7.js} +1 -1
- package/dist/cli/{index-16z6txq3.js → index-c48dvb6j.js} +2 -2
- package/dist/cli/{index-0ff5cm9j.js → index-d88y17ht.js} +2222 -2197
- package/dist/cli/{index-bcgfhxzv.js → index-f97dm6tz.js} +5 -5
- package/dist/cli/{index-a1c9az5e.js → index-gf9cxvp0.js} +109 -151
- package/dist/cli/{index-mgrsx5hn.js → index-gwss5btk.js} +1 -1
- package/dist/cli/{index-dezgmvtw.js → index-gxw20m1d.js} +1 -1
- package/dist/cli/{index-2bnfwmk3.js → index-nqp13m5a.js} +1 -1
- package/dist/cli/{index-2yd75hms.js → index-pb8ag9vg.js} +4 -4
- package/dist/cli/{index-cdx337js.js → index-pf3xae4s.js} +1 -1
- package/dist/cli/{index-r1gdkn2d.js → index-vcqwhe9d.js} +117 -21
- package/dist/cli/{index-g4ef4v3m.js → index-w9cb5zwh.js} +1 -1
- package/dist/cli/{index-y4ry07h8.js → index-z8ftpav0.js} +2 -2
- package/dist/cli/index.js +14 -14
- package/dist/cli/{knowledge-escalator-4hc8w7sd.js → knowledge-escalator-nna0zec3.js} +3 -3
- package/dist/cli/{knowledge-events-kyqjv1f8.js → knowledge-events-7k82xk36.js} +1 -1
- package/dist/cli/{knowledge-store-06k0p1gs.js → knowledge-store-efvtng9t.js} +1 -1
- package/dist/cli/{knowledge-validator-42xjmcmh.js → knowledge-validator-jh93eagj.js} +4 -4
- package/dist/cli/{scan-cursor-gjcvpyta.js → scan-cursor-cydz8d9q.js} +2 -2
- package/dist/cli/{schema-69z8w1ka.js → schema-fa033pqw.js} +1 -1
- package/dist/cli/{scope-persistence-habn4q8a.js → scope-persistence-dm5bab50.js} +3 -1
- package/dist/cli/{skill-generator-t6j93mwt.js → skill-generator-8v463kj7.js} +5 -5
- package/dist/config/index.d.ts +1 -0
- package/dist/config/loader.d.ts +51 -36
- package/dist/hooks/delegation-gate.d.ts +14 -2
- package/dist/hooks/pr-workflow-gate.d.ts +57 -0
- package/dist/hooks/scope-guard.d.ts +6 -1
- package/dist/index.js +55 -49
- package/dist/scope/scope-binding.d.ts +21 -2
- package/dist/scope/scope-persistence.d.ts +6 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/manifest.d.ts +3 -0
- package/dist/tools/prepare-pr-feedback-scope.d.ts +5 -0
- package/dist/tools/prepare-pr-workflow-checkout.d.ts +25 -0
- package/dist/tools/tool-metadata.d.ts +102 -0
- package/dist/tools/write-pr-review-artifact.d.ts +5 -0
- package/package.json +3 -3
|
@@ -60,19 +60,35 @@ var init_tool_metadata = __esm(() => {
|
|
|
60
60
|
"critic_oversight",
|
|
61
61
|
"coder",
|
|
62
62
|
"test_engineer"
|
|
63
|
-
]
|
|
63
|
+
],
|
|
64
|
+
prWorkflow: {
|
|
65
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
66
|
+
capability: "observe"
|
|
67
|
+
}
|
|
64
68
|
},
|
|
65
69
|
diff_summary: {
|
|
66
70
|
description: "filter classified AST changes by category, risk level, or file for reviewer drill-down",
|
|
67
|
-
agents: ["architect", "reviewer", "critic_oversight"]
|
|
71
|
+
agents: ["architect", "reviewer", "critic_oversight"],
|
|
72
|
+
prWorkflow: {
|
|
73
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
74
|
+
capability: "observe"
|
|
75
|
+
}
|
|
68
76
|
},
|
|
69
77
|
syntax_check: {
|
|
70
78
|
description: "check syntax of source files using tree-sitter parsers across multiple languages, returning per-file errors",
|
|
71
|
-
agents: ["architect", "coder", "test_engineer"]
|
|
79
|
+
agents: ["architect", "coder", "test_engineer"],
|
|
80
|
+
prWorkflow: {
|
|
81
|
+
modes: ["PR_REVIEW"],
|
|
82
|
+
capability: "validate"
|
|
83
|
+
}
|
|
72
84
|
},
|
|
73
85
|
placeholder_scan: {
|
|
74
86
|
description: "todo and FIXME comment detection",
|
|
75
|
-
agents: ["architect", "reviewer"]
|
|
87
|
+
agents: ["architect", "reviewer"],
|
|
88
|
+
prWorkflow: {
|
|
89
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
90
|
+
capability: "observe"
|
|
91
|
+
}
|
|
76
92
|
},
|
|
77
93
|
imports: {
|
|
78
94
|
description: "find all consumers that import from a given file \u2014 use before refactoring shared modules to avoid breaking unseen dependents",
|
|
@@ -89,19 +105,35 @@ var init_tool_metadata = __esm(() => {
|
|
|
89
105
|
"critic",
|
|
90
106
|
"coder",
|
|
91
107
|
"test_engineer"
|
|
92
|
-
]
|
|
108
|
+
],
|
|
109
|
+
prWorkflow: {
|
|
110
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
111
|
+
capability: "observe"
|
|
112
|
+
}
|
|
93
113
|
},
|
|
94
114
|
lint: {
|
|
95
115
|
description: "run project linter in check or fix mode; supports biome, eslint, ruff, clippy, and more, returns structured results",
|
|
96
|
-
agents: ["architect", "reviewer", "coder"]
|
|
116
|
+
agents: ["architect", "reviewer", "coder"],
|
|
117
|
+
prWorkflow: {
|
|
118
|
+
modes: ["PR_REVIEW"],
|
|
119
|
+
capability: "validate"
|
|
120
|
+
}
|
|
97
121
|
},
|
|
98
122
|
secretscan: {
|
|
99
123
|
description: "scan for secrets (API keys, tokens, passwords) via regex and entropy; returns redacted previews, excludes common dirs",
|
|
100
|
-
agents: ["architect", "reviewer", "critic_oversight"]
|
|
124
|
+
agents: ["architect", "reviewer", "critic_oversight"],
|
|
125
|
+
prWorkflow: {
|
|
126
|
+
modes: ["PR_REVIEW"],
|
|
127
|
+
capability: "validate"
|
|
128
|
+
}
|
|
101
129
|
},
|
|
102
130
|
sast_scan: {
|
|
103
131
|
description: "static analysis security scan",
|
|
104
|
-
agents: ["architect", "reviewer", "critic_oversight"]
|
|
132
|
+
agents: ["architect", "reviewer", "critic_oversight"],
|
|
133
|
+
prWorkflow: {
|
|
134
|
+
modes: ["PR_REVIEW"],
|
|
135
|
+
capability: "validate"
|
|
136
|
+
}
|
|
105
137
|
},
|
|
106
138
|
build_check: {
|
|
107
139
|
description: "discover and run build, typecheck, and test commands for various project ecosystems in the working directory",
|
|
@@ -113,7 +145,11 @@ var init_tool_metadata = __esm(() => {
|
|
|
113
145
|
},
|
|
114
146
|
quality_budget: {
|
|
115
147
|
description: "code quality budget check",
|
|
116
|
-
agents: ["architect"]
|
|
148
|
+
agents: ["architect"],
|
|
149
|
+
prWorkflow: {
|
|
150
|
+
modes: ["PR_REVIEW"],
|
|
151
|
+
capability: "validate"
|
|
152
|
+
}
|
|
117
153
|
},
|
|
118
154
|
symbols: {
|
|
119
155
|
description: "extract exported symbols (functions, classes, interfaces, types) from source files; supports TypeScript, JavaScript, and Python",
|
|
@@ -152,11 +188,19 @@ var init_tool_metadata = __esm(() => {
|
|
|
152
188
|
},
|
|
153
189
|
schema_drift: {
|
|
154
190
|
description: "OpenAPI spec vs route drift",
|
|
155
|
-
agents: ["architect", "sme", "researcher", "docs", "explorer"]
|
|
191
|
+
agents: ["architect", "sme", "researcher", "docs", "explorer"],
|
|
192
|
+
prWorkflow: {
|
|
193
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
194
|
+
capability: "observe"
|
|
195
|
+
}
|
|
156
196
|
},
|
|
157
197
|
todo_extract: {
|
|
158
198
|
description: "structured TODO/FIXME extraction",
|
|
159
|
-
agents: ["architect", "researcher", "docs", "explorer"]
|
|
199
|
+
agents: ["architect", "researcher", "docs", "explorer"],
|
|
200
|
+
prWorkflow: {
|
|
201
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
202
|
+
capability: "observe"
|
|
203
|
+
}
|
|
160
204
|
},
|
|
161
205
|
evidence_check: {
|
|
162
206
|
description: "verify task evidence completeness",
|
|
@@ -178,6 +222,10 @@ var init_tool_metadata = __esm(() => {
|
|
|
178
222
|
description: "abort an unrecoverable PR_REVIEW/PR_FEEDBACK mechanical gate and clear its durable session state",
|
|
179
223
|
agents: ["architect"]
|
|
180
224
|
},
|
|
225
|
+
prepare_pr_workflow_checkout: {
|
|
226
|
+
description: "preserve explicit dirty tracked files before an unbound PR workflow checkout with an auditable recovery receipt",
|
|
227
|
+
agents: ["architect"]
|
|
228
|
+
},
|
|
181
229
|
run_pr_feedback_stage_a: {
|
|
182
230
|
description: "execute and persist mandatory PR-feedback Stage A checks on a content-bound revision",
|
|
183
231
|
agents: ["architect"]
|
|
@@ -210,7 +258,11 @@ var init_tool_metadata = __esm(() => {
|
|
|
210
258
|
"reviewer",
|
|
211
259
|
"critic_oversight",
|
|
212
260
|
"test_engineer"
|
|
213
|
-
]
|
|
261
|
+
],
|
|
262
|
+
prWorkflow: {
|
|
263
|
+
modes: ["PR_REVIEW"],
|
|
264
|
+
capability: "validate"
|
|
265
|
+
}
|
|
214
266
|
},
|
|
215
267
|
parse_lane_candidates: {
|
|
216
268
|
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.",
|
|
@@ -220,13 +272,29 @@ var init_tool_metadata = __esm(() => {
|
|
|
220
272
|
description: "persist the complete PR-review trigger evaluation with exact-set validation, dispatch provenance, and live merge-base verification",
|
|
221
273
|
agents: ["architect"]
|
|
222
274
|
},
|
|
275
|
+
write_pr_review_artifact: {
|
|
276
|
+
description: "persist schema-validated PR-review findings checkpoints and exact actionable feedback handoffs under the active run",
|
|
277
|
+
agents: ["architect"]
|
|
278
|
+
},
|
|
279
|
+
prepare_pr_feedback_scope: {
|
|
280
|
+
description: "prepare an exact file scope for one PR-feedback coder Task after immutable feedback verification settles",
|
|
281
|
+
agents: ["architect"]
|
|
282
|
+
},
|
|
223
283
|
test_runner: {
|
|
224
284
|
description: "auto-detect and run tests",
|
|
225
|
-
agents: ["architect", "reviewer", "test_engineer"]
|
|
285
|
+
agents: ["architect", "reviewer", "test_engineer"],
|
|
286
|
+
prWorkflow: {
|
|
287
|
+
modes: ["PR_REVIEW"],
|
|
288
|
+
capability: "validate"
|
|
289
|
+
}
|
|
226
290
|
},
|
|
227
291
|
test_impact: {
|
|
228
292
|
description: "identify test files impacted by changed source files via import analysis",
|
|
229
|
-
agents: ["architect", "reviewer", "critic_oversight", "test_engineer"]
|
|
293
|
+
agents: ["architect", "reviewer", "critic_oversight", "test_engineer"],
|
|
294
|
+
prWorkflow: {
|
|
295
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
296
|
+
capability: "observe"
|
|
297
|
+
}
|
|
230
298
|
},
|
|
231
299
|
mutation_test: {
|
|
232
300
|
description: "executes pre-generated mutation patches against tests, evaluates kill rate against quality gate thresholds",
|
|
@@ -253,11 +321,19 @@ var init_tool_metadata = __esm(() => {
|
|
|
253
321
|
},
|
|
254
322
|
git_blame: {
|
|
255
323
|
description: "per-line git blame metadata: sha, author, date, summary for each line in a file",
|
|
256
|
-
agents: ["reviewer", "explorer", "architect"]
|
|
324
|
+
agents: ["reviewer", "explorer", "architect"],
|
|
325
|
+
prWorkflow: {
|
|
326
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
327
|
+
capability: "observe"
|
|
328
|
+
}
|
|
257
329
|
},
|
|
258
330
|
gitingest: {
|
|
259
331
|
description: "fetch a GitHub repository full content via gitingest.com",
|
|
260
|
-
agents: ["architect", "docs", "explorer"]
|
|
332
|
+
agents: ["architect", "docs", "explorer"],
|
|
333
|
+
prWorkflow: {
|
|
334
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
335
|
+
capability: "observe"
|
|
336
|
+
}
|
|
261
337
|
},
|
|
262
338
|
retrieve_summary: {
|
|
263
339
|
description: "retrieve the full content of a stored tool output summary",
|
|
@@ -280,7 +356,11 @@ var init_tool_metadata = __esm(() => {
|
|
|
280
356
|
},
|
|
281
357
|
retrieve_lane_output: {
|
|
282
358
|
description: "retrieve paged full dispatch lane output by output_ref; use before consuming truncated lane previews or routing candidates from lane results",
|
|
283
|
-
agents: ["architect"]
|
|
359
|
+
agents: ["architect"],
|
|
360
|
+
prWorkflow: {
|
|
361
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
362
|
+
capability: "observe"
|
|
363
|
+
}
|
|
284
364
|
},
|
|
285
365
|
extract_code_blocks: {
|
|
286
366
|
description: "extract code blocks from text content and save them to files",
|
|
@@ -427,15 +507,27 @@ var init_tool_metadata = __esm(() => {
|
|
|
427
507
|
},
|
|
428
508
|
actionlint_scan: {
|
|
429
509
|
description: "Run actionlint against GitHub Actions workflow YAML files with structured findings. Resolves actionlint lazily and does not modify files.",
|
|
430
|
-
agents: ["architect", "test_engineer"]
|
|
510
|
+
agents: ["architect", "test_engineer"],
|
|
511
|
+
prWorkflow: {
|
|
512
|
+
modes: ["PR_REVIEW"],
|
|
513
|
+
capability: "validate"
|
|
514
|
+
}
|
|
431
515
|
},
|
|
432
516
|
osv_scan: {
|
|
433
517
|
description: "Run OSV-Scanner against a workspace path and return structured dependency vulnerability findings. Resolves osv-scanner lazily and does not modify files.",
|
|
434
|
-
agents: ["architect", "test_engineer"]
|
|
518
|
+
agents: ["architect", "test_engineer"],
|
|
519
|
+
prWorkflow: {
|
|
520
|
+
modes: ["PR_REVIEW"],
|
|
521
|
+
capability: "validate"
|
|
522
|
+
}
|
|
435
523
|
},
|
|
436
524
|
gh_evidence: {
|
|
437
525
|
description: "Fetch bounded GitHub pull request or issue metadata through gh for review and CI evidence. Resolves gh lazily and is read-only.",
|
|
438
|
-
agents: ["architect", "researcher"]
|
|
526
|
+
agents: ["architect", "researcher"],
|
|
527
|
+
prWorkflow: {
|
|
528
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
529
|
+
capability: "observe"
|
|
530
|
+
}
|
|
439
531
|
},
|
|
440
532
|
batch_symbols: {
|
|
441
533
|
description: "Batched symbol extraction across multiple files. Returns per-file symbol summaries with isolated error handling.",
|
|
@@ -479,7 +571,11 @@ var init_tool_metadata = __esm(() => {
|
|
|
479
571
|
"critic_oversight",
|
|
480
572
|
"explorer",
|
|
481
573
|
"coder"
|
|
482
|
-
]
|
|
574
|
+
],
|
|
575
|
+
prWorkflow: {
|
|
576
|
+
modes: ["PR_REVIEW", "PR_FEEDBACK"],
|
|
577
|
+
capability: "observe"
|
|
578
|
+
}
|
|
483
579
|
},
|
|
484
580
|
get_qa_gate_profile: {
|
|
485
581
|
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.",
|
|
@@ -39,7 +39,7 @@ var _internals = {
|
|
|
39
39
|
symlinkSync: fs.symlinkSync
|
|
40
40
|
},
|
|
41
41
|
writeScopeToDisk: async (directory, taskId, files) => {
|
|
42
|
-
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-
|
|
42
|
+
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-dm5bab50.js");
|
|
43
43
|
return realWrite(directory, taskId, files);
|
|
44
44
|
},
|
|
45
45
|
writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
detectPosixWrites,
|
|
13
13
|
detectWindowsWrites,
|
|
14
14
|
resolveWriteTargets
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-d88y17ht.js";
|
|
16
16
|
import {
|
|
17
17
|
checkFileAuthority,
|
|
18
18
|
classifyFile,
|
|
19
19
|
isInDeclaredScope,
|
|
20
20
|
redactPath,
|
|
21
21
|
redactShellCommand
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-gxw20m1d.js";
|
|
23
23
|
|
|
24
24
|
// src/services/guardrail-explain-service.ts
|
|
25
25
|
import path from "path";
|
package/dist/cli/index.js
CHANGED
|
@@ -7,41 +7,41 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
} from "./index-d88y17ht.js";
|
|
11
|
+
import"./index-gxw20m1d.js";
|
|
12
|
+
import"./index-3xd9a2g7.js";
|
|
13
13
|
import"./index-kk1scggc.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
16
|
import"./index-6n2jpz7x.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-7bxw3v5w.js";
|
|
18
|
+
import"./index-f97dm6tz.js";
|
|
19
|
+
import"./index-pf3xae4s.js";
|
|
20
20
|
import"./index-vxv732ex.js";
|
|
21
21
|
import"./index-c8s9a3zh.js";
|
|
22
22
|
import"./index-9ss2m4rs.js";
|
|
23
23
|
import"./index-23zsx7dm.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-88dt7c9z.js";
|
|
25
|
+
import"./index-gwss5btk.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-pb8ag9vg.js";
|
|
28
|
+
import"./index-nqp13m5a.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-q27bajqb.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-gf9cxvp0.js";
|
|
32
32
|
import"./index-k5jrywpr.js";
|
|
33
33
|
import"./index-n832052r.js";
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_AGENT_CONFIGS,
|
|
36
36
|
init_constants
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-vcqwhe9d.js";
|
|
38
38
|
import"./index-bk5tah7q.js";
|
|
39
39
|
import"./index-8fwhhayc.js";
|
|
40
40
|
import"./index-q1exe2b3.js";
|
|
41
|
-
import"./index-
|
|
41
|
+
import"./index-4ff0x4cg.js";
|
|
42
42
|
import"./index-2tn5h2zp.js";
|
|
43
43
|
import"./index-1kz6da87.js";
|
|
44
|
-
import"./index-
|
|
44
|
+
import"./index-w9cb5zwh.js";
|
|
45
45
|
import"./index-4rhhvd1a.js";
|
|
46
46
|
import"./index-0cz1ws47.js";
|
|
47
47
|
import"./index-2445sx3d.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-f97dm6tz.js";
|
|
12
|
+
import"./index-pb8ag9vg.js";
|
|
13
|
+
import"./index-nqp13m5a.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
15
|
import"./index-q27bajqb.js";
|
|
16
16
|
import"./index-bk5tah7q.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resolveKnowledgeCounterBaselinePath,
|
|
27
27
|
resolveKnowledgeEventsPath,
|
|
28
28
|
resolveLegacyApplicationLogPath
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-nqp13m5a.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
31
|
import"./index-q27bajqb.js";
|
|
32
32
|
import"./index-zgwm4ryv.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-88dt7c9z.js";
|
|
27
|
+
import"./index-gwss5btk.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-pb8ag9vg.js";
|
|
30
|
+
import"./index-nqp13m5a.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-q27bajqb.js";
|
|
33
33
|
import"./index-bk5tah7q.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-pf3xae4s.js";
|
|
8
|
+
import"./index-pb8ag9vg.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-q27bajqb.js";
|
|
11
11
|
import"./index-bk5tah7q.js";
|
|
@@ -6,12 +6,13 @@ import {
|
|
|
6
6
|
readPlanScope,
|
|
7
7
|
readScopeBindingFromDisk,
|
|
8
8
|
readScopeFromDisk,
|
|
9
|
+
resolveAuthorizedPrFeedbackScopeBindingFromDisk,
|
|
9
10
|
resolveAuthorizedScopeBinding,
|
|
10
11
|
resolveAuthorizedScopeBindingForSession,
|
|
11
12
|
resolveScopeWithFallbacks,
|
|
12
13
|
writeScopeBindingToDisk,
|
|
13
14
|
writeScopeToDisk
|
|
14
|
-
} from "./index-
|
|
15
|
+
} from "./index-4ff0x4cg.js";
|
|
15
16
|
import"./index-2tn5h2zp.js";
|
|
16
17
|
import"./index-1kz6da87.js";
|
|
17
18
|
import"./index-zgwm4ryv.js";
|
|
@@ -27,6 +28,7 @@ export {
|
|
|
27
28
|
resolveScopeWithFallbacks,
|
|
28
29
|
resolveAuthorizedScopeBindingForSession,
|
|
29
30
|
resolveAuthorizedScopeBinding,
|
|
31
|
+
resolveAuthorizedPrFeedbackScopeBindingFromDisk,
|
|
30
32
|
readScopeFromDisk,
|
|
31
33
|
readScopeBindingFromDisk,
|
|
32
34
|
readPlanScope,
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-7bxw3v5w.js";
|
|
37
|
+
import"./index-88dt7c9z.js";
|
|
38
|
+
import"./index-gwss5btk.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-pb8ag9vg.js";
|
|
41
|
+
import"./index-nqp13m5a.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-q27bajqb.js";
|
|
44
44
|
import"./index-bk5tah7q.js";
|
package/dist/config/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export type { AgentName, PipelineAgentName, QAAgentName, } from './constants';
|
|
|
2
2
|
export { ALL_AGENT_NAMES, ALL_SUBAGENT_NAMES, DEFAULT_MODELS, isQAAgent, isSubagent, ORCHESTRATOR_NAME, PIPELINE_AGENTS, QA_AGENTS, } from './constants';
|
|
3
3
|
export type { ApprovalEvidence, BaseEvidence, DiffEvidence, Evidence, EvidenceBundle, EvidenceType, EvidenceVerdict, NoteEvidence, ReviewEvidence, TestEvidence, } from './evidence-schema';
|
|
4
4
|
export { ApprovalEvidenceSchema, BaseEvidenceSchema, DiffEvidenceSchema, EVIDENCE_MAX_JSON_BYTES, EVIDENCE_MAX_PATCH_BYTES, EVIDENCE_MAX_TASK_BYTES, EvidenceBundleSchema, EvidenceSchema, EvidenceTypeSchema, EvidenceVerdictSchema, NoteEvidenceSchema, ReviewEvidenceSchema, TestEvidenceSchema, } from './evidence-schema';
|
|
5
|
+
export type { ConfigBuildResult, ConfigLoadResult, ConfigRecovery, } from './loader';
|
|
5
6
|
export { loadAgentPrompt, loadPluginConfig, loadPluginConfigWithMeta, loadPluginConfigWithMetaAsync, } from './loader';
|
|
6
7
|
import { loadPluginConfigWithMeta } from './loader';
|
|
7
8
|
/**
|
package/dist/config/loader.d.ts
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
2
|
import { type PluginConfig } from './schema';
|
|
3
3
|
export declare const MAX_CONFIG_FILE_BYTES = 102400;
|
|
4
|
-
/**
|
|
5
|
-
* Recovery type indicating how the config was recovered from parse failure.
|
|
6
|
-
* - 'none': config parsed cleanly on first attempt
|
|
7
|
-
* - 'stripped_keys': Zod-confirmed unrecognized keys were surgically removed and parse succeeded
|
|
8
|
-
* - 'user_only': project config was ignored (validation error); user config used alone
|
|
9
|
-
* - 'guardrails_defaults': no recovery succeeded; fail-secure guardrails defaults applied
|
|
10
|
-
*/
|
|
11
|
-
export type RecoveryType = 'none' | 'stripped_keys' | 'user_only' | 'guardrails_defaults';
|
|
12
|
-
/**
|
|
13
|
-
* Structured recovery metadata returned by parseConfigWithFallback.
|
|
14
|
-
* Exposed via loadPluginConfigWithMeta[Async] so programmatic callers can
|
|
15
|
-
* introspect what recovery was performed.
|
|
16
|
-
*/
|
|
17
|
-
export interface RecoveryInfo {
|
|
18
|
-
recovery: RecoveryType;
|
|
19
|
-
/** Dotted key paths that were removed during recovery (empty if none were stripped). */
|
|
20
|
-
removedKeys: string[];
|
|
21
|
-
/** Human-readable advisory messages describing what recovery was performed. */
|
|
22
|
-
warnings: string[];
|
|
23
|
-
}
|
|
24
4
|
export { deepMerge, MAX_MERGE_DEPTH } from '../utils/merge';
|
|
25
5
|
/**
|
|
26
6
|
* Flatten a ZodError into a compact, single-line, human-readable summary that
|
|
@@ -35,36 +15,71 @@ export { deepMerge, MAX_MERGE_DEPTH } from '../utils/merge';
|
|
|
35
15
|
* raw dump of the user's config values.
|
|
36
16
|
*/
|
|
37
17
|
export declare function formatZodIssues(error: z.ZodError): string;
|
|
38
|
-
export declare function loadPluginConfig(directory: string): PluginConfig;
|
|
39
18
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
19
|
+
* Recovery classification returned by `buildConfigWithMeta`.
|
|
20
|
+
*
|
|
21
|
+
* 'none' – config parsed cleanly, no keys removed.
|
|
22
|
+
* 'stripped_keys' – pre-Zod section sanitization (gates, external_skills)
|
|
23
|
+
* and/or Zod-targeted key removal dropped some keys;
|
|
24
|
+
* the remaining configuration was preserved.
|
|
25
|
+
* 'user_only' – project config was discarded (failed validation and
|
|
26
|
+
* targeted recovery); user config alone was used.
|
|
27
|
+
* 'guardrails_defaults'– neither merged nor user config was recoverable;
|
|
28
|
+
* fell back to fail-secure guardrails-only defaults.
|
|
43
29
|
*/
|
|
44
|
-
export
|
|
30
|
+
export type ConfigRecovery = 'none' | 'stripped_keys' | 'user_only' | 'guardrails_defaults';
|
|
31
|
+
/** Full result from the shared config-build core. */
|
|
32
|
+
export type ConfigBuildResult = {
|
|
45
33
|
config: PluginConfig;
|
|
34
|
+
recovery: ConfigRecovery;
|
|
35
|
+
/** Dotted key paths that were removed during recovery (gates, Zod strict, etc.). */
|
|
36
|
+
removedKeys: string[];
|
|
37
|
+
/** Human-readable summary messages about the recovery action. */
|
|
38
|
+
warnings: string[];
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Full result from `loadPluginConfigWithMeta` and `loadPluginConfigWithMetaAsync`.
|
|
42
|
+
* Extends `ConfigBuildResult` with I/O-layer fields about whether a config
|
|
43
|
+
* file was found and whether it could be read.
|
|
44
|
+
*/
|
|
45
|
+
export type ConfigLoadResult = ConfigBuildResult & {
|
|
46
|
+
/** True when at least one config file (user or project) existed on disk. */
|
|
46
47
|
loadedFromFile: boolean;
|
|
47
48
|
/** True when a config file existed but could not be loaded (corrupt JSON,
|
|
48
49
|
* oversized, permission error). Consumers with fail-closed semantics —
|
|
49
50
|
* e.g. the Full-Auto `locked` activation guard — must treat this as
|
|
50
51
|
* "config unknown", not "config defaults". */
|
|
51
52
|
configHadErrors: boolean;
|
|
52
|
-
recovery: RecoveryType;
|
|
53
|
-
removedKeys: string[];
|
|
54
|
-
warnings: string[];
|
|
55
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Load plugin configuration from user and project config files.
|
|
56
|
+
*
|
|
57
|
+
* Config locations:
|
|
58
|
+
* 1. User config: ~/.config/opencode/opencode-swarm.json
|
|
59
|
+
* 2. Project config: <directory>/.opencode/opencode-swarm.json
|
|
60
|
+
*
|
|
61
|
+
* Project config takes precedence. Nested objects are deep-merged, except
|
|
62
|
+
* `full_auto.locked`: it is a hard-off and OR-merges across both levels, so
|
|
63
|
+
* `locked: true` at either level cannot be overridden by `locked: false`.
|
|
64
|
+
* IMPORTANT: Raw configs are merged BEFORE Zod parsing so that
|
|
65
|
+
* Zod defaults don't override explicit user values.
|
|
66
|
+
*/
|
|
67
|
+
export declare function loadPluginConfig(directory: string): PluginConfig;
|
|
68
|
+
/**
|
|
69
|
+
* Variant of `loadPluginConfig` that also returns loader metadata, including
|
|
70
|
+
* recovery classification, removed keys, and warning messages. All callers
|
|
71
|
+
* that need to surface config-health information (doctor, command-return) use
|
|
72
|
+
* this function. `buildConfigWithMeta` is the shared core — files are read
|
|
73
|
+
* exactly once, no double-read.
|
|
74
|
+
*/
|
|
75
|
+
export declare function loadPluginConfigWithMeta(directory: string): ConfigLoadResult;
|
|
56
76
|
/**
|
|
57
77
|
* Async variant of `loadPluginConfigWithMeta`. Used by the plugin entry
|
|
58
78
|
* (issue #704) so initialization does not perform synchronous fs reads.
|
|
79
|
+
* Calls the same `buildConfigWithMeta` shared core as the sync path — the
|
|
80
|
+
* only difference is that file I/O uses `node:fs/promises` (issue #1900 FR-1).
|
|
59
81
|
*/
|
|
60
|
-
export declare function loadPluginConfigWithMetaAsync(directory: string): Promise<
|
|
61
|
-
config: PluginConfig;
|
|
62
|
-
loadedFromFile: boolean;
|
|
63
|
-
configHadErrors: boolean;
|
|
64
|
-
recovery: RecoveryType;
|
|
65
|
-
removedKeys: string[];
|
|
66
|
-
warnings: string[];
|
|
67
|
-
}>;
|
|
82
|
+
export declare function loadPluginConfigWithMetaAsync(directory: string): Promise<ConfigLoadResult>;
|
|
68
83
|
/**
|
|
69
84
|
* Load custom prompt for an agent from the prompts directory.
|
|
70
85
|
* Checks for {agent}.md (replaces default) and {agent}_append.md (appends).
|
|
@@ -269,6 +269,17 @@ interface MessageWithParts {
|
|
|
269
269
|
*/
|
|
270
270
|
export declare function isPlanCriticApproved(directory: string): Promise<boolean>;
|
|
271
271
|
declare function resolveDelegatedPlanTaskId(args: Record<string, unknown>, knownPlanTaskIds?: ReadonlySet<string>): string | null;
|
|
272
|
+
/**
|
|
273
|
+
* Builds a cause-specific diagnostic for `prepareCoderScope`'s SCOPE_NOT_DECLARED
|
|
274
|
+
* throw when `resolveDelegatedPlanTaskId` returns null. Re-runs extraction with
|
|
275
|
+
* diagnostics enabled so the architect can self-correct in one turn instead of
|
|
276
|
+
* guessing. Issue #1914 Defect 2.
|
|
277
|
+
*
|
|
278
|
+
* Only invoked on the null-resolution failure path — does not affect happy-path
|
|
279
|
+
* latency, and does NOT handle plan-task-shaped-but-unknown ids (those are
|
|
280
|
+
* rejected by the membership gate in prepareCoderScope with their own message).
|
|
281
|
+
*/
|
|
282
|
+
declare function describeCoderScopeFailure(args: Record<string, unknown>, planTaskIds: ReadonlySet<string>): string;
|
|
272
283
|
/**
|
|
273
284
|
* Parses structured per-task verdict lines from agent dispatch output.
|
|
274
285
|
*
|
|
@@ -299,8 +310,8 @@ declare function buildParallelExecutionGuidance(directory: string | undefined, s
|
|
|
299
310
|
declare function resolveEvidenceTaskId(args: Record<string, unknown> | undefined, session: AgentSessionState, directory: string): Promise<string | null>;
|
|
300
311
|
/**
|
|
301
312
|
* _internals export for testing — do not use in production code.
|
|
302
|
-
* Exposes resolveEvidenceTaskId, resolveDelegatedPlanTaskId,
|
|
303
|
-
* buildParallelExecutionGuidance for unit testing.
|
|
313
|
+
* Exposes resolveEvidenceTaskId, resolveDelegatedPlanTaskId,
|
|
314
|
+
* describeCoderScopeFailure, and buildParallelExecutionGuidance for unit testing.
|
|
304
315
|
*
|
|
305
316
|
* Worktree operation entries (provisionWorktree, removeWorktree, etc.) proxy
|
|
306
317
|
* to delegation-gate/worktree-isolation._internals via getters/setters so
|
|
@@ -309,6 +320,7 @@ declare function resolveEvidenceTaskId(args: Record<string, unknown> | undefined
|
|
|
309
320
|
export declare const _internals: {
|
|
310
321
|
resolveEvidenceTaskId: typeof resolveEvidenceTaskId;
|
|
311
322
|
resolveDelegatedPlanTaskId: typeof resolveDelegatedPlanTaskId;
|
|
323
|
+
describeCoderScopeFailure: typeof describeCoderScopeFailure;
|
|
312
324
|
parsePerTaskVerdicts: typeof parsePerTaskVerdicts;
|
|
313
325
|
buildParallelExecutionGuidance: typeof buildParallelExecutionGuidance;
|
|
314
326
|
loadPlanJsonOnly: typeof loadPlanJsonOnly;
|