import type { AttentionClassifier } from './qq/attention-classifier.js'; import type { Context } from '@deepseek-ai/cordis'; import type { ChannelSession, ChannelView, Companion, WeixinChannel } from '../domain.js'; import { PartnerStore } from '../store.js'; import { PartnerCredentialVault } from '../credentials.js'; import { PartnerAgentRuntime } from '../agent-runtime.js'; import type { WeixinRawItem } from './weixin/types.js'; import type { AskUserQuestionAnswer, AskUserQuestionItem } from '@deepseek-ai/dsh-user-questions'; import type { SettingsForms } from '@deepseek-ai/dsh-settings'; import type { Session, SessionEvent } from '@deepseek-ai/dsh-session'; import type { PartnerReply, PartnerOutboundAttachment } from '../channel-message.js'; import type { BoardTask } from '../tasks/domain.js'; import type { BoardRequirement } from '../requirements/domain.js'; import type { AttachmentDeliveryService } from '../attachments/service.js'; export { isAutonomousDeliveryTurn } from './delivery-policy.js'; type ChannelContext = Context & { settings: SettingsForms; }; export declare class ChannelManager { private readonly ctx; private readonly store; private readonly credentials; private readonly agents; private readonly defaultCwd; private qqNames; private readonly qqLatency; private readonly groupAutonomy; private readonly groupMedia; private notificationShutdown; private readonly tasks; private readonly runtime; private readonly contextTokens; private readonly operations; private readonly directTransports; private readonly directDispatchers; private readonly groupReplyWindows; private readonly groupReplyFreshness; private readonly replyTurns; private readonly directReplyProgress; private readonly pendingQuestions; private readonly outboundQueues; private readonly notificationDelivery; private requirementDelivery?; setRequirementDelivery(service: AttachmentDeliveryService, prefix: string): void; constructor(ctx: ChannelContext, store: PartnerStore, credentials: PartnerCredentialVault, agents: PartnerAgentRuntime, defaultCwd: string, classify?: AttentionClassifier); attachQuestionAnswerer(agentCtx: Context, route: ChannelSession): () => void; private readonly qqEdits; private editQq; updateQqConnection(channelId: string, input: { baseUrl: string; botToken?: string; testOnly: boolean; expectedUpdatedAt: number; }): Promise; private saveQqConnection; updateQq(channelId: string, value: unknown, expectedUpdatedAt: number): Promise; private saveQqSettings; qqDefaultTrainingTarget(channelId: string): { mainSessionId?: string; scope: string; companion: Companion; guard: () => void; }; qqTrainingTarget(channelId: string, groupId: string): { history: (signal: AbortSignal, from: number) => Promise; mainSessionId?: string; sessionId?: string; scope: string; defaultScope: string; companion: Companion; guard: () => void; boundIds: string[]; }; qqDirectory(channelId: string, kind: 'groups' | 'friends' | 'faces' | 'stickers'): Promise; qqActionCall(channelId: string, action: string, params: Record, signal: AbortSignal, guard: () => void): Promise; qqVoices(channelId: string, groupId: string): Promise; sendManualQq(channelId: string, userId: string, input: { text?: string; faceId?: string; customFaceId?: string; }): Promise; channelRuntimeStatus(id: string): ChannelView['runtimeStatus']; views(): Promise; private idleDeliveryStatus; private chatRecoveryTimer; private chatRecovery; startEnabled(): Promise; start(channelId: string): Promise; stop(channelId: string): Promise; close(): Promise; delete(channelId: string): Promise; setEnabled(channelId: string, enabled: boolean): Promise; sendProactive(channelId: string, userId: string, text: string, receipt?: string): Promise; notifyConcern(companionId: string, text: string, receipt: string): Promise; sendExplicitAttachment(sessionId: string, file: PartnerOutboundAttachment, signal: AbortSignal, channelRouteId?: string): Promise; /** TTS has its own durable receipt; transport resolves only after the channel acknowledges audio delivery. */ sendTtsAudio(sessionId: string, file: PartnerOutboundAttachment, signal: AbortSignal, routeId: string, guard: () => void): Promise; notifyContinuation(entry: import('../scheduler/domain.js').ScheduledPartnerTask): Promise; notifyTaskResult(task: BoardTask): Promise; notifyRequirementResult(item: BoardRequirement): Promise; sendIdleIntermediate(sessionId: string, parts: import('../chat/protocol.js').ChatPart[], routeId: string, receipt: string, signal: AbortSignal): Promise; observeAutonomousResult(session: Session, event: SessionEvent): Promise; private recordThoughtDelivery; deliverBackgroundResult(run: import('../execution/domain.js').ExecutionRun, reply: PartnerReply): Promise; private queueProactive; private routeForSession; private sendProactiveReply; private deliverNotification; private readonly messageSendQueues; private sendNotificationTarget; private queueMessageSend; private performNotificationTarget; private checkChatSource; private sendChatReply; private startChatRecovery; private recoverIdleReplies; private recoverChatReplies; private pollLoop; private scheduleInbound; private handleInbound; private askThroughChannel; private answerPendingQuestion; private clearPendingQuestion; private receiveDirectAnswer; private rememberReceipt; private rememberReceipts; private sender; /** Independent connector loop. Cursor is persisted only after receipt handoff. */ private directLoop; private qqSessionName; private handleDirect; private markInbound; } export declare function requiredChannel(store: PartnerStore, id: string): WeixinChannel; export declare function requiredCompanion(store: PartnerStore, id: string): Companion; export declare function extractText(items: WeixinRawItem[]): string; export declare function renderQuestions(questions: AskUserQuestionItem[]): string; export declare function answerQuestions(questions: AskUserQuestionItem[], text: string): AskUserQuestionAnswer; export declare function busyEnterMode(settings: Pick | undefined): 'queue' | 'steer'; //# sourceMappingURL=manager.d.ts.map