The heritage query only matched bare user_type delegation specifiers
(interface implementation), missing constructor_invocation patterns
used for class extension. Adds a second heritage pattern for
constructor invocations, capturing ~3x more heritage edges.
tree-sitter-kotlin (fwcd) has no interface_declaration node — both
interfaces and classes are class_declaration nodes. Use anonymous
keyword literal matching ("interface" vs "class") to produce the
correct @definition.interface / @definition.class captures.
Verified against two real Kotlin repos: a small one (3 Interface,
92 Class) and a large one (35 Interface, 677 Class, 5998 Function).
Keep main's barLog implementation, preserve both currentDbPath and
ftsLoaded reset in closeKuzu, take PR's new resolveRepo pattern
for /api/query. Path traversal guard confirmed intact.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skill descriptions were too tool-centric ("using knowledge graph", "blast
radius") which prevented Claude Code from matching them to user intent.
Rewritten to user-intent-driven format with "Use when..." phrasing and
example trigger phrases so Claude can semantically match user requests.
Updated across all 3 sources: gitnexus/skills/, gitnexus-claude-plugin/skills/,
.claude/skills/, and the ai-context.ts fallback generator.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address code review feedback on the server-mode PR:
Critical fixes:
- Restore CORS whitelist (localhost + gitnexus.vercel.app only)
- Bind to 127.0.0.1 by default; add --host CLI flag for opt-in remote access
- Restore path traversal guard on /api/file (resolve + startsWith check)
- Restore try/catch on all route handlers + global error middleware
- Restore SIGINT/SIGTERM graceful shutdown handlers
Bug fixes:
- Add mutex to core initKuzu to prevent race conditions on concurrent
DB switches (two requests for different repos no longer corrupt state)
- Track ftsLoaded flag and reset on DB switch / close so FTS extension
is reloaded for each new database connection
- Restore input validation on /api/query (cypher required) and
/api/search (query required)
Improvements:
- Add TTL-based cleanup for orphaned MCP sessions (30min idle eviction)
to prevent memory leaks from network drops that skip onclose
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge main into feat/php-laravel-support, resolving conflicts in:
- csv-generator.ts: add description column to streaming CSV architecture
- kuzu-adapter.ts: add description to COPY queries and insert/merge ops
- schema.ts: add description STRING to all code element tables, FROM Method TO Property
- parse-worker.ts: integrate PHP built-ins and Eloquent extraction with sub-batch worker
- import-processor.ts: integrate PHP PSR-4 resolution with ImportResolutionContext
- package-lock.json: regenerate from main's 1.3.3 base with tree-sitter-php
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2MB limit caused FTS crash on large codebases. 512KB is safe and only
skips generated/vendored files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Raise MAX_FILE_SIZE from 512KB to 2MB to capture more real source files
- Replace verbose per-warning output with single summary line
- Soften skip message wording ("likely generated/vendored")
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skill folder names determine invocation paths in Claude Code plugins
(e.g. plugin:gitnexus:gitnexus-cli). Generic names like "cli" or
"debugging" could collide with other plugins, so prefix them all with
gitnexus- for clarity.
Updated across plugin dirs, main package source files, ai-context.ts
generator, setup.ts installer, and all CLAUDE.md/AGENTS.md routing tables.
Skill names should match folder names since the plugin namespace
(gitnexus:) already provides context. Avoids redundant display like
gitnexus:gitnexus-cli → now gitnexus:cli.
- Impact tool now returns risk score, affected processes/modules, and summary
- Cypher tool formats results as markdown tables for LLM readability
- Context tool includes module (functional area) field
- Semantic search skips model init when embeddings are disabled
- Setup: wrap npx in cmd /c on Windows for .cmd script compatibility
- Embedder: silence stderr during ONNX model load to protect MCP stdio
- API: use executeCypher directly to avoid double formatting
- Add community integrations section to READMEs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bundle MCP server config (.mcp.json), fix hook to use spawnSync with npx
fallback and read stderr (KuzuDB stdout workaround), wire plugin.json with
hooks/mcpServers paths, add guide skill with tools/resources/schema reference,
add AMP-compatible mcp.json to all skill dirs, and slim CLAUDE.md generator
by moving reference content into the guide skill.
Replace the old local-only backend mode with a new server connection
flow that lets the web UI connect to any running GitNexus server,
download the pre-built knowledge graph, and explore it without WASM.
- Add server-connection service with streaming download and progress
- Replace DropZone backend tab with server connect UI (URL input, progress bar, cancel)
- Add repo switcher dropdown in Header when multiple repos are indexed
- Mount MCP server over StreamableHTTP at /api/mcp for remote AI tool access
- Refactor api.ts to query KuzuDB directly instead of routing through LocalBackend
- Fix KuzuDB adapter to support switching between databases (close old before opening new)
- Extract createMCPServer() from startMCPServer() for transport-agnostic reuse
- Support ?server= query param for bookmarkable auto-connect
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Laravel projects commonly use traits (HasFactory, SoftDeletes, etc.) on classes
and methods that reference model properties. These relation pairs were missing
from the CodeRelation table, causing edges to be dropped during indexing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add description STRING column to all code element schemas (Function, Class,
Interface, Method, CodeElement, and all CODE_ELEMENT_BASE types including Property)
- Add generateMultiLangNodeCSV() to write Struct, Enum, Trait, Property, etc.
nodes to KuzuDB (previously they existed in-memory only, never reached the DB)
- Update generateAllCSVs() to generate CSVs for all 19 multi-language types
- Fix getCopyQuery() to use correct column list per table type:
- Multi-language tables: id,name,filePath,startLine,endLine,content,description
- Core tables: id,name,filePath,startLine,endLine,isExported,content,description
- Update batchInsertNodesToKuzu and insertNodeToKuzu to include description field
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace static_call_expression -> scoped_call_expression (php_only name)
- Replace class_implements -> class_interface_clause
- Use [(name) (qualified_name)] alternatives in heritage patterns to match
both simple names (Controller) and fully-qualified names (App\Models\User)
All patterns verified against tree-sitter-php node-types.json and live parse.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add tree-sitter-php ^0.23.0 to gitnexus/package.json. Package exports
{ php, php_only } grammars; we use php_only for pure PHP files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Uncomment PHP = 'php' in both CLI and web SupportedLanguages enums.
Add .php, .phtml, .php3/.4/.5/.8 extension detection to getLanguageFromFilename()
in both packages.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Addresses review feedback:
- Remove nvidia-smi early return (driver ≠ runtime libs)
- Use ldconfig -p as primary check (covers all architectures and paths)
- Fall back to CUDA_PATH / LD_LIBRARY_PATH for conda, /opt/cuda, etc.
- Switch from execSync to execFileSync (avoids spawning a shell)
Co-Authored-By: Claude <noreply@anthropic.com>
SingleBar from cli-progress doesn't have a .log() method (that's
MultiBar-only), causing a crash when any code calls console.log
during the pipeline.
Fixes#53
Thanks to @TranDatk for reporting in #56.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ONNX Runtime crashes with an uncatchable native error when CUDA
libraries are missing. This adds a lightweight probe (nvidia-smi +
libcublasLt.so.12 path check) before selecting the CUDA device,
falling back to CPU gracefully on systems without NVIDIA GPUs.
Fixes#53
Co-Authored-By: Claude <noreply@anthropic.com>
Add public executeCypher(repoName, query) method to LocalBackend,
bypassing the callTool string dispatch and resolving the repo handle
directly. Update buildGraph in api.ts to call it instead of going
through callTool('cypher', ...) on every query.
- Add https://gitnexus.vercel.app to CORS allowed origins so the
deployed site can connect to the local backend server.
- Replace naive createHttpTextSearch (substring matching via Cypher)
with createHttpHybridSearch that calls /api/search for full
BM25 + semantic + RRF hybrid search on the server.
- Set isEmbeddingReady to false in backend mode (no local embedder),
which also fixes {{QUERY_VECTOR}} handling — the existing error
path in tools.ts now correctly returns a helpful message.
- Set isBM25Ready to true (available via server's hybrid search).
- Removes the Cypher injection bug (wrong escape char) since the
function that contained it was replaced entirely.
Add HTTP wrapper functions (executeQuery, textSearch) to the ingestion
worker and a new initializeBackendAgent method that creates the agent
with HTTP-backed tool closures instead of local KuzuDB. useAppState
detects backend mode and routes agent initialization accordingly.
- Fix field name mismatch in /api/repo (repoPath -> path)
- Add setProgress(null) on successful backend repo load
- Prevent DropZone tab auto-switch from re-triggering
- Make isDatabaseReady() return true in backend mode
- Increase fetchGraph timeout to 60s for large repos
- Replace dynamic import with static import for runCypherQuery
Replace direct single-repo KuzuDB access with LocalBackend, the same
backend the MCP server uses. The serve command now works with ALL
indexed repos via the global registry instead of only the CWD repo.
New/updated endpoints:
- GET /api/repos (list all indexed repos)
- GET /api/repo?name=X (repo metadata)
- GET /api/graph?repo=X (full knowledge graph)
- POST /api/query (raw Cypher via backend)
- POST /api/search (process-grouped search via backend)
- GET /api/file?repo=X&path=Y (file read with path traversal protection)
- GET /api/processes?repo=X, /api/process?repo=X&name=Y
- GET /api/clusters?repo=X, /api/cluster?repo=X&name=Y
Embeddings (ONNX Runtime) caused segfaults on macOS (#38) and CUDA
install failures on Linux (#40). Since embeddings only power semantic
vector search in query() and BM25 + graph traversal already provide
strong retrieval, disable embeddings by default with minimal quality
impact.
Changes:
- Replace --skip-embeddings with --embeddings opt-in flag
- Remove disposeEmbedder() call (ONNX native cleanup segfaults)
- Add process.exit(0) when embeddings are used to bypass ONNX atexit hooks
- Suppress ONNX session warnings via logSeverityLevel
- Fix progress bar duplication by routing console output through bar.log()
- Add elapsed time indicator for long-running phases
Fixes#38Fixes#40
listRepos() now re-reads ~/.gitnexus/registry.json on every call.
resolveRepo() retries with a registry refresh on cache miss.
Extracted refreshRepos() from init() for reuse. All callers updated
with await for the new async signatures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>