opencode-swarm 7.50.3 → 7.50.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 +11 -2
- package/dist/index.js +34 -13
- 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.50.
|
|
55
|
+
version: "7.50.4",
|
|
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",
|
|
@@ -21701,8 +21701,9 @@ var init_guardrails = __esm(() => {
|
|
|
21701
21701
|
function clearPendingCoderScope() {
|
|
21702
21702
|
pendingCoderScopeByTaskId.clear();
|
|
21703
21703
|
}
|
|
21704
|
-
var pendingCoderScopeByTaskId, ACTIVE_PARALLEL_TASK_STATES;
|
|
21704
|
+
var EvidenceTaskIdPlanSchema, pendingCoderScopeByTaskId, ACTIVE_PARALLEL_TASK_STATES;
|
|
21705
21705
|
var init_delegation_gate = __esm(() => {
|
|
21706
|
+
init_zod();
|
|
21706
21707
|
init_schema();
|
|
21707
21708
|
init_manager();
|
|
21708
21709
|
init_state();
|
|
@@ -21712,6 +21713,14 @@ var init_delegation_gate = __esm(() => {
|
|
|
21712
21713
|
init_guardrails();
|
|
21713
21714
|
init_normalize_tool_name();
|
|
21714
21715
|
init_utils2();
|
|
21716
|
+
EvidenceTaskIdPlanSchema = exports_external.object({
|
|
21717
|
+
phases: exports_external.array(exports_external.object({
|
|
21718
|
+
tasks: exports_external.array(exports_external.object({
|
|
21719
|
+
id: exports_external.string(),
|
|
21720
|
+
status: exports_external.string().optional()
|
|
21721
|
+
}).passthrough()).optional()
|
|
21722
|
+
}).passthrough()).optional()
|
|
21723
|
+
}).passthrough();
|
|
21715
21724
|
pendingCoderScopeByTaskId = new Map;
|
|
21716
21725
|
ACTIVE_PARALLEL_TASK_STATES = new Set([
|
|
21717
21726
|
"coder_delegated",
|
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.50.
|
|
72
|
+
version: "7.50.4",
|
|
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",
|
|
@@ -40728,6 +40728,7 @@ function isParallelGuidancePhaseComplete(phase) {
|
|
|
40728
40728
|
return phase.status === "complete" || phase.status === "completed" || phase.status === "closed";
|
|
40729
40729
|
}
|
|
40730
40730
|
async function getEvidenceTaskId(session, directory) {
|
|
40731
|
+
let resolvedPlanPath;
|
|
40731
40732
|
const primary = session.currentTaskId ?? session.lastCoderDelegationTaskId;
|
|
40732
40733
|
if (primary)
|
|
40733
40734
|
return primary;
|
|
@@ -40740,12 +40741,12 @@ async function getEvidenceTaskId(session, directory) {
|
|
|
40740
40741
|
}
|
|
40741
40742
|
const resolvedDirectory = path19.resolve(directory);
|
|
40742
40743
|
const planPath = path19.join(resolvedDirectory, ".swarm", "plan.json");
|
|
40743
|
-
|
|
40744
|
+
resolvedPlanPath = path19.resolve(planPath);
|
|
40744
40745
|
if (!resolvedPlanPath.startsWith(resolvedDirectory + path19.sep) && resolvedPlanPath !== resolvedDirectory) {
|
|
40745
40746
|
return null;
|
|
40746
40747
|
}
|
|
40747
40748
|
const planContent = await fs12.promises.readFile(resolvedPlanPath, "utf-8");
|
|
40748
|
-
const plan = JSON.parse(planContent);
|
|
40749
|
+
const plan = EvidenceTaskIdPlanSchema.parse(JSON.parse(planContent));
|
|
40749
40750
|
if (!plan || !Array.isArray(plan.phases)) {
|
|
40750
40751
|
return null;
|
|
40751
40752
|
}
|
|
@@ -40759,6 +40760,11 @@ async function getEvidenceTaskId(session, directory) {
|
|
|
40759
40760
|
}
|
|
40760
40761
|
}
|
|
40761
40762
|
} catch (err2) {
|
|
40763
|
+
if (err2 instanceof ZodError) {
|
|
40764
|
+
const issueSummary = err2.issues.slice(0, 3).map((issue2) => issue2.message).join("; ");
|
|
40765
|
+
warn(`[delegation-gate] getEvidenceTaskId ignored invalid plan schema at ${resolvedPlanPath ?? "unknown path"}: ${issueSummary}`);
|
|
40766
|
+
return null;
|
|
40767
|
+
}
|
|
40762
40768
|
if (process.env.DEBUG_SWARM && err2 instanceof Error) {
|
|
40763
40769
|
warn(`[delegation-gate] getEvidenceTaskId error: ${err2.message} (code=${err2.code ?? "none"})`);
|
|
40764
40770
|
}
|
|
@@ -41405,8 +41411,9 @@ ${warningLines.join(`
|
|
|
41405
41411
|
toolAfter
|
|
41406
41412
|
};
|
|
41407
41413
|
}
|
|
41408
|
-
var pendingCoderScopeByTaskId, ACTIVE_PARALLEL_TASK_STATES;
|
|
41414
|
+
var EvidenceTaskIdPlanSchema, pendingCoderScopeByTaskId, ACTIVE_PARALLEL_TASK_STATES;
|
|
41409
41415
|
var init_delegation_gate = __esm(() => {
|
|
41416
|
+
init_zod();
|
|
41410
41417
|
init_schema();
|
|
41411
41418
|
init_manager();
|
|
41412
41419
|
init_state();
|
|
@@ -41416,6 +41423,14 @@ var init_delegation_gate = __esm(() => {
|
|
|
41416
41423
|
init_guardrails();
|
|
41417
41424
|
init_normalize_tool_name();
|
|
41418
41425
|
init_utils2();
|
|
41426
|
+
EvidenceTaskIdPlanSchema = exports_external.object({
|
|
41427
|
+
phases: exports_external.array(exports_external.object({
|
|
41428
|
+
tasks: exports_external.array(exports_external.object({
|
|
41429
|
+
id: exports_external.string(),
|
|
41430
|
+
status: exports_external.string().optional()
|
|
41431
|
+
}).passthrough()).optional()
|
|
41432
|
+
}).passthrough()).optional()
|
|
41433
|
+
}).passthrough();
|
|
41419
41434
|
pendingCoderScopeByTaskId = new Map;
|
|
41420
41435
|
ACTIVE_PARALLEL_TASK_STATES = new Set([
|
|
41421
41436
|
"coder_delegated",
|
|
@@ -108666,6 +108681,7 @@ ${body2}`);
|
|
|
108666
108681
|
}
|
|
108667
108682
|
|
|
108668
108683
|
// src/council/council-evidence-writer.ts
|
|
108684
|
+
init_zod();
|
|
108669
108685
|
init_task_file();
|
|
108670
108686
|
import { appendFileSync as appendFileSync12, existsSync as existsSync63, mkdirSync as mkdirSync29, readFileSync as readFileSync45 } from "node:fs";
|
|
108671
108687
|
import { join as join95 } from "node:path";
|
|
@@ -108673,6 +108689,7 @@ var EVIDENCE_DIR2 = ".swarm/evidence";
|
|
|
108673
108689
|
var VALID_TASK_ID = /^\d+\.\d+(\.\d+)*$/;
|
|
108674
108690
|
var COUNCIL_GATE_NAME = "council";
|
|
108675
108691
|
var COUNCIL_AGENT_ID = "architect";
|
|
108692
|
+
var EvidenceFileSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
108676
108693
|
var _internals53 = {
|
|
108677
108694
|
withTaskEvidenceLock
|
|
108678
108695
|
};
|
|
@@ -108712,10 +108729,8 @@ async function writeCouncilEvidence(workingDir, synthesis) {
|
|
|
108712
108729
|
const existingRoot = Object.create(null);
|
|
108713
108730
|
if (existsSync63(filePath)) {
|
|
108714
108731
|
try {
|
|
108715
|
-
const parsed = JSON.parse(readFileSync45(filePath, "utf-8"));
|
|
108716
|
-
|
|
108717
|
-
safeAssignOwnProps(existingRoot, parsed);
|
|
108718
|
-
}
|
|
108732
|
+
const parsed = EvidenceFileSchema.parse(JSON.parse(readFileSync45(filePath, "utf-8")));
|
|
108733
|
+
safeAssignOwnProps(existingRoot, parsed);
|
|
108719
108734
|
} catch {}
|
|
108720
108735
|
}
|
|
108721
108736
|
const existingGatesRaw = existingRoot.gates;
|
|
@@ -109073,9 +109088,19 @@ function buildFinalCouncilFeedback(projectSummary, verdict, vetoedBy, requiredFi
|
|
|
109073
109088
|
}
|
|
109074
109089
|
|
|
109075
109090
|
// src/council/criteria-store.ts
|
|
109091
|
+
init_zod();
|
|
109076
109092
|
import { existsSync as existsSync64, mkdirSync as mkdirSync30, readFileSync as readFileSync46, writeFileSync as writeFileSync22 } from "node:fs";
|
|
109077
109093
|
import { join as join96 } from "node:path";
|
|
109078
109094
|
var COUNCIL_DIR = ".swarm/council";
|
|
109095
|
+
var CouncilCriteriaSchema = exports_external.object({
|
|
109096
|
+
taskId: exports_external.string(),
|
|
109097
|
+
criteria: exports_external.array(exports_external.object({
|
|
109098
|
+
id: exports_external.string(),
|
|
109099
|
+
description: exports_external.string(),
|
|
109100
|
+
mandatory: exports_external.boolean()
|
|
109101
|
+
})),
|
|
109102
|
+
declaredAt: exports_external.string()
|
|
109103
|
+
});
|
|
109079
109104
|
function writeCriteria(workingDir, taskId, criteria) {
|
|
109080
109105
|
const dir = join96(workingDir, COUNCIL_DIR);
|
|
109081
109106
|
mkdirSync30(dir, { recursive: true });
|
|
@@ -109091,11 +109116,7 @@ function readCriteria(workingDir, taskId) {
|
|
|
109091
109116
|
if (!existsSync64(filePath))
|
|
109092
109117
|
return null;
|
|
109093
109118
|
try {
|
|
109094
|
-
|
|
109095
|
-
if (parsed && typeof parsed === "object" && typeof parsed.taskId === "string" && Array.isArray(parsed.criteria)) {
|
|
109096
|
-
return parsed;
|
|
109097
|
-
}
|
|
109098
|
-
return null;
|
|
109119
|
+
return CouncilCriteriaSchema.parse(JSON.parse(readFileSync46(filePath, "utf-8")));
|
|
109099
109120
|
} catch {
|
|
109100
109121
|
return null;
|
|
109101
109122
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.50.
|
|
3
|
+
"version": "7.50.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",
|