/** * Actor wrapper class - provides ergonomic interface around an actor ID */ import type { TheaterClient } from './TheaterClient.js'; import { TheaterConnection } from '../connection/TheaterConnection.js'; import type { TheaterId, ActorStatus, ManifestConfig, ChainEvent } from '../types/protocol.js'; import type { ChannelStream, ActorEventStream, ActorCallbacks } from '../types/client.js'; /** * Actor wrapper that provides a clean, object-oriented interface * around an actor ID, automatically filling in the ID for all operations */ export declare class Actor { readonly id: TheaterId; private readonly client; private eventConnection; private callbacks; constructor(id: TheaterId, client: TheaterClient, eventConnection?: TheaterConnection, callbacks?: ActorCallbacks); /** * Get the current status of this actor */ getStatus(): Promise; /** * Restart this actor */ restart(): Promise; /** * Stop this actor */ stop(): Promise; /** * Get the manifest configuration of this actor */ getManifest(): Promise; /** * Get the current state of this actor */ getState(): Promise; /** * Get the event history for this actor */ getEvents(): Promise; /** * Get metrics for this actor */ getMetrics(): Promise; /** * Send raw bytes to this actor (fire-and-forget) */ sendBytes(data: Uint8Array): Promise; /** * Send raw bytes to this actor and wait for response */ requestBytes(data: Uint8Array): Promise; /** * Send a JSON object to this actor (fire-and-forget) */ sendJson(obj: any): Promise; /** * Send a JSON object to this actor and wait for JSON response */ requestJson(obj: any): Promise; /** * Send a string to this actor (fire-and-forget) */ sendString(text: string): Promise; /** * Send a string to this actor and wait for string response */ requestString(text: string): Promise; /** * Open a communication channel with this actor */ openChannel(initialMessage?: Uint8Array): Promise; /** * Subscribe to events from this actor */ subscribe(): Promise; /** * Check if this actor has supervision (event stream connection) */ get isSupervised(): boolean; /** * Set up event handling for supervised actors */ private setupEventHandling; /** * String representation of this actor (returns the ID) */ toString(): string; /** * Check if this actor has the same ID as another actor */ equals(other: Actor): boolean; /** * Get a JSON representation of this actor */ toJSON(): { id: TheaterId; }; /** * Check if this actor represents the same ID as a string */ hasId(id: TheaterId): boolean; } //# sourceMappingURL=Actor.d.ts.map