/**
 * Fleet distribution of lightweight per-session preview/metadata (PHNX-3792).
 *
 * On the interactive/personal device, a session that originated on another host
 * used to render as a bare `[host/<peer>]` row with no topic, and its preview
 * pane fetched the peer's digest LIVE over SSH per row — slow, and blank when
 * the peer is asleep. This module mirrors each box's own session digests into
 * its conflict-free `~/.agents/devices/<device>/daemon-state.json`, which the
 * daemon's existing bounded Git transport (`fleet-shared-repo-sync.ts`) already
 * delivers fleet-wide with no operator step. The consuming device folds peer
 * digests into its local `sessions` index as mirror rows, so the picker/list/
 * focus read a LOCAL row instead of dialing the peer. No transcript is shipped —
 * only topic/label, a first-user-message snippet, last-activity, agent+version,
 * cwd, ticket, and PR — and the mirror is bounded and pruned by age.
 *
 * Direction is deliberately the inverse of usage-sync: EVERY box publishes its
 * own local sessions (workers are exactly where the remote sessions the personal
 * box lacks previews for are created), and every box EXCEPT a marked worker folds
 * peers' digests in (the picker is an interactive surface). A worker skips the
 * consume so its DB is not written with rows it never renders.
 */
import { type ConfiguredDeviceRole } from '../device-config.js';
/** Cap on sessions published per device — the payload stays what a picker shows. */
export declare const SESSION_MIRROR_MAX_ROWS = 200;
/** First-user-message snippet ceiling; the full turn stays on the owning box. */
export declare const SESSION_MIRROR_SNIPPET_MAX = 280;
/** Mirror rows older than this since their last sync are pruned (staleness/size ceiling). */
export declare const SESSION_MIRROR_MAX_AGE_MS: number;
export interface PublishSessionMirrorOptions {
    userAgentsDir?: string;
    device?: string;
    limit?: number;
}
export interface PublishSessionMirrorResult {
    published: boolean;
    changed: boolean;
    count: number;
    skipped: string | null;
    error: string | null;
    path: string | null;
}
/** Publish this device's most-recent local sessions into its owned shared-state file. */
export declare function publishSessionMirrorToSharedStore(options?: PublishSessionMirrorOptions): Promise<PublishSessionMirrorResult>;
export interface ConsumeSessionMirrorOptions {
    userAgentsDir?: string;
    device?: string;
    role?: ConfiguredDeviceRole;
    now?: number;
    maxAgeMs?: number;
}
export interface ConsumeSessionMirrorResult {
    sources: string[];
    merged: number;
    pruned: number;
    skipped: string | null;
    errors: Array<{
        device: string;
        message: string;
    }>;
}
/**
 * Fold peers' published session digests into this box's local `sessions` index
 * as mirror rows, then prune stale ones. Reads only the local user-repo checkout
 * (the daemon's Git transport already delivered peers' files) — no network. A
 * marked worker skips: the mirror feeds an interactive picker it never renders.
 */
export declare function consumeSessionMirrorFromSharedStore(options?: ConsumeSessionMirrorOptions): ConsumeSessionMirrorResult;
