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>
Previous usage was vulnerable to "poisoned" tags
which could enduce commands to be run when a
`detectChanges` command was hit. This was primarily
fixed in `local-backend.ts` however I changes the
`execSync` usages where any injection was potentially
able to be performed (e.g. staleness).
Skipped touching wiki and generator as those use static
input, though these should potentially be changed over
in the future.
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>
Worktree directories were committed as gitlink submodule references,
causing CI failures during checkout. Remove them from tracking and
add .claude/worktrees/ to .gitignore to prevent recurrence.
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.
The WASM worker DB is never initialized in backend mode, so
startEmbeddings() now returns early. Also hides the embedding
status button in the header when using the local backend.
- 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
Replace Windows-specific 'cmd /c npx' invocation with portable 'npx'
command that works on macOS, Linux, and Windows.
Fixes#47
Co-authored-by: Abhigyan Patwari <abhigyanpatwari@users.noreply.github.com>
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>