opencode-swarm 6.9.0 → 6.10.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.
- package/README.md +72 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/config/schema.d.ts +7 -0
- package/dist/index.js +1790 -247
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/pre-check-batch.d.ts +54 -0
- package/package.json +2 -1
package/dist/tools/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { imports } from './imports';
|
|
|
10
10
|
export { lint } from './lint';
|
|
11
11
|
export { pkg_audit } from './pkg-audit';
|
|
12
12
|
export { type PlaceholderFinding, type PlaceholderScanInput, type PlaceholderScanResult, placeholderScan, } from './placeholder-scan';
|
|
13
|
+
export { type PreCheckBatchInput, type PreCheckBatchResult, pre_check_batch, runPreCheckBatch, type ToolResult, } from './pre-check-batch';
|
|
13
14
|
export { type QualityBudgetInput, type QualityBudgetResult, qualityBudget, } from './quality-budget';
|
|
14
15
|
export { retrieve_summary } from './retrieve-summary';
|
|
15
16
|
export { type SastScanFinding, type SastScanInput, type SastScanResult, sastScan, } from './sast-scan';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-Check Batch Tool
|
|
3
|
+
* Runs 4 verification tools in parallel: lint, secretscan, sast-scan, quality-budget
|
|
4
|
+
* Returns unified result with gates_passed status
|
|
5
|
+
*/
|
|
6
|
+
import { tool } from '@opencode-ai/plugin';
|
|
7
|
+
import type { PluginConfig } from '../config';
|
|
8
|
+
import type { LintResult } from './lint';
|
|
9
|
+
import type { QualityBudgetResult } from './quality-budget';
|
|
10
|
+
import type { SastScanResult } from './sast-scan';
|
|
11
|
+
import type { SecretscanErrorResult, SecretscanResult } from './secretscan';
|
|
12
|
+
export interface PreCheckBatchInput {
|
|
13
|
+
/** List of specific files to check (optional) */
|
|
14
|
+
files?: string[];
|
|
15
|
+
/** Directory to scan */
|
|
16
|
+
directory: string;
|
|
17
|
+
/** SAST severity threshold (default: medium) */
|
|
18
|
+
sast_threshold?: 'low' | 'medium' | 'high' | 'critical';
|
|
19
|
+
/** Optional plugin config */
|
|
20
|
+
config?: PluginConfig;
|
|
21
|
+
}
|
|
22
|
+
export interface ToolResult<T> {
|
|
23
|
+
/** Whether the tool was executed */
|
|
24
|
+
ran: boolean;
|
|
25
|
+
/** Tool result if successful */
|
|
26
|
+
result?: T;
|
|
27
|
+
/** Error message if failed */
|
|
28
|
+
error?: string;
|
|
29
|
+
/** Duration in milliseconds */
|
|
30
|
+
duration_ms: number;
|
|
31
|
+
}
|
|
32
|
+
export interface PreCheckBatchResult {
|
|
33
|
+
/** Overall gate status: true if all security gates pass */
|
|
34
|
+
gates_passed: boolean;
|
|
35
|
+
/** Lint tool result */
|
|
36
|
+
lint: ToolResult<LintResult>;
|
|
37
|
+
/** Secretscan tool result */
|
|
38
|
+
secretscan: ToolResult<SecretscanResult | SecretscanErrorResult>;
|
|
39
|
+
/** SAST scan tool result */
|
|
40
|
+
sast_scan: ToolResult<SastScanResult>;
|
|
41
|
+
/** Quality budget tool result */
|
|
42
|
+
quality_budget: ToolResult<QualityBudgetResult>;
|
|
43
|
+
/** Total duration in milliseconds */
|
|
44
|
+
total_duration_ms: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Run all 4 pre-check tools in parallel with concurrency limit
|
|
48
|
+
*/
|
|
49
|
+
export declare function runPreCheckBatch(input: PreCheckBatchInput): Promise<PreCheckBatchResult>;
|
|
50
|
+
/**
|
|
51
|
+
* Pre-check batch tool - runs 4 verification tools in parallel
|
|
52
|
+
* Returns unified result with gates_passed status
|
|
53
|
+
*/
|
|
54
|
+
export declare const pre_check_batch: ReturnType<typeof tool>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.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",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@opencode-ai/plugin": "^1.1.53",
|
|
43
43
|
"@opencode-ai/sdk": "^1.1.53",
|
|
44
44
|
"@vscode/tree-sitter-wasm": "^0.3.0",
|
|
45
|
+
"p-limit": "^7.3.0",
|
|
45
46
|
"web-tree-sitter": "^0.25.0",
|
|
46
47
|
"zod": "^4.1.8"
|
|
47
48
|
},
|