sigmap 4.0.1 → 4.0.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/AGENTS.md CHANGED
@@ -12,29 +12,25 @@ Use this marker block for all appendable context files:
12
12
  ## Auto-generated signatures
13
13
  <!-- Updated by gen-context.js -->
14
14
  You are a coding assistant with full knowledge of this codebase.
15
- Below are the code signatures extracted by SigMap v4.0.0 on 2026-04-15T06:03:22.464Z.
15
+ Below are the code signatures extracted by SigMap v4.0.2 on 2026-04-15T07:28:24.633Z.
16
16
 
17
17
  Use these signatures to answer questions about the code accurately.
18
18
 
19
19
  ## Code Signatures
20
20
 
21
- <!-- Generated by SigMap gen-context.js v4.0.0 -->
21
+ <!-- Generated by SigMap gen-context.js v4.0.2 -->
22
22
  <!-- DO NOT EDIT below the marker line — run gen-context.js to regenerate -->
23
23
 
24
24
  # Code signatures
25
25
 
26
- ## changes (last 5 commits — 7 minutes ago)
26
+ ## changes (last 5 commits — 77 minutes ago)
27
27
  ```
28
28
  src/analysis/coverage-score.js +coverageScore +_walk
29
29
  src/eval/analyzer.js ~analyzeFiles
30
- src/extractors/generic.js +extract
31
- src/format/llm-txt.js +outputPath +format
32
- src/format/llms-txt.js +outputPath +getShortCommit +detectVersion +format
33
30
  packages/adapters/claude.js +_confidenceMeta ~format
34
31
  packages/adapters/copilot.js +_confidenceMeta ~format
35
32
  packages/adapters/cursor.js +_confidenceMeta ~format
36
33
  packages/adapters/gemini.js +_confidenceMeta ~format ~write
37
- packages/adapters/llm-full.js +outputPath +format +write
38
34
  packages/adapters/openai.js +_confidenceMeta ~format ~outputPath
39
35
  packages/adapters/windsurf.js +_confidenceMeta ~format
40
36
  ```
@@ -76,14 +72,6 @@ function write(context, cwd, opts = {})
76
72
  function _confidenceMeta(opts)
77
73
  ```
78
74
 
79
- ### packages/adapters/llm-full.js
80
- ```
81
- module.exports = { name: 'llm-full', format, outputPath, write }
82
- function outputPath(cwd)
83
- function format(context, opts)
84
- function write(context, cwd, opts)
85
- ```
86
-
87
75
  ### packages/adapters/openai.js
88
76
  ```
89
77
  module.exports = { name, format, outputPath }
@@ -117,6 +105,14 @@ function adapt(context, adapterName, opts = {}) → string
117
105
  function outputsToAdapters(outputs) → string[]
118
106
  ```
119
107
 
108
+ ### packages/adapters/llm-full.js
109
+ ```
110
+ module.exports = { name: 'llm-full', format, outputPath, write }
111
+ function outputPath(cwd)
112
+ function format(context, opts)
113
+ function write(context, cwd, opts)
114
+ ```
115
+
120
116
  ### packages/cli/index.js
121
117
  ```
122
118
  module.exports = { CLI_ENTRY, run }
@@ -177,28 +173,6 @@ function formatAnalysisTable(stats, showSlow) → string
177
173
  function formatAnalysisJSON(stats) → object
178
174
  ```
179
175
 
180
- ### src/extractors/generic.js
181
- ```
182
- module.exports = { extract }
183
- function extract(src)
184
- ```
185
-
186
- ### src/format/llm-txt.js
187
- ```
188
- module.exports = { format, outputPath }
189
- function outputPath(cwd)
190
- function format(context, cwd, version)
191
- ```
192
-
193
- ### src/format/llms-txt.js
194
- ```
195
- module.exports = { format, outputPath }
196
- function outputPath(cwd)
197
- function getShortCommit(cwd)
198
- function detectVersion(cwd)
199
- function format(context, cwd, writtenFiles, sigmapVersion)
200
- ```
201
-
202
176
  ### src/mcp/server.js
203
177
  ```
204
178
  module.exports = { start }
@@ -304,6 +278,12 @@ module.exports = { extract }
304
278
  function extract(src) → string[]
305
279
  ```
306
280
 
281
+ ### src/extractors/generic.js
282
+ ```
283
+ module.exports = { extract }
284
+ function extract(src)
285
+ ```
286
+
307
287
  ### src/extractors/go.js
308
288
  ```
309
289
  module.exports = { extract }
@@ -563,6 +543,22 @@ function generateDashboardHtml(cwd, health)
563
543
  function renderHistoryCharts(cwd, health)
564
544
  ```
565
545
 
546
+ ### src/format/llm-txt.js
547
+ ```
548
+ module.exports = { format, outputPath }
549
+ function outputPath(cwd)
550
+ function format(context, cwd, version)
551
+ ```
552
+
553
+ ### src/format/llms-txt.js
554
+ ```
555
+ module.exports = { format, outputPath }
556
+ function outputPath(cwd)
557
+ function getShortCommit(cwd)
558
+ function detectVersion(cwd)
559
+ function format(context, cwd, writtenFiles, sigmapVersion)
560
+ ```
561
+
566
562
  ### src/graph/builder.js
567
563
  ```
568
564
  module.exports = { build, buildFromCwd, extractFileDeps }
