Skip to content

Releases: stainless-code/codemap

v0.11.0

11 Jun 10:42
2eab3af

Choose a tag to compare

Minor Changes

  • #178 36106ff Thanks @SutuSebastian! - Add structural duplicate detection: symbols.body_hash at index time (canonical function body AST) and bundled duplicates recipe. Schema version 39 — existing indexes rebuild on next codemap run. Function-shaped symbols only; trivial one-line bodies skipped. Triage collisions with snippet — shared control-flow skeletons can false-positive.

  • #179 8595173 Thanks @SutuSebastian! - Add churn × complexity hotspot ranking: file_churn refreshed on every index from git history, with codemap ingest-churn, MCP/HTTP ingest_churn, and config churn.file for non-git repos. Schema version 40 — existing indexes rebuild on next codemap run. New churn-complexity-hotspots recipe ranks files or symbols (by_symbol) by change frequency × complexity with normalized 0–100 scores and churn_trend. Outcome alias hotspots still maps to fan-in.

  • #173 d4982c4 Thanks @SutuSebastian! - Add SonarSource cognitive complexity on symbols (same function-shaped coverage as cyclomatic, including class methods). Schema version 38 — existing indexes rebuild on next codemap run. New recipe high-cognitive-complexity; high-complexity-untested rows include cognitive_complexity.

Patch Changes

  • #177 bb8bae9 Thanks @SutuSebastian! - On audit --base <ref> (CLI / MCP / HTTP), each added row carries attribution: introduced | inherited (branch-new vs pre-existing at merge base). --summary adds added_introduced / added_inherited per delta.

  • #172 cf7df2f Thanks @SutuSebastian! - Add query --format codeclimate (GitLab Code Quality JSON) and query --format badge (markdown issue-count line or codemap-badge/v1 JSON via --badge-style json). Available on CLI, MCP, and HTTP query tools.

  • #183 b509e4c Thanks @SutuSebastian! - Add hash-stable map_id and codebase_map routing hints to context responses (CLI, MCP, HTTP). MCP initialize instructions now include map_id and top hub paths. Opt out with --no-codebase-map or include_codebase_map: false; omitted when compact.

  • #176 16687a0 Thanks @SutuSebastian! - Add coverage-confirmed-dead recipe: static dead exports with confidence (high when ingested 0% coverage, medium when unmeasured), plus reason and caller_count.

  • #174 a11242e Thanks @SutuSebastian! - Add reason and evidence_json columns on high-judgment recipe rows (boundary-violations, deprecated-symbols, unimported-exports) so agents can cite detection path before apply or manual edits.

  • #175 af86d10 Thanks @SutuSebastian! - Add high-crap-score recipe: CRAP ranking with measured coverage when ingested, or graph-estimated 85/40/0% tiers from test reachability otherwise.

    Extend unimported-exports with unresolved_import_blind_spot reason and evidence_json (unresolved import hop) so dead-export / high-CRAP triage does not over-trust the graph past alias blind spots.

  • #181 aae172f Thanks @SutuSebastian! - Scope codemap impact and MCP/HTTP impact homonym symbols: --in / in disambiguates by defining file (same prefix/exact rules as codemap show --in); unscoped homonyms union per-defining-file call graphs instead of merging by name only. Mismatched scope returns empty matches with skipped_scope.

  • #170 e74410c Thanks @SutuSebastian! - MCP tools/list and HTTP GET /tools expose advisory readOnlyHint, destructiveHint, and idempotentHint per tool so clients can gate auto-approval. Apply tools carry destructiveHint; read-only query tools carry readOnlyHint.

  • #180 a5caca8 Thanks @SutuSebastian! - Harden read surfaces: codemap query --format … blocks index mutations via the same read-only guard as --json; codemap serve requires --token when --host is not loopback (any 127.0.0.0/8 address counts as loopback, so --token stays optional on 127.0.0.2 and similar); codemap validate (and MCP/HTTP validate) can return rejected rows with optional reason (path escapes project root | path escapes via symlink | path resolves outside project root) — output path keys are always project-relative POSIX paths.

  • #182 3568c5f Thanks @SutuSebastian! - createCodemap() and the CLI now reject invalid project config at load time. A second createCodemap() with a different project root in the same process throws (audit --base worktree reindex is exempt).

  • #184 fb73e0d Thanks @SutuSebastian! - show and snippet now use fast equality lookup for exact name and lone name:Token queries (no wildcards); substring, multi-field, and FTS paths stay on the broader slow tier. CLI help, MCP tool descriptions, and bundled agent guidance document the two tiers.

