Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

@agents-git-bot agents-git-bot bot commented Dec 19, 2025

Syncs documentation changes from cloudflare/sandbox-sdk#310 (cloudflare/sandbox-sdk#310): add PTY support

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/sandbox/ @whoiskatrin, @ghostwriternr, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

@agents-git-bot
Copy link
Contributor Author

Updated with comprehensive PTY API documentation:

  • Complete API reference for all pty methods (create(), attach(), getById(), list())
  • PTY handle methods documentation (write(), resize(), kill(), onData(), onExit(), close())
  • Async iteration support examples
  • Use case examples: interactive shells, language REPLs, automated terminal sessions
  • Transport considerations (HTTP vs WebSocket)
  • Updated API index with PTY card

Ready for review.

@agents-git-bot
Copy link
Contributor Author

Updated documentation with comprehensive PTY coverage:

Added Files

  • API Reference (src/content/docs/sandbox/api/pty.mdx): Complete PTY API documentation with all methods, parameters, and examples
  • How-to Guide (src/content/docs/sandbox/guides/interactive-terminals.mdx): Practical guide for building interactive terminal applications
  • API Index Update: Added PTY card to API navigation

Documentation Highlights

  • Clear distinction between PTY and Commands API use cases
  • Complete method documentation with TypeScript examples
  • Real-world use cases (interactive shells, text editors, Python REPL)
  • Control character handling and terminal resizing
  • Session attachment patterns
  • Error handling and best practices

All content follows Cloudflare docs style guide with TypeScriptExample components and proper linking.

🤖 Generated with Claude Code

@agents-git-bot agents-git-bot bot changed the title Sync docs from cloudflare/sandbox-sdk PR #310: add PTY support add PTY support Dec 19, 2025
@agents-git-bot agents-git-bot bot changed the title add PTY support Add PTY (pseudo-terminal) API documentation Dec 21, 2025
@agents-git-bot agents-git-bot bot force-pushed the sync-docs-pr-310 branch 2 times, most recently from a246615 to 7eb6adf Compare December 22, 2025 14:55
@agents-git-bot agents-git-bot bot changed the title Add PTY (pseudo-terminal) API documentation Add PTY (pseudo-terminal) documentation Dec 22, 2025
@agents-git-bot
Copy link
Contributor Author

Updated with complete documentation:

  • Rewrote API reference with comprehensive coverage of all PTY methods and properties
  • Added detailed how-to guide with practical examples including web terminal implementation, xterm.js integration, and interactive automation patterns
  • Ensured compliance with Cloudflare style guide (TypeScriptExample components, proper links, no contractions)
  • Added cross-links to related documentation

Ready for review!

@agents-git-bot agents-git-bot bot changed the title Add PTY (pseudo-terminal) documentation Add PTY (pseudo-terminal) API documentation Dec 22, 2025
@agents-git-bot agents-git-bot bot force-pushed the sync-docs-pr-310 branch 2 times, most recently from 683febe to 58b0d0d Compare December 23, 2025 11:11
@agents-git-bot agents-git-bot bot changed the title Add PTY (pseudo-terminal) API documentation Add PTY (pseudo-terminal) documentation Dec 23, 2025
@agents-git-bot agents-git-bot bot force-pushed the sync-docs-pr-310 branch 2 times, most recently from 9d7acc2 to d0cdd01 Compare December 23, 2025 14:53
@agents-git-bot
Copy link
Contributor Author

Updated documentation based on the final implementation in cloudflare/sandbox-sdk#310:

Changes

  • Complete API reference covering all PTY namespace methods and PTY handle API
  • Comprehensive how-to guide with real-world examples including:
    • xterm.js integration patterns
    • WebSocket-based terminal implementation
    • Collaborative terminal example
    • Session attachment for context inheritance
    • Terminal resize handling and control sequences
    • Lifecycle management and reconnection patterns

Documentation Structure

  • api/pty.mdx: Technical API reference with all methods, parameters, and return types
  • guides/interactive-terminals.mdx: Step-by-step how-to guide with production-ready examples

Following Cloudflare docs style guidelines with TypeScriptExample components, proper cross-links, and Diátaxis framework structure.

@agents-git-bot agents-git-bot bot force-pushed the sync-docs-pr-310 branch 2 times, most recently from 32b97fd to 23fc421 Compare December 23, 2025 15:52
@agents-git-bot agents-git-bot bot changed the title Add PTY (pseudo-terminal) documentation Sync docs for PR #310: add PTY support Dec 23, 2025
@agents-git-bot agents-git-bot bot force-pushed the sync-docs-pr-310 branch 2 times, most recently from 837045c to 2bc9be2 Compare December 23, 2025 22:40
@Nattaworn159

This comment was marked as spam.

@Nattaworn159

This comment was marked as spam.

@agents-git-bot agents-git-bot bot force-pushed the sync-docs-pr-310 branch 2 times, most recently from fd2f64d to b0a55f4 Compare January 8, 2026 14:15
@agents-git-bot agents-git-bot bot changed the title Sync docs for PR #310: add PTY support Add PTY (Pseudo-Terminal) Documentation Jan 8, 2026
@agents-git-bot agents-git-bot bot changed the title Add PTY (Pseudo-Terminal) Documentation Add PTY (pseudo-terminal) support documentation Jan 8, 2026
@agents-git-bot
Copy link
Contributor Author

agents-git-bot bot commented Jan 8, 2026

Update: Added Terminal Emulation Guide

I've added a comprehensive how-to guide for terminal emulation to complement the existing PTY API reference:

New file: src/content/docs/sandbox/guides/terminal-emulation.mdx

Coverage:

  • When to use PTY vs exec() for different scenarios
  • Integration with xterm.js for web-based terminals
  • WebSocket handler implementation patterns
  • ANSI escape sequences and terminal control
  • Running interactive applications (Python REPL, vim, etc.)
  • Collaborative terminal pattern for multi-user sessions
  • Session reconnection handling
  • Best practices for PTY management

This guide provides practical examples for developers building terminal interfaces, complementing the API reference with real-world implementation patterns.

Related to cloudflare/sandbox-sdk#310

@agents-git-bot agents-git-bot bot changed the title Add PTY (pseudo-terminal) support documentation add PTY support Jan 9, 2026
@agents-git-bot agents-git-bot bot changed the title add PTY support Sync docs from cloudflare/sandbox-sdk#310: add PTY support Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants