import type { ParsedArgs } from "../../shared/types.js"; import { type CreateScheduleRunFromSourceResult, type Run, type VeryfrontRunsClient } from "../../../src/runs/index.js"; import { type ScheduleDefinition } from "../../../src/schedule/index.js"; import { type ResolvedTriggerTarget, type TriggerTarget } from "../../../src/trigger/index.js"; interface RemoteSchedulePollOptions { now?: () => number; sleep?: (delayMs: number) => Promise; } interface LocalScheduleTimeoutOptions { maxDelaySeconds?: number; setTimer?: (callback: () => void, delayMs: number) => ReturnType; clearTimer?: (timerId: ReturnType) => void; } export interface LocalScheduleTimeout { readonly signal: AbortSignal | undefined; dispose(): void; } /** * Create a disposable cooperative timeout for one local schedule execution. * * Long durations are armed in bounded chunks so timer coercion cannot shorten * the configured deadline. */ export declare function createLocalScheduleTimeout(timeoutSeconds: number | undefined, options?: LocalScheduleTimeoutOptions): LocalScheduleTimeout; export declare function normalizeLocalScheduleInput(value: unknown): Record; /** * Build the local agent run options for one scheduled occurrence. * * Addressing comes from the canonical target, falling back to the legacy * `input._schedule_target` channel written by older SDKs. Prompt content comes * from `agentMessage.prompt`, falling back to the legacy `input.prompt`. * * Neither fallback may drop authored content, and this function is what * supplies that invariant here: `--input` replaces the authored input without * passing through `schedule()`, so an operator file can disagree with the * definition no matter what the definition itself was validated against. Two * declarations of one value that disagree are rejected rather than resolved, * leaving only the equal-or-absent case for the fallbacks to read. */ export declare function toScheduleAgentOptions(schedule: ScheduleDefinition, input: Record): { agentInput?: string; agentContext?: Record; }; export declare function waitForRemoteScheduleRun(client: Pick, accepted: CreateScheduleRunFromSourceResult, options?: RemoteSchedulePollOptions): Promise; export declare function formatRemoteScheduleRunOutput(run: Run): Record; export declare function resolveRemoteScheduleTarget(run: Run, fallback: TriggerTarget): ResolvedTriggerTarget; export declare function handleScheduleCommand(args: ParsedArgs): Promise; export {}; //# sourceMappingURL=handler.d.ts.map