/**
 * Account-state services as supervised `PeriodicService`s (PHNX-3608).
 *
 * The daemon owns usage and authentication health as first-party device state.
 * This used to run its OWN two `setInterval` loops behind a `usageRunning` /
 * `authRunning` latch with NO deadline (`account-state-service.ts`, now removed):
 * a `runUsageRefreshTick` that hung on an unbounded provider await latched
 * `usageRunning = true` forever, so the usage cache froze for the daemon's whole
 * life while the service still looked healthy — the "12h usage-dark" root cause.
 *
 * Now usage and auth are TWO independent supervised services, each with its own
 * timer, per-tick deadline, AbortSignal, and — crucially — its own circuit
 * breaker (`AccountUsageService` = `account-state`, `AccountAuthService` =
 * `account-auth`). Keeping them separate means a run of usage-refresh failures
 * parks ONLY usage and never starves the slower auth refresh (they hit different
 * endpoints), matching the old design's independent loops. Each threads its
 * deadline AbortSignal into its refresh so the tick unwinds at the deadline
 * instead of blocking; the provider fetch is itself already bounded
 * (`AbortSignal.timeout` at the leaf), and the supervisor abandons + restarts a
 * hung tick regardless.
 */
import { BasePeriodicService, type DaemonContext } from './service.js';
import type { DaemonServiceId } from '../daemon-services.js';
/** Usage cache refresh cadence. */
export declare const USAGE_STATE_TICK_MS = 60000;
/** Fleet-auth refresh cadence — deliberately slower (rate-limited endpoint). */
export declare const AUTH_STATE_TICK_MS: number;
/**
 * Refresh the usage cache the `agents run` router reads. Independent circuit
 * breaker from auth — a persistently-failing usage endpoint parks only this.
 */
export declare class AccountUsageService extends BasePeriodicService {
    readonly id: DaemonServiceId;
    readonly intervalMs = 60000;
    readonly deadlineMs: number;
    private readonly refresh;
    constructor(refresh?: (signal: AbortSignal) => Promise<void>);
    protected onStart(): Promise<void>;
    protected onStop(): Promise<void>;
    protected onTick(_ctx: DaemonContext, signal: AbortSignal): Promise<void>;
}
/**
 * Publish this host's fleet-status row and refresh auth health. Independent
 * circuit breaker from usage, and on a slower cadence (the auth verdict rides a
 * rate-limited endpoint).
 */
export declare class AccountAuthService extends BasePeriodicService {
    readonly id: DaemonServiceId;
    readonly intervalMs: number;
    readonly deadlineMs: number;
    private readonly refresh;
    constructor(refresh?: (signal: AbortSignal) => Promise<void>);
    protected onStart(): Promise<void>;
    protected onStop(): Promise<void>;
    protected onTick(_ctx: DaemonContext, signal: AbortSignal): Promise<void>;
}