v0.10.1

05 Jun 08:27
22588be

Choose a tag to compare

Patch Changes

  • #169 1632bdd Thanks @SutuSebastian! - Refresh runtime and toolchain dependencies (oxc-parser, oxc-resolver, oxfmt, oxlint, @clack/prompts, tinyglobby, and related dev tooling) to latest compatible releases.

  • #166 4bfb067 Thanks @SutuSebastian! - Add codemap rename CLI alias for homonym-safe renames via apply rename-preview (--define-in, --in-file, --kind).

  • #167 231d6cc Thanks @SutuSebastian! - Add MCP/HTTP transport parity for coverage ingest and query baselines: new ingest_coverage tool (CLI twin codemap ingest-coverage --json) and optional baseline param on query / query_recipe (same diff envelope as codemap query --baseline). Tool count 19 → 20.

v0.10.0

04 Jun 19:09
2fe5e5f

Choose a tag to compare

Minor Changes

  • #164 8c7064a Thanks @SutuSebastian! - Add optional heuristic call edges (calls.provenance) for JSX parent→child composition. Schema rebuild to v37. Enable via .codemap/config synthesis.heuristicCalls: true (default off). Bundled recipe calls-including-heuristic; call-path excludes heuristics by default.

  • #162 6e50d77 Thanks @SutuSebastian! - Add two-phase call resolution (unresolved_calls staging, calls.callee_symbol_id / callee_resolution_kind). Schema version 36 — existing indexes rebuild on next codemap run.

Patch Changes

  • 7b0406a Thanks @SutuSebastian! - Ship the apply substrate: recipe-driven codemap apply for stale imports, deprecated migrations, import-source moves, JSX prop renames, and scoped rename-preview (define_in homonyms). Add --rows, --diff-input, fixpoint --until-empty, optional --commit, auto_fixable/--force, and apply.autoApplyRecipes allowlist. MCP/HTTP twins: apply, apply_rows, apply_diff_input.

v0.9.5

28 May 10:25
1d9c09e

Choose a tag to compare

Patch Changes

  • #160 b1e3d58 Thanks @SutuSebastian! - Add CLI twins for MCP query composers and resources so shell-only consumers get the same JSON payloads: codemap query batch, trace, explore, node, file, schema, symbols, and context --include-snippets.

v0.9.4

27 May 16:55
68799ef

Choose a tag to compare

Patch Changes

  • #158 e8ea640 Thanks @SutuSebastian! - Add codemap agents init --targets and --link-mode for non-interactive IDE wiring. Combine with --mcp to write MCP config only for selected integrations (e.g. Cursor + Copilot without Continue/Cline). Mutually exclusive with --interactive.

v0.9.3

27 May 16:28
b60d62b

Choose a tag to compare

Patch Changes

  • #156 ae4a143 Thanks @SutuSebastian! - codemap agents init --mcp now includes --root ${workspaceFolder} in the VS Code / Copilot MCP config (.vscode/mcp.json), same as Cursor. Re-run codemap agents init --mcp to upgrade an existing .vscode/mcp.json from older init output (or --interactive and select Copilot only).

v0.9.2

27 May 15:21
946816d

Choose a tag to compare

Patch Changes

  • #152 150c6c6 Thanks @SutuSebastian! - Adaptive snippet budgets for trace, explore, and node scale with indexed file count when budget_chars is omitted (explicit override unchanged). explore also applies adaptive row limits internally (no transport override).

  • #155 450ca2e Thanks @SutuSebastian! - codemap agents init is safer on re-run: IDE mirrors sync bundled template paths only; --force overwrites IDE mirrors only when they carry codemap-init:managed or match the legacy mirror heuristic (pre-marker bundled copies); invalid MCP JSON shapes are rejected instead of reset (even with --force).

  • #149 41a4184 Thanks @SutuSebastian! - Add index_freshness metadata on context, MCP tool responses, HTTP headers, and boot stderr warnings so agents can detect commit drift, pending watcher sync, and disk-ahead-of-index states before trusting structural queries.

  • #154 1bcca3a Thanks @SutuSebastian! - codemap agents init --mcp writes PM-aware MCP spawn commands (e.g. npx codemap, pnpm exec codemap, yarn exec codemap, bunx codemap, or dlx @stainless-code/codemap@latest) instead of assuming global codemap on PATH.

  • #153 048278b Thanks @SutuSebastian! - MCP session lifecycle hygiene: stdio disconnect detection (stdin EOF, stdout EPIPE, parent-PID poll) with graceful watcher shutdown on client exit; HTTP serve --watch refcount-gates the watcher per request (5s release grace, /health excluded). No MCP idle shutdown.

  • #151 e717652 Thanks @SutuSebastian! - Rich context bootstrap: start_here with intent-ranked recipe cards, inline index summary, budget-capped hub leaders with export signatures (adaptive caps by repo size), debug-biased marker samples, and optional include_snippets on MCP/HTTP context (no-op when compact: true). Legacy hubs keeps the bundled fan-in recipe default limit; prefer start_here.hub_leaders for signatures.

