opencode-swarm 6.67.1 → 6.68.1

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.
Files changed (71) hide show
  1. package/dist/cli/index.js +1201 -167
  2. package/dist/commands/brainstorm.d.ts +13 -0
  3. package/dist/commands/brainstorm.test.d.ts +1 -0
  4. package/dist/commands/index.d.ts +2 -0
  5. package/dist/commands/qa-gates.d.ts +15 -0
  6. package/dist/commands/qa-gates.test.d.ts +1 -0
  7. package/dist/commands/registry.d.ts +12 -0
  8. package/dist/db/global-db.d.ts +22 -0
  9. package/dist/db/global-db.test.d.ts +7 -0
  10. package/dist/db/index.d.ts +13 -0
  11. package/dist/db/project-db.d.ts +40 -0
  12. package/dist/db/project-db.test.d.ts +4 -0
  13. package/dist/db/qa-gate-profile.d.ts +89 -0
  14. package/dist/db/qa-gate-profile.test.d.ts +4 -0
  15. package/dist/diff/__tests__/semantic-classifier.test.d.ts +1 -0
  16. package/dist/diff/__tests__/summary-generator.test.d.ts +1 -0
  17. package/dist/diff/semantic-classifier.d.ts +55 -0
  18. package/dist/diff/summary-generator.d.ts +33 -0
  19. package/dist/index.js +3070 -919
  20. package/dist/mutation/__tests__/engine.adversarial.test.d.ts +1 -0
  21. package/dist/mutation/__tests__/engine.test.d.ts +1 -0
  22. package/dist/mutation/__tests__/equivalence.adversarial.test.d.ts +1 -0
  23. package/dist/mutation/__tests__/equivalence.test.d.ts +1 -0
  24. package/dist/mutation/__tests__/gate.adversarial.test.d.ts +1 -0
  25. package/dist/mutation/__tests__/gate.test.d.ts +1 -0
  26. package/dist/mutation/engine.d.ts +47 -0
  27. package/dist/mutation/equivalence.d.ts +35 -0
  28. package/dist/mutation/gate.d.ts +28 -0
  29. package/dist/state.d.ts +7 -0
  30. package/dist/test-impact/__tests__/analyzer-import-fix.adversarial.test.d.ts +1 -0
  31. package/dist/test-impact/__tests__/analyzer-import-fix.test.d.ts +1 -0
  32. package/dist/test-impact/__tests__/analyzer.adversarial.test.d.ts +1 -0
  33. package/dist/test-impact/__tests__/analyzer.test.d.ts +1 -0
  34. package/dist/test-impact/__tests__/council-fixes.test.d.ts +1 -0
  35. package/dist/test-impact/__tests__/failure-classifier.adversarial.test.d.ts +1 -0
  36. package/dist/test-impact/__tests__/failure-classifier.test.d.ts +1 -0
  37. package/dist/test-impact/__tests__/flaky-detector.adversarial.test.d.ts +1 -0
  38. package/dist/test-impact/__tests__/flaky-detector.test.d.ts +1 -0
  39. package/dist/test-impact/__tests__/history-store.adversarial.test.d.ts +1 -0
  40. package/dist/test-impact/__tests__/history-store.test.d.ts +1 -0
  41. package/dist/test-impact/__tests__/test-impact.adversarial.test.d.ts +1 -0
  42. package/dist/test-impact/__tests__/test-impact.test.d.ts +1 -0
  43. package/dist/test-impact/analyzer.d.ts +9 -0
  44. package/dist/test-impact/failure-classifier.d.ts +26 -0
  45. package/dist/test-impact/flaky-detector.d.ts +14 -0
  46. package/dist/test-impact/history-store.d.ts +15 -0
  47. package/dist/tools/__tests__/barrel-exports.test.d.ts +1 -0
  48. package/dist/tools/__tests__/diff-ast-fallback.test.d.ts +1 -0
  49. package/dist/tools/__tests__/diff-markdown-summary.test.d.ts +1 -0
  50. package/dist/tools/__tests__/diff-semantic.test.d.ts +1 -0
  51. package/dist/tools/__tests__/diff-summary.adversarial.test.d.ts +1 -0
  52. package/dist/tools/__tests__/diff-summary.test.d.ts +1 -0
  53. package/dist/tools/__tests__/mutation-test.adversarial.test.d.ts +1 -0
  54. package/dist/tools/__tests__/mutation-test.sourcefiles.test.d.ts +1 -0
  55. package/dist/tools/__tests__/mutation-test.test.d.ts +1 -0
  56. package/dist/tools/__tests__/test-runner-history.test.d.ts +1 -0
  57. package/dist/tools/__tests__/test-runner-impact.adversarial.test.d.ts +1 -0
  58. package/dist/tools/__tests__/test-runner-impact.test.d.ts +1 -0
  59. package/dist/tools/__tests__/test-runner-source-files.test.d.ts +1 -0
  60. package/dist/tools/diff-summary.d.ts +12 -0
  61. package/dist/tools/diff.d.ts +3 -0
  62. package/dist/tools/get-approved-plan.d.ts +4 -0
  63. package/dist/tools/get-qa-gate-profile.d.ts +27 -0
  64. package/dist/tools/index.d.ts +9 -0
  65. package/dist/tools/mutation-test.d.ts +2 -0
  66. package/dist/tools/mutation-test.security.test.d.ts +1 -0
  67. package/dist/tools/set-qa-gates.d.ts +37 -0
  68. package/dist/tools/test-impact.d.ts +2 -0
  69. package/dist/tools/test-runner.d.ts +4 -4
  70. package/dist/tools/tool-names.d.ts +1 -1
  71. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,47 @@
