import { type OncallChat } from './bot-registry.js';
export type { DaemonSession } from './core/types.js';
import type { DaemonSession } from './core/types.js';
import { WorkflowEventWatcher } from './workflows/fanout.js';
import type { WorkflowRuntimeContext } from './workflows/runtime.js';
export declare function postPendingResponseCard(ds: DaemonSession, replyToMessageId: string, prompt: string, sender?: {
    name?: string;
}, turnId?: string): Promise<void>;
export declare function enforceMessageQuotaForCliInput(larkAppId: string, chatId: string, senderOpenId: string | undefined, messageId: string, anchor: string): Promise<boolean>;
export declare function grantRestrictedCommandText(larkAppId: string, chatId: string | undefined, senderOpenId: string | undefined, cmd: string): string | undefined;
export declare function grantRestrictedSlashCommandText(larkAppId: string, chatId: string | undefined, senderOpenId: string | undefined, cmd: string): string | undefined;
export declare function attachWorkflowEventWatcher(runId: string, ctx?: WorkflowRuntimeContext): WorkflowEventWatcher;
/**
 * Resolve the pinned working dir for a brand-new topic via the layered lookup:
 *   1) an existing oncall binding (this bot or a sibling)
 *   2) this bot's defaultOncall — auto-binds a brand-new chat when the flag is on
 *      (this WRITES state, so it must run identically on every spawn path)
 *   3) a sibling session's workingDir (cross-bot / chat-scope inheritance)
 *   4) this bot's `defaultWorkingDir` (pure runtime fallback)
 * Returns the dir plus the oncall / inherited source so callers can log the reason.
 * Shared by the normal spawn path and the first-message `/repo` command branch so
 * both honor the defaultOncall auto-bind the same way.
 */
declare function resolvePinnedWorkingDir(ctx: {
    scope: 'thread' | 'chat';
    anchor: string;
    chatId: string;
    chatType: 'group' | 'p2p';
    larkAppId: string;
}): Promise<{
    pinnedWorkingDir: string | undefined;
    oncallEntry: OncallChat | undefined;
    inheritedFrom: import("./core/inherit-peer.js").InheritedPeer | null;
}>;
export declare const __testOnly_resolvePinnedWorkingDir: typeof resolvePinnedWorkingDir;
export declare function startDaemon(botIndex?: number): Promise<void>;
//# sourceMappingURL=daemon.d.ts.map