import type { VisionClawConfig, OwnerConfig } from "../config/types.js";
import type { ChannelManager } from "../channels/manager.js";
import type { MessageQueue } from "../channels/queue.js";
import type { ActivityTracker } from "./activity-tracker.js";
import type { ReplyContext } from "../channels/interface.js";
import type { SessionManager } from "./session-manager.js";
import type { CommandDispatcher } from "./command-dispatcher.js";
/** Per-channel reply target: sender identity + threading metadata from the inbound message. */
export interface ReplyTarget {
    sender: string;
    channel: string;
    replyContext: ReplyContext;
}
export interface TaskReplyTarget extends ReplyTarget {
    /** Whether this target originated from a group/channel-style chat where owner-DM fallback is unsafe. */
    isGroupLike?: boolean;
}
/** Runtime status of an MCP server as reported by the SDK. */
export interface McpServerInfo {
    name: string;
    status: string;
}
/** Shared state visible to tools (e.g. notify_user needs channel access) */
export interface AgentState {
    config: VisionClawConfig;
    ownerConfig: OwnerConfig;
    channelManager: ChannelManager;
    messageQueue: MessageQueue;
    activityTracker: ActivityTracker;
    busy: boolean;
    stopRequested: boolean;
    requestStop: () => void;
    /** Maps `channel::sender` to the reply target (populated per wake cycle + interrupts). */
    replyMap: Map<string, ReplyTarget>;
    /** Stable reply target for the active task, retained across wake-cycle boundaries. */
    currentTaskReplyTarget?: TaskReplyTarget;
    /** Set to true when `notify_user` successfully sends a message in the current wake cycle. */
    hasRepliedInCycle: boolean;
    consoleUrl?: string;
    restartTunnel?: () => Promise<string | null>;
    /** MCP server statuses captured from the SDK's system/init message. */
    mcpServers?: McpServerInfo[];
    /** SessionManager reference for dynamic MCP server management. */
    sessionManager?: SessionManager;
    /** CommandDispatcher for processing commands from the onboarding service. */
    commandDispatcher?: CommandDispatcher;
    /** True while context compaction is in progress. */
    compacting: boolean;
    /** True while the agent is in Skill Learning Mode. */
    learning: boolean;
    /** True while the agent is inside a blocking gate (onboarding, subscription, etc.). */
    gated: boolean;
    /**
     * Runtime-only: true when the onboarding service reports that this agent's
     * profile has an OPEN virtual card. Driven by every heartbeat response
     * (`cardAvailable`). Never persisted — defaults to false on startup so the
     * card tool/prompt are gated until the first successful heartbeat.
     */
    cardAvailable: boolean;
}
export declare function getAgentState(): AgentState;
export declare function initAgentState(state: AgentState): void;
export declare function registerShutdownCallback(cb: () => Promise<void>): void;
export declare function runGracefulShutdown(): Promise<void>;
//# sourceMappingURL=state.d.ts.map