import { PubSub, UnixSocketPubSub } from '@mastra/core/events'; import type { PubSubDeliveryMode, Event, EventCallback, SubscribeOptions } from '@mastra/core/events'; /** * A PubSub that manages one Unix socket per thread for cross-process signal * coordination within a mastracode resource. * * Socket paths use `/tmp/mc//.sock` for inspectability * and automatic OS cleanup. Each thread gets its own isolated socket so * processes on different threads never exchange data. A solo process on a * thread has zero serialization overhead. */ declare class SignalsPubSub extends PubSub { #private; constructor(resourceId: string); get supportedModes(): ReadonlyArray; publish(topic: string, event: Omit): Promise; subscribe(topic: string, cb: EventCallback, options?: SubscribeOptions): Promise; unsubscribe(topic: string, cb: EventCallback): Promise; flush(): Promise; close(): Promise; /** Get the underlying socket for a topic (for testing/inspection). */ getSocket(topic: string): UnixSocketPubSub | undefined; } /** * Creates a per-thread PubSub for cross-process signal coordination. * * Each thread gets its own Unix socket under `/tmp/mc//`. * Processes on different threads never exchange data. A solo process on a * thread has zero serialization overhead — the broker only serializes when * another process joins the same thread's socket. */ export declare function createSignalsPubSub(resourceId: string): SignalsPubSub; export {}; //# sourceMappingURL=signals-pubsub.d.ts.map