-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathskill_runtime_bootstrap.py
More file actions
34 lines (28 loc) · 1.36 KB
/
Copy pathskill_runtime_bootstrap.py
File metadata and controls
34 lines (28 loc) · 1.36 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
from __future__ import annotations
import importlib.util
from pathlib import Path
def _load_skill_runtime_bootstrap_module():
module_path = Path(__file__).resolve().parent / "scripts" / "skill_runtime_bootstrap.py"
spec = importlib.util.spec_from_file_location("scripts.skill_runtime_bootstrap", module_path)
if spec is None or spec.loader is None:
raise ImportError(f"Unable to load skill runtime bootstrap from {module_path}")
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module
_SKILL_RUNTIME_BOOTSTRAP = _load_skill_runtime_bootstrap_module()
arm_cli_timeout = _SKILL_RUNTIME_BOOTSTRAP.arm_cli_timeout
load_local_skill_module = _SKILL_RUNTIME_BOOTSTRAP.load_local_skill_module
load_repo_module_from_skill_script = _SKILL_RUNTIME_BOOTSTRAP.load_repo_module_from_skill_script
refuse_foreign_entrypoint = _SKILL_RUNTIME_BOOTSTRAP.refuse_foreign_entrypoint
repo_root_from_skill_script = _SKILL_RUNTIME_BOOTSTRAP.repo_root_from_skill_script
require_repo_local_helper = _SKILL_RUNTIME_BOOTSTRAP.require_repo_local_helper
run_adapter_cli = _SKILL_RUNTIME_BOOTSTRAP.run_adapter_cli
__all__ = [
"arm_cli_timeout",
"load_local_skill_module",
"load_repo_module_from_skill_script",
"refuse_foreign_entrypoint",
"repo_root_from_skill_script",
"require_repo_local_helper",
"run_adapter_cli",
]