opencode-swarm 7.56.1 → 7.56.3
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.d.ts +11 -3
- package/dist/cli/index.js +6 -2
- package/dist/index.js +26 -8
- package/package.json +1 -1
package/dist/cli/index.d.ts
CHANGED
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
export declare function isSafeCachePath(p: string): boolean;
|
|
3
3
|
/**
|
|
4
4
|
* Safety guard for lock file deletion. Lock files have different basenames
|
|
5
|
-
* than cache directories
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* and directory structure than cache directories, requiring separate validation
|
|
6
|
+
* logic. While both functions share defense-in-depth principles, they are kept
|
|
7
|
+
* separate rather than extracted to a parameterized helper because the
|
|
8
|
+
* validation rules differ significantly:
|
|
9
|
+
* - Cache paths verify: parent ∈ {packages, node_modules}, grandparent === 'opencode'
|
|
10
|
+
* - Lock file paths verify: parent === 'opencode', grandparent !== 'opencode'
|
|
11
|
+
* This separation maintains clarity and avoids over-parameterization.
|
|
12
|
+
*
|
|
13
|
+
* This function mirrors isSafeCachePath()'s defense-in-depth: minimum segment
|
|
14
|
+
* depth, recognized basename, parent directory must be 'opencode', and
|
|
15
|
+
* grandparent structure validation to prevent misconfigured nested paths.
|
|
8
16
|
*/
|
|
9
17
|
export declare function isSafeLockFilePath(p: string): boolean;
|
|
10
18
|
/**
|
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.56.
|
|
55
|
+
version: "7.56.3",
|
|
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",
|
|
@@ -39569,7 +39569,7 @@ async function handleCloseCommand(directory, args, options = {}) {
|
|
|
39569
39569
|
swarmPlanFilesRemoved++;
|
|
39570
39570
|
} catch (err) {
|
|
39571
39571
|
if (err?.code !== "ENOENT") {
|
|
39572
|
-
warnings.push(`Failed to remove ${
|
|
39572
|
+
warnings.push(`Failed to remove ${candidate}: ${err instanceof Error ? err.message : String(err)}`);
|
|
39573
39573
|
}
|
|
39574
39574
|
}
|
|
39575
39575
|
}
|
|
@@ -59529,6 +59529,10 @@ function isSafeLockFilePath(p) {
|
|
|
59529
59529
|
if (parent !== "opencode") {
|
|
59530
59530
|
return false;
|
|
59531
59531
|
}
|
|
59532
|
+
const grandparent = path55.basename(path55.dirname(path55.dirname(resolved)));
|
|
59533
|
+
if (grandparent === "opencode") {
|
|
59534
|
+
return false;
|
|
59535
|
+
}
|
|
59532
59536
|
return true;
|
|
59533
59537
|
}
|
|
59534
59538
|
function ensureDir(dir) {
|
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.56.
|
|
72
|
+
version: "7.56.3",
|
|
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",
|
|
@@ -61950,7 +61950,7 @@ async function handleCloseCommand(directory, args2, options = {}) {
|
|
|
61950
61950
|
swarmPlanFilesRemoved++;
|
|
61951
61951
|
} catch (err2) {
|
|
61952
61952
|
if (err2?.code !== "ENOENT") {
|
|
61953
|
-
warnings.push(`Failed to remove ${
|
|
61953
|
+
warnings.push(`Failed to remove ${candidate}: ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
61954
61954
|
}
|
|
61955
61955
|
}
|
|
61956
61956
|
}
|
|
@@ -118287,6 +118287,7 @@ import * as path143 from "node:path";
|
|
|
118287
118287
|
async function runFinalCouncilGate(ctx) {
|
|
118288
118288
|
const { phase, dir, sessionID, agentsDispatched, safeWarn } = ctx;
|
|
118289
118289
|
let finalCouncilEnabled = false;
|
|
118290
|
+
const gateWarnings = [];
|
|
118290
118291
|
try {
|
|
118291
118292
|
const plan = await loadPlan(dir);
|
|
118292
118293
|
if (plan) {
|
|
@@ -118374,11 +118375,17 @@ async function runFinalCouncilGate(ctx) {
|
|
|
118374
118375
|
warnings: []
|
|
118375
118376
|
};
|
|
118376
118377
|
}
|
|
118377
|
-
if (entry.verdict
|
|
118378
|
+
if (entry.verdict === "concerns" || entry.verdict === "CONCERNS") {
|
|
118379
|
+
const advisoryNotes = Array.isArray(entry.advisoryNotes) ? entry.advisoryNotes.filter((note) => typeof note === "string") : [];
|
|
118380
|
+
const warning = advisoryNotes.length > 0 ? `Final council returned CONCERNS (non-blocking): ${advisoryNotes.join("; ")}` : "Final council returned CONCERNS (non-blocking).";
|
|
118381
|
+
gateWarnings.push(warning);
|
|
118382
|
+
safeWarn(`[phase_complete] ${warning}`, undefined);
|
|
118383
|
+
}
|
|
118384
|
+
if (entry.verdict !== "approved" && entry.verdict !== "APPROVED" && entry.verdict !== "concerns" && entry.verdict !== "CONCERNS") {
|
|
118378
118385
|
return {
|
|
118379
118386
|
blocked: true,
|
|
118380
118387
|
reason: "FINAL_COUNCIL_INVALID_VERDICT",
|
|
118381
|
-
message: `Phase ${phase} (last phase) cannot be completed: final council evidence contains unrecognized verdict '${entry.verdict}'. Expected
|
|
118388
|
+
message: `Phase ${phase} (last phase) cannot be completed: final council evidence contains unrecognized verdict '${entry.verdict}'. Expected one of: approved, concerns, rejected.`,
|
|
118382
118389
|
agentsDispatched,
|
|
118383
118390
|
agentsMissing: [],
|
|
118384
118391
|
warnings: []
|
|
@@ -118423,7 +118430,12 @@ async function runFinalCouncilGate(ctx) {
|
|
|
118423
118430
|
safeWarn(`[phase_complete] Final council gate error (non-blocking):`, fcError);
|
|
118424
118431
|
}
|
|
118425
118432
|
}
|
|
118426
|
-
return {
|
|
118433
|
+
return {
|
|
118434
|
+
blocked: false,
|
|
118435
|
+
agentsDispatched,
|
|
118436
|
+
agentsMissing: [],
|
|
118437
|
+
warnings: gateWarnings
|
|
118438
|
+
};
|
|
118427
118439
|
}
|
|
118428
118440
|
// src/tools/phase-complete/gates/hallucination-gate.ts
|
|
118429
118441
|
init_qa_gate_profile();
|
|
@@ -130326,8 +130338,14 @@ var ArgsSchema8 = exports_external.object({
|
|
|
130326
130338
|
roundNumber: exports_external.number().int().min(1).max(10).optional(),
|
|
130327
130339
|
verdicts: exports_external.array(VerdictSchema3).min(1).max(5)
|
|
130328
130340
|
});
|
|
130329
|
-
function normalizeFinalVerdict(verdict) {
|
|
130330
|
-
|
|
130341
|
+
function normalizeFinalVerdict(verdict, requiredFixesCount) {
|
|
130342
|
+
if (verdict === "APPROVE") {
|
|
130343
|
+
return "approved";
|
|
130344
|
+
}
|
|
130345
|
+
if (verdict === "REJECT") {
|
|
130346
|
+
return "rejected";
|
|
130347
|
+
}
|
|
130348
|
+
return requiredFixesCount > 0 ? "rejected" : "concerns";
|
|
130331
130349
|
}
|
|
130332
130350
|
async function executeWriteFinalCouncilEvidence(args2, directory) {
|
|
130333
130351
|
const parsed = ArgsSchema8.safeParse(args2);
|
|
@@ -130360,7 +130378,7 @@ async function executeWriteFinalCouncilEvidence(args2, directory) {
|
|
|
130360
130378
|
const synthesis = synthesizeFinalCouncilAdvisory(input.projectSummary.trim(), input.verdicts, input.roundNumber ?? 1, config3.council);
|
|
130361
130379
|
const plan = await loadPlan(directory);
|
|
130362
130380
|
const planId = plan ? derivePlanId(plan) : "unknown";
|
|
130363
|
-
const normalizedVerdict = normalizeFinalVerdict(synthesis.overallVerdict);
|
|
130381
|
+
const normalizedVerdict = normalizeFinalVerdict(synthesis.overallVerdict, synthesis.requiredFixes.length);
|
|
130364
130382
|
const evidenceEntry = {
|
|
130365
130383
|
type: "final-council",
|
|
130366
130384
|
phase: input.phase,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.56.
|
|
3
|
+
"version": "7.56.3",
|
|
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",
|