import { type DeliveryContext } from "../utils/delivery-context.js"; import { type SubkoiRunOutcome } from "./subkoi-announce.js"; export type SubkoiRunRecord = { runId: string; childSessionKey: string; requesterSessionKey: string; requesterOrigin?: DeliveryContext; requesterDisplayKey: string; task: string; cleanup: "delete" | "keep"; label?: string; createdAt: number; startedAt?: number; endedAt?: number; outcome?: SubkoiRunOutcome; archiveAtMs?: number; cleanupCompletedAt?: number; cleanupHandled?: boolean; }; export declare function registerSubkoiRun(params: { runId: string; childSessionKey: string; requesterSessionKey: string; requesterOrigin?: DeliveryContext; requesterDisplayKey: string; task: string; cleanup: "delete" | "keep"; label?: string; runTimeoutSeconds?: number; }): void; export declare function resetSubkoiRegistryForTests(): void; export declare function addSubkoiRunForTests(entry: SubkoiRunRecord): void; export declare function listSubkoiRunsForRequester(requesterSessionKey: string): SubkoiRunRecord[]; /** Look up a subkoi run by its own runId. Used by fleet-telemetry to * resolve incoming events back to the parent session for canvas updates. */ export declare function findSubkoiRunByRunId(runId: string): SubkoiRunRecord | undefined; /** Look up a subkoi run by its child sessionKey. Events from inside a * subkoi's run carry its sessionKey; this maps back to the record. */ export declare function findSubkoiRunByChildSessionKey(childSessionKey: string): SubkoiRunRecord | undefined; export declare function initSubkoiRegistry(): void;