doctracker 0.3.0__tar.gz → 0.3.1__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.
- {doctracker-0.3.0 → doctracker-0.3.1}/PKG-INFO +1 -1
- {doctracker-0.3.0 → doctracker-0.3.1}/pyproject.toml +1 -1
- {doctracker-0.3.0 → doctracker-0.3.1}/pyproject.toml.orig +1 -1
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/cli.py +5 -3
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/integrations/claude_code.py +11 -9
- {doctracker-0.3.0 → doctracker-0.3.1}/LICENSE +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/README.md +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/__main__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/config.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/embeddings/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/embeddings/downloads.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/embeddings/llama_cpp.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/embeddings/service.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/extraction/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/extraction/graph.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/extraction/griffe_loader.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/graph/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/graph/model.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/history/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/history/git_log.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/history/working.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/integrations/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/integrations/opencode.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/integrations/opencode_plugin.js +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/notes/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/notes/commit_flow.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/notes/context.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/notes/store.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/search/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/search/engine.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/server/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/server/app.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/server/guide.md +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/server/guide.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/server/hooks.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/server/note_tools.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/server/state.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/server/tools.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/server/watcher.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/server/web.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/storage/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/storage/index.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/__init__.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/pages.py +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/cytoscape-LICENSE.txt +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/cytoscape.min.js +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/dagre-LICENSE.txt +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/dagre.min.js +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/graph.js +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/htmx-LICENSE.txt +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/htmx.min.js +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/abc.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/alert-triangle.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/arrows-exchange.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/binary-tree.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/box.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/braces.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/brand-python.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/check.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/checkbox.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/clock.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/file-code.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/file.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/flag.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/folder-open.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/folder.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/git-branch.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/help-circle.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/math-function.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/notebook.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/numbers.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/package.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/pencil.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/point.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/puzzle.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/sitemap.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/square-check.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/tabler-icons-LICENSE.txt +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/trash.svg +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/live.js +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/style.css +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/architecture.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/base.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/calls.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/classes.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/entity.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/fragment.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/fragment_content.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/git.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/git_commit.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/header.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/loading.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/macros.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/members.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/module.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/not_found.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/notes.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/notes_cards.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/notes_form.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/notes_head.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/notes_tree.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/search.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/source.html +0 -0
- {doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/templates/tree.html +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: doctracker
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: MCP server that centralizes the documentation of Python projects developed with LLM agents.
|
|
5
5
|
Author: Carlos Filipe de Castro Lemos
|
|
6
6
|
Author-email: Carlos Filipe de Castro Lemos <carlos.lemos.dev@gmail.com>
|
|
@@ -71,7 +71,8 @@ def start(host: str | None, port: int | None) -> None:
|
|
|
71
71
|
|
|
72
72
|
@main.command(hidden=True)
|
|
73
73
|
@click.argument("event")
|
|
74
|
-
|
|
74
|
+
@click.option("--url", help="Address of the server, as `start` wrote it; by default the one in the configuration.")
|
|
75
|
+
def hook(event: str, url: str | None) -> None:
|
|
75
76
|
"""Answer a Claude Code hook: read its event on stdin, print the context of that moment.
|
|
76
77
|
|
|
77
78
|
\f
|
|
@@ -79,6 +80,7 @@ def hook(event: str) -> None:
|
|
|
79
80
|
|
|
80
81
|
Args:
|
|
81
82
|
event: The Claude Code event the hook was set for (the event's own name is read from stdin).
|
|
83
|
+
url: The server, e.g. `http://127.0.0.1:8765`; None reads it from the configuration.
|
|
82
84
|
"""
|
|
83
85
|
try:
|
|
84
86
|
received = json.loads(sys.stdin.read() or "{}")
|
|
@@ -86,7 +88,7 @@ def hook(event: str) -> None:
|
|
|
86
88
|
project_root = Path(received.get("cwd") or Path.cwd())
|
|
87
89
|
if not (project_root / CONFIG_PATH).exists():
|
|
88
90
|
return
|
|
89
|
-
reply = claude_code.answer(received, _base_url(load_config(project_root)))
|
|
91
|
+
reply = claude_code.answer(received, url or _base_url(load_config(project_root)))
|
|
90
92
|
except (OSError, ValueError):
|
|
91
93
|
return
|
|
92
94
|
if reply:
|
|
@@ -119,7 +121,7 @@ def _write_integrations(project_root: Path, config: Config) -> None:
|
|
|
119
121
|
project_root: Root of the project.
|
|
120
122
|
config: The configuration, for the server's address.
|
|
121
123
|
"""
|
|
122
|
-
settings = claude_code.write_settings(project_root)
|
|
124
|
+
settings = claude_code.write_settings(project_root, _base_url(config))
|
|
123
125
|
click.echo(f"Claude Code hooks: {settings.relative_to(project_root).as_posix()}")
|
|
124
126
|
if opencode.uses_opencode(project_root):
|
|
125
127
|
plugin = opencode.write_plugin(project_root, _base_url(config))
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""Claude Code integration: the hooks that give doctracker's context to the agent, and their settings.
|
|
2
2
|
|
|
3
3
|
`doctracker init` and `doctracker start` write the hooks into the project's
|
|
4
|
-
`.claude/settings.local.json` (local, never committed). Each hook runs `doctracker hook <event
|
|
5
|
-
which reads the event Claude Code sends, asks the running server for the
|
|
6
|
-
(`/hooks/context/...`) and answers it as `additionalContext`.
|
|
4
|
+
`.claude/settings.local.json` (local, never committed). Each hook runs `doctracker hook <event>`
|
|
5
|
+
with the server's address, which reads the event Claude Code sends, asks the running server for the
|
|
6
|
+
context of that moment (`/hooks/context/...`) and answers it as `additionalContext`.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
import json
|
|
@@ -79,28 +79,30 @@ def _ask(base_url: str, kind: str, session: str, once: bool, path: str = "") ->
|
|
|
79
79
|
return None
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
def hook_command(event: str) -> str:
|
|
83
|
-
"""The command a hook runs: this environment's doctracker, by its absolute path.
|
|
82
|
+
def hook_command(event: str, base_url: str) -> str:
|
|
83
|
+
"""The command a hook runs: this environment's doctracker, by its absolute path, with the server's address.
|
|
84
84
|
|
|
85
85
|
Args:
|
|
86
86
|
event: The Claude Code event.
|
|
87
|
+
base_url: The doctracker server, e.g. `http://127.0.0.1:8765`.
|
|
87
88
|
|
|
88
89
|
Returns:
|
|
89
90
|
The command line, with the program quoted (paths may have spaces).
|
|
90
91
|
"""
|
|
91
92
|
program = shutil.which("doctracker", path=str(Path(sys.executable).parent))
|
|
92
93
|
command = f'"{Path(program).as_posix()}"' if program else f'"{Path(sys.executable).as_posix()}" -m doctracker'
|
|
93
|
-
return f
|
|
94
|
+
return f'{command} hook {event} --url "{base_url}"'
|
|
94
95
|
|
|
95
96
|
|
|
96
|
-
def write_settings(project_root: Path) -> Path:
|
|
97
|
+
def write_settings(project_root: Path, base_url: str) -> Path:
|
|
97
98
|
"""Write doctracker's hooks into `.claude/settings.local.json` and switch Claude Code's own memory off.
|
|
98
99
|
|
|
99
100
|
The file's other settings and hooks are kept; doctracker's own hooks (those running
|
|
100
|
-
`doctracker hook`) are replaced, so writing again only refreshes them.
|
|
101
|
+
`doctracker hook`) are replaced, so writing again only refreshes them (e.g. after a port change).
|
|
101
102
|
|
|
102
103
|
Args:
|
|
103
104
|
project_root: Root of the project.
|
|
105
|
+
base_url: The doctracker server the hooks ask, e.g. `http://127.0.0.1:8765`.
|
|
104
106
|
|
|
105
107
|
Returns:
|
|
106
108
|
The settings file.
|
|
@@ -110,7 +112,7 @@ def write_settings(project_root: Path) -> Path:
|
|
|
110
112
|
hooks = settings.setdefault("hooks", {})
|
|
111
113
|
for event, matcher in HOOKS.items():
|
|
112
114
|
groups = [group for group in hooks.get(event, []) if not _is_ours(group)]
|
|
113
|
-
ours = {"hooks": [{"type": "command", "command": hook_command(event), "timeout": HOOK_TIMEOUT}]}
|
|
115
|
+
ours = {"hooks": [{"type": "command", "command": hook_command(event, base_url), "timeout": HOOK_TIMEOUT}]}
|
|
114
116
|
groups.append({"matcher": matcher, **ours} if matcher else ours)
|
|
115
117
|
hooks[event] = groups
|
|
116
118
|
settings["autoMemoryEnabled"] = False
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{doctracker-0.3.0 → doctracker-0.3.1}/src/doctracker/wiki/static/icons/tabler-icons-LICENSE.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|