opencode-swarm 6.68.0 → 6.69.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/dist/cli/index.js +844 -162
- package/dist/diff/__tests__/semantic-classifier.test.d.ts +1 -0
- package/dist/diff/__tests__/summary-generator.test.d.ts +1 -0
- package/dist/diff/semantic-classifier.d.ts +55 -0
- package/dist/diff/summary-generator.d.ts +33 -0
- package/dist/index.js +2858 -871
- package/dist/mutation/__tests__/engine.adversarial.test.d.ts +1 -0
- package/dist/mutation/__tests__/engine.test.d.ts +1 -0
- package/dist/mutation/__tests__/equivalence.adversarial.test.d.ts +1 -0
- package/dist/mutation/__tests__/equivalence.test.d.ts +1 -0
- package/dist/mutation/__tests__/gate.adversarial.test.d.ts +1 -0
- package/dist/mutation/__tests__/gate.test.d.ts +1 -0
- package/dist/mutation/engine.d.ts +47 -0
- package/dist/mutation/equivalence.d.ts +35 -0
- package/dist/mutation/gate.d.ts +28 -0
- package/dist/test-impact/__tests__/analyzer-import-fix.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/analyzer-import-fix.test.d.ts +1 -0
- package/dist/test-impact/__tests__/analyzer.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/analyzer.test.d.ts +1 -0
- package/dist/test-impact/__tests__/council-fixes.test.d.ts +1 -0
- package/dist/test-impact/__tests__/failure-classifier.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/failure-classifier.test.d.ts +1 -0
- package/dist/test-impact/__tests__/flaky-detector.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/flaky-detector.test.d.ts +1 -0
- package/dist/test-impact/__tests__/history-store.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/history-store.test.d.ts +1 -0
- package/dist/test-impact/__tests__/test-impact.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/test-impact.test.d.ts +1 -0
- package/dist/test-impact/analyzer.d.ts +9 -0
- package/dist/test-impact/failure-classifier.d.ts +26 -0
- package/dist/test-impact/flaky-detector.d.ts +14 -0
- package/dist/test-impact/history-store.d.ts +15 -0
- package/dist/tools/__tests__/barrel-exports.test.d.ts +1 -0
- package/dist/tools/__tests__/diff-ast-fallback.test.d.ts +1 -0
- package/dist/tools/__tests__/diff-markdown-summary.test.d.ts +1 -0
- package/dist/tools/__tests__/diff-semantic.test.d.ts +1 -0
- package/dist/tools/__tests__/diff-summary.adversarial.test.d.ts +1 -0
- package/dist/tools/__tests__/diff-summary.test.d.ts +1 -0
- package/dist/tools/__tests__/mutation-test.adversarial.test.d.ts +1 -0
- package/dist/tools/__tests__/mutation-test.sourcefiles.test.d.ts +1 -0
- package/dist/tools/__tests__/mutation-test.test.d.ts +1 -0
- package/dist/tools/__tests__/test-runner-history.test.d.ts +1 -0
- package/dist/tools/__tests__/test-runner-impact.adversarial.test.d.ts +1 -0
- package/dist/tools/__tests__/test-runner-impact.test.d.ts +1 -0
- package/dist/tools/__tests__/test-runner-source-files.test.d.ts +1 -0
- package/dist/tools/diff-summary.d.ts +12 -0
- package/dist/tools/diff.d.ts +3 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/mutation-test.d.ts +2 -0
- package/dist/tools/mutation-test.security.test.d.ts +1 -0
- package/dist/tools/test-impact.d.ts +2 -0
- package/dist/tools/test-runner.d.ts +4 -4
- package/dist/tools/tool-names.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic classifier for AST changes.
|
|
3
|
+
* Classifies AST changes into semantic categories with risk ranking.
|
|
4
|
+
* @module diff/semantic-classifier
|
|
5
|
+
*/
|
|
6
|
+
import type { ASTDiffResult } from '../diff/ast-diff.js';
|
|
7
|
+
/**
|
|
8
|
+
* Semantic categories for classified changes.
|
|
9
|
+
* Describes the nature of the change from a code impact perspective.
|
|
10
|
+
*/
|
|
11
|
+
export type ChangeCategory = 'SIGNATURE_CHANGE' | 'API_CHANGE' | 'GUARD_REMOVED' | 'LOGIC_CHANGE' | 'DELETED_FUNCTION' | 'NEW_FUNCTION' | 'REFACTOR' | 'COSMETIC' | 'UNCLASSIFIED';
|
|
12
|
+
/**
|
|
13
|
+
* Risk level associated with a classified change.
|
|
14
|
+
* Indicates the potential impact severity of the change.
|
|
15
|
+
*/
|
|
16
|
+
export type RiskLevel = 'Critical' | 'High' | 'Medium' | 'Low';
|
|
17
|
+
/**
|
|
18
|
+
* A classified AST change with semantic categorization and risk assessment.
|
|
19
|
+
*/
|
|
20
|
+
export interface ClassifiedChange {
|
|
21
|
+
/** Semantic category of the change */
|
|
22
|
+
category: ChangeCategory;
|
|
23
|
+
/** Risk level indicating potential impact severity */
|
|
24
|
+
riskLevel: RiskLevel;
|
|
25
|
+
/** Path to the file containing this change */
|
|
26
|
+
filePath: string;
|
|
27
|
+
/** Name of the symbol (function, class, etc.) affected */
|
|
28
|
+
symbolName: string;
|
|
29
|
+
/** Type of change operation */
|
|
30
|
+
changeType: 'added' | 'modified' | 'removed';
|
|
31
|
+
/** Starting line number of the change */
|
|
32
|
+
lineStart: number;
|
|
33
|
+
/** Ending line number of the change */
|
|
34
|
+
lineEnd: number;
|
|
35
|
+
/** Human-readable description of what was detected */
|
|
36
|
+
description: string;
|
|
37
|
+
/** Original AST change signature detail (if available) */
|
|
38
|
+
signature?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Classify an array of AST diff results into semantic categories with risk levels.
|
|
42
|
+
*
|
|
43
|
+
* @param astDiffs - Array of ASTDiffResult from the AST differ
|
|
44
|
+
* @returns Array of ClassifiedChange with semantic categorization
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const diffs = await astDiff(oldCode, newCode);
|
|
49
|
+
* const classified = classifyChanges(diffs);
|
|
50
|
+
* for (const change of classified) {
|
|
51
|
+
* console.log(`[${change.riskLevel}] ${change.category}: ${change.symbolName}`);
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function classifyChanges(astDiffs: ASTDiffResult[]): ClassifiedChange[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ChangeCategory, ClassifiedChange, RiskLevel } from './semantic-classifier.js';
|
|
2
|
+
/**
|
|
3
|
+
* Structured summary of classified semantic diff changes.
|
|
4
|
+
* Provides multiple views for different review workflows.
|
|
5
|
+
*/
|
|
6
|
+
export interface SemanticDiffSummary {
|
|
7
|
+
/** Number of files with changes */
|
|
8
|
+
totalFiles: number;
|
|
9
|
+
/** Total number of classified changes */
|
|
10
|
+
totalChanges: number;
|
|
11
|
+
/** Changes grouped by risk level */
|
|
12
|
+
byRisk: Record<RiskLevel, ClassifiedChange[]>;
|
|
13
|
+
/** Changes grouped by category */
|
|
14
|
+
byCategory: Record<ChangeCategory, ClassifiedChange[]>;
|
|
15
|
+
/** Quick access to Critical items for gate checks */
|
|
16
|
+
criticalItems: ClassifiedChange[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Generates a structured summary from classified changes.
|
|
20
|
+
* Provides by-risk and by-category groupings plus critical item quick access.
|
|
21
|
+
*
|
|
22
|
+
* @param changes - Array of classified changes to summarize
|
|
23
|
+
* @returns SemanticDiffSummary with all grouping views
|
|
24
|
+
*/
|
|
25
|
+
export declare function generateSummary(changes: ClassifiedChange[]): SemanticDiffSummary;
|
|
26
|
+
/**
|
|
27
|
+
* Generates reviewer-ready markdown summary from a SemanticDiffSummary.
|
|
28
|
+
* Format groups by risk level with file:category annotations.
|
|
29
|
+
*
|
|
30
|
+
* @param summary - The structured summary to render as markdown
|
|
31
|
+
* @returns Markdown-formatted string ready for PR review
|
|
32
|
+
*/
|
|
33
|
+
export declare function generateSummaryMarkdown(summary: SemanticDiffSummary): string;
|