Skip to content

[Subsystem] Implement Server-Side PTY Shell Process Manager (Port of Ivy.Hooks.Pty Backend) #118

Description

@rorychatt

Problem Statement

Rusty-Framework includes a frontend terminal.rs widget, but lacks the backend server-side PTY process lifecycle manager (port of Ivy.Hooks.Pty).

Without a server PTY process manager, the frontend terminal widget cannot connect to native OS shell sessions (bash/zsh/cmd/powershell) on the server.

Missing Functionality

  • Server-side PTY process lifecycle manager (spawn, resize, write, signal, terminate).
  • WebSocket binary/text streaming handler connecting PTY stdout/stdin/stderr to terminal.rs.
  • Terminal window size synchronization (cols, rows, pixel dimensions).
  • Process isolation and security execution sandboxing settings.

Proposed Architecture & Design

  1. Integrate portable-pty or tokio-pty into rusty-server.
  2. Add PTY session management handlers to the WebSocket routing module.
  3. Handle terminal resize events (SIGWINCH / TIOCSWINSZ) received over WebSocket messages.
  4. Provide security configuration options (allowed binaries, working directory restrictions, environment variable filtering).

Acceptance Criteria

  • Server spawns native shell processes on Linux, macOS, and Windows.
  • Interactive stdin/stdout data streams between PTY process and terminal.rs widget without latency or framing issues.
  • Terminal resize messages dynamically adjust PTY dimensions.
  • Clean process termination on WebSocket disconnect.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions