import type { Api, Model } from "@earendil-works/pi-ai/compat";
import type { ModelRegistry } from "../model-registry.ts";
import type { SessionManager } from "../session-manager.ts";
import type { BuildSystemPromptOptions } from "../system-prompt.ts";
import type { CompactOptions, ContextUsage, ExtensionCommandContext, ExtensionContext, ExtensionMode, ExtensionUIContext, OrchestrationContext } from "./types.ts";
import type { ForkHandler, NavigateTreeHandler, NewSessionHandler, ReloadHandler, SwitchSessionHandler } from "./runner-handlers.ts";
export interface ExtensionContextSource {
    assertActive(): void;
    getUIContext(): ExtensionUIContext;
    getMode(): ExtensionMode;
    hasUI(): boolean;
    getCwd(): string;
    getSessionManager(): SessionManager;
    getModelRegistry(): ModelRegistry;
    getModel(): Model<Api> | undefined;
    getOrchestrationContext(): OrchestrationContext | undefined;
    isIdle(): boolean;
    isProjectTrusted(): boolean;
    getSignal(): AbortSignal | undefined;
    abort(): void;
    hasPendingMessages(): boolean;
    shutdown(): void;
    getContextUsage(): ContextUsage | undefined;
    compact(options?: CompactOptions): void;
    getSystemPrompt(): string;
}
export interface ExtensionCommandContextSource extends ExtensionContextSource {
    getSystemPromptOptions(): BuildSystemPromptOptions;
    waitForIdle(): Promise<void>;
    newSession: NewSessionHandler;
    fork: ForkHandler;
    navigateTree: NavigateTreeHandler;
    switchSession: SwitchSessionHandler;
    reload: ReloadHandler;
}
/**
 * Create an ExtensionContext for use in event handlers and tool execution.
 * Context values are resolved at call time, so host changes are reflected.
 */
export declare function createExtensionContext(source: ExtensionContextSource): ExtensionContext;
export declare function createExtensionCommandContext(source: ExtensionCommandContextSource): ExtensionCommandContext;
//# sourceMappingURL=runner-context.d.ts.map