{session_dir}/ipc.sock
{control_dir}/{session_id}/ipc.sock
/tmp/vt-1234567890/a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6/ipc.sock
Type | Value | Direction | Description |
---|---|---|---|
STDIN_DATA | 0x01 | Client → Server | Terminal input data |
CONTROL_CMD | 0x02 | Client → Server | Control commands (resize, kill) |
STATUS_UPDATE | 0x03 | Both | Activity status updates |
HEARTBEAT | 0x04 | Both | Connection health check |
ERROR | 0x05 | Server → Client | Error messages |
"ls -la\n"
Code | Description | Details |
---|---|---|
SESSION_NOT_FOUND | The requested session does not exist | Session ID is invalid or session has been terminated |
MESSAGE_PROCESSING_ERROR | Failed to process incoming message | Malformed message, invalid JSON, or internal processing error |
INVALID_OPERATION | Operation not valid for session type | e.g., reset-size on in-memory session |
CONTROL_MESSAGE_FAILED | Failed to send control message | Unable to communicate with PTY process |
RESET_SIZE_FAILED | Failed to reset terminal size | Error during size reset operation |
CONNECTION_LIMIT | Too many concurrent connections | Server connection limit reached |
PAYLOAD_TOO_LARGE | Message payload exceeds size limit | Payload larger than maximum allowed size |
INVALID_MESSAGE_TYPE | Unknown or unsupported message type | Client sent unrecognized message type |
MALFORMED_FRAME | Invalid message frame structure | Message framing protocol violation |
{session_dir}/ipc.sock
{session_dir}/control-pipe
file{session_dir}/activity.json
filesrc/server/pty/socket-protocol.ts
src/server/pty/socket-client.ts
src/server/pty/pty-manager.ts
(setupIPCSocket method)src/test/unit/socket-*.test.ts
, src/test/integration/socket-*.test.ts