import { Type, OnModuleInit } from '@nestjs/common'; import { DiscoveryService } from '@nestjs/core'; /** A discovered agent instance and its class. */ interface AgentEntry { name: string; instance: any; target: Type; } /** * Indexes every `@Agent`-decorated provider by class name, enabling * multi-agent orchestration (supervisor/handoff) and background-job resolution. */ declare class AgentRegistry implements OnModuleInit { private readonly discovery; private readonly agents; constructor(discovery: DiscoveryService); onModuleInit(): void; /** Returns an agent instance by class name. */ get(name: string): any | undefined; /** Returns an agent instance by its class. */ getByClass(target: Type): any | undefined; /** All discovered agents. */ all(): AgentEntry[]; } /** Minimal socket shape (compatible with socket.io's `Socket`). */ interface SocketLike { emit(event: string, payload?: unknown): void; } /** A stream result exposing a text stream (from agent `.stream()`). */ interface TextStreamLike { textStream: AsyncIterable; } interface StreamToSocketOptions { chunkEvent?: string; doneEvent?: string; errorEvent?: string; } /** * Forwards an agent text stream to a socket: emits `chunkEvent` per delta, then * `doneEvent` with the full text; emits `errorEvent` and rethrows on failure. * Framework-agnostic — the WebSocket gateway is thin glue over this. */ declare function streamAgentToSocket(stream: TextStreamLike, socket: SocketLike, options?: StreamToSocketOptions): Promise; export { AgentRegistry as A, type SocketLike as S, type TextStreamLike as T, type AgentEntry as a, type StreamToSocketOptions as b, streamAgentToSocket as s };