import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
export interface ModifiedFile {
    category: string;
    relativePath: string;
    /** "modified" = manifest hash mismatch; "untracked" = no manifest entry (file exists but never recorded). */
    state: "modified" | "untracked";
}
/**
 * Enumerate files in .forge/{personas,skills,workflows,templates}/ and return
 * those whose state diverges from the manifest baseline. Two divergence states
 * are surfaced (both warrant a prompt before overwrite):
 *
 * - "modified": file content differs from the recorded manifest hash. Typically
 *   caused by /forge:enhance Phase 2 applying edits in-place.
 * - "untracked": file exists on disk but has NO manifest entry. Caused by a
 *   prior regenerate that ran `clear-namespace` without re-recording. A fresh
 *   /forge:init records hashes for every generated file, so "untracked" should
 *   never appear in a clean install — its presence signals user content that's
 *   been disconnected from the tracking system. See forge-cli#30.
 *
 * Pure function (no I/O beyond fs reads + manifest tool spawns).
 */
export declare function findModifiedStructuralFiles(cwd: string, toolsRoot: string): ModifiedFile[];
/**
 * Copy bundled tools (*.cjs, *.js, lib/) from bundleToolsRoot into cwd/.forge/tools/.
 *
 * Atomic handler pattern: no LLM in the loop, errors surfaced via returned messages[],
 * not throw. Accepts _testBundleToolsRoot for test isolation (defaults to getBundledToolsRoot()).
 *
 * When singleTool is provided (e.g. "store-cli"), only that file is copied (both .cjs
 * variant checked first). Used by the `forge:rebuild tools <name>` sub-target.
 *
 * @param cwd            Project root directory (must contain .forge/)
 * @param _testBundleToolsRoot  Override bundle tools root for tests; omit to use getBundledToolsRoot()
 * @param singleTool     Optional: copy only this one tool by stem name (without extension)
 */
export declare function runRebuildTools(cwd: string, _testBundleToolsRoot?: string, singleTool?: string): {
    messages: string[];
};
export declare function registerRegenerate(pi: ExtensionAPI): void;
