diff --git a/AGENTS.md b/AGENTS.md index 502b9fe3c..b0e0f7696 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,7 @@ # GitNexus — Code Intelligence -This project is indexed by GitNexus as **GitnexusV2** (1588 symbols, 4161 relationships, 120 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. +This project is indexed by GitNexus as **GitNexus** (1573 symbols, 4146 relationships, 120 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. > If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. @@ -17,7 +17,7 @@ This project is indexed by GitNexus as **GitnexusV2** (1588 symbols, 4161 relati 1. `gitnexus_query({query: ""})` — find execution flows related to the issue 2. `gitnexus_context({name: ""})` — see all callers, callees, and process participation -3. `READ gitnexus://repo/GitnexusV2/process/{processName}` — trace the full execution flow step by step +3. `READ gitnexus://repo/GitNexus/process/{processName}` — trace the full execution flow step by step 4. For regressions: `gitnexus_detect_changes({scope: "compare", base_ref: "main"})` — see what your branch changed ## When Refactoring @@ -56,10 +56,10 @@ This project is indexed by GitNexus as **GitnexusV2** (1588 symbols, 4161 relati | Resource | Use for | |----------|---------| -| `gitnexus://repo/GitnexusV2/context` | Codebase overview, check index freshness | -| `gitnexus://repo/GitnexusV2/clusters` | All functional areas | -| `gitnexus://repo/GitnexusV2/processes` | All execution flows | -| `gitnexus://repo/GitnexusV2/process/{name}` | Step-by-step execution trace | +| `gitnexus://repo/GitNexus/context` | Codebase overview, check index freshness | +| `gitnexus://repo/GitNexus/clusters` | All functional areas | +| `gitnexus://repo/GitNexus/processes` | All execution flows | +| `gitnexus://repo/GitNexus/process/{name}` | Step-by-step execution trace | ## Self-Check Before Finishing diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..7320532e7 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,42 @@ +# Changelog + +All notable changes to GitNexus will be documented in this file. + +## [1.3.10] - 2026-03-07 + +### Security + +- **MCP transport buffer cap**: Added 10 MB `MAX_BUFFER_SIZE` limit to prevent out-of-memory attacks via oversized `Content-Length` headers or unbounded newline-delimited input +- **Content-Length validation**: Reject `Content-Length` values exceeding the buffer cap before allocating memory +- **Stack overflow prevention**: Replaced recursive `readNewlineMessage` with iterative loop to prevent stack overflow from consecutive empty lines +- **Ambiguous prefix hardening**: Tightened `looksLikeContentLength` to require 14+ bytes before matching, preventing false framing detection on short input +- **Closed transport guard**: `send()` now rejects with a clear error when called after `close()`, with proper write-error propagation + +### Added + +- **Dual-framing MCP transport** (`CompatibleStdioServerTransport`): Auto-detects Content-Length (Codex/OpenCode) and newline-delimited JSON (Cursor/Claude Code) framing on the first message, responds in the same format (#207) +- **Lazy CLI module loading**: All CLI subcommands now use `createLazyAction()` to defer heavy imports (tree-sitter, ONNX, KuzuDB) until invocation, significantly improving `gitnexus mcp` startup time (#207) +- **Type-safe lazy actions**: `createLazyAction` uses constrained generics to validate export names against module types at compile time +- **Regression test suite**: 13 unit tests covering transport framing, security hardening, buffer limits, and lazy action loading + +### Fixed + +- **CALLS edge sourceId alignment**: `findEnclosingFunctionId` now generates IDs with `:startLine` suffix matching node creation format, fixing process detector finding 0 entry points (#194) +- **LRU cache zero maxSize crash**: Guard `createASTCache` against `maxSize=0` when repos have no parseable files (#144) + +### Changed + +- Transport constructor accepts `NodeJS.ReadableStream` / `NodeJS.WritableStream` (widened from concrete `ReadStream`/`WriteStream`) +- `processReadBuffer` simplified to break on first error instead of stale-buffer retry loop + +## [1.3.9] - 2026-03-06 + +### Fixed + +- Aligned CALLS edge sourceId with node ID format in parse worker (#194) + +## [1.3.8] - 2026-03-05 + +### Fixed + +- Force-exit after analyze to prevent KuzuDB native cleanup hang (#192) diff --git a/CLAUDE.md b/CLAUDE.md index 502b9fe3c..b0e0f7696 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,7 +1,7 @@ # GitNexus — Code Intelligence -This project is indexed by GitNexus as **GitnexusV2** (1588 symbols, 4161 relationships, 120 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. +This project is indexed by GitNexus as **GitNexus** (1573 symbols, 4146 relationships, 120 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. > If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. @@ -17,7 +17,7 @@ This project is indexed by GitNexus as **GitnexusV2** (1588 symbols, 4161 relati 1. `gitnexus_query({query: ""})` — find execution flows related to the issue 2. `gitnexus_context({name: ""})` — see all callers, callees, and process participation -3. `READ gitnexus://repo/GitnexusV2/process/{processName}` — trace the full execution flow step by step +3. `READ gitnexus://repo/GitNexus/process/{processName}` — trace the full execution flow step by step 4. For regressions: `gitnexus_detect_changes({scope: "compare", base_ref: "main"})` — see what your branch changed ## When Refactoring @@ -56,10 +56,10 @@ This project is indexed by GitNexus as **GitnexusV2** (1588 symbols, 4161 relati | Resource | Use for | |----------|---------| -| `gitnexus://repo/GitnexusV2/context` | Codebase overview, check index freshness | -| `gitnexus://repo/GitnexusV2/clusters` | All functional areas | -| `gitnexus://repo/GitnexusV2/processes` | All execution flows | -| `gitnexus://repo/GitnexusV2/process/{name}` | Step-by-step execution trace | +| `gitnexus://repo/GitNexus/context` | Codebase overview, check index freshness | +| `gitnexus://repo/GitNexus/clusters` | All functional areas | +| `gitnexus://repo/GitNexus/processes` | All execution flows | +| `gitnexus://repo/GitNexus/process/{name}` | Step-by-step execution trace | ## Self-Check Before Finishing diff --git a/gitnexus/package.json b/gitnexus/package.json index f1ab25723..89ae891f0 100644 --- a/gitnexus/package.json +++ b/gitnexus/package.json @@ -1,6 +1,6 @@ { "name": "gitnexus", - "version": "1.3.9", + "version": "1.3.10", "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.", "author": "Abhigyan Patwari", "license": "PolyForm-Noncommercial-1.0.0",