Skip to content

F-mcp-terminal-sync: wait_for_status + read_terminal (act -> wait -> observe) #195

Closed

Description

@bastien-gallay

Summary

F-mcp-terminal-sync — the "rich" layer: perception + synchronisation over
a session's terminal. wait_for_status and read_terminal. This is what turns
fire-and-forget orchestration into a browser-grade act → wait → observe loop.

Child of the F-mcp-control-surface 🧬 split
(.personal/feature-torture/reports/F-mcp-control-surface.md; brainstorm
brainstorm/20260713-mcp-agent-terminal-interaction.md). Analogy: terminal =
"page", OSC status = "load-state", PTY text = "DOM text".

Scope

  • wait_for_status(session, Idle|Attention) — built on the already-shipped
    OSC status machine
    (SessionStatus::Busy|Attention|Idle). Always
    timeout-bounded + a max-wait cap (a session that never idles must not hang
    the caller — Q7).
  • read_terminal(session) — the focused/target PTY visible text, generalised
    from the CaptureDump per session.
  • Deliberately out: wait_for_text(pattern) (poll-raced) and a selector
    DSL — YAGNI, a stable handle + status suffice (per the FT report).

Relationships

Labels: enhancement, P2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions