opencode-swarm 6.40.3 → 6.40.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/index.js CHANGED
@@ -41191,7 +41191,11 @@ function applyRehydrationCache(session) {
41191
41191
  const evidence = evidenceMap.get(taskId);
41192
41192
  if (evidence) {
41193
41193
  const derivedState = evidenceToWorkflowState(evidence);
41194
- session.taskWorkflowStates.set(taskId, derivedState);
41194
+ const existingIndex = existingState ? STATE_ORDER.indexOf(existingState) : -1;
41195
+ const derivedIndex = STATE_ORDER.indexOf(derivedState);
41196
+ if (derivedIndex > existingIndex) {
41197
+ session.taskWorkflowStates.set(taskId, derivedState);
41198
+ }
41195
41199
  } else {
41196
41200
  const existingIndex = existingState ? STATE_ORDER.indexOf(existingState) : -1;
41197
41201
  const derivedIndex = STATE_ORDER.indexOf(planState);
package/dist/state.d.ts CHANGED
@@ -319,7 +319,7 @@ export declare function buildRehydrationCache(directory: string): Promise<void>;
319
319
  /**
320
320
  * Synchronously applies the cached plan+evidence data to a session.
321
321
  * Merge rules:
322
- * - evidence-derived state: always applied (replaces snapshot state, even if lower)
322
+ * - evidence-derived state: only applied if it advances past existing state
323
323
  * - plan-only derived state: only applied if it advances past existing state
324
324
  * No-op when the cache has not been built yet.
325
325
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.40.3",
3
+ "version": "6.40.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",