import "./index-ChIfeWzk.js";
import { F as RunCurrentState, N as PersistedRunState, v as Items } from "./ItemsInputNormalizer-CFkfNMLt.js";
import { a as defineCodemationApp, i as FriendlyCodemationExecutionConfig, n as DefinePluginOptions, o as definePlugin, r as FriendlyCodemationDatabaseConfig, s as workflow, t as DefineCodemationAppOptions } from "./CodemationAuthoring.types-BXlXIl4K.js";
import { S as CodemationWorkflowDiscovery, _ as CodemationEngineExecutionLimitsConfig, a as AppPluginLoadSummary, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, l as CodemationPluginPackageMetadata, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, r as AppConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, w as CodemationClassToken, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-K51b7oXe.js";
import { a as CodemationAuthConfig, c as CodemationAuthOidcProviderConfig, i as CodemationLogRule, l as Logger, n as CodemationLogConfig, o as CodemationAuthKind, r as CodemationLogLevelName, s as CodemationAuthOAuthProviderConfig, t as CodemationWhitelabelConfig } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
import "./LogLevelPolicyFactory-ewCHLDLn.js";
import { a as ApiPaths, i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-HNItQ7ol.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 { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-Dt4jyLx6.js";
import "./CredentialServices-B3wPyp2y.js";
import "./CredentialContractsRegistry-Dgu-rEXi.js";
import "./TelemetryContracts-DpZEODQM.js";
import "./WorkflowViewContracts-B7aFQcIw.js";
import { a as CollectionSummaryDto, f as UpsertLocalBootstrapUserResultDto, i as CollectionRowDto, o as ListCollectionRowsResponseDto, p as UserAccountDto, s as SyncCollectionsResponseDto, t as CollectionDetailDto } from "./CollectionContracts.types-DDyFYT_D.js";
import { C as Command, S as CommandBus, _ as AppContainerLifecycle, a as CodemationHonoApiApp, b as QueryBus, g as DatabaseMigrations, h as CollectionSchemaSyncerHolder, l as WorkerRuntime, n as CodemationBootstrapRequest, r as ApplicationTokens, t as CodemationPluginListMerger, u as FrontendRuntime, v as AppContainerFactory, x as Query, y as WorkflowWebsocketServer } from "./CodemationPluginListMerger-DS6I3Xe0.js";
import { n as PrismaDatabaseClient, t as AppConfigFactory } from "./AppConfigFactory-DncmwCD1.js";
import "./PrismaMigrationDeployer-DdEcXXVi.js";
import "./InternalHonoApiRouteRegistrar-Ce1yxpnO.js";
import { i as CodemationFrontendAuthSnapshotFactory, n as InternalAuthBootstrapFactory, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-ClEjZP74.js";
import { t as CodemationPostgresPrismaClientFactory } from "./CodemationPostgresPrismaClientFactory-CTNTPnDr.js";
import { c as CodemationServerGateway } from "./server-B5trn7y4.js";
import { Server } from "node:http";

//#region src/application/queries/ListUserAccountsQuery.d.ts
declare class ListUserAccountsQuery extends Query<ReadonlyArray<UserAccountDto>> {}
//#endregion
//#region src/application/commands/UpsertLocalBootstrapUserCommand.d.ts
declare class UpsertLocalBootstrapUserCommand extends Command<UpsertLocalBootstrapUserResultDto> {
  readonly email: string;
  readonly password: string;
  constructor(email: string, password: string);
}
//#endregion
//#region src/bootstrap/perf/BootTimer.d.ts
/**
 * Lightweight boot-phase timer. Designed for diagnosing slow `pnpm dev` cold starts.
 *
 * Usage: every meaningful boot phase wraps its async work in
 *   `await BootTimer.measureAsync("phase.name", async () => { ... })`
 * (or the sync `measure` for non-async work). When `--trace-boot` is set on the CLI
 * the timer records each phase in a tree, prints a pretty tree to stderr at the end
 * of boot, and writes the same tree to `tmp/boot-trace.json` for diffing later.
 *
 * When disabled (default), every method is a near-zero-cost passthrough — no allocation,
 * no Date.now() calls, no tree construction. Safe to leave instrumentation in production
 * code paths.
 */
type BootTracePhase = Readonly<{
  name: string;
  ms: number;
  pct: number;
  children: ReadonlyArray<BootTracePhase>;
}>;
declare class BootTimer {
  private static enabled;
  private static root;
  private static current;
  /** Enable boot tracing for the lifetime of the current process. Idempotent. */
  static enable(): void;
  static isEnabled(): boolean;
  /** Wrap an async phase. Pass-through when disabled. */
  static measureAsync<T>(name: string, fn: () => Promise<T>): Promise<T>;
  /** Wrap a sync phase. Pass-through when disabled. */
  static measure<T>(name: string, fn: () => T): T;
  /**
   * Manual start/stop for fire-and-forget phases (e.g. a spawned child process you only
   * stop once a readiness probe succeeds). Returns the stop function.
   */
  static start(name: string): () => void;
  /** Print the tree to stderr and write JSON to the given path. Finalizes the root span. */
  static finish(outputJsonPath?: string): Promise<void>;
  /** Return a plain-object snapshot of the current tree (for tests / diffing). */
  static snapshot(): BootTracePhase;
  /** Test helper: reset all state. Do not call in production code. */
  static reset(): void;
  private static pushPhase;
  private static popPhase;
}
//#endregion
//#region src/presentation/websocket/WorkflowWebsocketServerFactory.d.ts
declare class WorkflowWebsocketServerFactory {
  create(appConfig: AppConfig): WorkflowWebsocketServer;
}
//#endregion
//#region src/presentation/http/HeadlessHttpServerFactory.d.ts
/**
 * Creates a Node.js http.Server that bridges IncomingMessage to Hono's Fetch API.
 * Used by {@link import("../../bootstrap/runtime/HeadlessApiRuntime").HeadlessApiRuntime}
 * to serve the Hono API without Next.js.
 */
declare class HeadlessHttpServerFactory {
  create(honoApp: CodemationHonoApiApp, port: number, logger: Logger): Server;
}
//#endregion
//#region src/bootstrap/runtime/HeadlessApiRuntime.d.ts
/**
 * Boots the Codemation API + WebSocket servers without the Next.js UI process.
 * Used by `codemation serve web --headless` for workspace pod containers where the
 * UI is served externally (e.g. from the control-plane's customer-ui).
 */
declare class HeadlessApiRuntime {
  private readonly appContainerFactory;
  private readonly websocketServerFactory;
  private readonly httpServerFactory;
  private readonly logger;
  constructor(appContainerFactory: AppContainerFactory, websocketServerFactory: WorkflowWebsocketServerFactory, httpServerFactory: HeadlessHttpServerFactory, logger: Logger);
  start(appConfig: AppConfig): Promise<void>;
}
//#endregion
//#region src/application/collections/ListCollectionsQuery.d.ts
declare class ListCollectionsQuery extends Query<ReadonlyArray<CollectionSummaryDto>> {}
//#endregion
//#region src/application/collections/GetCollectionQuery.d.ts
declare class GetCollectionQuery extends Query<CollectionDetailDto | null> {
  readonly name: string;
  constructor(name: string);
}
//#endregion
//#region src/application/collections/ListCollectionRowsQuery.d.ts
declare class ListCollectionRowsQuery extends Query<ListCollectionRowsResponseDto> {
  readonly name: string;
  readonly limit: number;
  readonly offset: number;
  readonly where?: Readonly<Record<string, unknown>> | undefined;
  constructor(name: string, limit: number, offset: number, where?: Readonly<Record<string, unknown>> | undefined);
}
//#endregion
//#region src/application/collections/GetCollectionRowQuery.d.ts
declare class GetCollectionRowQuery extends Query<CollectionRowDto | null> {
  readonly name: string;
  readonly id: string;
  constructor(name: string, id: string);
}
//#endregion
//#region src/application/collections/InsertCollectionRowCommand.d.ts
declare class InsertCollectionRowCommand extends Command<CollectionRowDto> {
  readonly name: string;
  readonly data: Readonly<Record<string, unknown>>;
  constructor(name: string, data: Readonly<Record<string, unknown>>);
}
//#endregion
//#region src/application/collections/UpdateCollectionRowCommand.d.ts
declare class UpdateCollectionRowCommand extends Command<CollectionRowDto> {
  readonly name: string;
  readonly id: string;
  readonly patch: Readonly<Record<string, unknown>>;
  constructor(name: string, id: string, patch: Readonly<Record<string, unknown>>);
}
//#endregion
//#region src/application/collections/DeleteCollectionRowCommand.d.ts
declare class DeleteCollectionRowCommand extends Command<{
  readonly deleted: boolean;
}> {
  readonly name: string;
  readonly id: string;
  constructor(name: string, id: string);
}
//#endregion
//#region src/application/collections/SyncCollectionsCommand.d.ts
declare class SyncCollectionsCommand extends Command<SyncCollectionsResponseDto> {
  readonly dryRun: boolean;
  constructor(dryRun: boolean);
}
//#endregion
//#region src/application/contracts/RunContracts.d.ts
type CreateRunRequest = Readonly<{
  workflowId?: string;
  items?: Items;
  synthesizeTriggerItems?: boolean;
  currentState?: RunCurrentState;
  startAt?: string;
  stopAt?: string;
  clearFromNodeId?: string;
  mode?: "manual" | "debug";
  sourceRunId?: string;
}>;
type RunCommandResult = Readonly<{
  runId: string;
  workflowId: string;
  startedAt?: string;
  status: string;
  state: PersistedRunState | null;
}>;
//#endregion
//#region src/application/commands/StartWorkflowRunCommand.d.ts
declare class StartWorkflowRunCommand extends Command<RunCommandResult> {
  readonly body: CreateRunRequest;
  constructor(body: CreateRunRequest);
}
//#endregion
//#region src/application/ApplicationRequestError.d.ts
declare class ApplicationRequestError extends Error {
  readonly status: number;
  readonly payload: Readonly<{
    error: string;
    errors?: ReadonlyArray<string>;
  }>;
  constructor(status: number, message: string, errors?: ReadonlyArray<string>);
}
//#endregion
//#region src/application/queries/GetRunStateQuery.d.ts
declare class GetRunStateQuery extends Query<PersistedRunState | undefined> {
  readonly runId: string;
  constructor(runId: string);
}
//#endregion
//#region src/presentation/config/CodemationPackageManifest.d.ts
interface CodemationPackageManifest {
  readonly plugin?: string;
}
//#endregion
export { ApiPaths, type AppConfig, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, type AppPluginLoadSummary, ApplicationRequestError, ApplicationTokens, BootTimer, type BootTracePhase, type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, type CodemationApplicationRuntimeConfig, type CodemationAuthConfig, type CodemationAuthKind, type CodemationAuthOAuthProviderConfig, type CodemationAuthOidcProviderConfig, CodemationBootstrapRequest, type CodemationClassToken, type CodemationConfig, CodemationConsumerConfigLoader, type CodemationDatabaseConfig, type CodemationDatabaseKind, type CodemationEngineExecutionLimitsConfig, type CodemationEventBusConfig, type CodemationEventBusKind, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, type CodemationLogConfig, type CodemationLogLevelName, type CodemationLogRule, type CodemationPackageManifest, type CodemationPlugin, type CodemationPluginConfig, type CodemationPluginContext, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, CodemationServerGateway, type CodemationWhitelabelConfig, type CodemationWorkflowDiscovery, CollectionSchemaSyncerHolder, type CommandBus, DatabaseMigrations, type DefineCodemationAppOptions, type DefinePluginOptions, DeleteCollectionRowCommand, type FriendlyCodemationDatabaseConfig, type FriendlyCodemationExecutionConfig, type FrontendAppConfig, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, GetCollectionQuery, GetCollectionRowQuery, GetRunStateQuery, HeadlessApiRuntime, HeadlessHttpServerFactory, InsertCollectionRowCommand, type InternalAuthBootstrap, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListCollectionRowsQuery, ListCollectionsQuery, ListUserAccountsQuery, type PrismaDatabaseClient as PrismaClient, type PublicFrontendBootstrap, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, type QueryBus, type RunCommandResult, StartWorkflowRunCommand, SyncCollectionsCommand, UpdateCollectionRowCommand, UpsertLocalBootstrapUserCommand, type UpsertLocalBootstrapUserResultDto, WorkerRuntime, WorkflowWebsocketServerFactory, defineCodemationApp, definePlugin, workflow };
//# sourceMappingURL=index.d.ts.map