@sdsrs/code-graph 0.170.0 → 0.170.1

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.
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "sdsrs"
6
6
  },
7
- "version": "0.170.0",
7
+ "version": "0.170.1",
8
8
  "keywords": [
9
9
  "code-graph",
10
10
  "ast",
@@ -155,6 +155,18 @@ function classifyHealthReport(hc) {
155
155
  classifyIntegrity(hc),
156
156
  ];
157
157
  }
158
+ // The binary refused `.code-graph` itself: a symlink, which a cloned repo can
159
+ // carry, or not a directory (D#358). Nothing was read, and the message names
160
+ // the action. Broken, so not advisory: every command refuses this project.
161
+ // Its repair arm only says what to do (the link may be the user's own), so it
162
+ // stays unresolved, and doctor exits 1, until `.code-graph` is fixed.
163
+ if (hc.reason === 'refused') {
164
+ return [
165
+ { name: 'Schema', status: 'skip', detail: 'index not read' },
166
+ { name: 'Index', status: 'error', detail: String(hc.issue || 'refused .code-graph'), fixId: 'code-graph-dir-refused' },
167
+ { name: 'Embeddings', status: 'skip', detail: 'index not read' },
168
+ ];
169
+ }
158
170
  const rows = [];
159
171
  if (hc.issue && String(hc.issue).includes('schema')) {
160
172
  // advisory: its "repair" only prints guidance (migration happens when the
@@ -1348,6 +1360,14 @@ function runRepairs(results, {
1348
1360
  break;
1349
1361
  }
1350
1362
 
1363
+ // Guidance only, never `fixed++`: removing a link the user may have made
1364
+ // is theirs to do. The row stays unresolved until they have.
1365
+ case 'code-graph-dir-refused': {
1366
+ console.log('\n .code-graph is a symlink or not a directory, so code-graph will not use it.');
1367
+ console.log(' Remove it (or move the real directory back into the project), then re-run.');
1368
+ break;
1369
+ }
1370
+
1351
1371
  default:
1352
1372
  break;
1353
1373
  }
@@ -85,6 +85,20 @@ if (!root) {
85
85
  }
86
86
  const codeGraphDir = path.join(root, '.code-graph');
87
87
 
88
+ // The binary refuses a `.code-graph` that is a symlink (a cloned repo can carry
89
+ // one) or not a directory (D#358). Ahead of every read below: through a link
90
+ // the progress file and an older binary's report describe another directory's
91
+ // index, and this binary's refusal would otherwise render as "offline".
92
+ {
93
+ const { isOwnedPath } = require('./recommendation-log');
94
+ let st = null;
95
+ try { st = fs.lstatSync(codeGraphDir); } catch { /* absent: the gates below decide */ }
96
+ if (st && !isOwnedPath(codeGraphDir, 'dir', st, 'statusline')) {
97
+ process.stdout.write('code-graph: ✗ .code-graph refused (see health-check)');
98
+ process.exit(0);
99
+ }
100
+ }
101
+
88
102
  // Check for background indexing progress file first
89
103
  const progressFile = path.join(codeGraphDir, 'indexing-status.json');
90
104
  try {
@@ -35,7 +35,7 @@ jobs:
35
35
  node-version: '20'
36
36
  - name: Build snapshot
37
37
  run: |
38
- npx -y -p @sdsrs/code-graph@0.170.0 code-graph-mcp snapshot create --out snapshot.db
38
+ npx -y -p @sdsrs/code-graph@0.170.1 code-graph-mcp snapshot create --out snapshot.db
39
39
  zstd -9 snapshot.db -o snapshot.db.zst
40
40
  mv snapshot.db.zst "code-graph-snapshot-${GITHUB_SHA:0:7}.db.zst"
41
41
  - name: Upload to release
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdsrs/code-graph",
3
- "version": "0.170.0",
3
+ "version": "0.170.1",
4
4
  "description": "MCP server that indexes codebases into an AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -35,10 +35,10 @@
35
35
  "node": ">=16"
36
36
  },
37
37
  "optionalDependencies": {
38
- "@sdsrs/code-graph-linux-x64": "0.170.0",
39
- "@sdsrs/code-graph-linux-arm64": "0.170.0",
40
- "@sdsrs/code-graph-darwin-x64": "0.170.0",
41
- "@sdsrs/code-graph-darwin-arm64": "0.170.0",
42
- "@sdsrs/code-graph-win32-x64": "0.170.0"
38
+ "@sdsrs/code-graph-linux-x64": "0.170.1",
39
+ "@sdsrs/code-graph-linux-arm64": "0.170.1",
40
+ "@sdsrs/code-graph-darwin-x64": "0.170.1",
41
+ "@sdsrs/code-graph-darwin-arm64": "0.170.1",
42
+ "@sdsrs/code-graph-win32-x64": "0.170.1"
43
43
  }
44
44
  }