@codemation/host 0.0.5 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +3 -3
  2. package/dist/{PrismaMigrationDeployer-B7cHGrXP.js → AppConfigFactory-DWIz2hy-.js} +104 -58
  3. package/dist/AppConfigFactory-DWIz2hy-.js.map +1 -0
  4. package/dist/{client-Yh7-CQud.d.ts → AppConfigFactory-DmHOpg8O.d.ts} +52 -31
  5. package/dist/{CodemationFrontendBootstrapRequest-CNEk-C4D.js → AppContainerFactory-B5eRpvAa.js} +3269 -3374
  6. package/dist/AppContainerFactory-B5eRpvAa.js.map +1 -0
  7. package/dist/{CodemationWhitelabelConfig-DgbjgtrR.d.ts → CodemationAuthConfig-Bh2cCNCI.d.ts} +32 -2
  8. package/dist/{CodemationConfig-XCkSV2dj.d.ts → CodemationConfig-D2ULNkec.d.ts} +53 -49
  9. package/dist/CodemationConfigNormalizer-CBLxXaRV.d.ts +9 -0
  10. package/dist/{CodemationConsumerConfigLoader-scS_RQMy.js → CodemationConsumerConfigLoader-BBzAr6L_.js} +128 -3
  11. package/dist/CodemationConsumerConfigLoader-BBzAr6L_.js.map +1 -0
  12. package/dist/{CodemationConsumerConfigLoader-Dmm2TzAA.d.ts → CodemationConsumerConfigLoader-BLvzcfb7.d.ts} +4 -4
  13. package/dist/CodemationPluginListMerger-B0-e4CJ6.d.ts +391 -0
  14. package/dist/{CodemationPluginListMerger-BNmaoXQL.js → CodemationPluginListMerger-DrVOw9KP.js} +18 -10
  15. package/dist/CodemationPluginListMerger-DrVOw9KP.js.map +1 -0
  16. package/dist/{CredentialServices-DpDpm8mL.d.ts → CredentialServices-BeuMtqYA.d.ts} +3 -3
  17. package/dist/{CredentialServices-BKBGe7l3.js → CredentialServices-DNb3CZwW.js} +3 -3
  18. package/dist/CredentialServices-DNb3CZwW.js.map +1 -0
  19. package/dist/FrontendAppConfig-D50wjj_n.d.ts +27 -0
  20. package/dist/{WorkflowViewContracts-DCLpTn25.d.ts → FrontendAppConfigFactory-Bj-DZNlt.d.ts} +29 -2
  21. package/dist/FrontendAppConfigJsonCodec-1_L7H_Qo.d.ts +20 -0
  22. package/dist/FrontendAppConfigJsonCodec-nOCQI0ag.js +84 -0
  23. package/dist/FrontendAppConfigJsonCodec-nOCQI0ag.js.map +1 -0
  24. package/dist/{LogLevelPolicy-4cq9z0TI.d.ts → LogLevelPolicy-BS_NlAOg.d.ts} +2 -2
  25. package/dist/{ServerLoggerFactory-BRHxIDS7.js → ServerLoggerFactory-BltIIDfQ.js} +4 -129
  26. package/dist/ServerLoggerFactory-BltIIDfQ.js.map +1 -0
  27. package/dist/client.d.ts +5 -3
  28. package/dist/client.js +2 -1
  29. package/dist/client.js.map +1 -1
  30. package/dist/consumer.d.ts +5 -4
  31. package/dist/consumer.js +4 -4
  32. package/dist/credentials.d.ts +4 -4
  33. package/dist/credentials.js +3 -3
  34. package/dist/devServerSidecar.d.ts +1 -1
  35. package/dist/{index-Bs4F1IsC.d.ts → index-CkiptHb-.d.ts} +19 -20
  36. package/dist/index.d.ts +14 -19
  37. package/dist/index.js +12 -11
  38. package/dist/nextServer.d.ts +244 -9
  39. package/dist/nextServer.js +8 -8
  40. package/dist/persistenceServer-CaehMh3M.d.ts +9 -0
  41. package/dist/{persistenceServer-8tcM2S48.js → persistenceServer-DVeWUbc3.js} +2 -2
  42. package/dist/{persistenceServer-8tcM2S48.js.map → persistenceServer-DVeWUbc3.js.map} +1 -1
  43. package/dist/persistenceServer.d.ts +7 -6
  44. package/dist/persistenceServer.js +4 -4
  45. package/dist/{server-Dd65rNm6.js → server-C65z_kqm.js} +47 -17
  46. package/dist/server-C65z_kqm.js.map +1 -0
  47. package/dist/{server-BBdsATju.d.ts → server-Dyo8qh4k.d.ts} +23 -4
  48. package/dist/server.d.ts +12 -9
  49. package/dist/server.js +11 -10
  50. package/package.json +11 -6
  51. package/prisma/migrations/20260315063514_init/migration.sql +16 -16
  52. package/prisma/migrations/20260316090000_workflow_debugger_overlay/migration.sql +9 -9
  53. package/prisma/migrations/20260317120000_trigger_state_store/migration.sql +3 -3
  54. package/prisma/migrations/20260317153000_trigger_setup_state/migration.sql +8 -8
  55. package/prisma/migrations/20260318110000_credentials_v2/migration.sql +49 -49
  56. package/prisma/migrations/20260319110000_credential_oauth2_material/migration.sql +28 -28
  57. package/prisma/migrations/20260319200000_codemation_auth_tables/migration.sql +56 -56
  58. package/prisma/migrations/20260320140000_user_invites_account_status/migration.sql +20 -20
  59. package/prisma/migrations/20260325120000_workflow_activation/migration.sql +8 -8
  60. package/prisma/migrations/migration_lock.toml +3 -3
  61. package/prisma/schema.prisma +179 -179
  62. package/prisma.config.ts +15 -2
  63. package/src/application/commands/WorkflowCommandHandlers.ts +9 -0
  64. package/src/application/dev/BootRuntimeSnapshotHolder.ts +2 -2
  65. package/src/application/dev/BootRuntimeSummary.types.ts +2 -2
  66. package/src/application/queries/WorkflowQueryHandlers.ts +7 -0
  67. package/src/applicationTokens.ts +1 -1
  68. package/src/bootstrap/AppContainerFactory.ts +584 -0
  69. package/src/bootstrap/{PreparedCodemationRuntime.ts → AppContainerLifecycle.ts} +3 -8
  70. package/src/bootstrap/runtime/AppConfigFactory.ts +155 -30
  71. package/src/bootstrap/runtime/DatabaseMigrations.ts +18 -0
  72. package/src/bootstrap/runtime/FrontendRuntime.ts +44 -0
  73. package/src/bootstrap/runtime/WorkerRuntime.ts +55 -0
  74. package/src/client.ts +7 -0
  75. package/src/index.ts +15 -5
  76. package/src/infrastructure/persistence/PrismaMigrationDeployer.ts +2 -2
  77. package/src/infrastructure/persistence/SchedulerPersistenceCompatibilityValidator.ts +2 -2
  78. package/src/infrastructure/scheduler/WorkerRuntimeScheduler.ts +16 -0
  79. package/src/infrastructure/scheduler/bullmq/BullmqNodeExecutionScheduler.ts +47 -0
  80. package/src/infrastructure/scheduler/bullmq/BullmqScheduler.ts +33 -0
  81. package/src/infrastructure/scheduler/bullmq/BullmqWorker.ts +48 -0
  82. package/src/infrastructure/scheduler/bullmq/RedisConnectionOptionsFactory.ts +48 -0
  83. package/src/nextServer.ts +12 -3
  84. package/src/persistenceServer.ts +2 -2
  85. package/src/presentation/config/AppConfig.ts +25 -1
  86. package/src/presentation/frontend/CodemationFrontendAuthSnapshot.ts +14 -0
  87. package/src/presentation/frontend/CodemationFrontendAuthSnapshotFactory.ts +84 -0
  88. package/src/presentation/frontend/CodemationFrontendAuthSnapshotJsonCodec.ts +58 -0
  89. package/src/presentation/frontend/FrontendAppConfig.ts +10 -0
  90. package/src/presentation/frontend/FrontendAppConfigFactory.ts +26 -0
  91. package/src/presentation/frontend/FrontendAppConfigJsonCodec.ts +58 -0
  92. package/src/presentation/http/CodemationServerGatewayFactory.ts +22 -16
  93. package/src/presentation/server/AppConfigLoader.ts +39 -0
  94. package/src/presentation/server/CodemationConsumerAppResolver.ts +2 -2
  95. package/src/presentation/server/CodemationConsumerConfigLoader.ts +3 -2
  96. package/src/server.ts +7 -0
  97. package/vitest.shared.ts +0 -4
  98. package/dist/CodemationConsumerConfigLoader-scS_RQMy.js.map +0 -1
  99. package/dist/CodemationFrontendBootstrapRequest-CNEk-C4D.js.map +0 -1
  100. package/dist/CodemationPluginListMerger-BNmaoXQL.js.map +0 -1
  101. package/dist/CodemationPluginListMerger-BRYqEk0y.d.ts +0 -793
  102. package/dist/CredentialServices-BKBGe7l3.js.map +0 -1
  103. package/dist/PrismaMigrationDeployer-B7cHGrXP.js.map +0 -1
  104. package/dist/ServerLoggerFactory-BRHxIDS7.js.map +0 -1
  105. package/dist/persistenceServer-DPSj_-oU.d.ts +0 -37
  106. package/dist/server-Dd65rNm6.js.map +0 -1
  107. package/src/bootstrap/CodemationContainerFactory.ts +0 -310
  108. package/src/bootstrap/CodemationFrontendBootstrapRequest.ts +0 -16
  109. package/src/bootstrap/CodemationWorkerBootstrapRequest.ts +0 -19
  110. package/src/bootstrap/PreparedCodemationRuntimeFactory.ts +0 -308
  111. package/src/bootstrap/boot/CliRuntimeBootService.ts +0 -27
  112. package/src/bootstrap/boot/FrontendRuntimeBootService.ts +0 -86
  113. package/src/bootstrap/boot/WorkerRuntimeBootService.ts +0 -64
  114. package/src/bootstrap/runtime/ResolvedImplementationSelectionFactory.ts +0 -118
  115. package/src/codemationApplication.ts +0 -311
  116. package/src/infrastructure/credentials/FrameworkBuiltinCredentialTypesRegistrar.ts +0 -21
  117. package/src/infrastructure/persistence/DatabasePersistenceResolver.ts +0 -91
  118. package/src/infrastructure/persistence/generated/prisma/client.d.ts +0 -1
  119. package/src/infrastructure/persistence/generated/prisma/default.d.ts +0 -1
  120. package/src/infrastructure/persistence/generated/prisma/edge.d.ts +0 -1
  121. package/src/infrastructure/persistence/generated/prisma/index.d.ts +0 -4766
  122. package/src/infrastructure/persistence/generated/prisma/package.json +0 -144
  123. package/src/infrastructure/persistence/generated/prisma/query_compiler_fast_bg.wasm +0 -0
  124. package/src/infrastructure/persistence/generated/prisma/runtime/client.d.ts +0 -3358
  125. package/src/infrastructure/persistence/generated/prisma/runtime/index-browser.d.ts +0 -90
  126. package/src/infrastructure/persistence/generated/prisma/schema.prisma +0 -35
  127. package/src/infrastructure/persistence/generated/prisma/wasm-edge-light-loader.mjs +0 -5
  128. package/src/infrastructure/persistence/generated/prisma/wasm-worker-loader.mjs +0 -5
  129. package/src/infrastructure/runtime/WorkerRuntimeScheduler.ts +0 -35
  130. package/src/presentation/config/CodemationApplicationFacade.ts +0 -5
  131. /package/dist/{decorate-B-N_5S4p.js → decorate-B0PP651O.js} +0 -0
  132. /package/dist/{decorateParam-BTcc3KNk.js → decorateParam-DrsXNPuw.js} +0 -0
