Commit Graph
70 Commits
Author SHA1 Message Date
Colby McHenry 8346440592 Add WASM fallbacks for tree-sitter and SQLite, fix installer
Replace native tree-sitter with web-tree-sitter + tree-sitter-wasms for
universal cross-platform support. Add node-sqlite3-wasm as a fallback
when better-sqlite3 native bindings aren't available. Move better-sqlite3
and sqlite-vss to optionalDependencies so installs never fail.

Fix installer to use npx fallback when global npm install fails, so MCP
config, hooks, and quick-start instructions all work without the bare
codegraph command in PATH.

Fix tests: update schema version expectation, fix db test paths and
method names, extract MAX_OUTPUT_LENGTH as module constant, normalize
Windows path separators in import resolver.
2026-02-14 00:56:15 -06:00
Colby McHenry 429359c25f version bump 2026-02-11 16:12:45 -06:00
Colby McHenry ce504c642a Fix performance issues. 2026-02-11 16:11:50 -06:00
Olaf MonienandClaude Opus 4.6 2442c58932 fix: Move tree-sitter-pascal to optionalDependencies with pinned commit
Align with project convention: all tree-sitter grammars are optional.
Pin to commit 042119e for reproducible builds (npm v0.0.1 is outdated
and incompatible with Node.js v24 due to NAN bindings).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 10:00:14 +01:00
Olaf MonienandClaude Opus 4.6 425bfceea5 feat: Add Pascal/Delphi language support with DFM/FMX extraction
Implements tree-sitter-based extraction for Pascal/Delphi source files
(.pas, .dpr, .dpk, .lpr) and a custom regex-based DfmExtractor for
form files (.dfm, .fmx). Covers classes, records, interfaces, methods,
properties, fields, enums, constants, type aliases, uses-imports,
visibility sections, inheritance, call extraction, and DFM component
hierarchies with event handler references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 08:58:13 +01:00
Colby McHenry 09a8d24bd8 version bump 2026-02-10 18:18:51 -06:00
Colby McHenry 4c7827675a Auto stash before merge of "main" and "origin/main" 2026-02-10 18:16:06 -06:00
Martin Oehlert 399d78b938 security: path validation, ReDoS prevention, picomatch, PID-based file lock
- Add validateProjectPath() to reject sensitive system directories
- Add isPathWithinRoot/isPathWithinRootReal for symlink-aware path checks
- Replace hand-rolled glob-to-regex with picomatch to prevent ReDoS
- Add isSafeRegex() to reject custom patterns with nested quantifiers
- Replace FileLock with PID-tracking version that detects stale locks
- Add symlink detection in removeDirectory/listDirectoryContents
- Add subdirectory name validation in ensureSubdirectory
- Add atomicWriteFileSync and corrupted file backup in config-writer
- Add MCP input validation (validateString) for all tool handlers
- Fix CLAUDE.md section replacement to handle ### subsections correctly
2026-02-10 11:22:04 +01:00
Colby McHenry 4825661e02 upgrade 2026-02-10 03:49:06 -06:00
Colby McHenryandClaude Opus 4.6 75e9bfca04 Downgrade tree-sitter to 0.21.1 to eliminate all peer dependency warnings
All grammar packages now have compatible peer deps with tree-sitter 0.21.x,
resulting in zero warnings during npm install. Downgraded grammars:
c 0.24.1→0.23.2, php 0.24.2→0.23.11, python 0.23.6→0.23.4,
rust 0.24.0→0.23.1, swift 0.7.1→0.6.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:07:39 -06:00
Colby McHenryandClaude Opus 4.6 a4c1d32160 Upgrade tree-sitter-c, php, and rust to versions compatible with tree-sitter 0.22.4
Reduces peer dependency warnings during install by upgrading grammars that
have newer versions accepting ^0.22.x: c 0.23.4→0.24.1, php 0.23.11→0.24.2,
rust 0.23.2→0.24.0. Python 0.23.6 and swift 0.7.1 already compatible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:01:59 -06:00
Colby McHenryandClaude Opus 4.6 9a122b041b Move tree-sitter grammars to optionalDependencies for Windows compatibility
tree-sitter-kotlin doesn't ship prebuilt binaries for win32-x64, causing
npm install to fail on Windows without Visual Studio. All grammars are now
optional since the runtime already handles missing parsers gracefully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 02:51:32 -06:00
Colby McHenry 2ad03d2f7d updates 2026-02-10 02:26:47 -06:00
Colby McHenry d3ba9868df WIP on security-hardening 2026-02-10 00:29:22 -06:00
Colby McHenry d0ee6f7fc4 Enhances code extraction and project indexing
Adds support for Dart and Liquid languages with tree-sitter parsing.
Improves accuracy of code symbol extraction for existing languages.
Indexes project files to enhance code navigation features.
Migrates build system to facilitate code contributions.
Removes git hook functionality.
Integrates Sentry for error tracking and reporting.
Enhances project initialization and configuration loading.
2026-02-09 22:18:59 -06:00
Colby McHenryandClaude Opus 4.5 a4ddedb197 Add Liquid template language support for Shopify themes
- Add 'liquid' to Language type and default include patterns
- Create LiquidExtractor with regex-based extraction (tree-sitter-liquid has ABI issues)
- Extract render/include/section references as component nodes
- Extract schema blocks as constant nodes with parsed names
- Extract assign statements as variable nodes
- Create file relationship edges for snippet/section references

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:59:40 -06:00
Colby McHenryandClaude Opus 4.5 9baf59e5f0 Add interactive CLI installer for Claude Code integration
- New `codegraph install` command and auto-run when invoked with no args
- Beautiful ASCII banner using figlet
- Interactive prompts for global (~/.claude) or local (./.claude) installation
- Writes MCP server config to claude.json
- Writes auto-allow permissions to settings.json
- For local installs: auto-initializes project, indexes, and installs git hooks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 14:31:29 -06:00
Colby McHenryandClaude Opus 4.5 0c168c4d8b Add codegraph_explore tool and expand exclude patterns
- Add codegraph_explore MCP tool for deep exploration with condensed output
- Expand default exclude patterns for framework build outputs (.next, .nuxt, .expo, etc.)
- Increase node ID hash length from 16 to 32 chars to prevent collisions
- Add feature request detection with UX clarification reminders
- Update README with MCP tools reference and best practices
- Update CLAUDE.md with context usage guidelines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 02:42:34 -06:00
Colby McHenry 8f34ce7b13 0.1.2 2026-01-18 18:56:10 -06:00
Colby McHenry cc6e7a5c89 Init 2026-01-18 16:25:00 -06:00