import { I as IJobOrchestrator, i as JobRun } from '../../../job-orchestrator.protocol-DubMVbm9.js';
import { IJobRunService, ListForScopeOptions, CancelForScopeOptions, RescheduleForScopeOptions, PoolStatusCount, JobRunFailure, ListJobRunsQuery, JobRunPage } from './job-run-service.protocol.js';
import { MemoryJobStore } from './memory-job-store.js';
import '../events/event-bus.protocol.js';
import '../../types/drizzle.js';
import 'drizzle-orm/node-postgres';
import './job-orchestration.schema.js';
import 'drizzle-orm/pg-core';
import 'drizzle-orm';
import '@nestjs/common';
import '../events/event-registry.js';

declare class MemoryJobRunService implements IJobRunService {
    private readonly store;
    private readonly orchestrator;
    private readonly multiTenant;
    constructor(store: MemoryJobStore, orchestrator: IJobOrchestrator, multiTenant: boolean);
    /**
     * JOB-8 — produce a per-row predicate for the tenant gate.
     * Returns `null` when multi-tenancy is off (caller doesn't check).
     * Throws when on + `undefined`; matches `tenant_id IS NULL` on explicit
     * `null` to support cross-tenant background work.
     */
    private tenantPredicate;
    listForScope(entityType: string, entityId: string, opts?: ListForScopeOptions): Promise<JobRun[]>;
    cancelForScope(entityType: string, entityId: string, opts?: CancelForScopeOptions): Promise<void>;
    rescheduleForScope(entityType: string, entityId: string, newRunAt: Date, opts?: RescheduleForScopeOptions): Promise<void>;
    countByPoolAndStatus(tenantId?: string | null): Promise<PoolStatusCount[]>;
    listRecentFailed(limit: number, tenantId?: string | null): Promise<JobRunFailure[]>;
    listJobRuns(query?: ListJobRunsQuery): Promise<JobRunPage>;
    /**
     * Direct lookup. Not on the protocol — concrete-class convenience for
     * tests. Matches `DrizzleJobRunService.findByRootRunId` in spirit; both
     * are debug / test helpers that sidestep the orchestrator.
     */
    findById(runId: string): JobRun | null;
    /** Public counterpart to the Drizzle backend's `findByRootRunId` helper. */
    findByRootRunId(rootRunId: string): JobRun[];
}

export { MemoryJobRunService };
