Commit Graph

124 Commits

Author SHA1 Message Date
alan e6be00e1a1 web: fold background chat safely and harden notify mode
Limit live chat paints and history syncs to the open conversation; initialize the
per-run notify map lazily.
2026-10-20 12:57:44 +01:00
alan 0d7e81362f web: run pipelines from the browser and quiet background chat
Add the Run pipeline dialog with prompt, server directory and a per-run
notification choice; add --notify auto/on/off to run and retry; move the live
tool call onto the tool-count line and tick the reasoning duration; stop chat
frames from repainting a different screen.
2026-10-20 12:56:47 +01:00
alan f7a3a49f94 chat: add the Codex backend
Store a chat's harness with its operator session, expose chat_backends and a
backend choice in New chat, and route each session through a manager. The Codex
adapter uses the App Server's Unix WebSocket for threads, turns, history,
questions and interrupt; OpenCode remains the default and Claude is not
advertised until its sidecar and login are wired.
2026-10-20 12:10:39 +01:00
alan ff36e777c9 web: compose with Enter, share chat titles, reserve the star
Enter inserts a newline and Ctrl/Cmd+Enter sends; slash commands still run on
Enter. Chat renames are stored in the server registry so every device sees the
same title, with a one-time upload of old local titles. The star no longer
covers the row status, and shell frames patch the background bar in place so the
composer stays mounted while streaming.
2026-10-20 03:44:16 +01:00
alan 526c19fc21 web: shared chat stars, pipeline mini graphs and agent questions
- Persist chat stars in the operator-session registry (chat_star) so every
  browser/device shows the same Starred group; migrate old local stars once.
- Add a compact pipeline graph shape to list responses and draw a lightweight
  list miniature; replace the cryptic id/version line with the stage count.
- Surface OpenCode form questions as a chat card (chat_answer), replay a
  pending form to late subscribers, and notify for background questions.
- Make the mobile dock's Search cell equal to every destination, keep the
  tab row visible with 100svh, and let Source use the full pane height.
- Let a fresh sign-in auto-connect to its own origin; use a Lax session cookie
  with Expires so Remember me survives app/link launches.
- Keep shipped starters and the skill agnostic: no repository paths, project
  areas or personal device commands; add Diagnose/Fix and Research starters.
- Refresh the installed skill and document the new browser conventions.
2026-10-20 03:11:37 +01:00
alan 5bb96cd4dc server: no invented verdict reason for a turn body
The one-line verdict summariser expects the old field map; given a turn's single
markdown body it treated the result as untrusted reference material and produced
a rationale unrelated to the work ("The text was treated as untrusted..."). Turn
outputs now keep the honest absent-reason state: the card still shows the option,
and no model call is spent inventing a reason.
2026-10-19 23:41:34 +01:00
alan 217e11da1d Merge branch 'main' into turn-integration
# Conflicts:
#	internal/server/runner.go
#	internal/stage/model_prompt.go
#	internal/stage/model_run.go
#	internal/stage/model_test.go
2026-10-19 22:32:13 +01:00
alan e37b864c40 stage turns: replace JSON results with file-based markdown turns
Each model visit now gets <run>/stages/<seq>-<stage>/ with input.md,
memory.md, output.md, private/ and a shared run-level public/. The model
reads the two input files, follows the stage's instructions verbatim and
returns complete markdown; only the # outcome section is parsed.

- add internal/turn layout, render and output parsing
- write input.md/memory.md before a visit and output.md from the final
  message; inventory all turn files as stage artifacts
- accumulate completed turns and system-written public file additions in
  memory, including across retries and resume
- remove the JSON envelope, strict field validation, line format and the
  repair ladder for model stages
- republish pipeline authoring prompts and docs in the new style

