Releases: stainless-code/codemap
v0.9.4
Patch Changes
- #158
e8ea640Thanks @SutuSebastian! - Addcodemap agents init --targetsand--link-modefor non-interactive IDE wiring. Combine with--mcpto write MCP config only for selected integrations (e.g. Cursor + Copilot without Continue/Cline). Mutually exclusive with--interactive.
v0.9.3
Patch Changes
- #156
ae4a143Thanks @SutuSebastian! -codemap agents init --mcpnow includes--root ${workspaceFolder}in the VS Code / Copilot MCP config (.vscode/mcp.json), same as Cursor. Re-runcodemap agents init --mcpto upgrade an existing.vscode/mcp.jsonfrom older init output (or--interactiveand select Copilot only).
v0.9.2
Patch Changes
-
#152
150c6c6Thanks @SutuSebastian! - Adaptive snippet budgets fortrace,explore, andnodescale with indexed file count whenbudget_charsis omitted (explicit override unchanged).explorealso applies adaptive row limits internally (no transport override). -
#155
450ca2eThanks @SutuSebastian! -codemap agents initis safer on re-run: IDE mirrors sync bundled template paths only;--forceoverwrites IDE mirrors only when they carrycodemap-init:managedor match the legacy mirror heuristic (pre-marker bundled copies); invalid MCP JSON shapes are rejected instead of reset (even with--force). -
#149
41a4184Thanks @SutuSebastian! - Addindex_freshnessmetadata oncontext, 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
1bcca3aThanks @SutuSebastian! -codemap agents init --mcpwrites 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 globalcodemapon PATH. -
#153
048278bThanks @SutuSebastian! - MCP session lifecycle hygiene: stdio disconnect detection (stdin EOF, stdout EPIPE, parent-PID poll) with graceful watcher shutdown on client exit; HTTPserve --watchrefcount-gates the watcher per request (5s release grace,/healthexcluded). No MCP idle shutdown. -
#151
e717652Thanks @SutuSebastian! - Richcontextbootstrap:start_herewith intent-ranked recipe cards, inline index summary, budget-capped hub leaders with export signatures (adaptive caps by repo size), debug-biased marker samples, and optionalinclude_snippetson MCP/HTTPcontext(no-op whencompact: true). Legacyhubskeeps the bundledfan-inrecipe default limit; preferstart_here.hub_leadersfor signatures.
v0.9.1
Patch Changes
- #146
7afc9ebThanks @SutuSebastian! - Fixcodemap --full(and other worker-pool parses) appearing to hang ~120s after stats print — clear parse timeout timers when workers respond instead of leaving orphanedsetTimeouthandles on the event loop.
v0.9.0
Minor Changes
-
#129
6648addThanks @SutuSebastian! - Add cross-process index lock withcodemap unlock, and append parse failures to<state-dir>/errors.log. -
#130
f5374b8Thanks @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
8a1de53Thanks @SutuSebastian! - Addaffected-testsrecipe andcodemap affectedCLI for reverse-dependency test selection from changed files. -
#135
c4b4b36Thanks @SutuSebastian! - Addcodemap 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 Claudemcp__codemap__*permissions. -
#138
829075cThanks @SutuSebastian! - Add field-qualified symbol discovery oncodemap show --queryand MCP/HTTPshow/snippetvia aqueryargument (kind:,name:,path:,in:+ optional free text). Includes parameterized SQL engine, optional FTS join,--print-sqlMoat-A transparency, and{matches, disambiguation?, warning?}envelope parity across CLI, MCP, and HTTP. -
#124
04c4aa7Thanks @SutuSebastian! - Honor--state-dirfor project recipes; populatefunction_params.owner_kind; register MCPfiles/symbolsresource templates with optional?in=filter; watcher fixes for custom state dirs. -
#133
386ffa6Thanks @SutuSebastian! - Add MCP/HTTPaffectedtool — same preprocessor ascodemap affected, composes theaffected-testsrecipe. RespectsCODEMAP_MCP_TOOLSallowlist. -
#126
ed4ca6bThanks @SutuSebastian! - Add MCP initialize server instructions (tool-selection playbook) andCODEMAP_MCP_TOOLSenv for subset tool registration. -
ee9f6b2Thanks @SutuSebastian! - Bumpoxc-parserto ^0.133.0 and@typescript/native-previewto the latest 7.0 dev build. -
9fa1e9dThanks @SutuSebastian! - Pin runtime and dev dependencies to exact versions inpackage.json(drop carets) and refreshbun.lock. Dev tooling:oxfmt0.52,oxlint1.67,@typescript/native-preview20260526. Oxlint 1.67 drops a redundant escape inshow-search-mode.tsglob regex (no behavior change). -
#131
a8cf25bThanks @SutuSebastian! - Addcall-pathandsymbol-neighborhoodquery recipes for cycle-safe call-graph tracing and bidirectional symbol exploration. -
#143
e475d20Thanks @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
a085ec6Thanks @SutuSebastian! - Addtype_heritagesubstrate and rewiretype-ancestors/type-descendantsrecipes to JOIN indexed heritage edges instead of parsingsymbols.signature. -
#141
bd5a1faThanks @SutuSebastian! - Addtype-ancestorsandtype-descendantsquery recipes for extends/implements hierarchy walks (backed by thetype_heritagesubstrate after #142). -
#127
4318cc4Thanks @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
Minor Changes
-
#107
f24f8b6Thanks @SutuSebastian! - Substrate tiers 1–6 remainder (excludes C.9 /files.is_entry). Schema bumpSCHEMA_VERSION27 → 34 — first run after upgrade auto-rebuilds.codemap/index.dbvia 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 fixsymbols.{return_type,is_async,is_generator}- Side-effect
import_specifiersrows (kind='side-effect') +import_idFK toimports
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 forin_loop/in_try
Tier 6 — module graph (no entry points)
dynamic_importstable + extractor- Post-pass
files.is_barreland parse-timefiles.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 forfan-out-sample/fan-out-sample-jsonand substrate regression tests.Read-only CLI hardening:
printQueryResult(ad-hoccodemap query "<SQL>") now setsPRAGMA query_only = 1, closing the last gap vsqueryRows/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-runcodemap --full(or any index) after upgrade.
Patch Changes
-
#118
665c19aThanks @SutuSebastian! - Reject apply targets that are symlinks so phase-2 rename cannot replace a link with a regular file. -
#117
5ee5f2eThanks @SutuSebastian! - Fail benchmark reindex runs when the spawned indexer exits non-zero instead of recording misleading timings. -
#109
02a628fThanks @SutuSebastian! - Validatecodemap index --filesoperands before indexing starts. -
#110
7767a97Thanks @SutuSebastian! - ValidateVERSIONoutput indetect-pmbefore writing GitHub Actions outputs. -
#112
ec31949Thanks @SutuSebastian! - Harden apply and diff-json path containment against traversal outside the project root. -
#123
54ad25aThanks @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
ae54ce0Thanks @SutuSebastian! - Fix diff preview deletions, config empty-array overrides, resolver path containment, impact call-site selection, and FTS cleanup on file delete. -
#122
4e191baThanks @SutuSebastian! - Run fullcheck(not build-only) inprepublishOnlyso npm publish cannot skip tests or typecheck. -
#113
126066dThanks @SutuSebastian! - Reject opaqueOrigin: nullincodemap serveCSRF checks. -
#120
17dcbd1Thanks @SutuSebastian! - Reject unexpected arguments oncodemap skillandcodemap ruleinstead of silently printing bundled content. -
#119
cf0532bThanks @SutuSebastian! - Print symbol signature incodemap snippetterminal output, matchingcodemap showand the documented contract. -
#116
a444c40Thanks @SutuSebastian! - Fix V8 coverage ingest so innermost-wins applies across all FunctionCoverage entries in a script, not per-function iteration order. -
#115
eb18750Thanks @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
f5d013cThanks @SutuSebastian! - Reject malformedCODEMAP_PARSE_WORKERSvalues (e.g.2abc,1.5) instead of silently truncating withparseInt.
v0.7.5
Patch Changes
-
#96
cc8daedThanks @SutuSebastian! - Performance: full-rebuild wall down ~21% on small trees and ~18% on a real-world ~2k-file external corpus. Headline contributor:collectFilesswitched to a singletinyglobbycall withignorepatterns (collect_ms -93%, file set bit-identical viafollowSymbolicLinks: false). Bindings/cycles/re-exports phase now keeps the bulk-INSERT PRAGMA-OFF window open through full rebuild (bindings_ms -33% on the 2k corpus). Plusquery_batchsingle connection, incremental double-read kill, sharedcountLineshelper,stmtCacheplaceholder memo, SQLitebusy_timeout, adapterMaplookup, byte-order sort, FTS5 batched delete, andgetAllFileHasheshoist.Instrumentation:
IndexPerformanceReportnow surfacesbindings_ms,module_cycles_ms,re_export_chains_ms(previously rolled intototal_mswith no breakdown). SetCODEMAP_PERFORMANCE_JSON=<path>to dump the report as JSON post-run (no new CLI flag added).Knobs:
CODEMAP_PARSE_WORKERS=N(clamped[1, 32]) overrides the defaultmax(2, min(cpus, 6))worker count.bun run check:perf-baseline+ a non-blocking CI job (📈 Perf baseline (self-index)) guard against per-phase regressions vsfixtures/benchmark/perf-baseline.json;CODEMAP_PERF_RUNS/CODEMAP_PERF_REGRESSION_PCT/CODEMAP_PERF_NOISE_FLOOR_MStune the checker.Behavior change (correctness hardening):
queryRows(the implementation behindCodemap.query(),codemap applyrecipe SQL execution,bun run test:golden, and thecmd-queryprint/grouped paths) now setsPRAGMA query_only = 1to mirrorexecuteQuery's read-only enforcement. DML / DDL slipping through these paths now errors at SQLite instead of mutating the database. All these call sites are contractually read-only; this turns a contract into an enforceable boundary. Existing tests pass unchanged. Anyone who relied on undocumented mutation throughCodemap.query("DELETE FROM ...")would now get an error — but that was always API abuse.Full design context:
docs/plans/perf-triangulation-rollout.md(synthesis + execution rollout of 5 independent perf/architecture audits authored 2026-05-17).
v0.7.4
Patch Changes
-
#93
d92b917Thanks @SutuSebastian! - Fix: project recipes (<root>/.codemap/recipes/<id>.sql) are now visible via the CLI.parseQueryRestvalidates--recipe <id>/--recipes-json/--print-sql <id>BEFORErunQueryCmdcallsbootstrapCodemap, so the recipe registry hitgetProjectRoot()pre-init, the throw was silently caught, and the loader fell back to bundled-only. The MCP and HTTP transports always bootstrap before reaching the loader, so project recipes worked there throughout — only the CLI path was affected.Fix is surgical:
- New
setQueryRecipesProjectRoot(root)API inapplication/query-recipes.ts— caller-supplied root takes precedence over the runtime config (which isn't initialised yet during argv parse). cli/main.tscalls it once right afterparseBootstrapArgsreturnsroot, so every subsequent verb (parser-side and post-bootstrap) sees the same value.
Single source of truth: the override is the same root
bootstrapCodemapresolves to — no parallel walk-up heuristic, no new env var, no second resolution path. The registry cache invalidates when the override changes.Adds regression tests (
query-recipes.pre-bootstrap.test.ts) exercising the override-only path (noinitCodemap) plus a dogfood project recipe (.codemap/recipes/src-deprecated.sql) that scopes the bundleddeprecated-symbolsaudit tosrc/only — useful for codemap's own deprecation lifecycle, and a permanent regression case against this bug recurring.Consumers with project recipes authored on 0.6.x–0.7.2 didn't need to wait — recipes worked via MCP / HTTP throughout. After upgrading, the CLI auto-picks them up.
- New
v0.7.3
Patch Changes
-
#91
82bca4bThanks @SutuSebastian! - Slim the auto-generated<state-dir>/.gitignoreheader for consumer clarity:- Drop the internal function-name reference (
ensureStateGitignore) — consumers can't look it up. - Drop the "Rule 9 analogue" / "bump alongside any new cache" line — it was guidance for codemap contributors, leaking into every consumer's checkout.
- Reframe "blacklist" / parenthetical mention of tracked files in plainer language.
Existing two-line header (
# codemap-managed — edits will be overwritten by ensureStateGitignore./# Blacklist of generated artifacts...) becomes:# Managed by codemap — overwritten on next run. # Generated artifacts only; user-authored config (config.*, recipes/) stays tracked.One-time rewrite on consumer side. The reconciler matches the canonical body via exact string comparison, so every consumer's next
codemaprun rewrites<state-dir>/.gitignoreto the new shape (no entries change — only the comment lines). Harmless; the blacklist entries (index.db,index.db-shm,index.db-wal,audit-cache/) are unchanged. - Drop the internal function-name reference (
v0.7.2
Patch Changes
-
#89
6e53458Thanks @SutuSebastian! -codemap audit --base <ref>now materialises the sha-keyed cache viagit archive | tar -xinstead ofgit worktree add. The cache entry at.codemap/audit-cache/<sha>/is a plain extracted tree with no.gitpointer file and no registered git worktree, so:git clean -xdfsweeps it without needing-ff(which used to also nuke unrelated nested repos).- Plain
rm -rfworks — no more dangling registrations under<repo>/.git/worktrees/that neededgit worktree prune.
All other invariants preserved: cache path layout, hit detection (
<sha>/.codemap/index.dbexists), atomic populate (per-pid temp + POSIXrename), LRU eviction (5 entries / 500 MiB), error code names (worktree-add-failedetc. kept for API stability — external consumers discriminate oncode, not the underlying primitive).Also: the cache reindex now stamps
meta.last_indexed_commitwith the resolved sha directly instead of shelling out togit rev-parse HEADinside the cache dir — silences afatal: not a git repositorystderr line that older revisions leaked.Migration — existing consumers with
.codemap/audit-cache/<sha>/worktrees from earlier versions can rungit worktree pruneonce after upgrade to clear dangling registrations. The registrations are inert when the path is gone, so skipping the prune is harmless.