import { IJobRunService, PoolStatusCount, JobRunFailure, ListJobRunsQuery, JobRunPage } from '../jobs/job-run-service.protocol.js';
import { IEventReadPort, ListEventsQuery, EventPage } from '../events/event-read.protocol.js';
import { IJobBridge, StatusHistogram } from '../bridge/bridge.protocol.js';
import { IIntegrationRunRecorder, IntegrationRunSummary } from '../integration/integration-run-recorder.protocol.js';
import { ICursorStore, CursorSnapshot } from '../integration/integration-cursor-store.protocol.js';
import { IObservability, CorrelationTimeline } from './observability.protocol.js';
import '../../../job-orchestrator.protocol-ZuJ3ow-O.js';
import '../events/event-bus.protocol.js';
import '../../types/drizzle.js';
import 'drizzle-orm/node-postgres';
import '../jobs/job-orchestration.schema.js';
import 'drizzle-orm/pg-core';
import 'drizzle-orm';
import '@nestjs/common';
import '../events/event-registry.js';
import '../bridge/bridge-delivery.schema.js';
import '../integration/integration-field-diff.protocol.js';
import 'zod';

declare class ObservabilityService implements IObservability {
    private readonly jobRuns?;
    private readonly bridge?;
    private readonly integrationRuns?;
    private readonly cursors?;
    private readonly events?;
    /**
     * All-zero histogram used when the bridge subsystem is absent. Matches
     * the bridge protocol's "fixed keys, zero-filled" contract so consumers
     * never branch on presence.
     */
    private static readonly EMPTY_HISTOGRAM;
    /** Empty page used when a sibling read port is absent. */
    private static readonly EMPTY_JOB_RUN_PAGE;
    private static readonly EMPTY_EVENT_PAGE;
    constructor(jobRuns?: IJobRunService | undefined, bridge?: IJobBridge | undefined, integrationRuns?: IIntegrationRunRecorder | undefined, cursors?: ICursorStore | undefined, events?: (IEventReadPort | null) | undefined);
    getPoolDepths(tenantId?: string | null): Promise<PoolStatusCount[]>;
    getRecentFailedJobs(limit: number, tenantId?: string | null): Promise<JobRunFailure[]>;
    getBridgeDeliveryHistogram(windowHours: number, tenantId?: string | null): Promise<StatusHistogram>;
    getRecentIntegrationRuns(limit: number, subscriptionId?: string, tenantId?: string | null): Promise<IntegrationRunSummary[]>;
    getCursors(tenantId?: string | null): Promise<CursorSnapshot[]>;
    listJobRuns(query?: ListJobRunsQuery): Promise<JobRunPage>;
    listEvents(query?: ListEventsQuery): Promise<EventPage>;
    getCorrelationTimeline(rootRunId: string, tenantId?: string | null): Promise<CorrelationTimeline>;
    /**
     * Drain every `job_run` sharing `rootRunId` by walking the keyset cursor.
     * Empty when the jobs subsystem is absent.
     */
    private collectRuns;
    /**
     * Drain every `domain_event` whose `metadata.rootRunId` matches by walking
     * the keyset cursor. Empty when the events read port is absent.
     */
    private collectEvents;
}

export { ObservabilityService };
