@wrongstack/tools 0.299.0 → 0.301.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 +6 -2
- package/dist/bash.js +6 -2
- package/dist/batch-tool-use.js +3 -1
- package/dist/browser/index.js +1 -1
- package/dist/builtin.d.ts +3 -2
- package/dist/builtin.js +1781 -376
- package/dist/codebase-index/bm25.d.ts +7 -1
- package/dist/codebase-index/import-extractor.d.ts +39 -0
- package/dist/codebase-index/index.js +1418 -267
- package/dist/codebase-index/languages.d.ts +24 -0
- package/dist/codebase-index/module-resolver.d.ts +78 -0
- package/dist/codebase-index/module-roots.d.ts +81 -0
- package/dist/codebase-index/parser-output.d.ts +29 -0
- package/dist/codebase-index/project-server.js +1402 -249
- package/dist/codebase-index/rs-parser.d.ts +22 -0
- package/dist/codebase-index/schema.d.ts +24 -1
- package/dist/codebase-index/worker.js +1401 -250
- package/dist/codebase-index/writer-graph-helpers.d.ts +17 -5
- package/dist/codebase-index/writer-ref-mapper.d.ts +3 -0
- package/dist/codebase-index/writer-schema.d.ts +15 -3
- package/dist/codebase-index/writer.d.ts +76 -3
- package/dist/exec.js +35 -2
- package/dist/format.js +6 -2
- package/dist/git.js +2 -5
- package/dist/glob.js +2 -2
- package/dist/grep.js +118 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1925 -415
- package/dist/install.js +6 -2
- package/dist/json.js +132 -2
- package/dist/languages/index.js +6 -2
- package/dist/lint.js +6 -2
- package/dist/logs.js +81 -0
- package/dist/next-steps-tool.d.ts +26 -0
- package/dist/outdated.js +6 -2
- package/dist/pack.js +1781 -376
- package/dist/patch.js +206 -45
- package/dist/process-registry.d.ts +6 -0
- package/dist/process-registry.js +6 -2
- package/dist/ps-slash.js +6 -2
- package/dist/read.js +1410 -257
- package/dist/replace.js +81 -0
- package/dist/skill.js +51 -2
- package/dist/test.js +6 -2
- package/dist/tool-help.js +2 -2
- package/dist/tool-search.js +1 -1
- package/dist/tool-tier.d.ts +1 -1
- package/dist/tool-tier.js +1786 -397
- package/dist/tool-use.js +1 -1
- package/dist/tree.js +13 -3
- package/dist/typecheck.js +6 -2
- package/package.json +3 -3
- package/dist/codebase-index/refs-extractor.d.ts +0 -11
|
@@ -9,7 +9,13 @@ interface Bm25Doc {
|
|
|
9
9
|
raw: string;
|
|
10
10
|
len: number;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Tokenise a string into lowercase word tokens.
|
|
14
|
+
*
|
|
15
|
+
* Preserves apostrophes so that identifiers like `can't` or `user's`
|
|
16
|
+
* remain a single token. Underscores are treated as separators (they
|
|
17
|
+
* conventionally split words in snake_case identifiers).
|
|
18
|
+
*/
|
|
13
19
|
export declare function tokenise(text: string): string[];
|
|
14
20
|
export interface IndexableDoc {
|
|
15
21
|
id: number;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Import extraction for languages without an AST parser.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately imports only — no call or type references. An import statement
|
|
5
|
+
* has a rigid, line-anchored syntax that a regex reads correctly; a call site
|
|
6
|
+
* does not, and a regex "call graph" produces edges that look authoritative
|
|
7
|
+
* while being mostly wrong. Dependency edges are what the Code Atlas is built
|
|
8
|
+
* around, so extracting those well beats extracting everything badly.
|
|
9
|
+
*
|
|
10
|
+
* Languages with a real parser (TS/JS via the compiler API, Go and Python via
|
|
11
|
+
* their own `ast` modules) never reach this module.
|
|
12
|
+
*/
|
|
13
|
+
import type { Ref, SymbolLang } from './schema.js';
|
|
14
|
+
/** Only the leading window is scanned, mirroring the generic symbol extractor. */
|
|
15
|
+
export declare const IMPORT_MAX_FILE_CHARS: number;
|
|
16
|
+
/** Upper bound on imports recorded per file. */
|
|
17
|
+
export declare const IMPORT_MAX_PER_FILE = 400;
|
|
18
|
+
/**
|
|
19
|
+
* The name a specifier refers to.
|
|
20
|
+
*
|
|
21
|
+
* Path-like and namespace-like specifiers need opposite treatment of the dot:
|
|
22
|
+
* in `engine/core.h` it introduces a file extension to strip, in
|
|
23
|
+
* `com.example.Helper` it is the segment separator. The presence of a path
|
|
24
|
+
* separator is what tells them apart.
|
|
25
|
+
*/
|
|
26
|
+
export declare function lastSegment(specifier: string): string;
|
|
27
|
+
/** True when this language's imports are extracted here rather than by a parser. */
|
|
28
|
+
export declare function hasImportPatterns(lang: SymbolLang): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Extract `import` refs from source text. Never throws.
|
|
31
|
+
*
|
|
32
|
+
* Returned refs carry `fromId: 0`; the indexer rewrites it to the owning symbol.
|
|
33
|
+
*/
|
|
34
|
+
export declare function extractImports(opts: {
|
|
35
|
+
content: string;
|
|
36
|
+
lang: SymbolLang;
|
|
37
|
+
maxImports?: number;
|
|
38
|
+
}): Ref[];
|
|
39
|
+
//# sourceMappingURL=import-extractor.d.ts.map
|