import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
import { extractPersonaNames } from "../lib/frontmatter-parser.js";
export { extractPersonaNames };
import { checkMaterialization, type MaterializationCheck } from "../lib/manifest-checker.js";
export { checkMaterialization, type MaterializationCheck };
export type EnhancePhase = 1 | 2 | 3;
export interface ParsedArgs {
    phase: EnhancePhase;
    extra: string;
    rawPhaseFlag: string;
}
export declare function parseEnhanceArgs(rawArgs: string): ParsedArgs;
export interface ComposeKickoffOpts {
    workflowMd: string;
    personaIdentity: string;
    parsed: ParsedArgs;
    cwd: string;
    timestamp: string;
}
export declare function composeKickoff(opts: ComposeKickoffOpts): string;
export declare function defaultNow(): Date;
export declare function formatTimestamp(d: Date): string;
export interface RegisterEnhanceOptions {
    cwd?: string;
    now?: () => Date;
}
/**
 * Run the enhance kickoff flow in-process (kickoff-dispatch fix).
 *
 * pi's `sendUserMessage` deliberately bypasses extension-command dispatch —
 * agent-session.ts routes it through `prompt(text, { expandPromptTemplates:
 * false })`, and the slash-command branch in `prompt()` is gated on
 * `expandPromptTemplates`. So steering the literal string
 * "/forge:rebuild --enrich" via sendKickoff lands as PROSE in the
 * conversation; the registered handler never runs and the LLM is left to
 * improvise. pi also forbids queueing extension commands outright
 * (steer()/followUp() throw "cannot be queued").
 *
 * Callers that trigger enhancement programmatically (regenerate.ts
 * `--enrich`, post-init-hook.ts, post-sprint-hook.ts) MUST call this
 * function directly. The composed kickoff PROSE is still handed to the LLM
 * via sendKickoff at the end — that part is a legitimate steer.
 */
export declare function runEnhance(pi: ExtensionAPI, args: string, ctx: ExtensionCommandContext, options?: RegisterEnhanceOptions): Promise<void>;
export declare function registerEnhance(pi: ExtensionAPI, options?: RegisterEnhanceOptions): void;
