opencode-swarm 5.1.7 → 5.1.8

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16749,12 +16749,14 @@ function createDelegationTrackerHook(config2) {
16749
16749
  const now = Date.now();
16750
16750
  if (!input.agent || input.agent === "") {
16751
16751
  const session2 = swarmState.agentSessions.get(input.sessionID);
16752
- if (session2) {
16752
+ if (session2 && session2.delegationActive) {
16753
16753
  session2.delegationActive = false;
16754
+ swarmState.activeAgent.set(input.sessionID, ORCHESTRATOR_NAME);
16755
+ ensureAgentSession(input.sessionID, ORCHESTRATOR_NAME);
16756
+ updateAgentEventTime(input.sessionID);
16757
+ } else if (!session2) {
16758
+ ensureAgentSession(input.sessionID, ORCHESTRATOR_NAME);
16754
16759
  }
16755
- swarmState.activeAgent.set(input.sessionID, ORCHESTRATOR_NAME);
16756
- ensureAgentSession(input.sessionID, ORCHESTRATOR_NAME);
16757
- updateAgentEventTime(input.sessionID);
16758
16760
  return;
16759
16761
  }
16760
16762
  const agentName = input.agent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "5.1.7",
3
+ "version": "5.1.8",
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",