1
+ export type MutationOutcome = 'killed' | 'survived' | 'timeout' | 'error' | 'equivalent' | 'skipped';
2
+ export interface MutationPatch {
3
+ id: string;
4
+ filePath: string;
5
+ functionName: string;
6
+ mutationType: string;
7
+ patch: string;
8
+ lineNumber?: number;
9
+ }
10
+ export interface MutationResult {
11
+ patchId: string;
12
+ filePath: string;
13
+ functionName: string;
14
+ mutationType: string;
15
+ outcome: MutationOutcome;
16
+ testOutput?: string;
17
+ durationMs: number;
18
+ error?: string;
19
+ }
20
+ export interface MutationReport {
21
+ totalMutants: number;
22
+ killed: number;
23
+ survived: number;
24
+ timeout: number;
25
+ equivalent: number;
26
+ skipped: number;
27
+ errors: number;
28
+ killRate: number;
29
+ adjustedKillRate: number;
30
+ perFunction: Map<string, {
31
+ killed: number;
32
+ survived: number;
33
+ total: number;
34
+ equivalent: number;
35
+ skipped: number;
36
+ killRate: number;
37
+ }>;
38
+ results: MutationResult[];
39
+ durationMs: number;
40
+ budgetMs: number;
41
+ budgetExceeded: boolean;
42
+ timestamp: string;
43
+ }
44
+ export declare const MAX_MUTATIONS_PER_FUNCTION = 10;
45
+ export declare function executeMutation(patch: MutationPatch, testCommand: string[], _testFiles: string[], workingDir: string): Promise<MutationResult>;
46
+ export declare function computeReport(results: MutationResult[], durationMs: number, budgetMs?: number): MutationReport;
47
+ export declare function executeMutationSuite(patches: MutationPatch[], testCommand: string[], testFiles: string[], workingDir: string, budgetMs?: number, onProgress?: (completed: number, total: number, result: MutationResult) => void, sourceFiles?: Map<string, string>): Promise<MutationReport>;
@@ -0,0 +1,35 @@
1
+ import type { MutationPatch } from './engine.js';
2
+ /** Result of equivalence check for a single mutant */
3
+ export interface EquivalenceResult {
4
+ patchId: string;
5
+ isEquivalent: boolean;
6
+ method: 'static' | 'llm_judge' | 'skipped';
7
+ confidence: number;
8
+ reason: string;
9
+ }
10
+ /** Callback signature for LLM judge — injected by caller */
11
+ export type LLMJudgeCallback = (original: string, mutated: string, context: string) => Promise<{
12
+ isEquivalent: boolean;
13
+ confidence: number;
14
+ reason: string;
15
+ }>;
16
+ /**
17
+ * Stage 1: Static equivalence filter.
18
+ * Strips comments (single-line // and multi-line /* *\/), console.log/debugger statements,
19
+ * trailing whitespace, and blank lines. Returns true if the stripped versions are identical.
20
+ */
21
+ export declare function isStaticallyEquivalent(originalCode: string, mutatedCode: string): boolean;
22
+ /**
23
+ * Check a single mutant for equivalence using two-stage approach.
24
+ * Stage 1: static analysis. Stage 2: LLM judge (if provided and Stage 1 didn't determine equivalence).
25
+ */
26
+ export declare function checkEquivalence(patch: MutationPatch, originalCode: string, mutatedCode: string, llmJudge?: LLMJudgeCallback): Promise<EquivalenceResult>;
27
+ /**
28
+ * Batch check multiple mutants for equivalence.
29
+ * Returns results for all patches.
30
+ */
31
+ export declare function batchCheckEquivalence(patches: Array<{
32
+ patch: MutationPatch;
33
+ originalCode: string;
34
+ mutatedCode: string;
35
+ }>, llmJudge?: LLMJudgeCallback): Promise<EquivalenceResult[]>;
@@ -0,0 +1,28 @@
1
+ import type { MutationReport, MutationResult } from './engine.js';
2
+ export type MutationGateVerdict = 'pass' | 'warn' | 'fail';
3
+ export interface MutationGateResult {
4
+ verdict: MutationGateVerdict;
5
+ killRate: number;
6
+ adjustedKillRate: number;
7
+ totalMutants: number;
8
+ killed: number;
9
+ survived: number;
10
+ threshold: number;
11
+ warnThreshold: number;
12
+ message: string;
13
+ /** Survived mutants that need test improvements */
14
+ survivedMutants: MutationResult[];
15
+ /** Prompt for targeted test improvement (non-empty when verdict is 'warn' or 'fail') */
16
+ testImprovementPrompt: string;
17
+ }
18
+ /** Default thresholds */
19
+ export declare const PASS_THRESHOLD = 0.8;
20
+ export declare const WARN_THRESHOLD = 0.6;
21
+ /**
22
+ * Evaluate a mutation report against quality gate thresholds.
23
+ * @param report - The mutation report to evaluate
24
+ * @param passThreshold - Kill rate at or above this passes (default: 0.80)
25
+ * @param warnThreshold - Kill rate at or above this warns (default: 0.60)
26
+ * @returns MutationGateResult with verdict and details
27
+ */
28
+ export declare function evaluateMutationGate(report: MutationReport, passThreshold?: number, warnThreshold?: number): MutationGateResult;
package/dist/state.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * and delegation chains.
8
8
  */
