12 Commits
Author SHA1 Message Date
Martin Vogel 600ec428d6 Fix lint (http.NoBody) and restructure release workflow
- Use http.NoBody instead of nil in checkForUpdate (gocritic httpNoBody)
- Restructure workflow: lint+test gate -> parallel builds -> release
  Prevents wasted build compute when lint or tests fail.
2026-02-28 02:07:49 +01:00
Martin Vogel fb30ca61d6 v0.2.0: Multi-DB router, enrichment pipeline, update-available notification, enhanced language support
Major changes:
- Store router: per-project SQLite databases with automatic migration
- Pipeline enrichment: community detection, inheritance, decorators, read/write tracking, test detection, type usage, exception flows, configuration relationships
- Update checker: lightweight GitHub release check on startup, injects update_available into first tool response
- Language support: enhanced extraction for C++, C#, Go, Java, JavaScript, Lua, PHP, Python, Rust, Scala, TSX, TypeScript
- Cypher executor: improved query execution with better aggregation and pattern matching
- HTTP link detection: cross-service HTTP call inference
- CLI mode: extended with --raw flag, human-friendly summaries for all tools
- Search: sort_by support, exclude_labels, glob matching improvements
- AST debug tool for parser development
2026-02-28 01:58:47 +01:00
Martin Vogel 4ee7720b48 v0.1.5: Performance optimizations, mattn driver, batch passStructure, CTE BFS, SQL COUNT, fix delete_project file_hashes 2026-02-26 23:50:02 +01:00
Martin Vogel f932e87b6e v0.1.4: CLI mode, query performance optimizations, Go 1.26
Add CLI mode for direct tool invocation from the shell — every MCP tool
can now be called without an MCP client. Useful for testing, scripting,
and CI pipelines.

Query engine rewrite: SQL LIKE pre-filtering extracts literal substrings
from regex patterns before scanning, batch degree counting replaces
per-node queries, and schema queries use id→label maps instead of 3-way
JOINs. Cypher relationship queries up to 600x faster on large graphs.

Incremental reindex 4x faster via content-hash skip optimization.

