Repository navigation
JavaScript and TypeScript now get the full code map, the same one Python has had: exact line ranges, what each function calls and uses, and who calls it.
claude mcp add knock -- uvx knock-mcp serve --repo . --toolset mapAlready set up with uvx? The next session picks up 0.2.0 automatically when uv refreshes its cache (or run uvx knock-mcp@latest once). Existing indexes re-read JS/TS files once.
What's new
- JS/TS call graph. Functions, arrow functions, classes and their methods, interfaces, types, enums, React components (including
memo/forwardRef), object-literal methods, CommonJS exports, Express-style routes and test blocks, each with a line range and what its body calls: function calls,new X,.method(), constants, JSX components like<OrderItems>, andprocess.envkeys. Errors checked withinstanceofincatchblocks are recorded too. - Vue and Svelte
<script>blocks are handled the same way, including Vue's options API. - Safe fallback. Minified or unreadable files fall back to the previous line patterns, so nothing gets worse.
- Clearer maps. Types and constants now show "used by" instead of "called by".
How it was checked
On Hono and Excalidraw, which knock wasn't developed on: 968 of 971 JS/TS files handled (the rest are an SVG logo and embedded WebAssembly), and maps for 8 questions found 11 of 14 expected answers, against 6 of 14 before. The existing retrieval benchmark is unchanged. This is a deterministic check, not recorded Claude Code sessions; details and limits are in docs/benchmark.md.