opencode-swarm 6.25.9 → 6.27.0

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.
@@ -10,6 +10,7 @@ export interface StatusData {
10
10
  totalTasks: number;
11
11
  agentCount: number;
12
12
  isLegacy: boolean;
13
+ turboMode: boolean;
13
14
  }
14
15
  /**
15
16
  * Get status data from the swarm directory.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tests for Task 3.18: Turbo Mode indicator in status output
3
+ * Verifies that the status-service surfaces the current bypass mode
4
+ */
5
+ export {};
@@ -19,6 +19,7 @@ export interface SerializedAgentSession {
19
19
  architectWriteCount: number;
20
20
  lastCoderDelegationTaskId: string | null;
21
21
  currentTaskId: string | null;
22
+ turboMode: boolean;
22
23
  gateLog: Record<string, string[]>;
23
24
  reviewerCallCount: Record<string, number>;
24
25
  lastGateFailure: {
package/dist/state.d.ts CHANGED
@@ -114,6 +114,8 @@ export interface AgentSessionState {
114
114
  phaseAgentsDispatched: Set<string>;
115
115
  /** Set of agents dispatched in the most recently completed phase (persisted across phase reset) */
116
116
  lastCompletedPhaseAgentsDispatched: Set<string>;
117
+ /** Session-scoped Turbo Mode flag for controlling LLM inference speed */
118
+ turboMode: boolean;
117
119
  }
118
120
  /**
119
121
  * Represents a single agent invocation window with isolated guardrail budgets.
@@ -173,8 +175,9 @@ export declare function resetSwarmState(): void;
173
175
  * @param sessionId - The session identifier
174
176
  * @param agentName - The agent associated with this session
175
177
  * @param staleDurationMs - Age threshold for stale session eviction (default: 120 min)
178
+ * @param directory - Optional project directory for rehydrating workflow state from disk
176
179
  */
177
- export declare function startAgentSession(sessionId: string, agentName: string, staleDurationMs?: number): void;
180
+ export declare function startAgentSession(sessionId: string, agentName: string, staleDurationMs?: number, directory?: string): void;
178
181
  /**
179
182
  * End an agent session by removing it from the state.
180
183
  * NOTE: Currently unused in production — no session lifecycle teardown is wired up.
@@ -196,9 +199,10 @@ export declare function getAgentSession(sessionId: string): AgentSessionState |
196
199
  * Always updates lastToolCallTime.
197
200
  * @param sessionId - The session identifier
198
201
  * @param agentName - Optional agent name (if known)
202
+ * @param directory - Optional project directory for rehydrating workflow state from disk
199
203
  * @returns The AgentSessionState
200
204
  */
201
- export declare function ensureAgentSession(sessionId: string, agentName?: string): AgentSessionState;
205
+ export declare function ensureAgentSession(sessionId: string, agentName?: string, directory?: string): AgentSessionState;
202
206
  /**
203
207
  * Update only the agent event timestamp (for stale detection).
204
208
  * Does NOT change agent name or reset guardrail state.
@@ -262,3 +266,27 @@ export declare function advanceTaskState(session: AgentSessionState, taskId: str
262
266
  * @returns Current task workflow state
263
267
  */
264
268
  export declare function getTaskState(session: AgentSessionState, taskId: string): TaskWorkflowState;
269
+ /**
270
+ * Rehydrates session workflow state from durable swarm files.
271
+ *
272
+ * Reads `.swarm/plan.json` and `.swarm/evidence/*.json` from the provided
273
+ * project directory, derives task workflow states from this data, and merges
274
+ * them into the target AgentSessionState.
275
+ *
276
+ * Merge rules:
277
+ * - Evidence-derived progression wins over plan-only state
278
+ * - Existing in-memory workflow states for the same task IDs are NOT downgraded
279
+ * - Missing/malformed `.swarm` data is non-fatal (silently skipped)
280
+ *
281
+ * This helper is useful for session restart scenarios where in-memory state
282
+ * is lost but durable files persist.
283
+ *
284
+ * @param directory - Project root containing .swarm/ subdirectory
285
+ * @param session - Target AgentSessionState to merge rehydrated state into
286
+ */
287
+ export declare function rehydrateSessionFromDisk(directory: string, session: AgentSessionState): Promise<void>;
288
+ /**
289
+ * Check if ANY active session has Turbo Mode enabled.
290
+ * @returns true if any session has turboMode: true
291
+ */
292
+ export declare function hasActiveTurboMode(): boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Adversarial security tests for Task 2.15: Session restart rehydration
3
+ *
4
+ * ONLY attack vectors - malformed inputs, oversized payloads, injection attempts, boundary violations
5
+ * Tests the security hardening of rehydrateSessionFromDisk, readPlanFromDisk, and readEvidenceFromDisk
6
+ */
7
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.25.9",
3
+ "version": "6.27.0",
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",