import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { SubagentBackend, SubagentProfileName } from "../types.js"; export declare const SUBAGENT_SESSION_KEY_CUSTOM_TYPE = "pi-flow-subagent-session-key"; export interface SessionKeyBinding { key: string; sessionId: string; profile: SubagentProfileName; backend: SubagentBackend; } export declare function normalizeSessionKey(value: string | undefined): string | undefined; export declare function createSessionKey(): string; export declare function getPersistedSessionKeyBinding(ctx: ExtensionContext, key: string): SessionKeyBinding | undefined; export declare function persistSessionKeyBinding(ctx: ExtensionContext, binding: SessionKeyBinding): void; export declare function assertBindingMatchesProfile(binding: SessionKeyBinding, params: { profile: SubagentProfileName; backend: SubagentBackend; }): void; export declare class SessionKeyLocks { private readonly tails; run(key: string | undefined, task: () => Promise, signal?: AbortSignal): Promise; }