export interface PendingTaskCall { callId: string; parentSessionId: string; agentType: string; label: string; resumedTaskId?: string; } export declare function createPendingCallTracker(): { add(call: PendingTaskCall): void; take(callId?: string, parentSessionId?: string): PendingTaskCall | undefined; /** Peek oldest pending call for a parent without removing it. */ peekByParent(parentSessionId: string): PendingTaskCall | undefined; /** * Peek a pending call for a parent, preferring one whose agentType * matches `agentHint`. Used by session.created early registration: * when a parent launches several parallel task tools with different * subagent types (e.g. council reviewers), `info.agent` on the * child session identifies which subagent started it, so we can * avoid attributing the child to the wrong pending call. * Falls back to the oldest pending call for the parent when no * agent match is found (preserves prior behavior). */ peekByParentAndAgent(parentSessionId: string, agentHint?: string): PendingTaskCall | undefined; clearSession(sessionId: string): void; pendingCallId(sessionID?: string, callID?: string): string; };