package/CHANGELOG.md CHANGED
@@ -10,6 +10,13 @@ Format: [Semantic Versioning](https://semver.org/)
10
10
 
11
11
  ---
12
12
 
13
+ ## [4.0.2] — 2026-04-15 — Bundle factory fix (re-release of 4.0.1)
14
+
15
+ ### Fixed
16
+ - v4.0.1 was published to npm/GitHub Packages before the binary CI step ran, which meant the published package contained the incomplete bundle (missing `./src/analysis/coverage-score` factory). v4.0.2 is a clean re-release with all fixes from 4.0.1 and the correct bundle.
17
+
18
+ ---
19
+
13
20
  ## [4.0.1] — 2026-04-15 — Config auto-detection fix
14
21
 
15
22
  ### Fixed
package/gen-context.js CHANGED
@@ -3281,6 +3281,72 @@ __factories["./src/format/cache"] = function(module, exports) {
3281
3281
  };
3282
3282
 
3283
3283
  // ── ./src/health/scorer ──
3284
+ // ── ./src/analysis/coverage-score ──
3285
+ __factories["./src/analysis/coverage-score"] = function(module, exports) {
3286
+
3287
+ 'use strict';
3288
+
3289
+ function coverageScore(cwd, fileEntries, config) {
3290
+ const fs = require('fs');
3291
+ const path = require('path');
3292
+
3293
+ const srcDirs = (config && Array.isArray(config.srcDirs) && config.srcDirs.length > 0)
3294
+ ? config.srcDirs
3295
+ : ['src', 'app', 'lib'];
3296
+
3297
+ const excludeSet = new Set([
3298
+ 'node_modules', '.git', 'dist', 'build', 'out', '__pycache__',
3299
+ '.next', 'coverage', 'target', 'vendor', '.context',
3300
+ ]);
3301
+ if (config && Array.isArray(config.exclude)) {
3302
+ for (const x of config.exclude) excludeSet.add(String(x));
3303
+ }
3304
+
3305
+ const includedSet = new Set((fileEntries || []).map(f => f.filePath));
3306
+
3307
+ const allSource = [];
3308
+ for (const relDir of srcDirs) {
3309
+ const absDir = path.resolve(cwd, relDir);
3310
+ if (fs.existsSync(absDir)) _walkCov(absDir, excludeSet, allSource);
3311
+ }
3312
+
3313
+ const total = allSource.length;
3314
+ const included = allSource.filter(f => includedSet.has(f)).length;
3315
+ const dropped = total - included;
3316
+ const pct = total > 0 ? Math.round((included / total) * 100) : 100;
3317
+
3318
+ const grade = pct >= 90 ? 'A' : pct >= 75 ? 'B' : pct >= 50 ? 'C' : 'D';
3319
+ const confidence = pct >= 90 ? 'HIGH' : pct >= 70 ? 'MEDIUM' : 'LOW';
3320
+
3321
+ const perModule = new Map();
3322
+ for (const relDir of srcDirs) {
3323
+ const absDir = path.resolve(cwd, relDir);
3324
+ const modFiles = allSource.filter(f => f.startsWith(absDir + path.sep) || f === absDir);
3325
+ const modIncl = modFiles.filter(f => includedSet.has(f)).length;
3326
+ const modPct = modFiles.length > 0 ? Math.round((modIncl / modFiles.length) * 100) : 100;
3327
+ perModule.set(relDir, { total: modFiles.length, included: modIncl, pct: modPct });
3328
+ }
3329
+
3330
+ return { score: pct, grade, total, included, dropped, confidence, perModule };
3331
+ }
3332
+
3333
+ function _walkCov(dir, excludeSet, out) {
3334
+ const fs = require('fs');
3335
+ const path = require('path');
3336
+ let entries;
3337
+ try { entries = fs.readdirSync(dir, { withFileTypes: true }); } catch (_) { return; }
3338
+ for (const e of entries) {
3339
+ if (excludeSet.has(e.name)) continue;
3340
+ const full = path.join(dir, e.name);
3341
+ if (e.isDirectory()) { _walkCov(full, excludeSet, out); }
3342
+ else if (e.isFile()) { out.push(full); }
3343
+ }
3344
+ }
3345
+
3346
+ module.exports = { coverageScore };
3347
+
3348
+ };
3349
+
3284
3350
  __factories["./src/health/scorer"] = function(module, exports) {
3285
3351
 
3286
3352
  /**
@@ -4575,7 +4641,7 @@ __factories["./src/mcp/server"] = function(module, exports) {
4575
4641
 
4576
4642
  const SERVER_INFO = {
4577
4643
  name: 'sigmap',
4578
- version: '4.0.1',
4644
+ version: '4.0.2',
4579
4645
  description: 'SigMap MCP server — code signatures on demand',
4580
4646
  };
4581
4647
 
@@ -6137,7 +6203,7 @@ const path = require('path');
6137
6203
  const os = require('os');
6138
6204
  const { execSync } = require('child_process');
6139
6205
 
6140
- const VERSION = '4.0.1';
6206
+ const VERSION = '4.0.2';
6141
6207
  const MARKER = '\n\n## Auto-generated signatures\n<!-- Updated by gen-context.js -->\n';
6142
6208
 
6143
6209
  function requireSourceOrBundled(key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigmap",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "Zero-dependency AI context engine — 97% token reduction. No npm install. Runs on Node 18+.",
5
5
  "main": "gen-context.js",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigmap-cli",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "SigMap CLI wrapper — thin adapter for programmatic CLI invocation",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigmap-core",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "SigMap core library — zero-dependency code signature extraction, retrieval, and security scanning",
5
5
  "main": "index.js",
6
6
  "keywords": [
package/src/mcp/server.js CHANGED
@@ -18,7 +18,7 @@ const { readContext, searchSignatures, getMap, createCheckpoint, getRouting, exp
18
18
 
19
19
  const SERVER_INFO = {
20
20
  name: 'sigmap',
21
- version: '4.0.1',
21
+ version: '4.0.2',
22
22
  description: 'SigMap MCP server — code signatures on demand',
23
23
  };
24
24