v0.9.1

26 May 18:06
92c55d3

Choose a tag to compare

Patch Changes

  • #146 7afc9eb Thanks @SutuSebastian! - Fix codemap --full (and other worker-pool parses) appearing to hang ~120s after stats print — clear parse timeout timers when workers respond instead of leaving orphaned setTimeout handles on the event loop.

v0.9.0

26 May 17:07
01d4931

Choose a tag to compare

Minor Changes

  • #129 6648add Thanks @SutuSebastian! - Add cross-process index lock with codemap unlock, and append parse failures to <state-dir>/errors.log.

  • #130 f5374b8 Thanks @SutuSebastian! - Add per-file parse timeouts with worker recycle during full and incremental indexing; failures log to errors.log and appear in the index summary.

Patch Changes

  • #132 8a1de53 Thanks @SutuSebastian! - Add affected-tests recipe and codemap affected CLI for reverse-dependency test selection from changed files.

  • #135 c4b4b36 Thanks @SutuSebastian! - Add codemap agents init --mcp — project-level MCP config for Cursor, Claude Code, VS Code, Continue, Cline, Amazon Q (workspace .amazonq/default.json + legacy .amazonq/mcp.json), and Gemini CLI (Windsurf when that integration is selected), with idempotent JSON merge and Claude mcp__codemap__* permissions.

  • #138 829075c Thanks @SutuSebastian! - Add field-qualified symbol discovery on codemap show --query and MCP/HTTP show / snippet via a query argument (kind:, name:, path:, in: + optional free text). Includes parameterized SQL engine, optional FTS join, --print-sql Moat-A transparency, and {matches, disambiguation?, warning?} envelope parity across CLI, MCP, and HTTP.

  • #124 04c4aa7 Thanks @SutuSebastian! - Honor --state-dir for project recipes; populate function_params.owner_kind; register MCP files/symbols resource templates with optional ?in= filter; watcher fixes for custom state dirs.

  • #133 386ffa6 Thanks @SutuSebastian! - Add MCP/HTTP affected tool — same preprocessor as codemap affected, composes the affected-tests recipe. Respects CODEMAP_MCP_TOOLS allowlist.

  • #126 ed4ca6b Thanks @SutuSebastian! - Add MCP initialize server instructions (tool-selection playbook) and CODEMAP_MCP_TOOLS env for subset tool registration.

  • ee9f6b2 Thanks @SutuSebastian! - Bump oxc-parser to ^0.133.0 and @typescript/native-preview to the latest 7.0 dev build.

  • 9fa1e9d Thanks @SutuSebastian! - Pin runtime and dev dependencies to exact versions in package.json (drop carets) and refresh bun.lock. Dev tooling: oxfmt 0.52, oxlint 1.67, @typescript/native-preview 20260526. Oxlint 1.67 drops a redundant escape in show-search-mode.ts glob regex (no behavior change).

  • #131 a8cf25b Thanks @SutuSebastian! - Add call-path and symbol-neighborhood query recipes for cycle-safe call-graph tracing and bidirectional symbol exploration.

  • #143 e475d20 Thanks @SutuSebastian! - Fix type heritage resolve edge cases: default-import bases, re-export barrel incremental scope, homonym dedupe in ancestor walks, and (expression) complex extends handling.

  • #142 a085ec6 Thanks @SutuSebastian! - Add type_heritage substrate and rewire type-ancestors / type-descendants recipes to JOIN indexed heritage edges instead of parsing symbols.signature.

  • #141 bd5a1fa Thanks @SutuSebastian! - Add type-ancestors and type-descendants query recipes for extends/implements hierarchy walks (backed by the type_heritage substrate after #142).

  • #127 4318cc4 Thanks @SutuSebastian! - Add WSL watch policy (auto-disable on /mnt/* mounts) and opt-in git hooks for background incremental index when the watcher is off.

v0.8.0

21 May 18:28
f25f8a6

Choose a tag to compare

