Commit Graph

178 Commits

Author SHA1 Message Date
alan 13c4035175 fix(turns): keep the run task in every stage's input
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'.
2026-10-31 02:52:16 +00:00
alan 498c6f17a6 Add server notification settings with app checkboxes
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.
2026-10-30 21:36:27 +00:00
alan 39d9150c3a Merge branch 'worktree-agent-ae487572986d7a387' into integrate/chat-ntfy-attachments 2026-10-30 21:05:32 +00:00
alan 8c421952db feat(chat): show sent images as thumbnails with a full-screen viewer
Operator-attached images render as rounded thumbnails above the user
bubble and open a zoomable Material/Cupertino viewer. Inline data: URIs
decode locally; file:// attachment-store URIs load through the new
chat_attachment_image websocket request, which serves only regular image
files directly inside the private attachment store (os.Root, <= 4 MiB,
sniffed raster types). Missing files show an 'Image no longer available'
placeholder; other files keep the file row.
2026-10-30 20:53:03 +00:00
alan 40ba2ac117 Open ntfy notifications in the app and notify chats that need the operator
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.
2026-10-30 20:40:06 +00:00
alan 6d430948a6 feat(chat): per-chat permission modes for Claude, Codex and OpenCode 2026-10-24 18:16:10 +01:00
alan 67c80ffb11 merge: land chat-adopt-claude 2026-10-23 22:09:46 +01:00
alan 5a65526d29 feat(chat): chat-adopt finds Claude Code and Codex sessions, not only OpenCode 2026-10-23 22:03:08 +01:00
alan 8527506da1 chore: remove the JavaScript web client and the Kotlin Android app; the Flutter app replaces both 2026-10-23 21:46:58 +01:00
alan e507f554c3 feat(chat): files upload over HTTP before the prompt, up to 100 MiB each 2026-10-23 21:25:41 +01:00
alan 0acd7346bb feat(chat): add Claude Code chat backend 2026-10-22 18:20:10 +01:00
alan 22801a9b06 fix(stage): align session export render cap with artifact bound
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.
2026-10-21 15:26:29 +01:00
alan 184ce78b65 fix(notify): resolve web links for transactional outbox deliveries 2026-10-21 13:16:20 +01:00
alan 9ee2e003bf fix(notify): open configured web run pages from ntfy 2026-10-21 13:05:10 +01:00
alan fe02d153f1 Preserve saved schedule run-level write scope 2026-10-21 01:04:43 +01:00
alan 8c3f116190 Bind legacy schedule workspaces only at execution startup 2026-10-21 00:56:37 +01:00
alan 4d8b34939d Separate saved run schedules from pipeline definitions 2026-10-21 00:48:34 +01:00
alan ce3482b057 Expose native OpenCode chat usage snapshots and replay session metrics
Read V2 session accounting, latest assistant prompt/cache components and native request-to-stream boundary. Resolve capacity by location/provider/catalog id with bounded metadata caching. Coalesce active/final readbacks; retain message-less session snapshots without changing admission or compaction state.

Provenance: https://opencode.ai/v2/openapi.json and anomalyco/opencode V2 4617210822bdbb31e5749751afbfb4584ccedac8: packages/schema/src/token-usage.ts, session-event.ts; packages/core/src/session/usage.ts, projector.ts, message-updater.ts, runner/step.ts. Native output is visible output, reasoning separate. Session totals include all five non-overlapping components. Generation rate uses created-to-streamed, not tool-inclusive completion.

Limitations: metrics remain unknown for missing components, absent timing/model metadata, reads beyond bounded latest-message/catalog budgets, or context preceding compaction. No local pricing, token estimation or default capacity. V1 gets no invented cumulative metrics; older V2 events remain available when readback is unavailable. No deployment or protocol/web/docs changes.

