Rewrite the README around the server, web/Android app and CLI, and
replace docs/install.md with the current native install (all-or-nothing
Docker web build, flags from setup-native.py, lifecycle commands, data
locations, password, upgrading). Add docs/harnesses.md and
docs/notifications.md; point ntfy.md at the new overview and fix its
topic name.
Server: list_directory returns a directory_listing (path, home, parent,
entries with is_dir/is_git_repo/hidden, truncated) confined to the server
user's home subtree after cleaning and resolving symlinks, refusing pseudo
filesystems and capping entries at 2000. Documented in docs/cli.md.
App: "Choose folder…" in the create dialog opens a picker (full-screen page
on phones, large dialog on wide windows, Material and Cupertino) with
breadcrumbs, filter, Show hidden, git badges, dimmed files, recent folders,
inline errors and "Start chat here". The probe app gains a folder fixture
for captures.
Claude Code (stream-json stdin) and Codex (turn/steer pinned to the active
turn) receive a prompt sent while a turn runs immediately. Other harnesses
(OpenCode) get a durable chat_prompt_queue row owned by the session: it
survives the last client detaching and a server restart, is delivered in
order when the turn ends with or without a client, and is deduplicated by
operation id. chat_subscribe carries the queue, chat_queue frames report
delivered/removed/failed changes, and chat_unqueue removes a waiting prompt.
An exhausted export recovery job left its run parked forever in the
export wait, reserving the workspace and refusing later scheduled runs
(runs 221/226: OpenCode sessions above the 8 MiB export bound are
always truncated, so every retry stays partial).
A gate is now releasable when its job is exhausted: the visit keeps its
partial/unavailable evidence and diagnostic (still repairable), the run
continues to its next stage or terminal, and the workspace is freed.
Gates older than 15 minutes with a pending, lease-expired or missing job
are exhausted by a bounded wait. The worker reconciles on its first
tick after startup and every 30 seconds, so existing wedged runs recover
after a restart. Truncation diagnostics now name the size bound.
Record every notification published to ntfy (run outbox, stage notify
hooks, chat question/approval/reply) in a persisted app_notifications
outbox and stream it to subscribe_notifications clients with an after
cursor; clear_notifications and ack_attention clear across devices, as do
runs leaving waiting, deleted runs and answered chat questions. Add the
notify.ntfy_enabled setting (default on) to stop only the ntfy publish.
Every run summary carries size_bytes (artifact tree, server-created Pi
session directories and an estimate of the run's database rows), cached in
pipeline_runs.size_bytes, invalidated by triggers, measured when a run
finishes and backfilled in the background. delete_runs removes terminal
runs with every scoped row and server-owned file, refuses active ones with
a reason, and pushes runs_removed to subscribers. pipelines runs rm is the
CLI form; retention apply now shares the complete row deletion.
Auto runs no longer alert on failure or success; only notify_mode on does,
unless the run_finished setting (now 'Notify when any run ends', default off)
opts into every run end. Waiting still notifies auto and on runs. The setting
is stored under a new key so a value saved under the old meaning is ignored.
When canonical main is not an ancestor of the item HEAD, the gate now
merges main into the item workspace under the delivery lock, re-runs the
declared checks on the merged commit, and fast-forwards main to it. A
conflicting merge is aborted with the workspace verified unchanged and a
diagnostic naming the files. Successful catch-ups are logged.
Later visits' input.md held only the previous stage's output, so the
operator's task reached only the first stage; when a Prepare stage
summarised (paths, HEAD), Code never saw the task or its acceptance
checklist and either blocked (run #202) or did part of it (#195, #197,
#198). Later inputs now carry the run prompt under '# Run task' (headings
demoted) before '# Previous turn output'.
Persist three global ntfy switches in server_settings: run_finished
(default on: auto-mode runs notify on success, read inside the
transition transaction; on/off modes unchanged), chat_needs_you
(default on: gates chat question/approval alerts) and
chat_reply_finished (default off: one alert per finished assistant
turn). Expose notification_settings / set_notification_settings over
the websocket protocol, add a Phone notifications section with
Material and Cupertino checkboxes in Settings, document the settings,
and keep the cli, tui, stage and pipeline test packages from
inheriting a real ntfy configuration.
Run notifications now always click through to pipelines://run/<id>; a valid
PIPELINES_WEB_PUBLIC_URL adds an "Open in browser" ntfy view action instead
of replacing the click. Queued rows derive links from the run id at delivery,
so legacy rows holding a web URL still open the app.
Unresolved chat questions/forms and permission requests publish one async,
bounded notification to the system destination (pipelines://chat/<id> plus the
browser action), deduplicated per form/request id across reconnects and
replays. stage.PublishNtfy gains optional, strictly validated view actions.
Server tests now clear the operator's real ntfy environment.
Six computed Flutter runs stopped at the export handoff gate because the
rendered session.html cap was 2 MiB while their complete sessions (well inside
the 8 MiB source read bound) rendered between 2.25 and 4.28 MiB once html
escaping and the readable projection duplicated native text.
Raise SessionExportFileLimit to 8 MiB, the server's existing per-artifact file
bound, so a complete export is still listed and served. Normal export
verification, versioned repair and the handoff gate keep using the single
shared constant. The source read bound is unchanged, and an over-cap render is
still visibly truncated and recorded partial.
Add focused regressions for a complete export above the old cap, an over-new-cap
file rejected as partial, repair above the old cap leaving original evidence
untouched, the gate accepting the larger repair, and the constant staying inside
the artifact file bound. Update the artifact, handoff-gate and operations docs
and record the diagnosis in docs/notes/session-export-render-cap.md.
Read OpenCode V2's resolved default Model.Info through its authenticated CLI API from HOME when saved profile fields are missing. Preserve valid saved models, explicit --model and unrelated settings. Record the selected stage model in the native server environment so web starters have an actual default.
Run the existing read-only model picker inside ./install when a terminal needs a choice; fail noninteractive or cancelled/incomplete setup before claiming ready or starting services. Do not parse JSONC, open login flows, create sessions or run inference. Document the one-step configuration path.
Checks: 61 mocked native installer/lifecycle tests, 8 entrypoint tests, sh -n install install.sh, git diff --check. API/schema checked against official OpenCode V2 documentation. No operator CLI/service/model calls, live install, restart, deployment or native Linux verification.
Select native installs only via explicit PIPELINES_PREFIX or the matching owned prefix/bin/pipelines executable. Route enable/status/disable to the existing native supervisor; validate registration ownership, label and command, keep preview read-only, and disable login registration before stopping. Never fall back to a standalone service for an invalid explicit prefix.
Fresh native installs explicitly enable authoring, while reinstalls preserve false or missing legacy role settings. Add explicit --allow-authoring/--no-authoring overrides and pass the server flag only for manifest true. Print a copyable native enable command and update installation help/docs. No Docker configuration changes.
Checks: 54 mocked native installer/lifecycle tests; 8 entrypoint tests; offline Go installation/CLI tests and vet; gofmt clean; shell syntax and diff checks. No live install, restart, deployment, permission/config changes, or native Linux verification.
Register the existing native supervisor with launchd/systemd, include the dependency-free authenticated web proxy, detect Node, and keep the API loopback by default. Preserve existing web credentials and configured host harness defaults. Clarify single-step setup, lifecycle selection, and optional ntfy limits.
Checks: 44 mocked native installer/lifecycle tests; 8 entrypoint tests; 42 Docker installer tests; GOPROXY=off GOTOOLCHAIN=local go test ./internal/installation ./cmd/pipelines; sh -n install install.sh; git diff --check. No live install, deployment, restart, downloads, real autostart/login verification or native Linux verification.