/** * Telemetry event name constants for all agentic AI features. * * Centralised here so backend routes and web components can reference * a single source of truth for event names (Phase 0.5). * * TODO-008: Wire trackEvent() calls into backend routes * Priority: medium | Phase: B * These constants are defined but not yet imported anywhere. Wire them in: * - agent-actions/routes.ts: AGENT_INBOX_ACTION_APPROVED on approve, * AGENT_INBOX_ACTION_REJECTED on reject, AGENT_INBOX_BATCH_APPROVED on batch * - server.ts context-message route: AI_CONTEXT_ENRICHED when source='llm', * AI_CONTEXT_FALLBACK_USED when source='keyword' or 'generic' * - Use: import { bufferEvent } from './telemetry.js' then bufferEvent(EVENT_NAME, { ...metadata }) */ // ── MCP ─────────────────────────────────────────────────────── export const MCP_TOOL_EXECUTED = 'mcp.tool_executed'; export const MCP_TOOL_FAILED = 'mcp.tool_failed'; // ── Day Planner ─────────────────────────────────────────────── export const PLANNER_DAY_PLANNED = 'planner.day_planned'; export const PLANNER_PLAN_APPLIED = 'planner.plan_applied'; export const PLANNER_PLAN_REJECTED = 'planner.plan_rejected'; // ── Agent Inbox ─────────────────────────────────────────────── export const AGENT_INBOX_ACTION_APPROVED = 'agent_inbox.action_approved'; export const AGENT_INBOX_ACTION_REJECTED = 'agent_inbox.action_rejected'; export const AGENT_INBOX_BATCH_APPROVED = 'agent_inbox.batch_approved'; // ── Tempo Mode ──────────────────────────────────────────────── export const TEMPO_DRIFT_DETECTED = 'tempo.drift_detected'; export const TEMPO_ADJUSTMENT_APPLIED = 'tempo.adjustment_applied'; // ── Routine Suggestions ─────────────────────────────────────── export const ROUTINE_SUGGEST_SHOWN = 'routine_suggest.shown'; export const ROUTINE_SUGGEST_ACCEPTED = 'routine_suggest.accepted'; export const ROUTINE_SUGGEST_DISMISSED = 'routine_suggest.dismissed'; // ── AI Context Messages ─────────────────────────────────────── export const AI_CONTEXT_ENRICHED = 'ai_context.enriched'; export const AI_CONTEXT_FALLBACK_USED = 'ai_context.fallback_used'; // ── Webhooks ────────────────────────────────────────────────── export const WEBHOOK_DISPATCHED = 'webhook.dispatched'; export const WEBHOOK_FAILED = 'webhook.failed';