Minor Changes

  • #107 f24f8b6 Thanks @SutuSebastian! - Substrate tiers 1–6 remainder (excludes C.9 / files.is_entry). Schema bump SCHEMA_VERSION 27 → 34 — first run after upgrade auto-rebuilds .codemap/index.db via the existing version-mismatch path.

    Tier 1 — call + import precision

    • calls.{args_count,is_method_call,is_constructor_call,is_optional_chain}; constructor vs call dedup key fix
    • symbols.{return_type,is_async,is_generator}
    • Side-effect import_specifiers rows (kind='side-effect') + import_id FK to imports

    Tier 2 — bindings

    • bindings.resolution_kind='re-exported' when resolution walks a re-export chain

    Tier 3 — JSX

    • New tables jsx_elements / jsx_attributes; extractor with per-file parent linking post-pass

    Tier 5 — behavioral

    • New tables async_calls, try_catch, decorators, jsdoc_tags; context stack for in_loop / in_try

    Tier 6 — module graph (no entry points)

    • dynamic_imports table + extractor
    • Post-pass files.is_barrel and parse-time files.has_side_effects

    Recipes + goldens: find-call-sites (extended), find-async-functions, find-dynamic-imports, find-barrel-files, find-side-effect-files, find-re-exported-bindings, find-side-effect-imports, find-jsx-usages, find-await-in-loop, find-swallowed-errors, find-decorator-usage, find-throws-jsdoc, plus golden coverage for fan-out-sample / fan-out-sample-json and substrate regression tests.

    Read-only CLI hardening: printQueryResult (ad-hoc codemap query "<SQL>") now sets PRAGMA query_only = 1, closing the last gap vs queryRows / executeQuery (#107).

    Out of scope: C.9 plugin layer (files.is_entry, reachability-from-entry); tiers 7–13.

    Migration: No in-place DDL — rebuild on schema mismatch preserves user-data tables (coverage, query_baselines, recipe_recency). Re-run codemap --full (or any index) after upgrade.

Patch Changes

  • #118 665c19a Thanks @SutuSebastian! - Reject apply targets that are symlinks so phase-2 rename cannot replace a link with a regular file.

  • #117 5ee5f2e Thanks @SutuSebastian! - Fail benchmark reindex runs when the spawned indexer exits non-zero instead of recording misleading timings.

  • #109 02a628f Thanks @SutuSebastian! - Validate codemap index --files operands before indexing starts.

  • #110 7767a97 Thanks @SutuSebastian! - Validate VERSION output in detect-pm before writing GitHub Actions outputs.

  • #112 ec31949 Thanks @SutuSebastian! - Harden apply and diff-json path containment against traversal outside the project root.

  • #123 54ad25a Thanks @SutuSebastian! - Fix high-severity bugs (describe.each parent stack, git porcelain -z paths, CLI symlink entry, pr-comment TTY stdin), medium bugs (changed-since -z paths, perf baseline RUNS guard, qualified typeof, decorator args_text, for-of binding refs, HTTP body drain, benchmark regex validation, jsx INSERT RETURNING id, sqlite stmt cache on close), and low bugs (CLI parse guards, incremental delete transaction, apply summary.files, extension case, pnpm # paths, coverage db.transaction, impact walk delimiter, worker errors, pointer dedup, benchmark readAll visibility).

  • #114 ae54ce0 Thanks @SutuSebastian! - Fix diff preview deletions, config empty-array overrides, resolver path containment, impact call-site selection, and FTS cleanup on file delete.

  • #122 4e191ba Thanks @SutuSebastian! - Run full check (not build-only) in prepublishOnly so npm publish cannot skip tests or typecheck.

  • #113 126066d Thanks @SutuSebastian! - Reject opaque Origin: null in codemap serve CSRF checks.

  • #120 17dcbd1 Thanks @SutuSebastian! - Reject unexpected arguments on codemap skill and codemap rule instead of silently printing bundled content.

  • #119 cf0532b Thanks @SutuSebastian! - Print symbol signature in codemap snippet terminal output, matching codemap show and the documented contract.

  • #116 a444c40 Thanks @SutuSebastian! - Fix V8 coverage ingest so innermost-wins applies across all FunctionCoverage entries in a script, not per-function iteration order.

  • #115 eb18750 Thanks @SutuSebastian! - Fix watcher priming race, parse-worker stat errors, incremental rename cleanup, and several indexer extractor gaps (scopes, references, tests.each, process.env, CSS imports).

  • #121 f5d013c Thanks @SutuSebastian! - Reject malformed CODEMAP_PARSE_WORKERS values (e.g. 2abc, 1.5) instead of silently truncating with parseInt.