|
1 | 1 | """Installed plugins management for OpenHands SDK. |
2 | 2 |
|
3 | 3 | This module provides utilities for managing plugins installed in the user's |
4 | | -home directory (~/.openhands/skills/installed/). It supports: |
| 4 | +home directory (~/.openhands/plugins/installed/). It supports: |
5 | 5 |
|
6 | 6 | - Installing plugins from GitHub repositories, git URLs, or local paths |
7 | 7 | - Listing installed plugins with their metadata |
8 | 8 | - Uninstalling plugins by name |
9 | 9 | - Loading all installed plugins |
10 | 10 |
|
11 | 11 | The installed plugins directory structure follows the Claude Code pattern: |
12 | | - ~/.openhands/skills/installed/ |
| 12 | + ~/.openhands/plugins/installed/ |
13 | 13 | ├── plugin-name-1/ |
14 | 14 | │ ├── .plugin/ |
15 | 15 | │ │ └── plugin.json |
|
62 | 62 | logger = get_logger(__name__) |
63 | 63 |
|
64 | 64 | # Default directory for installed plugins |
65 | | -DEFAULT_INSTALLED_PLUGINS_DIR = Path.home() / ".openhands" / "skills" / "installed" |
| 65 | +DEFAULT_INSTALLED_PLUGINS_DIR = Path.home() / ".openhands" / "plugins" / "installed" |
66 | 66 |
|
67 | 67 | # Metadata file for tracking installed plugins |
68 | 68 | INSTALLED_METADATA_FILE = ".installed.json" |
@@ -161,7 +161,7 @@ def get_installed_plugins_dir() -> Path: |
161 | 161 | """Get the directory for installed plugins. |
162 | 162 |
|
163 | 163 | Returns: |
164 | | - Path to ~/.openhands/skills/installed/ |
| 164 | + Path to ~/.openhands/plugins/installed/ |
165 | 165 | """ |
166 | 166 | return DEFAULT_INSTALLED_PLUGINS_DIR |
167 | 167 |
|
@@ -205,7 +205,7 @@ def install_plugin( |
205 | 205 | ref: Optional branch, tag, or commit to install. |
206 | 206 | repo_path: Subdirectory path within the repository (for monorepos). |
207 | 207 | installed_dir: Directory for installed plugins. |
208 | | - Defaults to ~/.openhands/skills/installed/ |
| 208 | + Defaults to ~/.openhands/plugins/installed/ |
209 | 209 | force: If True, overwrite existing installation. If False, raise error |
210 | 210 | if plugin is already installed. |
211 | 211 |
|
@@ -286,7 +286,7 @@ def uninstall_plugin( |
286 | 286 | Args: |
287 | 287 | name: Name of the plugin to uninstall. |
288 | 288 | installed_dir: Directory for installed plugins. |
289 | | - Defaults to ~/.openhands/skills/installed/ |
| 289 | + Defaults to ~/.openhands/plugins/installed/ |
290 | 290 |
|
291 | 291 | Returns: |
292 | 292 | True if the plugin was uninstalled, False if it wasn't installed. |
@@ -334,7 +334,7 @@ def list_installed_plugins( |
334 | 334 |
|
335 | 335 | Args: |
336 | 336 | installed_dir: Directory for installed plugins. |
337 | | - Defaults to ~/.openhands/skills/installed/ |
| 337 | + Defaults to ~/.openhands/plugins/installed/ |
338 | 338 |
|
339 | 339 | Returns: |
340 | 340 | List of InstalledPluginInfo for each installed plugin. |
@@ -427,7 +427,7 @@ def load_installed_plugins( |
427 | 427 |
|
428 | 428 | Args: |
429 | 429 | installed_dir: Directory for installed plugins. |
430 | | - Defaults to ~/.openhands/skills/installed/ |
| 430 | + Defaults to ~/.openhands/plugins/installed/ |
431 | 431 |
|
432 | 432 | Returns: |
433 | 433 | List of loaded Plugin objects. |
@@ -455,7 +455,7 @@ def get_installed_plugin( |
455 | 455 | Args: |
456 | 456 | name: Name of the plugin to look up. |
457 | 457 | installed_dir: Directory for installed plugins. |
458 | | - Defaults to ~/.openhands/skills/installed/ |
| 458 | + Defaults to ~/.openhands/plugins/installed/ |
459 | 459 |
|
460 | 460 | Returns: |
461 | 461 | InstalledPluginInfo if the plugin is installed, None otherwise. |
@@ -496,7 +496,7 @@ def update_plugin( |
496 | 496 | Args: |
497 | 497 | name: Name of the plugin to update. |
498 | 498 | installed_dir: Directory for installed plugins. |
499 | | - Defaults to ~/.openhands/skills/installed/ |
| 499 | + Defaults to ~/.openhands/plugins/installed/ |
500 | 500 |
|
501 | 501 | Returns: |
502 | 502 | Updated InstalledPluginInfo if successful, None if plugin not installed. |
|
0 commit comments