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.
This commit is contained in:
2026-11-04 16:24:17 +00:00
26 changed files with 2463 additions and 101 deletions
+2 -2
View File
@@ -304,12 +304,12 @@ func (c *Chat) Interrupt(ctx context.Context, id string) error {
return nil
}
// DetachSessions is the server-restart shutdown. Sessions, turns, questions,
// Detach is the server-restart shutdown (chatShutdownDetacher). Sessions, turns, questions,
// permissions and shells live in the OpenCode service, not in this adapter, so
// there is nothing to stop: the connection's owner decides whether the service
// itself outlives the server (an attached endpoint and the detached owned chat
// service do; a V1 serve child does not).
func (c *Chat) DetachSessions() {}
func (c *Chat) Detach() {}
// Messages reads one session's stored turns. On the owned serve backend it
// reuses Connection.Messages, including its read-only OutputFormat readback