opencode-swarm 7.33.1 → 7.33.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/dist/cli/index.js CHANGED
@@ -34,7 +34,7 @@ var package_default;
34
34
  var init_package = __esm(() => {
35
35
  package_default = {
36
36
  name: "opencode-swarm",
37
- version: "7.33.1",
37
+ version: "7.33.2",
38
38
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
39
39
  main: "dist/index.js",
40
40
  types: "dist/index.d.ts",
@@ -39023,14 +39023,16 @@ async function parseGitLog(directory, maxCommits) {
39023
39023
  }
39024
39024
  return commitMap;
39025
39025
  }
39026
- function buildCoChangeMatrix(commitMap) {
39026
+ function buildCoChangeMatrix(commitMap, maxFilesPerCommit = 500) {
39027
39027
  const matrix = new Map;
39028
39028
  const fileCommitCount = new Map;
39029
39029
  for (const files of commitMap.values()) {
39030
- const fileArray = Array.from(files).sort();
39031
- for (const file3 of fileArray) {
39030
+ for (const file3 of files) {
39032
39031
  fileCommitCount.set(file3, (fileCommitCount.get(file3) || 0) + 1);
39033
39032
  }
39033
+ if (files.size > maxFilesPerCommit)
39034
+ continue;
39035
+ const fileArray = Array.from(files).sort();
39034
39036
  for (let i = 0;i < fileArray.length; i++) {
39035
39037
  for (let j = i + 1;j < fileArray.length; j++) {
39036
39038
  const fileA = fileArray[i];
@@ -39193,6 +39195,7 @@ async function detectDarkMatter(directory, options) {
39193
39195
  const minCoChanges = options?.minCoChanges ?? 3;
39194
39196
  const npmiThreshold = options?.npmiThreshold ?? 0.5;
39195
39197
  const maxCommitsToAnalyze = options?.maxCommitsToAnalyze ?? 500;
39198
+ const maxFilesPerCommit = options?.maxFilesPerCommit ?? 500;
39196
39199
  try {
39197
39200
  const { stdout } = await getExecFileAsync()("git", ["rev-list", "--count", "HEAD"], {
39198
39201
  cwd: directory,
@@ -39206,7 +39209,7 @@ async function detectDarkMatter(directory, options) {
39206
39209
  return [];
39207
39210
  }
39208
39211
  const commitMap = await _internals11.parseGitLog(directory, maxCommitsToAnalyze);
39209
- const matrix = _internals11.buildCoChangeMatrix(commitMap);
39212
+ const matrix = _internals11.buildCoChangeMatrix(commitMap, maxFilesPerCommit);
39210
39213
  const staticEdges = await _internals11.getStaticEdges(directory);
39211
39214
  const results = [];
39212
39215
  for (const entry of matrix.values()) {
package/dist/index.js CHANGED
@@ -48,7 +48,7 @@ var package_default;
48
48
  var init_package = __esm(() => {
49
49
  package_default = {
50
50
  name: "opencode-swarm",
51
- version: "7.33.1",
51
+ version: "7.33.2",
52
52
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
53
53
  main: "dist/index.js",
54
54
  types: "dist/index.d.ts",
@@ -59543,14 +59543,16 @@ async function parseGitLog(directory, maxCommits) {
59543
59543
  }
59544
59544
  return commitMap;
59545
59545
  }
59546
- function buildCoChangeMatrix(commitMap) {
59546
+ function buildCoChangeMatrix(commitMap, maxFilesPerCommit = 500) {
59547
59547
  const matrix = new Map;
59548
59548
  const fileCommitCount = new Map;
59549
59549
  for (const files of commitMap.values()) {
59550
- const fileArray = Array.from(files).sort();
59551
- for (const file3 of fileArray) {
59550
+ for (const file3 of files) {
59552
59551
  fileCommitCount.set(file3, (fileCommitCount.get(file3) || 0) + 1);
59553
59552
  }
59553
+ if (files.size > maxFilesPerCommit)
59554
+ continue;
59555
+ const fileArray = Array.from(files).sort();
59554
59556
  for (let i2 = 0;i2 < fileArray.length; i2++) {
59555
59557
  for (let j = i2 + 1;j < fileArray.length; j++) {
59556
59558
  const fileA = fileArray[i2];
@@ -59713,6 +59715,7 @@ async function detectDarkMatter(directory, options) {
59713
59715
  const minCoChanges = options?.minCoChanges ?? 3;
59714
59716
  const npmiThreshold = options?.npmiThreshold ?? 0.5;
59715
59717
  const maxCommitsToAnalyze = options?.maxCommitsToAnalyze ?? 500;
59718
+ const maxFilesPerCommit = options?.maxFilesPerCommit ?? 500;
59716
59719
  try {
59717
59720
  const { stdout } = await getExecFileAsync()("git", ["rev-list", "--count", "HEAD"], {
59718
59721
  cwd: directory,
@@ -59726,7 +59729,7 @@ async function detectDarkMatter(directory, options) {
59726
59729
  return [];
59727
59730
  }
59728
59731
  const commitMap = await _internals18.parseGitLog(directory, maxCommitsToAnalyze);
59729
- const matrix = _internals18.buildCoChangeMatrix(commitMap);
59732
+ const matrix = _internals18.buildCoChangeMatrix(commitMap, maxFilesPerCommit);
59730
59733
  const staticEdges = await _internals18.getStaticEdges(directory);
59731
59734
  const results = [];
59732
59735
  for (const entry of matrix.values()) {
@@ -92013,10 +92016,13 @@ function createSystemEnhancerHook(config3, directory) {
92013
92016
  minCommits: 20,
92014
92017
  minCoChanges: 3
92015
92018
  });
92016
- if (darkMatter && darkMatter.length > 0) {
92017
- const darkMatterReport = formatDarkMatterOutput2(darkMatter);
92018
- await fs54.promises.writeFile(darkMatterPath, darkMatterReport, "utf-8");
92019
- warn(`[system-enhancer] Dark matter scan complete: ${darkMatter.length} co-change patterns found`);
92019
+ await fs54.promises.mkdir(path81.dirname(darkMatterPath), {
92020
+ recursive: true
92021
+ });
92022
+ const darkMatterReport = formatDarkMatterOutput2(darkMatter);
92023
+ await fs54.promises.writeFile(darkMatterPath, darkMatterReport, "utf-8");
92024
+ warn(`[system-enhancer] Dark matter scan complete: ${darkMatter.length} co-change patterns found`);
92025
+ if (darkMatter.length > 0) {
92020
92026
  try {
92021
92027
  const projectName = path81.basename(path81.resolve(directory));
92022
92028
  const knowledgeEntries = darkMatterToKnowledgeEntries2(darkMatter, projectName);
@@ -16,6 +16,7 @@ export interface DarkMatterOptions {
16
16
  minCoChanges?: number;
17
17
  npmiThreshold?: number;
18
18
  maxCommitsToAnalyze?: number;
19
+ maxFilesPerCommit?: number;
19
20
  }
20
21
  /**
21
22
  * Parses git log to extract commit -> files mapping.
@@ -25,7 +26,7 @@ export declare function parseGitLog(directory: string, maxCommits: number): Prom
25
26
  /**
26
27
  * Builds co-change matrix from commit -> files mapping.
27
28
  */
28
- export declare function buildCoChangeMatrix(commitMap: Map<string, Set<string>>): Map<string, CoChangeEntry>;
29
+ export declare function buildCoChangeMatrix(commitMap: Map<string, Set<string>>, maxFilesPerCommit?: number): Map<string, CoChangeEntry>;
29
30
  /**
30
31
  * Detects static import edges between files.
31
32
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.33.1",
3
+ "version": "7.33.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",