import type { WebClient } from '@slack/web-api'; import type { InboxItem } from '../inbox/wake-queue.service.js'; import type { FeishuMessageClient } from '../feishu/client.js'; import type { ProviderRetryClass } from '../providers/provider-retry.js'; /** Why the runtime gave up on an inbox item, as passed to the failure-notice hook. */ export interface RuntimeItemFailure { error: unknown; /** Retry attempts spent before giving up (0 when the error was terminal at once). */ retryAttempts: number; retryClass: ProviderRetryClass | 'rate_limit_deferrals_exhausted' | 'unknown'; } export interface SlackFailureNoticePost { channel: string; text: string; thread_ts?: string; unfurl_links: false; unfurl_media: false; } /** * Short, requester-facing explanation. Deliberately plain: the person who * asked needs to know their message was dropped and that re-sending works — * not the provider's full diagnostic. */ export declare function failureNoticeText(failure: RuntimeItemFailure): string; export declare function failureReasonSummary(failure: RuntimeItemFailure): string; /** * Only messages that explicitly addressed the agent get a notice. Channel and * thread follows are passive observation; posting failures there would be noise * in someone else's conversation. */ export declare function shouldNotifyRequester(item: InboxItem): boolean; export declare function slackFailureNoticePost(item: InboxItem, failure: RuntimeItemFailure): SlackFailureNoticePost | undefined; export declare function postRuntimeFailureNotice(input: { agentId: string; failure: RuntimeItemFailure; feishuClient?: Pick; item: InboxItem; logger?: Pick; runtimeKind: string; slackClient?: Pick; }): Promise; //# sourceMappingURL=failure-notice.d.ts.map