/**
 * CliInbox — file-queue for daemon → core CLI messages.
 *
 * v1.11.0 — Core ↔ Agent Bridge (Phase 4).
 *
 * Why file-queue (not HTTP): the core CLI is short-lived. It isn't always
 * listening on a port. The daemon needs a "leave a note" mechanism that
 * survives the core not being up at the time of the message.
 *
 * Layout:
 *   ~/.openlife/cli-inbox/
 *   ├── <ulid>.json        # CoreInboxMessage
 *   ├── <ulid>.json
 *   └── replies/
 *       └── <ulid>.json    # written by core after handling
 */
export type CoreInboxKind = 'prompt' | 'command' | 'notification';
export type CoreInboxOrigin = 'telegram' | 'daemon' | 'http';
export interface CoreInboxMessage {
    id: string;
    createdAt: string;
    ttlSeconds: number;
    kind: CoreInboxKind;
    origin: CoreInboxOrigin;
    verb?: string;
    args?: string[];
    text?: string;
    requireSync?: boolean;
    expectedReplyKind?: 'json' | 'text';
    /** Optional cwd hint so daemon can target a specific core invocation. */
    targetCwd?: string;
}
export interface CoreInboxReply {
    ok: boolean;
    result?: unknown;
    error?: string;
    repliedAt: string;
}
export declare const CliInbox: {
    /**
     * Append a new message to the inbox. Returns the ULID assigned.
     * Used by the daemon (and Telegram /core router in Phase 4).
     */
    enqueue(msg: Omit<CoreInboxMessage, "id" | "createdAt"> & Partial<Pick<CoreInboxMessage, "id" | "createdAt">>): string;
    /**
     * Drain pending messages. Deletes expired ones from disk. Returns
     * non-expired messages (caller decides which to consume + delete).
     */
    drain(): Promise<CoreInboxMessage[]>;
    /** Mark a message as handled by deleting its file. */
    acknowledge(id: string): void;
    /** Write a reply file for a synchronous message. */
    reply(id: string, reply: CoreInboxReply): void;
    /** Read a reply file (returns null if absent). */
    readReply(id: string): CoreInboxReply | null;
    /**
     * Wait for a reply file to appear (polling). Used when the daemon enqueued
     * a message with requireSync=true. Returns null on timeout.
     */
    waitForReply(id: string, timeoutMs?: number, pollMs?: number): Promise<CoreInboxReply | null>;
    /** Exposed for tests so they can target the inbox dir. */
    _dirs(): {
        inbox: string;
        replies: string;
    };
};
