opencode-swarm 6.40.1 → 6.40.3

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.
@@ -1 +1 @@
1
- export { computeQualityMetrics, type QualityMetrics, type QualityViolation, } from './metrics';
1
+ export { computeQualityMetrics, estimateCyclomaticComplexity, type QualityMetrics, type QualityViolation, } from './metrics';
@@ -14,6 +14,11 @@ export interface QualityViolation {
14
14
  severity: 'error' | 'warning';
15
15
  files: string[];
16
16
  }
17
+ /**
18
+ * Estimate cyclomatic complexity from source code
19
+ * Counts: if, for, while, switch, case, catch, &&, ||, ternary ?, optional chaining, nullish coalescing
20
+ */
21
+ export declare function estimateCyclomaticComplexity(content: string): number;
17
22
  /**
18
23
  * Compute quality metrics for changed files
19
24
  */
@@ -59,3 +59,8 @@ export declare function getHandoffData(directory: string): Promise<HandoffData>;
59
59
  * Targets under 2K tokens for efficient context injection.
60
60
  */
61
61
  export declare function formatHandoffMarkdown(data: HandoffData): string;
62
+ /**
63
+ * Format handoff data as a continuation prompt for new agent sessions.
64
+ * Returns a terse markdown code block with essential context.
65
+ */
66
+ export declare function formatContinuationPrompt(data: HandoffData): string;
@@ -92,12 +92,13 @@ export declare function serializeAgentSession(s: AgentSessionState): SerializedA
92
92
  export declare function writeSnapshot(directory: string, state: typeof swarmState): Promise<void>;
93
93
  /**
94
94
  * Create a snapshot writer hook suitable for use in tool.execute.after.
95
- * Returns a hook function that writes the current swarmState to disk.
95
+ * Writes state immediately on every call. Concurrent calls are serialised so
96
+ * the last writer wins without producing a corrupt interleaved file.
96
97
  */
97
98
  export declare function createSnapshotWriterHook(directory: string): (input: unknown, output: unknown) => Promise<void>;
98
99
  /**
99
- * v6.33.1: Flush any pending debounced snapshot write immediately.
100
- * Used by phase-complete and handoff to ensure critical state transitions
100
+ * v6.35.4: Flush any in-flight snapshot write.
101
+ * Called by phase-complete and handoff to ensure critical state transitions
101
102
  * are persisted before returning.
102
103
  */
103
104
  export declare function flushPendingSnapshot(directory: string): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.40.1",
3
+ "version": "6.40.3",
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",