@maxgfr/codeindex 2.11.0 → 2.12.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/README.md +2 -0
- package/docs/MIGRATION.md +2 -1
- package/docs/SEMANTIC.md +242 -0
- package/package.json +3 -2
- package/scripts/engine.d.mts +16 -4
- package/scripts/engine.mjs +185 -88
- package/src/callers.ts +0 -0
- package/src/embed/model.ts +50 -11
- package/src/engine-cli.ts +13 -17
- package/src/engine.ts +5 -1
- package/src/extract/code.ts +54 -58
- package/src/lang/common.ts +75 -0
- package/src/lang/registry.ts +21 -6
- package/src/mcp.ts +81 -12
- package/src/types.ts +13 -3
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# codeindex
|
|
2
2
|
|
|
3
|
+
[](https://maxgfr.github.io/codeindex/)
|
|
4
|
+
|
|
3
5
|
Self-contained, deterministic **repo-indexing engine**: file walking, language
|
|
4
6
|
detection, symbol/import extraction (tree-sitter AST with a regex fallback),
|
|
5
7
|
import resolution, a typed cross-file link-graph, and graph analytics — shipped
|
package/docs/MIGRATION.md
CHANGED
|
@@ -119,7 +119,8 @@ note only) — so wiring it on is safe before an asset exists.
|
|
|
119
119
|
| **ultrasec** | walker + gitignore + scope + symlink guard | `scanRepo` (`scope`, `gitignore` — its own semantics, ported here) |
|
|
120
120
|
| | per-language defs/imports/calls extraction | `extractCode` (`symbols`/`refs`/`calls`) |
|
|
121
121
|
| | `resolveImport` | `resolveImport` |
|
|
122
|
-
| | `buildGraph` (import+call edges, symbolDefs
|
|
122
|
+
| | `buildGraph` (import+call edges, symbolDefs) | `buildGraph` + `resolveCallEdges` |
|
|
123
|
+
| | `callersBySymbol`, `enclosingSymbol` (raw-recall taint-BFS input) | `buildRawCallerIndex` (issue #8) — every name-matched call site keyed by the raw callee name, no def resolution or gating, `enclosingSymbol` computed per site. `buildCallerIndex` is **NOT** a substitute here: it is def-resolved and gated (language-family filter, JS/TS import gate, same-file self-declaration skip) and will silently drop sites a recall consumer needs. Both are bounded by `FileRecord.calls`'s per-file 512-call cap (dedup by name+line) — a file with more raw call sites than that loses sites upstream of either function. |
|
|
123
124
|
| | keeps | taint source→sink enumeration, external scanners, EPSS/KEV/CVSS, SARIF |
|
|
124
125
|
|
|
125
126
|
## Golden-diff adjudication (every migration)
|
package/docs/SEMANTIC.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Deterministic static-embedding tier (semantic search)
|
|
2
|
+
|
|
3
|
+
codeindex's default search is keyless BM25 lexical ranking (see `search`). The
|
|
4
|
+
**semantic tier** (v2.10.0) adds embedding-based retrieval that is still
|
|
5
|
+
**keyless, zero-dependency, and byte-deterministic** — the same doctrine as the
|
|
6
|
+
rest of the engine, and the reason it does *not* use onnxruntime / transformers.js
|
|
7
|
+
(those are threaded and dequantize int8 to fp32 for matmul, so they are never
|
|
8
|
+
byte-stable across architectures).
|
|
9
|
+
|
|
10
|
+
It is **strictly opt-in by asset presence**, exactly like the tree-sitter
|
|
11
|
+
grammar tier: with no model on disk the engine silently stays lexical.
|
|
12
|
+
|
|
13
|
+
## Why a *static* embedding model
|
|
14
|
+
|
|
15
|
+
A static embedding (model2vec / potion style) is a plain lookup table:
|
|
16
|
+
`token → row vector`. There is **no neural forward pass** — "inference" is:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
tokenize → gather rows → mean-pool → L2-normalize → int8-quantize
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Every step is pure JS and chosen to be byte-identical everywhere:
|
|
23
|
+
|
|
24
|
+
| step | how determinism is guaranteed |
|
|
25
|
+
|---|---|
|
|
26
|
+
| tokenize | `foldText` (NFKD + strip combining marks) → camelCase/ACRONYM split → lowercase → split on non-alphanumeric |
|
|
27
|
+
| wordpiece | greedy longest-match against the vocab, BERT-style `##` continuations; an unsplittable word → the `[UNK]` row |
|
|
28
|
+
| gather | model rows widen float→double exactly |
|
|
29
|
+
| mean-pool | IEEE-754 double add/div in a fixed token order |
|
|
30
|
+
| L2-norm | division by `sqrt(Σv²)` — `sqrt` is correctly-rounded per IEEE-754 |
|
|
31
|
+
| quantize | `unit × 127`, **round-half-to-even** (not `Math.round`), clamp to `[-127,127]` → int8 |
|
|
32
|
+
|
|
33
|
+
Ranking is a **pure integer dot product** of int8 vectors. Because the fixed
|
|
34
|
+
`1/127` scale is shared by every vector, for a given query the integer dot
|
|
35
|
+
`Σ q·c` is monotonic with the cosine estimate — no per-vector float scale is
|
|
36
|
+
stored or multiplied, so nothing about ranking can drift between platforms.
|
|
37
|
+
|
|
38
|
+
**Key insight:** the corpus *and* the query are encoded by the *same* JS encoder,
|
|
39
|
+
so self-consistency is all that is required — fidelity to the original HF
|
|
40
|
+
tokenizer is not. The JS tokenizer deliberately differs from the Python
|
|
41
|
+
reference; that gap is assumed and harmless.
|
|
42
|
+
|
|
43
|
+
## Activation (opt-in by asset)
|
|
44
|
+
|
|
45
|
+
Resolution order (`resolveEmbedModelDir`):
|
|
46
|
+
|
|
47
|
+
1. `CODEINDEX_EMBED_DIR` (explicit override — wins outright)
|
|
48
|
+
2. `<repo>/.codeindex/models/`
|
|
49
|
+
3. `<cwd>/.codeindex/models/`
|
|
50
|
+
|
|
51
|
+
A directory "has a model" when it contains `model.json`. Nothing found →
|
|
52
|
+
`undefined` → silent lexical degradation. **Models are never in the npm
|
|
53
|
+
tarball** (`package.json` `files` is unchanged; the pack-smoke test asserts no
|
|
54
|
+
`model.json` / `*.safetensors` / `embeddings.bin` ships).
|
|
55
|
+
|
|
56
|
+
### `model.json` shape
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"modelId": "…",
|
|
61
|
+
"dim": 256,
|
|
62
|
+
"unk": "[UNK]",
|
|
63
|
+
"vocab": ["[UNK]", "auth", "##token", "..."],
|
|
64
|
+
"weights": [[0.0, ...], [1.0, ...], ...]
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`vocab[i]` is the token whose row is `weights[i]` (length `dim`). Human-authorable
|
|
69
|
+
JSON so a tiny fixture is committable; a real `pull`ed model uses the same shape
|
|
70
|
+
at scale.
|
|
71
|
+
|
|
72
|
+
### The official asset
|
|
73
|
+
|
|
74
|
+
`codeindex embed pull` (no env) fetches the published **`embed-model-v1`** GitHub
|
|
75
|
+
release: a conversion of [`minishlab/potion-base-8M`](https://huggingface.co/minishlab/potion-base-8M)
|
|
76
|
+
(revision `bf8b0566…`, **MIT**) — 256-dim, a 27 559-token WordPiece vocab, int8
|
|
77
|
+
rows at one global scale. The download is **sha256-verified** against
|
|
78
|
+
`EMBED_ASSET_SHA256` (`src/embed/model.ts`) before it is written; a mismatch
|
|
79
|
+
fails the pull and writes nothing. The asset is **never** committed to git or
|
|
80
|
+
shipped in the npm tarball — it lives only in the release. Reproduce it
|
|
81
|
+
byte-for-byte with the pinned toolchain in [`scripts/embed-asset/`](../scripts/embed-asset/).
|
|
82
|
+
|
|
83
|
+
## CLI
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
# Effective mode (none/static/endpoint), model, EMBED_VERSION, endpoint + its
|
|
87
|
+
# reachability (JSON). Precedence: endpoint > static model.
|
|
88
|
+
codeindex embed status --repo <dir>
|
|
89
|
+
|
|
90
|
+
# Fetch the official static-embedding asset (published as the `embed-model-v1`
|
|
91
|
+
# GitHub release) into CODEINDEX_EMBED_DIR (or <repo>/.codeindex/models/). The
|
|
92
|
+
# built-in default download is sha256-verified before it is written; set
|
|
93
|
+
# CODEINDEX_EMBED_URL to fetch a custom/mirrored model.json instead (un-verified).
|
|
94
|
+
codeindex embed pull --repo <dir>
|
|
95
|
+
|
|
96
|
+
# Build embeddings.bin from the repo into --out <dir> (static tier only).
|
|
97
|
+
codeindex embed build --repo <dir> --out <dir>
|
|
98
|
+
|
|
99
|
+
# Print (or --run) the docker command that starts the rich-tier embedding server.
|
|
100
|
+
codeindex embed serve # prints the one-liner
|
|
101
|
+
codeindex embed serve --run # runs it (needs docker)
|
|
102
|
+
|
|
103
|
+
# Search: RRF-fuse an embedding tier + lexical. Degrades to lexical (exit 0)
|
|
104
|
+
# when no tier is available/reachable.
|
|
105
|
+
codeindex search "http client retry" --repo <dir> --semantic
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`codeindex index --out <dir>` additionally writes `embeddings.bin` next to
|
|
109
|
+
`graph.json` **iff** a model is present.
|
|
110
|
+
|
|
111
|
+
## Artifact: `embeddings.bin`
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
"CIE1" 4-byte ASCII magic
|
|
115
|
+
uint32 LE header length
|
|
116
|
+
UTF-8 JSON header { embedVersion, modelId, dim, count, records:[{file,symbol,line}] }
|
|
117
|
+
int8 body count × dim signed bytes (row-major)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The header carries **no absolute path and no timestamp**; records follow scan
|
|
121
|
+
order (files sorted by `rel`, symbols in declaration order). Two builds of an
|
|
122
|
+
unchanged repo produce byte-identical `embeddings.bin`. A dedicated
|
|
123
|
+
`EMBED_VERSION` (independent of `SCHEMA_VERSION`) plus `modelId` + `dim` in the
|
|
124
|
+
header invalidate a stale or foreign artifact.
|
|
125
|
+
|
|
126
|
+
Granularity is **per-symbol** (name + signature + file summary + path segments),
|
|
127
|
+
with a **per-file** fallback record for symbol-less files (docs, config) so
|
|
128
|
+
every file with content is represented.
|
|
129
|
+
|
|
130
|
+
## Fusion
|
|
131
|
+
|
|
132
|
+
Semantic and lexical rankings live on incomparable scales (BM25 score vs integer
|
|
133
|
+
dot product), so `searchSemantic` fuses them by **rank** via the shared `rrf`
|
|
134
|
+
helper (k=60) — never a linear score blend. A `SemanticSearchResult` extends the
|
|
135
|
+
lexical `SearchResult` additively with `semanticSymbol` (the corpus symbol whose
|
|
136
|
+
embedding was closest for that file).
|
|
137
|
+
|
|
138
|
+
## Degradation matrix
|
|
139
|
+
|
|
140
|
+
| present | behavior |
|
|
141
|
+
|---|---|
|
|
142
|
+
| nothing | BM25 lexical |
|
|
143
|
+
| + fuzzy | BM25 + trigram fallback for `df==0` terms (v2.9.0) |
|
|
144
|
+
| + model asset | RRF-fused deterministic static semantic search |
|
|
145
|
+
| + HTTP endpoint (`CODEINDEX_EMBED_ENDPOINT`) | rich tier — **wins over a static model** (v2.11.0) |
|
|
146
|
+
| `--semantic`, nothing available | lexical + stderr note, **exit 0** |
|
|
147
|
+
| endpoint set but unreachable/timeout | lexical + stderr note, **exit 0** (never falls back to the static model) |
|
|
148
|
+
|
|
149
|
+
## Library
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
import {
|
|
153
|
+
resolveEmbedModelDir, loadEmbedModel,
|
|
154
|
+
buildEmbeddingIndex, serializeEmbeddings, deserializeEmbeddings,
|
|
155
|
+
searchSemantic, encode, EMBED_VERSION,
|
|
156
|
+
} from "@maxgfr/codeindex";
|
|
157
|
+
|
|
158
|
+
const model = loadEmbedModel(resolveEmbedModelDir("/repo"));
|
|
159
|
+
if (model) {
|
|
160
|
+
const scan = scanRepo("/repo");
|
|
161
|
+
const index = buildEmbeddingIndex(scan, model); // deterministic
|
|
162
|
+
const results = searchSemantic(scan, "http retry", index, { model });
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
`searchSemantic(scan, query, index, opts)` with no `opts.model` (or no index)
|
|
167
|
+
returns the pure lexical ranking — the same silent degradation the CLI uses.
|
|
168
|
+
|
|
169
|
+
## The rich tier: containerized HTTP embedding endpoint (v2.11.0)
|
|
170
|
+
|
|
171
|
+
The **rich tier** lets the engine consume a real neural embedding model (e.g.
|
|
172
|
+
all-MiniLM-L6-v2) served by a local container, instead of the static lookup
|
|
173
|
+
table. It is opt-in via one env var:
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
CODEINDEX_EMBED_ENDPOINT=http://localhost:8756 \
|
|
177
|
+
codeindex search "auth token" --repo . --semantic
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Precedence
|
|
181
|
+
|
|
182
|
+
`endpoint > static model > none`. Setting `CODEINDEX_EMBED_ENDPOINT` is an
|
|
183
|
+
**explicit** user intent, so it wins over any local `model.json`. `embed status`
|
|
184
|
+
reports the effective `mode`. If the endpoint is defined but
|
|
185
|
+
unreachable/times-out/malformed, the search degrades straight to **lexical**
|
|
186
|
+
(stderr note, exit 0) — it does **not** silently fall back to the static model.
|
|
187
|
+
|
|
188
|
+
### How the float vectors join the deterministic pipeline
|
|
189
|
+
|
|
190
|
+
The engine POSTs corpus and query texts to the endpoint, receives **float**
|
|
191
|
+
vectors, then runs them through the **exact same** tail as the static tier —
|
|
192
|
+
`quantize()` in `encode.ts`: L2-normalize → int8 at the fixed `1/127` scale
|
|
193
|
+
(round-half-to-even, clamp). Ranking stays a pure integer dot product. So the
|
|
194
|
+
only tier-specific step is the encoder; fusion and ranking are shared code.
|
|
195
|
+
|
|
196
|
+
Corpus embeddings for the endpoint tier are built **at search time**
|
|
197
|
+
(`buildEndpointIndex`) and are **never serialized** to `embeddings.bin`: unlike
|
|
198
|
+
the static tier, endpoint vectors are float and provider-dependent, so this tier
|
|
199
|
+
is **deterministic per image digest**, not byte-golden. Pin the digest for
|
|
200
|
+
reproducibility:
|
|
201
|
+
|
|
202
|
+
```sh
|
|
203
|
+
docker run -d -p 8756:8756 ghcr.io/maxgfr/codeindex-embed@sha256:<digest>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### HTTP protocol (implement your own server)
|
|
207
|
+
|
|
208
|
+
`CODEINDEX_EMBED_ENDPOINT` is the server **base URL**. The client derives:
|
|
209
|
+
|
|
210
|
+
| method + path | request | response |
|
|
211
|
+
|---|---|---|
|
|
212
|
+
| `POST {base}/embed` | `{ "texts": ["…", …] }` | `{ "vectors": [[…float…], …] }` (same order, one row per text) |
|
|
213
|
+
| `GET {base}/healthz` | — | `200` (any body) when ready |
|
|
214
|
+
|
|
215
|
+
Notes: any embedding dimension is accepted (the engine quantizes whatever it
|
|
216
|
+
receives); vectors need not be pre-normalized (the engine L2-normalizes anyway);
|
|
217
|
+
the request times out after `CODEINDEX_EMBED_TIMEOUT_MS` (default 30 000).
|
|
218
|
+
`codeindex embed serve` prints/`--run`s the docker command for the official
|
|
219
|
+
image; the **library never orchestrates docker** (that is CLI-only).
|
|
220
|
+
|
|
221
|
+
The reference server is `docker/embed/` (transformers.js + all-MiniLM-L6-v2,
|
|
222
|
+
model baked in at build, offline at run, non-root, `:8756`), published to
|
|
223
|
+
`ghcr.io/maxgfr/codeindex-embed` by `.github/workflows/embed-image.yml`.
|
|
224
|
+
|
|
225
|
+
### Library
|
|
226
|
+
|
|
227
|
+
```ts
|
|
228
|
+
import {
|
|
229
|
+
buildEndpointIndex, encodeQueryViaEndpoint, probeEndpoint,
|
|
230
|
+
searchSemantic, quantize,
|
|
231
|
+
} from "@maxgfr/codeindex";
|
|
232
|
+
|
|
233
|
+
if (await probeEndpoint("http://localhost:8756")) {
|
|
234
|
+
const scan = scanRepo("/repo");
|
|
235
|
+
const index = await buildEndpointIndex(scan); // float → int8 corpus
|
|
236
|
+
const queryVec = await encodeQueryViaEndpoint("auth token");
|
|
237
|
+
const results = searchSemantic(scan, "auth token", index, { queryVec });
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
`embedViaEndpoint(texts, opts)` is the low-level client (`{ texts }` →
|
|
242
|
+
`{ vectors }`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxgfr/codeindex",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "Self-contained, deterministic repo-indexing engine: walk + language detection + symbol/import extraction (tree-sitter AST with regex fallback) + import resolution + typed cross-file link-graph + analytics. Ships as a single zero-dependency engine.mjs that consumer tools vendor.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.33.0",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"scripts/cli.mjs",
|
|
24
24
|
"scripts/grammars",
|
|
25
25
|
"src",
|
|
26
|
-
"docs/MIGRATION.md"
|
|
26
|
+
"docs/MIGRATION.md",
|
|
27
|
+
"docs/SEMANTIC.md"
|
|
27
28
|
],
|
|
28
29
|
"engines": {
|
|
29
30
|
"node": ">=18"
|
package/scripts/engine.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare const ENGINE_VERSION = "2.
|
|
1
|
+
declare const ENGINE_VERSION = "2.12.0";
|
|
2
2
|
declare const SCHEMA_VERSION = 4;
|
|
3
|
-
declare const EXTRACTOR_VERSION =
|
|
3
|
+
declare const EXTRACTOR_VERSION = 9;
|
|
4
4
|
type FileKind = "code" | "doc" | "config" | "asset" | "other";
|
|
5
5
|
type EdgeKind = "contains" | "doc-link" | "import" | "call" | "use" | "mention";
|
|
6
6
|
type Tier = 0 | 1 | 2;
|
|
@@ -337,6 +337,14 @@ type CallerIndex = Map<string, CallerEntry>;
|
|
|
337
337
|
declare function computeImportPairs(scan: RepoScan): Set<string>;
|
|
338
338
|
declare function buildCallerIndex(scan: RepoScan, importPairs?: Set<string>, opts?: CallerIndexOptions): CallerIndex;
|
|
339
339
|
declare function enclosingSymbol(scan: RepoScan, file: string, line: number): CodeSymbol | undefined;
|
|
340
|
+
interface RawCallerSite {
|
|
341
|
+
file: string;
|
|
342
|
+
line: number;
|
|
343
|
+
receiver?: string;
|
|
344
|
+
enclosingSymbol?: CodeSymbol;
|
|
345
|
+
}
|
|
346
|
+
type RawCallerIndex = Map<string, RawCallerSite[]>;
|
|
347
|
+
declare function buildRawCallerIndex(scan: RepoScan): RawCallerIndex;
|
|
340
348
|
|
|
341
349
|
declare function symbolsOverview(scan: RepoScan, rel: string): CodeSymbol[];
|
|
342
350
|
interface SymbolMatch extends CodeSymbol {
|
|
@@ -512,7 +520,11 @@ interface StaticEmbedModel {
|
|
|
512
520
|
declare function resolveEmbedModelDir(repo?: string): string | undefined;
|
|
513
521
|
declare function hasEmbedModel(repo?: string): boolean;
|
|
514
522
|
declare function loadEmbedModel(dir?: string): StaticEmbedModel | undefined;
|
|
515
|
-
|
|
523
|
+
interface EmbedPullTarget {
|
|
524
|
+
url: string;
|
|
525
|
+
sha256?: string;
|
|
526
|
+
}
|
|
527
|
+
declare function resolveEmbedPullUrl(): EmbedPullTarget;
|
|
516
528
|
|
|
517
529
|
declare function basicTokenize(text: string): string[];
|
|
518
530
|
declare function wordpiece(word: string, model: StaticEmbedModel): number[];
|
|
@@ -693,4 +705,4 @@ declare function rrf<T>(lists: T[][], keyOf: (item: T) => string, k?: number): M
|
|
|
693
705
|
|
|
694
706
|
declare function runCli(argv: string[]): Promise<void>;
|
|
695
707
|
|
|
696
|
-
export { type ArchRule, type BuildIndexOptions, type BuiltinRule, type CallerEntry, type CallerIndex, type CallerIndexOptions, type CallerSite, type ChangeCoupling, type CodeInfo, type CodeSymbol, type CouplingOptions, DEFAULT_MAX_FILES, type DeadSymbol, type DiffFile, type DiffSpec, EMBED_VERSION, ENGINE_VERSION, EXTRACTOR_VERSION, type Edge, type EdgeKind, type EditResult, type EmbedEndpointOptions, type EmbeddingIndex, type EmbeddingRecord, type EmbeddingUnit, type FileCategory, type FileKind, type FileNode, type FileRecord, type FindSymbolOptions, type ForbiddenEdgeRule, type Graph, type GrepOptions, type Hotspot, type Hunk, type IgnoreRule, type IndexArtifacts, MARKDOWN_EXT, type MarkdownInfo, type MermaidOptions, type ModuleInfo, type ModuleNode, type RawRef, type RenderScipOptions, type RepoMapOptions, type RepoScan, type Resolution, type ResolveContext, type RiskHotspot, type RuleSeverity, type RuleViolation, SCHEMA_VERSION, type ScanOptions, type SearchHit, type SearchOptions, type SearchResult, type SemanticSearchOptions, type SemanticSearchResult, type ShResult, type StaticEmbedModel, type SurpriseEdge, type SymbolComplexity, type SymbolIndex, type SymbolMatch, type SymbolReferences, type TestMap, type Tier, type WalkOptions, type WalkResult, type WalkedFile, type WorkspaceInfo, type WorkspaceKind, type WorkspacePackage, allGrammarKeys, applyCentrality, basicTokenize, betweennessOf, buildCallerIndex, buildEmbeddingIndex, buildEndpointIndex, buildGraph, buildIndexArtifacts, buildModules, buildResolveContext, buildSymbolIndex, byKey, byStr, categorize, changeCoupling, changedSince, checkRules, classify, clip, clipInline, communityOf, compileGlobs, complexityOfSource, computeImportPairs, computeSurprises, computeSymbolRefs, computeTestMap, deleteMemory, deserializeEmbeddings, detectCommunities, detectWorkspaces, diffFiles, diffHunks, embedEndpointUrl, embedViaEndpoint, embeddingUnits, enclosingSymbol, encode, encodeQueryViaEndpoint, ensureGrammars, escapeRegExp, extToLang, extractAst, extractCode, extractMarkdown, extractSymbols, findDeadCode, findReferences, findSymbol, foldText, gitChurn, grammarKeyForExt, grammarReady, grepRepo, hasEmbedModel, have, headCommit, healthzUrl, insertAfterSymbol, insertBeforeSymbol, intDot, isCode, isDoc, isGitWorktree, isIgnored, isSurprising, isTestFile, isTestPath, keywords, languageOf, listMemories, loadEmbedModel, pagerankOf, parseGitignore, parseRules, probeEndpoint, quantize, rankHotspots, rankedKeywords, readMemory, readText, renderGraphJson, renderMermaid, renderRepoMap, renderScip, renderSymbolsJson, replaceSymbolBody, resolveBaseRef, resolveCallEdges, resolveDocLink, resolveEmbedEndpoint, resolveEmbedModelDir, resolveEmbedPullUrl, resolveImport, resolveUniqueSymbol, riskHotspots, roundHalfToEven, rrf, runCli, runMcpServer, scanRepo, searchIndex, searchSemantic, serializeEmbeddings, sh, sha1, shortHash, slugify, subtokens, symbolComplexity, symbolsOverview, testsForModule, tierForPath, tokenize, uniqueSymbolDefs, untestedModules, untrackedFiles, walk, wordpiece, writeMemory };
|
|
708
|
+
export { type ArchRule, type BuildIndexOptions, type BuiltinRule, type CallerEntry, type CallerIndex, type CallerIndexOptions, type CallerSite, type ChangeCoupling, type CodeInfo, type CodeSymbol, type CouplingOptions, DEFAULT_MAX_FILES, type DeadSymbol, type DiffFile, type DiffSpec, EMBED_VERSION, ENGINE_VERSION, EXTRACTOR_VERSION, type Edge, type EdgeKind, type EditResult, type EmbedEndpointOptions, type EmbeddingIndex, type EmbeddingRecord, type EmbeddingUnit, type FileCategory, type FileKind, type FileNode, type FileRecord, type FindSymbolOptions, type ForbiddenEdgeRule, type Graph, type GrepOptions, type Hotspot, type Hunk, type IgnoreRule, type IndexArtifacts, MARKDOWN_EXT, type MarkdownInfo, type MermaidOptions, type ModuleInfo, type ModuleNode, type RawCallerIndex, type RawCallerSite, type RawRef, type RenderScipOptions, type RepoMapOptions, type RepoScan, type Resolution, type ResolveContext, type RiskHotspot, type RuleSeverity, type RuleViolation, SCHEMA_VERSION, type ScanOptions, type SearchHit, type SearchOptions, type SearchResult, type SemanticSearchOptions, type SemanticSearchResult, type ShResult, type StaticEmbedModel, type SurpriseEdge, type SymbolComplexity, type SymbolIndex, type SymbolMatch, type SymbolReferences, type TestMap, type Tier, type WalkOptions, type WalkResult, type WalkedFile, type WorkspaceInfo, type WorkspaceKind, type WorkspacePackage, allGrammarKeys, applyCentrality, basicTokenize, betweennessOf, buildCallerIndex, buildEmbeddingIndex, buildEndpointIndex, buildGraph, buildIndexArtifacts, buildModules, buildRawCallerIndex, buildResolveContext, buildSymbolIndex, byKey, byStr, categorize, changeCoupling, changedSince, checkRules, classify, clip, clipInline, communityOf, compileGlobs, complexityOfSource, computeImportPairs, computeSurprises, computeSymbolRefs, computeTestMap, deleteMemory, deserializeEmbeddings, detectCommunities, detectWorkspaces, diffFiles, diffHunks, embedEndpointUrl, embedViaEndpoint, embeddingUnits, enclosingSymbol, encode, encodeQueryViaEndpoint, ensureGrammars, escapeRegExp, extToLang, extractAst, extractCode, extractMarkdown, extractSymbols, findDeadCode, findReferences, findSymbol, foldText, gitChurn, grammarKeyForExt, grammarReady, grepRepo, hasEmbedModel, have, headCommit, healthzUrl, insertAfterSymbol, insertBeforeSymbol, intDot, isCode, isDoc, isGitWorktree, isIgnored, isSurprising, isTestFile, isTestPath, keywords, languageOf, listMemories, loadEmbedModel, pagerankOf, parseGitignore, parseRules, probeEndpoint, quantize, rankHotspots, rankedKeywords, readMemory, readText, renderGraphJson, renderMermaid, renderRepoMap, renderScip, renderSymbolsJson, replaceSymbolBody, resolveBaseRef, resolveCallEdges, resolveDocLink, resolveEmbedEndpoint, resolveEmbedModelDir, resolveEmbedPullUrl, resolveImport, resolveUniqueSymbol, riskHotspots, roundHalfToEven, rrf, runCli, runMcpServer, scanRepo, searchIndex, searchSemantic, serializeEmbeddings, sh, sha1, shortHash, slugify, subtokens, symbolComplexity, symbolsOverview, testsForModule, tierForPath, tokenize, uniqueSymbolDefs, untestedModules, untrackedFiles, walk, wordpiece, writeMemory };
|