Repository navigation
Expand file tree
/
Copy pathplugins.pyi
More file actions
88 lines (58 loc) · 2.37 KB
/
Copy pathplugins.pyi
File metadata and controls
88 lines (58 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
"""Plugin system - management, capabilities, panels, and settings"""
from collections.abc import Callable
API_VERSION: str = '1.0'
FEATURES: list = ...
def discover() -> object:
"""Discover plugins in the resolved user plugin directory"""
def load(name: str) -> bool:
"""Load plugin"""
def unload(name: str) -> bool:
"""Unload plugin"""
def reload(name: str) -> bool:
"""Reload plugin"""
def load_all() -> object:
"""Load all user-enabled plugins"""
def list_loaded() -> object:
"""List loaded plugins"""
def start_watcher() -> None:
"""Start file watcher"""
def stop_watcher() -> None:
"""Stop file watcher"""
def get_state(name: str) -> object:
"""Get plugin state"""
def get_error(name: str) -> object:
"""Get plugin error"""
def get_traceback(name: str) -> object:
"""Get plugin error traceback"""
def startup_load_status() -> dict:
"""Return a thread-safe snapshot of startup plugin loading"""
def install(url: str, auto_load: bool = True, transport: str = 'archive') -> str:
"""Install from GitHub URL"""
def update(name: str) -> bool:
"""Update plugin"""
def uninstall(name: str) -> bool:
"""Uninstall plugin"""
def search(query: str) -> object:
"""Search plugin registry"""
def install_from_registry(plugin_id: str, version: str = '', auto_load: bool = True, transport: str = 'archive') -> str:
"""Install plugin from registry"""
def check_updates() -> object:
"""Check for plugin updates"""
def register_capability(name: str, handler: Callable, description: str = '', schema: dict | None = None, plugin_name: str | None = None, requires_gui: bool = True) -> None:
"""
Register a capability (handler signature: def handler(args: dict, ctx: PluginContext) -> dict)
"""
def unregister_capability(name: str) -> bool:
"""Unregister a capability"""
def invoke(name: str, args: dict = {}) -> object:
"""Invoke a capability by name"""
def has_capability(name: str) -> bool:
"""Check if a capability is registered"""
def list_capabilities() -> list:
"""List all registered capabilities"""
def settings(plugin_name: str) -> object:
"""Get settings object for a plugin"""
def data_dir(plugin_name: str) -> str:
"""Return the plugin's durable data directory, creating it if missing"""
def create(name: str) -> str:
"""Create a new plugin from template (returns path to created plugin)"""