Media pane (SPEC_MEDIA_PANE_2026_07_26.md): serve an arbitrary local file
by absolute path, for <img>/<video> display. Deliberately matches
readeditorfile’s existing posture (any absolute path the frontend
sends, gated by OS-level permissions rather than an in-app allowlist —
see the “root scoping, not a sandbox” note on the macOS list_drives in
editor_handlers.rs) so
this route isn’t a stricter one-off next to an already-shipped read path
with the same shape. One request reads at most
STREAM_LOCAL_FILE_MAX_BYTES; a part of a larger file is served.
The file a request names. A container agent’s message may name any path: in the agent’s own pane it is found in
the agent’s own folders and opened from there without following a link (agent_media_files), and what is served is
that open file. Any other pane (or none) reads the path as asked, within the pane’s files:root when it has one.
Parses a single bytes= range (a-b, a-, or the suffix form -n).
Anything this doesn’t understand — another unit, several ranges, b < a,
junk — serves the whole file, which RFC 9110 §14.2 allows a server to do
for any Range it chooses to ignore.