/**
 * Agent Prompts — storage + CLAUDE.md insert/remove helpers.
 *
 * Two scopes:
 *   - Global: ~/.ccweb/agent-prompts[-<username>].json (per-user isolation,
 *     same pattern as global-shortcuts-<user>.json)
 *   - Project: {projectFolder}/.ccweb/agent-prompts.json
 *
 * CLAUDE.md operations are always targeted at a specific project folder and
 * are decoupled from prompt storage — the frontend passes the raw prompt text
 * to /toggle, so insertion/removal doesn't care whether the text originated
 * from a global or project prompt.
 *
 * Line-ending normalisation: file content is normalised to LF on read, and
 * written back with LF. This avoids \r\n-vs-\n mismatches silently breaking
 * the "exact text match" contract when a file has been edited on Windows.
 */
import { AgentPrompt, CliTool } from './types';
declare function instructionsFilename(cliTool?: CliTool): string | null;
export declare function instructionsFilePath(folderPath: string, cliTool?: CliTool): string | null;
export { instructionsFilename };
export declare function readGlobalPrompts(username?: string): AgentPrompt[];
export declare function writeGlobalPrompts(list: AgentPrompt[], username?: string): void;
export declare function readProjectPrompts(folderPath: string): AgentPrompt[];
export declare function writeProjectPrompts(folderPath: string, list: AgentPrompt[]): void;
declare function claudeMdPath(folderPath: string, cliTool?: CliTool): string;
/** Read the project instructions file, normalising CRLF → LF. Returns empty
 *  string if the file doesn't exist (treated as "no content yet"). */
export declare function readClaudeMd(folderPath: string, cliTool?: CliTool): string;
export declare function writeClaudeMd(folderPath: string, content: string, cliTool?: CliTool): void;
/** Exact substring check (after LF normalisation). */
export declare function isInserted(claudeMd: string, command: string): boolean;
/**
 * Append the command to the instructions file separated by a blank line.
 * Idempotent: if the exact text already appears anywhere in the file, no
 * changes are made.
 *
 * Returns { changed: true } if the file was written, { changed: false } if
 * the text was already present.
 */
export declare function insertIntoClaudeMd(folderPath: string, command: string, cliTool?: CliTool): {
    changed: boolean;
};
/**
 * Remove the command from CLAUDE.md via exact text match. Attempts two
 * patterns in order:
 *   1. '\n\n' + command + '\n'   — the exact form we insert
 *   2. command                    — plain match anywhere (covers manual-insert
 *                                    variants)
 * If neither matches, returns { changed: false, reason: 'not-found' } so the
 * caller can surface a "please delete manually" prompt to the user.
 *
 * Returns { changed: false, reason: 'not-present' } if the text simply isn't
 * in the file (e.g. already removed / never inserted) — distinguishable from
 * 'not-found' by callers that want to stay silent in that case.
 */
export declare function removeFromClaudeMd(folderPath: string, command: string, cliTool?: CliTool): {
    changed: true;
    removed: 1;
} | {
    changed: false;
    reason: 'not-found' | 'not-present';
};
/** Attach `inserted: boolean` to each prompt based on a claudeMd snapshot. */
export declare function annotateInserted(prompts: AgentPrompt[], claudeMd: string): Array<AgentPrompt & {
    inserted: boolean;
}>;
/** Validate label + command payload; returns null on success or an error message. */
export declare function validatePromptInput(body: Partial<AgentPrompt>): {
    label: string;
    command: string;
} | string;
export { claudeMdPath };
//# sourceMappingURL=agent-prompts.d.ts.map