Upgrade to Go 1.26 (Green Tea GC) and SQLite v1.46.1.
2026-02-26 19:27:27 +01:00
Martin Vogel 147059a634 v0.1.3: Bug fixes, query improvements, cross-service linking, and graph enrichment
Part A — Bug fixes:
- Fix globToLike: **/dir/** now matches relative paths without leading /
- Route nodes inherit file_path from handler (were invisible to file_pattern)
- Compose YAML non-string env values (int/bool/float) no longer dropped
- Compose secret filter: key names like JWT_PRIVATE_KEY_ID no longer filtered
- Cloudbuild bash script deploy flags now parsed (entrypoint: bash)

Part B — Query improvements:
- search_graph exclude_labels parameter to filter noisy labels (e.g. Route)
- Cypher edge property filtering: r.url_path, r.confidence, r.confidence_band

Part C — Cross-service linking:
- InfraFile env var URLs feed into HTTP linker as additional call sites
- Default noise filtering: /health, /healthz, /ready, /metrics excluded
- Confidence bands on HTTP_CALLS: high (>=0.7), medium (>=0.45), speculative (>=0.25)
- Levenshtein distance and n-gram overlap similarity functions
- Lowered match threshold from 0.45 to 0.25 (speculative band)

Part D — Graph enrichment:
- OVERRIDE edges: struct methods → interface methods they implement
- USAGE edges: read references (callbacks, variable assignments) vs invocations
- Generated column index on url_path for fast edge property lookups
- Fuzzy name-only resolution fallback (5th strategy in call resolver)
- Configurable HTTP linker via .cgrconfig (exclude paths, min confidence)
- OpenTelemetry trace ingestion (ingest_traces tool) to validate HTTP_CALLS
- Git history change coupling (FILE_CHANGES_WITH edges, co-change analysis)

Updated tool descriptions and skill file with new edge types.
2026-02-25 18:46:20 +01:00
Martin Vogel 33b700f36f Bump version to 0.1.2 2026-02-25 16:06:15 +01:00
Martin Vogel 860e80c88f Add auto-sync watcher, fix WithTransaction data race, add infra file indexing
Auto-sync: background watcher polls indexed projects for file changes
(mtime+size) and triggers incremental re-indexing automatically. Adaptive
polling interval scales with repo size (1s-60s). Non-blocking — uses
TryLock to skip if manual index_repository is in progress.

WithTransaction: changed signature to return a transaction-scoped Store
instead of mutating the shared querier field. Eliminates a data race
where concurrent read handlers could use a committed transaction.

Infrastructure file indexing: new pipeline pass indexes Dockerfiles,
docker-compose, cloudbuild, .env, Terraform, and YAML config files as
InfraFile nodes with structured properties.

Also includes: indexMu mutex on Server for safe concurrent access,
Claude Code skill file in repo, updated README with auto-sync docs.
2026-02-25 16:05:34 +01:00
Martin Vogel e4839e758d Add cross-service query guidance to tool descriptions
Clarify that search_graph relationship filter counts node degrees
(not edges), direct users to query_graph Cypher for listing
HTTP_CALLS/ASYNC_CALLS edges with properties, and recommend
direction=both in trace_call_path for full cross-service context.
2026-02-25 14:20:48 +01:00
Martin Vogel 97284a35fa v0.1.0: Performance, incremental indexing, async boundary detection
Performance & quality:
- Transaction wrapping (Querier interface, single tx per index run)
- Composite indexes on edges table for faster traversals
- Cypher WHERE push-down (=, CONTAINS, STARTS WITH → SQL)
- golangci-lint with 25 linters, zero violations
- 11 benchmarks for pipeline, search, and BFS

Incremental indexing:
- Content-hash based file change detection
- Dependency-aware two-level invalidation (changed + dependents)
- Stale file cleanup for deleted files

Async boundary detection:
- Project-wide env var URL scanner (Dockerfile, YAML, .tf, .sh, .env,
  TOML, properties files) with 3-layer secret exclusion
- Env var default extraction in constant propagation (getEnv, os.environ.get,
  process.env with ||/?? fallback)
- ASYNC_CALLS edge type for Cloud Tasks, Pub/Sub, SQS/SNS, RabbitMQ, Kafka
  dispatch patterns, separate from synchronous HTTP_CALLS
- Tool descriptions updated with all edge types

Other improvements:
- Type inference for method dispatch resolution
- Interface implementation detection (IMPLEMENTS edges)
- Improved tool descriptions for discoverability
2026-02-25 13:43:57 +01:00
Martin Vogel f10239a004 Add offset/limit pagination to search_graph and search_code
Return total count, offset, limit, and has_more in responses so LLM
clients can page through large result sets without fetching everything.
Default limit is 100 (was unlimited).
2026-02-25 10:06:55 +01:00
Martin Vogel 555f874622 Add project filter, route group prefixes, decorator entry points, and remove limit caps
- search_graph: add `project` parameter to scope searches to a single project
- httplink: resolve Go gin router Group() prefixes into Route node paths
- pipeline: recognize @app.middleware, @app.exception_handler, @app.on_event as entry points
- search_graph/search_code: make `limit` optional (no default cap, no max 200)
- Fix cypher test assertions after previous SubmitOrder rename
2026-02-25 00:39:25 +01:00
Martin Vogel f63c70865e Initial release: codebase-memory-mcp v0.0.1
MCP server that indexes codebases into a queryable knowledge graph.
Single Go binary, SQLite storage, 12 languages via tree-sitter.

Features: call graph, cross-service HTTP linking, dead code detection,
route nodes, Cypher queries, incremental reindex, JSON config scanning.
2026-02-25 00:10:39 +01:00