/**
 * Fleet distribution of identity-keyed Claude usage through the user repo.
 *
 * A headed device can read authoritative usage; a worker's setup-token cannot.
 * Headed daemons therefore publish one snapshot into their conflict-free
 * `~/.agents/devices/<device>/daemon-state.json`. The daemon's bounded Git
 * transport delivers those files automatically; workers merge newest-wins.
 * There is deliberately no device-to-device SSH in this module or its tick.
 */
import { type ConfiguredDeviceRole } from '../device-config.js';
import { type CachedUsageSnapshot } from './usage.js';
/** Legacy hidden ingest/export envelope kept for older fleet CLI compatibility. */
export interface UsageSyncPayload {
    v: 1;
    rows: Record<string, CachedUsageSnapshot>;
}
export interface PublishUsageSnapshotOptions {
    userAgentsDir?: string;
    cachePath?: string;
    role?: ConfiguredDeviceRole;
    device?: string;
}
export interface PublishUsageSnapshotResult {
    published: boolean;
    changed: boolean;
    skipped: string | null;
    error: string | null;
    path: string | null;
}
/** Publish this headed device's stable usage snapshot into its owned store file. */
export declare function publishUsageSnapshotToSharedStore(options?: PublishUsageSnapshotOptions): Promise<PublishUsageSnapshotResult>;
export interface ConsumeUsageSnapshotsOptions {
    userAgentsDir?: string;
    cachePath?: string;
    role?: ConfiguredDeviceRole;
    device?: string;
    roles?: Record<string, ConfiguredDeviceRole>;
}
export interface ConsumeUsageSnapshotsResult {
    sources: string[];
    merged: number;
    skipped: string | null;
    errors: Array<{
        device: string;
        message: string;
    }>;
}
/**
 * Read headed publishers from the local user-repo checkout and merge one
 * newest-wins batch into the worker cache. No network or subprocess is touched.
 */
export declare function consumeUsageSnapshotsFromSharedStore(options?: ConsumeUsageSnapshotsOptions): ConsumeUsageSnapshotsResult;
