@mnemonik/shared 7.154.3 → 7.155.2
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/ast/grammars.d.ts +4 -2
- package/dist/ast/grammars.d.ts.map +1 -1
- package/dist/ast/grammars.js +45 -3
- package/dist/ast/grammars.js.map +1 -1
- package/dist/codeScanner.d.ts +26 -329
- package/dist/codeScanner.d.ts.map +1 -1
- package/dist/codeScanner.js +65 -1141
- package/dist/codeScanner.js.map +1 -1
- package/dist/fileSelection.d.ts +451 -0
- package/dist/fileSelection.d.ts.map +1 -0
- package/dist/fileSelection.js +1256 -0
- package/dist/fileSelection.js.map +1 -0
- package/dist/hookTrace.d.ts +40 -0
- package/dist/hookTrace.d.ts.map +1 -1
- package/dist/hookTrace.js +126 -0
- package/dist/hookTrace.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/runtimeAssets.d.ts +12 -0
- package/dist/runtimeAssets.d.ts.map +1 -0
- package/dist/runtimeAssets.js +43 -0
- package/dist/runtimeAssets.js.map +1 -0
- package/dist/sourceRedaction.d.ts +45 -1
- package/dist/sourceRedaction.d.ts.map +1 -1
- package/dist/sourceRedaction.js +62 -22
- package/dist/sourceRedaction.js.map +1 -1
- package/dist/sourceRedactionPool.d.ts +198 -0
- package/dist/sourceRedactionPool.d.ts.map +1 -0
- package/dist/sourceRedactionPool.js +756 -0
- package/dist/sourceRedactionPool.js.map +1 -0
- package/dist/vueSource.d.ts +0 -2
- package/dist/vueSource.d.ts.map +1 -1
- package/dist/vueSource.js +8 -19
- package/dist/vueSource.js.map +1 -1
- package/package.json +5 -1
- package/src/ast/grammars.ts +52 -7
- package/src/codeScanner.ts +121 -1321
- package/src/fileSelection.ts +1440 -0
- package/src/hookTrace.ts +143 -0
- package/src/index.ts +31 -2
- package/src/runtimeAssets.ts +49 -0
- package/src/sourceRedaction.ts +85 -20
- package/src/sourceRedactionPool.ts +877 -0
- package/src/vueSource.ts +8 -23
package/dist/ast/grammars.d.ts
CHANGED
|
@@ -69,7 +69,9 @@ export interface GrammarBinding {
|
|
|
69
69
|
query: Query;
|
|
70
70
|
}
|
|
71
71
|
/** Why a grammar is not usable, always with a human-readable detail. */
|
|
72
|
-
export type GrammarUnavailableReason = 'not_covered' | 'wasm_missing' | 'wasm_load_failed' | 'tags_query_missing' | 'query_compile_failed'
|
|
72
|
+
export type GrammarUnavailableReason = 'not_covered' | 'wasm_missing' | 'wasm_load_failed' | 'tags_query_missing' | 'query_compile_failed'
|
|
73
|
+
/** In the packaged scanner: the artifact differs from the embedded one. */
|
|
74
|
+
| 'asset_integrity';
|
|
73
75
|
export type GrammarLoad = {
|
|
74
76
|
ok: GrammarBinding;
|
|
75
77
|
} | {
|
|
@@ -140,7 +142,7 @@ export declare function astArtifactReport(artifactDir?: string): {
|
|
|
140
142
|
loaded: AstLanguageId[];
|
|
141
143
|
missing: Array<{
|
|
142
144
|
id: AstLanguageId;
|
|
143
|
-
reason: 'wasm_missing' | 'tags_query_missing';
|
|
145
|
+
reason: 'wasm_missing' | 'tags_query_missing' | 'asset_integrity';
|
|
144
146
|
detail: string;
|
|
145
147
|
}>;
|
|
146
148
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grammars.d.ts","sourceRoot":"","sources":["../../src/ast/grammars.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;
|
|
1
|
+
{"version":3,"file":"grammars.d.ts","sourceRoot":"","sources":["../../src/ast/grammars.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAOH,OAAO,EAAE,QAAQ,EAAU,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAIrE,QAAA,MAAM,oBAAoB,YACxB,YAAY,EACZ,KAAK,EACL,YAAY,EACZ,Q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AAG;IAAE,WAAW,EAAE,wBAAwB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAIrF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,QAAW,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAI5F;AAkED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,aAAa,EACjB,WAAW,GAAE,MAAiB,GAC7B,OAAO,CAAC,WAAW,CAAC,CAOtB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,GAAE,MAAiB,GAAG,aAAa,EAAE,CAEhF;AAyID;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,GAAE,MAAiB,GAAG;IACjE,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,OAAO,EAAE,KAAK,CAAC;QACb,EAAE,EAAE,aAAa,CAAC;QAClB,MAAM,EAAE,cAAc,GAAG,oBAAoB,GAAG,iBAAiB,CAAC;QAClE,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ,CAkBA;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,GAAE,MAAiB,GAAG,OAAO,CAAC;IACjF,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,WAAW,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,aAAa,CAAC;QAAC,MAAM,EAAE,wBAAwB,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7F,CAAC,CAeD"}
|
package/dist/ast/grammars.js
CHANGED
|
@@ -30,11 +30,13 @@
|
|
|
30
30
|
* expression is correct for both the TS sources and the shipped build.
|
|
31
31
|
*/
|
|
32
32
|
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
33
|
+
import { createRequire } from 'node:module';
|
|
33
34
|
import { dirname, extname, join } from 'node:path';
|
|
34
35
|
import { fileURLToPath } from 'node:url';
|
|
35
36
|
import { gunzipSync } from 'node:zlib';
|
|
36
37
|
import { Language, Parser, Query } from 'web-tree-sitter';
|
|
37
38
|
import { warn } from '../logger.js';
|
|
39
|
+
import { inVerifiedRuntime, RuntimeAssetError, verifyRuntimeAsset } from '../runtimeAssets.js';
|
|
38
40
|
const AST_LANGUAGE_ID_LIST = [
|
|
39
41
|
'typescript',
|
|
40
42
|
'tsx',
|
|
@@ -289,9 +291,20 @@ let parserInit = null;
|
|
|
289
291
|
* WebAssembly runtime here; calling it per file would dominate the scan.
|
|
290
292
|
*/
|
|
291
293
|
function initParser() {
|
|
292
|
-
parserInit ??= Parser.init(
|
|
294
|
+
parserInit ??= Parser.init(
|
|
295
|
+
// In the packaged scanner, hand web-tree-sitter its runtime WebAssembly,
|
|
296
|
+
// checked against the embedded asset, rather than let it read the file
|
|
297
|
+
// from the extracted runtime itself (runtimeAssets.ts).
|
|
298
|
+
inVerifiedRuntime() ? { wasmBinary: verifiedParserRuntime() } : undefined);
|
|
293
299
|
return parserInit;
|
|
294
300
|
}
|
|
301
|
+
function verifiedParserRuntime() {
|
|
302
|
+
const path = join(dirname(createRequire(import.meta.url).resolve('web-tree-sitter')), 'web-tree-sitter.wasm');
|
|
303
|
+
const bytes = readFileSync(path);
|
|
304
|
+
verifyRuntimeAsset(path, bytes);
|
|
305
|
+
// Copied out of the checked buffer, which nothing else holds.
|
|
306
|
+
return bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
|
|
307
|
+
}
|
|
295
308
|
/**
|
|
296
309
|
* Successes AND failures, keyed by artifact directory + id. Caching the failures
|
|
297
310
|
* is the point: a checkout missing one `.wasm` must not stat-and-fail once per
|
|
@@ -366,8 +379,9 @@ function resolveArtifacts(id, artifactDir) {
|
|
|
366
379
|
detail: `${id} needs the query chain [${QUERY_CHAIN[id].join(', ')}] but ${tagsPath} is missing or empty`,
|
|
367
380
|
};
|
|
368
381
|
}
|
|
382
|
+
let bytes;
|
|
369
383
|
try {
|
|
370
|
-
|
|
384
|
+
bytes = readFileSync(tagsPath);
|
|
371
385
|
}
|
|
372
386
|
catch (err) {
|
|
373
387
|
return {
|
|
@@ -375,6 +389,13 @@ function resolveArtifacts(id, artifactDir) {
|
|
|
375
389
|
detail: `${id}: could not read ${tagsPath}: ${describe(err)}`,
|
|
376
390
|
};
|
|
377
391
|
}
|
|
392
|
+
try {
|
|
393
|
+
verifyRuntimeAsset(tagsPath, bytes);
|
|
394
|
+
}
|
|
395
|
+
catch (err) {
|
|
396
|
+
return { unavailable: 'asset_integrity', detail: describe(err) };
|
|
397
|
+
}
|
|
398
|
+
source += `${bytes.toString('utf8')}\n`;
|
|
378
399
|
}
|
|
379
400
|
return { wasmPath, source };
|
|
380
401
|
}
|
|
@@ -389,10 +410,31 @@ async function attemptLoad(id, artifactDir) {
|
|
|
389
410
|
if ('unavailable' in artifacts)
|
|
390
411
|
return artifacts;
|
|
391
412
|
const { wasmPath, source } = artifacts;
|
|
413
|
+
let compressed;
|
|
414
|
+
try {
|
|
415
|
+
compressed = readFileSync(wasmPath);
|
|
416
|
+
}
|
|
417
|
+
catch (err) {
|
|
418
|
+
return { unavailable: 'wasm_missing', detail: `could not read ${wasmPath}: ${describe(err)}` };
|
|
419
|
+
}
|
|
420
|
+
try {
|
|
421
|
+
// The buffer checked is the buffer loaded (runtimeAssets.ts).
|
|
422
|
+
verifyRuntimeAsset(wasmPath, compressed);
|
|
423
|
+
}
|
|
424
|
+
catch (err) {
|
|
425
|
+
return { unavailable: 'asset_integrity', detail: describe(err) };
|
|
426
|
+
}
|
|
392
427
|
let language;
|
|
393
428
|
try {
|
|
394
429
|
await initParser();
|
|
395
|
-
|
|
430
|
+
}
|
|
431
|
+
catch (err) {
|
|
432
|
+
if (err instanceof RuntimeAssetError)
|
|
433
|
+
return { unavailable: 'asset_integrity', detail: describe(err) };
|
|
434
|
+
throw err;
|
|
435
|
+
}
|
|
436
|
+
try {
|
|
437
|
+
language = await Language.load(gunzipSync(compressed));
|
|
396
438
|
}
|
|
397
439
|
catch (err) {
|
|
398
440
|
// Presence is not loadability: tree-sitter-dart ships a 741 KB .wasm that
|
package/dist/ast/grammars.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grammars.js","sourceRoot":"","sources":["../../src/ast/grammars.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAa,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,MAAM,oBAAoB,GAAG;IAC3B,YAAY;IACZ,KAAK;IACL,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,GAAG;IACH,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,UAAU;IACV,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,OAAO;IACP,KAAK;IACL,KAAK;IACL,WAAW;IACX,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,SAAS;IACT,OAAO;IACP,iBAAiB;IACjB,SAAS;IACT,OAAO;IACP,MAAM;IACN,GAAG;IACH,KAAK;IACL,UAAU;IACV,SAAS;CACD,CAAC;AAKX,+EAA+E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AAC;IACnF,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;AACpC,CAAC"}
|
package/dist/codeScanner.d.ts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Code Scanner - Parse and chunk source files for embedding
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
5
|
-
|
|
4
|
+
import { FileSelector, type FileSelectionOptions, type IndexExcludedFile } from './fileSelection.js';
|
|
5
|
+
export { FileSelector, DEFAULT_IGNORE_PATTERNS, fileOp, statTuple, BUILT_IN_IGNORE_DIRS, isSecretFile, DEFAULT_INCLUDE_EXTENSIONS, isCursorRulePath, languageForExtension, XCODE_AUTHORITY_PATH, isXcodeAuthorityPath, CMAKE_LISTS_PATH, isCmakeListsPath, isAuthorityOnlyPath, AUTHORITY_FILE_MATCHERS, FIXTURE_PATH_RE, isFixturePath, makeIgnoreMatcher, isGitBoundary, isProjectBoundary, rootProjectId, isLinkedWorktreeCheckout, type FileSelectionOptions, type FileStatTuple, type IndexRuleFiles, type IndexExcludedFile, } from './fileSelection.js';
|
|
6
|
+
/**
|
|
7
|
+
* The version of the scanner's file hash: the SHA-256 of the scrubbed text
|
|
8
|
+
* (`scrubSourceSecrets` over the file with NULs removed) and the content soft
|
|
9
|
+
* default judged on it. The daemon caches that hash per file (size, mtime,
|
|
10
|
+
* ctime, inode), so a restart or a release does not re-read and re-scrub every
|
|
11
|
+
* file. Bump this number whenever redaction or the content soft defaults change
|
|
12
|
+
* what they produce: every machine then re-reads and re-scrubs every file once,
|
|
13
|
+
* which is exactly what a redaction fix needs. Do NOT bump it for a release that
|
|
14
|
+
* leaves both unchanged; a needless bump costs every user a full re-read.
|
|
15
|
+
* tests/ScrubVersion.test.ts pins the scrubber's output on a fixture next to
|
|
16
|
+
* this number, so a scrubber change that forgets the bump fails there.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SCRUB_VERSION = 1;
|
|
6
19
|
/**
|
|
7
20
|
* The one file-size ceiling in Mnemonik. A file at or below this is scanned,
|
|
8
21
|
* chunked, AND pushed verbatim; a file above it is uniformly outside the
|
|
@@ -52,11 +65,10 @@ export interface CodeChunk {
|
|
|
52
65
|
piece?: number;
|
|
53
66
|
};
|
|
54
67
|
}
|
|
55
|
-
|
|
68
|
+
/** CodeScanner's options: the file selection's (fileSelection.ts) and its chunking. */
|
|
69
|
+
export interface ScanOptions extends FileSelectionOptions {
|
|
56
70
|
maxChunkSize?: number;
|
|
57
71
|
minChunkSize?: number;
|
|
58
|
-
ignorePatterns?: string[];
|
|
59
|
-
includeExtensions?: string[];
|
|
60
72
|
/**
|
|
61
73
|
* Byte ceiling above which a file is chunked heuristically instead of parsed.
|
|
62
74
|
* Defaults to `MAX_AST_PARSE_BYTES`; exposed so a caller (and the routing
|
|
@@ -64,175 +76,7 @@ export interface ScanOptions {
|
|
|
64
76
|
* mock.
|
|
65
77
|
*/
|
|
66
78
|
maxAstParseBytes?: number;
|
|
67
|
-
/** Additional protected paths for isolated homes/tests; defaults can only be extended. */
|
|
68
|
-
protectedPaths?: readonly string[];
|
|
69
|
-
}
|
|
70
|
-
/** The rule-file lines one directory contributed to a walk. */
|
|
71
|
-
export interface IndexRuleFiles {
|
|
72
|
-
/** .gitignore + .mnemonikignore lines, unioned, in read order. */
|
|
73
|
-
ignore: string[];
|
|
74
|
-
/** .gitattributes lines, in read order. */
|
|
75
|
-
attributes: string[];
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* A file a walk declined to index because a soft default excluded it.
|
|
79
|
-
* `stage: 'content'` means the file was read and its content decided.
|
|
80
|
-
*/
|
|
81
|
-
export interface IndexExcludedFile {
|
|
82
|
-
/** Root-relative POSIX path, spelled as a chunk's `filePath`. */
|
|
83
|
-
path: string;
|
|
84
|
-
reason: IndexExclusionReason;
|
|
85
|
-
rule: string;
|
|
86
|
-
stage: 'path' | 'content';
|
|
87
79
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Directory basenames the scanner never indexes, across every ecosystem -
|
|
90
|
-
* generated output, package-manager/build caches, and vendored deps. SINGLE
|
|
91
|
-
* SOURCE OF TRUTH: the scanner package's discovery + watch walks import this
|
|
92
|
-
* (`packages/scanner/src/{discovery,watcher}.ts`) and `src/core/utils.ts`
|
|
93
|
-
* derives from it, so every ignore surface agrees instead of drifting (the
|
|
94
|
-
* pre-2026-07 state had four divergent copies). Add only UNAMBIGUOUS names -
|
|
95
|
-
* a project's own `.gitignore` / `.mnemonikignore` covers the ambiguous,
|
|
96
|
-
* project-specific cases (`vendor/`, custom dirs) hierarchically.
|
|
97
|
-
*/
|
|
98
|
-
export declare const BUILT_IN_IGNORE_DIRS: readonly string[];
|
|
99
|
-
/**
|
|
100
|
-
* True when `relPath` names a file whose contents are credentials. Applied
|
|
101
|
-
* by `shouldIgnore` (every walker: directory scan, explicit file lists, and
|
|
102
|
-
* the authority-file walk) and by `makeIgnoreMatcher` (server-side backstop
|
|
103
|
-
* for older or misbehaving daemons). Accepts OS-native or POSIX separators.
|
|
104
|
-
*/
|
|
105
|
-
export declare function isSecretFile(relPath: string): boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Every file type the scanner will chunk, by extension. Matched
|
|
108
|
-
* case-INSENSITIVELY (see `isIncludedExtension`), so lowercase spellings here
|
|
109
|
-
* also cover `.R`, `.SQL`, `.PS1` and the uppercase `.C`/`.H` of older trees.
|
|
110
|
-
*
|
|
111
|
-
* Exported because this list IS the product's language coverage: a project
|
|
112
|
-
* written in something absent from it indexes zero code, and `code_search`
|
|
113
|
-
* reports that as "no indexed matches" rather than "I do not read this
|
|
114
|
-
* language" - invisible to the developer and to us. Coverage is a separate
|
|
115
|
-
* dial from parse quality: a language with no structured extractor falls
|
|
116
|
-
* through to `chunkRaw`, which is what Go, Java and C already get in
|
|
117
|
-
* production, and crude chunks beat no chunks by an enormous margin.
|
|
118
|
-
*
|
|
119
|
-
* Data formats (`.json`, `.yaml`, `.toml`, `.lock`) are deliberately absent:
|
|
120
|
-
* the ones that carry meaning are already collected verbatim by
|
|
121
|
-
* `AUTHORITY_FILE_MATCHERS`, and blanket-indexing the extension would pull in
|
|
122
|
-
* lockfiles and generated output. `.tfvars` is absent for a different reason -
|
|
123
|
-
* `terraform.tfvars` is a conventional home for provider credentials and
|
|
124
|
-
* `isSecretFile` now excludes it outright.
|
|
125
|
-
*/
|
|
126
|
-
export declare const DEFAULT_INCLUDE_EXTENSIONS: readonly string[];
|
|
127
|
-
/**
|
|
128
|
-
* Cursor's rule files: `.cursorrules`, and any `.mdc` under `.cursor/rules/`.
|
|
129
|
-
* Cursor is a launch host, so these are instruction files, the same class as
|
|
130
|
-
* CLAUDE.md and AGENTS.md. Neither spelling can come in through
|
|
131
|
-
* `DEFAULT_INCLUDE_EXTENSIONS`: `.cursorrules` has no extension (`extname`
|
|
132
|
-
* answers ''), and `.mdc` is not a format this scanner reads anywhere else. So
|
|
133
|
-
* both are admitted by path at the chunking gate (`isChunkable`) and chunked as
|
|
134
|
-
* Markdown. They are not `.md` paths, so their whole-file content lands in
|
|
135
|
-
* project_source_content.
|
|
136
|
-
*
|
|
137
|
-
* Matched at any depth, because Cursor also reads nested `.cursor/rules`
|
|
138
|
-
* directories in a monorepo. Case-sensitive, as Cursor spells them. Accepts
|
|
139
|
-
* OS-native or POSIX separators.
|
|
140
|
-
*/
|
|
141
|
-
export declare function isCursorRulePath(relPath: string): boolean;
|
|
142
|
-
/**
|
|
143
|
-
* Language string for a file path or a bare extension, `'unknown'` when the
|
|
144
|
-
* extension is unmapped. A free function rather than a method because callers
|
|
145
|
-
* that never scan anything (AST grammar resolution, server-side symbol
|
|
146
|
-
* preference) need the same answer without constructing a scanner.
|
|
147
|
-
*/
|
|
148
|
-
export declare function languageForExtension(filePathOrExt: string): string;
|
|
149
|
-
/** Content-only build authority, shared by scanner collection and server admission. */
|
|
150
|
-
export declare const XCODE_AUTHORITY_PATH: RegExp;
|
|
151
|
-
export declare const isXcodeAuthorityPath: (path: string) => boolean;
|
|
152
|
-
/** Exact CMake build entrypoint; ordinary .txt files remain outside collection. */
|
|
153
|
-
export declare const CMAKE_LISTS_PATH: RegExp;
|
|
154
|
-
export declare const isCmakeListsPath: (path: string) => boolean;
|
|
155
|
-
/**
|
|
156
|
-
* True when `relPath` is collected verbatim as authority content and must not
|
|
157
|
-
* also be chunked. Accepts OS-native or POSIX separators.
|
|
158
|
-
*/
|
|
159
|
-
export declare function isAuthorityOnlyPath(relPath: string): boolean;
|
|
160
|
-
/**
|
|
161
|
-
* Matchers for authority manifest / config / CI files whose verbatim content
|
|
162
|
-
* is collected by `collectAuthorityFiles` and pushed to the server for
|
|
163
|
-
* doc-truth Fingerprint parsing. Operates on relative, forward-slash paths.
|
|
164
|
-
*/
|
|
165
|
-
export declare const AUTHORITY_FILE_MATCHERS: Array<(relPath: string) => boolean>;
|
|
166
|
-
/**
|
|
167
|
-
* Segment-anchored match for `tests/fixtures/` - matches at the path root or
|
|
168
|
-
* immediately after a `/`. Indexing no longer uses it (the fixture rule is the
|
|
169
|
-
* soft default in indexClassifier.ts, which a project can override); it stays
|
|
170
|
-
* for query-time hygiene over rows indexed before that rule existed
|
|
171
|
-
* (`MemoryManager.searchCodePointers`).
|
|
172
|
-
*/
|
|
173
|
-
export declare const FIXTURE_PATH_RE: RegExp;
|
|
174
|
-
export declare function isFixturePath(path: string): boolean;
|
|
175
|
-
/**
|
|
176
|
-
* Server-side ignore matcher for defense-in-depth path dropping on /scan/push,
|
|
177
|
-
* /scan/reconcile, and file_push. Combines the universal BUILT_IN_IGNORE_DIRS
|
|
178
|
-
* (segment-exact) with a project's uploaded .gitignore/.mnemonikignore patterns
|
|
179
|
-
* (gitignore syntax via the `ignore` package). Built once per request and reused
|
|
180
|
-
* across all pushed paths (root-relative, forward-slash). This does NOT replace
|
|
181
|
-
* the daemon's precise hierarchical walk - it backstops it so a buggy, stale, or
|
|
182
|
-
* malicious client cannot index a path the project ignores, making .mnemonikignore
|
|
183
|
-
* a hard guarantee rather than best-effort.
|
|
184
|
-
*/
|
|
185
|
-
export declare function makeIgnoreMatcher(extraPatterns?: readonly string[]): (relPath: string) => boolean;
|
|
186
|
-
/**
|
|
187
|
-
* True when `dirPath` is the root of a DIFFERENT repository than the one
|
|
188
|
-
* being scanned: it carries its own `.git` entry. A `.git` FILE marks a
|
|
189
|
-
* linked git worktree (wherever the user keeps them) or a submodule
|
|
190
|
-
* checkout; a `.git` DIRECTORY marks a nested clone. Files under such a
|
|
191
|
-
* boundary belong to that repository's own project identity - scanning them
|
|
192
|
-
* into the parent project is wrong attribution for any codebase, so the
|
|
193
|
-
* walkers skip these subtrees. Convention-free: this is git's own marker,
|
|
194
|
-
* not a host/tool path layout. The scan ROOT is exempt by construction
|
|
195
|
-
* (callers only test child directories).
|
|
196
|
-
*/
|
|
197
|
-
export declare function isGitBoundary(dirPath: string): Promise<boolean>;
|
|
198
|
-
/**
|
|
199
|
-
* How many folders deep a project's scan walks. Discovery searches a project
|
|
200
|
-
* for subprojects to the same depth, so a subproject the scan leaves out is
|
|
201
|
-
* always found and scanned as its own project.
|
|
202
|
-
*/
|
|
203
|
-
export declare const SCANNER_MAX_DEPTH = 10;
|
|
204
|
-
/**
|
|
205
|
-
* True when `dirPath` starts a subtree that is not this project's to index.
|
|
206
|
-
* A file belongs to the project of the nearest `.mnemonik.json` above it, so:
|
|
207
|
-
* - a folder with its own identity file is a subproject, indexed as its own
|
|
208
|
-
* project, never also into this one. A file naming the enclosing project
|
|
209
|
-
* (`enclosingProjectId`, a copy) is the same project, and a
|
|
210
|
-
* configuration-only file (no `projectId`) names none: neither is a
|
|
211
|
-
* boundary. A file that cannot be read as an identity still is, and so is
|
|
212
|
-
* a copy in a full clone (its own `.git` DIRECTORY): a second checkout of
|
|
213
|
-
* the project, whose files would otherwise be indexed twice;
|
|
214
|
-
* - a linked worktree (a `.git` FILE whose git directory has a `commondir`,
|
|
215
|
-
* or is missing) is another checkout of a project, indexed from its main
|
|
216
|
-
* checkout.
|
|
217
|
-
* A nested clone or a submodule without its own `.mnemonik.json` belongs to
|
|
218
|
-
* this project and is indexed with it (its `.git` directory is ignored by the
|
|
219
|
-
* built-in rules). The scan ROOT is exempt by construction (callers only test
|
|
220
|
-
* child directories).
|
|
221
|
-
*/
|
|
222
|
-
export declare function isProjectBoundary(dirPath: string, enclosingProjectId?: string): Promise<boolean>;
|
|
223
|
-
/**
|
|
224
|
-
* The project a scan root's own identity file names, or undefined: the
|
|
225
|
-
* enclosing project for isProjectBoundary.
|
|
226
|
-
*/
|
|
227
|
-
export declare function rootProjectId(rootPath: string): Promise<string | undefined>;
|
|
228
|
-
/**
|
|
229
|
-
* True when `dirPath` is the top of a linked git worktree: its `.git` is a
|
|
230
|
-
* FILE pointing at a git directory that has a `commondir`, or at one that no
|
|
231
|
-
* longer exists (a pruned or moved worktree, or one made on another machine):
|
|
232
|
-
* nothing shows it is this project's own. A submodule's `.git` file points at
|
|
233
|
-
* `.git/modules/<name>`, which exists and has no `commondir`.
|
|
234
|
-
*/
|
|
235
|
-
export declare function isLinkedWorktreeCheckout(dirPath: string): Promise<boolean>;
|
|
236
80
|
/**
|
|
237
81
|
* Log which grammars this install ships - ONCE per process, at daemon start,
|
|
238
82
|
* never per file.
|
|
@@ -256,115 +100,12 @@ export declare function isLinkedWorktreeCheckout(dirPath: string): Promise<boole
|
|
|
256
100
|
* Cheap to call repeatedly: this latches, and the report instantiates nothing.
|
|
257
101
|
*/
|
|
258
102
|
export declare function logAstCapabilityOnce(): Promise<void>;
|
|
259
|
-
export declare class CodeScanner {
|
|
103
|
+
export declare class CodeScanner extends FileSelector {
|
|
260
104
|
private options;
|
|
261
|
-
private readonly protectedPaths;
|
|
262
|
-
/** Cumulative observations since this scanner started, including repeated walks. */
|
|
263
|
-
readonly skipReasons: {
|
|
264
|
-
symlink_skipped: number;
|
|
265
|
-
};
|
|
266
|
-
private skipSymlink;
|
|
267
|
-
/**
|
|
268
|
-
* `includeExtensions` folded to lowercase for matching. The gate used to
|
|
269
|
-
* compare `extname()` verbatim while `detectLanguage` lowercased, so a
|
|
270
|
-
* project spelling its files the canonical way - `.R` for R, `.SQL`/`.PS1`
|
|
271
|
-
* on Windows, `.C`/`.H` in older C trees - indexed zero of them and nothing
|
|
272
|
-
* said why.
|
|
273
|
-
*/
|
|
274
|
-
private readonly includeExtensionSet;
|
|
275
105
|
constructor(options?: ScanOptions);
|
|
276
|
-
private isProtected;
|
|
277
|
-
private isProtectedRead;
|
|
278
|
-
/**
|
|
279
|
-
* The chunkable-file gate, shared by every walker and by the explicit
|
|
280
|
-
* file-list path so all three agree on what exists. `relPath` is the path
|
|
281
|
-
* relative to the scan root (OS-native separators accepted).
|
|
282
|
-
*/
|
|
283
|
-
private isChunkable;
|
|
284
|
-
/**
|
|
285
|
-
* Read `.gitignore` + `.mnemonikignore` + `.gitattributes` in `absDir` and
|
|
286
|
-
* compile them into one layer (the two ignore files are unioned -
|
|
287
|
-
* `.mnemonikignore` is just an additional gitignore-syntax exclusion list).
|
|
288
|
-
* Returns null when none of the three exists. FAIL-CLOSED: a non-ENOENT read
|
|
289
|
-
* error (EISDIR, EACCES, timeout) latches `walk.complete = false` so callers
|
|
290
|
-
* deriving *removals* from the walk treat it as untrustworthy rather than
|
|
291
|
-
* silently ignoring nothing.
|
|
292
|
-
*/
|
|
293
|
-
private loadIgnoreLayer;
|
|
294
|
-
/**
|
|
295
|
-
* What the .gitignore / .mnemonikignore layers in `stack` say about
|
|
296
|
-
* `entryRel` (relative to the scan root). Tested deepest-first: the first
|
|
297
|
-
* layer that explicitly ignores OR re-includes (via a `!negation`) wins,
|
|
298
|
-
* matching git's rule that a deeper `.gitignore` overrides a shallower one.
|
|
299
|
-
* Directories are tested with a trailing slash so `foo/` dir-only rules
|
|
300
|
-
* match the directory itself. `'unignored'` means a negation matched this
|
|
301
|
-
* path itself; a re-included parent directory leaves its files `'unmatched'`.
|
|
302
|
-
*/
|
|
303
|
-
private ignoreVerdict;
|
|
304
|
-
private ignoredByStack;
|
|
305
|
-
private static attributeLayers;
|
|
306
|
-
/**
|
|
307
|
-
* Skip this directory? User-ignored directories are skipped as before. A
|
|
308
|
-
* directory a soft default excludes (vendor/, generated/, ...) is pruned too -
|
|
309
|
-
* nothing under it can be indexed - UNLESS a rule above it could re-include
|
|
310
|
-
* something inside it: a `!pattern` or a `-linguist-*` attribute. Then the
|
|
311
|
-
* walk descends and judges each file, so the override works. Rule files
|
|
312
|
-
* INSIDE a pruned directory are never read: a vendored library's own
|
|
313
|
-
* .gitignore negations are not the project's intent.
|
|
314
|
-
*/
|
|
315
|
-
private skipDirectory;
|
|
316
|
-
/**
|
|
317
|
-
* The index decision for a file from its path and the rule stack: `null`
|
|
318
|
-
* when a user ignore rule excludes it, otherwise the classifier's answer
|
|
319
|
-
* (precedence in indexClassifier.ts). Content rules are the caller's next
|
|
320
|
-
* step for an included path without an `override`.
|
|
321
|
-
*/
|
|
322
|
-
private classifyEntry;
|
|
323
|
-
/**
|
|
324
|
-
* Reconstruct the root->parent ignore-layer stack for a single file, for the
|
|
325
|
-
* incremental `scanFiles` path (which has a flat file list, not a recursive
|
|
326
|
-
* walk). Layers are memoized per directory in `cache` across a batch.
|
|
327
|
-
*/
|
|
328
|
-
private buildIgnoreStackForFile;
|
|
329
|
-
/**
|
|
330
|
-
* A predicate for walkers outside this class (the daemon's file watcher):
|
|
331
|
-
* true when the walk would descend into `absDir`, by the same rules
|
|
332
|
-
* `listFiles` applies - user ignore files and soft-default directories,
|
|
333
|
-
* with their overrides. Rule files are read once per directory for the life
|
|
334
|
-
* of the returned predicate; take a fresh one after a rule file changes.
|
|
335
|
-
* Directories outside `rootPath`, and the root itself, always pass.
|
|
336
|
-
*/
|
|
337
|
-
directoryFilter(rootPath: string): (absDir: string) => Promise<boolean>;
|
|
338
|
-
/**
|
|
339
|
-
* True when any directory strictly between `rootPath` and `filePath`
|
|
340
|
-
* starts a subtree this project does not index (see isProjectBoundary). Paths that don't
|
|
341
|
-
* resolve under `rootPath` are not judged here (return false) - the
|
|
342
|
-
* server's path validation handles escapes.
|
|
343
|
-
*/
|
|
344
|
-
private insideNestedGitBoundary;
|
|
345
|
-
/**
|
|
346
|
-
* Maximum directory depth for recursive scanning
|
|
347
|
-
* Prevents runaway recursion on deep/symlinked structures
|
|
348
|
-
*/
|
|
349
|
-
private static readonly MAX_DEPTH;
|
|
350
|
-
private rootProjectIds;
|
|
351
|
-
/**
|
|
352
|
-
* isProjectBoundary, with the scan root's own project as the enclosing one.
|
|
353
|
-
* The root's file is read at most once a minute: a walk tests many folders,
|
|
354
|
-
* and a project relinked since is seen on the next scan.
|
|
355
|
-
*/
|
|
356
|
-
private isBoundary;
|
|
357
|
-
private canonicalRoots;
|
|
358
|
-
private canonicalRoot;
|
|
359
|
-
static containsCanonical(candidate: string, root: string, paths?: {
|
|
360
|
-
sep: "/" | "\\";
|
|
361
|
-
resolve: (...paths: string[]) => string;
|
|
362
|
-
}, caseInsensitive?: boolean): boolean;
|
|
363
|
-
private confineSymlink;
|
|
364
|
-
readConfined(fullPath: string, canonicalRoot: string, enumerated?: Stats): Promise<string>;
|
|
365
106
|
/**
|
|
366
107
|
* Scan a directory recursively and extract code chunks
|
|
367
|
-
*
|
|
108
|
+
* No depth limit: symlinks are skipped and WalkState.ancestors ends any cycle.
|
|
368
109
|
*/
|
|
369
110
|
scanDirectory(rootPath: string): Promise<CodeChunk[]>;
|
|
370
111
|
/**
|
|
@@ -383,48 +124,6 @@ export declare class CodeScanner {
|
|
|
383
124
|
/** Files a soft default excluded by their content (path exclusions are not listed). */
|
|
384
125
|
excluded: IndexExcludedFile[];
|
|
385
126
|
}>;
|
|
386
|
-
/**
|
|
387
|
-
* Enumerate scan-eligible relative file paths under `rootPath` without
|
|
388
|
-
* reading or chunking content. Same walk + ignorePatterns + extension
|
|
389
|
-
* filter as `scanDirectory`, but bounded to O(file count) directory ops
|
|
390
|
-
* - cheap enough to call on every periodic reconcile tick.
|
|
391
|
-
*
|
|
392
|
-
* Returns relative paths normalized against `rootPath`, matching the
|
|
393
|
-
* shape the server stores in `memories.metadata->>'filePath'`. Use this
|
|
394
|
-
* for the scanner reconciliation channel (`POST /api/v1/scan/reconcile`).
|
|
395
|
-
*
|
|
396
|
-
* Defensive: skips any path whose `relative()` result contains a `..`
|
|
397
|
-
* traversal segment (can happen when a symlink resolves under root but
|
|
398
|
-
* the readdir entry path doesn't normalize cleanly). The server's
|
|
399
|
-
* `safeScanPath` rejects such paths; filtering here keeps a single
|
|
400
|
-
* malformed entry from failing the entire reconcile push.
|
|
401
|
-
*/
|
|
402
|
-
listFiles(rootPath: string): Promise<string[]>;
|
|
403
|
-
/**
|
|
404
|
-
* Completeness-aware variant of `listFiles`. `complete === false` means
|
|
405
|
-
* an fs error truncated part of the walk - the returned paths may be
|
|
406
|
-
* missing files that still exist on disk. The daemon's reconcile channel
|
|
407
|
-
* MUST NOT derive removedFiles from an incomplete inventory (a truncated
|
|
408
|
-
* walk otherwise reads as mass deletion and deprecates live memories).
|
|
409
|
-
*/
|
|
410
|
-
listFilesWithStatus(rootPath: string): Promise<{
|
|
411
|
-
paths: string[];
|
|
412
|
-
complete: boolean;
|
|
413
|
-
/**
|
|
414
|
-
* Listed paths a project rule re-included (a `!pattern` or a
|
|
415
|
-
* `-linguist-*` attribute). Content rules do not apply to them; every
|
|
416
|
-
* other listed path still answers to the content rules when read.
|
|
417
|
-
*/
|
|
418
|
-
overridden: Set<string>;
|
|
419
|
-
}>;
|
|
420
|
-
/**
|
|
421
|
-
* The rule files the last complete `listFilesWithStatus` walk of `rootPath`
|
|
422
|
-
* applied, by directory ('' = root). Null before the first complete walk.
|
|
423
|
-
* The daemon uploads these lines so the server judges paths as it did.
|
|
424
|
-
*/
|
|
425
|
-
indexRuleFiles(rootPath: string): Promise<ReadonlyMap<string, IndexRuleFiles> | null>;
|
|
426
|
-
private readonly ruleFilesByRoot;
|
|
427
|
-
private traversePaths;
|
|
428
127
|
/**
|
|
429
128
|
* Scan specific files and extract code chunks.
|
|
430
129
|
* Pass rootPath to compute proper relative file paths in chunk metadata.
|
|
@@ -457,15 +156,6 @@ export declare class CodeScanner {
|
|
|
457
156
|
* Added depth parameter with max limit
|
|
458
157
|
*/
|
|
459
158
|
private traverseDirectory;
|
|
460
|
-
/**
|
|
461
|
-
* Check if path should be ignored
|
|
462
|
-
* Fixed glob-to-regex conversion and substring matching.
|
|
463
|
-
* - Escape regex special chars before replacing * with .*
|
|
464
|
-
* - Replace ALL * occurrences (not just the first)
|
|
465
|
-
* - For non-glob patterns, match on path segments to avoid false positives
|
|
466
|
-
* (e.g., '.env' should not match '.environment.ts')
|
|
467
|
-
*/
|
|
468
|
-
private shouldIgnore;
|
|
469
159
|
/**
|
|
470
160
|
* Parse a file and extract code chunks.
|
|
471
161
|
* Size limit is the shared `MAX_SCANNED_FILE_BYTES` ceiling - the same
|
|
@@ -569,6 +259,13 @@ export declare class CodeScanner {
|
|
|
569
259
|
hash: string;
|
|
570
260
|
}>;
|
|
571
261
|
complete: boolean;
|
|
262
|
+
/** Entries a filesystem error or timeout left out. */
|
|
263
|
+
unreadable: number;
|
|
264
|
+
/** The first few unreadable entries, with the reason. */
|
|
265
|
+
unreadableSamples: Array<{
|
|
266
|
+
path: string;
|
|
267
|
+
reason: string;
|
|
268
|
+
}>;
|
|
572
269
|
}>;
|
|
573
270
|
}
|
|
574
271
|
//# sourceMappingURL=codeScanner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeScanner.d.ts","sourceRoot":"","sources":["../src/codeScanner.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"codeScanner.d.ts","sourceRoot":"","sources":["../src/codeScanner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgBH,OAAO,EACL,YAAY,EASZ,KAAK,oBAAoB,EAEzB,KAAK,iBAAiB,EAGvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,MAAM,EACN,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,0BAA0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