import type { ExtensionAPI, ExtensionCommandContext, ExtensionContext } from "@earendil-works/pi-coding-agent"; import { type FreshSessionProjectionEvidence, type FreshSessionReplacementPort } from "../integration/fresh-session-dispatcher.js"; import { AmqCliAdapter } from "../transport/amq-cli-adapter.js"; import { type SessionProjectionLookup } from "../transport/inbox-pump.js"; import { type DeliveryRequest, type DeliveryResult } from "../transport/priority-delivery-scheduler.js"; import type { AmqMessage } from "../transport/amq-message.js"; export declare class PiAmqRuntime { #private; constructor(pi: ExtensionAPI); register(): void; start(ctx: ExtensionContext): Promise; shutdown(): Promise; } export declare function parseCleanupCommand(raw: string): { readonly older_than_ms: number; readonly dry_run: boolean; readonly yes: boolean; }; export declare function diagnoseBindingFailure(adapter: Pick, primary: string, root: string, handle: string): Promise; export declare function diskLineContainsMessage(line: string, messageId: string): boolean; export declare class PiDeliverySink { #private; constructor(pi: ExtensionAPI, lookup: SessionProjectionLookup); deliver(request: DeliveryRequest): Promise; } /** * Bridges the `FreshSessionReplacementPort` contract to real pi command-context session * control (design.md ยง8.3). `waitForIdle` cannot itself call `ctx.waitForIdle()`: that method * only exists on `ExtensionCommandContext`, which pi hands over solely by dispatching the * `/amq-new-task` command, and dispatch requires the message ID that `waitForIdle` never * receives. So `replace()` fires that dispatch and correlates the eventual command-handler * completion (which performs the real `ctx.waitForIdle()` as its first step, unconditionally) * back to this call via a per-messageId handoff. */ export declare class PiFreshSessionReplacementPort implements FreshSessionReplacementPort { #private; constructor(pi: ExtensionAPI, options?: { readonly dispatchTimeoutMs?: number; }); waitForIdle(signal?: AbortSignal): Promise; replace(message: AmqMessage, signal?: AbortSignal): Promise<{ readonly cancelled: boolean; readonly projection?: FreshSessionProjectionEvidence; }>; /** Invoked by the registered `/amq-new-task` command once pi dispatches it. */ handleCommand(rawArgs: string, ctx: ExtensionCommandContext): Promise; } //# sourceMappingURL=runtime.d.ts.map