Files
pipelines/docs/notes/background-task-output-api.md
T

25 lines
1.5 KiB
Markdown

# Background task output API
Changed: 2026-10-18. The chat websocket now has `chat_shells` for current,
operator-session-owned running shells and `chat_shell_output` for a selected,
bounded (64 KiB) absolute-byte output page. Ownership requires both the
operator-session registry and provider shell metadata `sessionID`; a shared cwd
is not evidence. Output reads first verify provider detail and explicitly mark
removed/provider-unavailable shells unavailable. This is not completed-task
history or restart retention.
Stale shared documentation: the packaged OpenCode operational references under
`internal/author/skill/references/` need a later docs-fold update describing the
two additive websocket messages, 64 KiB maximum page, and current-only history.
Fixture evidence (2026-10-18): `go build -o /tmp/pipelines-large-chat-fixture-stage
./cmd/pipelines-large-chat-fixture`; then `/tmp/pipelines-large-chat-fixture-stage
-scratch-dir /var/folders/jp/q0qvjyg54fl_c5vhhk1ylz2m0000gn/T/pipelines-shell-fixture-pxnc95h2
-shell-exited`, stopped with SIGTERM. The foreground run exercised authenticated
`chat_sessions`, three reconnecting history pages, `chat_shells`, and bounded
`chat_shell_output` readback against scratch DB/workspace only, and exited 0 after
clean shutdown. Recorded revision `fd4c329eafc46d1ce32dc9bc36fd9bd09b34e058`,
session `ses_large_chat_fixture`, shell `sh_large_chat_fixture`, and fixed marker
`fixture shell output marker\n`. The selected exited shell is read directly by id;
the current list remains running-shell discovery.