Peek Session
Return the recent stream-tail entries for session_id.
Args: session_id: Bernstein session whose tail to read. request: FastAPI request - used to resolve the workdir and the tail query argument.
Returns: JSON envelope with session_id plus a tail list of {ts, surface, text} entries in chronological order. An empty list signals "buffer not initialised yet" rather than an error so the polling page renders a blank pane while it waits.
get/sessions/{session_id}/peek
Path parameters
session_idstring required
Response
Successful Response
{"stackTrail":"paths:/sessions/{session_id}/peek:get:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}