opencode-swarm 7.0.3 → 7.1.0
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/agents/coder.test.d.ts +1 -0
- package/dist/agents/reviewer.test.d.ts +1 -0
- package/dist/cli/index.js +1 -1
- package/dist/index.js +137 -16
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/cli/index.js
CHANGED
|
@@ -18911,7 +18911,7 @@ import * as path35 from "path";
|
|
|
18911
18911
|
// package.json
|
|
18912
18912
|
var package_default = {
|
|
18913
18913
|
name: "opencode-swarm",
|
|
18914
|
-
version: "7.0
|
|
18914
|
+
version: "7.1.0",
|
|
18915
18915
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
18916
18916
|
main: "dist/index.js",
|
|
18917
18917
|
types: "dist/index.d.ts",
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var package_default;
|
|
|
33
33
|
var init_package = __esm(() => {
|
|
34
34
|
package_default = {
|
|
35
35
|
name: "opencode-swarm",
|
|
36
|
-
version: "7.0
|
|
36
|
+
version: "7.1.0",
|
|
37
37
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
38
38
|
main: "dist/index.js",
|
|
39
39
|
types: "dist/index.d.ts",
|
|
@@ -56210,6 +56210,7 @@ VERIFICATION PROTOCOL: After the coder reports DONE, and before running Stage B
|
|
|
56210
56210
|
|
|
56211
56211
|
── STAGE B: AGENT REVIEW GATES ──
|
|
56212
56212
|
{{AGENT_PREFIX}}reviewer → security reviewer (conditional) → {{AGENT_PREFIX}}test_engineer verification → {{AGENT_PREFIX}}test_engineer adversarial → coverage check
|
|
56213
|
+
The reviewer's verdict MUST include a REUSE_RE_VERIFICATION field — do NOT accept an APPROVED verdict without it. Validate the field value against context: if the coder's EXPORTS_ADDED was non-empty, REUSE_RE_VERIFICATION must be VERIFIED or DUPLICATION_DETECTED (not SKIPPED). If EXPORTS_ADDED was "none", REUSE_RE_VERIFICATION must be SKIPPED.
|
|
56213
56214
|
Stage B runs by default for TIER 1-3 classifications. Stage A passing does not satisfy Stage B.
|
|
56214
56215
|
Stage B is where logic errors, security flaws, edge cases, and behavioral bugs are caught.
|
|
56215
56216
|
You MUST delegate to each Stage B agent and wait for their response.
|
|
@@ -56307,6 +56308,7 @@ ANTI-RATIONALIZATION GATE — gates are mandatory for ALL changes, no exceptions
|
|
|
56307
56308
|
✗ "just a rename" → Renames break callers. Reviewer is required.
|
|
56308
56309
|
✗ "pre_check_batch will catch any issues" → pre_check_batch catches lint/SAST/secrets. It does NOT catch logic errors or edge cases.
|
|
56309
56310
|
✗ "authors are blind to their own mistakes" is WHY the reviewer exists — your certainty about correctness is irrelevant.
|
|
56311
|
+
✗ "Reviewer APPROVED so I'll skip checking the REUSE_RE_VERIFICATION field" → RIGHT: "I verified that the reviewer's verdict includes REUSE_RE_VERIFICATION before accepting the APPROVED"
|
|
56310
56312
|
<!-- BEHAVIORAL_GUIDANCE_END -->
|
|
56311
56313
|
|
|
56312
56314
|
8. **COVERAGE CHECK**: After adversarial tests pass, check if test_engineer reports coverage < 70%. If so, delegate {{AGENT_PREFIX}}test_engineer for an additional test pass targeting uncovered paths. This is a soft guideline; use judgment for trivial tasks.
|
|
@@ -57252,6 +57254,7 @@ This step supplements (not replaces) the existing regression-sweep and test-drif
|
|
|
57252
57254
|
[TOOL] build_check: PASS / SKIPPED — value: ___
|
|
57253
57255
|
[TOOL] pre_check_batch: PASS (lint:check ✓ secretscan ✓ sast_scan ✓ quality_budget ✓) — value: ___
|
|
57254
57256
|
[GATE] reviewer: APPROVED — value: ___
|
|
57257
|
+
[GATE] reuse_re_verification: VERIFIED / SKIPPED / DUPLICATION_DETECTED — value: ___
|
|
57255
57258
|
[GATE] security-reviewer: APPROVED / SKIPPED — value: ___
|
|
57256
57259
|
[GATE] test_engineer-verification: PASS — value: ___
|
|
57257
57260
|
[GATE] regression-sweep: PASS / SKIPPED — value: ___
|
|
@@ -57467,6 +57470,42 @@ RIGHT: [search first, then] import { saveEvidence } from '../evidence/manager' (
|
|
|
57467
57470
|
|
|
57468
57471
|
If available_symbols was provided in your scope declaration, you MUST only call functions from that list when importing from existing project modules. Do not invent function names that are not in the list.
|
|
57469
57472
|
|
|
57473
|
+
## REUSE SCAN PROTOCOL (MANDATORY)
|
|
57474
|
+
Before writing ANY new function, utility, class, hook, helper, or type:
|
|
57475
|
+
|
|
57476
|
+
1. SCAN: Use the search tool to check for conceptually similar implementations in:
|
|
57477
|
+
- src/utils/
|
|
57478
|
+
- src/hooks/
|
|
57479
|
+
- src/tools/
|
|
57480
|
+
- src/services/
|
|
57481
|
+
- Any directory named lib/, shared/, helpers/, or common/
|
|
57482
|
+
|
|
57483
|
+
Search queries must be SEMANTIC, not just literal. For a "path normalizer" function,
|
|
57484
|
+
search for: normalize path, resolve path, join path, cross-platform path — not just
|
|
57485
|
+
the exact function name you are about to write.
|
|
57486
|
+
|
|
57487
|
+
2. READ: If any candidate result exists, read that file. Determine if it:
|
|
57488
|
+
- Already implements the behavior you need (REUSE IT — do not reimplement)
|
|
57489
|
+
- Partially implements it (EXTEND IT — do not duplicate)
|
|
57490
|
+
- Is unrelated (PROCEED to write new code)
|
|
57491
|
+
|
|
57492
|
+
3. REPORT: In your completion output, include a REUSE_SCAN field:
|
|
57493
|
+
REUSE_SCAN: [EXISTING_REUSED | EXTENDED | NO_MATCH_FOUND | SCAN_NOT_APPLICABLE]
|
|
57494
|
+
With a one-line explanation for each new function/class you wrote.
|
|
57495
|
+
|
|
57496
|
+
AUTOMATIC REJECTION CONDITIONS:
|
|
57497
|
+
- If you write a function that already exists under a different name in the project
|
|
57498
|
+
- If you write a utility that duplicates behavior in an existing file you did not read
|
|
57499
|
+
- If REUSE_SCAN is missing from your completion output when new functions were created
|
|
57500
|
+
|
|
57501
|
+
SCAN_NOT_APPLICABLE is only valid when:
|
|
57502
|
+
- The task is modifying an existing function (not creating new ones)
|
|
57503
|
+
- The task is purely adding types with no behavioral logic
|
|
57504
|
+
- The task explicitly states "create new, no reuse" with architect justification
|
|
57505
|
+
|
|
57506
|
+
The Reviewer WILL independently re-run this scan. Omitting it does not save time —
|
|
57507
|
+
it guarantees rejection.
|
|
57508
|
+
|
|
57470
57509
|
## DEFENSIVE CODING RULES
|
|
57471
57510
|
- NEVER use \`any\` type in TypeScript — always use specific types
|
|
57472
57511
|
- NEVER leave empty catch blocks — at minimum log the error
|
|
@@ -57530,6 +57569,7 @@ EXPORTS_ADDED: [new exported functions/types/classes, or "none"]
|
|
|
57530
57569
|
EXPORTS_REMOVED: [removed exports, or "none"]
|
|
57531
57570
|
EXPORTS_MODIFIED: [exports with changed signatures, or "none"]
|
|
57532
57571
|
DEPS_ADDED: [new external package imports, or "none"]
|
|
57572
|
+
REUSE_SCAN: [EXISTING_REUSED | EXTENDED | NO_MATCH_FOUND | SCAN_NOT_APPLICABLE] — [explanation per new function]
|
|
57533
57573
|
BLOCKED: [what went wrong]
|
|
57534
57574
|
NEED: [what additional context or change would fix it]
|
|
57535
57575
|
|
|
@@ -57545,6 +57585,7 @@ Output only one of these structured templates:
|
|
|
57545
57585
|
EXPORTS_REMOVED: [removed exports, or "none"]
|
|
57546
57586
|
EXPORTS_MODIFIED: [exports with changed signatures, or "none"]
|
|
57547
57587
|
DEPS_ADDED: [new external package imports, or "none"]
|
|
57588
|
+
REUSE_SCAN: [EXISTING_REUSED | EXTENDED | NO_MATCH_FOUND | SCAN_NOT_APPLICABLE] — [explanation per new function]
|
|
57548
57589
|
SELF-AUDIT: [print the checklist below with [x]/[ ] status for every line]
|
|
57549
57590
|
- Blocked task:
|
|
57550
57591
|
BLOCKED: [what went wrong]
|
|
@@ -57583,6 +57624,7 @@ Before you report task completion, verify:
|
|
|
57583
57624
|
[ ] I did not use vague identifier names (result, data, temp, value, item, info, stuff, obj, ret, val)
|
|
57584
57625
|
[ ] I did not write empty or tautological comments (e.g., "// sets the value", "// constructor", "// handle error")
|
|
57585
57626
|
[ ] I did not leave placeholder JSDoc/docstring @param descriptions blank or copy-paste identical descriptions across functions
|
|
57627
|
+
[ ] I ran a reuse scan for every new function/class I created and included REUSE_SCAN in my output
|
|
57586
57628
|
If ANY box is unchecked, fix it before reporting completion.
|
|
57587
57629
|
Print this checklist with your completion report.
|
|
57588
57630
|
|
|
@@ -58731,6 +58773,32 @@ DO (explicitly):
|
|
|
58731
58773
|
- VERIFY platform compatibility: path.join() used for all paths, no hardcoded separators
|
|
58732
58774
|
- For confirmed issues requiring a concrete fix: use suggest_patch to produce a structured patch artifact for the coder
|
|
58733
58775
|
|
|
58776
|
+
## REUSE RE-VERIFICATION (MANDATORY FOR NEW EXPORTS)
|
|
58777
|
+
|
|
58778
|
+
When EXPORTS_ADDED is non-empty in the coder's completion report:
|
|
58779
|
+
|
|
58780
|
+
1. For EACH new export listed, independently run the search tool using semantic queries
|
|
58781
|
+
against src/utils/, src/hooks/, src/tools/, src/services/, and any lib/shared/ directories.
|
|
58782
|
+
|
|
58783
|
+
2. Use AT LEAST 3 different search queries per new export — varying the concept, not just
|
|
58784
|
+
the exact name. If the coder named their function \`normalizePath\`, also search for:
|
|
58785
|
+
\`resolve path\`, \`join path segments\`, \`cross-platform path\`, and similar synonyms.
|
|
58786
|
+
|
|
58787
|
+
3. If you find a pre-existing function/class that implements the same behavior:
|
|
58788
|
+
- Report as DUPLICATION_DETECTED: [new export name] duplicates [existing path:line]
|
|
58789
|
+
- REJECT immediately — this is a Tier 1 CORRECTNESS failure
|
|
58790
|
+
- Do NOT proceed to Tier 2 or Tier 3
|
|
58791
|
+
|
|
58792
|
+
4. If no match is found after semantic search: report REUSE_RE_VERIFICATION: VERIFIED — NO_DUPLICATE_FOUND
|
|
58793
|
+
|
|
58794
|
+
5. Cross-check the coder's REUSE_SCAN report against your own findings:
|
|
58795
|
+
- If coder reported EXISTING_REUSED or EXTENDED but you find a true duplicate: REJECT
|
|
58796
|
+
- If coder reported SCAN_NOT_APPLICABLE while EXPORTS_ADDED is non-empty: REJECT — coder created new exports but claimed no scan was needed (contradiction)
|
|
58797
|
+
- If coder reported NO_MATCH_FOUND and you also find none: REUSE_RE_VERIFICATION: VERIFIED — NO_DUPLICATE_FOUND
|
|
58798
|
+
|
|
58799
|
+
If EXPORTS_ADDED is "none", this section is skipped. Note that you skipped it:
|
|
58800
|
+
REUSE_RE_VERIFICATION: SKIPPED (no new exports)
|
|
58801
|
+
|
|
58734
58802
|
## REVIEW REASONING
|
|
58735
58803
|
For each changed function or method, answer these before formulating issues:
|
|
58736
58804
|
1. PRECONDITIONS: What must be true for this code to work correctly?
|
|
@@ -58793,7 +58861,9 @@ Code style, naming, duplication, test coverage, documentation completeness. This
|
|
|
58793
58861
|
|
|
58794
58862
|
VERDICT FORMAT:
|
|
58795
58863
|
APPROVED: Tier 1 PASS, Tier 2 PASS [, Tier 3 notes if any]
|
|
58864
|
+
REUSE_RE_VERIFICATION: [VERIFIED | SKIPPED]
|
|
58796
58865
|
REJECTED: Tier [1|2] FAIL — [first error description] — [specific fix instruction]
|
|
58866
|
+
REUSE_RE_VERIFICATION: [DUPLICATION_DETECTED | SKIPPED]
|
|
58797
58867
|
|
|
58798
58868
|
Do NOT approve with caveats. "APPROVED but fix X later" is not valid. Either it passes or it doesn't.
|
|
58799
58869
|
|
|
@@ -58813,6 +58883,7 @@ PROCESSING: If GATES is provided and includes passing results for lint, SAST, pl
|
|
|
58813
58883
|
Begin directly with VERDICT. Do NOT prepend "Here's my review..." or any conversational preamble.
|
|
58814
58884
|
|
|
58815
58885
|
VERDICT: APPROVED | REJECTED
|
|
58886
|
+
REUSE_RE_VERIFICATION: [VERIFIED | DUPLICATION_DETECTED | SKIPPED] — DUPLICATION_DETECTED is only valid when VERDICT is REJECTED
|
|
58816
58887
|
RISK: LOW | MEDIUM | HIGH | CRITICAL
|
|
58817
58888
|
ISSUES: list with line numbers, grouped by CHECK dimension
|
|
58818
58889
|
FIXES: required changes if rejected
|
|
@@ -72784,6 +72855,50 @@ function checkStaleImports(content, threshold) {
|
|
|
72784
72855
|
detail: `${staleImports.length} unused import identifier(s): ${staleImports.slice(0, 3).join(", ")}${staleImports.length > 3 ? "..." : ""}. Remove stale imports.`
|
|
72785
72856
|
};
|
|
72786
72857
|
}
|
|
72858
|
+
function checkDuplicateUtility(content, projectDir, startTime, targetFile) {
|
|
72859
|
+
const exportMatches = content.matchAll(/^\+(?:export)\s+(?:function|class|const|type|interface)\s+(\w{3,})/gm);
|
|
72860
|
+
const newExports = [];
|
|
72861
|
+
for (const match of exportMatches) {
|
|
72862
|
+
if (match[1])
|
|
72863
|
+
newExports.push(match[1]);
|
|
72864
|
+
}
|
|
72865
|
+
if (newExports.length === 0)
|
|
72866
|
+
return null;
|
|
72867
|
+
const deadline = startTime + 480;
|
|
72868
|
+
const utilityDirs = [
|
|
72869
|
+
"src/utils/",
|
|
72870
|
+
"src/hooks/",
|
|
72871
|
+
"src/tools/",
|
|
72872
|
+
"src/services/"
|
|
72873
|
+
];
|
|
72874
|
+
for (const utilDir of utilityDirs) {
|
|
72875
|
+
if (Date.now() > deadline)
|
|
72876
|
+
break;
|
|
72877
|
+
const utilPath = path66.join(projectDir, utilDir);
|
|
72878
|
+
if (!fs47.existsSync(utilPath))
|
|
72879
|
+
continue;
|
|
72880
|
+
const files = walkFiles(utilPath, [".ts", ".tsx", ".js", ".jsx"], deadline);
|
|
72881
|
+
for (const file3 of files) {
|
|
72882
|
+
if (Date.now() > deadline)
|
|
72883
|
+
break;
|
|
72884
|
+
if (targetFile && path66.resolve(file3) === path66.resolve(targetFile))
|
|
72885
|
+
continue;
|
|
72886
|
+
try {
|
|
72887
|
+
const text = fs47.readFileSync(file3, "utf-8");
|
|
72888
|
+
for (const name2 of newExports) {
|
|
72889
|
+
const exportPattern = new RegExp(`\\bexport\\s+(?:function|class|const|type|interface)\\s+${name2}\\b`);
|
|
72890
|
+
if (exportPattern.test(text)) {
|
|
72891
|
+
return {
|
|
72892
|
+
type: "duplicate_utility",
|
|
72893
|
+
detail: `New export "${name2}" already exists in ${utilDir}. Reuse the existing utility instead of duplicating it.`
|
|
72894
|
+
};
|
|
72895
|
+
}
|
|
72896
|
+
}
|
|
72897
|
+
} catch {}
|
|
72898
|
+
}
|
|
72899
|
+
}
|
|
72900
|
+
return null;
|
|
72901
|
+
}
|
|
72787
72902
|
function createSlopDetectorHook(config3, projectDir, injectSystemMessage) {
|
|
72788
72903
|
return {
|
|
72789
72904
|
toolAfter: async (input, output) => {
|
|
@@ -72805,6 +72920,7 @@ function createSlopDetectorHook(config3, projectDir, injectSystemMessage) {
|
|
|
72805
72920
|
})();
|
|
72806
72921
|
if (!content || content.length < 10)
|
|
72807
72922
|
return;
|
|
72923
|
+
const targetFilePath = typeof args2?.filePath === "string" ? args2.filePath : undefined;
|
|
72808
72924
|
const taskDescription = typeof args2?.description === "string" ? args2.description : typeof args2?.task === "string" ? args2.task : "";
|
|
72809
72925
|
const startTime = Date.now();
|
|
72810
72926
|
const findings = [];
|
|
@@ -72825,6 +72941,11 @@ function createSlopDetectorHook(config3, projectDir, injectSystemMessage) {
|
|
|
72825
72941
|
if (dead)
|
|
72826
72942
|
findings.push(dead);
|
|
72827
72943
|
} catch {}
|
|
72944
|
+
try {
|
|
72945
|
+
const dupUtil = checkDuplicateUtility(content, projectDir, startTime, targetFilePath);
|
|
72946
|
+
if (dupUtil)
|
|
72947
|
+
findings.push(dupUtil);
|
|
72948
|
+
} catch {}
|
|
72828
72949
|
}
|
|
72829
72950
|
try {
|
|
72830
72951
|
const stale = checkStaleImports(content, config3.importHygieneThreshold ?? 2);
|
|
@@ -78136,7 +78257,7 @@ init_create_tool();
|
|
|
78136
78257
|
var GITINGEST_TIMEOUT_MS = 1e4;
|
|
78137
78258
|
var GITINGEST_MAX_RESPONSE_BYTES = 5242880;
|
|
78138
78259
|
var GITINGEST_MAX_RETRIES = 2;
|
|
78139
|
-
var delay = (ms) => new Promise((
|
|
78260
|
+
var delay = (ms) => new Promise((resolve30) => setTimeout(resolve30, ms));
|
|
78140
78261
|
async function fetchGitingest(args2) {
|
|
78141
78262
|
for (let attempt = 0;attempt <= GITINGEST_MAX_RETRIES; attempt++) {
|
|
78142
78263
|
try {
|
|
@@ -80219,7 +80340,7 @@ async function runNpmAudit(directory) {
|
|
|
80219
80340
|
stderr: "pipe",
|
|
80220
80341
|
cwd: directory
|
|
80221
80342
|
});
|
|
80222
|
-
const timeoutPromise = new Promise((
|
|
80343
|
+
const timeoutPromise = new Promise((resolve31) => setTimeout(() => resolve31("timeout"), AUDIT_TIMEOUT_MS));
|
|
80223
80344
|
const result = await Promise.race([
|
|
80224
80345
|
Promise.all([proc.stdout.text(), proc.stderr.text()]).then(([stdout2, stderr2]) => ({ stdout: stdout2, stderr: stderr2 })),
|
|
80225
80346
|
timeoutPromise
|
|
@@ -80339,7 +80460,7 @@ async function runPipAudit(directory) {
|
|
|
80339
80460
|
stderr: "pipe",
|
|
80340
80461
|
cwd: directory
|
|
80341
80462
|
});
|
|
80342
|
-
const timeoutPromise = new Promise((
|
|
80463
|
+
const timeoutPromise = new Promise((resolve31) => setTimeout(() => resolve31("timeout"), AUDIT_TIMEOUT_MS));
|
|
80343
80464
|
const result = await Promise.race([
|
|
80344
80465
|
Promise.all([proc.stdout.text(), proc.stderr.text()]).then(([stdout2, stderr2]) => ({ stdout: stdout2, stderr: stderr2 })),
|
|
80345
80466
|
timeoutPromise
|
|
@@ -80467,7 +80588,7 @@ async function runCargoAudit(directory) {
|
|
|
80467
80588
|
stderr: "pipe",
|
|
80468
80589
|
cwd: directory
|
|
80469
80590
|
});
|
|
80470
|
-
const timeoutPromise = new Promise((
|
|
80591
|
+
const timeoutPromise = new Promise((resolve31) => setTimeout(() => resolve31("timeout"), AUDIT_TIMEOUT_MS));
|
|
80471
80592
|
const result = await Promise.race([
|
|
80472
80593
|
Promise.all([proc.stdout.text(), proc.stderr.text()]).then(([stdout2, stderr]) => ({ stdout: stdout2, stderr })),
|
|
80473
80594
|
timeoutPromise
|
|
@@ -80591,7 +80712,7 @@ async function runGoAudit(directory) {
|
|
|
80591
80712
|
stderr: "pipe",
|
|
80592
80713
|
cwd: directory
|
|
80593
80714
|
});
|
|
80594
|
-
const timeoutPromise = new Promise((
|
|
80715
|
+
const timeoutPromise = new Promise((resolve31) => setTimeout(() => resolve31("timeout"), AUDIT_TIMEOUT_MS));
|
|
80595
80716
|
const result = await Promise.race([
|
|
80596
80717
|
Promise.all([proc.stdout.text(), proc.stderr.text()]).then(([stdout2, stderr]) => ({ stdout: stdout2, stderr })),
|
|
80597
80718
|
timeoutPromise
|
|
@@ -80724,7 +80845,7 @@ async function runDotnetAudit(directory) {
|
|
|
80724
80845
|
stderr: "pipe",
|
|
80725
80846
|
cwd: directory
|
|
80726
80847
|
});
|
|
80727
|
-
const timeoutPromise = new Promise((
|
|
80848
|
+
const timeoutPromise = new Promise((resolve31) => setTimeout(() => resolve31("timeout"), AUDIT_TIMEOUT_MS));
|
|
80728
80849
|
const result = await Promise.race([
|
|
80729
80850
|
Promise.all([proc.stdout.text(), proc.stderr.text()]).then(([stdout2, stderr]) => ({ stdout: stdout2, stderr })),
|
|
80730
80851
|
timeoutPromise
|
|
@@ -80840,7 +80961,7 @@ async function runBundleAudit(directory) {
|
|
|
80840
80961
|
stderr: "pipe",
|
|
80841
80962
|
cwd: directory
|
|
80842
80963
|
});
|
|
80843
|
-
const timeoutPromise = new Promise((
|
|
80964
|
+
const timeoutPromise = new Promise((resolve31) => setTimeout(() => resolve31("timeout"), AUDIT_TIMEOUT_MS));
|
|
80844
80965
|
const result = await Promise.race([
|
|
80845
80966
|
Promise.all([proc.stdout.text(), proc.stderr.text()]).then(([stdout2, stderr]) => ({ stdout: stdout2, stderr })),
|
|
80846
80967
|
timeoutPromise
|
|
@@ -80985,7 +81106,7 @@ async function runDartAudit(directory) {
|
|
|
80985
81106
|
stderr: "pipe",
|
|
80986
81107
|
cwd: directory
|
|
80987
81108
|
});
|
|
80988
|
-
const timeoutPromise = new Promise((
|
|
81109
|
+
const timeoutPromise = new Promise((resolve31) => setTimeout(() => resolve31("timeout"), AUDIT_TIMEOUT_MS));
|
|
80989
81110
|
const result = await Promise.race([
|
|
80990
81111
|
Promise.all([proc.stdout.text(), proc.stderr.text()]).then(([stdout2, stderr]) => ({ stdout: stdout2, stderr })),
|
|
80991
81112
|
timeoutPromise
|
|
@@ -81100,7 +81221,7 @@ async function runComposerAudit(directory) {
|
|
|
81100
81221
|
stderr: "pipe",
|
|
81101
81222
|
cwd: directory
|
|
81102
81223
|
});
|
|
81103
|
-
const timeoutPromise = new Promise((
|
|
81224
|
+
const timeoutPromise = new Promise((resolve31) => setTimeout(() => resolve31("timeout"), AUDIT_TIMEOUT_MS));
|
|
81104
81225
|
const result = await Promise.race([
|
|
81105
81226
|
Promise.all([proc.stdout.text(), proc.stderr.text()]).then(([stdout2, stderr]) => ({ stdout: stdout2, stderr })),
|
|
81106
81227
|
timeoutPromise
|
|
@@ -82740,7 +82861,7 @@ function mapSemgrepSeverity(severity) {
|
|
|
82740
82861
|
}
|
|
82741
82862
|
}
|
|
82742
82863
|
async function executeWithTimeout(command, args2, options) {
|
|
82743
|
-
return new Promise((
|
|
82864
|
+
return new Promise((resolve32) => {
|
|
82744
82865
|
const child = child_process9.spawn(command, args2, {
|
|
82745
82866
|
shell: false,
|
|
82746
82867
|
cwd: options.cwd
|
|
@@ -82749,7 +82870,7 @@ async function executeWithTimeout(command, args2, options) {
|
|
|
82749
82870
|
let stderr = "";
|
|
82750
82871
|
const timeout = setTimeout(() => {
|
|
82751
82872
|
child.kill("SIGTERM");
|
|
82752
|
-
|
|
82873
|
+
resolve32({
|
|
82753
82874
|
stdout,
|
|
82754
82875
|
stderr: "Process timed out",
|
|
82755
82876
|
exitCode: 124
|
|
@@ -82763,7 +82884,7 @@ async function executeWithTimeout(command, args2, options) {
|
|
|
82763
82884
|
});
|
|
82764
82885
|
child.on("close", (code) => {
|
|
82765
82886
|
clearTimeout(timeout);
|
|
82766
|
-
|
|
82887
|
+
resolve32({
|
|
82767
82888
|
stdout,
|
|
82768
82889
|
stderr,
|
|
82769
82890
|
exitCode: code ?? 0
|
|
@@ -82771,7 +82892,7 @@ async function executeWithTimeout(command, args2, options) {
|
|
|
82771
82892
|
});
|
|
82772
82893
|
child.on("error", (err2) => {
|
|
82773
82894
|
clearTimeout(timeout);
|
|
82774
|
-
|
|
82895
|
+
resolve32({
|
|
82775
82896
|
stdout,
|
|
82776
82897
|
stderr: err2.message,
|
|
82777
82898
|
exitCode: 1
|
|
@@ -82956,7 +83077,7 @@ async function acquireLock(lockPath) {
|
|
|
82956
83077
|
};
|
|
82957
83078
|
} catch {
|
|
82958
83079
|
if (attempt < LOCK_RETRY_DELAYS_MS.length) {
|
|
82959
|
-
await new Promise((
|
|
83080
|
+
await new Promise((resolve33) => setTimeout(resolve33, LOCK_RETRY_DELAYS_MS[attempt]));
|
|
82960
83081
|
}
|
|
82961
83082
|
}
|
|
82962
83083
|
}
|
|
@@ -86782,7 +86903,7 @@ async function ripgrepSearch(opts) {
|
|
|
86782
86903
|
stderr: "pipe",
|
|
86783
86904
|
cwd: opts.workspace
|
|
86784
86905
|
});
|
|
86785
|
-
const timeout = new Promise((
|
|
86906
|
+
const timeout = new Promise((resolve39) => setTimeout(() => resolve39("timeout"), REGEX_TIMEOUT_MS));
|
|
86786
86907
|
const exitPromise = proc.exited;
|
|
86787
86908
|
const result = await Promise.race([exitPromise, timeout]);
|
|
86788
86909
|
if (result === "timeout") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0",
|
|
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",
|