import type { Kysely } from "kysely";
import type { ILogger } from "document-model";
import { OBSERVABILITY_PULL_USER_AGENT } from "../vetra-housekeeping/policy.js";
export type ClintServiceTuple = {
    documentId: string;
    prefix: string;
    subdomain: string;
    /** Served at the env apex (`<subdomain>.vetra.io`) — a sole-CLINT Studio. */
    isApex: boolean;
};
export type ClintPullWorkerConfig = {
    /** Processor's namespace DB — has the `environments` table. */
    envDb: Kysely<any>;
    /** Observability DB — has `clint_runtime_endpoints`. */
    obsDb: Kysely<any>;
    logger: ILogger;
    /** Defaults to 15000ms. */
    intervalMs?: number;
    /**
     * Maps a CLINT service tuple to its `/_proxy/routes` URL.
     * Defaults to the flattened single-label host (apex: `<subdomain>.vetra.io`,
     * else `<subdomain>-<prefix>.vetra.io`) + `/_proxy/routes`.
     * Overridable for tests.
     */
    buildAgentUrl?: (service: ClintServiceTuple) => string;
    /** Per-fetch timeout. Defaults to 5000ms. */
    fetchTimeoutMs?: number;
};
export { OBSERVABILITY_PULL_USER_AGENT };
export declare class ClintPullWorker {
    private readonly config;
    private timer;
    private readonly buildAgentUrl;
    private readonly fetchTimeoutMs;
    constructor(config: ClintPullWorkerConfig);
    start(): void;
    stop(): void;
    tickOnce(): Promise<void>;
    private listClintServices;
    private pullOne;
    private upsert;
}
//# sourceMappingURL=clint-pull-worker.d.ts.map