opencode-swarm 7.44.0 → 7.44.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/dist/cli/index.js +45 -14
- package/dist/index.js +45 -14
- package/package.json +1 -1
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.44.
|
|
55
|
+
version: "7.44.1",
|
|
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",
|
|
@@ -51529,6 +51529,19 @@ import path41 from "path";
|
|
|
51529
51529
|
function normalizePath(p) {
|
|
51530
51530
|
return p.replace(/\\/g, "/");
|
|
51531
51531
|
}
|
|
51532
|
+
function sharedTrailingSegments(a, b) {
|
|
51533
|
+
const aParts = normalizePath(a).split("/").filter(Boolean);
|
|
51534
|
+
const bParts = normalizePath(b).split("/").filter(Boolean);
|
|
51535
|
+
let i = aParts.length - 1;
|
|
51536
|
+
let j = bParts.length - 1;
|
|
51537
|
+
let shared = 0;
|
|
51538
|
+
while (i >= 0 && j >= 0 && aParts[i] === bParts[j]) {
|
|
51539
|
+
shared++;
|
|
51540
|
+
i--;
|
|
51541
|
+
j--;
|
|
51542
|
+
}
|
|
51543
|
+
return shared;
|
|
51544
|
+
}
|
|
51532
51545
|
function isCacheStale(impactMap, generatedAtMs) {
|
|
51533
51546
|
for (const sourcePath of Object.keys(impactMap)) {
|
|
51534
51547
|
try {
|
|
@@ -51856,25 +51869,43 @@ async function analyzeImpact(changedFiles, cwd, budget) {
|
|
|
51856
51869
|
if (budgetExceeded)
|
|
51857
51870
|
break;
|
|
51858
51871
|
} else {
|
|
51859
|
-
|
|
51860
|
-
|
|
51872
|
+
const changedDir = normalizePath(path41.dirname(normalizedChanged));
|
|
51873
|
+
const changedInputDir = normalizePath(path41.dirname(changedFile));
|
|
51874
|
+
const suffixMatches = Object.entries(impactMap).filter(([sourcePath]) => {
|
|
51875
|
+
return sourcePath.endsWith(changedFile) || changedFile.endsWith(sourcePath) || sourcePath.endsWith(normalizedChanged) || normalizedChanged.endsWith(sourcePath);
|
|
51876
|
+
}).sort(([sourceA], [sourceB]) => {
|
|
51877
|
+
const sourceDirA = normalizePath(path41.dirname(sourceA));
|
|
51878
|
+
const sourceDirB = normalizePath(path41.dirname(sourceB));
|
|
51879
|
+
const exactA = sourceDirA === changedDir || changedInputDir !== "." && (sourceDirA === changedInputDir || sourceDirA.endsWith(`/${changedInputDir}`));
|
|
51880
|
+
const exactB = sourceDirB === changedDir || changedInputDir !== "." && (sourceDirB === changedInputDir || sourceDirB.endsWith(`/${changedInputDir}`));
|
|
51881
|
+
if (exactA !== exactB)
|
|
51882
|
+
return exactA ? -1 : 1;
|
|
51883
|
+
const sharedA = Math.max(sharedTrailingSegments(sourceDirA, changedDir), changedInputDir === "." ? 0 : sharedTrailingSegments(sourceDirA, changedInputDir));
|
|
51884
|
+
const sharedB = Math.max(sharedTrailingSegments(sourceDirB, changedDir), changedInputDir === "." ? 0 : sharedTrailingSegments(sourceDirB, changedInputDir));
|
|
51885
|
+
const nearestA = sharedA > 0;
|
|
51886
|
+
const nearestB = sharedB > 0;
|
|
51887
|
+
if (nearestA !== nearestB)
|
|
51888
|
+
return nearestA ? -1 : 1;
|
|
51889
|
+
if (sharedA !== sharedB)
|
|
51890
|
+
return sharedB - sharedA;
|
|
51891
|
+
return sourceA.localeCompare(sourceB);
|
|
51892
|
+
});
|
|
51893
|
+
const found = suffixMatches.length > 0;
|
|
51894
|
+
for (const [, tests2] of suffixMatches) {
|
|
51861
51895
|
if (budget !== undefined && visitedCount >= budget) {
|
|
51862
51896
|
budgetExceeded = true;
|
|
51863
51897
|
break;
|
|
51864
51898
|
}
|
|
51865
|
-
|
|
51866
|
-
|
|
51867
|
-
|
|
51868
|
-
budgetExceeded = true;
|
|
51869
|
-
break;
|
|
51870
|
-
}
|
|
51871
|
-
impactedTestsSet.add(test);
|
|
51872
|
-
visitedCount++;
|
|
51873
|
-
}
|
|
51874
|
-
if (budgetExceeded)
|
|
51899
|
+
for (const test of tests2) {
|
|
51900
|
+
if (budget !== undefined && visitedCount >= budget) {
|
|
51901
|
+
budgetExceeded = true;
|
|
51875
51902
|
break;
|
|
51876
|
-
|
|
51903
|
+
}
|
|
51904
|
+
impactedTestsSet.add(test);
|
|
51905
|
+
visitedCount++;
|
|
51877
51906
|
}
|
|
51907
|
+
if (budgetExceeded)
|
|
51908
|
+
break;
|
|
51878
51909
|
}
|
|
51879
51910
|
if (budgetExceeded)
|
|
51880
51911
|
break;
|
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.44.
|
|
72
|
+
version: "7.44.1",
|
|
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",
|
|
@@ -74499,6 +74499,19 @@ import path54 from "node:path";
|
|
|
74499
74499
|
function normalizePath(p) {
|
|
74500
74500
|
return p.replace(/\\/g, "/");
|
|
74501
74501
|
}
|
|
74502
|
+
function sharedTrailingSegments(a, b) {
|
|
74503
|
+
const aParts = normalizePath(a).split("/").filter(Boolean);
|
|
74504
|
+
const bParts = normalizePath(b).split("/").filter(Boolean);
|
|
74505
|
+
let i2 = aParts.length - 1;
|
|
74506
|
+
let j = bParts.length - 1;
|
|
74507
|
+
let shared = 0;
|
|
74508
|
+
while (i2 >= 0 && j >= 0 && aParts[i2] === bParts[j]) {
|
|
74509
|
+
shared++;
|
|
74510
|
+
i2--;
|
|
74511
|
+
j--;
|
|
74512
|
+
}
|
|
74513
|
+
return shared;
|
|
74514
|
+
}
|
|
74502
74515
|
function isCacheStale(impactMap, generatedAtMs) {
|
|
74503
74516
|
for (const sourcePath of Object.keys(impactMap)) {
|
|
74504
74517
|
try {
|
|
@@ -74826,25 +74839,43 @@ async function analyzeImpact(changedFiles, cwd, budget) {
|
|
|
74826
74839
|
if (budgetExceeded)
|
|
74827
74840
|
break;
|
|
74828
74841
|
} else {
|
|
74829
|
-
|
|
74830
|
-
|
|
74842
|
+
const changedDir = normalizePath(path54.dirname(normalizedChanged));
|
|
74843
|
+
const changedInputDir = normalizePath(path54.dirname(changedFile));
|
|
74844
|
+
const suffixMatches = Object.entries(impactMap).filter(([sourcePath]) => {
|
|
74845
|
+
return sourcePath.endsWith(changedFile) || changedFile.endsWith(sourcePath) || sourcePath.endsWith(normalizedChanged) || normalizedChanged.endsWith(sourcePath);
|
|
74846
|
+
}).sort(([sourceA], [sourceB]) => {
|
|
74847
|
+
const sourceDirA = normalizePath(path54.dirname(sourceA));
|
|
74848
|
+
const sourceDirB = normalizePath(path54.dirname(sourceB));
|
|
74849
|
+
const exactA = sourceDirA === changedDir || changedInputDir !== "." && (sourceDirA === changedInputDir || sourceDirA.endsWith(`/${changedInputDir}`));
|
|
74850
|
+
const exactB = sourceDirB === changedDir || changedInputDir !== "." && (sourceDirB === changedInputDir || sourceDirB.endsWith(`/${changedInputDir}`));
|
|
74851
|
+
if (exactA !== exactB)
|
|
74852
|
+
return exactA ? -1 : 1;
|
|
74853
|
+
const sharedA = Math.max(sharedTrailingSegments(sourceDirA, changedDir), changedInputDir === "." ? 0 : sharedTrailingSegments(sourceDirA, changedInputDir));
|
|
74854
|
+
const sharedB = Math.max(sharedTrailingSegments(sourceDirB, changedDir), changedInputDir === "." ? 0 : sharedTrailingSegments(sourceDirB, changedInputDir));
|
|
74855
|
+
const nearestA = sharedA > 0;
|
|
74856
|
+
const nearestB = sharedB > 0;
|
|
74857
|
+
if (nearestA !== nearestB)
|
|
74858
|
+
return nearestA ? -1 : 1;
|
|
74859
|
+
if (sharedA !== sharedB)
|
|
74860
|
+
return sharedB - sharedA;
|
|
74861
|
+
return sourceA.localeCompare(sourceB);
|
|
74862
|
+
});
|
|
74863
|
+
const found = suffixMatches.length > 0;
|
|
74864
|
+
for (const [, tests2] of suffixMatches) {
|
|
74831
74865
|
if (budget !== undefined && visitedCount >= budget) {
|
|
74832
74866
|
budgetExceeded = true;
|
|
74833
74867
|
break;
|
|
74834
74868
|
}
|
|
74835
|
-
|
|
74836
|
-
|
|
74837
|
-
|
|
74838
|
-
budgetExceeded = true;
|
|
74839
|
-
break;
|
|
74840
|
-
}
|
|
74841
|
-
impactedTestsSet.add(test);
|
|
74842
|
-
visitedCount++;
|
|
74843
|
-
}
|
|
74844
|
-
if (budgetExceeded)
|
|
74869
|
+
for (const test of tests2) {
|
|
74870
|
+
if (budget !== undefined && visitedCount >= budget) {
|
|
74871
|
+
budgetExceeded = true;
|
|
74845
74872
|
break;
|
|
74846
|
-
|
|
74873
|
+
}
|
|
74874
|
+
impactedTestsSet.add(test);
|
|
74875
|
+
visitedCount++;
|
|
74847
74876
|
}
|
|
74877
|
+
if (budgetExceeded)
|
|
74878
|
+
break;
|
|
74848
74879
|
}
|
|
74849
74880
|
if (budgetExceeded)
|
|
74850
74881
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.44.
|
|
3
|
+
"version": "7.44.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",
|