import type { AgentProvider } from "../../types.js"; import type { TodosTaskRouteOptions } from "./types.js"; /** Provider-native admission checks for routes that create background agents. */ export interface CodewithAdmissionDiagnostics { activeRunCount?: number; maxActiveRunsPerUser?: number; availableActiveRunSlots?: number; } export interface ProviderAdmissionPlan { provider: AgentProvider; authProfile?: string; authProfiles?: Array; activeCap?: number; admissionCheck: boolean; } export interface ProviderAdmissionDecision { allowed: boolean; provider: AgentProvider; checked: boolean; check: "codewith-agent-diagnostics" | "unsupported-provider" | "dry-run"; reason?: string; authProfile?: string; authProfiles?: string[]; activeCap?: number; fatal?: boolean; diagnostics?: CodewithAdmissionDiagnostics | Record; } export declare function parseCodewithAdmissionDiagnostics(stdout: string): CodewithAdmissionDiagnostics; export declare function providerActiveCapFromOpts(opts: Pick): number | undefined; export declare function providerAdmissionPlanFromOpts(opts: TodosTaskRouteOptions, args: { provider: AgentProvider; authProfile?: string; authProfiles?: Array; }): ProviderAdmissionPlan | undefined; export declare function providerAdmissionPlanWithAuthProfiles(plan: ProviderAdmissionPlan | undefined, authProfiles: Array): ProviderAdmissionPlan | undefined; export declare function providerAdmissionDryRunPreview(plan: ProviderAdmissionPlan | undefined): ProviderAdmissionDecision | undefined; export declare function checkProviderAdmission(plan: ProviderAdmissionPlan | undefined): ProviderAdmissionDecision | undefined;