import type { DeliveryContext } from "../utils/delivery-context.types.js"; import type { SubagentRunRecord } from "./subagent-registry.types.js"; export declare function listRunsForRequesterFromRuns(runs: Map, requesterSessionKey: string, options?: { requesterRunId?: string; }): SubagentRunRecord[]; export declare function listRunsForControllerFromRuns(runs: Map, controllerSessionKey: string): SubagentRunRecord[]; export type SubagentRunReadIndex = { getDisplaySubagentRun(childSessionKey: string): SubagentRunRecord | null; countActiveDescendantRuns(rootSessionKey: string): number; runsByControllerSessionKey: ReadonlyMap; }; export declare function buildSubagentRunReadIndexFromRuns(params: { runs: Map; inMemoryRuns?: Iterable; now?: number; }): SubagentRunReadIndex; export declare function isSubagentSessionRunActiveFromRuns(runs: Map, childSessionKey: string): boolean; export declare function getSubagentRunByChildSessionKeyFromRuns(runs: Map, childSessionKey: string): SubagentRunRecord | null; export declare function resolveRequesterForChildSessionFromRuns(runs: Map, childSessionKey: string): { requesterSessionKey: string; requesterOrigin?: DeliveryContext; } | null; export declare function shouldIgnorePostCompletionAnnounceForSessionFromRuns(runs: Map, childSessionKey: string): boolean; export declare function countActiveRunsForSessionFromRuns(runs: Map, controllerSessionKey: string): number; export declare function countActiveDescendantRunsFromRuns(runs: Map, rootSessionKey: string): number; export declare function countPendingDescendantRunsFromRuns(runs: Map, rootSessionKey: string): number; export declare function countPendingDescendantRunsExcludingRunFromRuns(runs: Map, rootSessionKey: string, excludeRunId: string): number; export declare function listDescendantRunsForRequesterFromRuns(runs: Map, rootSessionKey: string): SubagentRunRecord[];