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.
- package/dist/cli/index.js +36 -24
- package/dist/index.js +3896 -3870
- package/dist/quality/index.d.ts +1 -1
- package/dist/quality/metrics.d.ts +5 -0
- package/dist/services/handoff-service.d.ts +5 -0
- package/dist/session/snapshot-writer.d.ts +4 -3
- package/package.json +1 -1
package/dist/quality/index.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
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.
|
|
100
|
-
*
|
|
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.
|
|
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",
|