Module drone_handlers

Module drone_handlers 

Source
Expand description

WSH RPC handlers for the Drone pane (issue #753 Phase 1).

Commands:

  • listdronesVec<DroneDefinition>
  • getdroneOption<DroneDefinition>
  • upsertdroneDroneDefinition (echoed back, normalized)
  • deletedrone{ deleted: bool }
  • rundrone{ run_id: String } (synchronous; SSE streaming added in Phase 1 PR-4)
  • listdronerunsVec<DroneRun>

Run streaming: the executor emits RunEvents over an mpsc channel. Phase 1 of this PR drains the channel server-side and stores the final block-state snapshot in db_drone_runs. A future commit will tee the channel to the renderer via the existing wps event broker so RunPanel shows live per-block status.

Structs§

DeleteDroneReq 🔒
DeleteResp 🔒
GetDroneReq 🔒
ListRunsReq 🔒
RunDroneReq 🔒
RunResp 🔒

Constants§

MAX_LIST_LIMIT 🔒
Hard cap on ListRunsReq.limit — guards against a malicious or buggy client passing e.g. i64::MAX and pulling the entire run history (DoS / memory blow-up). 200 covers any plausible UI page size with headroom; Phase 2 pagination cursor work will move this to client-driven slicing. (kimi P1 on PR #755.)

Functions§

default_limit 🔒
now_ms 🔒
register_drone_handlers