import { n as OAuthFlowExecutor, r as RunIntentService } from "./index-ChIfeWzk.js";
import { A as WorkflowDefinition, D as RunIdFactory, St as WebhookInvocationMatch, _ as Item, a as BinaryStorage, g as BinaryAttachment, h as ActivationIdFactory, tt as WorkflowActivationPolicy } from "./ItemsInputNormalizer-CFkfNMLt.js";
import { r as AppConfig } from "./CodemationAppContext-K51b7oXe.js";
import { l as Logger, u as LoggerFactory } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
import { n as logLevelPolicyFactory, t as LogLevelPolicyFactory } from "./LogLevelPolicyFactory-ewCHLDLn.js";
import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-Cev3qK46.js";
import "./CodemationConfigNormalizer-B4rDYC9h.js";
import { a as CredentialSecretCipher, i as CredentialInstanceService, o as McpServerCatalog, r as CredentialBindingService, t as CredentialStore } from "./CredentialServices-B3wPyp2y.js";
import "./CredentialContractsRegistry-Dgu-rEXi.js";
import "./TelemetryContracts-DpZEODQM.js";
import { i as WorkflowSummary, t as WorkflowDto } from "./WorkflowViewContracts-B7aFQcIw.js";
import { S as CommandBus, _ as AppContainerLifecycle, a as CodemationHonoApiApp, b as QueryBus, c as SessionVerifier, d as WorkflowRunRetentionPruneScheduler, f as ServerLoggerFactory, g as DatabaseMigrations, i as WorkflowDebuggerOverlayRepository, l as WorkerRuntime, m as WorkflowRunRepository, n as CodemationBootstrapRequest, o as BinaryHttpRouteHandler, p as LogFilter, r as ApplicationTokens, s as ServerHttpRouteParams, t as CodemationPluginListMerger, u as FrontendRuntime, v as AppContainerFactory, y as WorkflowWebsocketServer } from "./CodemationPluginListMerger-DS6I3Xe0.js";
import { t as AppConfigFactory } from "./AppConfigFactory-DncmwCD1.js";
import "./PrismaMigrationDeployer-DdEcXXVi.js";
import "./InternalHonoApiRouteRegistrar-Ce1yxpnO.js";
import { n as InternalAuthBootstrapFactory, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-ClEjZP74.js";
import { t as WorkflowPolicyUiPresentationFactory } from "./WorkflowPolicyUiPresentationFactory-BNn2fvR_.js";
import { t as PairingConfig } from "./pairing.types-D9Bjn98U.js";

//#region src/application/dev/DevBootstrapSummaryJson.types.d.ts
type DevBootstrapSummaryJson = Readonly<{
  logLevel: string;
  codemationLogLevelEnv?: string;
  databaseLabel: string;
  schedulerLabel: string;
  eventBusLabel: string;
  redisUrlRedacted?: string;
  activeWorkflows: ReadonlyArray<Readonly<{
    id: string;
    name: string;
  }>>;
  plugins: ReadonlyArray<Readonly<{
    packageName: string;
    source: "configured" | "discovered";
  }>>;
}>;
//#endregion
//#region src/infrastructure/logging/FilteringLogger.d.ts
declare class FilteringLogger implements Logger {
  private readonly inner;
  private readonly scope;
  private readonly filter;
  constructor(inner: Logger, scope: string, filter: LogFilter);
  info(message: string, exception?: Error): void;
  warn(message: string, exception?: Error): void;
  error(message: string, exception?: Error): void;
  debug(message: string, exception?: Error): void;
}
//#endregion
//#region src/infrastructure/logging/PerformanceLogPolicy.d.ts
/**
 * Opt-in detailed timing / diagnostics lines (used with `ServerLoggerFactory#createPerformanceDiagnostics`).
 *
 * Set `CODEMATION_PERFORMANCE_LOGGING=true` to enable. Otherwise those loggers are silent regardless of level.
 */
declare class PerformanceLogPolicy {
  shouldEmitDetailedTiming(): boolean;
}
//#endregion
//#region src/infrastructure/logging/PerformanceLogPolicyFactory.d.ts
/**
 * Process-wide {@link PerformanceLogPolicy} singleton (same pattern as {@link LogLevelPolicyFactory}).
 */
declare class PerformanceLogPolicyFactory {
  private readonly policy;
  create(): PerformanceLogPolicy;
}
declare const performanceLogPolicyFactory: PerformanceLogPolicyFactory;
//#endregion
//#region src/application/binary/RunBinaryAttachmentLookupService.d.ts
declare class RunBinaryAttachmentLookupService {
  private readonly workflowRunRepository;
  private readonly workflowDebuggerOverlayRepository;
  constructor(workflowRunRepository: WorkflowRunRepository, workflowDebuggerOverlayRepository: WorkflowDebuggerOverlayRepository);
  findForRun(runId: string, binaryId: string): Promise<BinaryAttachment | undefined>;
  findForWorkflowOverlay(workflowId: string, binaryId: string): Promise<BinaryAttachment | undefined>;
  private findInRunState;
  private findInCurrentState;
  private findInOutputsByNode;
  private findInNodeSnapshots;
  private findInCurrentStateSnapshots;
  private findInMutableState;
  private findInPortItemMap;
  private findInItems;
}
//#endregion
//#region src/application/mapping/DataMapper.d.ts
interface DataMapper<TSource, TTarget> {
  map(source: TSource): Promise<TTarget>;
}
//#endregion
//#region src/application/mapping/WorkflowDefinitionMapper.d.ts
declare class WorkflowDefinitionMapper implements DataMapper<WorkflowDefinition, WorkflowDto> {
  private readonly policyUi;
  private readonly workflowActivationPolicy;
  private readonly mcpCatalog;
  constructor(policyUi: WorkflowPolicyUiPresentationFactory, workflowActivationPolicy: WorkflowActivationPolicy, mcpCatalog: McpServerCatalog);
  map(workflow: WorkflowDefinition): Promise<WorkflowDto>;
  mapSync(workflow: WorkflowDefinition): WorkflowDto;
  toSummary(workflow: WorkflowDefinition): WorkflowSummary;
  private buildConnectionChildMeta;
  private mapNodesAndEdges;
  private toNodes;
  private toEdges;
  private appendMaterializedConnectionEdges;
  private buildAgentConnectionDescriptorIndex;
  private appendVirtualConnectionNodes;
  private appendVirtualConnectionEdges;
  private edgeKey;
  private createConnectionNode;
  /**
   * Omit optional port fields when undefined so persisted snapshot DTOs (which never serialize
   * undefined keys) stay aligned with live workflow mapping.
   */
  private readInspectorSummary;
  private nodePortFieldsFromConfig;
  private nodeTypeName;
}
//#endregion
//#region src/infrastructure/webhooks/RequestToWebhookItemMapper.d.ts
declare class RequestToWebhookItemMapper {
  private readonly binaryStorage;
  private readonly runIdFactory;
  private readonly activationIdFactory;
  constructor(binaryStorage: BinaryStorage, runIdFactory: RunIdFactory, activationIdFactory: ActivationIdFactory);
  map(request: Request, match: WebhookInvocationMatch): Promise<Item>;
  private mapMultipart;
  private parseJsonBody;
  private isJsonRequest;
  private resolveBody;
  private toHeaders;
  private toQuery;
}
//#endregion
//#region src/presentation/http/routeHandlers/CredentialHttpRouteHandler.d.ts
declare class CredentialHttpRouteHandler {
  private readonly queryBus;
  private readonly commandBus;
  private readonly sessionVerifier;
  private readonly pairingConfig;
  constructor(queryBus: QueryBus, commandBus: CommandBus, sessionVerifier: SessionVerifier, pairingConfig: PairingConfig | null);
  getCredentialTypes(): Promise<Response>;
  getCredentialFieldEnvStatus(): Promise<Response>;
  getCredentialInstances(): Promise<Response>;
  getCredentialApps(): Promise<Response>;
  getCredentialInstance(request: Request, params: ServerHttpRouteParams): Promise<Response>;
  postCredentialInstance(request: Request): Promise<Response>;
  putCredentialInstance(request: Request, params: ServerHttpRouteParams): Promise<Response>;
  deleteCredentialInstance(_: Request, params: ServerHttpRouteParams): Promise<Response>;
  putCredentialBinding(request: Request): Promise<Response>;
  postCredentialInstanceTest(_: Request, params: ServerHttpRouteParams): Promise<Response>;
  getWorkflowCredentialHealth(_: Request, params: ServerHttpRouteParams): Promise<Response>;
}
//#endregion
//#region src/domain/credentials/OAuth2RedirectUriResolver.d.ts
/**
 * Resolves the canonical OAuth2 redirect URI from the public base URL or request origin.
 * The redirect URI always points to `/api/oauth2/callback`, which is the URL operators
 * register with their OAuth provider.
 */
declare class OAuth2RedirectUriResolver {
  private readonly appConfig;
  constructor(appConfig: AppConfig);
  resolve(requestOrigin: string): string;
  /**
   * Ensures the base URL has an http/https scheme. Comma-separated values (proxy chains) use
   * the first segment only.
   */
  private ensureAbsoluteUrl;
  private normalizeBaseUrl;
}
//#endregion
//#region src/presentation/http/routeHandlers/OAuth2HttpRouteHandlerFactory.d.ts
declare class OAuth2HttpRouteHandler {
  private readonly redirectUriResolver;
  private readonly credentialInstanceService;
  private readonly oauthFlowExecutor;
  private readonly credentialStore;
  private readonly credentialSecretCipher;
  constructor(redirectUriResolver: OAuth2RedirectUriResolver, credentialInstanceService: CredentialInstanceService, oauthFlowExecutor: OAuthFlowExecutor, credentialStore: CredentialStore, credentialSecretCipher: CredentialSecretCipher);
  getRedirectUri(request: Request): Promise<Response>;
  postDisconnect(request: Request): Promise<Response>;
  postOAuthStart(request: Request): Promise<Response>;
  getOAuthCallback(request: Request): Promise<Response>;
  private resolveRequestOrigin;
  /** Proxies may send comma-separated lists (chain); use the first host/proto only. */
  private static firstCommaSeparatedValue;
  /**
   * Serialize popup payload for an inline script using `serialize-javascript`
   * (Webpack / HTML plugin stack): escapes angle brackets, slashes, and Unicode line
   * terminators so string values cannot break out of the script block.
   */
  private createPopupHtml;
}
//#endregion
//#region src/presentation/http/routeHandlers/RunHttpRouteHandler.d.ts
declare class RunHttpRouteHandler {
  private readonly queryBus;
  private readonly commandBus;
  constructor(queryBus: QueryBus, commandBus: CommandBus);
  getRun(_: Request, params: ServerHttpRouteParams): Promise<Response>;
  getRunDetail(_: Request, params: ServerHttpRouteParams): Promise<Response>;
  postRuns(request: Request, _: ServerHttpRouteParams): Promise<Response>;
  patchRunWorkflowSnapshot(request: Request, params: ServerHttpRouteParams): Promise<Response>;
  patchRunNodePin(request: Request, params: ServerHttpRouteParams): Promise<Response>;
  postRunNode(request: Request, params: ServerHttpRouteParams): Promise<Response>;
}
//#endregion
//#region src/presentation/http/routeHandlers/WebhookHttpRouteHandler.d.ts
declare class WebhookHttpRouteHandler {
  private readonly commandBus;
  private readonly runIntentService;
  private readonly requestToWebhookItemMapper;
  constructor(commandBus: CommandBus, runIntentService: RunIntentService, requestToWebhookItemMapper: RequestToWebhookItemMapper);
  postWebhook(request: Request, params: ServerHttpRouteParams): Promise<Response>;
}
//#endregion
//#region src/presentation/http/routeHandlers/WorkflowHttpRouteHandler.d.ts
declare class WorkflowHttpRouteHandler {
  private readonly queryBus;
  private readonly commandBus;
  private readonly workflowDefinitionMapper;
  constructor(queryBus: QueryBus, commandBus: CommandBus, workflowDefinitionMapper: WorkflowDefinitionMapper);
  getWorkflows(_: Request, __: ServerHttpRouteParams): Promise<Response>;
  getWorkflow(_: Request, params: ServerHttpRouteParams): Promise<Response>;
  patchWorkflowActivation(request: Request, params: ServerHttpRouteParams): Promise<Response>;
  getWorkflowRuns(_: Request, params: ServerHttpRouteParams): Promise<Response>;
  getWorkflowDebuggerOverlay(_: Request, params: ServerHttpRouteParams): Promise<Response>;
  putWorkflowDebuggerOverlay(request: Request, params: ServerHttpRouteParams): Promise<Response>;
  postCopyWorkflowDebuggerOverlay(request: Request, params: ServerHttpRouteParams): Promise<Response>;
}
//#endregion
export { AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, BinaryHttpRouteHandler, CodemationBootstrapRequest, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationHonoApiApp, CodemationPluginListMerger, CredentialBindingService, CredentialHttpRouteHandler, CredentialInstanceService, DatabaseMigrations, type DevBootstrapSummaryJson, FilteringLogger, type FrontendAppConfig, FrontendAppConfigFactory, FrontendRuntime, type InternalAuthBootstrap, InternalAuthBootstrapFactory, type LogFilter, LogLevelPolicyFactory, type Logger, type LoggerFactory, OAuth2HttpRouteHandler, PerformanceLogPolicy, PerformanceLogPolicyFactory, type PublicFrontendBootstrap, PublicFrontendBootstrapFactory, RequestToWebhookItemMapper, RunBinaryAttachmentLookupService, RunHttpRouteHandler, ServerLoggerFactory, WebhookHttpRouteHandler, WorkerRuntime, WorkflowDefinitionMapper, WorkflowHttpRouteHandler, WorkflowPolicyUiPresentationFactory, WorkflowRunRetentionPruneScheduler, WorkflowWebsocketServer, logLevelPolicyFactory, performanceLogPolicyFactory };
//# sourceMappingURL=nextServer.d.ts.map