import type { AgentConfig } from './config.js'; import { type BackendType } from './backends/types.js'; import { type EntraToken } from './entra.js'; /** * Set the Entra token for this connection. Called before connect() * after the CLI acquires the token (interactive browser flow or cache). */ export declare function setEntraToken(token: EntraToken): void; /** * Initialize everything needed to report local readiness. This must remain * network-free so upgrade recovery can publish Local Control before Entra or * relay work starts. */ export declare function initializeLocalConnection(config: AgentConfig): void; /** * Start relay registration after local readiness is observable. Entra refresh * is initiated only from relay callbacks and never blocks local health. */ export declare function connectRelay(config: AgentConfig): Promise; /** * Connect to the relay server. Returns the sessionId on first successful registration. * Reconnects are handled internally — this Promise only covers the initial connect. */ export declare function connect(config: AgentConfig): Promise; /** Get the E2E key for embedding in the session URL. */ export declare function getE2EKey(): Uint8Array | null; export declare function disconnect(): void; export declare function send(msg: Record): void; export declare function sendAndFlush(msg: Record, timeoutMs?: number): Promise; export declare function beginShutdown(): void; export declare function getConnectionStatus(): { websocketConnected: boolean; relayReady: boolean; acceptingWork: boolean; sessionId: string | null; workDir: string; backend: BackendType; backendReady: boolean; entraReady: boolean; sessionRestored: boolean; sessionRegistration: { previousSessionId: string; sessionId: string; sessionUrlHash: string; registeredAt: string; } | null | undefined; conversations: number; }; import { resolveArtifact } from './resolveArtifact.js'; export { resolveArtifact }; /** * Called when a recap chat session starts to check if it's linked to an action item. * If so, calls CLI `start` to transition the action item to 'running' status. */ export declare function checkPendingActionItem(conversationId: string, claudeSessionId: string): void; export declare function checkPendingSessionLinks(conversationId: string, claudeSessionId: string): void;