Commit Graph

381 Commits

Author SHA1 Message Date
alan e6bc57c901 Run operator shell commands in a chat's directory on the server
chat_shell_run starts $SHELL -lc in the chat session's directory in its own
process group, streams merged output to every watcher of the session, keeps a
1 MiB tail and persists each run; chat_shell_stop interrupts the group and
kills it after a grace period. chat_shell_share queues an ordinary prompt
with the command and a bounded output tail.
2026-11-09 15:55:14 +00:00
alan c61490aeb0 Add rename_path, move_path and delete_path for home files
The chat Files panel needs to rename, move and delete entries. Three
websocket requests, dispatched beside list_directory, operate on one
entry inside the operator's home and reply with path_mutated {path} or
an error frame (does not exist, already exists, is not empty, outside
the home directory, cannot be moved into itself).

The entry's parent folder and the move destination are resolved through
symlinks and must stay inside home; the entry's own symlink is never
followed, so a link is renamed, moved or removed as a link. The home
directory itself, anything outside it and pseudo filesystems are
refused. A folder is deleted only when empty unless recursive is set;
os.RemoveAll unlinks symlinks rather than descending into them.
2026-11-09 01:32:31 +00:00
alan 49f36a9456 Merge branch 'worktree-agent-ab6edc0d99947642f' 2026-11-09 00:11:40 +00:00
alan 929e4cc017 Advertise tailnet and public routes in server discovery
The mDNS record now carries ts= (tailnet IPv4 addresses) and public= (the
installer's HTTPS origin from PIPELINES_WEB_PUBLIC_URL) in TXT, and browse,
the discover_servers RPC and /discovery return every route to a machine as
addresses with kinds lan, tailscale and public. Endpoint stays the LAN route
for older clients. Unsafe ts/public values are dropped.
2026-11-08 23:59:19 +00:00
alan 81460c4a4d Add POST /files to store an uploaded file inside a home folder
The handler reuses the home-path resolution of GET /files, refuses special
filesystems and non-directories, writes with O_EXCL so an existing name is
answered 409 instead of overwritten, enforces the chat upload size limit and
replies with the stored name, path and size.
2026-11-08 23:57:53 +00:00
alan 349428f11d Discover LAN servers and relay authenticated browser peer connections 2026-11-08 21:58:23 +00:00
alan 3fbfb85ace Observe native Claude automations and preserve pending timers 2026-11-08 15:52:22 +00:00
alan 9d3358be47 Expose session-owned chat automation metadata 2026-11-08 15:24:23 +00:00
alan 87a140754c Merge retry of initial recovered stream attachment 2026-11-07 16:43:35 +00:00
alan 6699d10eb8 Retry initial recovered chat stream attachment failures 2026-11-07 16:43:24 +00:00
alan d02bab3e4a Merge startup chat admission recovery gate 2026-11-07 16:41:58 +00:00
alan 692eb181c3 Merge conservative legacy task readback recovery 2026-11-07 16:41:58 +00:00
alan 62406f7fdb Hold external chat admission until live turn recovery completes 2026-11-07 16:41:02 +00:00
alan d0f616babc Keep trimmed legacy host task readback explicitly incomplete 2026-11-07 16:40:44 +00:00
alan d30b99e18e Merge metadata-only startup reattachment and unknown-readback handling 2026-11-07 16:37:01 +00:00
alan 63a89ec99c Retry retained Claude hosts from metadata readback without spawning work 2026-11-07 16:36:48 +00:00
alan d1f7c2141a Merge durable background-only startup recovery 2026-11-07 16:34:30 +00:00
alan 132a94192a Recover background chat observers from durable live membership 2026-11-07 16:33:49 +00:00
alan 886e3ea2b7 Merge replay boundary and native task identity reconnect regressions 2026-11-07 16:30:00 +00:00
alan 723ed3aa68 Prove task recovery beyond spool trim and order live events after snapshots 2026-11-07 16:28:26 +00:00
alan 5d38ba3352 Retain native task identity across partial progress notifications 2026-11-07 16:27:23 +00:00
alan f3a39a5e33 Retain native task identity across partial progress notifications 2026-11-07 16:23:49 +00:00
alan b15597662f Preserve independent background sessions through owner shutdown and idle cleanup 2026-11-07 16:23:20 +00:00
alan 1d8076ebdc Keep native Claude background tasks alive across detached sessions 2026-11-07 16:22:57 +00:00
alan 4ead2abdbf Restore hosted background tasks and preserve live hosts on reconnect failure 2026-11-07 16:22:51 +00:00
alan fd82eaa576 Restore hosted background tasks and preserve live hosts on reconnect failure 2026-11-07 16:22:38 +00:00
alan 5061cd5da4 Keep native Claude background tasks alive across detached sessions 2026-11-07 16:22:16 +00:00
alan 3da992075e Expose authoritative hosted Claude background task snapshot 2026-11-07 16:13:08 +00:00
alan 62cfa2f5ac Expose authoritative hosted Claude background task snapshot 2026-11-07 16:12:52 +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 dbf6398231 Correct CPU core counts and report incomplete data size scans 2026-11-07 01:38:59 +00:00
alan 95849f636a Add server stats websocket reporting 2026-11-07 01:35:39 +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 0f49b31ca3 Clarify managed session storage and excluded native histories 2026-11-06 21:40:42 +00:00
alan 6abc309009 Expose storage usage and safe persisted age or size retention 2026-11-06 21:34:55 +00:00
alan aa19c82156 Protect containing worktrees from deleting nested checkouts 2026-11-06 21:29:51 +00:00
alan 18eec34f56 Measure server data and registered worktree storage safely 2026-11-06 21:27:11 +00:00
alan 6421554bfe Expose recorded background task timing and progress metadata 2026-11-06 15:08:34 +00:00
alan 20a69b7e47 Forward recorded Codex turn timestamps to chat history 2026-11-06 00:00:21 +00:00
alan f81e0e945b Allow the read-only retry test to run under integration load 2026-11-05 15:52:29 +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 c2a8f5ff16 Retain Codex interaction callbacks across server restarts 2026-11-05 14:32:59 +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