agent-orchestrator/docs
yyovil 7c97ee79cd
refactor(terminal): per-client zellij attach replaces shared PTY + replay ring (#194)
* refactor(terminal): per-client zellij attach replaces shared PTY + replay ring

Each WebSocket client that opens a pane now gets its own `zellij attach`
PTY (attachment.go) instead of sharing one PTY whose output was replayed
from a bounded byte ring. Zellij answers every fresh attach with its full
init handshake (alt screen, SGR mouse tracking, bracketed paste) and a
faithful repaint — the ring replay lost exactly that handshake, leaving
late subscribers without mouse reporting (dead wheel scroll). The cost is
one zellij client process per open pane per connection, which the zellij
server is built for (yyork ships the same model).

ring.go and session.go (fan-out, replay buffer) are deleted; manager.go
now tracks per-client attachments with liveness gating, and pty_unix.go
answers every resize frame with an explicit SIGWINCH.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(renderer): re-assert settled terminal resize; align docs with per-client attach

After each debounced resize settles, send one follow-up resize frame with
the same grid (RESIZE_REASSERT_MS). xterm only fires onResize on actual
grid changes, so a resize update the zellij client loses (raced mid-attach
or coalesced during a drag) would otherwise desync the session layout from
the pane until the next real change. The backend answers every resize
frame with an explicit SIGWINCH, so the re-assert is a no-op when already
in sync.

Comments in the terminal hook/components now describe the per-client
attach model (fresh server-side `zellij attach` per open, no replay ring).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 15:19:38 +05:30
..
agent fix(sessions): stop AO hook files from making every worktree permanently dirty (#169) 2026-06-11 11:06:45 +05:30
cli chore: add prettier config and CI auto-formatter (#166) 2026-06-10 09:09:17 +05:30
design chore: add prettier config and CI auto-formatter (#166) 2026-06-10 09:09:17 +05:30
README.md chore: add prettier config and CI auto-formatter (#166) 2026-06-10 09:09:17 +05:30
architecture.md refactor: move session status assembly to service (#62) (#67) 2026-06-01 23:31:21 +05:30
backend-code-structure.md refactor(terminal): per-client zellij attach replaces shared PTY + replay ring (#194) 2026-06-12 15:19:38 +05:30
stack.md chore: add prettier config and CI auto-formatter (#166) 2026-06-10 09:09:17 +05:30
status.md refactor: move session status assembly to service (#62) (#67) 2026-06-01 23:31:21 +05:30

README.md

agent-orchestrator rewrite docs

The agent-orchestrator is being rebuilt as a long-running Go backend daemon
(backend/) plus an Electron + TypeScript frontend (frontend/). The backend
supervises coding-agent sessions and exposes daemon control, project/session
state, terminal streaming, and CDC/event infrastructure.

Start with architecture.md for the current backend model and
cli/README.md for the CLI surface.

Reference docs

Doc What it covers
architecture.md Current backend model, package layout, status derivation, persistence/CDC, and load-bearing rules.
backend-code-structure.md Package ownership rules for the Go backend: domain, services, ports, adapters, storage, HTTP, CLI, and daemon wiring.
cli/README.md CLI commands and daemon control surface.
status.md Current implementation shape, build/test command, and next integration work.
stack.md Accepted library/runtime choices, pending stack decisions, and dependencies explicitly avoided for V1.

Mental model

Persist durable facts, derive display status:

  • session table: activity_state, is_terminated, identity, metadata
  • PR tables: PR/CI/review facts
  • derived read model: service.Session computes display status from session + PR facts