sigmap 3.3.4 → 3.5.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/AGENTS.md +600 -17
- package/CHANGELOG.md +39 -0
- package/README.md +3 -1
- package/gen-context.js +474 -6
- package/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/core/index.js +15 -0
- package/packages/core/package.json +1 -1
- package/src/config/defaults.js +4 -0
- package/src/config/loader.js +2 -1
- package/src/eval/analyzer.js +7 -0
- package/src/extractors/markdown.js +30 -0
- package/src/extractors/patterns.js +135 -0
- package/src/extractors/properties.js +37 -0
- package/src/extractors/python_dataclass.js +77 -0
- package/src/extractors/toml.js +42 -0
- package/src/extractors/typescript_react.js +60 -0
- package/src/extractors/vue_sfc.js +99 -0
- package/src/extractors/xml.js +46 -0
- package/src/mcp/server.js +1 -1
package/AGENTS.md
CHANGED
|
@@ -11,32 +11,615 @@ Use this marker block for all appendable context files:
|
|
|
11
11
|
```
|
|
12
12
|
## Auto-generated signatures
|
|
13
13
|
<!-- Updated by gen-context.js -->
|
|
14
|
+
You are a coding assistant with full knowledge of this codebase.
|
|
15
|
+
Below are the code signatures extracted by SigMap v3.4.0 on 2026-04-14T21:21:26.681Z.
|
|
16
|
+
|
|
17
|
+
Use these signatures to answer questions about the code accurately.
|
|
18
|
+
|
|
19
|
+
## Code Signatures
|
|
20
|
+
|
|
21
|
+
<!-- Generated by SigMap gen-context.js v3.4.0 -->
|
|
22
|
+
<!-- DO NOT EDIT below the marker line — run gen-context.js to regenerate -->
|
|
23
|
+
|
|
24
|
+
# Code signatures
|
|
25
|
+
|
|
26
|
+
## changes (last 5 commits — 11 minutes ago)
|
|
27
|
+
```
|
|
28
|
+
src/config/loader.js ~detectAutoSrcDirs
|
|
29
|
+
src/eval/analyzer.js ~isDockerfile
|
|
30
|
+
src/extractors/markdown.js +extract
|
|
31
|
+
src/extractors/properties.js +extract
|
|
32
|
+
src/extractors/toml.js +extract
|
|
33
|
+
src/extractors/xml.js +attributes +extract
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## packages
|
|
37
|
+
|
|
38
|
+
### packages/adapters/codex.js
|
|
39
|
+
```
|
|
40
|
+
module.exports = { name, format, outputPath, write }
|
|
41
|
+
function format(context, opts = {}) → string
|
|
42
|
+
function outputPath(cwd) → string
|
|
43
|
+
function write(context, cwd, opts = {})
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### packages/adapters/index.js
|
|
47
|
+
```
|
|
48
|
+
module.exports = { getAdapter, listAdapters, adapt, outputsToAdapters }
|
|
49
|
+
function getAdapter(name) → { name: string, format: F
|
|
50
|
+
function listAdapters() → string[]
|
|
51
|
+
function adapt(context, adapterName, opts = {}) → string
|
|
52
|
+
function outputsToAdapters(outputs) → string[]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### packages/core/index.js
|
|
56
|
+
```
|
|
57
|
+
module.exports = { extract, rank, buildSigIndex, scan, score, adapt }
|
|
58
|
+
function _resolveExtractor(language)
|
|
59
|
+
function extract(src, language) → string[]
|
|
60
|
+
function rank(query, sigIndex, opts) → { file: string, score: nu
|
|
61
|
+
function buildSigIndex(cwd) → Map<string, string[]>
|
|
62
|
+
function scan(sigs, filePath) → { safe: string[], redacte
|
|
63
|
+
function score(cwd) → { * score: number, * grad
|
|
64
|
+
function adapt(context, adapterName, opts = {}) → string
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### packages/adapters/claude.js
|
|
68
|
+
```
|
|
69
|
+
module.exports = { name, format, outputPath, write }
|
|
70
|
+
function format(context, opts = {}) → string
|
|
71
|
+
function outputPath(cwd) → string
|
|
72
|
+
function write(context, cwd, opts = {})
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### packages/adapters/copilot.js
|
|
76
|
+
```
|
|
77
|
+
module.exports = { name, format, outputPath, write }
|
|
78
|
+
function format(context, opts = {}) → string
|
|
79
|
+
function outputPath(cwd) → string
|
|
80
|
+
function write(context, cwd, opts = {})
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### packages/adapters/cursor.js
|
|
84
|
+
```
|
|
85
|
+
module.exports = { name, format, outputPath }
|
|
86
|
+
function format(context, opts = {}) → string
|
|
87
|
+
function outputPath(cwd) → string
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### packages/adapters/gemini.js
|
|
91
|
+
```
|
|
92
|
+
module.exports = { name, format, outputPath, write }
|
|
93
|
+
function format(context, opts = {}) → string
|
|
94
|
+
function outputPath(cwd) → string
|
|
95
|
+
function write(context, cwd, opts = {})
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### packages/adapters/openai.js
|
|
99
|
+
```
|
|
100
|
+
module.exports = { name, format, outputPath }
|
|
101
|
+
function format(context, opts = {}) → string
|
|
102
|
+
function outputPath(cwd) → string
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### packages/adapters/windsurf.js
|
|
106
|
+
```
|
|
107
|
+
module.exports = { name, format, outputPath }
|
|
108
|
+
function format(context, opts = {}) → string
|
|
109
|
+
function outputPath(cwd) → string
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### packages/cli/index.js
|
|
113
|
+
```
|
|
114
|
+
module.exports = { CLI_ENTRY, run }
|
|
115
|
+
function run(argv, cwd) → void
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### packages/core/README.md
|
|
119
|
+
```
|
|
120
|
+
h1 sigmap-core
|
|
121
|
+
h2 Installation
|
|
122
|
+
h2 Quick start
|
|
123
|
+
h2 API reference
|
|
124
|
+
h3 `extract(src, language)` → `string[]`
|
|
125
|
+
h3 `rank(query, sigIndex, opts?)` → `Result[]`
|
|
126
|
+
h3 `buildSigIndex(cwd)` → `Map<string, string[]>`
|
|
127
|
+
h3 `scan(sigs, filePath)` → `{ safe: string[], redacted: boolean }`
|
|
128
|
+
h3 `score(cwd)` → `HealthResult`
|
|
129
|
+
h2 Migration from v2.3 and earlier
|
|
130
|
+
h2 v3.0 — Multi-Adapter Architecture (released)
|
|
131
|
+
h2 Zero dependencies
|
|
132
|
+
code-fence bash
|
|
133
|
+
code-fence plain
|
|
134
|
+
code-fence js
|
|
135
|
+
code-fence ---
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## src
|
|
139
|
+
|
|
140
|
+
### src/config/defaults.js
|
|
141
|
+
```
|
|
142
|
+
module.exports = { DEFAULTS }
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### src/config/loader.js
|
|
146
|
+
```
|
|
147
|
+
module.exports = { loadConfig }
|
|
148
|
+
function detectAutoSrcDirs(cwd, excludeList) → string[]
|
|
149
|
+
function loadConfig(cwd) → object
|
|
150
|
+
function deepClone(obj)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### src/eval/analyzer.js
|
|
154
|
+
```
|
|
155
|
+
module.exports = { analyzeFiles, formatAnalysisTable, formatAnalysisJSON }
|
|
156
|
+
function isDockerfile(name)
|
|
157
|
+
function getExtractorName(filePath)
|
|
158
|
+
function tokenCount(sigs)
|
|
159
|
+
function hasCoverage(filePath, cwd)
|
|
160
|
+
function loadExtractor(name, cwd)
|
|
161
|
+
function analyzeFiles(files, cwd, opts) → object[]
|
|
162
|
+
function formatAnalysisTable(stats, showSlow) → string
|
|
163
|
+
function formatAnalysisJSON(stats) → object
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### src/extractors/graphql.js
|
|
167
|
+
```
|
|
168
|
+
module.exports = { extract }
|
|
169
|
+
function extract(src) → string[]
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### src/extractors/markdown.js
|
|
173
|
+
```
|
|
174
|
+
module.exports = { extract }
|
|
175
|
+
function extract(src) → string[]
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### src/extractors/properties.js
|
|
179
|
+
```
|
|
180
|
+
module.exports = { extract }
|
|
181
|
+
function extract(src) → string[]
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### src/extractors/protobuf.js
|
|
185
|
+
```
|
|
186
|
+
module.exports = { extract }
|
|
187
|
+
function extract(src) → string[]
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### src/extractors/sql.js
|
|
191
|
+
```
|
|
192
|
+
module.exports = { extract }
|
|
193
|
+
function extract(src) → string[]
|
|
194
|
+
function _cleanName(raw)
|
|
195
|
+
function _normalizeParams(raw)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### src/extractors/terraform.js
|
|
199
|
+
```
|
|
200
|
+
module.exports = { extract }
|
|
201
|
+
function extract(src) → string[]
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### src/extractors/toml.js
|
|
205
|
+
```
|
|
206
|
+
module.exports = { extract }
|
|
207
|
+
function extract(src) → string[]
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### src/extractors/xml.js
|
|
211
|
+
```
|
|
212
|
+
module.exports = { extract }
|
|
213
|
+
function extract(src) → string[]
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### src/mcp/server.js
|
|
217
|
+
```
|
|
218
|
+
module.exports = { start }
|
|
219
|
+
function respond(id, result)
|
|
220
|
+
function respondError(id, code, message)
|
|
221
|
+
function dispatch(msg, cwd)
|
|
222
|
+
function start(cwd)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### src/eval/runner.js
|
|
226
|
+
```
|
|
227
|
+
module.exports = { run, rank, loadTasks, buildSigIndex, formatTable, formatMetrics, tokenize }
|
|
228
|
+
function buildSigIndex(cwd) → Map<string, string[]>
|
|
229
|
+
function tokenize(text) → string[]
|
|
230
|
+
function scoreFile(sigs, queryTokens) → number
|
|
231
|
+
function rank(query, index, topK = 10) → { file: string, score: nu
|
|
232
|
+
function estimateTokens(sigs) → number
|
|
233
|
+
function loadTasks(tasksFile) → Array<{id:string, query:s
|
|
234
|
+
function run(tasksFile, cwd, opts = {}) → { * tasks: Array<{id, que
|
|
235
|
+
function formatTable(taskResults) → string
|
|
236
|
+
function formatMetrics(metrics) → string
|
|
14
237
|
```
|
|
15
238
|
|
|
16
|
-
###
|
|
239
|
+
### src/eval/scorer.js
|
|
240
|
+
```
|
|
241
|
+
module.exports = { hitAtK, reciprocalRank, precisionAtK, aggregate, firstRank }
|
|
242
|
+
function firstRank(ranked, expected) → number
|
|
243
|
+
function normalizePath(p) → string
|
|
244
|
+
function hitAtK(ranked, expected, k = 5) → 0|1
|
|
245
|
+
function reciprocalRank(ranked, expected) → number
|
|
246
|
+
function precisionAtK(ranked, expected, k = 5) → number
|
|
247
|
+
function aggregate(results, k = 5) → { * hitAt5: number, // fr
|
|
248
|
+
function round(x)
|
|
249
|
+
```
|
|
17
250
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
251
|
+
### src/extractors/coverage.js
|
|
252
|
+
```
|
|
253
|
+
module.exports = { buildTestIndex, isTested }
|
|
254
|
+
function walkFiles(dir)
|
|
255
|
+
function buildTestIndex(cwd, testDirs)
|
|
256
|
+
function isTested(funcName, testIndex)
|
|
257
|
+
```
|
|
21
258
|
|
|
22
|
-
###
|
|
259
|
+
### src/extractors/cpp.js
|
|
260
|
+
```
|
|
261
|
+
module.exports = { extract }
|
|
262
|
+
function extract(src) → string[]
|
|
263
|
+
function extractBlock(src, startIndex)
|
|
264
|
+
function extractMembers(block)
|
|
265
|
+
function normalizeParams(params)
|
|
266
|
+
function normalizeType(type)
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### src/extractors/csharp.js
|
|
270
|
+
```
|
|
271
|
+
module.exports = { extract }
|
|
272
|
+
function extract(src) → string[]
|
|
273
|
+
function extractBlock(src, startIndex)
|
|
274
|
+
function extractMembers(block)
|
|
275
|
+
function normalizeParams(params)
|
|
276
|
+
function normalizeType(type)
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### src/extractors/css.js
|
|
280
|
+
```
|
|
281
|
+
module.exports = { extract }
|
|
282
|
+
function extract(src) → string[]
|
|
283
|
+
```
|
|
23
284
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
285
|
+
### src/extractors/dart.js
|
|
286
|
+
```
|
|
287
|
+
module.exports = { extract }
|
|
288
|
+
function extract(src) → string[]
|
|
289
|
+
function extractBlock(src, startIndex)
|
|
290
|
+
function extractMembers(block)
|
|
291
|
+
function normalizeParams(params)
|
|
292
|
+
```
|
|
29
293
|
|
|
30
|
-
###
|
|
294
|
+
### src/extractors/deps.js
|
|
295
|
+
```
|
|
296
|
+
module.exports = { extractPythonDeps, extractTSDeps, buildReverseDepMap }
|
|
297
|
+
function extractPythonDeps(src) → string[]
|
|
298
|
+
function extractTSDeps(src) → string[]
|
|
299
|
+
function buildReverseDepMap(forwardMap) → Map<string, string[]>
|
|
300
|
+
```
|
|
31
301
|
|
|
32
|
-
|
|
302
|
+
### src/extractors/dockerfile.js
|
|
303
|
+
```
|
|
304
|
+
module.exports = { extract }
|
|
305
|
+
function extract(src) → string[]
|
|
306
|
+
```
|
|
33
307
|
|
|
34
|
-
|
|
308
|
+
### src/extractors/go.js
|
|
309
|
+
```
|
|
310
|
+
module.exports = { extract }
|
|
311
|
+
function extract(src) → string[]
|
|
312
|
+
function extractBlock(src, startIndex)
|
|
313
|
+
function extractInterfaceMethods(block)
|
|
314
|
+
function normalizeParams(params)
|
|
315
|
+
```
|
|
35
316
|
|
|
36
|
-
|
|
317
|
+
### src/extractors/html.js
|
|
318
|
+
```
|
|
319
|
+
module.exports = { extract }
|
|
320
|
+
function extract(src) → string[]
|
|
321
|
+
```
|
|
37
322
|
|
|
38
|
-
|
|
39
|
-
|
|
323
|
+
### src/extractors/java.js
|
|
324
|
+
```
|
|
325
|
+
module.exports = { extract }
|
|
326
|
+
function extract(src) → string[]
|
|
327
|
+
function extractBlock(src, startIndex)
|
|
328
|
+
function extractMembers(block)
|
|
329
|
+
function normalizeParams(params)
|
|
330
|
+
function normalizeType(type)
|
|
40
331
|
```
|
|
41
332
|
|
|
42
|
-
|
|
333
|
+
### src/extractors/javascript.js
|
|
334
|
+
```
|
|
335
|
+
module.exports = { extract }
|
|
336
|
+
function extract(src) → string[]
|
|
337
|
+
function extractBlock(src, startIndex)
|
|
338
|
+
function extractClassMembers(block, returnHints)
|
|
339
|
+
function buildReturnHints(src)
|
|
340
|
+
function normalizeType(type)
|
|
341
|
+
function formatReturnHint(type)
|
|
342
|
+
function normalizeParams(params)
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### src/extractors/kotlin.js
|
|
346
|
+
```
|
|
347
|
+
module.exports = { extract }
|
|
348
|
+
function extract(src) → string[]
|
|
349
|
+
function extractBlock(src, startIndex)
|
|
350
|
+
function extractMembers(block)
|
|
351
|
+
function normalizeParams(params)
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### src/extractors/php.js
|
|
355
|
+
```
|
|
356
|
+
module.exports = { extract }
|
|
357
|
+
function extract(src) → string[]
|
|
358
|
+
function extractBlock(src, startIndex)
|
|
359
|
+
function extractMembers(block)
|
|
360
|
+
function normalizeParams(params)
|
|
361
|
+
function normalizeType(type)
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### src/extractors/prdiff.js
|
|
365
|
+
```
|
|
366
|
+
module.exports = { diffSignatures, extractName }
|
|
367
|
+
function diffSignatures(baseSigs, currentSigs) → {added:string[], removed:
|
|
368
|
+
function extractName(sig)
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### src/extractors/python.js
|
|
372
|
+
```
|
|
373
|
+
module.exports = { extract }
|
|
374
|
+
function extract(src) → string[]
|
|
375
|
+
function extractClassMethods(stripped, startIndex)
|
|
376
|
+
function tryExtractDataclassFields(stripped, classIndex)
|
|
377
|
+
function tryExtractBaseModelFields(stripped, bodyStart)
|
|
378
|
+
function extractClassConstants(stripped, startIndex)
|
|
379
|
+
function extractReturnType(sigLine)
|
|
380
|
+
function normalizeParams(params)
|
|
381
|
+
function extractDocHint(src, fnName, fnSigLine)
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### src/extractors/python_dataclass.js
|
|
385
|
+
```
|
|
386
|
+
module.exports = { extract }
|
|
387
|
+
function extract(src) → string[]
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### src/extractors/ruby.js
|
|
391
|
+
```
|
|
392
|
+
module.exports = { extract }
|
|
393
|
+
function extract(src) → string[]
|
|
394
|
+
function normalizeParams(params)
|
|
395
|
+
function extractReturnHint(stripped, index)
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### src/extractors/rust.js
|
|
399
|
+
```
|
|
400
|
+
module.exports = { extract }
|
|
401
|
+
function extract(src) → string[]
|
|
402
|
+
function extractBlock(src, startIndex)
|
|
403
|
+
function extractMethods(block)
|
|
404
|
+
function normalizeParams(params)
|
|
405
|
+
function extractReturnType(afterParen)
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### src/extractors/scala.js
|
|
409
|
+
```
|
|
410
|
+
module.exports = { extract }
|
|
411
|
+
function extract(src) → string[]
|
|
412
|
+
function extractBlock(src, startIndex)
|
|
413
|
+
function extractMembers(block)
|
|
414
|
+
function normalizeParams(params)
|
|
415
|
+
function normalizeType(type)
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### src/extractors/shell.js
|
|
419
|
+
```
|
|
420
|
+
module.exports = { extract }
|
|
421
|
+
function extract(src) → string[]
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### src/extractors/svelte.js
|
|
425
|
+
```
|
|
426
|
+
module.exports = { extract }
|
|
427
|
+
function extract(src) → string[]
|
|
428
|
+
function normalizeParams(params)
|
|
429
|
+
function normalizeType(type)
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### src/extractors/swift.js
|
|
433
|
+
```
|
|
434
|
+
module.exports = { extract }
|
|
435
|
+
function extract(src) → string[]
|
|
436
|
+
function extractBlock(src, startIndex)
|
|
437
|
+
function extractMembers(block)
|
|
438
|
+
function normalizeParams(params)
|
|
439
|
+
function extractArrowType(str)
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### src/extractors/todos.js
|
|
443
|
+
```
|
|
444
|
+
module.exports = { extractTodos }
|
|
445
|
+
function extractTodos(src) → {line:number, tag:string,
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
### src/extractors/typescript.js
|
|
449
|
+
```
|
|
450
|
+
module.exports = { extract }
|
|
451
|
+
function extract(src) → string[]
|
|
452
|
+
function extractBlock(src, startIndex)
|
|
453
|
+
function extractInterfaceMembers(block)
|
|
454
|
+
function extractClassMembers(block)
|
|
455
|
+
function normalizeParams(params)
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### src/extractors/typescript_react.js
|
|
459
|
+
```
|
|
460
|
+
module.exports = { extract }
|
|
461
|
+
function extract(src) → string[]
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### src/extractors/vue.js
|
|
465
|
+
```
|
|
466
|
+
module.exports = { extract }
|
|
467
|
+
function extract(src) → string[]
|
|
468
|
+
function normalizeParams(params)
|
|
469
|
+
function normalizeType(type)
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
### src/extractors/vue_sfc.js
|
|
473
|
+
```
|
|
474
|
+
module.exports = { extract }
|
|
475
|
+
function extract(src) → string[]
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### src/extractors/yaml.js
|
|
479
|
+
```
|
|
480
|
+
module.exports = { extract }
|
|
481
|
+
function extract(src) → string[]
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### src/format/cache.js
|
|
485
|
+
```
|
|
486
|
+
module.exports = { formatCache, formatCachePayload }
|
|
487
|
+
function formatCache(content) → string
|
|
488
|
+
function formatCachePayload(content, model) → string
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
### src/format/dashboard.js
|
|
492
|
+
```
|
|
493
|
+
module.exports = { generateDashboardHtml, renderHistoryCharts, computeExtractorCoverage, percentile, overBudgetStreak }
|
|
494
|
+
function toNumber(v)
|
|
495
|
+
function percentile(values, p)
|
|
496
|
+
function overBudgetStreak(entries)
|
|
497
|
+
function loadConfig(cwd)
|
|
498
|
+
function shouldExclude(rel, excludeSet)
|
|
499
|
+
function detectLanguage(filePath)
|
|
500
|
+
function walkFiles(dir, maxDepth, depth, out, excludeSet)
|
|
501
|
+
function computeExtractorCoverage(cwd)
|
|
502
|
+
function readBenchmarkTrend(cwd)
|
|
503
|
+
function lineChartSvg(values, title, ySuffix)
|
|
504
|
+
function barChartSvg(perLanguage)
|
|
505
|
+
function sparkline(values)
|
|
506
|
+
function buildDashboardData(cwd, health)
|
|
507
|
+
function generateDashboardHtml(cwd, health)
|
|
508
|
+
function renderHistoryCharts(cwd, health)
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
### src/graph/builder.js
|
|
512
|
+
```
|
|
513
|
+
module.exports = { build, buildFromCwd, extractFileDeps }
|
|
514
|
+
function resolveJsPath(dir, importStr, fileSet) → string|null
|
|
515
|
+
function extractFileDeps(filePath, content, fileSet) → string[]
|
|
516
|
+
function build(files, cwd) → { forward: Map<string,str
|
|
517
|
+
function buildFromCwd(cwd, opts) → { forward: Map<string,str
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### src/graph/impact.js
|
|
521
|
+
```
|
|
522
|
+
module.exports = { getImpact, analyzeImpact, formatImpact, formatImpactJSON }
|
|
523
|
+
function bfs(startFile, reverseGraph, maxDepth) → { direct: Set<string>, tr
|
|
524
|
+
function isTestFile(f)
|
|
525
|
+
function isRouteFile(f)
|
|
526
|
+
function getImpact(changedFile, graph, opts) → { * changed: string, * di
|
|
527
|
+
function analyzeImpact(changedFiles, cwd, opts) → { file: string, impact: o
|
|
528
|
+
function formatImpact(result) → string
|
|
529
|
+
function formatImpactJSON(result) → object
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
### src/health/scorer.js
|
|
533
|
+
```
|
|
534
|
+
module.exports = { score }
|
|
535
|
+
function score(cwd) → { * score: number, * grad
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### src/map/class-hierarchy.js
|
|
539
|
+
```
|
|
540
|
+
module.exports = { analyze }
|
|
541
|
+
function analyze(files, cwd)
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
### src/map/import-graph.js
|
|
545
|
+
```
|
|
546
|
+
module.exports = { analyze }
|
|
547
|
+
function extractImports(filePath, content, fileSet)
|
|
548
|
+
function resolveJsPath(dir, importStr, fileSet)
|
|
549
|
+
function detectCycles(graph)
|
|
550
|
+
function analyze(files, cwd)
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
### src/map/route-table.js
|
|
554
|
+
```
|
|
555
|
+
module.exports = { analyze }
|
|
556
|
+
function shouldSkipFile(rel)
|
|
557
|
+
function analyze(files, cwd)
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
### src/mcp/handlers.js
|
|
561
|
+
```
|
|
562
|
+
module.exports = { readContext, searchSignatures, getMap, createCheckpoint, getRouting, explainFile, listModules, queryContext, getImpact }
|
|
563
|
+
function readContext(args, cwd)
|
|
564
|
+
function searchSignatures(args, cwd)
|
|
565
|
+
function getMap(args, cwd)
|
|
566
|
+
function createCheckpoint(args, cwd)
|
|
567
|
+
function getRouting(args, cwd)
|
|
568
|
+
function explainFile(args, cwd)
|
|
569
|
+
function listModules(args, cwd)
|
|
570
|
+
function queryContext(args, cwd)
|
|
571
|
+
function getImpact(args, cwd)
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### src/mcp/tools.js
|
|
575
|
+
```
|
|
576
|
+
module.exports = { TOOLS }
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
### src/retrieval/ranker.js
|
|
580
|
+
```
|
|
581
|
+
module.exports = { rank, buildSigIndex, scoreFile, formatRankTable, formatRankJSON, DEFAULT_WEIGHTS }
|
|
582
|
+
function scoreFile(filePath, sigs, queryTokens, weights) → number
|
|
583
|
+
function rank(query, sigIndex, opts) → { file: string, score: nu
|
|
584
|
+
function buildSigIndex(cwd) → Map<string, string[]>
|
|
585
|
+
function formatRankTable(results, query) → string
|
|
586
|
+
function formatRankJSON(results, query) → object
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
### src/retrieval/tokenizer.js
|
|
590
|
+
```
|
|
591
|
+
module.exports = { tokenize, STOP_WORDS }
|
|
592
|
+
function tokenize(text, opts) → string[]
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
### src/routing/classifier.js
|
|
596
|
+
```
|
|
597
|
+
module.exports = { classify, classifyAll }
|
|
598
|
+
function classify(filePath, sigs) → 'fast'|'balanced'|'powerf
|
|
599
|
+
function classifyAll(fileEntries, cwd) → { fast: string[], balance
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
### src/routing/hints.js
|
|
603
|
+
```
|
|
604
|
+
module.exports = { TIERS, formatRoutingSection }
|
|
605
|
+
function formatRoutingSection(groups) → string
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
### src/security/patterns.js
|
|
609
|
+
```
|
|
610
|
+
module.exports = { PATTERNS }
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
### src/security/scanner.js
|
|
614
|
+
```
|
|
615
|
+
module.exports = { scan }
|
|
616
|
+
function scan(signatures, filePath) → { safe: string[], redacte
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
### src/tracking/logger.js
|
|
620
|
+
```
|
|
621
|
+
module.exports = { logRun, readLog, summarize }
|
|
622
|
+
function logRun(entry, cwd)
|
|
623
|
+
function readLog(cwd) → object[]
|
|
624
|
+
function summarize(entries) → object
|
|
625
|
+
```
|
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,45 @@ Format: [Semantic Versioning](https://semver.org/)
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## [3.5.0] — 2026-04-14 — Phase C/D Intelligence Expansion
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **Phase C framework-specialized extractors** for richer framework-level signatures:
|
|
17
|
+
- TypeScript React: `.tsx` component metadata (props, hooks, handlers)
|
|
18
|
+
- Vue SFC: `.vue` component metadata (props, emits, slots, lifecycle)
|
|
19
|
+
- Python dataclass/model patterns: dataclasses, Pydantic models, ORM-style fields
|
|
20
|
+
- **Phase D cross-module pattern extractor**:
|
|
21
|
+
- Detects DI containers and injection signatures
|
|
22
|
+
- Detects service, repository, middleware, and controller layer hints
|
|
23
|
+
- Detects type-to-implementation linkage and domain use-case cues
|
|
24
|
+
- Flags unsafe patterns (null-check risks, weak validation, error exposure)
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- **Extractor mapping expanded** so framework-specific files route to specialized extractors (`.tsx` and `.vue`) for higher-signal signatures.
|
|
28
|
+
- **Standalone/bundled runtime wiring updated** to include new Phase C/D extractors in factory resolution.
|
|
29
|
+
|
|
30
|
+
### Testing
|
|
31
|
+
- Added integration coverage for Phase C extractors (`phase-c-extractors`) and Phase D pattern inference (`phase-d-patterns`).
|
|
32
|
+
- Current results:
|
|
33
|
+
- `phase-c-extractors`: 3 passed, 0 failed
|
|
34
|
+
- `phase-d-patterns`: 10 passed, 0 failed
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## [3.4.0] — 2026-04-14 — Phase A/B Coverage Expansion
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
- **Phase A extractor support** for high-value config and docs formats:
|
|
42
|
+
- TOML: `.toml`
|
|
43
|
+
- Java/INI properties: `.properties`
|
|
44
|
+
- XML: `.xml`
|
|
45
|
+
- Markdown technical docs: `.md`
|
|
46
|
+
- **Bundled runtime factory wiring** for new extractors so standalone/binary execution resolves the same modules as source mode.
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
- **Framework-aware source discovery** defaults expanded for Next/React, Angular, Rails, Laravel, and Flask/Python-style layouts.
|
|
50
|
+
- **Strategy audit coverage rules** updated to treat Phase A formats as supported instead of important unsupported baselines.
|
|
51
|
+
- **Default srcDirs** broadened to improve first-run context quality on framework-heavy repositories.
|
|
13
52
|
## [3.3.4] — 2026-04-14 — Binary Bundle Fix
|
|
14
53
|
|
|
15
54
|
### Fixed
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
npx sigmap # 10 seconds. zero config. your AI never reads the wrong file again.
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
> Latest: **v3.
|
|
22
|
+
> Latest: **v3.5.0** adds Phase C/D intelligence expansion with framework-specialized extractors and cross-module pattern detection.
|
|
23
23
|
|
|
24
24
|
<div align="center">
|
|
25
25
|
<img src="demo.gif" alt="SigMap demo — reducing 80K tokens to 4K in under 10 seconds" width="760" />
|
|
@@ -471,6 +471,8 @@ Compatible with **IntelliJ IDEA 2024.1+** (Community & Ultimate), **WebStorm**,
|
|
|
471
471
|
## 🌐 Languages supported
|
|
472
472
|
|
|
473
473
|
> 25 languages. All implemented with zero external dependencies — pure regex + Node built-ins.
|
|
474
|
+
>
|
|
475
|
+
> Also includes lightweight config/doc extraction for `.toml`, `.properties`, `.xml`, and `.md` to improve real-repo coverage beyond source-code files.
|
|
474
476
|
|
|
475
477
|
<details>
|
|
476
478
|
<summary><strong>Show all 25 languages</strong></summary>
|