import { type AgentConfig, type AgentConnectFeishuRequest, type AgentFeishuRegisterAppRequest, type AgentFeishuScopeGrant, type AgentFeishuScopeStatus } from '../../shared/agent-config.js'; import { registerFeishuApp, type FeishuBotInfo } from '../feishu/client.js'; type RegisterFeishuApp = typeof registerFeishuApp; type GetFeishuBotInfo = (config: AgentConfig['feishu']) => Promise; type GetFeishuAppScopes = (config: AgentConfig['feishu']) => Promise; export type FeishuAppRegistrationState = 'starting' | 'waiting' | 'slow_down' | 'domain_switched' | 'connected' | 'failed'; export interface FeishuAppRegistrationStatus { agent?: Awaited>; error?: { code?: string; description?: string; message?: string; }; expireIn?: number; registrationId: string; state: FeishuAppRegistrationState; verificationUrl?: string; } interface AgentFeishuServiceDeps { getFeishuAppScopes?: GetFeishuAppScopes; getFeishuBotInfo?: GetFeishuBotInfo; registerFeishuApp?: RegisterFeishuApp; } export declare class AgentFeishuService { private readonly agentId; private readonly deps; constructor(agentId: string, deps?: AgentFeishuServiceDeps); connect(input: AgentConnectFeishuRequest): Promise<{ provider: { kind: "codex-cli"; env?: Record | undefined; idleTimeoutMs?: number | undefined; model?: string | undefined; providerChildIdleTimeoutMs?: number | undefined; reasoningEffort?: string | undefined; reasoningSummary?: "auto" | "concise" | "detailed" | "none" | undefined; } | { kind: "claude-code"; accountId?: string | undefined; env?: Record | undefined; idleTimeoutMs?: number | undefined; model?: string | undefined; providerChildIdleTimeoutMs?: number | undefined; reasoningEffort?: string | undefined; transport?: "stream-json" | undefined; } | { kind: "kimi-cli"; env?: Record | undefined; idleTimeoutMs?: number | undefined; model?: string | undefined; providerChildIdleTimeoutMs?: number | undefined; reasoningEffort?: string | undefined; } | { kind: "grok-cli"; env?: Record | undefined; idleTimeoutMs?: number | undefined; model?: string | undefined; providerChildIdleTimeoutMs?: number | undefined; reasoningEffort?: string | undefined; } | { kind: "opencode-cli"; env?: Record | undefined; idleTimeoutMs?: number | undefined; model?: string | undefined; providerChildIdleTimeoutMs?: number | undefined; reasoningEffort?: string | undefined; }; feishu: { appId: string; appSecret: string; connected: boolean; encryptKey: string; verificationToken: string; avatarUrl?: string | undefined; botProfileSyncedAt?: string | undefined; botOpenId?: string | undefined; ownerGreetingChatId?: string | undefined; ownerGreetingDeliveredAt?: string | undefined; ownerGreetingMessageId?: string | undefined; ownerGreetingPromptedAt?: string | undefined; ownerOpenId?: string | undefined; ownerTenantBrand?: "feishu" | "lark" | undefined; }; slack: { appToken: string; botToken: string; connected: boolean; manifestVersion: number; teamId: string; workspaceIconUrl: string; workspaceName: string; appId?: string | undefined; avatarUrl?: string | undefined; botHandle?: string | undefined; botName?: string | undefined; botProfileSyncedAt?: string | undefined; botUserId?: string | undefined; }; homePath: string; teamId: string; owner?: { slackUserId: string; displayName: string; handle?: string | undefined; avatarUrl?: string | undefined; onboardingPromptedAt?: string | undefined; } | undefined; createdAt: string; enabled: boolean; id: string; profile: { displayName: string; role: string; }; }>; syncDisplayInfo(): Promise; syncDisplayInfoIfStale(options: { ttlMs: number; }): Promise<{ synced: boolean; }>; getScopeStatus(): Promise; startAppRegistration(input?: AgentFeishuRegisterAppRequest): Promise; registrationStatus(registrationId: string): Promise; private abortActiveRegistration; private completeRegistration; private isRegistrationSessionActive; private connectRegisteredApp; private syncDisplayInfoForAgent; private fetchDisplayInfo; private ensureOwnerOnboardingPrompt; } export declare function agentFeishuServiceForAgent(agentId: string): AgentFeishuService; export {}; //# sourceMappingURL=agent-feishu.service.d.ts.map