opencode-swarm 7.78.6 → 7.78.7

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/dist/cli/index.js CHANGED
@@ -52,7 +52,7 @@ var package_default;
52
52
  var init_package = __esm(() => {
53
53
  package_default = {
54
54
  name: "opencode-swarm",
55
- version: "7.78.6",
55
+ version: "7.78.7",
56
56
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
57
57
  main: "dist/index.js",
58
58
  types: "dist/index.d.ts",
@@ -83,3 +83,12 @@ export declare const CLAUDE_CODE_CONFLICTS: readonly [{
83
83
  export declare const CRITICAL_CONFLICTS: Set<string>;
84
84
  export declare const HIGH_CONFLICTS: Set<string>;
85
85
  export declare const CONFLICT_MAP: Map<string, CommandConflict>;
86
+ /**
87
+ * CC_COMMAND_MAP — maps CC command names (without leading /) to their CommandConflict entry.
88
+ * Used by cc-command-intercept hook to look up conflicts by the bare CC command name.
89
+ * E.g., 'plan' → CommandConflict for /plan, 'reset' → CommandConflict for /reset, 'clear' → CommandConflict for /clear
90
+ *
91
+ * Known aliases are registered below: /clear is documented as an alias for /reset
92
+ * (see /reset entry's `ccBehavior` field), so it must be intercepted identically.
93
+ */
94
+ export declare const CC_COMMAND_MAP: Map<string, CommandConflict>;
package/dist/index.js CHANGED
@@ -69,7 +69,7 @@ var package_default;
69
69
  var init_package = __esm(() => {
70
70
  package_default = {
71
71
  name: "opencode-swarm",
72
- version: "7.78.6",
72
+ version: "7.78.7",
73
73
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
74
74
  main: "dist/index.js",
75
75
  types: "dist/index.d.ts",
@@ -70944,17 +70944,6 @@ var init_curate = __esm(() => {
70944
70944
  });
70945
70945
 
70946
70946
  // src/tools/co-change-analyzer.ts
70947
- var exports_co_change_analyzer = {};
70948
- __export(exports_co_change_analyzer, {
70949
- parseGitLog: () => parseGitLog,
70950
- getStaticEdges: () => getStaticEdges,
70951
- formatDarkMatterOutput: () => formatDarkMatterOutput,
70952
- detectDarkMatter: () => detectDarkMatter,
70953
- darkMatterToKnowledgeEntries: () => darkMatterToKnowledgeEntries,
70954
- co_change_analyzer: () => co_change_analyzer,
70955
- buildCoChangeMatrix: () => buildCoChangeMatrix,
70956
- _internals: () => _internals36
70957
- });
70958
70947
  import * as child_process3 from "node:child_process";
70959
70948
  import { randomUUID as randomUUID5 } from "node:crypto";
70960
70949
  import { readdir as readdir4, readFile as readFile16, stat as stat8 } from "node:fs/promises";
@@ -106482,6 +106471,14 @@ var CLAUDE_CODE_CONFLICTS = [
106482
106471
  var CRITICAL_CONFLICTS = new Set(CLAUDE_CODE_CONFLICTS.filter((c) => c.severity === "CRITICAL").map((c) => c.swarmCommand));
106483
106472
  var HIGH_CONFLICTS = new Set(CLAUDE_CODE_CONFLICTS.filter((c) => c.severity === "HIGH").map((c) => c.swarmCommand));
106484
106473
  var CONFLICT_MAP = new Map(CLAUDE_CODE_CONFLICTS.map((c) => [c.swarmCommand, c]));
106474
+ var CC_COMMAND_MAP = new Map;
106475
+ for (const conflict of CLAUDE_CODE_CONFLICTS) {
106476
+ const ccCommandName = conflict.ccCommand.replace(/^\//, "").toLowerCase();
106477
+ CC_COMMAND_MAP.set(ccCommandName, conflict);
106478
+ if (ccCommandName === "reset") {
106479
+ CC_COMMAND_MAP.set("clear", conflict);
106480
+ }
106481
+ }
106485
106482
 
106486
106483
  // src/hooks/cc-command-intercept.ts
106487
106484
  init_constants();
@@ -106547,8 +106544,7 @@ function createCcCommandInterceptHook(config3 = {}) {
106547
106544
  continue;
106548
106545
  }
106549
106546
  const bareCmd = bareCmdMatch[1].toLowerCase();
106550
- const effectiveCmd = bareCmd === "clear" ? "reset" : bareCmd;
106551
- const conflict = CONFLICT_MAP.get(effectiveCmd);
106547
+ const conflict = CC_COMMAND_MAP.get(bareCmd);
106552
106548
  if (!conflict) {
106553
106549
  if (CLAUDE_CODE_NATIVE_COMMANDS.has(bareCmd)) {
106554
106550
  if (logIntercepts) {
@@ -111458,6 +111454,7 @@ init_status_service();
111458
111454
 
111459
111455
  // src/hooks/system-enhancer.ts
111460
111456
  init_telemetry();
111457
+ init_co_change_analyzer();
111461
111458
  init_utils();
111462
111459
 
111463
111460
  // src/hooks/adversarial-detector.ts
@@ -113111,34 +113108,29 @@ function createSystemEnhancerHook(config3, directory) {
113111
113108
  try {
113112
113109
  const darkMatterPath = validateSwarmPath(directory, "dark-matter.md");
113113
113110
  if (!fs69.existsSync(darkMatterPath)) {
113114
- const {
113115
- detectDarkMatter: detectDarkMatter2,
113116
- formatDarkMatterOutput: formatDarkMatterOutput2,
113117
- darkMatterToKnowledgeEntries: darkMatterToKnowledgeEntries2
113118
- } = await Promise.resolve().then(() => (init_co_change_analyzer(), exports_co_change_analyzer));
113119
- const darkMatter = await detectDarkMatter2(directory, {
113111
+ const darkMatter = await _internals36.detectDarkMatter(directory, {
113120
113112
  minCommits: 20,
113121
113113
  minCoChanges: 3
113122
113114
  });
113123
113115
  await fs69.promises.mkdir(path122.dirname(darkMatterPath), {
113124
113116
  recursive: true
113125
113117
  });
113126
- const darkMatterReport = formatDarkMatterOutput2(darkMatter);
113118
+ const darkMatterReport = _internals36.formatDarkMatterOutput(darkMatter);
113127
113119
  await fs69.promises.writeFile(darkMatterPath, darkMatterReport, "utf-8");
113128
113120
  warn(`[system-enhancer] Dark matter scan complete: ${darkMatter.length} co-change patterns found`);
113129
113121
  if (darkMatter.length > 0) {
113130
113122
  try {
113131
113123
  const projectName = path122.basename(path122.resolve(directory));
113132
- const knowledgeEntries = darkMatterToKnowledgeEntries2(darkMatter, projectName);
113133
- const knowledgePath = resolveSwarmKnowledgePath(directory);
113134
- const existingEntries = await readKnowledge(knowledgePath);
113124
+ const knowledgeEntries = _internals36.darkMatterToKnowledgeEntries(darkMatter, projectName);
113125
+ const knowledgePath = _internals23.resolveSwarmKnowledgePath(directory);
113126
+ const existingEntries = await _internals23.readKnowledge(knowledgePath);
113135
113127
  const existingLessons = new Set(existingEntries.map((e) => e.lesson));
113136
113128
  const newEntries = knowledgeEntries.filter((e) => !existingLessons.has(e.lesson) && validateActionability(e).actionable);
113137
113129
  if (newEntries.length === 0) {
113138
113130
  warn(`[system-enhancer] No new knowledge entries (all duplicates)`);
113139
113131
  } else {
113140
113132
  for (const entry of newEntries) {
113141
- await appendKnowledge(knowledgePath, entry);
113133
+ await _internals23.appendKnowledge(knowledgePath, entry);
113142
113134
  }
113143
113135
  warn(`[system-enhancer] Created ${newEntries.length} new knowledge entries (${knowledgeEntries.length - newEntries.length} duplicates skipped)`);
113144
113136
  }
@@ -113148,15 +113140,15 @@ function createSystemEnhancerHook(config3, directory) {
113148
113140
  }
113149
113141
  }
113150
113142
  try {
113151
- const knowledgePath = resolveSwarmKnowledgePath(directory);
113152
- const allEntries = await readKnowledge(knowledgePath);
113143
+ const knowledgePath = _internals23.resolveSwarmKnowledgePath(directory);
113144
+ const allEntries = await _internals23.readKnowledge(knowledgePath);
113153
113145
  const stale = allEntries.filter((e) => e.scope === "project" && e.auto_generated === true && Array.isArray(e.tags) && e.tags.includes("dark-matter"));
113154
113146
  if (stale.length > 0) {
113155
113147
  for (const e of stale) {
113156
113148
  e.scope = "global";
113157
113149
  e.updated_at = new Date().toISOString();
113158
113150
  }
113159
- await rewriteKnowledge(knowledgePath, allEntries);
113151
+ await _internals23.rewriteKnowledge(knowledgePath, allEntries);
113160
113152
  warn(`[system-enhancer] Repaired ${stale.length} dark matter knowledge entries (scope: 'project' → 'global')`);
113161
113153
  }
113162
113154
  } catch {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.78.6",
3
+ "version": "7.78.7",
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",