import type { AgentEndEvent, ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { PiGitConfig } from "./config.js"; import type { OrganizerResult } from "./commit-events.js"; /** Marker used for checkpoint commits created at `turn_end`. */ export declare const WIP_COMMIT_MARKER = "wip(checkpoint):"; /** One logical commit produced by the reorganiser. */ export interface CommitGroup { /** Full Conventional Commits message (subject + optional body/footer). */ message: string; /** Files that belong exclusively to this commit. */ files: string[]; } /** * At `agent_end`, detect any WIP checkpoint commits created during the agent * loop and reorganise them into logical Conventional Commits. * * The function uses the current model to analyse the combined diff and the * assistant's own explanations (from `event.messages`) to decide how to split * the changes. If the LLM call fails or the response cannot be parsed, it * falls back to a single Conventional Commit containing all changes. */ export declare function organizeWipCommits(pi: ExtensionAPI, ctx: ExtensionContext, config: PiGitConfig, event: AgentEndEvent): Promise; /** * Parse the LLM response into commit groups. * * Exported for testing. * * Expected format (N starts at 1): * * === COMMIT N === * type(scope): description * * Body line. * === FILES === * path/to/file1.ts * path/to/file2.ts * === END === */ export declare function parseCommitGroups(text: string): CommitGroup[]; //# sourceMappingURL=commit-organizer.d.ts.map