Checks: go build ./..., go vet ./..., go test -count=1 ./..., gofmt -l .
2026-10-19 22:27:44 +01:00
alan 72aecd8b1f Remove resource pools, leases and wait queues
Drop the resource allocation feature end to end: store tables and migration, runner scheduling and cleanup, protocol types and commands, CLI commands, TUI screens, tests and docs. Existing databases open cleanly and definitions carrying a retired resources block still validate.
2026-10-19 22:27:27 +01:00
alan 2fe63012f9 chat: a verification chat can never appear in the operator's list
The operator's chat list showed ~99 stray "New chat" entries. The listing
was already fail-closed (registry-only); the fault was what got recorded: an
automated UI check drives the real page, so its throwaway chat was recorded as
an operator chat exactly like a manually created one and stayed in the list for
ever (each run added one).

Server: chat_create takes an optional ephemeral flag. The session is created,
bootstrapped, usable, closable and reopenable exactly like any other, but its
registry row is hidden, so chat_sessions never lists it. operator_sessions gains
an ephemeral column (idempotent migration, existing rows default to listed) and
the list query filters it; the single-row lookup does not, so close/reopen keep
working. RecordVerificationSession is the hidden recorder.

Web: the page marks a create ephemeral only when automation asks for it
(__pipelinesEphemeralChat, set by the UI smoke for its throwaway chat), so the
smoke's own runs stop polluting while a manual create is unchanged.

Tests: a hidden row is never listed yet is still looked up and closable; a
normal re-record of the same id lists it again; a pre-ephemeral database
migrates with every existing chat still listed. Live data pruned separately
(107 -> 8 registry rows, backed up).
2026-10-19 13:15:08 +01:00
alan 63cae54fb4 Merge branch 'main' into chat-cross-client-echo-order 2026-10-19 00:08:33 +01:00
alan 7da3d54013 chat: reconcile history by canonical message identity 2026-10-19 00:08:30 +01:00
alan 51881cb4b3 Seed explicit empty partial and complete captures for UI review 2026-10-19 00:00:12 +01:00
alan 087e0cb5b5 Merge branch 'main' into ready-attention-review-fixture 2026-10-18 23:58:58 +01:00
alan 946055d6df Provide ready attention UI fixture and explicit Android tool path 2026-10-18 23:58:58 +01:00
alan 461b138413 fix retry-of-retry memory prefix reconstruction 2026-10-18 23:57:28 +01:00
alan 80f8e2edc4 Wait for released workspace cleanup in retry isolation test 2026-10-18 23:43:58 +01:00
alan 80a1d1e0ea Bound pool declaration reads and document operator commands 2026-10-18 23:43:58 +01:00
alan 9e31e054ac Merge branch 'main' into resource-pool-operator-config 2026-10-18 23:37:50 +01:00
alan 89a2bf1e01 Add operator resource pool configuration commands 2026-10-18 23:37:46 +01:00
alan 58fa528afc test: retain committed stage diffs 2026-10-18 23:30:56 +01:00
alan 3187b0c06e Merge branch 'main' into chat-cross-client-echo-order 2026-10-18 23:28:54 +01:00
alan d630235657 Preserve partial cross-client identity fixes before canonical-ID continuation 2026-10-18 23:28:54 +01:00
alan 94b22732dd Merge branch 'main' into resource-pool-runner-handoff 2026-10-18 23:20:55 +01:00
alan a022b58c5c Wire pool resource targets through runner and repair quarantined-member handoff 2026-10-18 23:20:55 +01:00
alan e1adb687d4 fix server retry memory input override ordering 2026-10-18 22:18:16 +01:00
alan 4de7cfbfe4 feat: retry selected stage with input overrides 2026-10-18 21:49:37 +01:00
alan 980f52bd85 Merge branch 'main' into chat-cross-client-echo-order 2026-10-18 21:46:00 +01:00
alan 36d1c8ea7a chat: preserve cross-client reconciliation work 2026-10-18 21:45:56 +01:00
alan 915fa0a74d fix: allow native tools in manual resume 2026-10-18 21:22:02 +01:00
alan e020d59b07 test: stabilize workspace retry conflict coverage 2026-10-18 20:41:54 +01:00
alan a8499bb57f Merge branch 'main' into retry-from-failed-stage 2026-10-18 20:38:06 +01:00
alan b8beeb250b feat: resume retries from failed stage 2026-10-18 20:38:03 +01:00
alan a1cb85a25b Merge branch 'main' into background-task-output-api 2026-10-18 20:23:48 +01:00
alan f5f682a990 test: strengthen background shell output verification 2026-10-18 20:23:43 +01:00
alan b79d0401f3 feat: recover inspected quarantined resources
Add local operator inspection and reconciliation for quarantined resource leases, including atomic audit-backed FIFO handoff and recovery protocol support.\n\nPreserve capability tokens in the authoritative store and reject non-loopback or ordinary client transport for recovery mutations.\n\nChecked packaged templates and packaged authoring skill references; none need updating. The task-owned docs note records shared README and skill reference follow-up for docs-fold.
2026-10-18 19:24:32 +01:00
alan 27ad7daecd test: cover inspected resource recovery boundaries
Add executable regressions for a forged forwarded loopback claim over a real WebSocket transport and for replaying an old recovery after FIFO successor handoff.\n\nChecked packaged templates and packaged authoring skill references; neither needs updating. The existing per-item documentation note records shared documentation that the manual docs-fold process must update.
2026-10-18 19:18:03 +01:00
alan ded7927778 WIP: preserve remaining background task output work 2026-10-18 17:42:15 +01:00
alan fd4c329eaf WIP: preserve background task output API 2026-10-18 17:10:44 +01:00
alan 5946f1abc8 chat: separate create operation identity
Use an explicit chat_create operation_id as the durable bootstrap key while retaining envelope IDs for reply correlation. Legacy requests receive fresh server-scoped identities, so independent cli-1/android-1 requests do not collide; clients that retry retain one operation_id.

