Skip to content

Commit ffbc697

Browse files
author
Faxbot Agent
committed
p4(api): add POST /admin/marketplace/install stub (gated via ADMIN_MARKETPLACE_REMOTE_INSTALL_ENABLED)
1 parent 310e87f commit ffbc697

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

api/app/routers/admin_marketplace.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,15 @@ def list_plugins():
3737
# Placeholder: will be populated via trait‑aware registry in later PRs
3838
return {"plugins": []}
3939

40+
41+
@router.post("/install")
42+
def install_plugin(payload: Dict[str, Any] | None = None):
43+
"""Remote install a plugin (disabled by default).
44+
45+
Gate with ADMIN_MARKETPLACE_REMOTE_INSTALL_ENABLED=false by default.
46+
"""
47+
remote_enabled = os.getenv("ADMIN_MARKETPLACE_REMOTE_INSTALL_ENABLED", "false").lower() in {"1", "true", "yes"}
48+
if not remote_enabled:
49+
raise HTTPException(503, detail="Remote install disabled")
50+
# Placeholder only; actual implementation will be added later
51+
return {"ok": False, "message": "not_implemented"}

0 commit comments

Comments
 (0)