/** * High-level Theater client with hygienic connection management * Each operation gets its own TCP connection to avoid response multiplexing */ import type { TheaterId, ChannelParticipant, ActorStatus, ManifestConfig, ChainEvent } from '../types/protocol.js'; import type { TheaterClientConfig, StartActorParams, ActorInfo, ChannelStream, ActorEventStream } from '../types/client.js'; import { Actor } from './Actor.js'; /** * High-level Theater client that manages operations using hygienic connections * Each operation gets its own TCP connection to avoid response multiplexing issues */ export declare class TheaterClient { private readonly host; private readonly port; private readonly config; constructor(host?: string, port?: number, config?: Partial); /** * Create and connect a new Theater connection for a specific operation */ private createConnection; /** * Execute an operation with a dedicated connection and automatic cleanup */ private withConnection; /** * Handle error responses from the server */ private handleErrorResponse; /** * Get an Actor wrapper for an existing actor ID */ actor(id: TheaterId): Actor; /** * Start a new actor and return an Actor wrapper */ startActor(params: StartActorParams): Promise; /** * Start a supervised actor with event streaming */ private startSupervisedActor; /** * Start a regular actor (current behavior) */ private startRegularActor; /** * Start a new actor with the given parameters (returns raw ID) */ startActorRaw(params: StartActorParams): Promise; /** * Stop a running actor */ stopActor(id: TheaterId): Promise; /** * List all running actors and return Actor wrappers */ listActors(): Promise; /** * List all running actors (returns raw actor info) */ listActorsRaw(): Promise; /** * Get the status of a specific actor */ getActorStatus(id: TheaterId): Promise; /** * Restart an actor */ restartActor(id: TheaterId): Promise; /** * Get the manifest configuration of an actor */ getActorManifest(id: TheaterId): Promise; /** * Get the current state of an actor */ getActorState(id: TheaterId): Promise; /** * Get the event history for an actor */ getActorEvents(id: TheaterId): Promise; /** * Get metrics for an actor */ getActorMetrics(id: TheaterId): Promise; /** * Send a fire-and-forget message to an actor */ sendActorMessage(id: TheaterId, data: Uint8Array): Promise; /** * Send a request message to an actor and wait for response */ requestActorMessage(id: TheaterId, data: Uint8Array): Promise; /** * Open a communication channel with an actor */ openChannel(participant: ChannelParticipant, initialMessage?: Uint8Array): Promise; /** * Subscribe to events from an actor */ subscribeToActor(id: TheaterId): Promise; } //# sourceMappingURL=TheaterClient.d.ts.map