opencode-swarm 6.19.3 → 6.19.4
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 +4 -4
- package/dist/index.js +10 -8
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -31634,14 +31634,14 @@ function parseContextMd(content) {
|
|
|
31634
31634
|
function splitIntoSections(content) {
|
|
31635
31635
|
const sections = [];
|
|
31636
31636
|
const headingRegex = /^(#{1,3})\s+(.+)/gm;
|
|
31637
|
-
const lastIndex = 0;
|
|
31638
|
-
let match;
|
|
31639
31637
|
const matches = [];
|
|
31640
|
-
|
|
31638
|
+
let match = headingRegex.exec(content);
|
|
31639
|
+
while (match !== null) {
|
|
31641
31640
|
matches.push({
|
|
31642
31641
|
index: match.index,
|
|
31643
31642
|
heading: match[0]
|
|
31644
31643
|
});
|
|
31644
|
+
match = headingRegex.exec(content);
|
|
31645
31645
|
}
|
|
31646
31646
|
for (let i = 0;i < matches.length; i++) {
|
|
31647
31647
|
const current = matches[i];
|
|
@@ -31691,7 +31691,7 @@ function inferCategoryFromText(text) {
|
|
|
31691
31691
|
function truncateLesson(text) {
|
|
31692
31692
|
if (text.length <= 280)
|
|
31693
31693
|
return text;
|
|
31694
|
-
return text.slice(0, 277)
|
|
31694
|
+
return `${text.slice(0, 277)}...`;
|
|
31695
31695
|
}
|
|
31696
31696
|
function inferProjectName(directory) {
|
|
31697
31697
|
const packageJsonPath = path8.join(directory, "package.json");
|
package/dist/index.js
CHANGED
|
@@ -43139,14 +43139,14 @@ function parseContextMd(content) {
|
|
|
43139
43139
|
function splitIntoSections(content) {
|
|
43140
43140
|
const sections = [];
|
|
43141
43141
|
const headingRegex = /^(#{1,3})\s+(.+)/gm;
|
|
43142
|
-
const lastIndex = 0;
|
|
43143
|
-
let match;
|
|
43144
43142
|
const matches = [];
|
|
43145
|
-
|
|
43143
|
+
let match = headingRegex.exec(content);
|
|
43144
|
+
while (match !== null) {
|
|
43146
43145
|
matches.push({
|
|
43147
43146
|
index: match.index,
|
|
43148
43147
|
heading: match[0]
|
|
43149
43148
|
});
|
|
43149
|
+
match = headingRegex.exec(content);
|
|
43150
43150
|
}
|
|
43151
43151
|
for (let i2 = 0;i2 < matches.length; i2++) {
|
|
43152
43152
|
const current = matches[i2];
|
|
@@ -43196,7 +43196,7 @@ function inferCategoryFromText(text) {
|
|
|
43196
43196
|
function truncateLesson(text) {
|
|
43197
43197
|
if (text.length <= 280)
|
|
43198
43198
|
return text;
|
|
43199
|
-
return text.slice(0, 277)
|
|
43199
|
+
return `${text.slice(0, 277)}...`;
|
|
43200
43200
|
}
|
|
43201
43201
|
function inferProjectName(directory) {
|
|
43202
43202
|
const packageJsonPath = path12.join(directory, "package.json");
|
|
@@ -45795,11 +45795,10 @@ function createGuardrailsHooks(directory, config3) {
|
|
|
45795
45795
|
const patchPathPattern = /\*\*\*\s+(?:Update|Add|Delete)\s+File:\s*(.+)/gi;
|
|
45796
45796
|
const diffPathPattern = /\+\+\+\s+b\/(.+)/gm;
|
|
45797
45797
|
const paths = new Set;
|
|
45798
|
-
|
|
45799
|
-
while ((match = patchPathPattern.exec(patchText)) !== null) {
|
|
45798
|
+
for (const match of patchText.matchAll(patchPathPattern)) {
|
|
45800
45799
|
paths.add(match[1].trim());
|
|
45801
45800
|
}
|
|
45802
|
-
|
|
45801
|
+
for (const match of patchText.matchAll(diffPathPattern)) {
|
|
45803
45802
|
const p = match[1].trim();
|
|
45804
45803
|
if (p !== "/dev/null")
|
|
45805
45804
|
paths.add(p);
|
|
@@ -48356,7 +48355,10 @@ function formatStars(confidence) {
|
|
|
48356
48355
|
return "\u2605\u2606\u2606";
|
|
48357
48356
|
}
|
|
48358
48357
|
function sanitizeLessonForContext(text) {
|
|
48359
|
-
return text.
|
|
48358
|
+
return text.split("").filter((char) => {
|
|
48359
|
+
const code = char.charCodeAt(0);
|
|
48360
|
+
return code === 9 || code === 10 || code === 13 || code > 31 && code !== 127;
|
|
48361
|
+
}).join("").replace(/[\u200B-\u200D\uFEFF]/g, "").replace(/[\u202A-\u202E\u2066-\u2069]/g, "").replace(/```/g, "` ` `").replace(/^system\s*:/gim, "[BLOCKED]:");
|
|
48360
48362
|
}
|
|
48361
48363
|
function isOrchestratorAgent(agentName) {
|
|
48362
48364
|
const stripped = stripKnownSwarmPrefix(agentName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.19.
|
|
3
|
+
"version": "6.19.4",
|
|
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",
|