/** * Default scheduled-job registration — wires the existing job implementations * to the scheduler as default-DISABLED, conservative-interval jobs. * * This does NOT rewrite the existing jobs. It registers their existing * entrypoints as handlers and defines default job rows. A deployment opts in by * setting MASSA_TH0TH_SCHEDULER_ENABLED=true (master switch) AND the per-kind * enable env var (e.g. MASSA_TH0TH_SCHEDULER_CONSOLIDATION_ENABLED=true). * * Job kinds and their existing entrypoints: * memory-consolidation → memoryConsolidationJob.consolidate() * decay-sweep → memoryConsolidationJob.consolidate() (decay is a * phase inside consolidate; there is no standalone * decay-sweep entrypoint — decay.ts is a pure fn called * by consolidate's decayStaleMemories phase). We map * decay-sweep to the same handler so a clock-triggered * decay pass runs the full consolidate cycle, which * includes decay + prune + merge. This is the safest * reuse: the existing debounce trigger already calls * consolidate(), and the scheduler does the same on a * clock. * auto-improve → autoImproveJob.runOnce(projectId) * observation-bridge → observationConsolidationJob.runOnce(projectId) * * IMPORTANT: the scheduler must NEVER trigger indexing jobs (OOM risk per * project memory). Only memory/decay/consolidation/auto-improve/observation * jobs are registered here. */ import type { Scheduler } from "./scheduler.js"; import type { JobKind, ScheduleSpec } from "./scheduler-types.js"; interface DefaultJobDef { id: string; name: string; jobKind: JobKind; schedule: ScheduleSpec; /** Default enable state (env can override). */ defaultEnabled: boolean; /** Env var that overrides the enable flag. */ enableEnvVar: string; /** Env var that overrides the interval (ms). */ intervalEnvVar: string; } export declare const DEFAULT_SCHEDULED_JOBS: DefaultJobDef[]; /** * Register the existing job implementations as handlers on the scheduler, and * upsert default job definitions (default-disabled). Call this ONCE at boot, * before scheduler.start(). * * The handlers are imported lazily (inside the function) to avoid pulling the * heavy job deps at module-eval time and to keep the scheduler module itself * free of direct job dependencies. */ export declare function registerDefaultJobs(scheduler: Scheduler): void; export {}; //# sourceMappingURL=scheduler-defaults.d.ts.map