import type { SlackResult } from "./slack-api.js"; export type ActivityLogLevel = "errors" | "actions" | "verbose"; export type ActivityLogTone = "info" | "success" | "warning" | "error"; export interface ActivityLogField { label: string; value: string | number | boolean | null | undefined; } export interface ActivityLogEntry { kind: string; level: ActivityLogLevel; title: string; summary: string; details?: string[]; fields?: ActivityLogField[]; tone?: ActivityLogTone; timestamp?: string; } export interface LoggedActivityLogEntry extends ActivityLogEntry { timestamp: string; } export interface SlackActivityLoggerDeps { getBotToken: () => string | undefined; getLogChannel: () => string | undefined; getLogLevel: () => string | undefined; getAgentName: () => string; getAgentEmoji: () => string; resolveChannel: (nameOrId: string) => Promise; slack: (method: string, token: string, body?: Record) => Promise; onError?: (error: unknown) => void; now?: () => Date; maxRecentEntries?: number; } export declare function normalizeActivityLogLevel(value: string | undefined): ActivityLogLevel; export declare function shouldLogActivity(configuredLevel: ActivityLogLevel, eventLevel: ActivityLogLevel): boolean; export declare function redactSensitiveText(value: string): string; export declare function buildActivityLogText(agentName: string, agentEmoji: string, entry: LoggedActivityLogEntry): string; export declare function buildActivityLogBlocks(agentName: string, agentEmoji: string, entry: LoggedActivityLogEntry): Record[]; export declare function buildActivityLogThreadHeader(agentName: string, agentEmoji: string, dateKey: string): { text: string; blocks: Record[]; }; export declare function formatRecentActivityLogEntries(entries: ReadonlyArray): string; export declare class SlackActivityLogger { private readonly deps; private readonly queue; private readonly recent; private readonly maxRecentEntries; private flushTimer; private flushRunning; private resolvedChannelCache; private dailyThreadCache; constructor(deps: SlackActivityLoggerDeps); log(entry: ActivityLogEntry): void; getRecentEntries(limit?: number): LoggedActivityLogEntry[]; clearPending(): void; private getNow; private scheduleFlush; private flushNext; private resolveLogChannel; private ensureDailyThread; private postEntry; }