import type { Repositories } from "../repositories/index.js"; import type { ScheduledEventRow } from "../types.js"; /** * Detect the current active phase by finding the lowest phase number * among all open tasks with a `phase:N` tag. * * @returns The phase number (1–6) or null if no phase-tagged tasks are open. */ export declare function detectCurrentPhase(repos: Repositories): number | null; /** * Handles automatic triggering of scheduled events during session start * and task completion. */ export declare class EventTriggerService { private repos; constructor(repos: Repositories); /** * Trigger all session-start events: next_session, expired datetime, and every_session. * Returns the list of triggered events. */ triggerSessionEvents(): ScheduledEventRow[]; /** * Trigger task_complete events when a task is marked as done. * Also auto-schedules a phase gate event if PM-Full is enabled and * all tasks for the completed task's phase are now done. */ triggerTaskCompleteEvents(taskId: number): ScheduledEventRow[]; /** * If the completed task has a phase tag and all tasks for that phase are now * done, auto-schedule a phase gate event (next_session, high priority). * Only fires when PM-Full is active. Idempotent — won't duplicate if event exists. */ private schedulePhaseGateIfComplete; /** * Mid-session check for any triggered events (datetime only). */ checkEvents(): ScheduledEventRow[]; } //# sourceMappingURL=event-trigger.service.d.ts.map