9 Commits
Author SHA1 Message Date
endergebnis 2cd801558d fix: index_create updates tracked project for search_text
index_create and index_update now update the MCP server's tracked
project path so subsequent calls like search_text use the same
project. search_text also gains an optional 'project' parameter
to explicitly override the default. Closes #9.
2026-09-19 15:23:07 +02:00
endergebnisandCopilot 4b55a41ece Add --exclude, detect/inspect_bundle tools, Spring/test entry-point detection
- Global `--exclude <glob>` (repeatable) on search symbols/text and
  find dead/dead-symbols, with built-in defaults (vendor/, node_modules/,
  *.min.*, dist/, build/). Minified/vendored assets stay indexed for import
  edges but are filtered from query results (bootstrap.min.css noise: 90% of
  dead symbols -> gone).
- `detect` CLI / `codebase_detect` MCP tool: probe a directory's languages and
  stack from file extensions and manifest files before indexing.
- `inspect bundle` CLI / `inspect_bundle` MCP tool: symbol source + direct
  callers + direct importers in one call (3 round-trips -> 1).
- find dead-symbols: skip CSS files and structural kinds (package, heading*)
  as non-callable; extend framework-wired detection with JUnit/Spring
  annotations (@Test, @Service, @Component, ...) and pytest/JUnit test-class
  naming (Test*, test_*, *Test, *Tests), plus `test_` methods reported as
  `member` kind.
- README: correct CSS statement, document new tools/limits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-08 22:48:45 +02:00
endergebnisandCopilot b5389341a1 Make find dead-symbols linear and add code_only_line tests
find_dead_symbols previously re-scanned every candidate file's lines once
per unique symbol name (O(names × lines)). Replace with a per-file
word → line-number index built once per file and shared across all names,
bounded to tokens that are actual symbol names.

Also add unit coverage for code_only_line's string/comment blanking,
including Rust raw strings with multi-hash delimiters.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-08 20:02:29 +02:00
endergebnisandCopilot f1531a64d4 Add caller/reference analysis, C# imports, and de-noised search
Agent-workflow tooling and search quality improvements:

- find_callers / find_references (by id or exact name), with caller
  attribution to the innermost enclosing symbol and import-graph narrowing
- index file (single-file re-index) and workspace glob member resolution
- search symbols: exact > prefix > fulltext > substring fallback, inline
  source and line numbers, --limit on all search paths
- search text: reads live from disk (no stale FTS snapshot), collapses
  duplicate snippets, correct multi-word phrase matching
- find dead-symbols: excludes framework-wired entry points (pytest test_*,
  #[test] tests, FastAPI/Flask routes, Celery tasks, click/typer commands)
- find references: filters the definition line and string/comment
  occurrences (incl. Rust raw strings)
- C# import edges via new extract_csharp (using directives)
- richer MCP tool descriptions; brace-in-string tokenizer fix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-08 19:49:36 +02:00
endergebnisandCopilot a416a9fe52 Fix two follow-up issues: reject nonexistent roots, single-source extensions
- pipeline: fail index create/update with a clear error when the project root
  is not a directory instead of building a misleading zero-file index
- config: single LANGUAGE_BY_EXT table as source of truth; language_for and
  resolver code_extensions both derive from it (no more duplicated ext list)
- imports: resolver probes code_extensions() instead of a local RESOLVE_EXTS
- tests: regression for nonexistent-root rejection

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-04 20:45:17 +02:00
endergebnisandCopilot 4338e28ce0 Fix six open issues: stale imports, MCP validation, import-graph gaps, dup importers, I/O errors, scope docs
- pipeline: re-resolve imports for every file on update (not just changed),
  so add/remove/rename of a target fixes unchanged importers; propagate hash
  and read errors instead of treating unreadable files as empty
- discovery: report unreadable walk entries to stderr instead of dropping them
- imports: strip `pub` visibility so `pub use` re-exports resolve; share
  extension/module-entry probe lists (adds cc,cxx,hpp,hh,hxx,mts,cts,jsx,mjs,cjs)
- store: DISTINCT + ORDER in importers_of to dedup repeated edges
- mcp: validate required tool args (explicit isError), emit JSON-RPC -32700
  parse errors and -32600 invalid-request instead of silently skipping
- README: document the 13-tool surface vs toktoken's 27 and known gaps
- tests: regression coverage for update re-resolution, pub-use re-exports,
  importer dedup, and MCP error reporting

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-04 18:49:06 +02:00
endergebnisandCopilot 6875998ab6 Fix crate-name import resolution for bin+lib crates
Register the Cargo package name (normalized - -> _) as an alias for
src/lib.rs in the resolver, so 'use <crate>::{...}' in src/main.rs
resolves to src/lib.rs. Adds rustdemo/Cargo.toml fixture and test
coverage; updates blast-radius test for the new transitive edge.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-04 03:07:47 +02:00
endergebnisandCopilot 0bb09da454 Add MIT license (Cargo.toml + LICENSE)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-04 02:47:59 +02:00
endergebnisandCopilot 354132e887 Initial commit: rustytokens — native codebase indexer + MCP server
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-04 02:43:00 +02:00