opencode-swarm 6.22.10 → 6.22.11
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/index.js +9 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -42216,8 +42216,8 @@ function recordPhaseAgentDispatch(sessionId, agentName) {
|
|
|
42216
42216
|
session.phaseAgentsDispatched.add(normalizedName);
|
|
42217
42217
|
}
|
|
42218
42218
|
function advanceTaskState(session, taskId, newState) {
|
|
42219
|
-
if (!session.taskWorkflowStates) {
|
|
42220
|
-
session.taskWorkflowStates
|
|
42219
|
+
if (!session || !(session.taskWorkflowStates instanceof Map)) {
|
|
42220
|
+
throw new Error("INVALID_SESSION: session.taskWorkflowStates must be a Map instance");
|
|
42221
42221
|
}
|
|
42222
42222
|
const STATE_ORDER = [
|
|
42223
42223
|
"idle",
|
|
@@ -48933,10 +48933,13 @@ ${trimComment}${after}`;
|
|
|
48933
48933
|
Rule 3: ONE task per coder call. Split this into separate delegations.
|
|
48934
48934
|
${warningLines.join(`
|
|
48935
48935
|
`)}`;
|
|
48936
|
-
const
|
|
48937
|
-
|
|
48938
|
-
|
|
48939
|
-
|
|
48936
|
+
const batchWarnSystemIdx = messages.findIndex((m) => m && m.info?.role === "system");
|
|
48937
|
+
const batchWarnInsertIdx = batchWarnSystemIdx >= 0 ? batchWarnSystemIdx + 1 : 0;
|
|
48938
|
+
const batchWarnMessage = {
|
|
48939
|
+
info: { role: "system" },
|
|
48940
|
+
parts: [{ type: "text", text: warningText }]
|
|
48941
|
+
};
|
|
48942
|
+
messages.splice(batchWarnInsertIdx, 0, batchWarnMessage);
|
|
48940
48943
|
},
|
|
48941
48944
|
toolAfter
|
|
48942
48945
|
};
|
|
@@ -49029,10 +49032,6 @@ init_schema();
|
|
|
49029
49032
|
function createDelegationTrackerHook(config3, guardrailsEnabled = true) {
|
|
49030
49033
|
return async (input, _output) => {
|
|
49031
49034
|
const now = Date.now();
|
|
49032
|
-
const debugSession = swarmState.agentSessions.get(input.sessionID);
|
|
49033
|
-
const taskStates = debugSession?.taskWorkflowStates ? Object.entries(debugSession.taskWorkflowStates) : [];
|
|
49034
|
-
const statesSummary = taskStates.length > 0 ? taskStates.map(([k, v]) => `${k}=${v}`).join(",") : "(none)";
|
|
49035
|
-
console.log(`[swarm-debug-task] chat.message | session=${input.sessionID} agent=${input.agent ?? "(none)"} prevAgent=${swarmState.activeAgent.get(input.sessionID) ?? "(none)"} taskStates=[${statesSummary}]`);
|
|
49036
49035
|
if (!input.agent || input.agent === "") {
|
|
49037
49036
|
const session2 = swarmState.agentSessions.get(input.sessionID);
|
|
49038
49037
|
if (session2?.delegationActive) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.22.
|
|
3
|
+
"version": "6.22.11",
|
|
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",
|