import type { NotificationService } from "../types/notification.js"; /** * Production ingest endpoint, used when neither `options.ingest_url` nor * `NOTIFICATIONS_INGEST_URL` supplies one. The typical deployment IS production, * so the runtime boots and delivers with zero notification config; non-prod * environments must set the env var to point at their own ingest endpoint. */ export declare const DEFAULT_INGEST_URL = "https://notifications.prod.senpi.ai/notify"; export interface NotificationServiceOptions { /** Override for the `NOTIFICATIONS_INGEST_URL` env (tests / non-standard hosting). */ ingest_url?: string; /** The runtime's own Senpi auth token (MCP bearer). Doubles as the ingest-endpoint * bearer credential and, via its `senpi_user_id` claim, the recipient every * outgoing notification is stamped with. */ senpi_auth_token?: string; /** Override the per-request timeout in ms (tests). */ ingest_timeout_ms?: number; [key: string]: unknown; } /** * Map a raw LLM-decision error string to a user-facing notification message. * * Thin wrapper over {@link classifyDecisionError} — the two-bucket copy and the * failure-mode lookup live in `decision-errors.ts` (the single source of truth * shared with the retry logic in `openclaw-llm-decision.ts`). The runtime catches * errors from the LLM-decision call and passes `err.message` here. * * @param rawMessage - Error message thrown by the decision client (may embed an * OpenClaw gateway message). */ export declare function formatDecisionErrorNotification(rawMessage: string): string; /** * Create the runtime's notification service. Every notification is delivered by * POSTing the full structured envelope to the authenticated notification-ingest * endpoint — there is no other delivery path. The endpoint resolves in order: * `options.ingest_url`, then `NOTIFICATIONS_INGEST_URL`, then the production * default ({@link DEFAULT_INGEST_URL}), so the URL can never be missing. A missing * auth token is still a startup error (thrown here, not discovered later as * silent notification loss), so callers must construct this before a runtime * starts trading, not lazily on first notify. * * Failure paths inside this service log at warn, not error: a delivery failure is a * handled, degraded condition — the caller's notify() contract is fire-and-forget and * the next notification retries the transport fresh. */ export declare function createNotificationService(options?: NotificationServiceOptions): NotificationService; //# sourceMappingURL=notifications.d.ts.map