import type { BotDisplayProfiles } from '../chat-sender-display.js'; import type { ArkmeSessionCredentials } from '../keychain-store.js'; import type { createOpenClawProvisioner, OpenClawProvisionResult } from '../openclaw/index.js'; import { SecretValue } from '../secret-value.js'; import type { ArkmeBotList, ArkmeBotManageProfile, ArkmeBotSummary, ArkmeBotWebhookSecurity, ArkmeSourceItem } from '../types.js'; import type { ArkmeBotCreateInput, ArkmeBotCreateResult, ArkmeGroupBotList, ArkmeGroupBotMutationResult } from '../tools/ports/bots.js'; import { SourceService, type ArkmeSourceRefPayload } from './source-service.js'; import { type ConversationListPreferenceEntry } from './conversation-list-preference-service.js'; import { ServiceRuntime } from './service.js'; export type BotConversationTarget = { kind: 'subject'; subjectUid: string; } | { kind: 'chat'; chatSessionUid: string; } | { kind: 'unavailable'; reason: 'missing' | 'conflict' | 'duplicate_chat_target'; }; export interface ArkmeBotRefPayload { version: 2; userId: number; botId: string; provider: 'openclaw' | 'webhook'; target: BotConversationTarget; conversationListActivityAtMillis: number; } export interface ArkmeBotImageEntry { viewerUserId: number; sourceUrl: string; expiresAtMillis: number; } export interface ArkmeMentionableBot { botId: string; name: string; } export interface ArkmeBotManageUpdateInput { name: string; description: string; avatar?: string; mentionEntryEnabled?: boolean; webhookSecurity?: ArkmeBotWebhookSecurity; } export declare function arkmeNormalizeBotProvider(value: unknown): 'openclaw' | 'webhook' | undefined; export declare class BotService { private readonly runtime; private readonly source; private readonly refOptions; private openClawProvisioner; private readonly botRefs; private readonly botRefByKey; private readonly botImageRefs; private readonly botImageRefByKey; constructor(runtime: ServiceRuntime, source: SourceService, refOptions?: { ttlMillis?: number; maxEntries?: number; now?: () => number; randomId?: () => string; }); dispose(): void; clearAccountRefs(): void; attachOpenClawProvisioner(provisioner: ReturnType): void; connectOpenClawBot(botRef: string, options?: { signal?: AbortSignal; }): Promise; listBots(options?: { signal?: AbortSignal; }): Promise; countBots(options?: { signal?: AbortSignal; }): Promise; createBot(input: ArkmeBotCreateInput, options?: { signal?: AbortSignal; }): Promise; /** Browser-safe result: the one-time credential never leaves the Host owner. */ createBotSummary(input: ArkmeBotCreateInput, options?: { signal?: AbortSignal; }): Promise; revealBotSecret(botRef: string, options?: { signal?: AbortSignal; }): Promise; manageBotProfile(botRef: string, options?: { signal?: AbortSignal; }): Promise; updateManagedBot(botRef: string, input: ArkmeBotManageUpdateInput, options?: { signal?: AbortSignal; }): Promise; revealManagedBotToken(botRef: string, options?: { signal?: AbortSignal; }): Promise<{ token: string; }>; deleteManagedBot(botRef: string, confirmationName: string, options?: { signal?: AbortSignal; }): Promise; openBotChat(botRef: string, options?: { signal?: AbortSignal; }): Promise; private resolveBotConnectionMetadata; listGroupBots(groupSourceRef: string, options?: { signal?: AbortSignal; }): Promise; addGroupBot(groupSourceRef: string, botRef: string, options?: { signal?: AbortSignal; }): Promise; removeGroupBot(groupSourceRef: string, botRef: string, options?: { signal?: AbortSignal; }): Promise; private confirmGroupBotState; private openGroupSourceRef; senderDisplayProfiles(session: ArkmeSessionCredentials, signal?: AbortSignal): Promise; listMentionableGroupBots(group: ArkmeSourceRefPayload, session: ArkmeSessionCredentials, signal?: AbortSignal): Promise; private resolveGroupBotBindingBody; private botSummaryBaseFromData; private botSummaryFromData; private groupBotSummaryFromData; private botManageProfileFromData; botAvatarProjection(raw: Record, userId: number, botId: string): { avatarRef?: string; }; private pruneBotImageRefs; openBotImageRef(imageRef: string, expectedViewerUserId: number): Promise; private sealBotRef; private botDirectoryKey; /** A cached directory entry is a lookup, never a persisted live target/capability. */ restoreDirectoryBots(items: ArkmeBotSummary[], userId: number): Promise; private openDirectoryBotRef; openBotRef(botRef: string, expectedUserId: number): Promise; botConversationListPreferenceEntry(botRef: string): Promise; private pruneBotRefs; private deleteBotRef; private now; } //# sourceMappingURL=bot-service.d.ts.map