opencode-swarm 7.27.0 → 7.27.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 +1 -1
- package/dist/index.js +50 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var package_default;
|
|
|
34
34
|
var init_package = __esm(() => {
|
|
35
35
|
package_default = {
|
|
36
36
|
name: "opencode-swarm",
|
|
37
|
-
version: "7.27.
|
|
37
|
+
version: "7.27.1",
|
|
38
38
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
39
39
|
main: "dist/index.js",
|
|
40
40
|
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.27.
|
|
36
|
+
version: "7.27.1",
|
|
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",
|
|
@@ -28054,14 +28054,60 @@ function getEvidencePath(directory, taskId) {
|
|
|
28054
28054
|
assertValidTaskId(taskId);
|
|
28055
28055
|
return path12.join(getEvidenceDir(directory), `${taskId}.json`);
|
|
28056
28056
|
}
|
|
28057
|
+
function parseTaskEvidence(raw) {
|
|
28058
|
+
const parsed = JSON.parse(raw);
|
|
28059
|
+
const normalized = normalizeLegacyTaskEvidence(parsed);
|
|
28060
|
+
return TaskEvidenceSchema.parse(normalized);
|
|
28061
|
+
}
|
|
28057
28062
|
function readExisting(evidencePath) {
|
|
28058
28063
|
try {
|
|
28059
28064
|
const raw = readFileSync5(evidencePath, "utf-8");
|
|
28060
|
-
return
|
|
28065
|
+
return parseTaskEvidence(raw);
|
|
28061
28066
|
} catch {
|
|
28062
28067
|
return null;
|
|
28063
28068
|
}
|
|
28064
28069
|
}
|
|
28070
|
+
function normalizeLegacyTaskEvidence(parsed) {
|
|
28071
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
28072
|
+
return parsed;
|
|
28073
|
+
}
|
|
28074
|
+
const record2 = parsed;
|
|
28075
|
+
if (record2.gates === null || typeof record2.gates !== "object" || Array.isArray(record2.gates)) {
|
|
28076
|
+
return parsed;
|
|
28077
|
+
}
|
|
28078
|
+
const normalizedGates = {};
|
|
28079
|
+
for (const [gateName, gateValue] of Object.entries(record2.gates)) {
|
|
28080
|
+
if (gateValue !== null && typeof gateValue === "object" && !Array.isArray(gateValue)) {
|
|
28081
|
+
const gateRecord = gateValue;
|
|
28082
|
+
normalizedGates[gateName] = {
|
|
28083
|
+
...gateRecord,
|
|
28084
|
+
sessionId: typeof gateRecord.sessionId === "string" ? gateRecord.sessionId : LEGACY_GATE_SESSION_ID,
|
|
28085
|
+
timestamp: typeof gateRecord.timestamp === "string" ? gateRecord.timestamp : LEGACY_GATE_TIMESTAMP,
|
|
28086
|
+
agent: typeof gateRecord.agent === "string" ? gateRecord.agent : gateName
|
|
28087
|
+
};
|
|
28088
|
+
continue;
|
|
28089
|
+
}
|
|
28090
|
+
if (typeof gateValue === "string") {
|
|
28091
|
+
normalizedGates[gateName] = {
|
|
28092
|
+
sessionId: LEGACY_GATE_SESSION_ID,
|
|
28093
|
+
timestamp: LEGACY_GATE_TIMESTAMP,
|
|
28094
|
+
agent: gateName,
|
|
28095
|
+
verdict: gateValue
|
|
28096
|
+
};
|
|
28097
|
+
continue;
|
|
28098
|
+
}
|
|
28099
|
+
normalizedGates[gateName] = {
|
|
28100
|
+
sessionId: LEGACY_GATE_SESSION_ID,
|
|
28101
|
+
timestamp: LEGACY_GATE_TIMESTAMP,
|
|
28102
|
+
agent: gateName
|
|
28103
|
+
};
|
|
28104
|
+
}
|
|
28105
|
+
return {
|
|
28106
|
+
...record2,
|
|
28107
|
+
taskId: typeof record2.taskId === "string" ? record2.taskId : typeof record2.task_id === "string" ? record2.task_id : "",
|
|
28108
|
+
gates: normalizedGates
|
|
28109
|
+
};
|
|
28110
|
+
}
|
|
28065
28111
|
async function atomicWrite2(targetPath, content) {
|
|
28066
28112
|
const tempPath = `${targetPath}.tmp.${Date.now()}.${Math.floor(Math.random() * 1e9)}`;
|
|
28067
28113
|
try {
|
|
@@ -28130,7 +28176,7 @@ function readTaskEvidenceRaw(directory, taskId) {
|
|
|
28130
28176
|
const evidencePath = getEvidencePath(directory, taskId);
|
|
28131
28177
|
try {
|
|
28132
28178
|
const raw = readFileSync5(evidencePath, "utf-8");
|
|
28133
|
-
return
|
|
28179
|
+
return parseTaskEvidence(raw);
|
|
28134
28180
|
} catch (error49) {
|
|
28135
28181
|
if (error49.code === "ENOENT")
|
|
28136
28182
|
return null;
|
|
@@ -28145,7 +28191,7 @@ async function hasPassedAllGates(directory, taskId) {
|
|
|
28145
28191
|
return false;
|
|
28146
28192
|
return evidence.required_gates.every((gate) => evidence.gates[gate] != null);
|
|
28147
28193
|
}
|
|
28148
|
-
var GateEvidenceSchema, TaskEvidenceSchema, DEFAULT_REQUIRED_GATES;
|
|
28194
|
+
var GateEvidenceSchema, TaskEvidenceSchema, DEFAULT_REQUIRED_GATES, LEGACY_GATE_SESSION_ID = "legacy-manual", LEGACY_GATE_TIMESTAMP = "1970-01-01T00:00:00.000Z";
|
|
28149
28195
|
var init_gate_evidence = __esm(() => {
|
|
28150
28196
|
init_zod();
|
|
28151
28197
|
init_lock();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.27.
|
|
3
|
+
"version": "7.27.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",
|