/**
 * GatewayManifest — publish daemon endpoint + auth token to a well-known path
 * so the openlife-core CLI can discover the daemon from any cwd.
 *
 * v1.11.0 — Core ↔ Agent Bridge.
 *
 * Path resolution:
 *   - If OPENLIFE_STATE_DIR is set (project-scoped daemon), publish there.
 *   - Otherwise publish to `~/.openlife/gateway-manifest.json` (machine-scoped).
 *
 * AgentDiscovery checks cwd-local first, then home — same multi-root pattern
 * v1.8.3 introduced for catalogs.
 *
 * File mode: 0o600. The token IS the Basic Auth password for `/api/v1/*`.
 * Anyone who can read this file already has filesystem access to the home
 * directory — same trust boundary as `.env`.
 */
export declare const MANIFEST_SCHEMA_VERSION = 1;
export declare const MANIFEST_FILENAME = "gateway-manifest.json";
export declare const TOKEN_FILENAME = "gateway-token";
/** Fixed Basic Auth user — the token is the password. */
export declare const MANIFEST_AUTH_USER = "openlife-core";
export interface GatewayManifestRecord {
    schemaVersion: number;
    host: string;
    port: number;
    token: string;
    pid: number;
    profile: 'autonomous' | 'framework' | string;
    startedAt: string;
    refreshedAt: string;
    telegram: {
        enabled: boolean;
        allowedUserId?: string | null;
    };
    version?: string;
}
export interface PublishOptions {
    host?: string;
    port: number;
    profile?: string;
    telegram?: {
        enabled: boolean;
        allowedUserId?: string | null;
    };
    version?: string;
}
/**
 * Publish a fresh manifest with a new random token. Caller must invoke
 * after the HTTP server is listening so `port` reflects the actually-bound
 * port. Returns the published record (token included — caller may need it).
 *
 * Subsequent refresh() calls update refreshedAt only; the token is stable
 * for the lifetime of the daemon process.
 */
export declare function publish(opts: PublishOptions): GatewayManifestRecord;
/**
 * Update refreshedAt to now. No-op if publish() was never called.
 * Designed to be invoked from the WatchdogHeartbeat onTick callback so
 * staleness detection mirrors the 30s heartbeat cadence.
 */
export declare function refresh(): GatewayManifestRecord | null;
/**
 * Delete the manifest + token sidecar. Idempotent. Call during graceful
 * shutdown so AgentDiscovery sees an explicit "no daemon" state instead
 * of a stale refreshedAt that ages into "dead".
 */
export declare function remove(): void;
/** Returns the in-memory record without touching disk. */
export declare function peek(): GatewayManifestRecord | null;
/** Exposed for tests. */
export declare function _resolvedPath(): string;
/** Exposed for tests. */
export declare function _resolvedTokenPath(): string;
