import type { FetchLike } from './runtime-rule.js';
export interface OalFilesResponse {
    /** OAL file names (with extension), e.g. `core.oal`. */
    files: string[];
    count: number;
}
/** One row per dispatcher in the running OAP. The OAL debugger targets a
 *  source — every metric on that source captures together. The listing
 *  endpoint emits metric names only; per-metric `status` requires the
 *  per-source detail call (`/runtime/oal/rules/{source}`). */
export interface OalSourceListing {
    /** OAL source class name without `Dispatcher` suffix, e.g. `Endpoint`. */
    source: string;
    /** Fully-qualified dispatcher class name. */
    dispatcher: string;
    /** Metric names routed off this source. */
    metrics: string[];
}
export interface OalRulesResponse {
    sources: OalSourceListing[];
    count: number;
}
/** Per-metric gate state from the per-source detail endpoint.
 *  `status: "live"` means the dispatcher's `DebugHolderProvider` has a
 *  holder ready and a session install on this metric will succeed.
 *  `no_holder` means the codegen knew the metric but no holder was
 *  bound (test mocks or dispatchers compiled before SWIP-13). */
export interface OalSourceMetricDetail {
    name: string;
    status: 'live' | 'no_holder';
}
/** Per-source detail — same `source` + `dispatcher` as the listing,
 *  but `metrics` carries per-metric `{name, status}` rather than bare
 *  strings. The wire has no source-level `status`; the rollup is
 *  derived per metric. */
export interface OalSourceDetail {
    source: string;
    dispatcher: string;
    metrics: OalSourceMetricDetail[];
}
export interface OalClientOptions {
    /** OAP admin-server URL, e.g. `http://oap:17128`. No trailing slash. */
    adminUrl: string;
    fetch?: FetchLike;
    headers?: Record<string, string>;
    timeoutMs?: number;
}
/**
 * Typed wrapper for the four read-only OAL endpoints.
 */
export declare class OalClient {
    private readonly fetchImpl;
    private readonly base;
    private readonly defaultHeaders;
    private readonly timeoutMs;
    constructor(options: OalClientOptions);
    /** `GET /runtime/oal/files` — bare file-name listing. */
    listFiles(): Promise<OalFilesResponse>;
    /** `GET /runtime/oal/files/{name}` — returns raw `.oal` text
     *  (`text/plain`). Returns `null` when the file isn't loaded. */
    getFileContent(name: string): Promise<string | null>;
    /** `GET /runtime/oal/rules` — per-dispatcher listing for the picker. */
    listSources(): Promise<OalRulesResponse>;
    /** `GET /runtime/oal/rules/{source}` — single-source detail with
     *  holder-bound status. Path param is the source class name. Returns
     *  `null` when no dispatcher owns that source. */
    getSource(source: string): Promise<OalSourceDetail | null>;
    private send;
    private toError;
}
//# sourceMappingURL=oal.d.ts.map