diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 1355428..14b7295 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -11,7 +11,7 @@ { "name": "undo", "description": "Debug and analyze Undo recordings using AI-powered queries", - "source": "./explain/claude_code_plugin", + "source": "./", "category": "development", "version": "1.0.0", "author": { diff --git a/explain/claude_code_plugin/.claude-plugin/plugin.json b/.claude-plugin/plugin.json similarity index 88% rename from explain/claude_code_plugin/.claude-plugin/plugin.json rename to .claude-plugin/plugin.json index e887532..9a268c8 100644 --- a/explain/claude_code_plugin/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -9,7 +9,7 @@ "homepage": "https://github.com/undoio/addons/tree/master/explain", "mcpServers": { "undo-debugger": { - "command": "${CLAUDE_PLUGIN_ROOT}/run.sh", + "command": "${CLAUDE_PLUGIN_ROOT}/explain/claude_code_plugin/run.sh", "args": [] } }, diff --git a/explain/claude_code_plugin/controller.py b/explain/claude_code_plugin/controller.py index bbb138e..551533a 100644 --- a/explain/claude_code_plugin/controller.py +++ b/explain/claude_code_plugin/controller.py @@ -326,6 +326,10 @@ def record(target_command: list[str], recording: Path, force: bool = False) -> i Args: target_command: The command to execute as a list of arguments (e.g., ["./program", "arg1"]). + The first argument for the command MUST be the actual ELF executable to record, not + a shell wrapper or another command. For instance, `["./my_command", "arg1"]` is + valid, but `["timeout", "5", "./my_command", "arg1"]` or `["/bin/sh", "-c", + "./my_command arg1"]` are not). recording: The path where the UDB recording should be saved. force: If False and the recording file already exists, raises an exception asking the user for confirmation. If True, overwrites the existing file without prompting. diff --git a/explain/claude_code_plugin/deps.py b/explain/claude_code_plugin/deps.py index b3fb22e..6856f8f 100644 --- a/explain/claude_code_plugin/deps.py +++ b/explain/claude_code_plugin/deps.py @@ -17,7 +17,10 @@ def ensure_sys_paths() -> None: - deps_dir = xdg_dirs.get_plugin_data_dir() / "packages" + # Use per-Python-version package directories so switching Python versions + # doesn't require reinstalling (each version keeps its own cached packages). + py_version = f"{sys.version_info[0]}.{sys.version_info[1]}" + deps_dir = xdg_dirs.get_plugin_data_dir() / f"packages-{py_version}" sys.path.insert(0, str(deps_dir)) _install_deps(deps_dir)