opencode-swarm 6.8.0 → 6.9.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 +55 -2
- package/dist/build/discovery.d.ts +36 -0
- package/dist/config/evidence-schema.d.ts +633 -0
- package/dist/config/schema.d.ts +80 -0
- package/dist/evidence/manager.d.ts +19 -1
- package/dist/index.js +6834 -1041
- package/dist/lang/grammars/tree-sitter-bash.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-c-sharp.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-cpp.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-css.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-go.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-ini.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-java.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-javascript.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-php.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-powershell.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-python.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-regex.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-ruby.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-rust.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-tsx.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-typescript.wasm +0 -0
- package/dist/lang/grammars/tree-sitter.wasm +0 -0
- package/dist/lang/index.d.ts +2 -0
- package/dist/lang/registry.d.ts +24 -0
- package/dist/lang/runtime.d.ts +35 -0
- package/dist/quality/index.d.ts +1 -0
- package/dist/quality/metrics.d.ts +20 -0
- package/dist/sast/rules/c.d.ts +9 -0
- package/dist/sast/rules/csharp.d.ts +9 -0
- package/dist/sast/rules/go.d.ts +9 -0
- package/dist/sast/rules/index.d.ts +72 -0
- package/dist/sast/rules/java.d.ts +9 -0
- package/dist/sast/rules/javascript.d.ts +9 -0
- package/dist/sast/rules/php.d.ts +9 -0
- package/dist/sast/rules/python.d.ts +9 -0
- package/dist/sast/semgrep.d.ts +64 -0
- package/dist/sast/semgrep.test.d.ts +1 -0
- package/dist/sbom/cyclonedx.d.ts +101 -0
- package/dist/sbom/detectors/dart.d.ts +7 -0
- package/dist/sbom/detectors/dotnet.d.ts +7 -0
- package/dist/sbom/detectors/go.d.ts +7 -0
- package/dist/sbom/detectors/index.d.ts +53 -0
- package/dist/sbom/detectors/java.d.ts +7 -0
- package/dist/sbom/detectors/nodejs.d.ts +7 -0
- package/dist/sbom/detectors/python.d.ts +7 -0
- package/dist/sbom/detectors/rust.d.ts +7 -0
- package/dist/sbom/detectors/swift.d.ts +7 -0
- package/dist/tools/build-check.d.ts +50 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/placeholder-scan.d.ts +26 -0
- package/dist/tools/quality-budget.d.ts +24 -0
- package/dist/tools/sast-scan.d.ts +52 -0
- package/dist/tools/sbom-generate.d.ts +26 -0
- package/dist/tools/syntax-check.d.ts +35 -0
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/version-6.
|
|
2
|
+
<img src="https://img.shields.io/badge/version-6.9.0-blue" alt="Version">
|
|
3
3
|
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
|
4
4
|
<img src="https://img.shields.io/badge/opencode-plugin-purple" alt="OpenCode Plugin">
|
|
5
5
|
<img src="https://img.shields.io/badge/agents-9-orange" alt="Agents">
|
|
6
|
-
<img src="https://img.shields.io/badge/tests-
|
|
6
|
+
<img src="https://img.shields.io/badge/tests-6000+-brightgreen" alt="Tests">
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<h1 align="center">🐝 OpenCode Swarm</h1>
|
|
@@ -477,6 +477,59 @@ Zero additional test dependencies. Uses Bun's built-in test runner.
|
|
|
477
477
|
|
|
478
478
|
---
|
|
479
479
|
|
|
480
|
+
## Quality Gates (v6.9.0)
|
|
481
|
+
|
|
482
|
+
### syntax_check - Tree-sitter Parse Validation
|
|
483
|
+
Validates syntax across 9+ languages using Tree-sitter parsers. Catches syntax errors before review.
|
|
484
|
+
|
|
485
|
+
### placeholder_scan - Anti-Slop Detection
|
|
486
|
+
Detects TODO/FIXME comments, placeholder text, and stub implementations. Prevents shipping incomplete code.
|
|
487
|
+
|
|
488
|
+
### sast_scan - Static Security Analysis
|
|
489
|
+
Offline SAST with 63+ security rules across 9 languages. Optional Semgrep Tier B enhancement if available on PATH.
|
|
490
|
+
|
|
491
|
+
### sbom_generate - Dependency Tracking
|
|
492
|
+
Generates CycloneDX SBOMs from manifests/lock files. Tracks dependencies for 8 ecosystems.
|
|
493
|
+
|
|
494
|
+
### build_check - Build Verification
|
|
495
|
+
Runs repo-native build/typecheck commands. Ensures code compiles before review.
|
|
496
|
+
|
|
497
|
+
### quality_budget - Maintainability Enforcement
|
|
498
|
+
Enforces complexity, API, duplication, and test-to-code ratio budgets. Configurable thresholds.
|
|
499
|
+
|
|
500
|
+
### Local-Only Guarantee
|
|
501
|
+
All v6.9.0 quality tools run locally without:
|
|
502
|
+
- Docker containers
|
|
503
|
+
- Network connections
|
|
504
|
+
- External APIs
|
|
505
|
+
- Cloud services
|
|
506
|
+
|
|
507
|
+
Optional enhancement: Semgrep (if already on PATH)
|
|
508
|
+
|
|
509
|
+
### Configuration
|
|
510
|
+
Configure gates in `.opencode/swarm.json`:
|
|
511
|
+
|
|
512
|
+
```json
|
|
513
|
+
{
|
|
514
|
+
"gates": {
|
|
515
|
+
"syntax_check": { "enabled": true },
|
|
516
|
+
"placeholder_scan": { "enabled": true },
|
|
517
|
+
"sast_scan": { "enabled": true },
|
|
518
|
+
"sbom_generate": { "enabled": true },
|
|
519
|
+
"build_check": { "enabled": true },
|
|
520
|
+
"quality_budget": {
|
|
521
|
+
"enabled": true,
|
|
522
|
+
"max_complexity_delta": 5,
|
|
523
|
+
"max_public_api_delta": 10,
|
|
524
|
+
"max_duplication_ratio": 0.05,
|
|
525
|
+
"min_test_to_code_ratio": 0.3
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
480
533
|
## Roadmap
|
|
481
534
|
|
|
482
535
|
### v6.3 — Pre-Reviewer Pipeline
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { tool } from '@opencode-ai/plugin';
|
|
2
|
+
export interface BuildCommand {
|
|
3
|
+
ecosystem: string;
|
|
4
|
+
command: string;
|
|
5
|
+
cwd: string;
|
|
6
|
+
priority: number;
|
|
7
|
+
}
|
|
8
|
+
export interface BuildDiscoveryResult {
|
|
9
|
+
commands: BuildCommand[];
|
|
10
|
+
skipped: {
|
|
11
|
+
ecosystem: string;
|
|
12
|
+
reason: string;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
export interface BuildDiscoveryOptions {
|
|
16
|
+
scope?: 'changed' | 'all';
|
|
17
|
+
changedFiles?: string[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Check if a command exists on PATH
|
|
21
|
+
* Uses 'where' on Windows, 'which' on Unix
|
|
22
|
+
*/
|
|
23
|
+
export declare function isCommandAvailable(command: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Discover build commands for a given working directory
|
|
26
|
+
*/
|
|
27
|
+
export declare function discoverBuildCommands(workingDir: string, options?: BuildDiscoveryOptions): Promise<BuildDiscoveryResult>;
|
|
28
|
+
/**
|
|
29
|
+
* Clear the toolchain cache (useful for testing)
|
|
30
|
+
*/
|
|
31
|
+
export declare function clearToolchainCache(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Get ecosystem info for display
|
|
34
|
+
*/
|
|
35
|
+
export declare function getEcosystems(): string[];
|
|
36
|
+
export declare const build_discovery: ReturnType<typeof tool>;
|