/** * Team event system — JSONL-based append-only event log. * * Mirrors OMX appendTeamEvent semantics. All team-significant actions * (task completions, failures, worker state changes, shutdown gates) * are recorded as structured events for observability and replay. * * Events are appended to: .omc/state/team/{teamName}/events.jsonl */ import type { TeamEventType } from './contracts.js'; import type { TeamEvent } from './types.js'; /** * Append a team event to the JSONL event log. * Thread-safe via atomic append (O_WRONLY|O_APPEND|O_CREAT). */ export declare function appendTeamEvent(teamName: string, event: Omit, cwd: string): Promise; /** * Read all events for a team from the JSONL log. * Returns empty array if no events exist. */ export declare function readTeamEvents(teamName: string, cwd: string): Promise; /** * Read events of a specific type for a team. */ export declare function readTeamEventsByType(teamName: string, eventType: TeamEventType, cwd: string): Promise; /** * Emit monitor-derived events by comparing current task/worker state * against the previous monitor snapshot. This detects: * - task_completed: task transitioned to 'completed' * - task_failed: task transitioned to 'failed' * - worker_idle: worker was working but is now idle * - worker_stopped: worker was alive but is now dead */ export declare function emitMonitorDerivedEvents(teamName: string, tasks: Array<{ id: string; status: string; }>, workers: Array<{ name: string; alive: boolean; status: { state: string; }; }>, previousSnapshot: { taskStatusById?: Record; workerAliveByName?: Record; workerStateByName?: Record; completedEventTaskIds?: Record; } | null, cwd: string): Promise; //# sourceMappingURL=events.d.ts.map