import { t as NormalizedCodemationConfig } from "./CodemationConfigNormalizer-B4rDYC9h.js";

//#region src/presentation/server/CodemationConsumerAppResolver.d.ts
type CodemationConsumerApp = Readonly<{
  config: NormalizedCodemationConfig;
  workflowSources: ReadonlyArray<string>;
}>;
declare class CodemationConsumerAppResolver {
  private readonly configExportsResolver;
  private readonly configNormalizer;
  private readonly workflowDefinitionExportsResolver;
  private readonly discoveredWorkflowsEmptyMessageFactory;
  resolve(args: Readonly<{
    configModule: Readonly<Record<string, unknown>>;
    workflowModules: ReadonlyArray<Readonly<Record<string, unknown>>>;
    workflowSourcePaths: ReadonlyArray<string>;
    workflowDiscoveryPathSegmentsList?: ReadonlyArray<readonly string[]>;
  }>): CodemationConsumerApp;
  private resolveDiscoveredWorkflows;
  private mergeWorkflows;
}
//#endregion
//#region src/presentation/server/CodemationConsumerConfigLoader.d.ts
type CodemationConsumerConfigResolution = Readonly<{
  config: NormalizedCodemationConfig;
  bootstrapSource: string | null;
  workflowSources: ReadonlyArray<string>;
}>;
declare class CodemationConsumerConfigLoader {
  private static readonly importerRegistrationsByTsconfig;
  private static readonly importerNamespaceVersionByTsconfig;
  private readonly configExportsResolver;
  private readonly configNormalizer;
  private readonly workflowModulePathFinder;
  private readonly workflowDefinitionExportsResolver;
  private readonly discoveredWorkflowsEmptyMessageFactory;
  private readonly pathSegmentsComputer;
  private readonly performanceDiagnosticsLogger;
  private readonly bootLogger;
  /**
   * In-flight + completed load promises keyed by `${consumerRoot}|${configPathOverride}`. The
   * boot path constructs MULTIPLE CodemationConsumerConfigLoader instances (one inside the CLI's
   * DatabaseMigrationsApplyService, another inside NextHostEdgeSeedLoader, another inside
   * AppConfigLoader for the disposable runtime) and each independently calls `load(...)`. Without
   * a cache shared across instances, the same `${consumerRoot}` ends up importing
   * codemation.config.ts + discovered workflow modules ~3 times for a single dev boot. The cache
   * has to be static so it spans every loader instance in the process.
   *
   * Callers MUST invoke `invalidateAll()` on a source-change reload — the dev source watcher
   * already tears the runtime down and reboots; it just needs to clear this map first.
   */
  private static readonly resolutionCache;
  static invalidateAll(): void;
  load(args: Readonly<{
    consumerRoot: string;
    configPathOverride?: string;
  }>): Promise<CodemationConsumerConfigResolution>;
  private loadUncached;
  private resolveConfigPath;
  private getConventionCandidates;
  private resolveWorkflowSources;
  private loadDiscoveredWorkflows;
  private mergeWorkflows;
  private importModule;
  private importModuleWithNativeRuntime;
  private resolveTsconfigPath;
  private getOrCreateImporter;
  private resetImporter;
  private nextNamespaceVersion;
  private toNamespace;
  private resolveTsxImporterModuleSpecifier;
  private findNearestTsconfig;
  private createImportSpecifier;
  private shouldUseNativeRuntimeImport;
  private shouldResetImporterBeforeImport;
  private createImportSession;
  private isStoppedTransformServiceError;
  private exists;
}
//#endregion
export { CodemationConsumerAppResolver as i, CodemationConsumerConfigResolution as n, CodemationConsumerApp as r, CodemationConsumerConfigLoader as t };
//# sourceMappingURL=CodemationConsumerConfigLoader-Dt4jyLx6.d.ts.map