sigmap 6.10.1 → 6.10.3
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 +466 -208
- package/CHANGELOG.md +28 -0
- package/README.md +22 -9
- package/gen-context.js +223 -3
- package/package.json +1 -1
- package/packages/adapters/index.js +4 -2
- package/packages/adapters/willow.js +200 -0
- package/packages/cli/package.json +1 -1
- package/packages/core/index.js +1 -0
- package/packages/core/package.json +1 -1
- package/src/discovery/language-detector.js +1 -0
- package/src/eval/analyzer.js +1 -0
- package/src/extractors/gdscript.js +131 -0
- package/src/map/import-graph.js +1 -1
- package/src/mcp/server.js +1 -1
package/AGENTS.md
CHANGED
|
@@ -56,36 +56,41 @@ Use this marker block for all appendable context files:
|
|
|
56
56
|
| To query by topic | `sigmap --query "<topic>"` |
|
|
57
57
|
|
|
58
58
|
Always run `sigmap ask` or `sigmap --query` before searching for files relevant to a task.
|
|
59
|
+
## changes (last 5 commits — 3 days ago)
|
|
59
60
|
## deps
|
|
60
61
|
```
|
|
61
62
|
src/extractors/python_ast.py ← ast
|
|
62
63
|
```
|
|
63
64
|
|
|
64
|
-
##
|
|
65
|
+
## packages
|
|
66
|
+
|
|
67
|
+
### packages/core/index.js
|
|
68
|
+
```
|
|
69
|
+
module.exports = { extract, rank, buildSigIndex, scan, score, adapt }
|
|
70
|
+
function _resolveExtractor(language)
|
|
71
|
+
function extract(src, language) → string[]
|
|
72
|
+
function rank(query, sigIndex, opts) → { file: string, score: nu
|
|
73
|
+
function buildSigIndex(cwd) → Map<string, string[]>
|
|
74
|
+
function scan(sigs, filePath) → { safe: string[], redacte
|
|
75
|
+
function score(cwd) → { * score: number, * grad
|
|
76
|
+
function adapt(context, adapterName, opts = {}) → string
|
|
77
|
+
## changes (last 5 commits — 1 second ago)
|
|
65
78
|
```
|
|
66
|
-
src/discovery/
|
|
67
|
-
src/
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
src/discovery/source-root-resolver.js ~_applySpecialRules ~_dedupeNested
|
|
80
|
+
src/map/import-graph.js ~analyze
|
|
81
|
+
packages/adapters/index.js ~getAdapter
|
|
82
|
+
packages/adapters/willow.js +format +outputPath +generateAtomId +fetchWithTimeout
|
|
70
83
|
```
|
|
71
84
|
|
|
72
|
-
##
|
|
85
|
+
## src
|
|
73
86
|
|
|
87
|
+
### src/discovery/sigmapignore.js
|
|
74
88
|
### packages/cli/index.js
|
|
75
89
|
```
|
|
76
90
|
module.exports = { CLI_ENTRY, run }
|
|
77
91
|
function run(argv, cwd) → void
|
|
78
92
|
```
|
|
79
93
|
|
|
80
|
-
### packages/adapters/index.js
|
|
81
|
-
```
|
|
82
|
-
module.exports = { getAdapter, listAdapters, adapt, outputsToAdapters }
|
|
83
|
-
function getAdapter(name) → { name: string, format: F
|
|
84
|
-
function listAdapters() → string[]
|
|
85
|
-
function adapt(context, adapterName, opts = {}) → string
|
|
86
|
-
function outputsToAdapters(outputs) → string[]
|
|
87
|
-
```
|
|
88
|
-
|
|
89
94
|
### packages/adapters/llm-full.js
|
|
90
95
|
```
|
|
91
96
|
module.exports = { name: 'llm-full', format, outputPath, write }
|
|
@@ -116,61 +121,186 @@ code-fence ---
|
|
|
116
121
|
|
|
117
122
|
### packages/adapters/copilot.js
|
|
118
123
|
```
|
|
119
|
-
module.exports = {
|
|
120
|
-
function
|
|
121
|
-
function
|
|
122
|
-
function outputPath(cwd) → string
|
|
123
|
-
function write(context, cwd, opts = {})
|
|
124
|
+
module.exports = { loadIgnorePatterns, matchesIgnorePattern }
|
|
125
|
+
function loadIgnorePatterns(cwd)
|
|
126
|
+
function matchesIgnorePattern(dirName, patterns)
|
|
124
127
|
```
|
|
125
128
|
|
|
126
|
-
###
|
|
129
|
+
### src/discovery/source-root-registry.js
|
|
127
130
|
```
|
|
128
|
-
module.exports = {
|
|
129
|
-
function format(context, opts = {}) → string
|
|
130
|
-
function _confidenceMeta(opts)
|
|
131
|
-
function outputPath(cwd) → string
|
|
131
|
+
module.exports = { REGISTRY }
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
###
|
|
134
|
+
### src/discovery/source-root-resolver.js
|
|
135
135
|
```
|
|
136
|
-
module.exports = {
|
|
137
|
-
function
|
|
138
|
-
function
|
|
139
|
-
function
|
|
140
|
-
function
|
|
136
|
+
module.exports = { resolveSourceRoots }
|
|
137
|
+
function resolveSourceRoots(cwd, opts = {})
|
|
138
|
+
function _detectMonorepo(cwd)
|
|
139
|
+
function _enumerateCandidates(cwd, isMonorepo, ignorePatterns, excludeList)
|
|
140
|
+
function _applySpecialRules(scored, cwd, primaryFw, fwEntry, frameworks)
|
|
141
|
+
function _dedupeNested(scored)
|
|
142
|
+
function _computeConfidence(frameworks, languages, scoredCount)
|
|
141
143
|
```
|
|
142
144
|
|
|
143
|
-
###
|
|
145
|
+
### src/discovery/source-root-scorer.js
|
|
144
146
|
```
|
|
145
|
-
module.exports = {
|
|
146
|
-
function
|
|
147
|
-
function
|
|
148
|
-
function
|
|
147
|
+
module.exports = { scoreCandidate, getRecentlyChangedDirs, ROOT_ENTRYPOINTS, JVM_PATH_PATTERN }
|
|
148
|
+
function getRecentlyChangedDirs(cwd)
|
|
149
|
+
function scoreCandidate(dirName, fullPath, context)
|
|
150
|
+
function _countSourceFiles(dir, depth)
|
|
149
151
|
```
|
|
150
152
|
|
|
151
|
-
###
|
|
153
|
+
### src/eval/runner.js
|
|
152
154
|
```
|
|
153
|
-
module.exports = {
|
|
154
|
-
function
|
|
155
|
-
function
|
|
156
|
-
function
|
|
155
|
+
module.exports = { run, rank, loadTasks, buildSigIndex, formatTable, formatMetrics, tokenize }
|
|
156
|
+
function buildSigIndex(cwd) → Map<string, string[]>
|
|
157
|
+
function tokenize(text) → string[]
|
|
158
|
+
function scoreFile(sigs, queryTokens) → number
|
|
159
|
+
function rank(query, index, topK = 10) → { file: string, score: nu
|
|
160
|
+
function estimateTokens(sigs) → number
|
|
161
|
+
function loadTasks(tasksFile) → Array<{id:string, query:s
|
|
162
|
+
function run(tasksFile, cwd, opts = {}) → { * tasks: Array<{id, que
|
|
163
|
+
function formatTable(taskResults) → string
|
|
164
|
+
function formatMetrics(metrics) → string
|
|
157
165
|
```
|
|
158
166
|
|
|
159
|
-
###
|
|
167
|
+
### src/eval/scorer.js
|
|
160
168
|
```
|
|
161
|
-
module.exports = {
|
|
162
|
-
function
|
|
163
|
-
function
|
|
164
|
-
function
|
|
165
|
-
function
|
|
169
|
+
module.exports = { hitAtK, reciprocalRank, precisionAtK, aggregate, firstRank }
|
|
170
|
+
function firstRank(ranked, expected) → number
|
|
171
|
+
function normalizePath(p) → string
|
|
172
|
+
function hitAtK(ranked, expected, k = 5) → 0|1
|
|
173
|
+
function reciprocalRank(ranked, expected) → number
|
|
174
|
+
function precisionAtK(ranked, expected, k = 5) → number
|
|
175
|
+
function aggregate(results, k = 5) → { * hitAt5: number, // fr
|
|
176
|
+
function round(x)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### src/extractors/coverage.js
|
|
180
|
+
```
|
|
181
|
+
module.exports = { buildTestIndex, isTested }
|
|
182
|
+
function walkFiles(dir)
|
|
183
|
+
function buildTestIndex(cwd, testDirs)
|
|
184
|
+
function isTested(funcName, testIndex)
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### src/extractors/cpp.js
|
|
188
|
+
```
|
|
189
|
+
module.exports = { extract }
|
|
190
|
+
function extract(src) → string[]
|
|
191
|
+
function extractBlock(src, startIndex)
|
|
192
|
+
function extractMembers(block)
|
|
193
|
+
function normalizeParams(params)
|
|
194
|
+
function normalizeType(type)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### src/extractors/csharp.js
|
|
198
|
+
```
|
|
199
|
+
module.exports = { extract }
|
|
200
|
+
function extract(src) → string[]
|
|
201
|
+
function extractBlock(src, startIndex)
|
|
202
|
+
function extractMembers(block)
|
|
203
|
+
function normalizeParams(params)
|
|
204
|
+
function normalizeType(type)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### src/extractors/css.js
|
|
208
|
+
```
|
|
209
|
+
module.exports = { extract }
|
|
210
|
+
function extract(src) → string[]
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### src/extractors/dart.js
|
|
214
|
+
```
|
|
215
|
+
module.exports = { extract }
|
|
216
|
+
function extract(src) → string[]
|
|
217
|
+
function extractBlock(src, startIndex)
|
|
218
|
+
function extractMembers(block)
|
|
219
|
+
function normalizeParams(params)
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### src/extractors/deps.js
|
|
223
|
+
```
|
|
224
|
+
module.exports = { extractPythonDeps, extractTSDeps, buildReverseDepMap }
|
|
225
|
+
function extractPythonDeps(src) → string[]
|
|
226
|
+
function extractTSDeps(src) → string[]
|
|
227
|
+
function buildReverseDepMap(forwardMap) → Map<string, string[]>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### src/extractors/dockerfile.js
|
|
231
|
+
```
|
|
232
|
+
module.exports = { extract }
|
|
233
|
+
function extract(src) → string[]
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### src/extractors/generic.js
|
|
237
|
+
```
|
|
238
|
+
module.exports = { extract }
|
|
239
|
+
function extract(src)
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### src/extractors/go.js
|
|
243
|
+
```
|
|
244
|
+
module.exports = { extract }
|
|
245
|
+
function extract(src) → string[]
|
|
246
|
+
function extractBlock(src, startIndex)
|
|
247
|
+
function extractInterfaceMethods(block)
|
|
248
|
+
function normalizeParams(params)
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### src/extractors/graphql.js
|
|
252
|
+
```
|
|
253
|
+
module.exports = { extract }
|
|
254
|
+
function extract(src) → string[]
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### src/extractors/html.js
|
|
258
|
+
```
|
|
259
|
+
module.exports = { extract }
|
|
260
|
+
function extract(src) → string[]
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### src/extractors/java.js
|
|
264
|
+
```
|
|
265
|
+
module.exports = { extract }
|
|
266
|
+
function extract(src) → string[]
|
|
267
|
+
function extractBlock(src, startIndex)
|
|
268
|
+
function extractMembers(block)
|
|
269
|
+
function normalizeParams(params)
|
|
270
|
+
function normalizeType(type)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### src/extractors/javascript.js
|
|
274
|
+
```
|
|
275
|
+
module.exports = { extract }
|
|
276
|
+
function extract(src) → string[]
|
|
277
|
+
function extractBlock(src, startIndex)
|
|
278
|
+
function extractClassMembers(block, returnHints)
|
|
279
|
+
function buildReturnHints(src)
|
|
280
|
+
function normalizeType(type)
|
|
281
|
+
function formatReturnHint(type)
|
|
282
|
+
function normalizeParams(params)
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### src/extractors/kotlin.js
|
|
286
|
+
### packages/adapters/index.js
|
|
287
|
+
```
|
|
288
|
+
module.exports = { getAdapter, listAdapters, adapt, outputsToAdapters }
|
|
289
|
+
function getAdapter(name) → { name: string, format: F
|
|
290
|
+
function listAdapters() → string[]
|
|
291
|
+
function adapt(context, adapterName, opts = {}) → string
|
|
292
|
+
function outputsToAdapters(outputs) → string[]
|
|
166
293
|
```
|
|
167
294
|
|
|
168
|
-
### packages/adapters/
|
|
295
|
+
### packages/adapters/willow.js
|
|
169
296
|
```
|
|
170
297
|
module.exports = { name, format, outputPath, write }
|
|
171
298
|
function format(context, opts = {}) → string
|
|
172
299
|
function outputPath(cwd) → string
|
|
173
|
-
function
|
|
300
|
+
function generateAtomId(filepath) → string
|
|
301
|
+
async function fetchWithTimeout(url, opts, timeoutMs) → Promise<Response>
|
|
302
|
+
async function postAtomWithRetry(atom, mcpUrl, timeoutMs, maxRetries) → Promise<boolean>
|
|
303
|
+
async function write(context, cwd, opts = {}) → Promise<void>
|
|
174
304
|
```
|
|
175
305
|
|
|
176
306
|
### packages/core/index.js
|
|
@@ -185,197 +315,216 @@ function score(cwd) → { * score: number, * grad
|
|
|
185
315
|
function adapt(context, adapterName, opts = {}) → string
|
|
186
316
|
```
|
|
187
317
|
|
|
188
|
-
|
|
318
|
+
### packages/adapters/willow.js
|
|
319
|
+
```
|
|
320
|
+
module.exports = { name, format, outputPath, write }
|
|
321
|
+
function format(context, opts = {}) → string
|
|
322
|
+
function outputPath(cwd) → string
|
|
323
|
+
function generateAtomId(filepath) → string
|
|
324
|
+
async function fetchWithTimeout(url, opts, timeoutMs) → Promise<Response>
|
|
325
|
+
async function postAtomWithRetry(atom, mcpUrl, timeoutMs, maxRetries) → Promise<boolean>
|
|
326
|
+
async function write(context, cwd, opts = {}) → Promise<void>
|
|
327
|
+
```
|
|
189
328
|
|
|
190
|
-
###
|
|
329
|
+
### packages/adapters/index.js
|
|
191
330
|
```
|
|
192
|
-
module.exports = {
|
|
193
|
-
function
|
|
194
|
-
function
|
|
195
|
-
function
|
|
196
|
-
function
|
|
197
|
-
function estimateTokens(sigs) → number
|
|
198
|
-
function loadTasks(tasksFile) → Array<{id:string, query:s
|
|
199
|
-
function run(tasksFile, cwd, opts = {}) → { * tasks: Array<{id, que
|
|
200
|
-
function formatTable(taskResults) → string
|
|
201
|
-
function formatMetrics(metrics) → string
|
|
331
|
+
module.exports = { getAdapter, listAdapters, adapt, outputsToAdapters }
|
|
332
|
+
function getAdapter(name) → { name: string, format: F
|
|
333
|
+
function listAdapters() → string[]
|
|
334
|
+
function adapt(context, adapterName, opts = {}) → string
|
|
335
|
+
function outputsToAdapters(outputs) → string[]
|
|
202
336
|
```
|
|
203
337
|
|
|
338
|
+
## src
|
|
339
|
+
|
|
204
340
|
### src/retrieval/tokenizer.js
|
|
205
341
|
```
|
|
206
|
-
module.exports = {
|
|
207
|
-
function
|
|
342
|
+
module.exports = { extract }
|
|
343
|
+
function extract(src) → string[]
|
|
344
|
+
function extractBlock(src, startIndex)
|
|
345
|
+
function extractMembers(block)
|
|
346
|
+
function normalizeParams(params)
|
|
208
347
|
```
|
|
209
348
|
|
|
210
|
-
### src/
|
|
349
|
+
### src/extractors/markdown.js
|
|
211
350
|
```
|
|
212
|
-
module.exports = {
|
|
213
|
-
function
|
|
214
|
-
function extractFileDeps(filePath, content, fileSet) → string[]
|
|
215
|
-
function build(files, cwd) → { forward: Map<string,str
|
|
216
|
-
function buildFromCwd(cwd, opts) → { forward: Map<string,str
|
|
351
|
+
module.exports = { extract }
|
|
352
|
+
function extract(src) → string[]
|
|
217
353
|
```
|
|
218
354
|
|
|
219
|
-
### src/
|
|
355
|
+
### src/extractors/patterns.js
|
|
220
356
|
```
|
|
221
|
-
module.exports = {
|
|
222
|
-
function
|
|
223
|
-
function isTestFile(f)
|
|
224
|
-
function isRouteFile(f)
|
|
225
|
-
function getImpact(changedFile, graph, opts) → { * changed: string, * di
|
|
226
|
-
function analyzeImpact(changedFiles, cwd, opts) → { file: string, impact: o
|
|
227
|
-
function formatImpact(result) → string
|
|
228
|
-
function formatImpactJSON(result) → object
|
|
357
|
+
module.exports = { extract }
|
|
358
|
+
function extract(src) → string[]
|
|
229
359
|
```
|
|
230
360
|
|
|
231
|
-
### src/
|
|
361
|
+
### src/extractors/php.js
|
|
232
362
|
```
|
|
233
|
-
module.exports = {
|
|
363
|
+
module.exports = { extract }
|
|
364
|
+
function extract(src) → string[]
|
|
365
|
+
function extractBlock(src, startIndex)
|
|
366
|
+
function extractMembers(block)
|
|
367
|
+
function normalizeParams(params)
|
|
368
|
+
function normalizeType(type)
|
|
234
369
|
```
|
|
235
370
|
|
|
236
|
-
### src/
|
|
371
|
+
### src/extractors/prdiff.js
|
|
237
372
|
```
|
|
238
|
-
module.exports = {
|
|
239
|
-
function
|
|
373
|
+
module.exports = { diffSignatures, extractName }
|
|
374
|
+
function diffSignatures(baseSigs, currentSigs) → {added:string[], removed:
|
|
375
|
+
function extractName(sig)
|
|
240
376
|
```
|
|
241
377
|
|
|
242
|
-
### src/extractors/
|
|
378
|
+
### src/extractors/properties.js
|
|
243
379
|
```
|
|
244
|
-
module.exports = {
|
|
245
|
-
function
|
|
246
|
-
function buildTestIndex(cwd, testDirs)
|
|
247
|
-
function isTested(funcName, testIndex)
|
|
380
|
+
module.exports = { extract }
|
|
381
|
+
function extract(src) → string[]
|
|
248
382
|
```
|
|
249
383
|
|
|
250
|
-
### src/extractors/
|
|
384
|
+
### src/extractors/protobuf.js
|
|
251
385
|
```
|
|
252
386
|
module.exports = { extract }
|
|
253
387
|
function extract(src) → string[]
|
|
254
388
|
```
|
|
255
389
|
|
|
256
|
-
### src/extractors/
|
|
390
|
+
### src/extractors/python.js
|
|
257
391
|
```
|
|
258
392
|
module.exports = { extract }
|
|
259
393
|
function extract(src) → string[]
|
|
260
|
-
function
|
|
261
|
-
function
|
|
394
|
+
function extractClassMethods(stripped, startIndex)
|
|
395
|
+
function tryExtractDataclassFields(stripped, classIndex)
|
|
396
|
+
function tryExtractBaseModelFields(stripped, bodyStart)
|
|
397
|
+
function extractClassConstants(stripped, startIndex)
|
|
398
|
+
function extractReturnType(sigLine)
|
|
399
|
+
function normalizeParams(params)
|
|
400
|
+
function extractDocHint(src, fnName, fnSigLine)
|
|
262
401
|
```
|
|
263
402
|
|
|
264
|
-
### src/extractors/
|
|
403
|
+
### src/extractors/python_dataclass.js
|
|
265
404
|
```
|
|
266
405
|
module.exports = { extract }
|
|
267
406
|
function extract(src) → string[]
|
|
268
407
|
```
|
|
269
408
|
|
|
270
|
-
### src/extractors/
|
|
409
|
+
### src/extractors/ruby.js
|
|
271
410
|
```
|
|
272
411
|
module.exports = { extract }
|
|
273
412
|
function extract(src) → string[]
|
|
413
|
+
function normalizeParams(params)
|
|
414
|
+
function extractReturnHint(stripped, index)
|
|
274
415
|
```
|
|
275
416
|
|
|
276
|
-
### src/extractors/
|
|
417
|
+
### src/extractors/rust.js
|
|
277
418
|
```
|
|
278
419
|
module.exports = { extract }
|
|
279
420
|
function extract(src) → string[]
|
|
421
|
+
function extractBlock(src, startIndex)
|
|
422
|
+
function extractMethods(block)
|
|
423
|
+
function normalizeParams(params)
|
|
424
|
+
function extractReturnType(afterParen)
|
|
280
425
|
```
|
|
281
426
|
|
|
282
|
-
### src/extractors/
|
|
427
|
+
### src/extractors/scala.js
|
|
283
428
|
```
|
|
284
429
|
module.exports = { extract }
|
|
285
430
|
function extract(src) → string[]
|
|
431
|
+
function extractBlock(src, startIndex)
|
|
432
|
+
function extractMembers(block)
|
|
433
|
+
function normalizeParams(params)
|
|
434
|
+
function normalizeType(type)
|
|
286
435
|
```
|
|
287
436
|
|
|
288
|
-
### src/extractors/
|
|
437
|
+
### src/extractors/shell.js
|
|
289
438
|
```
|
|
290
439
|
module.exports = { extract }
|
|
291
440
|
function extract(src) → string[]
|
|
292
441
|
```
|
|
293
442
|
|
|
294
|
-
### src/extractors/
|
|
443
|
+
### src/extractors/sql.js
|
|
295
444
|
```
|
|
296
445
|
module.exports = { extract }
|
|
297
446
|
function extract(src) → string[]
|
|
447
|
+
function _cleanName(raw)
|
|
448
|
+
function _normalizeParams(raw)
|
|
298
449
|
```
|
|
299
450
|
|
|
300
|
-
### src/extractors/
|
|
451
|
+
### src/extractors/svelte.js
|
|
301
452
|
```
|
|
302
453
|
module.exports = { extract }
|
|
303
454
|
function extract(src) → string[]
|
|
455
|
+
function normalizeParams(params)
|
|
456
|
+
function normalizeType(type)
|
|
304
457
|
```
|
|
305
458
|
|
|
306
|
-
### src/extractors/
|
|
459
|
+
### src/extractors/swift.js
|
|
307
460
|
```
|
|
308
461
|
module.exports = { extract }
|
|
309
462
|
function extract(src) → string[]
|
|
463
|
+
function extractBlock(src, startIndex)
|
|
464
|
+
function extractMembers(block)
|
|
465
|
+
function normalizeParams(params)
|
|
466
|
+
function extractArrowType(str)
|
|
310
467
|
```
|
|
311
468
|
|
|
312
|
-
### src/extractors/
|
|
469
|
+
### src/extractors/terraform.js
|
|
313
470
|
```
|
|
314
471
|
module.exports = { extract }
|
|
315
472
|
function extract(src) → string[]
|
|
316
473
|
```
|
|
317
474
|
|
|
318
|
-
### src/extractors/
|
|
475
|
+
### src/extractors/todos.js
|
|
476
|
+
```
|
|
477
|
+
module.exports = { extractTodos }
|
|
478
|
+
function extractTodos(src) → {line:number, tag:string,
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### src/extractors/toml.js
|
|
319
482
|
```
|
|
320
483
|
module.exports = { extract }
|
|
321
484
|
function extract(src) → string[]
|
|
322
485
|
```
|
|
323
486
|
|
|
324
|
-
### src/extractors/
|
|
487
|
+
### src/extractors/typescript.js
|
|
325
488
|
```
|
|
326
489
|
module.exports = { extract }
|
|
327
490
|
function extract(src) → string[]
|
|
491
|
+
function extractBlock(src, startIndex)
|
|
492
|
+
function extractInterfaceMembers(block)
|
|
493
|
+
function extractClassMembers(block)
|
|
494
|
+
function normalizeParams(params)
|
|
328
495
|
```
|
|
329
496
|
|
|
330
|
-
### src/extractors/
|
|
497
|
+
### src/extractors/typescript_react.js
|
|
331
498
|
```
|
|
332
499
|
module.exports = { extract }
|
|
333
|
-
function extract(src)
|
|
500
|
+
function extract(src) → string[]
|
|
334
501
|
```
|
|
335
502
|
|
|
336
|
-
### src/
|
|
503
|
+
### src/extractors/vue.js
|
|
337
504
|
```
|
|
338
|
-
module.exports = {
|
|
339
|
-
function
|
|
340
|
-
function
|
|
505
|
+
module.exports = { extract }
|
|
506
|
+
function extract(src) → string[]
|
|
507
|
+
function normalizeParams(params)
|
|
508
|
+
function normalizeType(type)
|
|
341
509
|
```
|
|
342
510
|
|
|
343
|
-
### src/
|
|
511
|
+
### src/extractors/vue_sfc.js
|
|
344
512
|
```
|
|
345
|
-
module.exports = {
|
|
346
|
-
function
|
|
347
|
-
function getShortCommit(cwd)
|
|
348
|
-
function detectVersion(cwd)
|
|
349
|
-
function format(context, cwd, writtenFiles, sigmapVersion)
|
|
513
|
+
module.exports = { extract }
|
|
514
|
+
function extract(src) → string[]
|
|
350
515
|
```
|
|
351
516
|
|
|
517
|
+
### src/extractors/xml.js
|
|
352
518
|
### src/format/dashboard.js
|
|
353
519
|
```
|
|
354
|
-
module.exports = {
|
|
355
|
-
function
|
|
356
|
-
function percentile(values, p)
|
|
357
|
-
function overBudgetStreak(entries)
|
|
358
|
-
function loadConfig(cwd)
|
|
359
|
-
function shouldExclude(rel, excludeSet)
|
|
360
|
-
function detectLanguage(filePath)
|
|
361
|
-
function walkFiles(dir, maxDepth, depth, out, excludeSet)
|
|
362
|
-
function computeExtractorCoverage(cwd)
|
|
363
|
-
function readBenchmarkTrend(cwd)
|
|
364
|
-
function lineChartSvg(values, title, ySuffix)
|
|
365
|
-
function barChartSvg(perLanguage)
|
|
366
|
-
function sparkline(values)
|
|
367
|
-
function buildDashboardData(cwd, health)
|
|
368
|
-
function generateDashboardHtml(cwd, health)
|
|
369
|
-
function renderHistoryCharts(cwd, health)
|
|
520
|
+
module.exports = { extract }
|
|
521
|
+
function extract(src) → string[]
|
|
370
522
|
```
|
|
371
523
|
|
|
372
|
-
### src/
|
|
524
|
+
### src/extractors/yaml.js
|
|
373
525
|
```
|
|
374
|
-
module.exports = {
|
|
375
|
-
function
|
|
376
|
-
function groundedness(response, context)
|
|
377
|
-
function extractContextFiles(context, cwd)
|
|
378
|
-
function judge(response, context, opts = {})
|
|
526
|
+
module.exports = { extract }
|
|
527
|
+
function extract(src) → string[]
|
|
379
528
|
```
|
|
380
529
|
|
|
381
530
|
### src/format/benchmark-report.js
|
|
@@ -405,53 +554,83 @@ function generateBenchmarkReportHtml(reports, opts = {})
|
|
|
405
554
|
function writeBenchmarkReport(cwd, opts = {})
|
|
406
555
|
```
|
|
407
556
|
|
|
408
|
-
### src/
|
|
557
|
+
### src/format/cache.js
|
|
409
558
|
```
|
|
410
|
-
module.exports = {
|
|
411
|
-
function
|
|
412
|
-
function
|
|
559
|
+
module.exports = { formatCache, formatCachePayload }
|
|
560
|
+
function formatCache(content) → string
|
|
561
|
+
function formatCachePayload(content, model) → string
|
|
413
562
|
```
|
|
414
563
|
|
|
415
|
-
### src/
|
|
564
|
+
### src/format/dashboard.js
|
|
416
565
|
```
|
|
417
|
-
module.exports = {
|
|
418
|
-
function
|
|
419
|
-
function
|
|
420
|
-
function
|
|
421
|
-
function
|
|
422
|
-
function
|
|
566
|
+
module.exports = { generateDashboardHtml, renderHistoryCharts, computeExtractorCoverage, percentile, overBudgetStreak }
|
|
567
|
+
function toNumber(v)
|
|
568
|
+
function percentile(values, p)
|
|
569
|
+
function overBudgetStreak(entries)
|
|
570
|
+
function loadConfig(cwd)
|
|
571
|
+
function shouldExclude(rel, excludeSet)
|
|
572
|
+
function detectLanguage(filePath)
|
|
573
|
+
function walkFiles(dir, maxDepth, depth, out, excludeSet)
|
|
574
|
+
function computeExtractorCoverage(cwd)
|
|
575
|
+
function readBenchmarkTrend(cwd)
|
|
576
|
+
function lineChartSvg(values, title, ySuffix)
|
|
577
|
+
function barChartSvg(perLanguage)
|
|
578
|
+
function sparkline(values)
|
|
579
|
+
function buildDashboardData(cwd, health)
|
|
580
|
+
function generateDashboardHtml(cwd, health)
|
|
581
|
+
function renderHistoryCharts(cwd, health)
|
|
423
582
|
```
|
|
424
583
|
|
|
425
|
-
### src/
|
|
584
|
+
### src/format/llm-txt.js
|
|
426
585
|
```
|
|
427
|
-
module.exports = {
|
|
428
|
-
function
|
|
429
|
-
function
|
|
430
|
-
function getMap(args, cwd)
|
|
431
|
-
function createCheckpoint(args, cwd)
|
|
432
|
-
function getRouting(args, cwd)
|
|
433
|
-
function explainFile(args, cwd)
|
|
434
|
-
function listModules(args, cwd)
|
|
435
|
-
function queryContext(args, cwd)
|
|
436
|
-
function getImpact(args, cwd)
|
|
586
|
+
module.exports = { format, outputPath }
|
|
587
|
+
function outputPath(cwd)
|
|
588
|
+
function format(context, cwd, version)
|
|
437
589
|
```
|
|
438
590
|
|
|
439
|
-
### src/
|
|
591
|
+
### src/format/llms-txt.js
|
|
440
592
|
```
|
|
441
|
-
module.exports = {
|
|
442
|
-
function
|
|
443
|
-
function
|
|
444
|
-
function
|
|
593
|
+
module.exports = { format, outputPath }
|
|
594
|
+
function outputPath(cwd)
|
|
595
|
+
function getShortCommit(cwd)
|
|
596
|
+
function detectVersion(cwd)
|
|
597
|
+
function format(context, cwd, writtenFiles, sigmapVersion)
|
|
445
598
|
```
|
|
446
599
|
|
|
447
|
-
### src/
|
|
600
|
+
### src/graph/builder.js
|
|
448
601
|
```
|
|
449
|
-
module.exports = {
|
|
450
|
-
function
|
|
451
|
-
function
|
|
452
|
-
function
|
|
453
|
-
function
|
|
454
|
-
|
|
602
|
+
module.exports = { build, buildFromCwd, extractFileDeps }
|
|
603
|
+
function resolveJsPath(dir, importStr, fileSet) → string|null
|
|
604
|
+
function extractFileDeps(filePath, content, fileSet) → string[]
|
|
605
|
+
function build(files, cwd) → { forward: Map<string,str
|
|
606
|
+
function buildFromCwd(cwd, opts) → { forward: Map<string,str
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
### src/graph/impact.js
|
|
610
|
+
```
|
|
611
|
+
module.exports = { getImpact, analyzeImpact, formatImpact, formatImpactJSON }
|
|
612
|
+
function bfs(startFile, reverseGraph, maxDepth) → { direct: Set<string>, tr
|
|
613
|
+
function isTestFile(f)
|
|
614
|
+
function isRouteFile(f)
|
|
615
|
+
function getImpact(changedFile, graph, opts) → { * changed: string, * di
|
|
616
|
+
function analyzeImpact(changedFiles, cwd, opts) → { file: string, impact: o
|
|
617
|
+
function formatImpact(result) → string
|
|
618
|
+
function formatImpactJSON(result) → object
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
### src/health/scorer.js
|
|
622
|
+
```
|
|
623
|
+
module.exports = { score }
|
|
624
|
+
function score(cwd) → { * score: number, * grad
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
### src/judge/judge-engine.js
|
|
628
|
+
```
|
|
629
|
+
module.exports = { groundedness, judge }
|
|
630
|
+
function tokenize(text)
|
|
631
|
+
function groundedness(response, context)
|
|
632
|
+
function extractContextFiles(context, cwd)
|
|
633
|
+
function judge(response, context, opts = {})
|
|
455
634
|
```
|
|
456
635
|
|
|
457
636
|
### src/learning/weights.js
|
|
@@ -471,31 +650,52 @@ function exportWeights(cwd, outputPath)
|
|
|
471
650
|
function importWeights(cwd, importPath, replace)
|
|
472
651
|
```
|
|
473
652
|
|
|
474
|
-
### src/
|
|
653
|
+
### src/map/class-hierarchy.js
|
|
654
|
+
```
|
|
655
|
+
module.exports = { analyze }
|
|
656
|
+
function analyze(files, cwd)
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
### src/map/import-graph.js
|
|
475
660
|
```
|
|
476
|
-
module.exports = {
|
|
477
|
-
function
|
|
478
|
-
function
|
|
479
|
-
function
|
|
480
|
-
function
|
|
481
|
-
function deepClone(obj)
|
|
661
|
+
module.exports = { analyze }
|
|
662
|
+
function extractImports(filePath, content, fileSet)
|
|
663
|
+
function resolveJsPath(dir, importStr, fileSet)
|
|
664
|
+
function detectCycles(graph)
|
|
665
|
+
function analyze(files, cwd)
|
|
482
666
|
```
|
|
483
667
|
|
|
484
|
-
### src/
|
|
668
|
+
### src/map/route-table.js
|
|
485
669
|
```
|
|
486
|
-
module.exports = {
|
|
487
|
-
function
|
|
488
|
-
function
|
|
489
|
-
function _readFile(p)
|
|
490
|
-
function _existsAnywhere(cwd, filename, maxDepth)
|
|
491
|
-
function _walkFind(dir, name, depth)
|
|
670
|
+
module.exports = { analyze }
|
|
671
|
+
function shouldSkipFile(rel)
|
|
672
|
+
function analyze(files, cwd)
|
|
492
673
|
```
|
|
493
674
|
|
|
675
|
+
### src/mcp/handlers.js
|
|
494
676
|
### src/discovery/sigmapignore.js
|
|
495
677
|
```
|
|
496
|
-
module.exports = {
|
|
497
|
-
function
|
|
498
|
-
function
|
|
678
|
+
module.exports = { readContext, searchSignatures, getMap, createCheckpoint, getRouting, explainFile, listModules, queryContext, getImpact }
|
|
679
|
+
function readContext(args, cwd)
|
|
680
|
+
function searchSignatures(args, cwd)
|
|
681
|
+
function getMap(args, cwd)
|
|
682
|
+
function createCheckpoint(args, cwd)
|
|
683
|
+
function getRouting(args, cwd)
|
|
684
|
+
function explainFile(args, cwd)
|
|
685
|
+
function listModules(args, cwd)
|
|
686
|
+
function queryContext(args, cwd)
|
|
687
|
+
function getImpact(args, cwd)
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
### src/mcp/tools.js
|
|
691
|
+
```
|
|
692
|
+
module.exports = { TOOLS }
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
### src/plan/planner.js
|
|
696
|
+
```
|
|
697
|
+
module.exports = { createPlan }
|
|
698
|
+
function createPlan(goal, cwd, config)
|
|
499
699
|
```
|
|
500
700
|
|
|
501
701
|
### src/retrieval/ranker.js
|
|
@@ -513,10 +713,34 @@ function formatRankJSON(results, query) → object
|
|
|
513
713
|
function detectIntent(query)
|
|
514
714
|
```
|
|
515
715
|
|
|
516
|
-
### src/
|
|
716
|
+
### src/retrieval/tokenizer.js
|
|
517
717
|
```
|
|
518
|
-
module.exports = {
|
|
519
|
-
function
|
|
718
|
+
module.exports = { tokenize, STOP_WORDS }
|
|
719
|
+
function tokenize(text, opts) → string[]
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
### src/routing/classifier.js
|
|
723
|
+
```
|
|
724
|
+
module.exports = { classify, classifyAll }
|
|
725
|
+
function classify(filePath, sigs) → 'fast'|'balanced'|'powerf
|
|
726
|
+
function classifyAll(fileEntries, cwd) → { fast: string[], balance
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
### src/routing/hints.js
|
|
730
|
+
```
|
|
731
|
+
module.exports = { TIERS, formatRoutingSection }
|
|
732
|
+
function formatRoutingSection(groups) → string
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
### src/security/patterns.js
|
|
736
|
+
```
|
|
737
|
+
module.exports = { PATTERNS }
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
### src/security/scanner.js
|
|
741
|
+
```
|
|
742
|
+
module.exports = { scan }
|
|
743
|
+
function scan(signatures, filePath) → { safe: string[], redacte
|
|
520
744
|
```
|
|
521
745
|
|
|
522
746
|
### src/session/memory.js
|
|
@@ -529,19 +753,28 @@ function mergeSessionContext(scores, session, currentIntent)
|
|
|
529
753
|
function clearSession(cwd)
|
|
530
754
|
```
|
|
531
755
|
|
|
532
|
-
### src/
|
|
756
|
+
### src/tracking/logger.js
|
|
533
757
|
```
|
|
534
|
-
module.exports = {
|
|
758
|
+
module.exports = { logRun, readLog, summarize }
|
|
759
|
+
function logRun(entry, cwd)
|
|
760
|
+
function readLog(cwd) → object[]
|
|
761
|
+
function summarize(entries) → object
|
|
535
762
|
```
|
|
536
763
|
|
|
537
|
-
### src/
|
|
764
|
+
### src/eval/analyzer.js
|
|
538
765
|
```
|
|
539
|
-
module.exports = {
|
|
540
|
-
function
|
|
541
|
-
function
|
|
542
|
-
function
|
|
766
|
+
module.exports = { analyzeFiles, formatAnalysisTable, formatAnalysisJSON }
|
|
767
|
+
function isDockerfile(name)
|
|
768
|
+
function getExtractorName(filePath)
|
|
769
|
+
function tokenCount(sigs)
|
|
770
|
+
function hasCoverage(filePath, cwd)
|
|
771
|
+
function loadExtractor(name, cwd)
|
|
772
|
+
function analyzeFiles(files, cwd, opts) → object[]
|
|
773
|
+
function formatAnalysisTable(stats, showSlow) → string
|
|
774
|
+
function formatAnalysisJSON(stats) → object
|
|
543
775
|
```
|
|
544
776
|
|
|
777
|
+
### src/discovery/language-detector.js
|
|
545
778
|
### src/eval/usefulness-scorer.js
|
|
546
779
|
```
|
|
547
780
|
module.exports = { scoreUsefulness, computeUsefulnessStats }
|
|
@@ -558,22 +791,16 @@ function _getMatchLength(name, token)
|
|
|
558
791
|
function scopeToPackage(filePath, packageDir)
|
|
559
792
|
```
|
|
560
793
|
|
|
561
|
-
### src/discovery/
|
|
794
|
+
### src/discovery/language-detector.js
|
|
562
795
|
```
|
|
563
|
-
module.exports = {
|
|
564
|
-
function
|
|
565
|
-
function
|
|
566
|
-
function _enumerateCandidates(cwd, isMonorepo, ignorePatterns, excludeList)
|
|
567
|
-
function _applySpecialRules(scored, cwd, primaryFw, fwEntry, frameworks)
|
|
568
|
-
function _dedupeNested(scored)
|
|
569
|
-
function _computeConfidence(frameworks, languages, scoredCount)
|
|
796
|
+
module.exports = { detectLanguages }
|
|
797
|
+
function detectLanguages(cwd)
|
|
798
|
+
function _walkDepth(dir, depth, extCount)
|
|
570
799
|
```
|
|
571
800
|
|
|
572
801
|
### src/discovery/source-root-registry.js
|
|
573
802
|
```
|
|
574
803
|
module.exports = { REGISTRY }
|
|
575
|
-
```
|
|
576
|
-
|
|
577
804
|
### src/discovery/language-detector.js
|
|
578
805
|
```
|
|
579
806
|
module.exports = { detectLanguages }
|
|
@@ -581,6 +808,17 @@ function detectLanguages(cwd)
|
|
|
581
808
|
function _walkDepth(dir, depth, extCount)
|
|
582
809
|
```
|
|
583
810
|
|
|
811
|
+
### src/extractors/gdscript.js
|
|
812
|
+
```
|
|
813
|
+
module.exports = { extract }
|
|
814
|
+
function extract(src) → string[]
|
|
815
|
+
function extractInnerMembers(stripped, startIndex)
|
|
816
|
+
function normalizeParams(params)
|
|
817
|
+
### src/discovery/source-root-registry.js
|
|
818
|
+
```
|
|
819
|
+
module.exports = { REGISTRY }
|
|
820
|
+
```
|
|
821
|
+
|
|
584
822
|
### src/eval/analyzer.js
|
|
585
823
|
```
|
|
586
824
|
module.exports = { analyzeFiles, formatAnalysisTable, formatAnalysisJSON }
|
|
@@ -635,6 +873,26 @@ function readBalancedParens(src, openIdx, cap = 4096)
|
|
|
635
873
|
function normalizeParams(raw)
|
|
636
874
|
```
|
|
637
875
|
|
|
876
|
+
### src/discovery/source-root-resolver.js
|
|
877
|
+
```
|
|
878
|
+
module.exports = { resolveSourceRoots }
|
|
879
|
+
function resolveSourceRoots(cwd, opts = {})
|
|
880
|
+
function _detectMonorepo(cwd)
|
|
881
|
+
function _enumerateCandidates(cwd, isMonorepo, ignorePatterns, excludeList)
|
|
882
|
+
function _applySpecialRules(scored, cwd, primaryFw, fwEntry, frameworks)
|
|
883
|
+
function _dedupeNested(scored)
|
|
884
|
+
function _computeConfidence(frameworks, languages, scoredCount)
|
|
885
|
+
```
|
|
886
|
+
|
|
887
|
+
### src/map/import-graph.js
|
|
888
|
+
```
|
|
889
|
+
module.exports = { analyze, extractImports }
|
|
890
|
+
function extractImports(filePath, content, fileSet)
|
|
891
|
+
function resolveJsPath(dir, importStr, fileSet)
|
|
892
|
+
function detectCycles(graph)
|
|
893
|
+
function analyze(files, cwd)
|
|
894
|
+
```
|
|
895
|
+
|
|
638
896
|
### src/mcp/server.js
|
|
639
897
|
```
|
|
640
898
|
module.exports = { start }
|