/** * `hold` — soft stop: pause claiming AND disarm ticks; daemon and pane stay up. * * Moved out of cli.ts's switch by the per-verb module split (#462); * only the case wrapper, the injected `ctx` lookups and the imports * changed from the original bodies. */ import type { CommandContext } from "./context.ts"; import { hold } from "../fleet.ts"; import { dim, ok } from "../ui/style.ts"; export async function holdCommand(ctx: CommandContext): Promise { const keepTicks = ctx.argv.includes("--keep-ticks"); for (const project of ctx.targetProjects()) { const r = hold(project.name, "hold", keepTicks ? { keepTicks: true } : {}); process.stdout.write( ok( `held — claiming paused` + `${r.wasPaused ? " (already paused)" : ""}` + (r.disarmed === undefined ? "; ticks left armed — resume restores the fleet with no new arm challenge" : `; ticks disarmed at ${r.disarmed.path}` + `${r.disarmed.wasArmed ? "" : " (was already disarmed)"}`), ) + `\n${dim("daemon and pane left running; stop to stop the daemon too")}\n`, ); } }