opencode-swarm 7.126.0 → 7.126.1

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 (50) hide show
  1. package/.opencode/skills/swarm-pr-feedback/SKILL.md +19 -14
  2. package/.opencode/skills/swarm-pr-review/SKILL.md +17 -13
  3. package/dist/cli/{config-doctor-akxywx0c.js → config-doctor-23jxdqwv.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-0t6hny6g.js} +2 -2
  6. package/dist/cli/{curator-23hynz78.js → curator-g8rggzbk.js} +14 -14
  7. package/dist/cli/{curator-llm-factory-r648jn8e.js → curator-llm-factory-36psae60.js} +14 -14
  8. package/dist/cli/{guardrail-explain-6atsd4vr.js → guardrail-explain-6ffgrjx9.js} +15 -15
  9. package/dist/cli/{guardrail-log-222xyxfp.js → guardrail-log-57sczn5h.js} +3 -3
  10. package/dist/cli/{hive-promoter-bnkhzd46.js → hive-promoter-c458rgp5.js} +14 -14
  11. package/dist/cli/{index-qzkcy22e.js → index-1p9z8cc4.js} +1 -1
  12. package/dist/cli/{index-cdx337js.js → index-3hkbegq2.js} +1 -1
  13. package/dist/cli/{index-gnvg72y1.js → index-4ff0x4cg.js} +79 -1
  14. package/dist/cli/{index-kwnsatzq.js → index-6j9p0c40.js} +2 -2
  15. package/dist/cli/{index-a1c9az5e.js → index-abw10n3f.js} +109 -151
  16. package/dist/cli/{index-r1gdkn2d.js → index-c8sqc3nh.js} +113 -21
  17. package/dist/cli/{index-2bnfwmk3.js → index-cnhp6c0k.js} +1 -1
  18. package/dist/cli/{index-dezgmvtw.js → index-echdpdhy.js} +1 -1
  19. package/dist/cli/{index-yfzn5r9s.js → index-k5xh81c9.js} +3 -3
  20. package/dist/cli/{index-mgrsx5hn.js → index-kx3533dm.js} +1 -1
  21. package/dist/cli/{index-bcgfhxzv.js → index-nkhp7j16.js} +5 -5
  22. package/dist/cli/{index-2yd75hms.js → index-nmyg9b7v.js} +4 -4
  23. package/dist/cli/{index-16z6txq3.js → index-vvwf9ark.js} +2 -2
  24. package/dist/cli/{index-jt7hnr7q.js → index-w0yztxgq.js} +1 -1
  25. package/dist/cli/{index-g4ef4v3m.js → index-w9cb5zwh.js} +1 -1
  26. package/dist/cli/{index-y4ry07h8.js → index-x1w4cx3n.js} +2 -2
  27. package/dist/cli/{index-0ff5cm9j.js → index-y9t766sw.js} +2217 -2195
  28. package/dist/cli/{index-68fpa7ff.js → index-yf4kvhrn.js} +16 -16
  29. package/dist/cli/index.js +14 -14
  30. package/dist/cli/{knowledge-escalator-4hc8w7sd.js → knowledge-escalator-kd80m9vp.js} +3 -3
  31. package/dist/cli/{knowledge-events-kyqjv1f8.js → knowledge-events-j7jfwm1d.js} +1 -1
  32. package/dist/cli/{knowledge-store-06k0p1gs.js → knowledge-store-1d4byc7y.js} +1 -1
  33. package/dist/cli/{knowledge-validator-42xjmcmh.js → knowledge-validator-63mkgt9x.js} +4 -4
  34. package/dist/cli/{scan-cursor-gjcvpyta.js → scan-cursor-qzn5jmbe.js} +2 -2
  35. package/dist/cli/{schema-69z8w1ka.js → schema-2j92wnns.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-sv6zvdvz.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/pr-workflow-gate.d.ts +39 -0
  41. package/dist/hooks/scope-guard.d.ts +6 -1
  42. package/dist/index.js +29 -26
  43. package/dist/scope/scope-binding.d.ts +21 -2
  44. package/dist/scope/scope-persistence.d.ts +6 -0
  45. package/dist/tools/index.d.ts +2 -0
  46. package/dist/tools/manifest.d.ts +2 -0
  47. package/dist/tools/prepare-pr-feedback-scope.d.ts +5 -0
  48. package/dist/tools/tool-metadata.d.ts +98 -0
  49. package/dist/tools/write-pr-review-artifact.d.ts +5 -0
  50. 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';
@@ -113,5 +114,6 @@ export { write_drift_evidence } from './write-drift-evidence';
113
114
  export { write_final_council_evidence } from './write-final-council-evidence';
114
115
  export { write_hallucination_evidence } from './write-hallucination-evidence';
115
116
  export { write_mutation_evidence } from './write-mutation-evidence';
117
+ export { executeWritePrReviewArtifact, write_pr_review_artifact, } from './write-pr-review-artifact';
116
118
  export { executeWritePrReviewTriggerEval, PR_REVIEW_TRIGGER_DEFINITIONS, write_pr_review_trigger_eval, } from './write-pr-review-trigger-eval';
117
119
  export { executeWriteRetro, write_retro } from './write-retro';
@@ -52,6 +52,8 @@ export declare const TOOL_MANIFEST: {
52
52
  checkpoint: () => ToolDefinition;
53
53
  pkg_audit: () => ToolDefinition;
54
54
  parse_lane_candidates: () => ToolDefinition;
55
+ prepare_pr_feedback_scope: () => ToolDefinition;
56
+ write_pr_review_artifact: () => ToolDefinition;
55
57
  write_pr_review_trigger_eval: () => ToolDefinition;
56
58
  test_runner: () => ToolDefinition;
57
59
  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>;
@@ -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;
@@ -134,6 +183,10 @@ export declare const TOOL_METADATA: {
134
183
  pkg_audit: {
135
184
  description: string;
136
185
  agents: ("reviewer" | "test_engineer" | "critic_hallucination_verifier" | "critic_oversight" | "architect")[];
186
+ prWorkflow: {
187
+ modes: "PR_REVIEW"[];
188
+ capability: "validate";
189
+ };
137
190
  };
138
191
  parse_lane_candidates: {
139
192
  description: string;
@@ -143,13 +196,29 @@ export declare const TOOL_METADATA: {
143
196
  description: string;
144
197
  agents: "architect"[];
145
198
  };
199
+ write_pr_review_artifact: {
200
+ description: string;
201
+ agents: "architect"[];
202
+ };
203
+ prepare_pr_feedback_scope: {
204
+ description: string;
205
+ agents: "architect"[];
206
+ };
146
207
  test_runner: {
147
208
  description: string;
148
209
  agents: ("reviewer" | "test_engineer" | "architect")[];
210
+ prWorkflow: {
211
+ modes: "PR_REVIEW"[];
212
+ capability: "validate";
213
+ };
149
214
  };
150
215
  test_impact: {
151
216
  description: string;
152
217
  agents: ("reviewer" | "test_engineer" | "critic_oversight" | "architect")[];
218
+ prWorkflow: {
219
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
220
+ capability: "observe";
221
+ };
153
222
  };
154
223
  mutation_test: {
155
224
  description: string;
@@ -166,10 +235,18 @@ export declare const TOOL_METADATA: {
166
235
  git_blame: {
167
236
  description: string;
168
237
  agents: ("reviewer" | "explorer" | "architect")[];
238
+ prWorkflow: {
239
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
240
+ capability: "observe";
241
+ };
169
242
  };
170
243
  gitingest: {
171
244
  description: string;
172
245
  agents: ("docs" | "explorer" | "architect")[];
246
+ prWorkflow: {
247
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
248
+ capability: "observe";
249
+ };
173
250
  };
174
251
  retrieve_summary: {
175
252
  description: string;
@@ -178,6 +255,10 @@ export declare const TOOL_METADATA: {
178
255
  retrieve_lane_output: {
179
256
  description: string;
180
257
  agents: "architect"[];
258
+ prWorkflow: {
259
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
260
+ capability: "observe";
261
+ };
181
262
  };
182
263
  extract_code_blocks: {
183
264
  description: string;
@@ -266,14 +347,26 @@ export declare const TOOL_METADATA: {
266
347
  actionlint_scan: {
267
348
  description: string;
268
349
  agents: ("test_engineer" | "architect")[];
350
+ prWorkflow: {
351
+ modes: "PR_REVIEW"[];
352
+ capability: "validate";
353
+ };
269
354
  };
270
355
  osv_scan: {
271
356
  description: string;
272
357
  agents: ("test_engineer" | "architect")[];
358
+ prWorkflow: {
359
+ modes: "PR_REVIEW"[];
360
+ capability: "validate";
361
+ };
273
362
  };
274
363
  gh_evidence: {
275
364
  description: string;
276
365
  agents: ("architect" | "researcher")[];
366
+ prWorkflow: {
367
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
368
+ capability: "observe";
369
+ };
277
370
  };
278
371
  batch_symbols: {
279
372
  description: string;
@@ -294,6 +387,10 @@ export declare const TOOL_METADATA: {
294
387
  repo_map: {
295
388
  description: string;
296
389
  agents: ("reviewer" | "coder" | "explorer" | "critic" | "critic_sounding_board" | "critic_drift_verifier" | "critic_hallucination_verifier" | "critic_architecture_supervisor" | "critic_oversight" | "architect")[];
390
+ prWorkflow: {
391
+ modes: ("PR_REVIEW" | "PR_FEEDBACK")[];
392
+ capability: "observe";
393
+ };
297
394
  };
298
395
  get_qa_gate_profile: {
299
396
  description: string;
@@ -470,6 +567,7 @@ export type ToolName = keyof typeof TOOL_METADATA;
470
567
  export declare const TOOL_NAMES: readonly ToolName[];
471
568
  /** Set for O(1) tool name validation. */
472
569
  export declare const TOOL_NAME_SET: ReadonlySet<ToolName>;
570
+ export declare function getPrWorkflowToolCapability(toolName: string, mode: 'PR_REVIEW' | 'PR_FEEDBACK'): 'observe' | 'validate' | null;
473
571
  /** Human-readable descriptions, keyed by tool name. */
474
572
  export declare const TOOL_DESCRIPTIONS: Partial<Record<ToolName, string>>;
475
573
  /**
@@ -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.1",
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",