Checks: go test ./...; focused usage/stream race tests; go vet ./internal/opencode ./internal/server; go build ./...; git diff --check.
2026-10-21 00:13:51 +01:00
alan 724de27561 feat(stage): honor per-stage reasoning effort across native harnesses 2026-10-20 23:51:14 +01:00
alan 4969d667b3 Expose native chat compaction activity and retained replay 2026-10-20 22:17:41 +01:00
alan e29be1181f fix(audit): reserve bounded repair capacity outside user file quota 2026-10-20 22:00:43 +01:00
alan d3c7e6e784 fix: allow cold managed service discovery only at stage admission 2026-10-20 21:53:52 +01:00
alan bb98bde4fc fix: pin native exports to stage execution service 2026-10-20 21:47:04 +01:00
alan d58b3f49fc Add generic checked starter workflows and isolated lifecycle coverage 2026-10-20 21:31:36 +01:00
alan b56d6af180 fix(audit): reserve recovery evidence outside user deliverables 2026-10-20 21:26:48 +01:00
alan 860615acb5 test(audit): verify wrong-session rejection through isolated V2 API 2026-10-20 21:22:37 +01:00
alan ec3eda9e05 runner: keep export handoffs nonterminal through recovery 2026-10-20 21:20:06 +01:00
alan ca78b24f47 fix(audit): expose verified visit exports and export-only recovery 2026-10-20 21:20:06 +01:00
alan f87e1ed488 runner: gate stage handoff on settled verified session export 2026-10-20 20:55:57 +01:00
alan cb57da5dfc fix(stage): persist every V2 model generation in tracked sessions 2026-10-20 20:43:42 +01:00
alan d564765ca5 fix(codex): reconcile cold connections without resuming queued goals 2026-10-20 18:33:20 +01:00
alan 34939edd0e Render run list miniatures from compact per-stage route evidence 2026-10-20 18:22:13 +01:00
alan 855de19a35 test(chat): require interactive tool parity across advertised harnesses 2026-10-20 18:12:59 +01:00
alan 68761652cf fix(codex): accept prepared chat attachments with model overrides 2026-10-20 18:07:00 +01:00
alan 9cdfd9d9ab search: browse bounded recent items with kind-only queries 2026-10-20 17:54:55 +01:00
alan 35329e4022 feat(chat): broker Codex approvals and complete typed tool interactions 2026-10-20 17:41:35 +01:00
alan c78def70dd fix(chat): recover web approvals and questions across clients and reconnects 2026-10-20 17:23:07 +01:00
alan ed0abb976d feat(chat): persist safe Codex next-turn model selection 2026-10-20 16:35:31 +01:00
alan d92fa60259 fix: park human runs atomically before slow notification work 2026-10-20 16:35:30 +01:00
alan a049b552f6 Recover incomplete session exports through durable runtime jobs 2026-10-20 16:30:04 +01:00
alan 6841cdd2a4 web: unify mobile back and audit controls and link pipeline run history 2026-10-20 16:25:07 +01:00
alan 4e35da7473 fix: stop store-bound workers and reconcile settled repair fixtures 2026-10-20 16:19:21 +01:00
alan fdf0369ede Enforce runtime report contracts and recoverable session exports 2026-10-20 16:05:33 +01:00
alan 1d9cb80cdb web: keep mobile composition stable across keyboard and Back navigation 2026-10-20 16:04:09 +01:00
alan 90cd43bdd7 fix: commit run notification intents with state transitions 2026-10-20 15:56:42 +01:00
alan f0532e5ec4 test: exercise managed model dialogs and intermediate chat steps in Chrome 2026-10-20 15:53:59 +01:00
alan b96b9d94a6 fix: keep cancellation pending until execution cleanup is confirmed 2026-10-20 15:49:08 +01:00
alan e504780976 fix(chat): settle authoritative turns and make capabilities explicit 2026-10-20 15:45:44 +01:00
alan 016fcb552a fix: persist and retry run alerts and honor notification modes 2026-10-20 15:44:23 +01:00
alan e4f48ecbb1 test: verify lost launch replies and reload recovery in a scratch browser 2026-10-20 15:44:23 +01:00