import { CLI_REMEDIATION_INSTRUCTIONS } from "../../../core/cli-remediation.js";
import { attachPolicyMeta } from "../attach-planning-response-meta.js";
import { planningGenPolicyGate } from "../planning-generation-gate.js";
import { runSynthesizeTranscriptChurnCommand } from "../synthesize-transcript-churn-runtime.js";
export async function runSynthesizeTranscriptChurnOnCommand(ctx, planning, args) {
    const pgSyn = planningGenPolicyGate(ctx, args, CLI_REMEDIATION_INSTRUCTIONS.synthesizeTranscriptChurn, planning.sqliteDual.getPlanningGeneration());
    if (pgSyn.block) {
        return pgSyn.block;
    }
    const res = await runSynthesizeTranscriptChurnCommand(ctx, args);
    if (res.ok && res.data && typeof res.data === "object") {
        attachPolicyMeta(res.data, ctx, planning.sqliteDual.getPlanningGeneration(), pgSyn.warnings);
    }
    return res;
}
