import { AgentService } from "@mcoda/agents"; import { DocdexClient } from "@mcoda/integrations"; import { GlobalRepository, WorkspaceRepository } from "@mcoda/db"; import { WorkspaceResolution } from "../../workspace/WorkspaceManager.js"; import { JobService } from "../jobs/JobService.js"; import { RoutingService } from "../agents/RoutingService.js"; import { AgentRatingService } from "../agents/AgentRatingService.js"; export interface GenerateOpenapiOptions { workspace: WorkspaceResolution; agentName?: string; agentStream?: boolean; rateAgents?: boolean; force?: boolean; dryRun?: boolean; validateOnly?: boolean; cliVersion: string; onToken?: (token: string) => void; projectKey?: string; resumeJobId?: string; timeoutMs?: number; iteration?: { current: number; max?: number; }; } export interface GenerateOpenapiResult { jobId: string; commandRunId: string; outputPath?: string; spec: string; adminOutputPath?: string; adminSpec?: string; docdexId?: string; adminDocdexId?: string; warnings: string[]; } export declare class OpenApiJobError extends Error { code: string; jobId?: string; constructor(code: string, message: string, jobId?: string); } export declare const normalizeOpenApiPath: (value: string) => string; export declare const extractOpenApiPaths: (raw: string) => { paths: string[]; errors: string[]; }; export declare const findOpenApiPathLine: (raw: string, target: string) => number | undefined; export interface AdminSurfaceMention { line: number; excerpt: string; heading?: string; } export declare const findAdminSurfaceMentions: (raw: string) => AdminSurfaceMention[]; export interface OpenApiSchemaValidationResult { doc?: any; errors: string[]; } export declare const validateOpenApiSchema: (doc: any) => string[]; export declare const validateOpenApiSchemaContent: (raw: string) => OpenApiSchemaValidationResult; export declare class OpenApiService { private docdex; private jobService; private agentService; private routingService; private workspace; private repo?; private ratingService?; private workspaceRepo?; constructor(workspace: WorkspaceResolution, deps: { docdex?: DocdexClient; jobService?: JobService; agentService: AgentService; routingService: RoutingService; repo?: GlobalRepository; workspaceRepo?: WorkspaceRepository; ratingService?: AgentRatingService; noTelemetry?: boolean; }); static create(workspace: WorkspaceResolution, options?: { noTelemetry?: boolean; }): Promise; close(): Promise; private resolveAgent; private ensureRatingService; private invokeAgent; private sanitizeOutput; private validateSpec; private runOpenapiValidator; private buildPrompt; private ensureOpenapiDir; private backupIfNeeded; private registerOpenapi; private validateExistingSpec; private collectAdminMentions; private openapiDraftPath; private readOpenapiDraft; private writeOpenapiDraft; private isJobCancelled; private updateOpenapiJobStatus; private writeOpenapiCheckpoint; private startOpenapiHeartbeat; private tryResumeOpenapi; generateFromDocs(options: GenerateOpenapiOptions): Promise; } //# sourceMappingURL=OpenApiService.d.ts.map