/** * The per-project cron that fires the `factory-environment-build` workflow, * kept in core `Schedules` (one row per project) rather than a factory * column: the scheduler owns firing, claims and the run trigger log, factory * only creates, pauses, resumes and reads the row. */ import type { Schedules } from '@mastra/core/schedules'; export declare const SCHEDULES_UNAVAILABLE_ERROR_ID = "SCHEDULES_NO_SCHEDULES_STORAGE"; /** * The project's schedule id in its stored form. Core normalizes a created * id to `schedule_` and resolves a bare id to `agent_` on reads, * so factory always addresses the row by the normalized id (a project id is * a lower-case uuid, which slugifies to itself). */ export declare function scheduleIdFor(projectId: string): string; export interface EnvironmentBuildSchedule { enabled: boolean; cron: string | null; timezone: string | null; } export type ScheduleService = Pick; /** * Whether the host's storage implements the schedules domain. `mastra.schedules` * never throws on access; the missing store surfaces on the first call. */ export declare function probeSchedulesAvailable(schedules: ScheduleService): Promise; /** `undefined` when the cron parses; otherwise the validator's message. */ export declare function invalidCronMessage(cron: string, timezone?: string): string | undefined; /** The project's build schedule as the environment reports it. */ export declare function readSchedule(schedules: ScheduleService, projectId: string): Promise; /** * Create, update, pause or resume the project's schedule so it matches * `input`. Disabling a project that never had a schedule creates nothing. */ export declare function ensureSchedule(schedules: ScheduleService, projectId: string, input: { enabled: boolean; cron: string; timezone?: string; }): Promise; //# sourceMappingURL=build-schedule.d.ts.map