import { SchedulerError } from "@sema-agent/core"; import type { SchedulerCapability, ScheduledIntent, SchedulerContext, ScheduledTaskId, ScheduledTaskSummary } from "@sema-agent/core"; import type { SchedulerRecord } from "@sema-agent/settings-schema/scheduler-store"; export type { SchedulerRecord }; /** core `Result` shape (harness/types) — `{ok:true,value} | {ok:false,error}`. */ type Result = { ok: true; value: T; } | { ok: false; error: E; }; /** Default caps (fail-closed bounds; [ref] §3.9). Override per deployment. */ export declare const DEFAULT_SCHEDULER_CAPS: { readonly supported: true; readonly maxScheduledPerScope: 32; readonly minDelaySec: 10; readonly minCronIntervalSec: 60; readonly maxScheduledHorizonSec: number; readonly supportsSessionLifetime: true; readonly supportsSessionWakeup: true; }; type Caps = SchedulerCapability["schedulerCapabilities"]; /** * PURE validation of an intent against caps + now. Returns a SchedulerError or null (ok). No IO. Testable. * cron via core `isValidCronExpr` (RCE-safe, no shell-exec); delay/at bounded by minDelaySec + horizon. */ export declare function validateIntent(intent: ScheduledIntent, caps: Caps, nowMs: number): SchedulerError | null; /** The default shared store path: `SEMA_CONFIG_DIR` → `~/.sema`, file `scheduled_tasks.json` (server + shell agree). */ export declare function defaultSchedulerStorePath(): string; /** * File-backed SchedulerCapability (durable across daemon restarts). Store = a single JSON file (atomic write via * the registry-core /node binding). The resident shell daemon reads the same store to fire intents. `now` * injectable for tests. */ export declare class FileSchedulerBackend implements SchedulerCapability { readonly schedulerCapabilities: Caps; private readonly storePath; private readonly now; constructor(opts?: { storePath?: string; caps?: Partial; now?: () => number; }); private load; private save; schedule(intent: ScheduledIntent, ctx: SchedulerContext): Promise>; cancel(id: ScheduledTaskId, ctx: SchedulerContext): Promise>; list(ctx: SchedulerContext): Promise>; } //# sourceMappingURL=scheduler-support.d.ts.map