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.
Files changed (52) hide show
  1. package/.opencode/skills/swarm-pr-feedback/SKILL.md +24 -16
  2. package/.opencode/skills/swarm-pr-review/SKILL.md +18 -14
  3. package/dist/cli/{config-doctor-akxywx0c.js → config-doctor-mfx27331.js} +2 -2
  4. package/dist/cli/{core-v1kp7anb.js → core-wg3re04e.js} +1 -1
  5. package/dist/cli/{curation-policy-dptr1rfe.js → curation-policy-n944aq62.js} +2 -2
  6. package/dist/cli/{curator-llm-factory-r648jn8e.js → curator-llm-factory-0rf29gfq.js} +14 -14
  7. package/dist/cli/{curator-23hynz78.js → curator-qfh9xty4.js} +14 -14
  8. package/dist/cli/{guardrail-explain-6atsd4vr.js → guardrail-explain-jsrjqps1.js} +15 -15
  9. package/dist/cli/{guardrail-log-222xyxfp.js → guardrail-log-61gya05m.js} +3 -3
  10. package/dist/cli/{hive-promoter-bnkhzd46.js → hive-promoter-ktt17fyf.js} +14 -14
  11. package/dist/cli/{index-jt7hnr7q.js → index-3xd9a2g7.js} +1 -1
  12. package/dist/cli/{index-gnvg72y1.js → index-4ff0x4cg.js} +79 -1
  13. package/dist/cli/{index-68fpa7ff.js → index-5nq8dp63.js} +16 -16
  14. package/dist/cli/{index-yfzn5r9s.js → index-7bxw3v5w.js} +3 -3
  15. package/dist/cli/{index-kwnsatzq.js → index-88dt7c9z.js} +2 -2
  16. package/dist/cli/{index-qzkcy22e.js → index-bf76q8q7.js} +1 -1
  17. package/dist/cli/{index-16z6txq3.js → index-c48dvb6j.js} +2 -2
  18. package/dist/cli/{index-0ff5cm9j.js → index-d88y17ht.js} +2222 -2197
  19. package/dist/cli/{index-bcgfhxzv.js → index-f97dm6tz.js} +5 -5
  20. package/dist/cli/{index-a1c9az5e.js → index-gf9cxvp0.js} +109 -151
  21. package/dist/cli/{index-mgrsx5hn.js → index-gwss5btk.js} +1 -1
  22. package/dist/cli/{index-dezgmvtw.js → index-gxw20m1d.js} +1 -1
  23. package/dist/cli/{index-2bnfwmk3.js → index-nqp13m5a.js} +1 -1
  24. package/dist/cli/{index-2yd75hms.js → index-pb8ag9vg.js} +4 -4
  25. package/dist/cli/{index-cdx337js.js → index-pf3xae4s.js} +1 -1
  26. package/dist/cli/{index-r1gdkn2d.js → index-vcqwhe9d.js} +117 -21
  27. package/dist/cli/{index-g4ef4v3m.js → index-w9cb5zwh.js} +1 -1
  28. package/dist/cli/{index-y4ry07h8.js → index-z8ftpav0.js} +2 -2
  29. package/dist/cli/index.js +14 -14
  30. package/dist/cli/{knowledge-escalator-4hc8w7sd.js → knowledge-escalator-nna0zec3.js} +3 -3
  31. package/dist/cli/{knowledge-events-kyqjv1f8.js → knowledge-events-7k82xk36.js} +1 -1
  32. package/dist/cli/{knowledge-store-06k0p1gs.js → knowledge-store-efvtng9t.js} +1 -1
  33. package/dist/cli/{knowledge-validator-42xjmcmh.js → knowledge-validator-jh93eagj.js} +4 -4
  34. package/dist/cli/{scan-cursor-gjcvpyta.js → scan-cursor-cydz8d9q.js} +2 -2
  35. package/dist/cli/{schema-69z8w1ka.js → schema-fa033pqw.js} +1 -1
  36. package/dist/cli/{scope-persistence-habn4q8a.js → scope-persistence-dm5bab50.js} +3 -1
  37. package/dist/cli/{skill-generator-t6j93mwt.js → skill-generator-8v463kj7.js} +5 -5
  38. package/dist/config/index.d.ts +1 -0
  39. package/dist/config/loader.d.ts +51 -36
  40. package/dist/hooks/delegation-gate.d.ts +14 -2
  41. package/dist/hooks/pr-workflow-gate.d.ts +57 -0
  42. package/dist/hooks/scope-guard.d.ts +6 -1
  43. package/dist/index.js +55 -49
  44. package/dist/scope/scope-binding.d.ts +21 -2
  45. package/dist/scope/scope-persistence.d.ts +6 -0
  46. package/dist/tools/index.d.ts +3 -0
  47. package/dist/tools/manifest.d.ts +3 -0
  48. package/dist/tools/prepare-pr-feedback-scope.d.ts +5 -0
  49. package/dist/tools/prepare-pr-workflow-checkout.d.ts +25 -0
  50. package/dist/tools/tool-metadata.d.ts +102 -0
  51. package/dist/tools/write-pr-review-artifact.d.ts +5 -0
  52. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import type { Plan } from '../config/plan-schema';
