import type { DaemonApiRouteHandlers } from './context.js';
import { type AuthenticatedPrincipal } from './http-policy.js';
import type { RuntimeEventDomain } from '../contracts/index.js';
type TelemetrySeverity = 'debug' | 'info' | 'warn' | 'error';
type TelemetryViewMode = 'safe' | 'raw';
interface TelemetryFilter {
    readonly limit?: number;
    readonly since?: number;
    readonly until?: number;
    readonly domains?: readonly RuntimeEventDomain[];
    readonly eventTypes?: readonly string[];
    readonly severity?: TelemetrySeverity;
    readonly traceId?: string;
    readonly sessionId?: string;
    readonly turnId?: string;
    readonly agentId?: string;
    readonly taskId?: string;
    readonly cursor?: string;
    readonly view?: TelemetryViewMode;
}
interface TelemetryApiLike {
    getSnapshot(filter: TelemetryFilter, view: TelemetryViewMode, rawAccessible: boolean): {
        readonly generatedAt: number;
        readonly view: TelemetryViewMode;
        readonly rawAccessible: boolean;
        readonly runtime: unknown;
        readonly sessionMetrics: unknown;
        readonly aggregates: unknown;
    };
    listEventPage(filter: TelemetryFilter, view: TelemetryViewMode, rawAccessible: boolean): unknown;
    listErrorPage(filter: TelemetryFilter, view: TelemetryViewMode, rawAccessible: boolean): unknown;
    listSpanPage(filter: TelemetryFilter, view: TelemetryViewMode, rawAccessible: boolean): unknown;
    createStream(req: Request, filter: TelemetryFilter, view: TelemetryViewMode, rawAccessible: boolean): Response;
    buildOtlpTraceDocument(filter: TelemetryFilter, view: TelemetryViewMode): unknown;
    buildOtlpLogDocument(filter: TelemetryFilter, view: TelemetryViewMode): unknown;
    buildOtlpMetricDocument(): unknown;
}
interface TelemetryRouteContext {
    readonly telemetryApi: TelemetryApiLike | null;
    readonly resolveAuthenticatedPrincipal: (req: Request) => AuthenticatedPrincipal | null;
}
export declare function createDaemonTelemetryRouteHandlers(context: TelemetryRouteContext): Pick<DaemonApiRouteHandlers, 'getTelemetrySnapshot' | 'getTelemetryEvents' | 'getTelemetryErrors' | 'getTelemetryTraces' | 'getTelemetryMetrics' | 'createTelemetryEventStream' | 'getTelemetryOtlpTraces' | 'getTelemetryOtlpLogs' | 'getTelemetryOtlpMetrics'>;
export {};
//# sourceMappingURL=telemetry-routes.d.ts.map