@@ -1,5 +1,6 @@
1
- import "./CodemationWhitelabelConfig-DgbjgtrR.js";
2
- import "./index-Bs4F1IsC.js";
3
- import "./CodemationConfig-XCkSV2dj.js";
4
- import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-Dmm2TzAA.js";
1
+ import "./CodemationAuthConfig-Bh2cCNCI.js";
2
+ import "./index-CkiptHb-.js";
3
+ import "./CodemationConfig-D2ULNkec.js";
4
+ import "./CodemationConfigNormalizer-CBLxXaRV.js";
5
+ import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BLvzcfb7.js";
5
6
  export { type CodemationConsumerApp, CodemationConsumerAppResolver, CodemationConsumerConfigLoader, type CodemationConsumerConfigResolution };
package/dist/consumer.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./ConsoleLogger-ClPU7jtc.js";
2
- import "./ServerLoggerFactory-BRHxIDS7.js";
3
- import { i as CodemationConsumerAppResolver, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-scS_RQMy.js";
4
- import "./decorateParam-BTcc3KNk.js";
5
- import "./decorate-B-N_5S4p.js";
2
+ import { i as CodemationConsumerAppResolver, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BBzAr6L_.js";
3
+ import "./ServerLoggerFactory-BltIIDfQ.js";
4
+ import "./decorateParam-DrsXNPuw.js";
5
+ import "./decorate-B0PP651O.js";
6
6
 
7
7
  export { CodemationConsumerAppResolver, CodemationConsumerConfigLoader };
@@ -1,7 +1,7 @@
1
- import "./CodemationWhitelabelConfig-DgbjgtrR.js";
2
- import { d as CredentialHealth, s as AnyCredentialType, v as CredentialSessionFactoryArgs } from "./index-Bs4F1IsC.js";
3
- import "./CodemationConfig-XCkSV2dj.js";
4
- import { a as CredentialInstanceService, i as CredentialBindingService, n as CredentialType } from "./CredentialServices-DpDpm8mL.js";
1
+ import "./CodemationAuthConfig-Bh2cCNCI.js";
2
+ import { c as AnyCredentialType, f as CredentialHealth, y as CredentialSessionFactoryArgs } from "./index-CkiptHb-.js";
3
+ import "./CodemationConfig-D2ULNkec.js";
4
+ import { a as CredentialInstanceService, i as CredentialBindingService, n as CredentialType } from "./CredentialServices-BeuMtqYA.js";
5
5
 
6
6
  //#region src/infrastructure/credentials/OpenAiApiKeyCredentialShapes.types.d.ts
7
7
  /**
@@ -1,6 +1,6 @@
1
- import "./decorateParam-BTcc3KNk.js";
2
- import "./decorate-B-N_5S4p.js";
3
- import { a as CredentialInstanceService, i as CredentialBindingService, m as OpenAiApiKeyCredentialHealthTester, p as OpenAiApiKeyCredentialTypeFactory } from "./CredentialServices-BKBGe7l3.js";
1
+ import "./decorateParam-DrsXNPuw.js";
2
+ import "./decorate-B0PP651O.js";
3
+ import { a as CredentialInstanceService, i as CredentialBindingService, m as OpenAiApiKeyCredentialHealthTester, p as OpenAiApiKeyCredentialTypeFactory } from "./CredentialServices-DNb3CZwW.js";
4
4
 
5
5
  //#region src/credentials.ts
6
6
  const defaultOpenAiApiKeyCredentialTypeFactory = new OpenAiApiKeyCredentialTypeFactory(new OpenAiApiKeyCredentialHealthTester(globalThis.fetch));
@@ -1,4 +1,4 @@
1
- import { j as WorkflowDefinition, n as Container } from "./index-Bs4F1IsC.js";
1
+ import { M as WorkflowDefinition, r as Container } from "./index-CkiptHb-.js";
2
2
 
3
3
  //#region src/presentation/server/CodemationTsyringeParamInfoReader.d.ts
4
4
  declare class CodemationTsyringeParamInfoReader {
@@ -338,9 +338,6 @@ interface WorkflowRepository {
338
338
  interface LiveWorkflowRepository extends WorkflowRepository {
339
339
  setWorkflows(workflows: ReadonlyArray<WorkflowDefinition>): void;
340
340
  }
341
- interface NodeResolver {
342
- resolve<T>(token: TypeToken<T>): T;
343
- }
344
341
  interface NodeExecutionStatePublisher {
345
342
  markQueued(args: {
346
343
  nodeId: NodeId;
@@ -447,6 +444,9 @@ interface NodeExecutionScheduler {
447
444
  }>;
448
445
  cancel?(receiptId: string): Promise<void>;
449
446
  }
447
+ interface NodeExecutionRequestHandler {
448
+ handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
449
+ }
450
450
  interface NodeActivationContinuation {
451
451
  markNodeRunning(args: {
452
452
  runId: RunId;
@@ -837,6 +837,14 @@ type RunEvent = Readonly<{
837
837
  at: string;
838
838
  snapshot: NodeExecutionSnapshot;
839
839
  }>;
840
+ interface RunEventSubscription {
841
+ close(): Promise<void>;
842
+ }
843
+ interface RunEventBus {
844
+ publish(event: RunEvent): Promise<void>;
845
+ subscribe(onEvent: (event: RunEvent) => void): Promise<RunEventSubscription>;
846
+ subscribeToWorkflow(workflowId: WorkflowId, onEvent: (event: RunEvent) => void): Promise<RunEventSubscription>;
847
+ }
840
848
  //#endregion
841
849
  //#region ../core/src/policies/executionLimits/EngineExecutionLimitsPolicy.d.ts
842
850
  interface EngineExecutionLimitsPolicyConfig {
@@ -845,20 +853,6 @@ interface EngineExecutionLimitsPolicyConfig {
845
853
  readonly defaultMaxSubworkflowDepth: number;
846
854
  readonly hardMaxSubworkflowDepth: number;
847
855
  }
848
- /**
849
- * Resolves per-run execution limits: defaults, hard ceilings, and subworkflow depth for new runs.
850
- */
851
- declare class EngineExecutionLimitsPolicy {
852
- private readonly config;
853
- constructor(config?: EngineExecutionLimitsPolicyConfig);
854
- /**
855
- * Effective options for a new root run (depth 0): defaults merged with engine ceilings.
856
- * Replaces a separate one-method factory for root-run bootstrap.
857
- */
858
- createRootExecutionOptions(): RunExecutionOptions;
859
- mergeExecutionOptionsForNewRun(parent: ParentExecutionRef | undefined, user: RunExecutionOptions | undefined): RunExecutionOptions;
860
- private capNumber;
861
- }
862
856
  //#endregion
863
857
  //#region ../core/src/orchestration/Engine.d.ts
864
858
  interface EngineTriggerRuntime {
@@ -913,6 +907,9 @@ interface EngineRunContinuationService {
913
907
  }>>;
914
908
  waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
915
909
  }
910
+ interface EngineNodeExecutionRequestHandler {
911
+ handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
912
+ }
916
913
  interface EngineFacadeDeps {
917
914
  liveWorkflowRepository: LiveWorkflowRepository;
918
915
  tokenRegistry: PersistedWorkflowTokenRegistryLike;
@@ -921,13 +918,14 @@ interface EngineFacadeDeps {
921
918
  triggerRuntime: EngineTriggerRuntime;
922
919
  runStartService: EngineRunStartService;
923
920
  runContinuationService: EngineRunContinuationService;
921
+ nodeExecutionRequestHandler: EngineNodeExecutionRequestHandler;
924
922
  }
925
923
  /**
926
924
  * Runtime facade for orchestration, continuation, triggers, and webhook routing.
927
925
  * Prefer {@link import("../intents/RunIntentService").RunIntentService} for host/HTTP invocation boundaries.
928
926
  * The class token is exported from `@codemation/core/bootstrap` (not the main `@codemation/core` barrel).
929
927
  */
930
- declare class Engine implements NodeActivationContinuation {
928
+ declare class Engine implements NodeActivationContinuation, NodeExecutionRequestHandler {
931
929
  private readonly deps;
932
930
  constructor(deps: EngineFacadeDeps);
933
931
  loadWorkflows(workflows: ReadonlyArray<WorkflowDefinition>): void;
@@ -987,6 +985,7 @@ declare class Engine implements NodeActivationContinuation {
987
985
  status: "completed" | "failed";
988
986
  }>>;
989
987
  waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
988
+ handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
990
989
  }
991
990
  //#endregion
992
991
  //#region ../core/src/runtime/RunIntentService.d.ts
@@ -1040,5 +1039,5 @@ declare class RunIntentService {
1040
1039
  private createWebhookExecutionOptions;
1041
1040
  }
1042
1041
  //#endregion
1043
- export { RunIdFactory as A, PersistedRunState as B, CredentialTypeId as C, Item as D, BinaryAttachment as E, NodeExecutionScheduler as F, RunSummary as H, NodeResolver as I, WorkflowRepository as L, WorkflowId as M, BinaryStorage as N, NodeDefinition as O, NodeActivationContinuation as P, WebhookInvocationMatch as R, CredentialTypeDefinition as S, ActivationIdFactory as T, WorkflowExecutionRepository as U, RunCurrentState as V, Clock as W, CredentialRequirement as _, EngineExecutionLimitsPolicyConfig as a, CredentialSetupStatus as b, CredentialBinding as c, CredentialHealth as d, CredentialInstanceId as f, CredentialOAuth2AuthDefinition as g, CredentialMaterialSourceKind as h, EngineExecutionLimitsPolicy as i, WorkflowDefinition as j, RunId as k, CredentialBindingKey as l, CredentialJsonRecord as m, Container as n, RunEvent as o, CredentialInstanceRecord as p, TypeToken as r, AnyCredentialType as s, RunIntentService as t, CredentialFieldSchema as u, CredentialSessionFactoryArgs as v, CredentialTypeRegistry as w, CredentialType as x, CredentialSessionService as y, WorkflowActivationPolicy as z };
1044
- //# sourceMappingURL=index-Bs4F1IsC.d.ts.map
1042
+ export { RunId as A, PersistedRunState as B, CredentialTypeDefinition as C, BinaryAttachment as D, ActivationIdFactory as E, NodeExecutionRequestHandler as F, RunSummary as H, NodeExecutionScheduler as I, WorkflowRepository as L, WorkflowDefinition as M, WorkflowId as N, Item as O, BinaryStorage as P, WebhookInvocationMatch as R, CredentialType as S, CredentialTypeRegistry as T, Clock as U, RunCurrentState as V, CredentialOAuth2AuthDefinition as _, EngineExecutionLimitsPolicyConfig as a, CredentialSessionService as b, AnyCredentialType as c, CredentialFieldSchema as d, CredentialHealth as f, CredentialMaterialSourceKind as g, CredentialJsonRecord as h, TypeToken as i, RunIdFactory as j, NodeDefinition as k, CredentialBinding as l, CredentialInstanceRecord as m, Engine as n, RunEvent as o, CredentialInstanceId as p, Container as r, RunEventBus as s, RunIntentService as t, CredentialBindingKey as u, CredentialRequirement as v, CredentialTypeId as w, CredentialSetupStatus as x, CredentialSessionFactoryArgs as y, WorkflowActivationPolicy as z };
1043
+ //# sourceMappingURL=index-CkiptHb-.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,19 +1,14 @@
1
- import { i as CodemationLogRule, n as CodemationLogConfig, r as CodemationLogLevelName, t as CodemationWhitelabelConfig } from "./CodemationWhitelabelConfig-DgbjgtrR.js";
2
- import "./LogLevelPolicy-4cq9z0TI.js";
3
- import { s as AnyCredentialType } from "./index-Bs4F1IsC.js";
4
- import { C as CodemationAuthOidcProviderConfig, S as CodemationAuthOAuthProviderConfig, _ as CodemationRegistrationContextBase, a as CodemationConfig, b as CodemationAuthConfig, c as CodemationEngineExecutionLimitsConfig, d as CodemationSchedulerConfig, f as CodemationSchedulerKind, g as CodemationAppContext, h as CodemationPluginContext, i as CodemationApplicationRuntimeConfig, l as CodemationEventBusConfig, m as CodemationPlugin, n as CodemationAppSchedulerConfig, o as CodemationDatabaseConfig, p as CodemationWorkflowDiscovery, r as CodemationAppSchedulerKind, s as CodemationDatabaseKind, t as CodemationAppDefinition, u as CodemationEventBusKind, v as CodemationClassToken, x as CodemationAuthKind, y as AppConfig } from "./CodemationConfig-XCkSV2dj.js";
5
- import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-Dmm2TzAA.js";
6
- import "./CredentialServices-DpDpm8mL.js";
7
- import { A as CommandBus, D as ListUserAccountsQuery, E as UpsertLocalBootstrapUserCommand, O as UpsertLocalBootstrapUserResultDto, a as CodemationApplicationConfig, c as CodemationFrontendBootstrapRequest, i as CodemationApplication, k as QueryBus, l as CodemationBootstrapRequest, n as ApplicationTokens, o as CodemationStopHandle, s as CodemationWorkerBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-BRYqEk0y.js";
8
- import { t as PrismaClient } from "./client-Yh7-CQud.js";
9
- import "./WorkflowViewContracts-DCLpTn25.js";
10
- import { c as CodemationPackageManifest, l as CodemationPluginPackageManifest, o as CodemationServerGateway, s as ApiPaths } from "./server-BBdsATju.js";
11
- import { n as CodemationPostgresPrismaClientFactory } from "./persistenceServer-DPSj_-oU.js";
12
-
13
- //#region src/presentation/config/CodemationApplicationFacade.d.ts
14
- interface CodemationApplicationFacade {
15
- registerCredentialType(type: AnyCredentialType): void;
16
- }
17
- //#endregion
18
- export { ApiPaths, type AppConfig, ApplicationTokens, type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, CodemationApplication, type CodemationApplicationConfig, type CodemationApplicationFacade, 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, CodemationFrontendBootstrapRequest, type CodemationLogConfig, type CodemationLogLevelName, type CodemationLogRule, type CodemationPackageManifest, type CodemationPlugin, type CodemationPluginContext, CodemationPluginListMerger, type CodemationPluginPackageManifest, CodemationPostgresPrismaClientFactory, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, CodemationServerGateway, type CodemationStopHandle, type CodemationWhitelabelConfig, CodemationWorkerBootstrapRequest, type CodemationWorkflowDiscovery, type CommandBus, ListUserAccountsQuery, PrismaClient, type QueryBus, UpsertLocalBootstrapUserCommand, type UpsertLocalBootstrapUserResultDto };
19
- //# sourceMappingURL=index.d.ts.map
1
+ import { a as CodemationWhitelabelConfig, c as CodemationLogRule, i as CodemationAuthOidcProviderConfig, n as CodemationAuthKind, o as CodemationLogConfig, r as CodemationAuthOAuthProviderConfig, s as CodemationLogLevelName, t as CodemationAuthConfig } from "./CodemationAuthConfig-Bh2cCNCI.js";
2
+ import { n as CodemationFrontendAuthProviderSnapshot, r as CodemationFrontendAuthSnapshot, t as FrontendAppConfig } from "./FrontendAppConfig-D50wjj_n.js";
3
+ import { n as CodemationFrontendAuthSnapshotJsonCodec, t as FrontendAppConfigJsonCodec } from "./FrontendAppConfigJsonCodec-1_L7H_Qo.js";
4
+ import "./index-CkiptHb-.js";
5
+ import { a as CodemationConfig, c as CodemationEngineExecutionLimitsConfig, d as CodemationSchedulerConfig, f as CodemationSchedulerKind, g as AppConfig, h as CodemationRegistrationContextBase, i as CodemationApplicationRuntimeConfig, l as CodemationEventBusConfig, m as CodemationAppContext, n as CodemationAppSchedulerConfig, o as CodemationDatabaseConfig, p as CodemationWorkflowDiscovery, r as CodemationAppSchedulerKind, s as CodemationDatabaseKind, t as CodemationAppDefinition, u as CodemationEventBusKind, v as CodemationPlugin, x as CodemationClassToken, y as CodemationPluginContext } from "./CodemationConfig-D2ULNkec.js";
6
+ import "./CodemationConfigNormalizer-CBLxXaRV.js";
7
+ import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BLvzcfb7.js";
8
+ import "./CredentialServices-BeuMtqYA.js";
9
+ import { _ as QueryBus, c as DatabaseMigrations, g as UpsertLocalBootstrapUserResultDto, h as ListUserAccountsQuery, l as AppContainerLifecycle, m as UpsertLocalBootstrapUserCommand, n as CodemationBootstrapRequest, o as WorkerRuntime, r as ApplicationTokens, s as FrontendRuntime, t as CodemationPluginListMerger, u as AppContainerFactory, v as CommandBus } from "./CodemationPluginListMerger-B0-e4CJ6.js";
10
+ import { r as PrismaClient, t as AppConfigFactory } from "./AppConfigFactory-DmHOpg8O.js";
11
+ import { c as CodemationServerGateway, d as CodemationPluginPackageManifest, l as ApiPaths, u as CodemationPackageManifest } from "./server-Dyo8qh4k.js";
12
+ import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-CaehMh3M.js";
13
+ import { n as CodemationFrontendAuthSnapshotFactory, t as FrontendAppConfigFactory } from "./FrontendAppConfigFactory-Bj-DZNlt.js";
14
+ export { ApiPaths, type AppConfig, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, 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 CodemationPluginContext, CodemationPluginListMerger, type CodemationPluginPackageManifest, CodemationPostgresPrismaClientFactory, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, CodemationServerGateway, type CodemationWhitelabelConfig, type CodemationWorkflowDiscovery, type CommandBus, DatabaseMigrations, type FrontendAppConfig, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, ListUserAccountsQuery, PrismaClient, type QueryBus, UpsertLocalBootstrapUserCommand, type UpsertLocalBootstrapUserResultDto, WorkerRuntime };
package/dist/index.js CHANGED
@@ -1,14 +1,15 @@
1
1
  import "./ConsoleLogger-ClPU7jtc.js";
2
- import "./ServerLoggerFactory-BRHxIDS7.js";
3
- import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-scS_RQMy.js";
4
- import "./decorateParam-BTcc3KNk.js";
5
- import "./decorate-B-N_5S4p.js";
6
- import { u as ApplicationTokens } from "./CredentialServices-BKBGe7l3.js";
7
- import { b as ListUserAccountsQuery, n as CodemationBootstrapRequest, o as ApiPaths, r as CodemationApplication, t as CodemationFrontendBootstrapRequest, y as UpsertLocalBootstrapUserCommand } from "./CodemationFrontendBootstrapRequest-CNEk-C4D.js";
8
- import "./PrismaMigrationDeployer-B7cHGrXP.js";
9
- import { n as CodemationWorkerBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-BNmaoXQL.js";
10
- import { n as CodemationPostgresPrismaClientFactory, t as import_client } from "./persistenceServer-8tcM2S48.js";
11
- import { n as CodemationServerGateway } from "./server-Dd65rNm6.js";
2
+ import { n as CodemationFrontendAuthSnapshotJsonCodec, t as FrontendAppConfigJsonCodec } from "./FrontendAppConfigJsonCodec-nOCQI0ag.js";
3
+ import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-BBzAr6L_.js";
4
+ import "./ServerLoggerFactory-BltIIDfQ.js";
5
+ import "./decorateParam-DrsXNPuw.js";
6
+ import "./decorate-B0PP651O.js";
7
+ import { u as ApplicationTokens } from "./CredentialServices-DNb3CZwW.js";
8
+ import { C as UpsertLocalBootstrapUserCommand, _ as ApiPaths, a as AppContainerLifecycle, h as CodemationFrontendAuthSnapshotFactory, i as DatabaseMigrations, m as FrontendAppConfigFactory, n as WorkerRuntime, r as FrontendRuntime, t as AppContainerFactory, w as ListUserAccountsQuery } from "./AppContainerFactory-B5eRpvAa.js";
9
+ import { t as AppConfigFactory } from "./AppConfigFactory-DWIz2hy-.js";
10
+ import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-DrVOw9KP.js";
11
+ import { n as CodemationPostgresPrismaClientFactory, t as import_client } from "./persistenceServer-DVeWUbc3.js";
12
+ import { r as CodemationServerGateway } from "./server-C65z_kqm.js";
12
13
 
13
14
  var PrismaClient = import_client.PrismaClient;
14
- export { ApiPaths, ApplicationTokens, CodemationApplication, CodemationBootstrapRequest, CodemationConsumerConfigLoader, CodemationFrontendBootstrapRequest, CodemationPluginListMerger, CodemationPostgresPrismaClientFactory, CodemationServerGateway, CodemationWorkerBootstrapRequest, ListUserAccountsQuery, PrismaClient, UpsertLocalBootstrapUserCommand };
15
+ export { ApiPaths, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, CodemationBootstrapRequest, CodemationConsumerConfigLoader, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, CodemationPluginListMerger, CodemationPostgresPrismaClientFactory, CodemationServerGateway, DatabaseMigrations, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, ListUserAccountsQuery, PrismaClient, UpsertLocalBootstrapUserCommand, WorkerRuntime };
@@ -1,13 +1,29 @@
1
- import { a as Logger, o as LoggerFactory } from "./CodemationWhitelabelConfig-DgbjgtrR.js";
2
- import "./LogLevelPolicy-4cq9z0TI.js";
3
- import { N as BinaryStorage, W as Clock } from "./index-Bs4F1IsC.js";
4
- import { y as AppConfig } from "./CodemationConfig-XCkSV2dj.js";
5
- import { a as CredentialInstanceService, i as CredentialBindingService } from "./CredentialServices-DpDpm8mL.js";
6
- import { C as BinaryHttpRouteHandler, S as HonoApiRouteRegistrar, T as WorkflowRunRepository, _ as OAuth2HttpRouteHandler, b as logLevelPolicyFactory, c as CodemationFrontendBootstrapRequest, d as WorkflowHttpRouteHandler, f as WorkflowDefinitionMapper, g as RunHttpRouteHandler, h as RequestToWebhookItemMapper, i as CodemationApplication, l as CodemationBootstrapRequest, m as WebhookHttpRouteHandler, n as ApplicationTokens, p as WorkflowPolicyUiPresentationFactory, r as SessionVerifier, s as CodemationWorkerBootstrapRequest, t as CodemationPluginListMerger, u as WorkflowWebsocketServer, v as DevBootstrapSummaryJson, w as RunBinaryAttachmentLookupService, x as CredentialHttpRouteHandler, y as LogLevelPolicyFactory } from "./CodemationPluginListMerger-BRYqEk0y.js";
7
- import "./client-Yh7-CQud.js";
8
- import "./WorkflowViewContracts-DCLpTn25.js";
1
+ import { l as Logger, u as LoggerFactory } from "./CodemationAuthConfig-Bh2cCNCI.js";
2
+ import { t as LogLevelPolicy } from "./LogLevelPolicy-BS_NlAOg.js";
3
+ import { n as CodemationFrontendAuthProviderSnapshot, r as CodemationFrontendAuthSnapshot, t as FrontendAppConfig } from "./FrontendAppConfig-D50wjj_n.js";
4
+ import { C as CredentialTypeDefinition, E as ActivationIdFactory, M as WorkflowDefinition, O as Item, P as BinaryStorage, R as WebhookInvocationMatch, U as Clock, _ as CredentialOAuth2AuthDefinition, j as RunIdFactory, k as NodeDefinition, t as RunIntentService, z as WorkflowActivationPolicy } from "./index-CkiptHb-.js";
5
+ import { g as AppConfig } from "./CodemationConfig-D2ULNkec.js";
6
+ import "./CodemationConfigNormalizer-CBLxXaRV.js";
7
+ import { a as CredentialInstanceService, c as CredentialFieldEnvOverlayService, i as CredentialBindingService, l as CredentialTypeRegistryImpl, o as CredentialMaterialResolver, r as CredentialRuntimeMaterialService, s as CredentialSecretCipher, t as CredentialStore } from "./CredentialServices-BeuMtqYA.js";
8
+ import { _ as QueryBus, a as SessionVerifier, c as DatabaseMigrations, d as WorkflowWebsocketServer, f as RunBinaryAttachmentLookupService, i as HonoApiRouteRegistrar, l as AppContainerLifecycle, n as CodemationBootstrapRequest, o as WorkerRuntime, p as WorkflowRunRepository, r as ApplicationTokens, s as FrontendRuntime, t as CodemationPluginListMerger, u as AppContainerFactory, v as CommandBus } from "./CodemationPluginListMerger-B0-e4CJ6.js";
9
+ import { t as AppConfigFactory } from "./AppConfigFactory-DmHOpg8O.js";
10
+ import { i as WorkflowSummary, r as WorkflowDto, t as FrontendAppConfigFactory } from "./FrontendAppConfigFactory-Bj-DZNlt.js";
9
11
  import { Hono } from "hono";
10
12
 
13
+ //#region src/application/dev/DevBootstrapSummaryJson.types.d.ts
14
+ type DevBootstrapSummaryJson = Readonly<{
15
+ logLevel: string;
16
+ codemationLogLevelEnv?: string;
17
+ databaseLabel: string;
18
+ schedulerLabel: string;
19
+ eventBusLabel: string;
20
+ redisUrlRedacted?: string;
21
+ activeWorkflows: ReadonlyArray<Readonly<{
22
+ id: string;
23
+ name: string;
24
+ }>>;
25
+ }>;
26
+ //#endregion
11
27
  //#region src/application/logging/LogFilter.d.ts
12
28
  type LogFilter = (entry: Readonly<{
13
29
  scope: string;
@@ -27,6 +43,18 @@ declare class FilteringLogger implements Logger {
27
43
  debug(message: string, exception?: Error): void;
28
44
  }
29
45
  //#endregion
46
+ //#region src/infrastructure/logging/LogLevelPolicyFactory.d.ts
47
+ /**
48
+ * Process-wide {@link LogLevelPolicy} singleton for server and browser loggers.
49
+ * Plain class (no `@injectable` from `@codemation/core`): client components import this file; decorating would pull core into the browser bundle.
50
+ */
51
+ declare class LogLevelPolicyFactory {
52
+ private readonly policy;
53
+ create(): LogLevelPolicy;
54
+ }
55
+ /** Shared factory for call sites outside the DI container (e.g. next-host bootstrap). */
56
+ declare const logLevelPolicyFactory: LogLevelPolicyFactory;
57
+ //#endregion
30
58
  //#region src/infrastructure/logging/PerformanceLogPolicy.d.ts
31
59
  /**
32
60
  * Opt-in detailed timing / diagnostics lines (used with `ServerLoggerFactory#createPerformanceDiagnostics`).
@@ -56,6 +84,39 @@ declare class ServerLoggerFactory implements LoggerFactory {
56
84
  createPerformanceDiagnostics(scope: string): Logger;
57
85
  }
58
86
  //#endregion
87
+ //#region src/application/mapping/DataMapper.d.ts
88
+ interface DataMapper<TSource, TTarget> {
89
+ map(source: TSource): Promise<TTarget>;
90
+ }
91
+ //#endregion
92
+ //#region src/application/mapping/WorkflowPolicyUiPresentationFactory.d.ts
93
+ /** UI-facing policy labels derived from workflow/node definitions (live or hydrated snapshot). */
94
+ declare class WorkflowPolicyUiPresentationFactory {
95
+ workflowHasErrorHandler(workflow: WorkflowDefinition): boolean;
96
+ nodeRetrySummary(config: NodeDefinition["config"]): string | undefined;
97
+ nodeHasErrorHandler(config: NodeDefinition["config"]): boolean;
98
+ snapshotNodeRetrySummary(config: unknown): string | undefined;
99
+ snapshotNodeHasErrorHandler(config: unknown): boolean;
100
+ private asRecord;
101
+ }
102
+ //#endregion
103
+ //#region src/application/mapping/WorkflowDefinitionMapper.d.ts
104
+ declare class WorkflowDefinitionMapper implements DataMapper<WorkflowDefinition, WorkflowDto> {
105
+ private readonly policyUi;
106
+ private readonly workflowActivationPolicy;
107
+ constructor(policyUi: WorkflowPolicyUiPresentationFactory, workflowActivationPolicy: WorkflowActivationPolicy);
108
+ map(workflow: WorkflowDefinition): Promise<WorkflowDto>;
109
+ mapSync(workflow: WorkflowDefinition): WorkflowDto;
110
+ toSummary(workflow: WorkflowDefinition): WorkflowSummary;
111
+ private buildConnectionChildMeta;
112
+ private agentHasConnectionMetadata;
113
+ private toNodes;
114
+ private toEdges;
115
+ private createLanguageModelNode;
116
+ private createToolNode;
117
+ private nodeTypeName;
118
+ }
119
+ //#endregion
59
120
  //#region src/application/runs/WorkflowRunRetentionPruneScheduler.d.ts
60
121
  /**
61
122
  * Periodically deletes terminal workflow runs whose age exceeds the effective retention
@@ -77,6 +138,38 @@ declare class WorkflowRunRetentionPruneScheduler {
77
138
  runOnce(): Promise<void>;
78
139
  }
79
140
  //#endregion
141
+ //#region src/infrastructure/webhooks/RequestToWebhookItemMapper.d.ts
142
+ declare class RequestToWebhookItemMapper {
143
+ private readonly binaryStorage;
144
+ private readonly runIdFactory;
145
+ private readonly activationIdFactory;
146
+ constructor(binaryStorage: BinaryStorage, runIdFactory: RunIdFactory, activationIdFactory: ActivationIdFactory);
147
+ map(request: Request, match: WebhookInvocationMatch): Promise<Item>;
148
+ private mapMultipart;
149
+ private parseJsonBody;
150
+ private isJsonRequest;
151
+ private resolveBody;
152
+ private toHeaders;
153
+ private toQuery;
154
+ }
155
+ //#endregion
156
+ //#region src/presentation/http/ServerHttpRouteParams.d.ts
157
+ type ServerHttpRouteParams = Readonly<Record<string, string>>;
158
+ //#endregion
159
+ //#region src/presentation/http/routeHandlers/BinaryHttpRouteHandlerFactory.d.ts
160
+ declare class BinaryHttpRouteHandler {
161
+ private readonly queryBus;
162
+ private readonly commandBus;
163
+ private readonly binaryStorage;
164
+ constructor(queryBus: QueryBus, commandBus: CommandBus, binaryStorage: BinaryStorage);
165
+ getRunBinaryContent(_: Request, params: ServerHttpRouteParams): Promise<Response>;
166
+ getWorkflowOverlayBinaryContent(_: Request, params: ServerHttpRouteParams): Promise<Response>;
167
+ postWorkflowDebuggerOverlayBinaryUpload(request: Request, params: ServerHttpRouteParams): Promise<Response>;
168
+ private createBinaryResponse;
169
+ private createContentDisposition;
170
+ private escapeFilename;
171
+ }
172
+ //#endregion
80
173
  //#region src/presentation/http/hono/CodemationHonoApiAppFactory.d.ts
81
174
  declare class CodemationHonoApiApp {
82
175
  private readonly app;
@@ -85,5 +178,147 @@ declare class CodemationHonoApiApp {
85
178
  fetch(request: Request): Response | Promise<Response>;
86
179
  }
87
180
  //#endregion
88
- export { ApplicationTokens, BinaryHttpRouteHandler, CodemationApplication, CodemationBootstrapRequest, CodemationFrontendBootstrapRequest, CodemationHonoApiApp, CodemationPluginListMerger, CodemationWorkerBootstrapRequest, CredentialBindingService, CredentialHttpRouteHandler, CredentialInstanceService, type DevBootstrapSummaryJson, FilteringLogger, type LogFilter, LogLevelPolicyFactory, type Logger, type LoggerFactory, OAuth2HttpRouteHandler, PerformanceLogPolicy, PerformanceLogPolicyFactory, RequestToWebhookItemMapper, RunBinaryAttachmentLookupService, RunHttpRouteHandler, ServerLoggerFactory, WebhookHttpRouteHandler, WorkflowDefinitionMapper, WorkflowHttpRouteHandler, WorkflowPolicyUiPresentationFactory, WorkflowRunRetentionPruneScheduler, WorkflowWebsocketServer, logLevelPolicyFactory, performanceLogPolicyFactory };
181
+ //#region src/presentation/http/routeHandlers/CredentialHttpRouteHandler.d.ts
182
+ declare class CredentialHttpRouteHandler {
183
+ private readonly queryBus;
184
+ private readonly commandBus;
185
+ constructor(queryBus: QueryBus, commandBus: CommandBus);
186
+ getCredentialTypes(): Promise<Response>;
187
+ getCredentialFieldEnvStatus(): Promise<Response>;
188
+ getCredentialInstances(): Promise<Response>;
189
+ getCredentialInstance(request: Request, params: ServerHttpRouteParams): Promise<Response>;
190
+ postCredentialInstance(request: Request): Promise<Response>;
191
+ putCredentialInstance(request: Request, params: ServerHttpRouteParams): Promise<Response>;
192
+ deleteCredentialInstance(_: Request, params: ServerHttpRouteParams): Promise<Response>;
193
+ putCredentialBinding(request: Request): Promise<Response>;
194
+ postCredentialInstanceTest(_: Request, params: ServerHttpRouteParams): Promise<Response>;
195
+ getWorkflowCredentialHealth(_: Request, params: ServerHttpRouteParams): Promise<Response>;
196
+ }
197
+ //#endregion
198
+ //#region src/domain/credentials/OAuth2ProviderRegistry.d.ts
199
+ type JsonRecord = Readonly<Record<string, unknown>>;
200
+ type OAuth2ResolvedProvider = Readonly<{
201
+ providerId: string;
202
+ authorizeUrl: string;
203
+ tokenUrl: string;
204
+ userInfoUrl?: string;
205
+ }>;
206
+ declare class OAuth2ProviderRegistry {
207
+ private static readonly googleProvider;
208
+ resolve(definition: CredentialTypeDefinition, publicConfig: JsonRecord): OAuth2ResolvedProvider;
209
+ resolveClientId(auth: CredentialOAuth2AuthDefinition, publicConfig: JsonRecord): string;
210
+ resolveClientSecretFieldKey(auth: CredentialOAuth2AuthDefinition): string;
211
+ private resolveBuiltInProvider;
212
+ private resolvePublicConfigProvider;
213
+ }
214
+ //#endregion
215
+ //#region src/domain/credentials/OAuth2ConnectServiceFactory.d.ts
216
+ type OAuth2AuthRedirectResult = Readonly<{
217
+ instanceId: string;
218
+ redirectUri: string;
219
+ redirectUrl: string;
220
+ }>;
221
+ type OAuth2CallbackResult = Readonly<{
222
+ instanceId: string;
223
+ connectedEmail?: string;
224
+ }>;
225
+ declare class OAuth2ConnectService {
226
+ private readonly credentialStore;
227
+ private readonly credentialInstanceService;
228
+ private readonly credentialTypeRegistry;
229
+ private readonly credentialRuntimeMaterialService;
230
+ private readonly credentialFieldEnvOverlayService;
231
+ private readonly credentialMaterialResolver;
232
+ private readonly credentialSecretCipher;
233
+ private readonly oauth2ProviderRegistry;
234
+ private readonly appConfig;
235
+ private static readonly stateTtlMs;
236
+ constructor(credentialStore: CredentialStore, credentialInstanceService: CredentialInstanceService, credentialTypeRegistry: CredentialTypeRegistryImpl, credentialRuntimeMaterialService: CredentialRuntimeMaterialService, credentialFieldEnvOverlayService: CredentialFieldEnvOverlayService, credentialMaterialResolver: CredentialMaterialResolver, credentialSecretCipher: CredentialSecretCipher, oauth2ProviderRegistry: OAuth2ProviderRegistry, appConfig: AppConfig);
237
+ createAuthRedirect(instanceId: string, requestOrigin: string): Promise<OAuth2AuthRedirectResult>;
238
+ handleCallback(args: Readonly<{
239
+ code?: string | null;
240
+ state?: string | null;
241
+ requestOrigin: string;
242
+ }>): Promise<OAuth2CallbackResult>;
243
+ getRedirectUri(requestOrigin: string): string;
244
+ /**
245
+ * `new URL(path, base)` requires `base` to be an absolute URL with a scheme.
246
+ * Misconfigured CODEMATION_PUBLIC_BASE_URL (e.g. `localhost:3000` without http://) or odd
247
+ * forwarded headers otherwise throw TypeError: Invalid URL.
248
+ *
249
+ * Comma-separated values (proxy chains or copy-paste mistakes like `http,http`) use the
250
+ * first segment only; obviously invalid hostnames are rejected.
251
+ */
252
+ private ensureAbsoluteUrlForOAuth2Base;
253
+ private requireOAuth2Type;
254
+ private exchangeAuthorizationCode;
255
+ private mergeTokenMaterial;
256
+ private resolveExpiry;
257
+ private resolveGrantedScopes;
258
+ private resolveConnectedEmail;
259
+ private findEmail;
260
+ private parseJsonRecord;
261
+ private createTokenExchangeErrorMessage;
262
+ private createOpaqueValue;
263
+ private createPkceCodeChallenge;
264
+ private normalizeBaseUrl;
265
+ }
266
+ //#endregion
267
+ //#region src/presentation/http/routeHandlers/OAuth2HttpRouteHandlerFactory.d.ts
268
+ declare class OAuth2HttpRouteHandler {
269
+ private readonly oauth2ConnectService;
270
+ private readonly credentialInstanceService;
271
+ constructor(oauth2ConnectService: OAuth2ConnectService, credentialInstanceService: CredentialInstanceService);
272
+ getAuthRedirect(request: Request): Promise<Response>;
273
+ getCallback(request: Request): Promise<Response>;
274
+ getRedirectUri(request: Request): Promise<Response>;
275
+ postDisconnect(request: Request): Promise<Response>;
276
+ private resolveRequestOrigin;
277
+ /** Proxies may send comma-separated lists (chain); use the first host/proto only. */
278
+ private static firstCommaSeparatedValue;
279
+ /**
280
+ * Serialize popup payload for an inline script using `serialize-javascript`
281
+ * (Webpack / HTML plugin stack): escapes angle brackets, slashes, and Unicode line
282
+ * terminators so string values cannot break out of the script block.
283
+ */
284
+ private createPopupHtml;
285
+ }
286
+ //#endregion
287
+ //#region src/presentation/http/routeHandlers/RunHttpRouteHandler.d.ts
288
+ declare class RunHttpRouteHandler {
289
+ private readonly queryBus;
290
+ private readonly commandBus;
291
+ constructor(queryBus: QueryBus, commandBus: CommandBus);
292
+ getRun(_: Request, params: ServerHttpRouteParams): Promise<Response>;
293
+ postRuns(request: Request, _: ServerHttpRouteParams): Promise<Response>;
294
+ patchRunWorkflowSnapshot(request: Request, params: ServerHttpRouteParams): Promise<Response>;
295
+ patchRunNodePin(request: Request, params: ServerHttpRouteParams): Promise<Response>;
296
+ postRunNode(request: Request, params: ServerHttpRouteParams): Promise<Response>;
297
+ }
298
+ //#endregion
299
+ //#region src/presentation/http/routeHandlers/WebhookHttpRouteHandler.d.ts
300
+ declare class WebhookHttpRouteHandler {
301
+ private readonly commandBus;
302
+ private readonly runIntentService;
303
+ private readonly requestToWebhookItemMapper;
304
+ constructor(commandBus: CommandBus, runIntentService: RunIntentService, requestToWebhookItemMapper: RequestToWebhookItemMapper);
305
+ postWebhook(request: Request, params: ServerHttpRouteParams): Promise<Response>;
306
+ }
307
+ //#endregion
308
+ //#region src/presentation/http/routeHandlers/WorkflowHttpRouteHandler.d.ts
309
+ declare class WorkflowHttpRouteHandler {
310
+ private readonly queryBus;
311
+ private readonly commandBus;
312
+ private readonly workflowDefinitionMapper;
313
+ constructor(queryBus: QueryBus, commandBus: CommandBus, workflowDefinitionMapper: WorkflowDefinitionMapper);
314
+ getWorkflows(_: Request, __: ServerHttpRouteParams): Promise<Response>;
315
+ getWorkflow(_: Request, params: ServerHttpRouteParams): Promise<Response>;
316
+ patchWorkflowActivation(request: Request, params: ServerHttpRouteParams): Promise<Response>;
317
+ getWorkflowRuns(_: Request, params: ServerHttpRouteParams): Promise<Response>;
318
+ getWorkflowDebuggerOverlay(_: Request, params: ServerHttpRouteParams): Promise<Response>;
319
+ putWorkflowDebuggerOverlay(request: Request, params: ServerHttpRouteParams): Promise<Response>;
320
+ postCopyWorkflowDebuggerOverlay(request: Request, params: ServerHttpRouteParams): Promise<Response>;
321
+ }
322
+ //#endregion
323
+ 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 LogFilter, LogLevelPolicyFactory, type Logger, type LoggerFactory, OAuth2HttpRouteHandler, PerformanceLogPolicy, PerformanceLogPolicyFactory, RequestToWebhookItemMapper, RunBinaryAttachmentLookupService, RunHttpRouteHandler, ServerLoggerFactory, WebhookHttpRouteHandler, WorkerRuntime, WorkflowDefinitionMapper, WorkflowHttpRouteHandler, WorkflowPolicyUiPresentationFactory, WorkflowRunRetentionPruneScheduler, WorkflowWebsocketServer, logLevelPolicyFactory, performanceLogPolicyFactory };
89
324
  //# sourceMappingURL=nextServer.d.ts.map
@@ -1,11 +1,11 @@
1
1
  import "./ConsoleLogger-ClPU7jtc.js";
2
- import { a as FilteringLogger, i as PerformanceLogPolicy, n as PerformanceLogPolicyFactory, o as LogLevelPolicyFactory, r as performanceLogPolicyFactory, s as logLevelPolicyFactory, t as ServerLoggerFactory } from "./ServerLoggerFactory-BRHxIDS7.js";
3
- import { n as __decorateMetadata, t as __decorateParam } from "./decorateParam-BTcc3KNk.js";
4
- import { t as __decorate } from "./decorate-B-N_5S4p.js";
5
- import { a as CredentialInstanceService, i as CredentialBindingService, u as ApplicationTokens } from "./CredentialServices-BKBGe7l3.js";
6
- import { a as WorkflowWebsocketServer, c as WorkflowDefinitionMapper, d as RequestToWebhookItemMapper, f as RunHttpRouteHandler, h as BinaryHttpRouteHandler, i as CodemationHonoApiApp, l as WorkflowPolicyUiPresentationFactory, m as CredentialHttpRouteHandler, n as CodemationBootstrapRequest, p as OAuth2HttpRouteHandler, r as CodemationApplication, s as WorkflowHttpRouteHandler, t as CodemationFrontendBootstrapRequest, u as WebhookHttpRouteHandler, v as RunBinaryAttachmentLookupService } from "./CodemationFrontendBootstrapRequest-CNEk-C4D.js";
7
- import "./PrismaMigrationDeployer-B7cHGrXP.js";
8
- import { n as CodemationWorkerBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-BNmaoXQL.js";
2
+ import { a as FilteringLogger, i as PerformanceLogPolicy, n as PerformanceLogPolicyFactory, o as LogLevelPolicyFactory, r as performanceLogPolicyFactory, s as logLevelPolicyFactory, t as ServerLoggerFactory } from "./ServerLoggerFactory-BltIIDfQ.js";
3
+ import { n as __decorateMetadata, t as __decorateParam } from "./decorateParam-DrsXNPuw.js";
4
+ import { t as __decorate } from "./decorate-B0PP651O.js";
5
+ import { a as CredentialInstanceService, i as CredentialBindingService, u as ApplicationTokens } from "./CredentialServices-DNb3CZwW.js";
6
+ import { S as RunBinaryAttachmentLookupService, a as AppContainerLifecycle, c as RequestToWebhookItemMapper, d as CredentialHttpRouteHandler, f as CodemationHonoApiApp, g as WorkflowWebsocketServer, i as DatabaseMigrations, l as RunHttpRouteHandler, m as FrontendAppConfigFactory, n as WorkerRuntime, o as WorkflowHttpRouteHandler, p as BinaryHttpRouteHandler, r as FrontendRuntime, s as WebhookHttpRouteHandler, t as AppContainerFactory, u as OAuth2HttpRouteHandler, v as WorkflowDefinitionMapper, y as WorkflowPolicyUiPresentationFactory } from "./AppContainerFactory-B5eRpvAa.js";
7
+ import { t as AppConfigFactory } from "./AppConfigFactory-DWIz2hy-.js";
8
+ import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-DrVOw9KP.js";
9
9
  import { CoreTokens, RunFinishedAtFactory, inject, injectable } from "@codemation/core";
10
10
 
11
11
  //#region src/application/binary/RunStateBinaryStorageKeysCollector.ts
@@ -123,5 +123,5 @@ WorkflowRunRetentionPruneScheduler = __decorate([
123
123
  ], WorkflowRunRetentionPruneScheduler);
124
124
 
125
125
  //#endregion
126
- export { ApplicationTokens, BinaryHttpRouteHandler, CodemationApplication, CodemationBootstrapRequest, CodemationFrontendBootstrapRequest, CodemationHonoApiApp, CodemationPluginListMerger, CodemationWorkerBootstrapRequest, CredentialBindingService, CredentialHttpRouteHandler, CredentialInstanceService, FilteringLogger, LogLevelPolicyFactory, OAuth2HttpRouteHandler, PerformanceLogPolicy, PerformanceLogPolicyFactory, RequestToWebhookItemMapper, RunBinaryAttachmentLookupService, RunHttpRouteHandler, ServerLoggerFactory, WebhookHttpRouteHandler, WorkflowDefinitionMapper, WorkflowHttpRouteHandler, WorkflowPolicyUiPresentationFactory, WorkflowRunRetentionPruneScheduler, WorkflowWebsocketServer, logLevelPolicyFactory, performanceLogPolicyFactory };
126
+ export { AppConfigFactory, AppContainerFactory, AppContainerLifecycle, ApplicationTokens, BinaryHttpRouteHandler, CodemationBootstrapRequest, CodemationHonoApiApp, CodemationPluginListMerger, CredentialBindingService, CredentialHttpRouteHandler, CredentialInstanceService, DatabaseMigrations, FilteringLogger, FrontendAppConfigFactory, FrontendRuntime, LogLevelPolicyFactory, OAuth2HttpRouteHandler, PerformanceLogPolicy, PerformanceLogPolicyFactory, RequestToWebhookItemMapper, RunBinaryAttachmentLookupService, RunHttpRouteHandler, ServerLoggerFactory, WebhookHttpRouteHandler, WorkerRuntime, WorkflowDefinitionMapper, WorkflowHttpRouteHandler, WorkflowPolicyUiPresentationFactory, WorkflowRunRetentionPruneScheduler, WorkflowWebsocketServer, logLevelPolicyFactory, performanceLogPolicyFactory };
127
127
  //# sourceMappingURL=nextServer.js.map
@@ -0,0 +1,9 @@
1
+ import { r as PrismaClient } from "./AppConfigFactory-DmHOpg8O.js";
2
+
3
+ //#region src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.d.ts
4
+ declare class CodemationPostgresPrismaClientFactory {
5
+ static create(databaseUrl: string): PrismaClient;
6
+ }
7
+ //#endregion
8
+ export { CodemationPostgresPrismaClientFactory as t };
9
+ //# sourceMappingURL=persistenceServer-CaehMh3M.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM } from "./chunk-7V6ThxGB.js";
2
- import { r as require_client } from "./PrismaMigrationDeployer-B7cHGrXP.js";
2
+ import { r as require_client } from "./AppConfigFactory-DWIz2hy-.js";
3
3
  import { PrismaPg } from "@prisma/adapter-pg";
4
4
 
5
5
  //#region src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.ts
@@ -16,4 +16,4 @@ var import_client = /* @__PURE__ */ __toESM(require_client(), 1);
16
16
 
17
17
  //#endregion
18
18
  export { CodemationPostgresPrismaClientFactory as n, import_client as t };
19
- //# sourceMappingURL=persistenceServer-8tcM2S48.js.map
19
+ //# sourceMappingURL=persistenceServer-DVeWUbc3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"persistenceServer-8tcM2S48.js","names":["PrismaClient"],"sources":["../src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.ts","../src/persistenceServer.ts"],"sourcesContent":["import { PrismaPg } from \"@prisma/adapter-pg\";\nimport { PrismaClient } from \"./generated/prisma-client/client.js\";\n\nexport class CodemationPostgresPrismaClientFactory {\n static create(databaseUrl: string): PrismaClient {\n const adapter = new PrismaPg({ connectionString: databaseUrl });\n return new PrismaClient({ adapter });\n }\n}\n","export { CodemationPostgresPrismaClientFactory } from \"./infrastructure/persistence/CodemationPostgresPrismaClientFactory\";\nexport { DatabasePersistenceResolver } from \"./infrastructure/persistence/DatabasePersistenceResolver\";\nexport type { ResolvedDatabasePersistence } from \"./infrastructure/persistence/DatabasePersistenceResolver\";\nexport { PrismaMigrationDeployer } from \"./infrastructure/persistence/PrismaMigrationDeployer\";\nexport { PrismaClient } from \"./infrastructure/persistence/generated/prisma-client/client.js\";\n"],"mappings":";;;;;;AAGA,IAAa,wCAAb,MAAmD;CACjD,OAAO,OAAO,aAAmC;AAE/C,SAAO,IAAIA,6BAAa,EAAE,SADV,IAAI,SAAS,EAAE,kBAAkB,aAAa,CAAC,EAC5B,CAAC"}
1
+ {"version":3,"file":"persistenceServer-DVeWUbc3.js","names":["PrismaClient"],"sources":["../src/infrastructure/persistence/CodemationPostgresPrismaClientFactory.ts","../src/persistenceServer.ts"],"sourcesContent":["import { PrismaPg } from \"@prisma/adapter-pg\";\nimport { PrismaClient } from \"./generated/prisma-client/client.js\";\n\nexport class CodemationPostgresPrismaClientFactory {\n static create(databaseUrl: string): PrismaClient {\n const adapter = new PrismaPg({ connectionString: databaseUrl });\n return new PrismaClient({ adapter });\n }\n}\n","export { CodemationPostgresPrismaClientFactory } from \"./infrastructure/persistence/CodemationPostgresPrismaClientFactory\";\nexport type { AppPersistenceConfig } from \"./presentation/config/AppConfig\";\nexport { AppConfigFactory } from \"./bootstrap/runtime/AppConfigFactory\";\nexport { PrismaMigrationDeployer } from \"./infrastructure/persistence/PrismaMigrationDeployer\";\nexport { PrismaClient } from \"./infrastructure/persistence/generated/prisma-client/client.js\";\n"],"mappings":";;;;;;AAGA,IAAa,wCAAb,MAAmD;CACjD,OAAO,OAAO,aAAmC;AAE/C,SAAO,IAAIA,6BAAa,EAAE,SADV,IAAI,SAAS,EAAE,kBAAkB,aAAa,CAAC,EAC5B,CAAC"}
@@ -1,6 +1,7 @@
1
- import "./CodemationWhitelabelConfig-DgbjgtrR.js";
2
- import "./index-Bs4F1IsC.js";
3
- import "./CodemationConfig-XCkSV2dj.js";
4
- import { n as DatabasePersistenceResolver, r as ResolvedDatabasePersistence, t as PrismaClient } from "./client-Yh7-CQud.js";
5
- import { n as CodemationPostgresPrismaClientFactory, t as PrismaMigrationDeployer } from "./persistenceServer-DPSj_-oU.js";
6
- export { CodemationPostgresPrismaClientFactory, DatabasePersistenceResolver, PrismaClient, PrismaMigrationDeployer, ResolvedDatabasePersistence };
1
+ import "./CodemationAuthConfig-Bh2cCNCI.js";
2
+ import "./index-CkiptHb-.js";
3
+ import { _ as AppPersistenceConfig } from "./CodemationConfig-D2ULNkec.js";
4
+ import "./CodemationConfigNormalizer-CBLxXaRV.js";
5
+ import { n as PrismaMigrationDeployer, r as PrismaClient, t as AppConfigFactory } from "./AppConfigFactory-DmHOpg8O.js";
6
+ import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-CaehMh3M.js";
7
+ export { AppConfigFactory, AppPersistenceConfig, CodemationPostgresPrismaClientFactory, PrismaClient, PrismaMigrationDeployer };
@@ -1,6 +1,6 @@
1
- import "./decorate-B-N_5S4p.js";
2
- import { n as DatabasePersistenceResolver, t as PrismaMigrationDeployer } from "./PrismaMigrationDeployer-B7cHGrXP.js";
3
- import { n as CodemationPostgresPrismaClientFactory, t as import_client } from "./persistenceServer-8tcM2S48.js";
1
+ import "./decorate-B0PP651O.js";
2
+ import { n as PrismaMigrationDeployer, t as AppConfigFactory } from "./AppConfigFactory-DWIz2hy-.js";
3
+ import { n as CodemationPostgresPrismaClientFactory, t as import_client } from "./persistenceServer-DVeWUbc3.js";
4
4
 
5
5
  var PrismaClient = import_client.PrismaClient;
6
- export { CodemationPostgresPrismaClientFactory, DatabasePersistenceResolver, PrismaClient, PrismaMigrationDeployer };
6
+ export { AppConfigFactory, CodemationPostgresPrismaClientFactory, PrismaClient, PrismaMigrationDeployer };