INNER CODE UNIT · Python
import_local_lab_external_skill
wzn1118/AsteriaAnalyst · backend/app/main.py:403
def import_local_lab_external_skill(payload: LabExternalSkillLocalImportRequest) -> dict[str, object]:
_require_local_skill_installer_enabled()
from app.services.lab_external_skill_service import import_lab_external_skill_from_local_path
try:
return import_lab_external_skill_from_local_path(payload.local_path, mount=payload.mount)
except FileNotFoundError as exc:
raise HTTPException(status_code=404, detail=str(exc)) from exc
except ValueError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc
@app.post("/api/lab/skills/{skill_id}/mount")
def mount_lab_external_skill(skill_id: str) -> dict[str, object]:
_require_local_skill_installer_enabled()
from app.services.lab_external_skill_service import set_lab_external_skill_mounted
try: