/** * Heartbeat API router for /api/heartbeat endpoints */ import { Router } from 'express'; import { CronScheduler } from '../scheduler/index.js'; import type { LastExecution } from './types.js'; import type { ExecutionLogStore } from './cron-handler.js'; /** * Default heartbeat prompt for scheduled reports */ export declare const DEFAULT_HEARTBEAT_PROMPT = "You are the MAMA OS orchestrator. Analyze the current state and update the dashboard.\n\nSteps:\n1. Search recent decisions: mama_search({query: \"recent\", limit: 20})\n2. Analyze the data: identify key projects, urgent items, stale decisions, and patterns\n3. Write a dashboard briefing as HTML and publish it:\n\nreport_publish({\n slots: {\n briefing: \"\",\n alerts: \"\",\n activity: \"\",\n pipeline: \"\"\n }\n})\n\nIMPORTANT:\n- You are writing for a human team. Analyze and interpret, don't just list data.\n- Use inline styles (font-family:Fredoka for headings, colors: #1A1A1A text, #6B6560 secondary, #D94F4F red, #3A9E7E green)\n- Be concise. Each slot should be a focused section, not a wall of text.\n- If there are no alerts, set alerts to empty string \"\"."; /** * Heartbeat execution tracker interface */ export interface HeartbeatTracker { /** Get the last heartbeat execution */ getLastExecution(): Promise; /** Record a heartbeat execution */ recordExecution(execution: LastExecution): Promise; } /** * In-memory heartbeat tracker (placeholder until S6) */ export declare class InMemoryHeartbeatTracker implements HeartbeatTracker { private lastExecution; getLastExecution(): Promise; recordExecution(execution: LastExecution): Promise; } /** * Options for creating heartbeat router */ export interface HeartbeatRouterOptions { /** Scheduler instance */ scheduler: CronScheduler; /** Log store for execution logs */ logStore: ExecutionLogStore; /** Heartbeat tracker */ tracker?: HeartbeatTracker; /** Heartbeat execution callback */ onHeartbeat?: (prompt: string) => Promise<{ success: boolean; error?: string; }>; } /** * Create heartbeat API router */ export declare function createHeartbeatRouter(options: HeartbeatRouterOptions): Router; //# sourceMappingURL=heartbeat-handler.d.ts.map