9
9
  import type { OpencodeClient } from '@opencode-ai/sdk';
10
+ import type { QaGates } from './db/qa-gate-profile.js';
10
11
  import { type EnvironmentProfile } from './environment/profile.js';
11
12
  /**
12
13
  * Represents a single tool call entry for tracking purposes
@@ -133,6 +134,12 @@ export interface AgentSessionState {
133
134
  modelFallbackExhausted: boolean;
134
135
  /** Session-scoped Turbo Mode flag for controlling LLM inference speed */
135
136
  turboMode: boolean;
137
+ /** Session-level QA gate overrides layered on top of the spec-level profile.
138
+ * Overrides can only enable gates (true); false values are ignored by
139
+ * getEffectiveGates. Cleared on session reset. Optional for backwards
140
+ * compatibility with pre-existing session state fixtures; consumers
141
+ * should read via `session.qaGateSessionOverrides ?? {}`. */
142
+ qaGateSessionOverrides?: Partial<QaGates>;
136
143
  /** Session-scoped Full Auto flag for autonomous multi-agent oversight */
137
144
  fullAutoMode: boolean;
138
145
  /** Count of full-auto interactions this phase (for max_interactions_per_phase limit) */
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ export interface TestImpactResult {
2
+ impactedTests: string[];
3
+ unrelatedTests: string[];
4
+ untestedFiles: string[];
5
+ impactMap: Record<string, string[]>;
6
+ }
7
+ export declare function buildImpactMap(cwd: string): Promise<Record<string, string[]>>;
8
+ export declare function loadImpactMap(cwd: string): Promise<Record<string, string[]>>;
9
+ export declare function analyzeImpact(changedFiles: string[], cwd: string): Promise<TestImpactResult>;
@@ -0,0 +1,26 @@
1
+ import type { TestRunRecord } from './history-store.js';
2
+ export type FailureClassification = 'new_regression' | 'pre_existing' | 'flaky' | 'unknown';
3
+ export interface ClassifiedFailure {
4
+ testFile: string;
5
+ testName: string;
6
+ classification: FailureClassification;
7
+ errorMessage?: string;
8
+ stackPrefix?: string;
9
+ durationMs: number;
10
+ confidence: number;
11
+ }
12
+ export interface FailureCluster {
13
+ clusterId: string;
14
+ rootCause: string;
15
+ stackPrefix?: string;
16
+ errorMessage?: string;
17
+ failures: ClassifiedFailure[];
18
+ classification: FailureClassification;
19
+ affectedTestFiles: string[];
20
+ }
21
+ export declare function classifyFailure(currentResult: TestRunRecord, history: TestRunRecord[]): ClassifiedFailure;
22
+ export declare function clusterFailures(failures: ClassifiedFailure[]): FailureCluster[];
23
+ export declare function classifyAndCluster(testResults: TestRunRecord[], history: TestRunRecord[]): {
24
+ classified: ClassifiedFailure[];
25
+ clusters: FailureCluster[];
26
+ };
@@ -0,0 +1,14 @@
1
+ import type { TestRunRecord } from './history-store.js';
2
+ export interface FlakyTestEntry {
3
+ testFile: string;
4
+ testName: string;
5
+ flakyScore: number;
6
+ totalRuns: number;
7
+ alternationCount: number;
8
+ isQuarantined: boolean;
9
+ recentResults: Array<'pass' | 'fail' | 'skip'>;
10
+ recommendation?: string;
11
+ }
12
+ export declare function computeFlakyScore(history: TestRunRecord[]): number;
13
+ export declare function detectFlakyTests(allHistory: TestRunRecord[]): FlakyTestEntry[];
14
+ export declare function isTestQuarantined(testFile: string, testName: string, allHistory: TestRunRecord[]): boolean;
@@ -0,0 +1,15 @@
1
+ export type TestRunResult = 'pass' | 'fail' | 'skip';
2
+ export interface TestRunRecord {
3
+ timestamp: string;
4
+ taskId: string;
5
+ testFile: string;
6
+ testName: string;
7
+ result: TestRunResult;
8
+ durationMs: number;
9
+ errorMessage?: string;
10
+ stackPrefix?: string;
11
+ changedFiles: string[];
12
+ }
13
+ export declare function appendTestRun(record: TestRunRecord, workingDir?: string): void;
14
+ export declare function getTestHistory(testFile: string, workingDir?: string): TestRunRecord[];
15
+ export declare function getAllHistory(workingDir?: string): TestRunRecord[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { type ChangeCategory, type RiskLevel } from '../diff/semantic-classifier.js';
2
+ import { createSwarmTool } from './create-tool';
3
+ export interface DiffSummaryArgs {
4
+ files: string[];
5
+ classification?: ChangeCategory;
6
+ riskLevel?: RiskLevel;
7
+ }
8
+ /**
9
+ * Standalone tool that wraps the semantic classifier + summary generator
10
+ * to produce a filtered SemanticDiffSummary.
11
+ */
12
+ export declare const diff_summary: ReturnType<typeof createSwarmTool>;
@@ -1,4 +1,5 @@
1
1
  import { type ASTDiffResult } from '../diff/ast-diff.js';
2
+ import { type SemanticDiffSummary } from '../diff/summary-generator.js';
2
3
  import { createSwarmTool } from './create-tool';
3
4
  export interface DiffResult {
4
5
  files: Array<{
@@ -10,6 +11,8 @@ export interface DiffResult {
10
11
  hasContractChanges: boolean;
11
12
  summary: string;
12
13
  astDiffs?: ASTDiffResult[];
14
+ semanticSummary?: SemanticDiffSummary;
15
+ markdownSummary?: string;
13
16
  }
14
17
  export interface DiffErrorResult {
15
18
  error: string;
@@ -22,6 +22,10 @@ interface GetApprovedPlanResult {
22
22
  current_plan?: CurrentPlanPayload | null;
23
23
  drift_detected?: boolean | 'unknown';
24
24
  current_plan_error?: string;
25
+ /** SHA-256 hex digest over {plan_id, gates} of the current QA gate profile,
26
+ * or null when no profile exists for this plan. Used by the critic to
27
+ * detect silent gate mutations post-approval. */
28
+ qa_profile_hash?: string | null;
25
29
  }
26
30
  interface ApprovedPlanPayload {
27
31
  plan: unknown;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Tool to retrieve the QA gate profile for the current plan.
3
+ *
4
+ * Read-only: derives plan_id from plan.json, then looks up the profile in the
5
+ * per-project DB. Returns the spec-level profile gates, lock state, and profile
6
+ * hash. Callers layering session overrides should combine with
7
+ * `getEffectiveGates` themselves — this tool intentionally returns the
8
+ * persisted/locked spec-level view.
9
+ */
10
+ import type { tool } from '@opencode-ai/plugin';
11
+ interface GetQaGateProfileResult {
12
+ success: boolean;
13
+ reason?: string;
14
+ plan_id?: string;
15
+ profile?: {
16
+ plan_id: string;
17
+ project_type: string | null;
18
+ gates: Record<string, boolean>;
19
+ locked_at: string | null;
20
+ locked_by_snapshot_seq: number | null;
21
+ created_at: string;
22
+ profile_hash: string;
23
+ };
24
+ }
25
+ export declare function executeGetQaGateProfile(_args: Record<string, unknown>, directory: string): Promise<GetQaGateProfileResult>;
26
+ export declare const get_qa_gate_profile: ReturnType<typeof tool>;
27
+ export {};
@@ -10,11 +10,13 @@ export { curator_analyze } from './curator-analyze';
10
10
  export { declare_council_criteria } from './declare-council-criteria';
11
11
  export { declare_scope } from './declare-scope';
12
12
  export { type DiffErrorResult, type DiffResult, diff } from './diff';
13
+ export { diff_summary } from './diff-summary';
13
14
  export { doc_extract, doc_scan } from './doc-scan';
14
15
  export { detect_domains } from './domain-detector';
15
16
  export { evidence_check } from './evidence-check';
16
17
  export { extract_code_blocks } from './file-extractor';
17
18
  export { get_approved_plan } from './get-approved-plan';
19
+ export { get_qa_gate_profile } from './get-qa-gate-profile';
18
20
  export { fetchGitingest, type GitingestArgs, gitingest } from './gitingest';
19
21
  export { imports } from './imports';
20
22
  export { knowledge_add } from './knowledge-add';
@@ -38,13 +40,20 @@ export { type SbomGenerateInput, type SbomGenerateResult, sbom_generate, } from
38
40
  export { schema_drift } from './schema-drift';
39
41
  export { search } from './search';
40
42
  export { type SecretFinding, type SecretscanResult, secretscan, } from './secretscan';
43
+ export { set_qa_gates } from './set-qa-gates';
41
44
  import { suggestPatch } from './suggest-patch';
42
45
  export { suggestPatch };
43
46
  export type { SuggestPatchArgs } from './suggest-patch';
44
47
  export declare const suggest_patch: typeof suggestPatch;
48
+ export type { ClassifiedFailure, FailureClassification, FailureCluster, } from '../test-impact/failure-classifier.js';
49
+ export { classifyAndCluster, classifyFailure, clusterFailures, } from '../test-impact/failure-classifier.js';
50
+ export type { FlakyTestEntry } from '../test-impact/flaky-detector.js';
51
+ export { computeFlakyScore, detectFlakyTests, isTestQuarantined, } from '../test-impact/flaky-detector.js';
45
52
  export { lint_spec } from './lint-spec';
53
+ export { mutation_test } from './mutation-test';
46
54
  export { symbols } from './symbols';
47
55
  export { type SyntaxCheckFileResult, type SyntaxCheckInput, type SyntaxCheckResult, syntax_check, syntaxCheck, } from './syntax-check';
56
+ export { test_impact } from './test-impact';
48
57
  export { test_runner } from './test-runner';
49
58
  export { todo_extract } from './todo-extract';
50
59
  export { executeUpdateTaskStatus, type UpdateTaskStatusArgs, type UpdateTaskStatusResult, update_task_status, } from './update-task-status';
@@ -0,0 +1,2 @@
1
+ import { createSwarmTool } from './create-tool';
2
+ export declare const mutation_test: ReturnType<typeof createSwarmTool>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Tool to configure the QA gate profile for the current plan.
3
+ *
4
+ * Architect-only: invoked during the QA GATE SELECTION phase of brainstorm
5
+ * mode (or equivalent). Ratchet-tighter only — cannot disable gates that are
6
+ * already enabled. Rejects all writes once the profile is locked.
7
+ *
8
+ * Creates the profile with defaults if missing, then applies the requested
9
+ * partial update.
10
+ */
11
+ import { tool } from '@opencode-ai/plugin';
12
+ export interface SetQaGatesArgs {
13
+ reviewer?: boolean;
14
+ test_engineer?: boolean;
15
+ council_mode?: boolean;
16
+ sme_enabled?: boolean;
17
+ critic_pre_plan?: boolean;
18
+ hallucination_guard?: boolean;
19
+ sast_enabled?: boolean;
20
+ project_type?: string;
21
+ }
22
+ interface SetQaGatesResult {
23
+ success: boolean;
24
+ reason?: string;
25
+ message?: string;
26
+ plan_id?: string;
27
+ profile?: {
28
+ plan_id: string;
29
+ gates: Record<string, boolean>;
30
+ locked_at: string | null;
31
+ locked_by_snapshot_seq: number | null;
32
+ profile_hash: string;
33
+ };
34
+ }
35
+ export declare function executeSetQaGates(args: SetQaGatesArgs, directory: string): Promise<SetQaGatesResult>;
36
+ export declare const set_qa_gates: ReturnType<typeof tool>;
37
+ export {};
@@ -0,0 +1,2 @@
1
+ import { createSwarmTool } from './create-tool';
2
+ export declare const test_impact: ReturnType<typeof createSwarmTool>;
@@ -7,7 +7,7 @@ export declare const MAX_SAFE_TEST_FILES = 50;
7
7
  export declare const SUPPORTED_FRAMEWORKS: readonly ["bun", "vitest", "jest", "mocha", "pytest", "cargo", "pester", "go-test", "maven", "gradle", "dotnet-test", "ctest", "swift-test", "dart-test", "rspec", "minitest"];
8
8
  export type TestFramework = (typeof SUPPORTED_FRAMEWORKS)[number] | 'none';
9
9
  export interface TestRunnerArgs {
10
- scope?: 'all' | 'convention' | 'graph';
10
+ scope?: 'all' | 'convention' | 'graph' | 'impact';
11
11
  files?: string[];
12
12
  coverage?: boolean;
13
13
  timeout_ms?: number;
@@ -23,7 +23,7 @@ export interface TestTotals {
23
23
  export interface TestSuccessResult {
24
24
  success: true;
25
25
  framework: TestFramework;
26
- scope: 'all' | 'convention' | 'graph';
26
+ scope: 'all' | 'convention' | 'graph' | 'impact';
27
27
  command: string[];
28
28
  timeout_ms: number;
29
29
  duration_ms: number;
@@ -36,7 +36,7 @@ export interface TestSuccessResult {
36
36
  export interface TestErrorResult {
37
37
  success: false;
38
38
  framework: TestFramework;
39
- scope: 'all' | 'convention' | 'graph';
39
+ scope: 'all' | 'convention' | 'graph' | 'impact';
40
40
  command?: string[];
41
41
  timeout_ms?: number;
42
42
  duration_ms?: number;
@@ -50,5 +50,5 @@ export interface TestErrorResult {
50
50
  }
51
51
  export type TestResult = TestSuccessResult | TestErrorResult;
52
52
  export declare function detectTestFramework(cwd: string): Promise<TestFramework>;
53
- export declare function runTests(framework: TestFramework, scope: 'all' | 'convention' | 'graph', files: string[], coverage: boolean, timeout_ms: number, cwd: string): Promise<TestResult>;
53
+ export declare function runTests(framework: TestFramework, scope: 'all' | 'convention' | 'graph' | 'impact', files: string[], coverage: boolean, timeout_ms: number, cwd: string): Promise<TestResult>;
54
54
  export declare const test_runner: ReturnType<typeof tool>;
@@ -3,7 +3,7 @@
3
3
  * Used for constants and agent setup references.
4
4
  */
5
5
  /** Union type of all valid tool names */
6
- export type ToolName = 'diff' | 'syntax_check' | 'placeholder_scan' | 'imports' | 'lint' | 'secretscan' | 'sast_scan' | 'build_check' | 'pre_check_batch' | 'quality_budget' | 'symbols' | 'complexity_hotspots' | 'schema_drift' | 'todo_extract' | 'evidence_check' | 'check_gate_status' | 'completion_verify' | 'convene_council' | 'declare_council_criteria' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'lint_spec' | 'write_retro' | 'write_drift_evidence' | 'declare_scope' | 'knowledge_query' | 'doc_scan' | 'doc_extract' | 'curator_analyze' | 'knowledge_add' | 'knowledge_recall' | 'knowledge_remove' | 'co_change_analyzer' | 'search' | 'batch_symbols' | 'suggest_patch' | 'req_coverage' | 'get_approved_plan' | 'repo_map';
6
+ export type ToolName = 'diff' | 'diff_summary' | 'syntax_check' | 'placeholder_scan' | 'imports' | 'lint' | 'secretscan' | 'sast_scan' | 'build_check' | 'pre_check_batch' | 'quality_budget' | 'symbols' | 'complexity_hotspots' | 'schema_drift' | 'todo_extract' | 'evidence_check' | 'check_gate_status' | 'completion_verify' | 'convene_council' | 'declare_council_criteria' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'test_impact' | 'mutation_test' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'lint_spec' | 'write_retro' | 'write_drift_evidence' | 'declare_scope' | 'knowledge_query' | 'doc_scan' | 'doc_extract' | 'curator_analyze' | 'knowledge_add' | 'knowledge_recall' | 'knowledge_remove' | 'co_change_analyzer' | 'search' | 'batch_symbols' | 'suggest_patch' | 'req_coverage' | 'get_approved_plan' | 'repo_map' | 'get_qa_gate_profile' | 'set_qa_gates';
7
7
  /** Readonly array of all tool names */
8
8
  export declare const TOOL_NAMES: readonly ToolName[];
9
9
  /** Set for O(1) tool name validation */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.67.1",
3
+ "version": "6.68.1",
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",