@wrongstack/tools 0.306.3 → 0.307.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/audit.js +50 -9
- package/dist/auto-proceed-loop-guard.js +8 -2
- package/dist/bash.js +57 -22
- package/dist/builtin.d.ts +6 -6
- package/dist/builtin.js +11315 -9317
- package/dist/clarify.d.ts +32 -0
- package/dist/codebase-index/ast-invariant-engine.d.ts +102 -0
- package/dist/codebase-index/ast-symbol-mutator.d.ts +28 -0
- package/dist/codebase-index/background-indexer.d.ts +9 -0
- package/dist/codebase-index/codebase-ast-replace-tool.d.ts +31 -0
- package/dist/codebase-index/codebase-impact-analysis-tool.d.ts +40 -0
- package/dist/codebase-index/codebase-invariant-check-tool.d.ts +23 -0
- package/dist/codebase-index/codebase-repo-map-tool.d.ts +22 -0
- package/dist/codebase-index/codebase-skeleton-tool.d.ts +36 -0
- package/dist/codebase-index/codebase-targeted-test-tool.d.ts +30 -0
- package/dist/codebase-index/index.d.ts +11 -1
- package/dist/codebase-index/index.js +4141 -1479
- package/dist/codebase-index/project-server-client-state.d.ts +79 -0
- package/dist/codebase-index/project-server-client.d.ts +3 -71
- package/dist/codebase-index/project-server-protocol.d.ts +1 -0
- package/dist/codebase-index/project-server.js +751 -909
- package/dist/codebase-index/repo-map.d.ts +20 -0
- package/dist/codebase-index/skeleton-extractor.d.ts +64 -0
- package/dist/codebase-index/tree-sitter-parser.d.ts +11 -0
- package/dist/codebase-index/worker.js +723 -891
- package/dist/codebase-index/writer-mutations.d.ts +26 -0
- package/dist/codebase-index/writer-refs.d.ts +50 -0
- package/dist/codebase-index/writer-search.d.ts +30 -0
- package/dist/codebase-index/writer.d.ts +2 -320
- package/dist/diff.js +3 -2
- package/dist/document.js +37 -2
- package/dist/e2e.js +3 -2
- package/dist/edit.js +8558 -348
- package/dist/exec.js +76 -22
- package/dist/fetch.js +11 -9
- package/dist/format.js +50 -9
- package/dist/glob.js +8 -3
- package/dist/grep.js +22 -10
- package/dist/index.d.ts +3 -1
- package/dist/index.js +11411 -9440
- package/dist/install.js +50 -9
- package/dist/json.js +91 -17
- package/dist/kanban-board-actions.d.ts +4 -0
- package/dist/kanban-lifecycle-actions.d.ts +4 -0
- package/dist/kanban-serializer.d.ts +21 -0
- package/dist/kanban.js +985 -1034
- package/dist/languages/index.js +17 -10
- package/dist/lint.js +50 -9
- package/dist/logs.js +17 -6
- package/dist/next-steps.d.ts +8 -0
- package/dist/next-steps.js +18 -0
- package/dist/outdated.js +18 -11
- package/dist/pack.js +11308 -9317
- package/dist/patch.js +8301 -77
- package/dist/plan.js +1231 -1281
- package/dist/process-registry.js +14 -8
- package/dist/ps-slash.js +65 -30
- package/dist/read.js +754 -912
- package/dist/replace.js +8456 -195
- package/dist/scaffold.js +36 -1
- package/dist/search.js +21 -15
- package/dist/security-ast-scan-tool.d.ts +43 -0
- package/dist/session-kanban-graph.d.ts +9 -0
- package/dist/session-kanban-sync.d.ts +31 -0
- package/dist/session-kanban.d.ts +5 -141
- package/dist/session-kanban.js +367 -360
- package/dist/task.js +1157 -1207
- package/dist/test.js +50 -9
- package/dist/todo.js +2187 -2237
- package/dist/tool-diff.js +6 -1
- package/dist/tool-summary.js +4 -2
- package/dist/tool-tier.js +11315 -9317
- package/dist/tree.js +36 -1
- package/dist/typecheck.js +51 -10
- package/dist/write.js +8374 -152
- package/package.json +7 -7
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `clarify` tool — Proactive Ambiguity Clarifier & Intent Alignment.
|
|
3
|
+
*
|
|
4
|
+
* Prompts the user with structured, multiple-choice questions when architectural,
|
|
5
|
+
* database schema, API contract, or domain logic assumptions are underspecified.
|
|
6
|
+
* Prevents silent misaligned migrations, breaking changes, and refactoring re-work.
|
|
7
|
+
*/
|
|
8
|
+
import type { Tool } from '@wrongstack/core/types';
|
|
9
|
+
export interface ClarifyQuestionInput {
|
|
10
|
+
/** The core decision or question to clarify with the user. */
|
|
11
|
+
question: string;
|
|
12
|
+
/** Context or explanation of why this decision matters (e.g. index performance, validation). */
|
|
13
|
+
context?: string | undefined;
|
|
14
|
+
/** 2 to 4 structured, distinct choices for the user to select. */
|
|
15
|
+
options: string[];
|
|
16
|
+
/** The option recommended by the assistant based on best practices. */
|
|
17
|
+
recommendedOption?: string | undefined;
|
|
18
|
+
/** Whether the user can select multiple options simultaneously. */
|
|
19
|
+
isMultiSelect?: boolean | undefined;
|
|
20
|
+
/** Allow write-in custom responses in addition to options (default: true). */
|
|
21
|
+
allowCustomResponse?: boolean | undefined;
|
|
22
|
+
}
|
|
23
|
+
export interface ClarifyOutput {
|
|
24
|
+
status: 'answered' | 'auto_decided' | 'skipped';
|
|
25
|
+
question: string;
|
|
26
|
+
selectedOptions: string[];
|
|
27
|
+
customResponse?: string | undefined;
|
|
28
|
+
decisionSummary: string;
|
|
29
|
+
error?: string | undefined;
|
|
30
|
+
}
|
|
31
|
+
export declare const clarifyTool: Tool<ClarifyQuestionInput, ClarifyOutput>;
|
|
32
|
+
//# sourceMappingURL=clarify.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Polyglot AST Invariant Engine
|
|
3
|
+
*
|
|
4
|
+
* Deterministic backward-compatibility & invariant validator that checks AST
|
|
5
|
+
* diffs between original code and LLM mutations before changes are written to disk.
|
|
6
|
+
*
|
|
7
|
+
* Catches breaking changes across TypeScript/JavaScript, Python, Go, Rust, Java, etc.:
|
|
8
|
+
* - INV-001: Export / Public Symbol Deletion or Rename
|
|
9
|
+
* - INV-002: Mandatory / Non-Default Parameter Addition
|
|
10
|
+
* - INV-003: Mandatory Interface / Trait / Model Property Addition
|
|
11
|
+
* - INV-004: Incompatible Return Type Alteration
|
|
12
|
+
*/
|
|
13
|
+
import type { SymbolLang } from './schema.js';
|
|
14
|
+
export type InvariantRuleId = 'INV-001' | 'INV-002' | 'INV-003' | 'INV-004';
|
|
15
|
+
export interface InvariantViolation {
|
|
16
|
+
ruleId: InvariantRuleId;
|
|
17
|
+
symbolName: string;
|
|
18
|
+
lang: SymbolLang;
|
|
19
|
+
message: string;
|
|
20
|
+
severity: 'CRITICAL' | 'WARNING';
|
|
21
|
+
details?: {
|
|
22
|
+
addedParameter?: string | undefined;
|
|
23
|
+
addedProperty?: string | undefined;
|
|
24
|
+
expectedModifier?: string | undefined;
|
|
25
|
+
originalSignature?: string | undefined;
|
|
26
|
+
modifiedSignature?: string | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface InvariantEvaluationResult {
|
|
30
|
+
valid: boolean;
|
|
31
|
+
violations: InvariantViolation[];
|
|
32
|
+
stats: {
|
|
33
|
+
originalSymbols: number;
|
|
34
|
+
modifiedSymbols: number;
|
|
35
|
+
durationMs: number;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface ParameterContract {
|
|
39
|
+
name: string;
|
|
40
|
+
isOptional: boolean;
|
|
41
|
+
hasDefault: boolean;
|
|
42
|
+
isRest: boolean;
|
|
43
|
+
type?: string | undefined;
|
|
44
|
+
}
|
|
45
|
+
export interface FunctionContract {
|
|
46
|
+
name: string;
|
|
47
|
+
isExported: boolean;
|
|
48
|
+
params: ParameterContract[];
|
|
49
|
+
returnType?: string | undefined;
|
|
50
|
+
}
|
|
51
|
+
export interface InterfacePropertyContract {
|
|
52
|
+
name: string;
|
|
53
|
+
isOptional: boolean;
|
|
54
|
+
hasDefault?: boolean | undefined;
|
|
55
|
+
type?: string | undefined;
|
|
56
|
+
}
|
|
57
|
+
export interface InterfaceContract {
|
|
58
|
+
name: string;
|
|
59
|
+
isExported: boolean;
|
|
60
|
+
properties: InterfacePropertyContract[];
|
|
61
|
+
methods: Array<{
|
|
62
|
+
name: string;
|
|
63
|
+
isOptional: boolean;
|
|
64
|
+
params: ParameterContract[];
|
|
65
|
+
returnType?: string | undefined;
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
export interface ModuleContract {
|
|
69
|
+
lang: SymbolLang;
|
|
70
|
+
exports: Set<string>;
|
|
71
|
+
functions: Map<string, FunctionContract>;
|
|
72
|
+
interfaces: Map<string, InterfaceContract>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Universal AST Invariant Engine for deterministic backward compatibility validation.
|
|
76
|
+
*/
|
|
77
|
+
export declare class PolyglotInvariantEngine {
|
|
78
|
+
/**
|
|
79
|
+
* Evaluate whether a code mutation respects backward compatibility invariants.
|
|
80
|
+
*/
|
|
81
|
+
evaluate(opts: {
|
|
82
|
+
originalCode: string;
|
|
83
|
+
modifiedCode: string;
|
|
84
|
+
lang?: SymbolLang | undefined;
|
|
85
|
+
filePath?: string | undefined;
|
|
86
|
+
}): Promise<InvariantEvaluationResult>;
|
|
87
|
+
/**
|
|
88
|
+
* Extract high-level contract signatures from source code.
|
|
89
|
+
*/
|
|
90
|
+
extractContract(code: string, lang: SymbolLang): Promise<ModuleContract>;
|
|
91
|
+
/**
|
|
92
|
+
* TypeScript & JavaScript extraction via TS Compiler API.
|
|
93
|
+
*/
|
|
94
|
+
private extractTsContract;
|
|
95
|
+
/**
|
|
96
|
+
* Polyglot extraction (Python, Go, Rust, Java, etc.) via Tree-sitter WASM.
|
|
97
|
+
*/
|
|
98
|
+
private extractTreeSitterContract;
|
|
99
|
+
}
|
|
100
|
+
/** Singleton instance ready for use across WrongStack */
|
|
101
|
+
export declare const polyglotInvariantEngine: PolyglotInvariantEngine;
|
|
102
|
+
//# sourceMappingURL=ast-invariant-engine.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type InvariantViolation } from './ast-invariant-engine.js';
|
|
2
|
+
export interface MutateSymbolOptions {
|
|
3
|
+
file: string;
|
|
4
|
+
symbol: string;
|
|
5
|
+
newBody: string;
|
|
6
|
+
target?: 'body' | 'full' | undefined;
|
|
7
|
+
checkInvariants?: boolean | undefined;
|
|
8
|
+
allowBreakingChanges?: boolean | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface MutateSymbolResult {
|
|
11
|
+
file: string;
|
|
12
|
+
symbol: string;
|
|
13
|
+
originalRange: {
|
|
14
|
+
startLine: number;
|
|
15
|
+
endLine: number;
|
|
16
|
+
};
|
|
17
|
+
newRange: {
|
|
18
|
+
startLine: number;
|
|
19
|
+
endLine: number;
|
|
20
|
+
};
|
|
21
|
+
updatedContent: string;
|
|
22
|
+
violations?: InvariantViolation[] | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Surgically replace a symbol's body or definition inside a source file.
|
|
26
|
+
*/
|
|
27
|
+
export declare function replaceSymbolInFile(opts: MutateSymbolOptions, projectRoot: string): Promise<MutateSymbolResult>;
|
|
28
|
+
//# sourceMappingURL=ast-symbol-mutator.d.ts.map
|
|
@@ -85,6 +85,14 @@ export declare function enqueueReindex(opts: {
|
|
|
85
85
|
files: string[];
|
|
86
86
|
indexDir?: string | undefined;
|
|
87
87
|
debounceMs?: number | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Per-project trailing coalescing window. After a file's debounce timer
|
|
90
|
+
* fires, the ready batch stays open for this long before flushing. Any file
|
|
91
|
+
* whose timer fires within the window joins the same batch and resets the
|
|
92
|
+
* timer (sliding). Default: 50ms. Set to 0 to flush immediately after each
|
|
93
|
+
* debounce timer fires (legacy behavior — staggered bursts don't coalesce).
|
|
94
|
+
*/
|
|
95
|
+
coalesceWindowMs?: number | undefined;
|
|
88
96
|
/** Watchdog timeout per file. Default: 30s. */
|
|
89
97
|
timeoutMs?: number | undefined;
|
|
90
98
|
onError?: ((err: unknown) => void) | undefined;
|
|
@@ -133,6 +141,7 @@ export declare function ensureCodebaseIndexServer(options: {
|
|
|
133
141
|
indexDir?: string | undefined;
|
|
134
142
|
watchExternal?: boolean | undefined;
|
|
135
143
|
debounceMs?: number | undefined;
|
|
144
|
+
coalesceWindowMs?: number | undefined;
|
|
136
145
|
}): Promise<void>;
|
|
137
146
|
/**
|
|
138
147
|
* Reset all process-global indexing state for test isolation.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `codebase-ast-replace` tool — surgically replace a function, method, or class body via AST.
|
|
3
|
+
*
|
|
4
|
+
* Usage: codebase-ast-replace({
|
|
5
|
+
* file: string, // relative or absolute file path
|
|
6
|
+
* symbol: string, // name of the function, method, or declaration to mutate
|
|
7
|
+
* newBody: string, // new implementation code
|
|
8
|
+
* target?: 'body' | 'full', // whether to replace only the body (default) or the full declaration
|
|
9
|
+
* })
|
|
10
|
+
*/
|
|
11
|
+
import type { Tool } from '@wrongstack/core/types';
|
|
12
|
+
import { type MutateSymbolOptions } from './ast-symbol-mutator.js';
|
|
13
|
+
export interface CodebaseAstReplaceInput extends MutateSymbolOptions {
|
|
14
|
+
}
|
|
15
|
+
export interface CodebaseAstReplaceOutput {
|
|
16
|
+
status: 'ok' | 'error';
|
|
17
|
+
file: string;
|
|
18
|
+
symbol: string;
|
|
19
|
+
originalRange?: {
|
|
20
|
+
startLine: number;
|
|
21
|
+
endLine: number;
|
|
22
|
+
} | undefined;
|
|
23
|
+
newRange?: {
|
|
24
|
+
startLine: number;
|
|
25
|
+
endLine: number;
|
|
26
|
+
} | undefined;
|
|
27
|
+
violations?: string[] | undefined;
|
|
28
|
+
error?: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
export declare const codebaseAstReplaceTool: Tool<CodebaseAstReplaceInput, CodebaseAstReplaceOutput>;
|
|
31
|
+
//# sourceMappingURL=codebase-ast-replace-tool.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `codebase-impact-analysis` tool — calculate the blast radius and breaking change risk of modifying a symbol.
|
|
3
|
+
*
|
|
4
|
+
* Usage: codebase-impact-analysis({
|
|
5
|
+
* symbol: string, // name of the function, method, class, or type to analyze
|
|
6
|
+
* file?: string, // optional file path to disambiguate
|
|
7
|
+
* transitive?: boolean, // traverse transitive callers (default: true)
|
|
8
|
+
* })
|
|
9
|
+
*/
|
|
10
|
+
import type { Tool } from '@wrongstack/core/types';
|
|
11
|
+
export interface ImpactAnalysisInput {
|
|
12
|
+
/** The symbol name (function, method, class, interface, type) to analyze. */
|
|
13
|
+
symbol: string;
|
|
14
|
+
/** Optional file path to disambiguate when multiple symbols share a name. */
|
|
15
|
+
file?: string | undefined;
|
|
16
|
+
/** Whether to traverse transitive callers (callers of callers). Defaults to true. */
|
|
17
|
+
transitive?: boolean | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface ImpactCallSite {
|
|
20
|
+
file: string;
|
|
21
|
+
line: number;
|
|
22
|
+
callerName: string;
|
|
23
|
+
callerKind: string;
|
|
24
|
+
callType: string;
|
|
25
|
+
isTest: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface ImpactAnalysisOutput {
|
|
28
|
+
status: 'ok' | 'error';
|
|
29
|
+
symbol: string;
|
|
30
|
+
riskLevel: 'low' | 'medium' | 'high';
|
|
31
|
+
summary: string;
|
|
32
|
+
totalCallSites: number;
|
|
33
|
+
affectedProductionFiles: string[];
|
|
34
|
+
affectedTestFiles: string[];
|
|
35
|
+
callSites: ImpactCallSite[];
|
|
36
|
+
recommendedActionPlan: string[];
|
|
37
|
+
error?: string | undefined;
|
|
38
|
+
}
|
|
39
|
+
export declare const codebaseImpactAnalysisTool: Tool<ImpactAnalysisInput, ImpactAnalysisOutput>;
|
|
40
|
+
//# sourceMappingURL=codebase-impact-analysis-tool.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `codebase-invariant-check` tool — deterministic backward-compatibility & invariant audit.
|
|
3
|
+
*
|
|
4
|
+
* Allows agents, auditors, and workflows to pre-screen candidate code modifications
|
|
5
|
+
* or compare file versions to identify breaking changes across TypeScript, Python, Go, Rust, etc.
|
|
6
|
+
*/
|
|
7
|
+
import type { Tool } from '@wrongstack/core/types';
|
|
8
|
+
import { type InvariantViolation } from './ast-invariant-engine.js';
|
|
9
|
+
import type { SymbolLang } from './schema.js';
|
|
10
|
+
export interface CodebaseInvariantCheckInput {
|
|
11
|
+
file?: string | undefined;
|
|
12
|
+
originalCode?: string | undefined;
|
|
13
|
+
modifiedCode: string;
|
|
14
|
+
lang?: SymbolLang | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface CodebaseInvariantCheckOutput {
|
|
17
|
+
valid: boolean;
|
|
18
|
+
violations: InvariantViolation[];
|
|
19
|
+
summary: string;
|
|
20
|
+
error?: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare const codebaseInvariantCheckTool: Tool<CodebaseInvariantCheckInput, CodebaseInvariantCheckOutput>;
|
|
23
|
+
//# sourceMappingURL=codebase-invariant-check-tool.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `codebase-repo-map` tool — generate a reference-weighted, token-budgeted Repository Map.
|
|
3
|
+
*
|
|
4
|
+
* Usage: codebase-repo-map({
|
|
5
|
+
* maxTokens?: number, // maximum token budget for the map (default: 1200)
|
|
6
|
+
* focusFiles?: string[], // list of paths to prioritize/boost in the ranking
|
|
7
|
+
* })
|
|
8
|
+
*/
|
|
9
|
+
import type { Tool } from '@wrongstack/core/types';
|
|
10
|
+
import { type RepoMapResult } from './repo-map.js';
|
|
11
|
+
export interface CodebaseRepoMapInput {
|
|
12
|
+
/** Maximum token budget (approximate) for the generated map. Defaults to 1200. */
|
|
13
|
+
maxTokens?: number | undefined;
|
|
14
|
+
/** Optional file paths to prioritize and boost in the map generation. */
|
|
15
|
+
focusFiles?: string[] | undefined;
|
|
16
|
+
}
|
|
17
|
+
export interface CodebaseRepoMapOutput extends RepoMapResult {
|
|
18
|
+
status: 'ok' | 'error';
|
|
19
|
+
error?: string | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare const codebaseRepoMapTool: Tool<CodebaseRepoMapInput, CodebaseRepoMapOutput>;
|
|
22
|
+
//# sourceMappingURL=codebase-repo-map-tool.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `codebase-skeleton` tool — extract AST-based file skeletons with body redaction.
|
|
3
|
+
*
|
|
4
|
+
* Usage: codebase-skeleton({
|
|
5
|
+
* path: string, // relative or absolute file or directory path
|
|
6
|
+
* includeDocs?: boolean, // preserve JSDoc / docstrings (default: true)
|
|
7
|
+
* collapseImports?: boolean,// collapse import headers (default: false)
|
|
8
|
+
* exportsOnly?: boolean, // filter to exported declarations (default: false)
|
|
9
|
+
* maxFiles?: number, // max files to scan when path is a directory (default: 20)
|
|
10
|
+
* })
|
|
11
|
+
*
|
|
12
|
+
* Returns: { path, isDir, skeleton, stats: { originalLines, skeletonLines, tokenSavingsPercent, symbolCount } }
|
|
13
|
+
*/
|
|
14
|
+
import type { Tool } from '@wrongstack/core/types';
|
|
15
|
+
import { type FileSkeletonResult, type SkeletonOptions } from './skeleton-extractor.js';
|
|
16
|
+
export interface CodebaseSkeletonInput extends SkeletonOptions {
|
|
17
|
+
/** Relative or absolute file or directory path. */
|
|
18
|
+
path: string;
|
|
19
|
+
/** Maximum number of files to process if `path` is a directory. Defaults to 20. */
|
|
20
|
+
maxFiles?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface CodebaseSkeletonOutput {
|
|
23
|
+
path: string;
|
|
24
|
+
isDir: boolean;
|
|
25
|
+
skeleton: string;
|
|
26
|
+
stats: {
|
|
27
|
+
originalLines: number;
|
|
28
|
+
skeletonLines: number;
|
|
29
|
+
tokenSavingsPercent: number;
|
|
30
|
+
symbolCount: number;
|
|
31
|
+
fileCount?: number;
|
|
32
|
+
};
|
|
33
|
+
files?: FileSkeletonResult[];
|
|
34
|
+
}
|
|
35
|
+
export declare const codebaseSkeletonTool: Tool<CodebaseSkeletonInput, CodebaseSkeletonOutput>;
|
|
36
|
+
//# sourceMappingURL=codebase-skeleton-tool.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `codebase-targeted-test` tool — automatically identify and run only the relevant tests for a modified symbol or file.
|
|
3
|
+
*
|
|
4
|
+
* Usage: codebase-targeted-test({
|
|
5
|
+
* symbol?: string, // function/class/type name that was changed
|
|
6
|
+
* file?: string, // source file that was changed
|
|
7
|
+
* testFiles?: string[], // explicitly specified test files (optional)
|
|
8
|
+
* })
|
|
9
|
+
*/
|
|
10
|
+
import type { Tool } from '@wrongstack/core/types';
|
|
11
|
+
export interface TargetedTestInput {
|
|
12
|
+
/** Symbol name (function, class, method) whose tests should be discovered and run. */
|
|
13
|
+
symbol?: string | undefined;
|
|
14
|
+
/** Source file path whose corresponding test suite should be run. */
|
|
15
|
+
file?: string | undefined;
|
|
16
|
+
/** Optional explicit list of test files to run. */
|
|
17
|
+
testFiles?: string[] | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface TargetedTestOutput {
|
|
20
|
+
status: 'passed' | 'failed' | 'no_tests_found' | 'error';
|
|
21
|
+
discoveredSuites: string[];
|
|
22
|
+
testsRun: number;
|
|
23
|
+
passed: number;
|
|
24
|
+
failed: number;
|
|
25
|
+
durationMs: number;
|
|
26
|
+
output: string;
|
|
27
|
+
error?: string | undefined;
|
|
28
|
+
}
|
|
29
|
+
export declare const codebaseTargetedTestTool: Tool<TargetedTestInput, TargetedTestOutput>;
|
|
30
|
+
//# sourceMappingURL=codebase-targeted-test-tool.d.ts.map
|
|
@@ -18,11 +18,20 @@ export { cancelPendingReindexes, checkCodebaseIndexServerHealth, codebaseIndexSt
|
|
|
18
18
|
export { buildBm25Index, buildIndexableText, tokenise, } from './bm25.js';
|
|
19
19
|
export type { CircuitSnapshot, CircuitState } from './circuit-breaker.js';
|
|
20
20
|
export { CircuitOpenError, IndexCircuitBreaker, IndexTimeoutError, indexCircuitBreaker, resetIndexCircuitBreaker, } from './circuit-breaker.js';
|
|
21
|
-
export {
|
|
21
|
+
export { codebaseAstReplaceTool } from './codebase-ast-replace-tool.js';
|
|
22
|
+
export { codebaseInvariantCheckTool } from './codebase-invariant-check-tool.js';
|
|
23
|
+
export { replaceSymbolInFile, type MutateSymbolOptions, type MutateSymbolResult, } from './ast-symbol-mutator.js';
|
|
24
|
+
export { codebaseImpactAnalysisTool } from './codebase-impact-analysis-tool.js';
|
|
22
25
|
export { codebaseIncomingCallsTool } from './codebase-incoming-calls-tool.js';
|
|
26
|
+
export { codebaseIndexTool } from './codebase-index-tool.js';
|
|
23
27
|
export { codebaseOutgoingCallsTool } from './codebase-outgoing-calls-tool.js';
|
|
28
|
+
export { codebaseRepoMapTool } from './codebase-repo-map-tool.js';
|
|
24
29
|
export { codebaseSearchTool } from './codebase-search-tool.js';
|
|
30
|
+
export { codebaseSkeletonTool } from './codebase-skeleton-tool.js';
|
|
25
31
|
export { codebaseStatsTool } from './codebase-stats-tool.js';
|
|
32
|
+
export { codebaseTargetedTestTool } from './codebase-targeted-test-tool.js';
|
|
33
|
+
export { generateRepoMap, type RepoMapOptions, type RepoMapResult, } from './repo-map.js';
|
|
34
|
+
export { extractDirectorySkeleton, extractFileSkeleton, type FileSkeletonResult, type SkeletonOptions, type SkeletonSymbolRange, } from './skeleton-extractor.js';
|
|
26
35
|
export { deadCodeScanTool, runDeadCodeScan } from './dead-code-scan.js';
|
|
27
36
|
export type { DeadCodeScanInput, DeadCodeScanOutput, DeadFile, DeadPackage, DeadSymbol, } from './dead-code-scan.js';
|
|
28
37
|
export { runIndexer } from './indexer.js';
|
|
@@ -34,4 +43,5 @@ export type { CallSite, CodeMapGraph, FileMeta, FileSymbols, GraphEdge, GraphNod
|
|
|
34
43
|
export { projectIndexServerEndpoint, projectIndexServerMetadataPath, } from './project-server-endpoint.js';
|
|
35
44
|
export { SCHEMA_VERSION } from './schema.js';
|
|
36
45
|
export { codebaseIndexDirOverride, IndexStore, resolveIndexDir } from './writer.js';
|
|
46
|
+
export { PolyglotInvariantEngine, polyglotInvariantEngine, type InvariantEvaluationResult, type InvariantRuleId, type InvariantViolation, type ModuleContract, } from './ast-invariant-engine.js';
|
|
37
47
|
//# sourceMappingURL=index.d.ts.map
|