opencode-swarm 6.30.0 → 6.30.2

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.
@@ -20,7 +20,7 @@ export declare function readSnapshot(directory: string): Promise<SnapshotData |
20
20
  * Clears existing maps first, then populates from snapshot.
21
21
  * Does NOT touch activeToolCalls or pendingEvents (remain at defaults).
22
22
  */
23
- export declare function rehydrateState(snapshot: SnapshotData): void;
23
+ export declare function rehydrateState(snapshot: SnapshotData): Promise<void>;
24
24
  /**
25
25
  * Load snapshot from disk and rehydrate swarmState.
26
26
  * Called on plugin init to restore state from previous session.
package/dist/state.d.ts CHANGED
@@ -181,6 +181,8 @@ export declare const swarmState: {
181
181
  lastBudgetPct: number;
182
182
  /** Per-session guardrail state — keyed by sessionID */
183
183
  agentSessions: Map<string, AgentSessionState>;
184
+ /** In-flight rehydration promises — awaited by rehydrateState before clearing agentSessions */
185
+ pendingRehydrations: Set<Promise<void>>;
184
186
  };
185
187
  /**
186
188
  * Reset all state to initial values - useful for testing
@@ -194,7 +196,7 @@ export declare function resetSwarmState(): void;
194
196
  * @param staleDurationMs - Age threshold for stale session eviction (default: 120 min)
195
197
  * @param directory - Optional project directory for rehydrating workflow state from disk
196
198
  */
197
- export declare function startAgentSession(sessionId: string, agentName: string, staleDurationMs?: number, _directory?: string): void;
199
+ export declare function startAgentSession(sessionId: string, agentName: string, staleDurationMs?: number, directory?: string): void;
198
200
  /**
199
201
  * End an agent session by removing it from the state.
200
202
  * NOTE: Currently unused in production — no session lifecycle teardown is wired up.
@@ -218,7 +220,7 @@ export declare function getAgentSession(sessionId: string): AgentSessionState |
218
220
  * @param agentName - Optional agent name (if known)
219
221
  * @returns The AgentSessionState
220
222
  */
221
- export declare function ensureAgentSession(sessionId: string, agentName?: string, _directory?: string): AgentSessionState;
223
+ export declare function ensureAgentSession(sessionId: string, agentName?: string, directory?: string): AgentSessionState;
222
224
  /**
223
225
  * Update only the agent event timestamp (for stale detection).
224
226
  * Does NOT change agent name or reset guardrail state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.30.0",
3
+ "version": "6.30.2",
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",