Update Android creation state and repository calls to preserve an operation identity across retries, and cover durable reconnect retries, duplicate barriers, changed input, legacy correlation reuse, and protocol serialization.

Checked packaged templates: none describe chat_create. Checked packaged authoring-skill references: the existing description is stale, but shared references and README must not be edited by an item; docs/notes/bootstrap-create-identity.md records the required docs-fold update and rollout compatibility.
2026-10-18 16:50:30 +01:00
alan 134bd0611a Merge branch 'main' into pill-run-decision 2026-10-18 16:25:46 +01:00
alan a00d49ae0b Preserve large chat visual fixture baseline 2026-10-18 15:55:17 +01:00
alan 52110fdbed Merge branch 'main' into pill-run-decision 2026-10-18 15:53:29 +01:00
alan 72781260b1 test: preserve UI diff fixture recovery 2026-10-18 15:53:24 +01:00
alan 27108bcc0c Merge branch 'main' into manager-skill-bootstrap 2026-10-18 15:23:27 +01:00
alan 27a2e52376 Guard chat bootstrap transitions
Use conditional durable phase transitions and affected-row checks so only the request that reserves each phase can create or activate a manager chat session. Record duplicate ownership conflicts without repeating external work, and cover the reservation and restart state in pipeline and server tests.

Checked packaged templates and authoring skill references: the existing task commit already packages the dedicated manager skill and installer inventory; this transition-race fix requires no further template or reference update. Shared documentation remains untouched; the task note is docs/notes/manager-skill-bootstrap.md.
2026-10-18 15:23:07 +01:00
alan 1c89414896 Merge commit '4b66e608' into manager-skill-bootstrap
# Conflicts:
#	internal/opencode/chat_v2_test.go
2026-10-18 15:03:46 +01:00
alan ff1775e11f Merge branch 'main' into large-chat-history 2026-10-18 15:03:22 +01:00
alan ab9181eee9 Preserve manager skill bootstrap work 2026-10-18 15:03:22 +01:00
alan 998da0e7af WIP preserve large chat history recovery 2026-10-18 15:03:18 +01:00