Commit Graph

320 Commits

Author SHA1 Message Date
alan b33970182c Proxy authenticated file explorer downloads and previews 2026-11-07 01:51:12 +00:00
alan 54ffb5d022 Record recovered session changes and verification evidence 2026-11-07 01:49:16 +00:00
alan 75bd4dcff0 Merge branch 'ws-files-viewer'
# Conflicts:
#	app/tool/capture/README.md
2026-11-07 01:45:03 +00:00
alan 84a03bea8d Complete chat file previews downloads and explorer actions 2026-11-07 01:44:42 +00:00
alan 61b382e9c0 Merge branch 'ws-stats-app'
# Conflicts:
#	docs/notes/server-stats.md
2026-11-07 01:44:15 +00:00
alan 8bf8cd9507 Add server health page with native controls and bounded refresh 2026-11-07 01:43:54 +00:00
alan 23cbcfc091 Merge branch 'ws-delivery' 2026-11-07 01:42:55 +00:00
alan 1a0f999fb1 Show prompts delivered into the running reply distinctly 2026-11-07 01:42:48 +00:00
alan b8313c9790 Document explorer metadata and server health protocol 2026-11-07 01:40:56 +00:00
alan f80edfabab Record Flutter terminal popup integration research 2026-11-07 01:39:49 +00:00
alan 95849f636a Add server stats websocket reporting 2026-11-07 01:35:39 +00:00
alan 2c1fa52e86 Merge branch 'main' into ws-files-panel 2026-11-07 01:06:30 +00:00
alan 5a1d503f58 Add chat files panel explorer shell with sorting and views 2026-11-07 01:06:23 +00:00
alan 46627c7204 Merge branch 'ws-files-http' 2026-11-07 00:54:53 +00:00
alan c4ccbb3f95 Add file size and modified time to directory listings 2026-11-07 00:54:36 +00:00
alan bfe89432bb Add contained home file endpoint 2026-11-07 00:53:15 +00:00
alan f4ba2ab25e Document verified Codex ai-memory connection repair 2026-11-07 00:29:24 +00:00
alan ed58e5a96f Record staged storage release and active-work delivery gate 2026-11-06 21:46:47 +00:00
alan 6abc309009 Expose storage usage and safe persisted age or size retention 2026-11-06 21:34:55 +00:00
alan 51ee950a5b Record verified backend deployment and preserved Claude hosts 2026-11-06 16:30:47 +00:00
alan 6421554bfe Expose recorded background task timing and progress metadata 2026-11-06 15:08:34 +00:00
alan c9a4cd0bf6 Record checked Codex timestamp fix and deferred deployment 2026-11-06 00:01:20 +00:00
alan 20a69b7e47 Forward recorded Codex turn timestamps to chat history 2026-11-06 00:00:21 +00:00
alan 1e886faa41 Complete the Codex host initialization handshake once 2026-11-05 15:49:44 +00:00
alan 46f85556af Retry bounded budget reads after transient timeouts 2026-11-05 15:48:14 +00:00
alan 3a9ba55277 Merge persistent Codex interaction connections 2026-11-05 15:36:36 +00:00
alan c2a8f5ff16 Retain Codex interaction callbacks across server restarts 2026-11-05 14:32:59 +00:00
alan cee205d4b8 Refresh API CLI Plan and Research workflow definitions 2026-11-05 14:05:03 +00:00
alan af178b83a1 Show recorded OpenCode models in the chat list 2026-11-05 13:42:01 +00:00
alan f5bf8ada8a Merge: archive and unarchive pipelines
# Conflicts:
#	internal/cli/commands.go
#	internal/pipeline/store.go
2026-11-04 23:39:02 +00:00
alan 06bf580154 Archive pipelines: hide unused ones while keeping their history
archived_at on pipelines (migrated in place). archive_pipeline and
unarchive_pipeline by id or name with an expected-version guard;
list_pipelines hides archived unless include_archived. Archived
pipelines refuse runs, retries, new versions and name reuse, and
cannot be archived while an enabled schedule points at them.
CLI archive/unarchive and list --archived/--all, docs and skill note.
2026-11-04 23:25:55 +00:00
alan cedfc22e45 Pipeline runs use the workspace's directory environment
Resolve the run workspace's environment with workenv (direnv, parent
.envrc, mise; same account rule as Claude chats) at run start and resume,
and apply it to Pi stage processes, a per-environment Pipelines-owned
OpenCode stage service (keyed by a hash of the change, reused across runs,
idle ones stopped after PIPELINES_OPENCODE_STAGE_IDLE_TIMEOUT, revived per
registration), delivery-gate checks and merges, plain-stage opencode CLI
calls and file-change capture git reads. Record the directory, .envrc
files, sources and variable names (never values) on the run detail; a
blocked .envrc becomes a run warning.
2026-11-04 18:08:42 +00:00
alan 4e0491d619 Merge main 2026-11-04 17:43:47 +00:00
alan 57f5219628 Artifacts: runner-internal turn files move to a Debugging files group
Each recorded artifact now carries a server group (deliverable or debug).
public/ files are deliverables; input/memory/history/output.md, session
exports and private/ scratch are debugging files. The app's Artifacts tab
lists deliverables and the Debug toggle reveals a separate Debugging files
group (older servers fall back to the filename rule); the TUI lists
deliverables first and marks debug rows; artifact search excludes debug
files unless include_debug / --debug-files is set.
2026-11-04 17:43:47 +00:00
alan 7d83b9d1ca Merge: pipelines skill rewrite per independent review 2026-11-04 17:27:30 +00:00
alan 5090f1cf4e Pipelines skill: outcome-first output, aligned review and loop guidance, operator material moved to docs
Rewrite format.md around turn files, the output.md order (# outcome, edge word, # handoff, detail), checks, configs, human stages and the land stage delivery gate (sh -c in a fresh detached worktree, clean checkouts incl. untracked, 64 KB output cap, opencode only). Align review guidance across practices, verification, orchestration and the feedback-loop example. Fix loop-limit semantics in control.md against runner.go, budget_tokens sizing, read for large inputs, blocked-else-error and one stage naming set. Move dated verification logs to docs/verification-history.md and brokered chat, TUI keys and harness internals to docs/operator-reference.md; label operator-only references in SKILL.md.
2026-11-04 17:27:01 +00:00
alan 88dfc051e5 Model stages: outcome-first output shape and one in-session outcome repair
The prompt now says output.md must start with # outcome and the outcome
word alone on the next line, then # handoff, then detail. Runs 241/243
followed the old "start with # handoff" wording and dropped the outcome.

When a completed turn lacks a valid outcome, the OpenCode/agent and Pi
clients send one short follow-up in the same session asking only for the
outcome line. An outcome-only reply goes at the top of the original report;
a still-invalid reply fails with the same validation error as before. The
follow-up's tokens accrue to the session usage. No outcome is inferred.

Missing tools/evidence now name blocked when declared, else error. The
parser tolerates a trailing period on the outcome word.
2026-11-04 17:20:58 +00:00
alan 70391b17c2 Stage diffs: clean Git files take their baseline from the index blob
On a large Git workspace the 32 MiB retained-text budget was spent
alphabetically on files that never change, so small late edits were
recorded with no_patch. The stage-start snapshot now keeps text only for
files dirty or untracked at start; a clean tracked file keeps its hash and
stage-0 index blob id. When it changes or is deleted, the after capture
reads that blob in one `git cat-file --batch` and uses it only if its
SHA-256 matches the start read, so stage commits/resets do not move the
baseline and filters or assume-unchanged never yield a wrong patch. The
after capture shares unchanged files' representation instead of spending
budget on them again.

FileChange gains no_patch_reason (binary, file_size, budget, lines,
evidence_size, git_status, baseline). Non-Git workspaces keep their
behaviour.
2026-11-04 17:08:01 +00:00
alan 6870c81960 Skill install: also refresh Codex's copy under $CODEX_HOME/skills 2026-11-04 16:43:55 +00:00
alan a627b38ef3 Merge main; use the shared chatShutdownDetacher for OpenCode and Codex
OpenCode and Codex chats implement Detach (called by chatManager.Close)
instead of a parallel DetachSessions interface. Docs follow the Claude Code
host and the systemd KillMode=process unit. The opt-in live restart check
copies only the stage provider's login row into its scratch OpenCode
database, builds the CLI for skill install and removes its scratch tree.
2026-11-04 16:24:17 +00:00
alan aa8eddd686 Keep OpenCode/Codex chat and stage sessions running across server restarts
A stopping server no longer interrupts harness sessions. Runs are canceled
with a shutdown cause, so stage clients leave admitted sessions running and
owned; start-up recovery re-adopts live OpenCode V2 stage sessions (wait,
read back the result, continue the graph), restarts unadmitted visits,
continues runs between stages, and falls back to interrupted with a reason
when the harness is gone. Chats with live work are recorded on shutdown and
reattached on start; turns that ended during the downtime are folded in
from history. The server-spawned V2 chat serve is now a detached owned
service. PIPELINES_SHUTDOWN_SESSIONS=stop restores the old behaviour.
2026-11-04 16:17:08 +00:00
alan 6b22389cae Merge: Claude Code chats survive server restarts via a detachable host 2026-11-04 16:15:06 +00:00
alan 34c2ccec25 Install and document pipelines-claude-host alongside the server 2026-11-04 16:14:35 +00:00
alan c810437aa5 Claude Code chats survive server restarts in a detachable host
A pipelines-claude-host process owns each claude -p CLI and its pipes,
spools its stream-json output with offsets and serves a private Unix
socket. The server detaches on shutdown and reattaches on start,
replaying the spool to rebuild turns, approvals, questions, background
tasks and the live model. Explicit close, idle release and CLI exit stop
the host; a crashed host falls back to --resume with a notice.
2026-11-04 16:09:56 +00:00
alan 9351cd7d74 Merge: pipeline stages run on their own OpenCode service with stage-only limits 2026-11-04 14:12:38 +00:00
alan b655278674 Run OpenCode stages on a Pipelines-owned stage service with their own limits
Stages now run on a detached Pipelines-owned opencode serve started with
OPENCODE_CONFIG_CONTENT carrying stage tool_output (16384 bytes / 400 lines)
and compaction.auto defaults, configurable through PIPELINES_OPENCODE_STAGE_*.
Chats keep their existing service and configuration; a server-spawned chat
serve can take PIPELINES_OPENCODE_CHAT_CONFIG. The service shares the user's
OpenCode config, credentials and session database, keeps a stable private
registration so retained references (recovery, interrupt, export) stay valid,
revives on the same port after a crash, replaces itself when idle after a
settings change, and is stopped on shutdown only when idle.
PIPELINES_OPENCODE_STAGE_SERVICE=shared restores the previous behaviour.
2026-11-04 14:04:35 +00:00
alan 3c31bca87f Merge main; align lint and skill practices with essential memory/history and the four graded examples 2026-11-04 13:08:47 +00:00
alan d7e54f4612 Merge: short essential memory per stage; full history on demand 2026-11-04 13:01:16 +00:00
alan 538143554c Split stage memory into capped essential memory.md and full history.md
Every stage used to be told to read memory.md, the full output of every
earlier turn (19 KB average, 92 KB max), and paid for it on each model call.
memory.md is now essential memory, hard-capped at 4 KB and inlined in the
prompt: the task, the previous stage's # handoff section (or its truncated
output head), a one-line-per-stage outcome ledger and the server-captured
changed files. history.md keeps the old full memory on disk; read-capable
stages are pointed at it and input.md for on-demand detail, and it is never
inlined. The prompt asks each stage for a short # handoff section.
2026-11-04 13:00:48 +00:00
alan e5c015f6ed Merge: no UI-review auto-skip without complete change capture; capture lists over-budget changes
# Conflicts:
#	internal/protocol/runs.go
2026-11-04 12:58:45 +00:00