/** Unified subagent activity domain model used by the adapter and every view. */ export type SubagentStatus = 'starting' | 'running' | 'completed' | 'failed' | 'cancelled' | 'unknown'; export type SubagentOutputKind = 'text' | 'thinking' | 'tool' | 'error' | 'system'; export interface SubagentOutputLine { kind: SubagentOutputKind; text: string; at: number; /** False while the line is still absorbing streaming deltas. */ settled?: boolean; } export interface SubagentToolCall { id?: string; name: string; status: 'running' | 'completed' | 'failed'; startedAt: number; endedAt?: number; argsPreview?: string; resultPreview?: string; error?: string; } export interface SubagentTokenUsage { input?: number; output?: number; total?: number; context?: number; } export interface SubagentState { agentId: string; runId?: string; description: string; provider?: string; model?: string; /** Catalog display name for `provider`/`model`; every view prefers it over * the wire id, which is only the fallback until the catalog answers. */ modelName?: string; effort?: string; status: SubagentStatus; startedAt: number; completedAt?: number; endedAt?: number; local?: boolean; parentSessionId?: string; sessionId?: string; stopReason?: string; error?: string; /** Compatibility projection for older consumers. */ output: string[]; outputEvents: SubagentOutputLine[]; toolCalls: SubagentToolCall[]; tokens?: SubagentTokenUsage; summary?: string; } export declare class SubagentActivityStore { private states; private sessionToAgent; private listeners; private commitLine; private pushLine; onSpawned(agentId: string, provider?: string, model?: string, info?: Partial): void; linkSession(agentId: string, session: unknown): void; getSubagentIdBySession(session: unknown): string | undefined; appendOutput(agentId: string, text: string, kind?: SubagentOutputKind): void; /** Mark the streaming tail line complete (run settlement). */ flushOutput(agentId: string): void; onSessionEvent(agentId: string, event: unknown): void; /** Merge partial updates (model discovery, session id) into one subagent. */ patch(agentId: string, partial: Partial): void; /** One-line preview of a tool-result content block (text or item list). */ private previewOf; recordTool(agentId: string, input: Partial & { name?: string; }): void; setTokens(agentId: string, usage: { inputTokens?: number; outputTokens?: number; input?: number; output?: number; total?: number; context?: number; }): void; onCompleted(agentId: string, summary?: string, stopReason?: string): void; onFailed(agentId: string, error: string): void; onCancelled(agentId: string, reason?: string, summary?: string): void; private finish; /** Drop all tracked subagents and session links (session swap: the old * session's children were disposed with their parent — nothing may keep * routing events of a session the channel no longer projects). */ reset(): void; snapshot(): SubagentState[]; get(agentId: string): SubagentState | undefined; subscribe(listener: () => void): () => void; private notify; } //# sourceMappingURL=subagents.d.ts.map