Skip to main content
New protocol version released: This page may contain outdated information.
This page provides the technical API reference for the HAIP CLI, including TypeScript interfaces, classes, and implementation details.

TypeScript Interfaces

Core Configuration

Connection State

Message Types

Test Options

Monitor Options

Classes

HAIPConnection

The main connection class that manages HAIP server connections.
Events:
  • connect - Connection established
  • disconnect - Connection closed
  • reconnect - Reconnection attempt
  • error - Connection error
  • message - Message received
  • textMessage - Text message received
  • toolCall - Tool call received
  • runStarted - Run started
  • runFinished - Run finished
  • ping - Ping received
  • pong - Pong received

HAIPCLIUtils

Utility class providing helper functions.

Command Implementations

Connect Command

Send Commands

Monitor Command

Test Command

Health Command

Transport Implementations

WebSocket Transport

SSE Transport

HTTP Streaming Transport

Error Handling

Error Types

Error Codes

Output Formatting

Message Formatting

Statistics Formatting

Configuration Management

Environment Variable Parsing

Configuration File Loading

Testing Utilities

Test Helpers

Performance Testing

Next Steps