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/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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.10.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">
|
|
@@ -497,6 +497,77 @@ Runs repo-native build/typecheck commands. Ensures code compiles before review.
|
|
|
497
497
|
### quality_budget - Maintainability Enforcement
|
|
498
498
|
Enforces complexity, API, duplication, and test-to-code ratio budgets. Configurable thresholds.
|
|
499
499
|
|
|
500
|
+
## Parallel Pre-Check Batch (v6.10.0)
|
|
501
|
+
|
|
502
|
+
### pre_check_batch - Parallel Verification
|
|
503
|
+
|
|
504
|
+
Runs four verification tools in parallel for faster QA gate execution:
|
|
505
|
+
- **lint:check** - Code quality verification (hard gate)
|
|
506
|
+
- **secretscan** - Secret detection (hard gate)
|
|
507
|
+
- **sast_scan** - Static security analysis (hard gate)
|
|
508
|
+
- **quality_budget** - Maintainability metrics
|
|
509
|
+
|
|
510
|
+
**Purpose**: Reduces total gate execution time from ~60s (sequential) to ~15s (parallel) by running independent checks concurrently.
|
|
511
|
+
|
|
512
|
+
**When to use**: After `build_check` passes and before `@reviewer` — all 4 gates must pass for `gates_passed: true`.
|
|
513
|
+
|
|
514
|
+
**Usage**:
|
|
515
|
+
```typescript
|
|
516
|
+
const result = await pre_check_batch({
|
|
517
|
+
directory: ".",
|
|
518
|
+
files: ["src/auth.ts", "src/session.ts"],
|
|
519
|
+
sast_threshold: "medium"
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
// Returns:
|
|
523
|
+
// {
|
|
524
|
+
// gates_passed: boolean, // All hard gates passed
|
|
525
|
+
// lint: { ran, result, error, duration_ms },
|
|
526
|
+
// secretscan: { ran, result, error, duration_ms },
|
|
527
|
+
// sast_scan: { ran, result, error, duration_ms },
|
|
528
|
+
// quality_budget: { ran, result, error, duration_ms },
|
|
529
|
+
// total_duration_ms: number
|
|
530
|
+
// }
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
**Hard Gates** (must pass for gates_passed=true):
|
|
534
|
+
- Lint errors → Fix and retry
|
|
535
|
+
- Secrets found → Fix and retry
|
|
536
|
+
- SAST vulnerabilities at/above threshold → Fix and retry
|
|
537
|
+
- Quality budget violations → Refactor or adjust thresholds
|
|
538
|
+
|
|
539
|
+
**Parallel Execution Safety**:
|
|
540
|
+
- Max 4 concurrent operations via `p-limit`
|
|
541
|
+
- 60-second timeout per tool
|
|
542
|
+
- 500KB output size limit
|
|
543
|
+
- Individual tool failures don't cascade to others
|
|
544
|
+
|
|
545
|
+
### Configuration
|
|
546
|
+
|
|
547
|
+
Enable/disable parallel pre-check via `.opencode/swarm.json`:
|
|
548
|
+
|
|
549
|
+
```json
|
|
550
|
+
{
|
|
551
|
+
"pipeline": {
|
|
552
|
+
"parallel_precheck": true // default: true
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
Set to `false` to run gates sequentially (useful for debugging or resource-constrained environments).
|
|
558
|
+
|
|
559
|
+
### Updated Phase 5 QA Sequence (v6.10.0)
|
|
560
|
+
|
|
561
|
+
```
|
|
562
|
+
coder → diff → syntax_check → placeholder_scan → imports →
|
|
563
|
+
lint fix → build_check → pre_check_batch (parallel) →
|
|
564
|
+
reviewer → security reviewer → test_engineer → coverage check
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
### Rollback
|
|
568
|
+
|
|
569
|
+
If parallel execution causes issues, refer to `.swarm/ROLLBACK-pre-check-batch.md` for rollback instructions.
|
|
570
|
+
|
|
500
571
|
### Local-Only Guarantee
|
|
501
572
|
All v6.9.0 quality tools run locally without:
|
|
502
573
|
- Docker containers
|
package/dist/config/index.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export { ApprovalEvidenceSchema, BaseEvidenceSchema, DiffEvidenceSchema, EVIDENC
|
|
|
5
5
|
export { loadAgentPrompt, loadPluginConfig, loadPluginConfigWithMeta, } from './loader';
|
|
6
6
|
export type { MigrationStatus, Phase, PhaseStatus, Plan, Task, TaskSize, TaskStatus, } from './plan-schema';
|
|
7
7
|
export { MigrationStatusSchema, PhaseSchema, PhaseStatusSchema, PlanSchema, TaskSchema, TaskSizeSchema, TaskStatusSchema, } from './plan-schema';
|
|
8
|
-
export type { AgentOverrideConfig, AutomationCapabilities, AutomationConfig, AutomationMode, PluginConfig, SwarmConfig, } from './schema';
|
|
9
|
-
export { AgentOverrideConfigSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, AutomationModeSchema, PluginConfigSchema, SwarmConfigSchema, } from './schema';
|
|
8
|
+
export type { AgentOverrideConfig, AutomationCapabilities, AutomationConfig, AutomationMode, PipelineConfig, PluginConfig, SwarmConfig, } from './schema';
|
|
9
|
+
export { AgentOverrideConfigSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, AutomationModeSchema, PipelineConfigSchema, PluginConfigSchema, SwarmConfigSchema, } from './schema';
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -171,6 +171,10 @@ export declare const GateConfigSchema: z.ZodObject<{
|
|
|
171
171
|
}, z.core.$strip>;
|
|
172
172
|
}, z.core.$strip>;
|
|
173
173
|
export type GateConfig = z.infer<typeof GateConfigSchema>;
|
|
174
|
+
export declare const PipelineConfigSchema: z.ZodObject<{
|
|
175
|
+
parallel_precheck: z.ZodDefault<z.ZodBoolean>;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
export type PipelineConfig = z.infer<typeof PipelineConfigSchema>;
|
|
174
178
|
export declare const SummaryConfigSchema: z.ZodObject<{
|
|
175
179
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
176
180
|
threshold_bytes: z.ZodDefault<z.ZodNumber>;
|
|
@@ -343,6 +347,9 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
343
347
|
}, z.core.$strip>>>;
|
|
344
348
|
}, z.core.$strip>>>;
|
|
345
349
|
max_iterations: z.ZodDefault<z.ZodNumber>;
|
|
350
|
+
pipeline: z.ZodOptional<z.ZodObject<{
|
|
351
|
+
parallel_precheck: z.ZodDefault<z.ZodBoolean>;
|
|
352
|
+
}, z.core.$strip>>;
|
|
346
353
|
qa_retry_limit: z.ZodDefault<z.ZodNumber>;
|
|
347
354
|
inject_phase_reminders: z.ZodDefault<z.ZodBoolean>;
|
|
348
355
|
hooks: z.ZodOptional<z.ZodObject<{
|