import { type CloseCommitResult } from '../core/close-commit'; import { type SprintCloseTransaction } from '../checkpoints/sprint-close'; import type { OperationPlan, SprintCloseCheckpointV1, SprintFile, SprintGitEnd } from '../types'; /** * Deterministic, lossless scope close. The TOOL — not the agent — owns the destructive step. * * Guarantee: an immutable full-scope checkpoint is published before any mutable state changes. * The legacy ActiveSprint snapshot remains available for compatible readers. A matching checkpoint * makes retries idempotent; conflicting content or divergent live state is never overwritten. * * The agent still owns additive judgment work (conventions and debt extraction). The CLI owns the * checkpoint, narrative, compatible snapshot, and compare-and-swap live-state transition. */ export interface CloseSprintArgs { scope: string | null; outcome: string; outcomeExplicit: boolean; note: string | null; summary: string | null; recommendations: string[]; learnings: string[]; dryRun: boolean; yes: boolean; help: boolean; } export declare function runCloseSprintCommand(rawArgs: string[]): Promise; /** What a confirmed close hands to the post-lock step (shared by CLI and MCP). */ export interface PostCloseContext { scope: string; sprintN: number; title: string; outcome: string; nextAction: string; /** Exactly the paths the close transaction wrote (never a project-state file it only verified). */ paths: string[]; git: SprintGitEnd | undefined; /** True when the close resumed an existing checkpoint instead of creating one. */ resumed: boolean; } export type CloseGitReport = { recorded: true; branch: string | null; endCommit: string; dirty: boolean; } | { recorded: false; reason: string; }; export interface CloseFinalization { git: CloseGitReport; /** Null when git.commitOnSprintClose is not enabled. */ commit: CloseCommitResult | null; warnings: string[]; } /** First release whose checkpoints carry close.git; older runtimes reject them (ADR-0001). */ export declare const CLOSE_GIT_MIN_RUNTIME = "6.5.0"; export declare function postCloseContext(transaction: SprintCloseTransaction, resumed: boolean, nextAction: string): PostCloseContext; /** Git report, warnings, and the opt-in commit. Never throws; never changes the closed state. */ export declare function finalizeClose(context: PostCloseContext): CloseFinalization; export declare function buildClosePlan(scope: string, args: CloseSprintArgs): { sprint: SprintFile; plan: OperationPlan[]; snapshotPath: string; checkpointPath: string; transaction: SprintCloseTransaction; }; export declare function compareCheckpointRecency(left: SprintCloseCheckpointV1, right: SprintCloseCheckpointV1): number; //# sourceMappingURL=close-sprint.d.ts.map