// tools/configure-checkpoint-policy.ts — Configure auto checkpoint policy (SPEC-563).
import { sessionTracker } from '../engine/session/session-tracker.js';
import { compactResult } from './output-formatter.js';
/**
 * Handle the configure_checkpoint_policy tool.
 * Updates threshold and/or enabled flag, returns the current policy.
 */
export function handleConfigureCheckpointPolicy(args) {
    sessionTracker.setPolicy({
        threshold: args.threshold,
        enabled: args.enabled,
    });
    const policy = sessionTracker.getPolicy();
    return compactResult(`Checkpoint policy updated for ${args.projectPath}.\n` +
        `Threshold: every ${String(policy.threshold)} calls, ` +
        `enabled: ${String(policy.enabled)}.`);
}
//# sourceMappingURL=configure-checkpoint-policy.js.map