sigmap 6.1.0 → 6.2.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 CHANGED
@@ -22,14 +22,14 @@ Use this marker block for all appendable context files:
22
22
  | To query by topic | `sigmap --query "<topic>"` |
23
23
 
24
24
  Always run `sigmap ask` or `sigmap --query` before searching for files relevant to a task.
25
- ## changes (last 5 commits — 31 minutes ago)
25
+ ## changes (last 5 commits — 21 minutes ago)
26
26
  ```
27
27
  src/learning/weights.js +exportWeights +importWeights ~resetWeights
28
+ packages/adapters/claude.js ~format
28
29
  packages/adapters/codex.js ~format
29
30
  packages/adapters/gemini.js ~format
30
31
  packages/adapters/copilot.js ~format
31
32
  packages/adapters/openai.js ~format
32
- packages/adapters/claude.js ~format
33
33
  packages/adapters/cursor.js ~format
34
34
  packages/adapters/windsurf.js ~format
35
35
  ```
@@ -91,6 +91,15 @@ function score(cwd) → { * score: number, * grad
91
91
  function adapt(context, adapterName, opts = {}) → string
92
92
  ```
93
93
 
94
+ ### packages/adapters/claude.js
95
+ ```
96
+ module.exports = { name, format, outputPath, write }
97
+ function format(context, opts = {}) → string
98
+ function _confidenceMeta(opts)
99
+ function outputPath(cwd) → string
100
+ function write(context, cwd, opts = {})
101
+ ```
102
+
94
103
  ### packages/adapters/codex.js
95
104
  ```
96
105
  module.exports = { name, format, outputPath, write }
@@ -125,15 +134,6 @@ function outputPath(cwd) → string
125
134
  function _confidenceMeta(opts)
126
135
  ```
127
136
 
128
- ### packages/adapters/claude.js
129
- ```
130
- module.exports = { name, format, outputPath, write }
131
- function format(context, opts = {}) → string
132
- function _confidenceMeta(opts)
133
- function outputPath(cwd) → string
134
- function write(context, cwd, opts = {})
135
- ```
136
-
137
137
  ### packages/adapters/cursor.js
138
138
  ```
139
139
  module.exports = { name, format, outputPath }
@@ -648,6 +648,15 @@ function extractClassMembers(block)
648
648
  function normalizeParams(params)
649
649
  ```
650
650
 
651
+ ### src/mcp/server.js
652
+ ```
653
+ module.exports = { start }
654
+ function respond(id, result)
655
+ function respondError(id, code, message)
656
+ function dispatch(msg, cwd)
657
+ function start(cwd)
658
+ ```
659
+
651
660
  ### src/learning/weights.js
652
661
  ```
653
662
  module.exports = { BASELINE, DECAY, MAX_MULT, MIN_MULT, weightsPath, clampMultiplier, normalizeFile, loadWeights, saveWeights, updateWeights, boostFiles, penalizeFiles, resetWeights, exportWeights, importWeights }
@@ -664,12 +673,3 @@ function resetWeights(cwd)
664
673
  function exportWeights(cwd, outputPath)
665
674
  function importWeights(cwd, importPath, replace)
666
675
  ```
667
-
668
- ### src/mcp/server.js
669
- ```
670
- module.exports = { start }
671
- function respond(id, result)
672
- function respondError(id, code, message)
673
- function dispatch(msg, cwd)
674
- function start(cwd)
675
- ```
package/CHANGELOG.md CHANGED
@@ -10,6 +10,14 @@ Format: [Semantic Versioning](https://semver.org/)
10
10
 
11
11
  ---
12
12
 
13
+ ## [6.2.0] — 2026-04-22
14
+
15
+ ### Added
16
+
17
+ - **`--setup` MCP auto-wire for 4 new targets** — `sigmap --setup` now registers the MCP server in `.vscode/mcp.json` (GitHub Copilot in VS Code 1.99+), `opencode.json` and `~/.config/opencode/config.json` (OpenCode), `~/.gemini/settings.json` (Gemini CLI), and `~/.codex/config.yaml` (Codex CLI — YAML format). All 5 new targets are idempotent and only written if the file already exists. Total `--setup` targets: 5 → 10.
18
+
19
+ ---
20
+
13
21
  ## [6.1.0] — 2026-04-22
14
22
 
15
23
  ### Added
package/gen-context.js CHANGED
@@ -5387,7 +5387,7 @@ __factories["./src/mcp/server"] = function(module, exports) {
5387
5387
 
5388
5388
  const SERVER_INFO = {
5389
5389
  name: 'sigmap',
5390
- version: '6.1.0',
5390
+ version: '6.2.0',
5391
5391
  description: 'SigMap MCP server — code signatures on demand',
5392
5392
  };
5393
5393
 
@@ -7159,7 +7159,7 @@ const path = require('path');
7159
7159
  const os = require('os');
7160
7160
  const { execSync } = require('child_process');
7161
7161
 
7162
- const VERSION = '6.1.0';
7162
+ const VERSION = '6.2.0';
7163
7163
  const MARKER = '\n\n## Auto-generated signatures\n<!-- Updated by gen-context.js -->\n';
7164
7164
 
7165
7165
  function requireSourceOrBundled(key) {
@@ -8862,34 +8862,67 @@ Output: .github/copilot-instructions.md (default)
8862
8862
  // ---------------------------------------------------------------------------
8863
8863
  // MCP auto-registration
8864
8864
  // ---------------------------------------------------------------------------
8865
+ function _displayPath(p, cwd) {
8866
+ return p.startsWith(os.homedir()) ? '~' + p.slice(os.homedir().length) : path.relative(cwd, p);
8867
+ }
8868
+
8869
+ function _registerMcpJson(filePath, serverEntry, cwd) {
8870
+ if (!fs.existsSync(filePath)) return;
8871
+ try {
8872
+ const raw = fs.readFileSync(filePath, 'utf8');
8873
+ const settings = JSON.parse(raw);
8874
+ if (!settings.mcpServers) settings.mcpServers = {};
8875
+ if (settings.mcpServers['sigmap']) return;
8876
+ settings.mcpServers['sigmap'] = serverEntry;
8877
+ fs.writeFileSync(filePath, JSON.stringify(settings, null, 2) + '\n');
8878
+ console.warn(`[sigmap] registered MCP server in ${_displayPath(filePath, cwd)}`);
8879
+ } catch (err) {
8880
+ console.warn(`[sigmap] could not update ${_displayPath(filePath, cwd)}: ${err.message}`);
8881
+ }
8882
+ }
8883
+
8884
+ function _registerCodexYaml(filePath, scriptPath) {
8885
+ if (!fs.existsSync(filePath)) return;
8886
+ try {
8887
+ const raw = fs.readFileSync(filePath, 'utf8');
8888
+ if (raw.includes('sigmap')) return; // already registered
8889
+ const yamlBlock = [
8890
+ '',
8891
+ 'mcpServers:',
8892
+ ' sigmap:',
8893
+ ` command: node`,
8894
+ ` args:`,
8895
+ ` - ${path.resolve(scriptPath)}`,
8896
+ ` - --mcp`,
8897
+ ].join('\n');
8898
+ fs.writeFileSync(filePath, raw.trimEnd() + yamlBlock + '\n');
8899
+ console.warn('[sigmap] registered MCP server in ~/.codex/config.yaml');
8900
+ } catch (err) {
8901
+ console.warn(`[sigmap] could not update ~/.codex/config.yaml: ${err.message}`);
8902
+ }
8903
+ }
8904
+
8865
8905
  function registerMcp(cwd, scriptPath) {
8866
8906
  const serverEntry = {
8867
8907
  command: 'node',
8868
8908
  args: [path.resolve(scriptPath), '--mcp'],
8869
8909
  };
8870
8910
 
8871
- // mcpServers shape: Claude (.claude/settings.json), Cursor (.cursor/mcp.json),
8872
- // Windsurf project (.windsurf/mcp.json) and global (~/.codeium/windsurf/mcp_config.json)
8873
- const targets = [
8911
+ // JSON mcpServers targets: Claude, Cursor, Windsurf project, Windsurf global,
8912
+ // VS Code (GitHub Copilot 1.99+), OpenCode project, OpenCode global, Gemini CLI
8913
+ const jsonTargets = [
8874
8914
  path.join(cwd, '.claude', 'settings.json'),
8875
8915
  path.join(cwd, '.cursor', 'mcp.json'),
8876
8916
  path.join(cwd, '.windsurf', 'mcp.json'),
8877
8917
  path.join(os.homedir(), '.codeium', 'windsurf', 'mcp_config.json'),
8918
+ path.join(cwd, '.vscode', 'mcp.json'),
8919
+ path.join(cwd, 'opencode.json'),
8920
+ path.join(os.homedir(), '.config', 'opencode', 'config.json'),
8921
+ path.join(os.homedir(), '.gemini', 'settings.json'),
8878
8922
  ];
8879
8923
 
8880
- for (const settingsPath of targets) {
8881
- if (!fs.existsSync(settingsPath)) continue;
8882
- try {
8883
- const raw = fs.readFileSync(settingsPath, 'utf8');
8884
- const settings = JSON.parse(raw);
8885
- if (!settings.mcpServers) settings.mcpServers = {};
8886
- if (settings.mcpServers['sigmap']) continue; // already registered
8887
- settings.mcpServers['sigmap'] = serverEntry;
8888
- fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
8889
- console.warn(`[sigmap] registered MCP server in ${settingsPath.startsWith(os.homedir()) ? '~' + settingsPath.slice(os.homedir().length) : path.relative(cwd, settingsPath)}`);
8890
- } catch (err) {
8891
- console.warn(`[sigmap] could not update ${path.relative(cwd, settingsPath)}: ${err.message}`);
8892
- }
8924
+ for (const target of jsonTargets) {
8925
+ _registerMcpJson(target, serverEntry, cwd);
8893
8926
  }
8894
8927
 
8895
8928
  // Zed uses context_servers (different shape from mcpServers)
@@ -8911,12 +8944,24 @@ function registerMcp(cwd, scriptPath) {
8911
8944
  }
8912
8945
  }
8913
8946
 
8914
- // Print manual snippets for all 4 tools
8947
+ // Codex CLI uses YAML (~/.codex/config.yaml)
8948
+ _registerCodexYaml(path.join(os.homedir(), '.codex', 'config.yaml'), scriptPath);
8949
+
8950
+ // Print manual snippets for all targets
8915
8951
  console.warn('[sigmap] MCP / context server config snippets:');
8916
- console.warn(' Claude / Cursor / Windsurf (.claude/settings.json | .cursor/mcp.json | .windsurf/mcp.json):');
8952
+ console.warn(' Claude / Cursor / Windsurf / VS Code / OpenCode / Gemini CLI:');
8917
8953
  console.warn(JSON.stringify({ mcpServers: { sigmap: serverEntry } }, null, 2));
8918
8954
  console.warn(' Zed (~/.config/zed/settings.json):');
8919
8955
  console.warn(JSON.stringify({ context_servers: { sigmap: { command: { path: 'node', args: [path.resolve(scriptPath), '--mcp'] } } } }, null, 2));
8956
+ console.warn(' Codex CLI (~/.codex/config.yaml):');
8957
+ console.warn([
8958
+ 'mcpServers:',
8959
+ ' sigmap:',
8960
+ ` command: node`,
8961
+ ` args:`,
8962
+ ` - ${path.resolve(scriptPath)}`,
8963
+ ` - --mcp`,
8964
+ ].join('\n'));
8920
8965
  }
8921
8966
 
8922
8967
  // ---------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigmap",
3
- "version": "6.1.0",
3
+ "version": "6.2.0",
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": "6.1.0",
3
+ "version": "6.2.0",
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": "6.1.0",
3
+ "version": "6.2.0",
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: '6.1.0',
21
+ version: '6.2.0',
22
22
  description: 'SigMap MCP server — code signatures on demand',
23
23
  };
24
24