@wrongstack/tools 0.320.1 → 1.0.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/_danger-detect.d.ts +8 -0
- package/dist/_syntax-check.d.ts +1 -2
- package/dist/audit.d.ts +4 -5
- package/dist/audit.js +6 -6
- package/dist/auto-proceed-loop-guard.js +9 -160
- package/dist/bash-kill-guard.d.ts +2 -3
- package/dist/bash.d.ts +2 -3
- package/dist/bash.js +4 -4
- package/dist/batch-tool-use.d.ts +2 -3
- package/dist/batch-tool-use.js +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/tools.d.ts +56 -45
- package/dist/builtin.js +50 -50
- package/dist/{chunk-T77XOX7E.js → chunk-24T5XIJU.js} +1 -1
- package/dist/{chunk-DTQ75VBC.js → chunk-2CTZW6JQ.js} +2 -2
- package/dist/chunk-37QKUQ2Z.js +171 -0
- package/dist/{chunk-KWXIKGE3.js → chunk-3D5DJWOE.js} +3 -3
- package/dist/{chunk-XSSFBS5I.js → chunk-4ERMPDHV.js} +11 -6
- package/dist/{chunk-QSNVDHOZ.js → chunk-4WPBS45A.js} +4 -5
- package/dist/{chunk-4CQWNZ62.js → chunk-5ITQPCLC.js} +2 -2
- package/dist/{chunk-B4HTSV6Z.js → chunk-5KS24LTS.js} +11 -11
- package/dist/{chunk-QPNYDH5B.js → chunk-62OAECEQ.js} +29 -7
- package/dist/{chunk-DFQDJT22.js → chunk-6GOZTS6F.js} +3 -3
- package/dist/{chunk-34VLZ35Z.js → chunk-7HL23T3T.js} +63 -10
- package/dist/{chunk-HFXSNKCV.js → chunk-7JJFC6CT.js} +1 -1
- package/dist/{chunk-NDIT3SBZ.js → chunk-7N5U2RAU.js} +2 -2
- package/dist/{chunk-QBV725YG.js → chunk-7ODZTPCU.js} +2 -2
- package/dist/{chunk-4BABEJC2.js → chunk-AB2CAUOP.js} +64 -53
- package/dist/{chunk-6AAOT4PW.js → chunk-AQ5YBURX.js} +16 -4
- package/dist/{chunk-ZMW6WJFT.js → chunk-ASEXQRA7.js} +3 -3
- package/dist/{chunk-FRN7TIAA.js → chunk-B3MGJBFI.js} +1 -1
- package/dist/{chunk-JLYA4X7K.js → chunk-CGXTR34H.js} +21 -6
- package/dist/{chunk-IU4DV2PA.js → chunk-CHEK3ASV.js} +6 -3
- package/dist/{chunk-GOIZNNOA.js → chunk-DJYLI7EW.js} +1 -1
- package/dist/{chunk-Z6IHMJMC.js → chunk-DK4J2WMH.js} +11 -11
- package/dist/{chunk-OYP27E3I.js → chunk-DRRY6SCM.js} +47 -20
- package/dist/{chunk-BK732J7I.js → chunk-FBUP524S.js} +4 -4
- package/dist/{chunk-NYRLWDT5.js → chunk-FVM3O4JQ.js} +1 -1
- package/dist/chunk-FYDBUVQD.js +244 -0
- package/dist/{chunk-PV6HIZQD.js → chunk-GDDXX27P.js} +50 -50
- package/dist/{chunk-3GIKYHLA.js → chunk-GKSG5CPH.js} +6 -6
- package/dist/{chunk-ESLPBT5A.js → chunk-HDYUBRMF.js} +4 -3
- package/dist/{chunk-ELRRTWNP.js → chunk-IXIS7RSG.js} +2 -2
- package/dist/{chunk-HR67OWEP.js → chunk-IYH4OHBP.js} +5 -5
- package/dist/{chunk-W232EFEM.js → chunk-JDOO4P6Z.js} +7 -4
- package/dist/{chunk-OTPTQBYE.js → chunk-KDEXUQY7.js} +19 -8
- package/dist/{chunk-2OXHS3KZ.js → chunk-KLJZ4WV4.js} +4 -3
- package/dist/{chunk-3M7LLN7W.js → chunk-LQSOU63Z.js} +12 -11
- package/dist/{chunk-JVRLTEO7.js → chunk-M6UV67BH.js} +2 -2
- package/dist/{chunk-C2DQKVLO.js → chunk-MJSJWXBF.js} +1 -1
- package/dist/{chunk-NSPNFOJ7.js → chunk-MK2JK35J.js} +25 -10
- package/dist/{chunk-JSNSMG5R.js → chunk-MSOAX3GC.js} +1 -1
- package/dist/{chunk-J43O3BOX.js → chunk-N3K2SFEI.js} +532 -492
- package/dist/{chunk-J74TMK4M.js → chunk-NJX2RXKJ.js} +50 -7
- package/dist/{chunk-5UFVCIUB.js → chunk-NN2SNP2R.js} +4 -4
- package/dist/{chunk-WAQASTXB.js → chunk-O6BY43ZB.js} +29 -8
- package/dist/{chunk-QGF2C7TF.js → chunk-PVCB7RUZ.js} +2 -2
- package/dist/{chunk-YTKSNTT4.js → chunk-QA6IASYX.js} +8 -8
- package/dist/{chunk-VPALDFYM.js → chunk-RV7BVTDG.js} +1 -1
- package/dist/chunk-S57CDR2H.js +288 -0
- package/dist/{chunk-W2CECGTG.js → chunk-SMARDKAC.js} +1 -1
- package/dist/{chunk-QWKSKFKZ.js → chunk-SOR7OCYP.js} +1 -1
- package/dist/{chunk-I7FBZOEP.js → chunk-T3SMFF5Q.js} +11 -5
- package/dist/{chunk-4BHUSMNL.js → chunk-UI3ZJIG3.js} +1 -1
- package/dist/{chunk-WXJY3BKV.js → chunk-VBF2YXUW.js} +2 -2
- package/dist/{chunk-FQNXYA6W.js → chunk-VU3QBYL4.js} +36 -5
- package/dist/{chunk-VD2LV5WO.js → chunk-VZGPASGD.js} +37 -12
- package/dist/{chunk-UZFY3CKD.js → chunk-WEEVSWQB.js} +17 -6
- package/dist/chunk-XXRMF2BC.js +186 -0
- package/dist/{chunk-LRDIRJJL.js → chunk-YEISRT4S.js} +5 -11
- package/dist/{chunk-Q5JPPCZC.js → chunk-YJTXRH5Y.js} +3 -2
- package/dist/{chunk-23EX5WDO.js → chunk-YULVUTK5.js} +3 -3
- package/dist/{chunk-Z5Q3TXRY.js → chunk-ZTCJCYLN.js} +3 -3
- package/dist/circuit-breaker.d.ts +1 -0
- package/dist/circuit-breaker.js +1 -1
- package/dist/clarify.d.ts +1 -0
- package/dist/codebase-index/codebase-ast-replace-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-impact-analysis-tool.d.ts +5 -4
- package/dist/codebase-index/codebase-incoming-calls-tool.d.ts +4 -3
- package/dist/codebase-index/codebase-index-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-invariant-check-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-outgoing-calls-tool.d.ts +4 -3
- package/dist/codebase-index/codebase-repo-map-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-search-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-skeleton-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-stats-tool.d.ts +9 -3
- package/dist/codebase-index/codebase-targeted-test-tool.d.ts +4 -3
- package/dist/codebase-index/index.d.ts +11 -11
- package/dist/codebase-index/index.js +8 -8
- package/dist/codebase-index/project-server-framing.d.ts +29 -0
- package/dist/codebase-index/project-server-lifecycle.d.ts +20 -0
- package/dist/codebase-index/project-server-operations.d.ts +37 -0
- package/dist/codebase-index/project-server-types.d.ts +30 -0
- package/dist/codebase-index/project-server-watcher.d.ts +25 -0
- package/dist/codebase-index/project-server.js +448 -391
- package/dist/codebase-index/worker.js +2 -2
- package/dist/codebase-index/writer-init.d.ts +13 -0
- package/dist/codebase-index/writer-maintenance.d.ts +14 -0
- package/dist/codebase-index/writer.d.ts +0 -15
- package/dist/design.d.ts +2 -2
- package/dist/design.js +1 -1
- package/dist/diff.d.ts +4 -4
- package/dist/diff.js +1 -1
- package/dist/document.d.ts +3 -4
- package/dist/document.js +1 -1
- package/dist/e2e.d.ts +1 -1
- package/dist/e2e.js +1 -1
- package/dist/edit.d.ts +3 -3
- package/dist/edit.js +6 -6
- package/dist/exec.d.ts +2 -3
- package/dist/exec.js +4 -4
- package/dist/fetch.d.ts +4 -3
- package/dist/fetch.js +1 -1
- package/dist/format.d.ts +17 -45
- package/dist/format.js +12 -8
- package/dist/git.d.ts +3 -3
- package/dist/git.js +1 -1
- package/dist/glob.d.ts +2 -3
- package/dist/glob.js +2 -2
- package/dist/grep.d.ts +7 -5
- package/dist/grep.js +3 -3
- package/dist/index.d.ts +54 -45
- package/dist/index.js +118 -59
- package/dist/install.d.ts +7 -55
- package/dist/install.js +6 -6
- package/dist/json.d.ts +3 -4
- package/dist/json.js +2 -2
- package/dist/kanban-tool-types.d.ts +1 -2
- package/dist/kanban.d.ts +3 -19
- package/dist/kanban.js +1 -1
- package/dist/languages/execute-tool.d.ts +2 -3
- package/dist/languages/index.d.ts +2 -2
- package/dist/languages/index.js +4 -4
- package/dist/languages/tool.d.ts +3 -4
- package/dist/{legacy-bridge-FOV5ODDI.js → legacy-bridge-YXANP5QB.js} +6 -6
- package/dist/lint.d.ts +5 -4
- package/dist/lint.js +6 -6
- package/dist/logs.d.ts +3 -4
- package/dist/logs.js +2 -2
- package/dist/memory.d.ts +7 -8
- package/dist/memory.js +1 -1
- package/dist/mode.d.ts +3 -4
- package/dist/mode.js +1 -1
- package/dist/next-steps-tool.d.ts +2 -3
- package/dist/next-steps.d.ts +4 -0
- package/dist/next-steps.js +9 -175
- package/dist/outdated.d.ts +5 -29
- package/dist/outdated.js +3 -3
- package/dist/pack.js +51 -51
- package/dist/patch.d.ts +2 -3
- package/dist/patch.js +5 -5
- package/dist/plan.d.ts +4 -4
- package/dist/plan.js +3 -3
- package/dist/process-registry.js +2 -2
- package/dist/ps-slash.js +4 -4
- package/dist/pwsh.d.ts +1 -0
- package/dist/read.d.ts +5 -5
- package/dist/read.js +5 -5
- package/dist/replace.d.ts +2 -3
- package/dist/replace.js +6 -6
- package/dist/scaffold.d.ts +7 -3
- package/dist/scaffold.js +3 -1
- package/dist/search.d.ts +17 -3
- package/dist/search.js +5 -1
- package/dist/set-working-dir.d.ts +2 -3
- package/dist/skill.d.ts +4 -5
- package/dist/skill.js +1 -1
- package/dist/task.d.ts +6 -6
- package/dist/task.js +3 -3
- package/dist/test.d.ts +5 -4
- package/dist/test.js +6 -6
- package/dist/todo.d.ts +8 -8
- package/dist/todo.js +2 -2
- package/dist/tool-diff.js +11 -230
- package/dist/tool-help.d.ts +2 -3
- package/dist/tool-help.js +1 -1
- package/dist/tool-search.d.ts +2 -3
- package/dist/tool-search.js +1 -1
- package/dist/tool-summary.js +5 -281
- package/dist/tool-tier.js +52 -52
- package/dist/tool-use.d.ts +2 -3
- package/dist/tool-use.js +1 -1
- package/dist/tree.d.ts +5 -3
- package/dist/tree.js +5 -1
- package/dist/typecheck.d.ts +3 -3
- package/dist/typecheck.js +6 -6
- package/dist/write.d.ts +2 -3
- package/dist/write.js +6 -6
- package/package.json +5 -5
- package/dist/spawn-background.d.ts +0 -80
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
import type { Tool } from '@wrongstack/core/types';
|
|
17
17
|
import type { CallSite } from './schema.js';
|
|
18
18
|
export declare const codebaseOutgoingCallsTool: Tool<OutgoingCallsInput, OutgoingCallsOutput>;
|
|
19
|
-
interface OutgoingCallsInput {
|
|
19
|
+
export interface OutgoingCallsInput {
|
|
20
20
|
symbol: string;
|
|
21
21
|
file?: string | undefined;
|
|
22
22
|
limit?: number | undefined;
|
|
23
23
|
transitive?: boolean | undefined;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
export type CodebaseOutgoingCallsInput = OutgoingCallsInput;
|
|
26
|
+
export interface OutgoingCallsOutput {
|
|
26
27
|
symbol: string;
|
|
27
28
|
calls: CallSite[];
|
|
28
29
|
total: number;
|
|
@@ -37,5 +38,5 @@ interface OutgoingCallsOutput {
|
|
|
37
38
|
/** Advisory note when the symbol was not found, or unresolved refs exist. */
|
|
38
39
|
note?: string | undefined;
|
|
39
40
|
}
|
|
40
|
-
export
|
|
41
|
+
export type CodebaseOutgoingCallsOutput = OutgoingCallsOutput;
|
|
41
42
|
//# sourceMappingURL=codebase-outgoing-calls-tool.d.ts.map
|
|
@@ -8,16 +8,15 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { Tool } from '@wrongstack/core/types';
|
|
10
10
|
import { type RepoMapResult } from './repo-map.js';
|
|
11
|
-
interface CodebaseRepoMapInput {
|
|
11
|
+
export interface CodebaseRepoMapInput {
|
|
12
12
|
/** Maximum token budget (approximate) for the generated map. Defaults to 1200. */
|
|
13
13
|
maxTokens?: number | undefined;
|
|
14
14
|
/** Optional file paths to prioritize and boost in the map generation. */
|
|
15
15
|
focusFiles?: string[] | undefined;
|
|
16
16
|
}
|
|
17
|
-
interface CodebaseRepoMapOutput extends RepoMapResult {
|
|
17
|
+
export interface CodebaseRepoMapOutput extends RepoMapResult {
|
|
18
18
|
status: 'ok' | 'error';
|
|
19
19
|
error?: string | undefined;
|
|
20
20
|
}
|
|
21
21
|
export declare const codebaseRepoMapTool: Tool<CodebaseRepoMapInput, CodebaseRepoMapOutput>;
|
|
22
|
-
export {};
|
|
23
22
|
//# sourceMappingURL=codebase-repo-map-tool.d.ts.map
|
|
@@ -27,7 +27,7 @@ import type { SearchResult, SymbolLang } from './schema.js';
|
|
|
27
27
|
*/
|
|
28
28
|
export declare const INDEXABLE_LANG_IDS: readonly SymbolLang[];
|
|
29
29
|
export declare const codebaseSearchTool: Tool<CodebaseSearchInput, CodebaseSearchOutput>;
|
|
30
|
-
interface CodebaseSearchInput {
|
|
30
|
+
export interface CodebaseSearchInput {
|
|
31
31
|
query: string;
|
|
32
32
|
kind?: string | undefined;
|
|
33
33
|
lang?: string | undefined;
|
|
@@ -41,7 +41,7 @@ interface CodebaseSearchInput {
|
|
|
41
41
|
*/
|
|
42
42
|
preferLsp?: boolean | undefined;
|
|
43
43
|
}
|
|
44
|
-
interface CodebaseSearchOutput {
|
|
44
|
+
export interface CodebaseSearchOutput {
|
|
45
45
|
results: SearchResult[];
|
|
46
46
|
total: number;
|
|
47
47
|
query: string;
|
|
@@ -54,5 +54,4 @@ interface CodebaseSearchOutput {
|
|
|
54
54
|
/** Non-empty when the index blocked the search (not ready, indexing, failed). */
|
|
55
55
|
indexStatus?: string | undefined;
|
|
56
56
|
}
|
|
57
|
-
export {};
|
|
58
57
|
//# sourceMappingURL=codebase-search-tool.d.ts.map
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import type { Tool } from '@wrongstack/core/types';
|
|
15
15
|
import { type FileSkeletonResult, type SkeletonOptions } from './skeleton-extractor.js';
|
|
16
|
-
interface CodebaseSkeletonInput extends SkeletonOptions {
|
|
16
|
+
export interface CodebaseSkeletonInput extends SkeletonOptions {
|
|
17
17
|
/** Relative or absolute file or directory path. */
|
|
18
18
|
path: string;
|
|
19
19
|
/** Maximum number of files to process if `path` is a directory. Defaults to 20. */
|
|
20
20
|
maxFiles?: number;
|
|
21
21
|
}
|
|
22
|
-
interface CodebaseSkeletonOutput {
|
|
22
|
+
export interface CodebaseSkeletonOutput {
|
|
23
23
|
path: string;
|
|
24
24
|
isDir: boolean;
|
|
25
25
|
skeleton: string;
|
|
@@ -33,5 +33,4 @@ interface CodebaseSkeletonOutput {
|
|
|
33
33
|
files?: FileSkeletonResult[];
|
|
34
34
|
}
|
|
35
35
|
export declare const codebaseSkeletonTool: Tool<CodebaseSkeletonInput, CodebaseSkeletonOutput>;
|
|
36
|
-
export {};
|
|
37
36
|
//# sourceMappingURL=codebase-skeleton-tool.d.ts.map
|
|
@@ -6,8 +6,15 @@
|
|
|
6
6
|
* Returns: { totalSymbols, totalFiles, byLang, byKind, lastIndexed, sizeBytes, version }
|
|
7
7
|
*/
|
|
8
8
|
import type { Tool } from '@wrongstack/core/types';
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* `codebase-stats` takes no arguments (its JSON schema is
|
|
11
|
+
* `properties: {}, additionalProperties: false`). Expressed as a type alias
|
|
12
|
+
* rather than an empty interface, which is structurally `{}` — a type that
|
|
13
|
+
* accepts any non-nullish value and is flagged by `noEmptyInterface`.
|
|
14
|
+
*/
|
|
15
|
+
export type CodebaseStatsInput = Record<string, never>;
|
|
16
|
+
export declare const codebaseStatsTool: Tool<CodebaseStatsInput, CodebaseStatsOutput>;
|
|
17
|
+
export interface CodebaseStatsOutput {
|
|
11
18
|
totalSymbols: number;
|
|
12
19
|
totalFiles: number;
|
|
13
20
|
byLang: Record<string, number>;
|
|
@@ -26,5 +33,4 @@ interface CodebaseStatsOutput {
|
|
|
26
33
|
/** Non-empty when the index is not ready or is still building. */
|
|
27
34
|
indexStatus?: string | undefined;
|
|
28
35
|
}
|
|
29
|
-
export {};
|
|
30
36
|
//# sourceMappingURL=codebase-stats-tool.d.ts.map
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* })
|
|
9
9
|
*/
|
|
10
10
|
import type { Tool } from '@wrongstack/core/types';
|
|
11
|
-
interface TargetedTestInput {
|
|
11
|
+
export interface TargetedTestInput {
|
|
12
12
|
/** Symbol name (function, class, method) whose tests should be discovered and run. */
|
|
13
13
|
symbol?: string | undefined;
|
|
14
14
|
/** Source file path whose corresponding test suite should be run. */
|
|
@@ -16,7 +16,8 @@ interface TargetedTestInput {
|
|
|
16
16
|
/** Optional explicit list of test files to run. */
|
|
17
17
|
testFiles?: string[] | undefined;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
export type CodebaseTargetedTestInput = TargetedTestInput;
|
|
20
|
+
export interface TargetedTestOutput {
|
|
20
21
|
status: 'passed' | 'failed' | 'no_tests_found' | 'error';
|
|
21
22
|
discoveredSuites: string[];
|
|
22
23
|
testsRun: number;
|
|
@@ -26,6 +27,6 @@ interface TargetedTestOutput {
|
|
|
26
27
|
output: string;
|
|
27
28
|
error?: string | undefined;
|
|
28
29
|
}
|
|
30
|
+
export type CodebaseTargetedTestOutput = TargetedTestOutput;
|
|
29
31
|
export declare const codebaseTargetedTestTool: Tool<TargetedTestInput, TargetedTestOutput>;
|
|
30
|
-
export {};
|
|
31
32
|
//# sourceMappingURL=codebase-targeted-test-tool.d.ts.map
|
|
@@ -18,18 +18,18 @@ 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 { codebaseAstReplaceTool } from './codebase-ast-replace-tool.js';
|
|
22
|
-
export { codebaseInvariantCheckTool } from './codebase-invariant-check-tool.js';
|
|
21
|
+
export { codebaseAstReplaceTool, type CodebaseAstReplaceInput, type CodebaseAstReplaceOutput, } from './codebase-ast-replace-tool.js';
|
|
22
|
+
export { codebaseInvariantCheckTool, type CodebaseInvariantCheckInput, type CodebaseInvariantCheckOutput, } from './codebase-invariant-check-tool.js';
|
|
23
23
|
export { replaceSymbolInFile, type MutateSymbolOptions, type MutateSymbolResult, } from './ast-symbol-mutator.js';
|
|
24
|
-
export { codebaseImpactAnalysisTool } from './codebase-impact-analysis-tool.js';
|
|
25
|
-
export { codebaseIncomingCallsTool } from './codebase-incoming-calls-tool.js';
|
|
26
|
-
export { codebaseIndexTool } from './codebase-index-tool.js';
|
|
27
|
-
export { codebaseOutgoingCallsTool } from './codebase-outgoing-calls-tool.js';
|
|
28
|
-
export { codebaseRepoMapTool } from './codebase-repo-map-tool.js';
|
|
29
|
-
export { codebaseSearchTool } from './codebase-search-tool.js';
|
|
30
|
-
export { codebaseSkeletonTool } from './codebase-skeleton-tool.js';
|
|
31
|
-
export { codebaseStatsTool } from './codebase-stats-tool.js';
|
|
32
|
-
export { codebaseTargetedTestTool } from './codebase-targeted-test-tool.js';
|
|
24
|
+
export { codebaseImpactAnalysisTool, type CodebaseImpactAnalysisInput, type CodebaseImpactAnalysisOutput, type ImpactAnalysisInput, type ImpactAnalysisOutput, type ImpactCallSite, } from './codebase-impact-analysis-tool.js';
|
|
25
|
+
export { codebaseIncomingCallsTool, type CodebaseIncomingCallsInput, type CodebaseIncomingCallsOutput, type IncomingCallsInput, type IncomingCallsOutput, } from './codebase-incoming-calls-tool.js';
|
|
26
|
+
export { codebaseIndexTool, type CodebaseIndexInput, type CodebaseIndexOutput, } from './codebase-index-tool.js';
|
|
27
|
+
export { codebaseOutgoingCallsTool, type CodebaseOutgoingCallsInput, type CodebaseOutgoingCallsOutput, type OutgoingCallsInput, type OutgoingCallsOutput, } from './codebase-outgoing-calls-tool.js';
|
|
28
|
+
export { codebaseRepoMapTool, type CodebaseRepoMapInput, type CodebaseRepoMapOutput, } from './codebase-repo-map-tool.js';
|
|
29
|
+
export { codebaseSearchTool, type CodebaseSearchInput, type CodebaseSearchOutput, } from './codebase-search-tool.js';
|
|
30
|
+
export { codebaseSkeletonTool, type CodebaseSkeletonInput, type CodebaseSkeletonOutput, } from './codebase-skeleton-tool.js';
|
|
31
|
+
export { codebaseStatsTool, type CodebaseStatsInput, type CodebaseStatsOutput, } from './codebase-stats-tool.js';
|
|
32
|
+
export { codebaseTargetedTestTool, type CodebaseTargetedTestInput, type CodebaseTargetedTestOutput, type TargetedTestInput, type TargetedTestOutput, } from './codebase-targeted-test-tool.js';
|
|
33
33
|
export { generateRepoMap, type RepoMapOptions, type RepoMapResult, } from './repo-map.js';
|
|
34
34
|
export { extractDirectorySkeleton, extractFileSkeleton, type FileSkeletonResult, type SkeletonOptions, type SkeletonSymbolRange, } from './skeleton-extractor.js';
|
|
35
35
|
export { deadCodeScanTool, runDeadCodeScan } from './dead-code-scan.js';
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
polyglotInvariantEngine,
|
|
19
19
|
replaceSymbolInFile,
|
|
20
20
|
runDeadCodeScan
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-YEISRT4S.js";
|
|
22
22
|
import "../chunk-XRNN44QY.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-DRRY6SCM.js";
|
|
24
24
|
import "../chunk-SCMRM6NL.js";
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-HDYUBRMF.js";
|
|
26
|
+
import "../chunk-7JJFC6CT.js";
|
|
27
27
|
import {
|
|
28
28
|
cancelPendingReindexes,
|
|
29
29
|
checkCodebaseIndexServerHealth,
|
|
@@ -45,11 +45,11 @@ import {
|
|
|
45
45
|
shutdownCodebaseIndexHost,
|
|
46
46
|
shutdownCodebaseIndexServer,
|
|
47
47
|
symbolGraphService
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-ZTCJCYLN.js";
|
|
49
49
|
import {
|
|
50
50
|
projectIndexServerEndpoint,
|
|
51
51
|
projectIndexServerMetadataPath
|
|
52
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-GDDXX27P.js";
|
|
53
53
|
import {
|
|
54
54
|
CircuitOpenError,
|
|
55
55
|
IndexCircuitBreaker,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
resolveIndexDir,
|
|
67
67
|
runIndexer,
|
|
68
68
|
tokenise
|
|
69
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-N3K2SFEI.js";
|
|
70
70
|
import "../chunk-NU2IZ72J.js";
|
|
71
71
|
import "../chunk-VVZPQPTY.js";
|
|
72
72
|
import "../chunk-6IEBD27U.js";
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
import {
|
|
80
80
|
compileGitignore,
|
|
81
81
|
loadGitignoreMatcher
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-2CTZW6JQ.js";
|
|
83
83
|
import "../chunk-KE7A76VC.js";
|
|
84
84
|
import "../chunk-ZUFHAHTE.js";
|
|
85
85
|
export {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ProjectServerClientMessage, type ProjectServerMessage } from './project-server-protocol.js';
|
|
2
|
+
import type { ClientState } from './project-server-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Cap on outbound bytes queued for one client before it is dropped. This
|
|
5
|
+
* server pushes index-activity updates to every client, and `socket.write()`
|
|
6
|
+
* buffers without limit when its `false` return is ignored — so one client
|
|
7
|
+
* that stops reading would otherwise grow the owner's heap indefinitely. The
|
|
8
|
+
* index lives in SQLite; a dropped client re-queries on reconnect.
|
|
9
|
+
*/
|
|
10
|
+
export declare const MAX_CLIENT_WRITE_BUFFER_BYTES: number;
|
|
11
|
+
export declare function sendServerMessage(state: ClientState, message: ProjectServerMessage): void;
|
|
12
|
+
/**
|
|
13
|
+
* Frame reader for one client connection. Each frame is sniffed per first
|
|
14
|
+
* byte: `0x57` ('W') → length-prefixed MessagePack, anything else →
|
|
15
|
+
* newline-delimited JSON text. Bytes stay raw until a complete frame is
|
|
16
|
+
* assembled, so a multibyte UTF-8 sequence split across chunks is only ever
|
|
17
|
+
* decoded as part of a finished line (raw `0x0a` only occurs as the JSON
|
|
18
|
+
* delimiter — inside JSON strings `\n` is escaped — so a complete line is
|
|
19
|
+
* always complete UTF-8).
|
|
20
|
+
*
|
|
21
|
+
* The buffer is consumed with a scan offset rather than re-slicing after
|
|
22
|
+
* every frame: each parsed frame advances `scan` within the same Buffer,
|
|
23
|
+
* and the leftover tail is compacted once at the end of the call. A burst
|
|
24
|
+
* of small frames therefore costs one allocation per chunk, not one
|
|
25
|
+
* per frame (the previous slice-per-frame loop reallocated on every frame
|
|
26
|
+
* while pinning the whole parent buffer).
|
|
27
|
+
*/
|
|
28
|
+
export declare function consumeClientChunk(state: ClientState, chunk: Buffer, onMessage: (state: ClientState, message: ProjectServerClientMessage) => void): void;
|
|
29
|
+
//# sourceMappingURL=project-server-framing.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ProjectIndexServerMetadata } from './project-server-protocol.js';
|
|
2
|
+
export declare function removeMetadataIfOwned(metadataPath: string, pid: number): void;
|
|
3
|
+
export declare function writeProjectServerMetadata(metadataPath: string, metadata: ProjectIndexServerMetadata): Promise<void>;
|
|
4
|
+
/**
|
|
5
|
+
* One SIGINT/SIGTERM pair per PROCESS, not per module instance.
|
|
6
|
+
*
|
|
7
|
+
* The in-process test harness imports this module once per test case with a
|
|
8
|
+
* `?case=<n>` query URL, so every case evaluates this module body fresh; a
|
|
9
|
+
* bare top-level `process.once(signal, ...)` pair accumulates one handler
|
|
10
|
+
* per case until Node raises MaxListenersExceededWarning in every coverage
|
|
11
|
+
* run. The guard lives on globalThis under a Symbol.for key: the first
|
|
12
|
+
* evaluation registers the pair, every evaluation re-targets it at its own
|
|
13
|
+
* `stop`, and a fired signal removes the pair (once semantics).
|
|
14
|
+
*/
|
|
15
|
+
export interface CodebaseIndexSignalGuard {
|
|
16
|
+
arm(stop: (signal: string) => Promise<void>): void;
|
|
17
|
+
}
|
|
18
|
+
export declare const SIGNAL_GUARD: unique symbol;
|
|
19
|
+
export declare function armCodebaseIndexSignalGuard(stop: (signal: string) => Promise<void>): void;
|
|
20
|
+
//# sourceMappingURL=project-server-lifecycle.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ProjectIndexServerActivity, ProjectServerClientMessage, ProjectServerMessage } from './project-server-protocol.js';
|
|
2
|
+
import { type ServerQueryCaches } from './project-server-query-cache.js';
|
|
3
|
+
import type { ActiveFullIndex, ClientState } from './project-server-types.js';
|
|
4
|
+
import type { IndexOpArgs, OpShapes } from './worker-protocol.js';
|
|
5
|
+
export interface OperationContext {
|
|
6
|
+
projectRoot: string;
|
|
7
|
+
indexDir: string;
|
|
8
|
+
queryCaches: ServerQueryCaches;
|
|
9
|
+
getActivity: () => ProjectIndexServerActivity;
|
|
10
|
+
withIndexWrite: <T>(job: (onProgress: (currentFile: number, totalFiles: number) => void) => Promise<T>, options: {
|
|
11
|
+
preserveCaches: boolean;
|
|
12
|
+
}) => Promise<T>;
|
|
13
|
+
send: (state: ClientState, message: ProjectServerMessage) => void;
|
|
14
|
+
getActiveFullIndex: () => ActiveFullIndex | null;
|
|
15
|
+
setActiveFullIndex: (active: ActiveFullIndex | null) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Cache policy at write-run completion.
|
|
19
|
+
*
|
|
20
|
+
* A run with an explicit targeted file list (edit/watcher reindex) makes a
|
|
21
|
+
* per-file surgical change, so — on success — every previous-generation entry
|
|
22
|
+
* stays valid as a stale answer for the NEXT refresh. On failure the run's
|
|
23
|
+
* transaction rolls back, which equally leaves the cached entries describing
|
|
24
|
+
* the on-disk truth. (Precision: the rollback is per-file — a multi-file
|
|
25
|
+
* targeted run commits the files that parsed and rolls back only the failed
|
|
26
|
+
* one — but each file's slice is atomic, and queries never straddle slices,
|
|
27
|
+
* so cached answers stay correct.) Anything else (full scan, force rebuild,
|
|
28
|
+
* langs/ignore-filtered scan) can reshape the whole index, so its caches are
|
|
29
|
+
* dropped on completion and on failure alike.
|
|
30
|
+
*/
|
|
31
|
+
export declare function preservesQueryCaches(args: IndexOpArgs): boolean;
|
|
32
|
+
export declare function isShareableFullIndex(args: IndexOpArgs): boolean;
|
|
33
|
+
export declare function runFullIndex(ctx: OperationContext, state: ClientState, id: number, args: IndexOpArgs): Promise<OpShapes['index']['result']>;
|
|
34
|
+
export declare function dispatchOperation(ctx: OperationContext, state: ClientState, message: Extract<ProjectServerClientMessage, {
|
|
35
|
+
type: 'request';
|
|
36
|
+
}>): Promise<unknown>;
|
|
37
|
+
//# sourceMappingURL=project-server-operations.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type * as net from 'node:net';
|
|
2
|
+
import type { OpShapes } from './worker-protocol.js';
|
|
3
|
+
export interface ClientState {
|
|
4
|
+
socket: net.Socket;
|
|
5
|
+
/**
|
|
6
|
+
* Raw inbound bytes. Frames may be newline-delimited JSON or length-
|
|
7
|
+
* prefixed binary (magic 0x57); the mode is sniffed per frame. Kept as
|
|
8
|
+
* bytes because a JSON text line may split a multibyte UTF-8 sequence at a
|
|
9
|
+
* chunk boundary — the StringDecoder handles that at parse time.
|
|
10
|
+
*/
|
|
11
|
+
buffer: Buffer;
|
|
12
|
+
cancelled: Set<number>;
|
|
13
|
+
cancel: Map<number, () => void>;
|
|
14
|
+
watchExternal: boolean;
|
|
15
|
+
debounceMs: number;
|
|
16
|
+
coalesceWindowMs: number;
|
|
17
|
+
lastSeenAt: number;
|
|
18
|
+
/** True once this client has sent at least one binary frame. */
|
|
19
|
+
binary: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface FullIndexSubscriber {
|
|
22
|
+
state: ClientState;
|
|
23
|
+
id: number;
|
|
24
|
+
}
|
|
25
|
+
export interface ActiveFullIndex {
|
|
26
|
+
promise: Promise<OpShapes['index']['result']>;
|
|
27
|
+
controller: AbortController;
|
|
28
|
+
subscribers: Set<FullIndexSubscriber>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=project-server-types.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ClientState } from './project-server-types.js';
|
|
2
|
+
export declare const DEFAULT_EXTERNAL_DEBOUNCE_MS = 400;
|
|
3
|
+
export declare const DEFAULT_EXTERNAL_COALESCE_WINDOW_MS = 50;
|
|
4
|
+
export declare function isIgnoredRelativePath(relativePath: string): boolean;
|
|
5
|
+
export interface ProjectServerWatcherOptions {
|
|
6
|
+
projectRoot: string;
|
|
7
|
+
onFilesChanged: (files: string[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class ProjectServerWatcherManager {
|
|
10
|
+
private readonly options;
|
|
11
|
+
private externalWatcher;
|
|
12
|
+
private externalDebounceMs;
|
|
13
|
+
private externalCoalesceWindowMs;
|
|
14
|
+
private readonly externalDebounceTimers;
|
|
15
|
+
private readonly externalReadyFiles;
|
|
16
|
+
private externalReadyFlush;
|
|
17
|
+
constructor(options: ProjectServerWatcherOptions);
|
|
18
|
+
get isWatching(): boolean;
|
|
19
|
+
get pendingFileCount(): number;
|
|
20
|
+
private enqueueExternalFile;
|
|
21
|
+
private ensureExternalWatcher;
|
|
22
|
+
stop(): void;
|
|
23
|
+
reconcile(clients: Iterable<ClientState>): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=project-server-watcher.d.ts.map
|