UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

41 lines • 2.36 kB
/** * `/loop` command handler: native argument parsing and the user-facing surfaces. * * Parsing is pure native code (`parse.ts`) - the command never expands into a * model-facing parsing prompt. Starting a loop always goes through the extension's * controller, which persists and arms the schedule BEFORE dispatching the first tick, * so a failed first turn can never silently lose the job. * * Headless rejection: print/json modes have no interactive session, so the command * refuses with a one-line message and arms nothing. */ import type { ExtensionCommandContext } from "../../types.ts"; import type { LoopController, LoopCreateOk } from "./index.ts"; import type { CronEntry, LoopState } from "./types.ts"; export declare const LOOP_ARGUMENT_HINT = "[interval] [prompt] | stop [id|all] | status | pause | resume"; export declare const LOOP_COMMAND_DESCRIPTION = "Repeat a prompt on a fixed interval or a self-paced schedule (e.g. /loop 5m check the deploy)"; export interface LoopCommandDeps { readonly controller: LoopController; } /** * Argument completions for the subcommand keywords, modeled on the todo extension's * verb completions: prefix-filtered, `null` when nothing matches. */ export declare function completeLoopArguments(argumentPrefix: string): Array<{ value: string; label: string; }> | null; /** Fixed-loop confirmation: id, cron, effective cadence, rounding notice, expiry, stop command. */ export declare function formatFixedLoopConfirmation(outcome: LoopCreateOk, requestedRaw: string): string; /** Dynamic-loop confirmation, including the supersession line when one replaced another. */ export declare function formatDynamicLoopConfirmation(outcome: LoopCreateOk): string; /** Bare-invocation confirmation; the mode comes from the entry the controller created. */ export declare function formatBareLoopConfirmation(outcome: LoopCreateOk, entry: CronEntry | undefined): string; /** * The `/loop status` listing: the live status line (countdown + stop affordance) plus * one row per active loop. */ export declare function formatLoopStatusListing(statusLine: string | undefined, state: LoopState): string; /** The `/loop` command entry point. */ export declare function runLoopCommand(rawArgs: string, ctx: ExtensionCommandContext, deps: LoopCommandDeps): Promise<void>; //# sourceMappingURL=command.d.ts.map