Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@sdsrs/code-graph

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sdsrs/code-graph - npm Package Compare versions

Comparing version
0.29.0
to
0.30.0
+1
-1
claude-plugin/.claude-plugin/plugin.json

@@ -7,3 +7,3 @@ {

},
"version": "0.29.0",
"version": "0.30.0",
"keywords": [

@@ -10,0 +10,0 @@ "code-graph",

@@ -94,37 +94,57 @@ #!/usr/bin/env node

// Schema
if (hc.issue && hc.issue.includes('schema')) {
results.push({ name: 'Schema', status: 'warn', detail: hc.issue, fixId: 'schema-mismatch' });
// No-index short-circuit — binary deliberately returns a structured
// JSON with reason='no_index' instead of bailing, so we can route to
// the index-empty fix without grepping stderr. Falls through to the
// rest of runDiagnostics so Auto-update / Hooks still report.
if (hc.reason === 'no_index') {
results.push({ name: 'Schema', status: 'ok', detail: 'binary ok (no index yet)' });
results.push({ name: 'Index', status: 'warn', detail: 'missing — not indexed yet', fixId: 'index-empty' });
results.push({ name: 'Embeddings', status: 'skip', detail: 'no index' });
} else {
results.push({ name: 'Schema', status: 'ok', detail: `v${hc.schema_version}` });
}
// Schema
if (hc.issue && hc.issue.includes('schema')) {
results.push({ name: 'Schema', status: 'warn', detail: hc.issue, fixId: 'schema-mismatch' });
} else {
results.push({ name: 'Schema', status: 'ok', detail: `v${hc.schema_version}` });
}
// Index
if (hc.nodes === 0) {
results.push({ name: 'Index', status: 'warn', detail: 'empty', fixId: 'index-empty' });
} else {
const age = hc.index_age ? ` (${hc.index_age})` : '';
results.push({
name: 'Index',
status: 'ok',
detail: `${hc.nodes} nodes, ${hc.edges} edges, ${hc.files} files${age}`,
});
// Index
if (hc.nodes === 0) {
results.push({ name: 'Index', status: 'warn', detail: 'empty', fixId: 'index-empty' });
} else {
const age = hc.index_age ? ` (${hc.index_age})` : '';
results.push({
name: 'Index',
status: 'ok',
detail: `${hc.nodes} nodes, ${hc.edges} edges, ${hc.files} files${age}`,
});
}
// Embeddings
const ep = hc.embedding_progress || '0/0';
const [done, total] = ep.split('/').map(Number);
if (total > 0 && done < total) {
const pct = Math.round((done / total) * 100);
results.push({ name: 'Embeddings', status: 'ok', detail: `${pct}% (${done}/${total})` });
} else if (total === 0) {
results.push({ name: 'Embeddings', status: 'ok', detail: 'no embeddable nodes' });
} else {
results.push({ name: 'Embeddings', status: 'ok', detail: `100% (${done}/${total})` });
}
}
// Embeddings
const ep = hc.embedding_progress || '0/0';
const [done, total] = ep.split('/').map(Number);
if (total > 0 && done < total) {
const pct = Math.round((done / total) * 100);
results.push({ name: 'Embeddings', status: 'ok', detail: `${pct}% (${done}/${total})` });
} else if (total === 0) {
results.push({ name: 'Embeddings', status: 'ok', detail: 'no embeddable nodes' });
} catch (e) {
const rawStderr = e.stderr ? e.stderr.toString() : '';
const msg = rawStderr ? rawStderr.trim().slice(0, 100) : e.message.slice(0, 100);
// "No index found" is a missing-index situation, not a broken binary —
// the index-empty fix path knows how to create one. Without this branch
// the fixId routes to nothing and the report shows "0/1 addressed".
if (rawStderr.includes('No index found')) {
results.push({ name: 'Schema', status: 'ok', detail: 'binary ok (no index yet)' });
results.push({ name: 'Index', status: 'warn', detail: 'missing — not indexed yet', fixId: 'index-empty' });
results.push({ name: 'Embeddings', status: 'skip', detail: 'no index' });
} else {
results.push({ name: 'Embeddings', status: 'ok', detail: `100% (${done}/${total})` });
results.push({ name: 'Schema', status: 'error', detail: `health-check failed: ${msg}`, fixId: 'binary-broken' });
results.push({ name: 'Index', status: 'skip', detail: 'health-check failed' });
results.push({ name: 'Embeddings', status: 'skip', detail: 'health-check failed' });
}
} catch (e) {
const msg = e.stderr ? e.stderr.toString().trim().slice(0, 100) : e.message.slice(0, 100);
results.push({ name: 'Schema', status: 'error', detail: `health-check failed: ${msg}`, fixId: 'binary-broken' });
results.push({ name: 'Index', status: 'skip', detail: 'health-check failed' });
results.push({ name: 'Embeddings', status: 'skip', detail: 'health-check failed' });
}

@@ -131,0 +151,0 @@ } else {

{
"name": "@sdsrs/code-graph",
"version": "0.29.0",
"version": "0.30.0",
"description": "MCP server that indexes codebases into an AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing",

@@ -38,8 +38,8 @@ "license": "MIT",

"optionalDependencies": {
"@sdsrs/code-graph-linux-x64": "0.29.0",
"@sdsrs/code-graph-linux-arm64": "0.29.0",
"@sdsrs/code-graph-darwin-x64": "0.29.0",
"@sdsrs/code-graph-darwin-arm64": "0.29.0",
"@sdsrs/code-graph-win32-x64": "0.29.0"
"@sdsrs/code-graph-linux-x64": "0.30.0",
"@sdsrs/code-graph-linux-arm64": "0.30.0",
"@sdsrs/code-graph-darwin-x64": "0.30.0",
"@sdsrs/code-graph-darwin-arm64": "0.30.0",
"@sdsrs/code-graph-win32-x64": "0.30.0"
}
}