Send To Session
Pipe one line of operator input into session_id's stdin.
The send-bar tile on the dashboard POSTs {"text": "..."} here; we forward through :func:bernstein.core.agents.agent_ipc.send_message, which writes the line into the agent's registered stdin pipe.
Args: session_id: Slug-shaped session id; must pass the same validator as the peek endpoint. request: FastAPI request (unused beyond routing-level checks but present so the bearer-auth middleware sees the same shape as our other mutating routes). payload: JSON body with a single text field. Empty / missing text is rejected with 400; oversize payloads above :data:MAX_SEND_BYTES are rejected with 413.
Returns: JSON envelope with session_id and delivered (True if the line reached a registered stdin pipe, False if no pipe is registered for this session). The 200/404 split lets the front-end keep the input enabled but warn the operator when the agent has no live pipe yet.
Path parameters
Request body
Response
Successful Response