/** * Shared ticker logic — used by both the standalone daemon and the MCP server. * * Extracts schedule setup and tick execution so either process can run * the gather loop without duplicating the core logic. */ import { Registry } from '../core/registry.ts'; import type { GatherContext } from '../core/types.ts'; export interface Schedule { pluginName: string; intervalMs: number; lastFired: number; } export interface TickCallbacks { /** Called for each plugin that returns text on a tick. */ onResult?: (pluginName: string, text: string) => void; } /** * Load plugins, build registry, and compute interval schedules. * Initializes provider-scoped state directory. * Returns null if no interval plugins are configured. */ export declare function setupTicker(provider: string): Promise<{ registry: Registry; schedules: Schedule[]; tickMs: number; context: GatherContext; } | null>; /** * Run one tick: gather all due plugins, update state + cache, call onResult for each. */ export declare function tick(registry: Registry, schedules: Schedule[], context: GatherContext, callbacks?: TickCallbacks): Promise;