import { ClientAssembledToolCall } from "./tools.cjs";
import { StreamingMessageHandle } from "../messages.cjs";
import { AudioMedia, FileMedia, ImageMedia, VideoMedia } from "../media.cjs";
import { EventForChannel, EventForChannels, SubscribeOptions, YieldForChannel, YieldForChannels } from "../types.cjs";
import { SubgraphHandle, Subscribable } from "./subgraphs.cjs";
import { SubscriptionHandle } from "../index.cjs";
import { Channel, Event, SubscribeParams } from "@langchain/protocol";

//#region src/client/stream/handles/subagents.d.ts
/**
 * Discovered subagent within a streaming session. Mirrors the
 * in-process `SubagentRunStream` from DeepAgent.
 *
 * Each subagent is discovered when a `tool-started` event with
 * `tool_name === "task"` is observed. The `taskInput` and `output`
 * promises resolve from the task tool's lifecycle events.
 *
 * Use lazy getters (`sub.messages`, `sub.toolCalls`, etc.) for
 * namespace-scoped projections.
 */
declare class SubagentHandle {
  #private;
  readonly name: string;
  readonly callId: string;
  readonly taskInput: Promise<string>;
  readonly output: Promise<unknown>;
  readonly namespace: string[];
  constructor(name: string, callId: string, namespace: string[], taskInput: Promise<string>, output: Promise<unknown>, session: Subscribable);
  get messages(): AsyncIterable<StreamingMessageHandle>;
  get toolCalls(): AsyncIterable<ClientAssembledToolCall>;
  get audio(): AsyncIterable<AudioMedia>;
  get images(): AsyncIterable<ImageMedia>;
  get video(): AsyncIterable<VideoMedia>;
  get files(): AsyncIterable<FileMedia>;
  get subgraphs(): AsyncIterable<SubgraphHandle>;
  /**
   * Create a raw channel subscription scoped to this subagent's namespace.
   */
  subscribe<TChannel extends Channel>(channel: TChannel, options?: SubscribeOptions): Promise<SubscriptionHandle<EventForChannel<TChannel>, YieldForChannel<TChannel>>>;
  subscribe<const TChannels extends readonly Channel[]>(channels: TChannels, options?: SubscribeOptions): Promise<SubscriptionHandle<EventForChannels<TChannels>, YieldForChannels<TChannels>>>;
  subscribe(params: SubscribeParams): Promise<SubscriptionHandle<Event>>;
}
//#endregion
export { SubagentHandle };
//# sourceMappingURL=subagents.d.cts.map