Hmbown / Hmbown/Codewhale

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

Open
#6,160 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
41k
Forks
3.6k
Avg merge
13h 59m
Merged PRs (30d)
299

Description

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.

Contributor guide

Open the contributing guide

Research direction

First check whether a live issue already covers the HTTP terminal session, then reconcile crates/tui/src/runtime_api.rs and crates/tui/src/tools/terminal_session.rs against today’s tip. Identify the claimed files and routes, compare existing behavior with the Serve requirements, and use the smallest fixture proving bytes, input, resize, and exit, including ConPTY status.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, cli, operating-systems, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.