opencode-swarm 6.79.0 → 6.80.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.
package/README.md CHANGED
@@ -30,7 +30,7 @@ Most AI coding tools let one model write code and ask that same model whether th
30
30
  - 🔒 **Gated pipeline** — code never ships without reviewer + test engineer approval (bypassed in turbo mode)
31
31
  - 🔄 **Phase completion gates** — completion-verify and drift verifier gates enforced before phase completion (bypassed in turbo mode)
32
32
  - 🔁 **Resumable sessions** — all state saved to `.swarm/`; pick up any project any day
33
- - 🌐 **12 languages** — TypeScript, Python, Go, Rust, Java, Kotlin, C#, C/C++, Swift, Dart, Ruby, PHP
33
+ - 🌐 **20 languages** — TypeScript, TSX, Python, Go, Rust, Java, Kotlin, C, C++, C#, Ruby, Swift, Dart, PHP, JavaScript, CSS, Bash, PowerShell, INI, Regex
34
34
  - 🛡️ **Built-in security** — SAST, secrets scanning, dependency audit per task
35
35
  - 🆓 **Free tier** — works with OpenCode Zen's free model roster
36
36
  - ⚙️ **Fully configurable** — override any agent's model, disable agents, tune guardrails
@@ -351,7 +351,7 @@ Agent roles (see [Agent Categories](#agent-categories) for classification refere
351
351
  | `critic_sounding_board` | Pre-escalation pushback — the architect consults this before contacting the user; returns UNNECESSARY / REPHRASE / APPROVED / RESOLVE | When architect hits an impasse |
352
352
  | `critic_drift_verifier` | **Phase-close drift detector**: verifies that the completed implementation still matches the original plan spec. Returns APPROVED or NEEDS_REVISION. When NEEDS_REVISION is returned, the phase is **blocked** — the architect must address deviations before calling `phase_complete`. After receiving the verdict, the architect calls `write_drift_evidence` to record the gate result. Bypassed in turbo mode. | Before `phase_complete` (PHASE-WRAP mode) |
353
353
  | `coder` | Implements one task at a time | During execution |
354
- | `reviewer` | Reviews correctness and security | After each task |
354
+ | `reviewer` | Reviews correctness and security; receives AST semantic diff summary with blast radius | After each task |
355
355
  | `test_engineer` | Writes and runs tests | After each task |
356
356
  | `designer` | Generates UI scaffolds and design tokens when needed | UI-specific work |
357
357
  | `docs` | Updates docs to match what was actually built | After each phase |
@@ -405,7 +405,9 @@ Every task goes through this sequence. No exceptions, no overrides.
405
405
  MODE: EXECUTE (per task)
406
406
 
407
407
  ├── 5a. @coder implements (ONE task only)
408
- ├── 5b. diff + imports (contract + dependency analysis)
408
+ ├── 5b. diff + imports (contract + dependency analysis + semantic diff context)
409
+ │ └── @system-enhancer injects AST-based semantic diff summary with blast radius
410
+ │ into @reviewer context (up to 10 files, conditional on declared scope)
409
411
  ├── 5c. syntax_check (parse validation)
410
412
  ├── 5d. placeholder_scan (catches TODOs, stubs, incomplete code)
411
413
  ├── 5e. lint fix → lint check
package/dist/cli/index.js CHANGED
@@ -18738,6 +18738,15 @@ var ALL_AGENT_NAMES = [
18738
18738
  ORCHESTRATOR_NAME,
18739
18739
  ...ALL_SUBAGENT_NAMES
18740
18740
  ];
18741
+ var OPENCODE_NATIVE_AGENTS = new Set([
18742
+ "build",
18743
+ "plan",
18744
+ "general",
18745
+ "explore",
18746
+ "compaction",
18747
+ "title",
18748
+ "summary"
18749
+ ]);
18741
18750
  var AGENT_TOOL_MAP = {
18742
18751
  architect: [
18743
18752
  "checkpoint",
@@ -4,6 +4,7 @@ export declare const PIPELINE_AGENTS: readonly ["explorer", "coder", "test_engin
4
4
  export declare const ORCHESTRATOR_NAME: "architect";
5
5
  export declare const ALL_SUBAGENT_NAMES: readonly ["sme", "docs", "designer", "critic_sounding_board", "critic_drift_verifier", "critic_hallucination_verifier", "curator_init", "curator_phase", "reviewer", "critic", "critic_oversight", "explorer", "coder", "test_engineer"];
6
6
  export declare const ALL_AGENT_NAMES: readonly ["architect", "sme", "docs", "designer", "critic_sounding_board", "critic_drift_verifier", "critic_hallucination_verifier", "curator_init", "curator_phase", "reviewer", "critic", "critic_oversight", "explorer", "coder", "test_engineer"];
7
+ export declare const OPENCODE_NATIVE_AGENTS: Set<"compaction" | "title" | "build" | "plan" | "general" | "explore" | "summary">;
7
8
  export type QAAgentName = (typeof QA_AGENTS)[number];
8
9
  export type PipelineAgentName = (typeof PIPELINE_AGENTS)[number];
9
10
  export type AgentName = (typeof ALL_AGENT_NAMES)[number];
@@ -1,10 +1,11 @@
1
1
  export interface ASTChange {
2
- type: 'added' | 'modified' | 'removed';
2
+ type: 'added' | 'modified' | 'removed' | 'renamed';
3
3
  category: 'function' | 'class' | 'type' | 'export' | 'import' | 'variable' | 'other';
4
4
  name: string;
5
5
  lineStart: number;
6
6
  lineEnd: number;
7
7
  signature?: string;
8
+ renamedFrom?: string;
8
9
  }
9
10
  export interface ASTDiffResult {
10
11
  filePath: string;
@@ -27,7 +27,7 @@ export interface ClassifiedChange {
27
27
  /** Name of the symbol (function, class, etc.) affected */
28
28
  symbolName: string;
29
29
  /** Type of change operation */
30
- changeType: 'added' | 'modified' | 'removed';
30
+ changeType: 'added' | 'modified' | 'removed' | 'renamed';
31
31
  /** Starting line number of the change */
32
32
  lineStart: number;
33
33
  /** Ending line number of the change */
@@ -36,6 +36,10 @@ export interface ClassifiedChange {
36
36
  description: string;
37
37
  /** Original AST change signature detail (if available) */
38
38
  signature?: string;
39
+ /** Original name before rename, if this is a renamed symbol */
40
+ renamedFrom?: string;
41
+ /** Number of files that depend on this file (blast radius indicator) */
42
+ consumersCount?: number;
39
43
  }
40
44
  /**
41
45
  * Classify an array of AST diff results into semantic categories with risk levels.
@@ -52,4 +56,4 @@ export interface ClassifiedChange {
52
56
  * }
53
57
  * ```
54
58
  */
55
- export declare function classifyChanges(astDiffs: ASTDiffResult[]): ClassifiedChange[];
59
+ export declare function classifyChanges(astDiffs: ASTDiffResult[], fileConsumers?: Record<string, number>): ClassifiedChange[];
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Semantic diff injection for the system-enhancer hook.
3
+ *
4
+ * Computes a semantic AST diff summary for changed files and produces
5
+ * a markdown block for injection into the reviewer agent's context.
6
+ *
7
+ * Failure mode: silent. If git is unavailable or AST diff fails,
8
+ * returns null — the reviewer simply doesn't get the extra context.
9
+ */
10
+ /**
11
+ * Build a semantic diff summary block for the given changed files.
12
+ *
13
+ * For each file:
14
+ * 1. Gets old content from git HEAD (cat-file -e check first)
15
+ * 2. Gets new content from working tree
16
+ * 3. Runs computeASTDiff
17
+ * 4. Collects all AST diffs
18
+ * 5. Builds fileConsumers map from repo graph (getImporters().length per file)
19
+ * 6. Runs classifyChanges with fileConsumers
20
+ * 7. Runs generateSummary + generateSummaryMarkdown
21
+ *
22
+ * Returns null if no changes are detected or on failure.
23
+ */
24
+ export declare function buildSemanticDiffBlock(directory: string, changedFiles: string[], maxFiles?: number): Promise<string | null>;