feat(ne): add managed NE read-only exec API

Add a guarded managed-ne exec endpoint for oclaw ops tools to login managed devices and run read-only CLI safely.
Include request schema and unit tests for command guardrails and execution flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-28 22:12:50 +08:00
parent dc17f9d15a
commit 981347b5b1
4 changed files with 208 additions and 1 deletions

View file

@ -109,6 +109,14 @@ class ConnectTestRequest(BaseModel):
ids: list[str] = Field(min_length=1)
class ManagedNeExecRequest(BaseModel):
"""Run read-only show/display CLI on a managed NE (oclaw ops integration)."""
ne_id: str
commands: list[str] = Field(min_length=1, max_length=5)
read_timeout_sec: int | None = Field(default=None, ge=10, le=120)
class HopProxyConfig(BaseModel):
"""Shared jump-host (proxy) settings applied to one or many NEs."""