Skip to content

App-server terminal byte contract: session, bytes, input, resize, exit, ConPTY #6160

Description

@Hmbown

GPUI needs a Codewhale-owned interactive terminal, not a second PTY in the desktop. Opened from Hmbown/codewhale-apps#565 so the native pane (Hmbown/codewhale-apps#566) is not blocked on a comment.

Do not start this if a live issue already covers the HTTP terminal session. Reconcile crates/tui/src/runtime_api.rs and crates/tui/src/tools/terminal_session.rs against today's tip first.

Serve

  1. Stable session id that survives the client window closing; reconnect is the same process or a truthful loss (never a silent new shell).
  2. Authenticated raw byte read with a bounded cursor (replay/window). Shell-tool text is not this.
  3. Authenticated input with user vs agent attribution; sandbox/permissions stay enforced.
  4. Resize (cols/rows) with a receipt.
  5. Readiness: will accept input vs blocked.
  6. Exit status + cleanup receipt; no orphaned store lock.
  7. Native Windows ConPTY (Unix-only portable-pty is not acceptance).

Reply with

Claimed files and routes, what exists vs what you will add, ConPTY status, and the smallest fixture that proves bytes + input + resize + exit.

GPUI will show “Not available from this Codewhale” plus the real route name until those routes exist. No second shell owner in the desktop.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions