opencode-swarm 6.27.0 → 6.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.
Files changed (2) hide show
  1. package/dist/index.js +59 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -62071,6 +62071,45 @@ function checkReviewerGate(taskId, workingDirectory) {
62071
62071
  }
62072
62072
  }
62073
62073
  } catch {}
62074
+ {
62075
+ let hasReviewer = false;
62076
+ let hasTestEngineer = false;
62077
+ for (const [sessionId, chain] of swarmState.delegationChains) {
62078
+ const session = swarmState.agentSessions.get(sessionId);
62079
+ if (session && (session.currentTaskId === taskId || session.lastCoderDelegationTaskId === taskId)) {
62080
+ for (const delegation of chain) {
62081
+ const target = stripKnownSwarmPrefix(delegation.to);
62082
+ if (target === "reviewer")
62083
+ hasReviewer = true;
62084
+ if (target === "test_engineer")
62085
+ hasTestEngineer = true;
62086
+ }
62087
+ }
62088
+ }
62089
+ if (!hasReviewer && !hasTestEngineer) {
62090
+ for (const [, chain] of swarmState.delegationChains) {
62091
+ let lastCoderIndex = -1;
62092
+ for (let i2 = chain.length - 1;i2 >= 0; i2--) {
62093
+ const target = stripKnownSwarmPrefix(chain[i2].to);
62094
+ if (target === "coder") {
62095
+ lastCoderIndex = i2;
62096
+ break;
62097
+ }
62098
+ }
62099
+ const searchStart = lastCoderIndex === -1 ? 0 : lastCoderIndex + 1;
62100
+ for (let i2 = searchStart;i2 < chain.length; i2++) {
62101
+ const target = stripKnownSwarmPrefix(chain[i2].to);
62102
+ if (target === "reviewer")
62103
+ hasReviewer = true;
62104
+ if (target === "test_engineer")
62105
+ hasTestEngineer = true;
62106
+ }
62107
+ }
62108
+ }
62109
+ if (hasReviewer && hasTestEngineer) {
62110
+ return { blocked: false, reason: "" };
62111
+ }
62112
+ }
62074
62113
  const currentStateStr = stateEntries.length > 0 ? stateEntries.join(", ") : "no active sessions";
62075
62114
  return {
62076
62115
  blocked: true,
@@ -62095,6 +62134,26 @@ function recoverTaskStateFromDelegations(taskId) {
62095
62134
  }
62096
62135
  }
62097
62136
  }
62137
+ if (!hasReviewer && !hasTestEngineer) {
62138
+ for (const [, chain] of swarmState.delegationChains) {
62139
+ let lastCoderIndex = -1;
62140
+ for (let i2 = chain.length - 1;i2 >= 0; i2--) {
62141
+ const target = stripKnownSwarmPrefix(chain[i2].to);
62142
+ if (target === "coder") {
62143
+ lastCoderIndex = i2;
62144
+ break;
62145
+ }
62146
+ }
62147
+ const searchStart = lastCoderIndex === -1 ? 0 : lastCoderIndex + 1;
62148
+ for (let i2 = searchStart;i2 < chain.length; i2++) {
62149
+ const target = stripKnownSwarmPrefix(chain[i2].to);
62150
+ if (target === "reviewer")
62151
+ hasReviewer = true;
62152
+ if (target === "test_engineer")
62153
+ hasTestEngineer = true;
62154
+ }
62155
+ }
62156
+ }
62098
62157
  if (!hasReviewer && !hasTestEngineer)
62099
62158
  return;
62100
62159
  for (const [, session] of swarmState.agentSessions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.27.0",
3
+ "version": "6.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",