2
2
  export declare const MAX_PENDING_SCOPE_BINDINGS = 256;
3
- export type ScopeBindingSource = 'declare_scope' | 'plan' | 'file_directive' | 'worktree_derived';
3
+ export type ScopeBindingSource = 'declare_scope' | 'plan' | 'file_directive' | 'pr_feedback' | 'worktree_derived';
4
4
  export interface ScopeBinding {
5
5
  version: 2;
6
6
  workspaceIdentity: string;
@@ -14,6 +14,9 @@ export interface ScopeBinding {
14
14
  activation: 'declaration' | 'pending_child' | 'active';
15
15
  parentOwnerSessionId?: string;
16
16
  parentCallId?: string;
17
+ /** PR_FEEDBACK bindings carry their parent workflow identity and revision. */
18
+ workflowSessionId?: string;
19
+ workflowRevisionDigest?: string;
17
20
  source: ScopeBindingSource;
18
21
  files: string[];
19
22
  declaredAt: number;
@@ -28,7 +31,7 @@ export declare function createScopeBinding(input: {
28
31
  files: readonly string[];
29
32
  ownerSessionId: string;
30
33
  ownerMessageId: string;
31
- source: Exclude<ScopeBindingSource, 'worktree_derived'>;
34
+ source: Exclude<ScopeBindingSource, 'pr_feedback' | 'worktree_derived'>;
32
35
  dispatchCallId?: string;
33
36
  activation?: ScopeBinding['activation'];
34
37
  ttlMs?: number;
@@ -41,6 +44,22 @@ export declare function getScopeBinding(input: {
41
44
  ownerSessionId: string;
42
45
  ownerMessageId?: string;
43
46
  }): ScopeBinding | null;
47
+ export declare function createPrFeedbackScopeBinding(input: {
48
+ directory: string;
49
+ taskId: string;
50
+ files: readonly string[];
51
+ ownerSessionId: string;
52
+ ownerMessageId: string;
53
+ workflowSessionId: string;
54
+ workflowRevisionDigest: string;
55
+ dispatchCallId?: string;
56
+ activation?: ScopeBinding['activation'];
57
+ }): ScopeBinding | null;
58
+ export declare function getAuthorizedPrFeedbackScopeBinding(input: {
59
+ directory: string;
60
+ activeSessionId: string;
61
+ taskId?: string;
62
+ }): ScopeBinding | null;
44
63
  /** Resolve the one Task-correlated authorization for an executing coder. */
45
64
  export declare function getAuthorizedScopeBinding(input: {
46
65
  directory: string;
@@ -105,6 +105,12 @@ export declare function resolveAuthorizedScopeBindingForSession(input: {
105
105
  directory: string;
106
106
  activeSessionId: string;
107
107
  }): ScopeBinding | null;
108
+ /** Recover one exact planless PR_FEEDBACK child binding after plugin restart. */
109
+ export declare function resolveAuthorizedPrFeedbackScopeBindingFromDisk(input: {
110
+ directory: string;
111
+ activeSessionId: string;
112
+ taskId?: string;
113
+ }): ScopeBinding | null;
108
114
  /**
109
115
  * Read persisted scope for a task. Returns null on:
110
116
  * - file missing
@@ -49,6 +49,7 @@ export { phase_complete } from './phase-complete';
49
49
  export { pkg_audit } from './pkg-audit';
50
50
  export { type PlaceholderFinding, type PlaceholderScanInput, type PlaceholderScanResult, placeholder_scan, placeholderScan, } from './placeholder-scan';
51
51
  export { type PreCheckBatchInput, type PreCheckBatchResult, pre_check_batch, runPreCheckBatch, type ToolResult, } from './pre-check-batch';
52
+ export { executePreparePrFeedbackScope, prepare_pr_feedback_scope, } from './prepare-pr-feedback-scope';
52
53
  export { type QualityBudgetInput, type QualityBudgetResult, quality_budget, qualityBudget, } from './quality-budget';
53
54
  export { buildWorkspaceGraph, type GraphEdge, type GraphNode, loadGraph, loadOrCreateGraph, type RepoGraph, resolveModuleSpecifier, saveGraph, updateGraphForFiles, } from './repo-graph';
54
55
  export { repo_map } from './repo-map';
@@ -100,6 +101,7 @@ export { lean_turbo_runner_status } from './lean-turbo-runner-status';
100
101
  export { lean_turbo_status } from './lean-turbo-status';
101
102
  export { lint_spec } from './lint-spec';
102
103
  export { mutation_test } from './mutation-test';
104
+ export { executePreparePrWorkflowCheckout, prepare_pr_workflow_checkout, } from './prepare-pr-workflow-checkout';
103
105
  export { executeRunPrFeedbackStageA, run_pr_feedback_stage_a, } from './run-pr-feedback-stage-a';
104
106
  export { symbols } from './symbols';
105
107
  export { type SyntaxCheckFileResult, type SyntaxCheckInput, type SyntaxCheckResult, syntax_check, syntaxCheck, } from './syntax-check';
@@ -113,5 +115,6 @@ export { write_drift_evidence } from './write-drift-evidence';
113
115
  export { write_final_council_evidence } from './write-final-council-evidence';
114
116
  export { write_hallucination_evidence } from './write-hallucination-evidence';
115
117
  export { write_mutation_evidence } from './write-mutation-evidence';
118
+ export { executeWritePrReviewArtifact, write_pr_review_artifact, } from './write-pr-review-artifact';
116
119
  export { executeWritePrReviewTriggerEval, PR_REVIEW_TRIGGER_DEFINITIONS, write_pr_review_trigger_eval, } from './write-pr-review-trigger-eval';
117
120
  export { executeWriteRetro, write_retro } from './write-retro';
@@ -44,6 +44,7 @@ export declare const TOOL_MANIFEST: {
44
44
  completion_verify: () => ToolDefinition;
45
45
  complete_pr_workflow: () => ToolDefinition;
46
46
  abort_pr_workflow: () => ToolDefinition;
47
+ prepare_pr_workflow_checkout: () => ToolDefinition;
47
48
  run_pr_feedback_stage_a: () => ToolDefinition;
48
49
  submit_council_verdicts: () => ToolDefinition;
49
50
  submit_phase_council_verdicts: () => ToolDefinition;
@@ -52,6 +53,8 @@ export declare const TOOL_MANIFEST: {
52
53
  checkpoint: () => ToolDefinition;
53
54
  pkg_audit: () => ToolDefinition;
54
55
  parse_lane_candidates: () => ToolDefinition;
56
+ prepare_pr_feedback_scope: () => ToolDefinition;
57
+ write_pr_review_artifact: () => ToolDefinition;
55
58
  write_pr_review_trigger_eval: () => ToolDefinition;
56
59
  test_runner: () => ToolDefinition;
57
60
  test_impact: () => ToolDefinition;
@@ -0,0 +1,5 @@
1
+ import { createSwarmTool } from './create-tool.js';
2
+ export declare function executePreparePrFeedbackScope(args: unknown, directory: string, context?: {
3
+ sessionID?: string;
4
+ }): Promise<string>;
5
+ export declare const prepare_pr_feedback_scope: ReturnType<typeof createSwarmTool>;
@@ -0,0 +1,25 @@
1
+ import { createSwarmTool } from './create-tool.js';
2
+ /**
3
+ * Preserve explicit dirty tracked files before the unbound PR checkout.
4
+ *
5
+ * The tool uses the canonical gate's cross-process mutation lock and
6
+ * schema-validated state, so an abort, bind, or same-session reactivation
7
+ * cannot revoke or replace authorization while the fixed Git command runs.
8
+ * The independent receipt is retained under `.swarm/` after terminal gate
9
+ * cleanup so the exact stash recovery command remains auditable.
10
+ */
11
+ export declare function executePreparePrWorkflowCheckout(args: unknown, directory: string, context?: {
12
+ sessionID?: string;
13
+ }): Promise<string>;
14
+ declare function runGit(directory: string, args: string[], options?: {
15
+ captureStdout?: boolean;
16
+ }): Promise<{
17
+ exitCode: number;
18
+ stdout: string;
19
+ }>;
20
+ /** Test-only seam for serializing concurrent real-Git checkout preparation. */
21
+ export declare const _internals: {
22
+ runGit: typeof runGit;
23
+ };
24
+ export declare const prepare_pr_workflow_checkout: ReturnType<typeof createSwarmTool>;
25
+ export {};
@@ -21,6 +21,11 @@ export interface ToolMeta {
21
21
  description: string;
22
22
  /** Agents granted this tool by default (inverted into AGENT_TOOL_MAP). Empty = overlay-only. */
23
23
  agents: AgentName[];
24
+ /** Explicit PR-workflow capability. Omitted tools remain fail-closed. */
25
+ prWorkflow?: {
26
+ modes: Array<'PR_REVIEW' | 'PR_FEEDBACK'>;
27
+ capability: 'observe' | 'validate';
28
+ };
24
29
  }
25
30
  /**
26
31
  * The registry metadata. Keys are the canonical tool names; `ToolName` derives
@@ -30,34 +35,66 @@ export declare const TOOL_METADATA: {
30
35
  diff: {
31
36
  description: string;
32
37
  agents: ("reviewer" | "test_engineer" | "coder" | "critic_oversight" | "architect")[];
38
+ prWorkflow: {
39
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
40
+ capability: "observe";
41
+ };
33
42
  };
34
43
  diff_summary: {
35
44
  description: string;
36
45
  agents: ("reviewer" | "critic_oversight" | "architect")[];
46
+ prWorkflow: {
47
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
48
+ capability: "observe";
49
+ };
37
50
  };
38
51
  syntax_check: {
39
52
  description: string;
40
53
  agents: ("test_engineer" | "coder" | "architect")[];
54
+ prWorkflow: {
55
+ modes: "PR_REVIEW"[];
56
+ capability: "validate";
57
+ };
41
58
  };
42
59
  placeholder_scan: {
43
60
  description: string;
44
61
  agents: ("reviewer" | "architect")[];
62
+ prWorkflow: {
63
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
64
+ capability: "observe";
65
+ };
45
66
  };
46
67
  imports: {
47
68
  description: string;
48
69
  agents: ("reviewer" | "test_engineer" | "coder" | "docs" | "sme" | "critic" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "architect" | "researcher" | "docs_design")[];
70
+ prWorkflow: {
71
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
72
+ capability: "observe";
73
+ };
49
74
  };
50
75
  lint: {
51
76
  description: string;
52
77
  agents: ("reviewer" | "coder" | "architect")[];
78
+ prWorkflow: {
79
+ modes: "PR_REVIEW"[];
80
+ capability: "validate";
81
+ };
53
82
  };
54
83
  secretscan: {
55
84
  description: string;
56
85
  agents: ("reviewer" | "critic_oversight" | "architect")[];
86
+ prWorkflow: {
87
+ modes: "PR_REVIEW"[];
88
+ capability: "validate";
89
+ };
57
90
  };
58
91
  sast_scan: {
59
92
  description: string;
60
93
  agents: ("reviewer" | "critic_oversight" | "architect")[];
94
+ prWorkflow: {
95
+ modes: "PR_REVIEW"[];
96
+ capability: "validate";
97
+ };
61
98
  };
62
99
  build_check: {
63
100
  description: string;
@@ -70,6 +107,10 @@ export declare const TOOL_METADATA: {
70
107
  quality_budget: {
71
108
  description: string;
72
109
  agents: "architect"[];
110
+ prWorkflow: {
111
+ modes: "PR_REVIEW"[];
112
+ capability: "validate";
113
+ };
73
114
  };
74
115
  symbols: {
75
116
  description: string;
@@ -82,10 +123,18 @@ export declare const TOOL_METADATA: {
82
123
  schema_drift: {
83
124
  description: string;
84
125
  agents: ("docs" | "explorer" | "sme" | "architect" | "researcher")[];
126
+ prWorkflow: {
127
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
128
+ capability: "observe";
129
+ };
85
130
  };
86
131
  todo_extract: {
87
132
  description: string;
88
133
  agents: ("docs" | "explorer" | "architect" | "researcher")[];
134
+ prWorkflow: {
135
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
136
+ capability: "observe";
137
+ };
89
138
  };
90
139
  evidence_check: {
91
140
  description: string;
@@ -107,6 +156,10 @@ export declare const TOOL_METADATA: {
107
156
  description: string;
108
157
  agents: "architect"[];
109
158
  };
159
+ prepare_pr_workflow_checkout: {
160
+ description: string;
161
+ agents: "architect"[];
162
+ };
110
163
  run_pr_feedback_stage_a: {
111
164
  description: string;
112
165
  agents: "architect"[];
@@ -134,6 +187,10 @@ export declare const TOOL_METADATA: {
134
187
  pkg_audit: {
135
188
  description: string;
136
189
  agents: ("reviewer" | "test_engineer" | "critic_hallucination_verifier" | "critic_oversight" | "architect")[];
190
+ prWorkflow: {
191
+ modes: "PR_REVIEW"[];
192
+ capability: "validate";
193
+ };
137
194
  };
138
195
  parse_lane_candidates: {
139
196
  description: string;
@@ -143,13 +200,29 @@ export declare const TOOL_METADATA: {
143
200
  description: string;
144
201
  agents: "architect"[];
145
202
  };
203
+ write_pr_review_artifact: {
204
+ description: string;
205
+ agents: "architect"[];
206
+ };
207
+ prepare_pr_feedback_scope: {
208
+ description: string;
209
+ agents: "architect"[];
210
+ };
146
211
  test_runner: {
147
212
  description: string;
148
213
  agents: ("reviewer" | "test_engineer" | "architect")[];
214
+ prWorkflow: {
215
+ modes: "PR_REVIEW"[];
216
+ capability: "validate";
217
+ };
149
218
  };
150
219
  test_impact: {
151
220
  description: string;
152
221
  agents: ("reviewer" | "test_engineer" | "critic_oversight" | "architect")[];
222
+ prWorkflow: {
223
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
224
+ capability: "observe";
225
+ };
153
226
  };
154
227
  mutation_test: {
155
228
  description: string;
@@ -166,10 +239,18 @@ export declare const TOOL_METADATA: {
166
239
  git_blame: {
167
240
  description: string;
168
241
  agents: ("reviewer" | "explorer" | "architect")[];
242
+ prWorkflow: {
243
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
244
+ capability: "observe";
245
+ };
169
246
  };
170
247
  gitingest: {
171
248
  description: string;
172
249
  agents: ("docs" | "explorer" | "architect")[];
250
+ prWorkflow: {
251
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
252
+ capability: "observe";
253
+ };
173
254
  };
174
255
  retrieve_summary: {
175
256
  description: string;
@@ -178,6 +259,10 @@ export declare const TOOL_METADATA: {
178
259
  retrieve_lane_output: {
179
260
  description: string;
180
261
  agents: "architect"[];
262
+ prWorkflow: {
263
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
264
+ capability: "observe";
265
+ };
181
266
  };
182
267
  extract_code_blocks: {
183
268
  description: string;
@@ -266,14 +351,26 @@ export declare const TOOL_METADATA: {
266
351
  actionlint_scan: {
267
352
  description: string;
268
353
  agents: ("test_engineer" | "architect")[];
354
+ prWorkflow: {
355
+ modes: "PR_REVIEW"[];
356
+ capability: "validate";
357
+ };
269
358
  };
270
359
  osv_scan: {
271
360
  description: string;
272
361
  agents: ("test_engineer" | "architect")[];
362
+ prWorkflow: {
363
+ modes: "PR_REVIEW"[];
364
+ capability: "validate";
365
+ };
273
366
  };
274
367
  gh_evidence: {
275
368
  description: string;
276
369
  agents: ("architect" | "researcher")[];
370
+ prWorkflow: {
371
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
372
+ capability: "observe";
373
+ };
277
374
  };
278
375
  batch_symbols: {
279
376
  description: string;
@@ -294,6 +391,10 @@ export declare const TOOL_METADATA: {
294
391
  repo_map: {
295
392
  description: string;
296
393
  agents: ("reviewer" | "coder" | "explorer" | "critic" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "critic_architecture_supervisor" | "critic_oversight" | "architect")[];
394
+ prWorkflow: {
395
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
396
+ capability: "observe";
397
+ };
297
398
  };
298
399
  get_qa_gate_profile: {
299
400
  description: string;
@@ -470,6 +571,7 @@ export type ToolName = keyof typeof TOOL_METADATA;
470
571
  export declare const TOOL_NAMES: readonly ToolName[];
471
572
  /** Set for O(1) tool name validation. */
472
573
  export declare const TOOL_NAME_SET: ReadonlySet<ToolName>;
574
+ export declare function getPrWorkflowToolCapability(toolName: string, mode: 'PR_REVIEW' | 'PR_FEEDBACK'): 'observe' | 'validate' | null;
473
575
  /** Human-readable descriptions, keyed by tool name. */
474
576
  export declare const TOOL_DESCRIPTIONS: Partial<Record<ToolName, string>>;
475
577
  /**
@@ -0,0 +1,5 @@
1
+ import { createSwarmTool } from './create-tool.js';
2
+ export declare function executeWritePrReviewArtifact(args: unknown, directory: string, context?: {
3
+ sessionID?: string;
4
+ }): Promise<string>;
5
+ export declare const write_pr_review_artifact: ReturnType<typeof createSwarmTool>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.126.0",
3
+ "version": "7.126.2",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -106,8 +106,8 @@
106
106
  "repro:1873": "bun build scripts/repro-1873-entry.ts --outdir dist-build-test/repro-1873 --target node --format esm && node scripts/repro-1873.mjs"
107
107
  },
108
108
  "dependencies": {
109
- "@opencode-ai/plugin": "^1.1.53",
110
- "@opencode-ai/sdk": "^1.1.53",
109
+ "@opencode-ai/plugin": "^1.18.3",
110
+ "@opencode-ai/sdk": "^1.18.3",
111
111
  "@vscode/tree-sitter-wasm": "^0.3.0",
112
112
  "bash-parser": "^0.5.0",
113
113
  "p-limit": "^7.3.0",