typetrace 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,35 @@
1
+ node_modules/
2
+ dist/
3
+ .cache/
4
+ vendor/*/
5
+ targets/*/
6
+ *.sqlite
7
+ *.sqlite-journal
8
+ .venv/
9
+ __pycache__/
10
+ targets/node_modules
11
+ evaluation/results/smoke*/
12
+ experiments/02-agent-diagnosis/results/isolation-report-raw/control__*
13
+ # Experiment 3: raw retrieval outputs contain code from AGPL-licensed repositories (Immich, Twenty) — kept local only;
14
+ # metrics.jsonl / infra.jsonl / graph-builds.jsonl (no code) are tracked.
15
+ experiments/03-graph-scale/results/stage1-*/raw/
16
+ # Experiment 3 agent transcripts contain AGPL code read by the agent — local only
17
+ experiments/03-graph-scale/results/agent/*/transcripts/
18
+ experiments/03-graph-scale/results/h2h-*/raw/
19
+ experiments/05-swebench-python/results/raw/
20
+ # Experiment 8: raw retrieval outputs contain code from the benchmark repositories (various licences) — local only
21
+ experiments/08-swebench-multilingual/results/raw/
22
+
23
+ # owner-specific privacy-scan patterns for scripts/release/export.py (never committed)
24
+ .private-patterns
25
+ # Experiment 10: agent transcripts and tool logs contain code from the benchmark repositories; mock runs are local tests
26
+ experiments/10-swebench-agents/results/*/transcripts/
27
+ experiments/10-swebench-agents/results/*/tool-logs/
28
+ experiments/10-swebench-agents/results/mock-*/
29
+ # Experiment 10: the approval file names the owner's logins; only the example is committed
30
+ experiments/10-swebench-agents/APPROVAL.json
31
+ # Experiment 11: agent transcripts and tool logs contain code from the benchmark repositories; approval names the logins
32
+ experiments/11-vendor-setups/results/*/transcripts/
33
+ experiments/11-vendor-setups/results/*/tool-logs/
34
+ experiments/11-vendor-setups/APPROVAL.json
35
+ experiments/11-vendor-setups/results/mock-*/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Atrix21
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.5
2
+ Name: typetrace
3
+ Version: 0.3.2
4
+ Summary: Local code search plus call graph for AI coding agents, served over MCP (Claude Code, Cursor, Codex, Copilot and more). Runs the typetrace-cli npm package with a bundled Node.js.
5
+ Project-URL: Homepage, https://github.com/Atrix21/typetrace
6
+ Project-URL: Repository, https://github.com/Atrix21/typetrace
7
+ Project-URL: Changelog, https://github.com/Atrix21/typetrace/blob/main/CHANGELOG.md
8
+ Author: Atrix21
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai-agents,call-graph,claude-code,code-search,mcp
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Topic :: Software Development
17
+ Requires-Python: >=3.9
18
+ Requires-Dist: nodejs-wheel-binaries>=22.13
19
+ Description-Content-Type: text/markdown
20
+
21
+ # TypeTrace
22
+
23
+ Finds the code an AI coding agent needs: file:line pointers plus their callers and callees, from a local index of
24
+ your repository (keyword search, a local embedding model and a call graph). It is served over MCP to Claude Code,
25
+ Cursor, VS Code (GitHub Copilot), Codex, Gemini CLI, OpenCode, Kiro, Windsurf and Zed. No API keys; nothing leaves
26
+ your machine.
27
+
28
+ This is the PyPI distribution of the [`typetrace-cli`](https://www.npmjs.com/package/typetrace-cli) npm package. It
29
+ brings its own Node.js (through `nodejs-wheel-binaries`), so you need only Python:
30
+
31
+ ```
32
+ uvx typetrace init . # index the repository and register the MCP server with your AI coding tools
33
+ typetrace status . # what is indexed, what is still running
34
+ typetrace query . "where is the session token refreshed?"
35
+ ```
36
+
37
+ `init` writes MCP entries that start the server the same way (`uvx typetrace==<version> serve ...`, or this Python
38
+ environment when installed with pip). The first run downloads the npm package; the first full index downloads the
39
+ embedding model (~2.4 GB, cached).
40
+
41
+ Documentation, benchmarks and the experiments behind every claim: https://github.com/Atrix21/typetrace
42
+
43
+ <!-- MCP Registry ownership check -->
44
+ mcp-name: io.github.Atrix21/typetrace
@@ -0,0 +1,24 @@
1
+ # TypeTrace
2
+
3
+ Finds the code an AI coding agent needs: file:line pointers plus their callers and callees, from a local index of
4
+ your repository (keyword search, a local embedding model and a call graph). It is served over MCP to Claude Code,
5
+ Cursor, VS Code (GitHub Copilot), Codex, Gemini CLI, OpenCode, Kiro, Windsurf and Zed. No API keys; nothing leaves
6
+ your machine.
7
+
8
+ This is the PyPI distribution of the [`typetrace-cli`](https://www.npmjs.com/package/typetrace-cli) npm package. It
9
+ brings its own Node.js (through `nodejs-wheel-binaries`), so you need only Python:
10
+
11
+ ```
12
+ uvx typetrace init . # index the repository and register the MCP server with your AI coding tools
13
+ typetrace status . # what is indexed, what is still running
14
+ typetrace query . "where is the session token refreshed?"
15
+ ```
16
+
17
+ `init` writes MCP entries that start the server the same way (`uvx typetrace==<version> serve ...`, or this Python
18
+ environment when installed with pip). The first run downloads the npm package; the first full index downloads the
19
+ embedding model (~2.4 GB, cached).
20
+
21
+ Documentation, benchmarks and the experiments behind every claim: https://github.com/Atrix21/typetrace
22
+
23
+ <!-- MCP Registry ownership check -->
24
+ mcp-name: io.github.Atrix21/typetrace
@@ -0,0 +1,34 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.25"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "typetrace"
7
+ # Always the version of the npm package typetrace-cli it runs (checked by tests/product/python-packages.test.ts).
8
+ version = "0.3.2"
9
+ description = "Local code search plus call graph for AI coding agents, served over MCP (Claude Code, Cursor, Codex, Copilot and more). Runs the typetrace-cli npm package with a bundled Node.js."
10
+ readme = "README.md"
11
+ requires-python = ">=3.9"
12
+ license = "MIT"
13
+ license-files = ["LICENSE"]
14
+ authors = [{ name = "Atrix21" }]
15
+ keywords = ["mcp", "code-search", "call-graph", "claude-code", "ai-agents"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "Programming Language :: Python :: 3",
21
+ "Topic :: Software Development",
22
+ ]
23
+ dependencies = ["nodejs-wheel-binaries>=22.13"]
24
+
25
+ [project.scripts]
26
+ typetrace = "typetrace.__main__:main"
27
+
28
+ [project.urls]
29
+ Homepage = "https://github.com/Atrix21/typetrace"
30
+ Repository = "https://github.com/Atrix21/typetrace"
31
+ Changelog = "https://github.com/Atrix21/typetrace/blob/main/CHANGELOG.md"
32
+
33
+ [tool.hatch.build.targets.wheel]
34
+ packages = ["src/typetrace"]
@@ -0,0 +1,4 @@
1
+ """TypeTrace: local code search plus call graph for AI coding agents (MCP). See `python -m typetrace --help`."""
2
+ from importlib.metadata import version as _version
3
+
4
+ __version__ = _version("typetrace")
@@ -0,0 +1,68 @@
1
+ """
2
+ `typetrace` from PyPI: runs the TypeTrace command-line tool (the npm package `typetrace-cli`, the same version as this
3
+ package) with the Node.js runtime that the `nodejs-wheel-binaries` dependency installs. No separate Node install is
4
+ needed. A Node.js 22.13 or newer already on the PATH is not used, so the version is always the one that was tested.
5
+
6
+ uvx typetrace init . # or: pip install typetrace && typetrace init .
7
+ typetrace query . "where is the session token refreshed?"
8
+
9
+ The MCP entries that `typetrace init` writes start the server the way this package was started (`uvx typetrace==X
10
+ serve ...` under uvx, else this Python environment's `python -m typetrace serve ...`), so they work without Node on
11
+ the PATH.
12
+ """
13
+ from __future__ import annotations
14
+
15
+ import json
16
+ import os
17
+ import shutil
18
+ import sys
19
+ from importlib.metadata import version
20
+
21
+ NPM_PACKAGE = "typetrace-cli"
22
+
23
+
24
+ def _version() -> str:
25
+ return version("typetrace")
26
+
27
+
28
+ def _node_bin_dir() -> str:
29
+ from nodejs_wheel import executable # the bundled Node.js runtime
30
+
31
+ return executable.ROOT_DIR if os.name == "nt" else os.path.join(executable.ROOT_DIR, "bin")
32
+
33
+
34
+ def _launch_command(v: str) -> list[str]:
35
+ """How MCP clients should start the server, mirroring how this package was started."""
36
+ if "archive-v" in sys.prefix and shutil.which("uvx"):
37
+ return ["uvx", f"typetrace=={v}"] # an ephemeral `uvx` environment: never point at its path
38
+ return [sys.executable, "-m", "typetrace"]
39
+
40
+
41
+ def main(argv: list[str] | None = None) -> int:
42
+ args = list(sys.argv[1:] if argv is None else argv)
43
+ v = _version()
44
+ if args[:1] in (["--version"], ["version"]):
45
+ print(v)
46
+ return 0
47
+ from nodejs_wheel import npx
48
+
49
+ bin_dir = _node_bin_dir()
50
+ env = dict(os.environ)
51
+ # The npm package's own entry point is `#!/usr/bin/env node`: put the bundled Node first on the PATH.
52
+ env["PATH"] = bin_dir + os.pathsep + env.get("PATH", "")
53
+ env.setdefault("TYPETRACE_LAUNCH", json.dumps(_launch_command(v)))
54
+ # The Claude Code hook that `init` writes runs on this Node.js too (users of this package may have none on the PATH).
55
+ env.setdefault("TYPETRACE_HOOK_NODE", os.path.join(bin_dir, "node.exe" if os.name == "nt" else "node"))
56
+ try:
57
+ # TYPETRACE_NPM_SPEC (testing, offline installs): another npm package spec, e.g. the path of a packed tarball.
58
+ spec = os.environ.get("TYPETRACE_NPM_SPEC") or f"{NPM_PACKAGE}@{v}"
59
+ return npx(["--yes", "--prefer-offline", "--package", spec, "--", "typetrace", *args], env=env)
60
+ except KeyboardInterrupt:
61
+ return 130
62
+ except FileNotFoundError as e: # pragma: no cover - a broken nodejs-wheel install
63
+ print(f"typetrace: the bundled Node.js runtime is missing ({e}); reinstall: pip install --force-reinstall typetrace", file=sys.stderr)
64
+ return 1
65
+
66
+
67
+ if __name__ == "__main__":
68
+ sys.exit(main())