@codemation/host 0.8.0 → 0.9.1

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 (148) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dist/{ApiPaths-Dv1dcHu_.js → ApiPaths-DCvrlIjg.js} +12 -1
  3. package/dist/{ApiPaths-Dv1dcHu_.js.map → ApiPaths-DCvrlIjg.js.map} +1 -1
  4. package/dist/{AppConfigFactory-Cx4qQvRk.js → AppConfigFactory-D4LL1aOR.js} +77 -297
  5. package/dist/AppConfigFactory-D4LL1aOR.js.map +1 -0
  6. package/dist/{AppConfigFactory-BT0y0LVC.d.ts → AppConfigFactory-DncmwCD1.d.ts} +2918 -199
  7. package/dist/{AppContainerFactory-DRTjG7nG.js → AppContainerFactory-CHCXP2rn.js} +1735 -474
  8. package/dist/AppContainerFactory-CHCXP2rn.js.map +1 -0
  9. package/dist/{CodemationAppContext-CGFYVcSb.d.ts → CodemationAppContext-K51b7oXe.d.ts} +3 -3
  10. package/dist/{CodemationAuthoring.types-DiKKogum.d.ts → CodemationAuthoring.types-BXlXIl4K.d.ts} +4 -4
  11. package/dist/{CodemationConfigNormalizer-48f-T66P.d.ts → CodemationConfigNormalizer-B4rDYC9h.d.ts} +3 -3
  12. package/dist/{CodemationConsumerConfigLoader-_PIYqwVx.d.ts → CodemationConsumerConfigLoader-Dt4jyLx6.d.ts} +2 -2
  13. package/dist/{CodemationPluginListMerger-DP7djJ9S.d.ts → CodemationPluginListMerger-DS6I3Xe0.d.ts} +24 -12
  14. package/dist/{persistenceServer-C-hH4z6l.js → CodemationPostgresPrismaClientFactory-C7156Fe-.js} +2 -2
  15. package/dist/CodemationPostgresPrismaClientFactory-C7156Fe-.js.map +1 -0
  16. package/dist/CodemationPostgresPrismaClientFactory-CTNTPnDr.d.ts +9 -0
  17. package/dist/{CredentialContractsRegistry-Bq2bq28t.d.ts → CredentialContractsRegistry-Dgu-rEXi.d.ts} +16 -3
  18. package/dist/{CredentialServices-BLloBztI.d.ts → CredentialServices-B3wPyp2y.d.ts} +4 -4
  19. package/dist/{CredentialServices-Dk8yypeL.js → CredentialServices-Bios0dM8.js} +10 -4
  20. package/dist/CredentialServices-Bios0dM8.js.map +1 -0
  21. package/dist/{InternalHonoApiRouteRegistrar-c7t3KnV_.d.ts → InternalHonoApiRouteRegistrar-Ce1yxpnO.d.ts} +1 -1
  22. package/dist/{InternalPingRegistrar-DY3kSfxP.js → InternalPingRegistrar-BavAAnvk.js} +19 -16
  23. package/dist/InternalPingRegistrar-BavAAnvk.js.map +1 -0
  24. package/dist/{ItemsInputNormalizer-_RwIfRIQ.d.ts → ItemsInputNormalizer-CFkfNMLt.d.ts} +1434 -1225
  25. package/dist/PrismaMigrationDeployer-DdEcXXVi.d.ts +14 -0
  26. package/dist/{PublicFrontendBootstrapFactory-Dv04tJ-6.d.ts → PublicFrontendBootstrapFactory-ClEjZP74.d.ts} +2 -2
  27. package/dist/{PublicFrontendBootstrapJsonCodec-CXG9Dxft.d.ts → PublicFrontendBootstrapJsonCodec-HNItQ7ol.d.ts} +6 -1
  28. package/dist/{TelemetryContracts-BtDx84Cp.d.ts → TelemetryContracts-DpZEODQM.d.ts} +2 -2
  29. package/dist/{WorkflowPolicyUiPresentationFactory-6MyjCvBO.d.ts → WorkflowPolicyUiPresentationFactory-BNn2fvR_.d.ts} +2 -2
  30. package/dist/{WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js → WorkflowPolicyUiPresentationFactory-DfvD2VHk.js} +1 -1
  31. package/dist/{WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js.map → WorkflowPolicyUiPresentationFactory-DfvD2VHk.js.map} +1 -1
  32. package/dist/authoring.d.ts +4 -4
  33. package/dist/client.d.ts +1 -1
  34. package/dist/client.js +1 -1
  35. package/dist/consumer.d.ts +5 -5
  36. package/dist/credentials.d.ts +5 -5
  37. package/dist/credentials.js +1 -1
  38. package/dist/devServerSidecar.d.ts +2 -2
  39. package/dist/dto.d.ts +5 -5
  40. package/dist/{index-DilAYwnH.d.ts → index-ChIfeWzk.d.ts} +71 -28
  41. package/dist/index.d.ts +17 -16
  42. package/dist/index.js +8 -8
  43. package/dist/infrastructure/persistence/PrismaMigrationOperations.d.ts +44 -0
  44. package/dist/infrastructure/persistence/PrismaMigrationOperations.js +302 -0
  45. package/dist/infrastructure/persistence/PrismaMigrationOperations.js.map +1 -0
  46. package/dist/mapping.d.ts +2 -2
  47. package/dist/mapping.js +1 -1
  48. package/dist/nextServer.d.ts +15 -13
  49. package/dist/nextServer.js +6 -6
  50. package/dist/pairing.d.ts +28 -9
  51. package/dist/pairing.js +19 -3
  52. package/dist/pairing.js.map +1 -0
  53. package/dist/{pairing.types-snfZ_OzB.d.ts → pairing.types-D9Bjn98U.d.ts} +1 -1
  54. package/dist/persistenceServer.d.ts +31 -7
  55. package/dist/persistenceServer.js +2 -2
  56. package/dist/{server-09PKasWR.d.ts → server-B5trn7y4.d.ts} +5 -5
  57. package/dist/{server-vtRCPgRJ.js → server-CNj_y0QO.js} +4 -4
  58. package/dist/{server-vtRCPgRJ.js.map → server-CNj_y0QO.js.map} +1 -1
  59. package/dist/server.d.ts +10 -10
  60. package/dist/server.js +8 -8
  61. package/package.json +11 -10
  62. package/playwright.config.ts +8 -2
  63. package/playwright.scaffolded-dev.config.ts +8 -2
  64. package/prisma/migrations/20260526120000_credential_material_pointer/migration.sql +18 -0
  65. package/prisma/migrations/20260527120000_add_human_task/migration.sql +32 -0
  66. package/prisma/migrations/20260527130000_add_hitl_state_json/migration.sql +6 -0
  67. package/prisma/migrations/20260527130000_add_hmac_nonce/migration.sql +12 -0
  68. package/prisma/migrations.sqlite/20260526120000_credential_material_pointer/migration.sql +13 -0
  69. package/prisma/migrations.sqlite/20260527120000_add_human_task/migration.sql +30 -0
  70. package/prisma/migrations.sqlite/20260527130000_add_hitl_state_json/migration.sql +6 -0
  71. package/prisma/migrations.sqlite/20260527130000_add_hmac_nonce/migration.sql +9 -0
  72. package/prisma/schema.postgresql.prisma +48 -0
  73. package/prisma/schema.sqlite.prisma +48 -0
  74. package/prisma-generated/prisma-postgresql-client/edge.js +40 -6
  75. package/prisma-generated/prisma-postgresql-client/index-browser.js +36 -2
  76. package/prisma-generated/prisma-postgresql-client/index.d.ts +3179 -163
  77. package/prisma-generated/prisma-postgresql-client/index.js +40 -6
  78. package/prisma-generated/prisma-postgresql-client/package.json +1 -1
  79. package/prisma-generated/prisma-postgresql-client/schema.prisma +48 -0
  80. package/prisma-generated/prisma-sqlite-client/edge.js +40 -6
  81. package/prisma-generated/prisma-sqlite-client/index-browser.js +36 -2
  82. package/prisma-generated/prisma-sqlite-client/index.d.ts +3175 -163
  83. package/prisma-generated/prisma-sqlite-client/index.js +40 -6
  84. package/prisma-generated/prisma-sqlite-client/package.json +1 -1
  85. package/prisma-generated/prisma-sqlite-client/schema.prisma +48 -0
  86. package/src/application/contracts/CredentialContractsRegistry.ts +15 -0
  87. package/src/application/credentials/AppGalleryProjector.ts +69 -0
  88. package/src/application/hitl/DecideHumanTaskCommandHandler.ts +149 -0
  89. package/src/application/hitl/DecisionSchemaValidator.ts +22 -0
  90. package/src/application/hitl/HitlCallbackHandler.ts +96 -0
  91. package/src/application/mapping/WorkflowDefinitionMapper.ts +1 -3
  92. package/src/application/queries/CredentialQueryHandlers.ts +2 -0
  93. package/src/application/queries/GetCredentialAppsQuery.ts +4 -0
  94. package/src/application/queries/GetCredentialAppsQueryHandler.ts +27 -0
  95. package/src/application/telemetry/ResumeTelemetryContextForRun.ts +53 -0
  96. package/src/application/telemetry/TelemetryRetentionTimestampFactory.ts +9 -8
  97. package/src/applicationTokens.ts +11 -1
  98. package/src/auth/managed/ManagedCorsMiddleware.ts +20 -5
  99. package/src/bootstrap/AppContainerFactory.ts +100 -0
  100. package/src/credentials/CachingCredentialMaterialProvider.ts +96 -0
  101. package/src/credentials/CompositeCredentialMaterialProvider.ts +47 -0
  102. package/src/credentials/ControlPlaneCatalogFetcher.ts +4 -24
  103. package/src/credentials/ControlPlaneCredentialMaterialProvider.ts +79 -0
  104. package/src/credentials/CredentialOAuth2MaterialReader.ts +2 -7
  105. package/src/credentials/InternalCredentialsBindingRegistrar.ts +83 -0
  106. package/src/credentials/LocalCredentialMaterialProvider.ts +92 -0
  107. package/src/domain/credentials/CredentialInstanceService.ts +5 -1
  108. package/src/domain/credentials/CredentialTypeRegistryImpl.ts +18 -4
  109. package/src/domain/workflows/WorkflowActivationPreflightRules.ts +7 -4
  110. package/src/dto.ts +2 -0
  111. package/src/hitl/ControlPlaneInboxChannel.ts +102 -0
  112. package/src/hitl/HitlResumeTokenSigner.ts +80 -0
  113. package/src/hitl/HitlTimeoutJobScheduler.ts +89 -0
  114. package/src/hitl/HitlTimeoutWorker.ts +143 -0
  115. package/src/hitl/InboxChannelResolver.ts +49 -0
  116. package/src/hitl/LocalInboxChannel.ts +37 -0
  117. package/src/infrastructure/persistence/PrismaCredentialStore.ts +10 -0
  118. package/src/infrastructure/persistence/PrismaHmacNonceStore.ts +29 -0
  119. package/src/infrastructure/persistence/PrismaHumanTaskStore.ts +156 -0
  120. package/src/infrastructure/persistence/PrismaMigrationDeployer.ts +53 -383
  121. package/src/infrastructure/persistence/PrismaMigrationOperations.ts +401 -0
  122. package/src/infrastructure/persistence/PrismaWorkflowRunRepository.ts +39 -0
  123. package/src/mcp/AgentMcpIntegrationImpl.ts +5 -1
  124. package/src/pairing/HmacNonceStore.ts +14 -0
  125. package/src/pairing/HmacNonceStoreToken.ts +4 -0
  126. package/src/pairing/HmacRequestSigner.ts +10 -1
  127. package/src/pairing/InMemoryHmacNonceStore.ts +24 -0
  128. package/src/pairing/IncomingHmacVerifier.ts +28 -12
  129. package/src/pairing/InternalHmacAuthMiddleware.ts +1 -1
  130. package/src/pairing/index.ts +3 -0
  131. package/src/presentation/http/ApiPaths.ts +14 -0
  132. package/src/presentation/http/hono/HonoHttpAnonymousRoutePolicyRegistry.ts +4 -0
  133. package/src/presentation/http/hono/registrars/CredentialHonoApiRouteRegistrar.ts +1 -0
  134. package/src/presentation/http/hono/registrars/HitlDecideHonoApiRouteRegistrar.ts +54 -0
  135. package/src/presentation/http/hono/registrars/HitlInternalCallbackHonoApiRouteRegistrar.ts +33 -0
  136. package/src/presentation/http/hono/registrars/HitlResumeHonoApiRouteRegistrar.ts +43 -0
  137. package/src/presentation/http/routeHandlers/CredentialHttpRouteHandler.ts +9 -0
  138. package/src/presentation/http/routeHandlers/OAuth2HttpRouteHandlerFactory.ts +1 -1
  139. package/src/server.ts +7 -2
  140. package/src/workflows/InternalWorkflowTestRunRegistrar.ts +9 -0
  141. package/tsconfig.json +1 -0
  142. package/dist/AppConfigFactory-Cx4qQvRk.js.map +0 -1
  143. package/dist/AppContainerFactory-DRTjG7nG.js.map +0 -1
  144. package/dist/CredentialServices-Dk8yypeL.js.map +0 -1
  145. package/dist/InternalPingRegistrar-DY3kSfxP.js.map +0 -1
  146. package/dist/persistenceServer-B71RGvSj.d.ts +0 -30
  147. package/dist/persistenceServer-C-hH4z6l.js.map +0 -1
  148. package/src/credentials/catalogTypes.ts +0 -4
@@ -0,0 +1,14 @@
1
+ import { i as AppPersistenceConfig } from "./CodemationAppContext-K51b7oXe.js";
2
+
3
+ //#region src/infrastructure/persistence/PrismaMigrationDeployer.d.ts
4
+ declare class PrismaMigrationDeployer {
5
+ deployPersistence(persistence: AppPersistenceConfig, env?: Readonly<NodeJS.ProcessEnv>): Promise<void>;
6
+ deploy(args: Readonly<{
7
+ databaseUrl: string;
8
+ env?: Readonly<NodeJS.ProcessEnv>;
9
+ }>): Promise<void>;
10
+ resolvePackageRoot(env?: Readonly<NodeJS.ProcessEnv>): Promise<string>;
11
+ }
12
+ //#endregion
13
+ export { PrismaMigrationDeployer as t };
14
+ //# sourceMappingURL=PrismaMigrationDeployer-DdEcXXVi.d.ts.map
@@ -1,4 +1,4 @@
1
- import { r as AppConfig } from "./CodemationAppContext-CGFYVcSb.js";
1
+ import { r as AppConfig } from "./CodemationAppContext-K51b7oXe.js";
2
2
  import { a as CodemationAuthConfig } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
3
3
  import { a as CodemationFrontendAuthSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-Cev3qK46.js";
4
4
  import { ChildProcess } from "node:child_process";
@@ -79,4 +79,4 @@ declare class PublicFrontendBootstrapFactory {
79
79
  }
80
80
  //#endregion
81
81
  export { ProcessRunOptions as a, CodemationFrontendAuthSnapshotFactory as i, InternalAuthBootstrapFactory as n, ProcessRunResult as o, FrontendAppConfigFactory as r, ProcessRunner as s, PublicFrontendBootstrapFactory as t };
82
- //# sourceMappingURL=PublicFrontendBootstrapFactory-Dv04tJ-6.d.ts.map
82
+ //# sourceMappingURL=PublicFrontendBootstrapFactory-ClEjZP74.d.ts.map
@@ -44,6 +44,7 @@ declare class ApiPaths {
44
44
  static credentialTypes(): string;
45
45
  static credentialsEnvStatus(): string;
46
46
  static credentialInstances(): string;
47
+ static credentialApps(): string;
47
48
  static credentialInstance(instanceId: string, withSecrets?: boolean): string;
48
49
  static credentialInstanceTest(instanceId: string): string;
49
50
  static credentialBindings(): string;
@@ -82,6 +83,10 @@ declare class ApiPaths {
82
83
  static whitelabelLogo(): string;
83
84
  static frontendBootstrap(): string;
84
85
  static internalAuthBootstrap(): string;
86
+ /** Token-authenticated: resume a suspended HITL task. */
87
+ static hitlTaskResume(taskId: string): string;
88
+ /** Session-authenticated: record a decision on a suspended HITL task. */
89
+ static hitlTaskDecide(taskId: string): string;
85
90
  }
86
91
  //#endregion
87
92
  //#region src/presentation/frontend/CodemationFrontendAuthSnapshotJsonCodec.d.ts
@@ -116,4 +121,4 @@ declare class PublicFrontendBootstrapJsonCodec {
116
121
  }
117
122
  //#endregion
118
123
  export { ApiPaths as a, CodemationFrontendAuthSnapshotJsonCodec as i, InternalAuthBootstrapJsonCodec as n, FrontendAppConfigJsonCodec as r, PublicFrontendBootstrapJsonCodec as t };
119
- //# sourceMappingURL=PublicFrontendBootstrapJsonCodec-CXG9Dxft.d.ts.map
124
+ //# sourceMappingURL=PublicFrontendBootstrapJsonCodec-HNItQ7ol.d.ts.map
@@ -1,4 +1,4 @@
1
- import { M as TelemetryAttributes, N as TelemetryMetricRecord, P as TelemetrySpanEventRecord, j as TelemetryArtifactAttachment } from "./ItemsInputNormalizer-_RwIfRIQ.js";
1
+ import { Dt as TelemetryAttributes, Et as TelemetryArtifactAttachment, Ot as TelemetryMetricRecord, kt as TelemetrySpanEventRecord } from "./ItemsInputNormalizer-CFkfNMLt.js";
2
2
 
3
3
  //#region src/domain/telemetry/TelemetryContracts.d.ts
4
4
  type TelemetrySpanStatus = "running" | "completed" | "failed";
@@ -204,4 +204,4 @@ interface TelemetryExporter {
204
204
  }
205
205
  //#endregion
206
206
  export { TelemetrySpanStatus as a, TelemetryMetricPointStore as i, TelemetryArtifactStore as n, TelemetrySpanStore as o, TelemetryExporter as r, TelemetrySpanUpsert as s, RunTraceContextRepository as t };
207
- //# sourceMappingURL=TelemetryContracts-BtDx84Cp.d.ts.map
207
+ //# sourceMappingURL=TelemetryContracts-DpZEODQM.d.ts.map
@@ -1,4 +1,4 @@
1
- import { V as NodeDefinition, X as WorkflowDefinition } from "./ItemsInputNormalizer-_RwIfRIQ.js";
1
+ import { A as WorkflowDefinition, x as NodeDefinition } from "./ItemsInputNormalizer-CFkfNMLt.js";
2
2
 
3
3
  //#region src/application/mapping/WorkflowPolicyUiPresentationFactory.d.ts
4
4
  /** UI-facing policy labels derived from workflow/node definitions (live or hydrated snapshot). */
@@ -12,4 +12,4 @@ declare class WorkflowPolicyUiPresentationFactory {
12
12
  }
13
13
  //#endregion
14
14
  export { WorkflowPolicyUiPresentationFactory as t };
15
- //# sourceMappingURL=WorkflowPolicyUiPresentationFactory-6MyjCvBO.d.ts.map
15
+ //# sourceMappingURL=WorkflowPolicyUiPresentationFactory-BNn2fvR_.d.ts.map
@@ -32,4 +32,4 @@ var WorkflowPolicyUiPresentationFactory = class {
32
32
 
33
33
  //#endregion
34
34
  export { WorkflowPolicyUiPresentationFactory as t };
35
- //# sourceMappingURL=WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js.map
35
+ //# sourceMappingURL=WorkflowPolicyUiPresentationFactory-DfvD2VHk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js","names":[],"sources":["../src/application/mapping/WorkflowPolicyUiPresentationFactory.ts"],"sourcesContent":["import type { NodeDefinition, RetryPolicySpec, WorkflowDefinition } from \"@codemation/core/browser\";\n\n/** UI-facing policy labels derived from workflow/node definitions (live or hydrated snapshot). */\nexport class WorkflowPolicyUiPresentationFactory {\n workflowHasErrorHandler(workflow: WorkflowDefinition): boolean {\n return workflow.workflowErrorHandler !== undefined;\n }\n\n nodeRetrySummary(config: NodeDefinition[\"config\"]): string | undefined {\n const spec = config.retryPolicy as RetryPolicySpec | undefined;\n if (!spec) return undefined;\n if (spec.kind === \"none\") return \"Retry: off\";\n if (spec.kind === \"fixed\") return `Retry: ${spec.maxAttempts}x @ ${spec.delayMs}ms`;\n if (spec.kind === \"exponential\") {\n const jitter = spec.jitter ? \", jitter\" : \"\";\n return `Retry: exp ${spec.maxAttempts}x from ${spec.initialDelayMs}ms (x${spec.multiplier}${jitter})`;\n }\n return undefined;\n }\n\n nodeHasErrorHandler(config: NodeDefinition[\"config\"]): boolean {\n return config.nodeErrorHandler !== undefined;\n }\n\n snapshotNodeRetrySummary(config: unknown): string | undefined {\n const record = this.asRecord(config);\n const spec = record.retryPolicy as RetryPolicySpec | undefined;\n if (!spec || typeof spec !== \"object\") return undefined;\n return this.nodeRetrySummary({ retryPolicy: spec } as NodeDefinition[\"config\"]);\n }\n\n snapshotNodeHasErrorHandler(config: unknown): boolean {\n return this.asRecord(config).nodeErrorHandler !== undefined;\n }\n\n private asRecord(value: unknown): Readonly<Record<string, unknown>> {\n return value !== null && typeof value === \"object\" ? (value as Record<string, unknown>) : {};\n }\n}\n"],"mappings":";;AAGA,IAAa,sCAAb,MAAiD;CAC/C,wBAAwB,UAAuC;AAC7D,SAAO,SAAS,yBAAyB;;CAG3C,iBAAiB,QAAsD;EACrE,MAAM,OAAO,OAAO;AACpB,MAAI,CAAC,KAAM,QAAO;AAClB,MAAI,KAAK,SAAS,OAAQ,QAAO;AACjC,MAAI,KAAK,SAAS,QAAS,QAAO,UAAU,KAAK,YAAY,MAAM,KAAK,QAAQ;AAChF,MAAI,KAAK,SAAS,eAAe;GAC/B,MAAM,SAAS,KAAK,SAAS,aAAa;AAC1C,UAAO,cAAc,KAAK,YAAY,SAAS,KAAK,eAAe,OAAO,KAAK,aAAa,OAAO;;;CAKvG,oBAAoB,QAA2C;AAC7D,SAAO,OAAO,qBAAqB;;CAGrC,yBAAyB,QAAqC;EAE5D,MAAM,OADS,KAAK,SAAS,OAAO,CAChB;AACpB,MAAI,CAAC,QAAQ,OAAO,SAAS,SAAU,QAAO;AAC9C,SAAO,KAAK,iBAAiB,EAAE,aAAa,MAAM,CAA6B;;CAGjF,4BAA4B,QAA0B;AACpD,SAAO,KAAK,SAAS,OAAO,CAAC,qBAAqB;;CAGpD,AAAQ,SAAS,OAAmD;AAClE,SAAO,UAAU,QAAQ,OAAO,UAAU,WAAY,QAAoC,EAAE"}
1
+ {"version":3,"file":"WorkflowPolicyUiPresentationFactory-DfvD2VHk.js","names":[],"sources":["../src/application/mapping/WorkflowPolicyUiPresentationFactory.ts"],"sourcesContent":["import type { NodeDefinition, RetryPolicySpec, WorkflowDefinition } from \"@codemation/core/browser\";\n\n/** UI-facing policy labels derived from workflow/node definitions (live or hydrated snapshot). */\nexport class WorkflowPolicyUiPresentationFactory {\n workflowHasErrorHandler(workflow: WorkflowDefinition): boolean {\n return workflow.workflowErrorHandler !== undefined;\n }\n\n nodeRetrySummary(config: NodeDefinition[\"config\"]): string | undefined {\n const spec = config.retryPolicy as RetryPolicySpec | undefined;\n if (!spec) return undefined;\n if (spec.kind === \"none\") return \"Retry: off\";\n if (spec.kind === \"fixed\") return `Retry: ${spec.maxAttempts}x @ ${spec.delayMs}ms`;\n if (spec.kind === \"exponential\") {\n const jitter = spec.jitter ? \", jitter\" : \"\";\n return `Retry: exp ${spec.maxAttempts}x from ${spec.initialDelayMs}ms (x${spec.multiplier}${jitter})`;\n }\n return undefined;\n }\n\n nodeHasErrorHandler(config: NodeDefinition[\"config\"]): boolean {\n return config.nodeErrorHandler !== undefined;\n }\n\n snapshotNodeRetrySummary(config: unknown): string | undefined {\n const record = this.asRecord(config);\n const spec = record.retryPolicy as RetryPolicySpec | undefined;\n if (!spec || typeof spec !== \"object\") return undefined;\n return this.nodeRetrySummary({ retryPolicy: spec } as NodeDefinition[\"config\"]);\n }\n\n snapshotNodeHasErrorHandler(config: unknown): boolean {\n return this.asRecord(config).nodeErrorHandler !== undefined;\n }\n\n private asRecord(value: unknown): Readonly<Record<string, unknown>> {\n return value !== null && typeof value === \"object\" ? (value as Record<string, unknown>) : {};\n }\n}\n"],"mappings":";;AAGA,IAAa,sCAAb,MAAiD;CAC/C,wBAAwB,UAAuC;AAC7D,SAAO,SAAS,yBAAyB;;CAG3C,iBAAiB,QAAsD;EACrE,MAAM,OAAO,OAAO;AACpB,MAAI,CAAC,KAAM,QAAO;AAClB,MAAI,KAAK,SAAS,OAAQ,QAAO;AACjC,MAAI,KAAK,SAAS,QAAS,QAAO,UAAU,KAAK,YAAY,MAAM,KAAK,QAAQ;AAChF,MAAI,KAAK,SAAS,eAAe;GAC/B,MAAM,SAAS,KAAK,SAAS,aAAa;AAC1C,UAAO,cAAc,KAAK,YAAY,SAAS,KAAK,eAAe,OAAO,KAAK,aAAa,OAAO;;;CAKvG,oBAAoB,QAA2C;AAC7D,SAAO,OAAO,qBAAqB;;CAGrC,yBAAyB,QAAqC;EAE5D,MAAM,OADS,KAAK,SAAS,OAAO,CAChB;AACpB,MAAI,CAAC,QAAQ,OAAO,SAAS,SAAU,QAAO;AAC9C,SAAO,KAAK,iBAAiB,EAAE,aAAa,MAAM,CAA6B;;CAGjF,4BAA4B,QAA0B;AACpD,SAAO,KAAK,SAAS,OAAO,CAAC,qBAAqB;;CAGpD,AAAQ,SAAS,OAAmD;AAClE,SAAO,UAAU,QAAQ,OAAO,UAAU,WAAY,QAAoC,EAAE"}
@@ -1,6 +1,6 @@
1
- import "./index-DilAYwnH.js";
2
- import "./ItemsInputNormalizer-_RwIfRIQ.js";
3
- 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-DiKKogum.js";
4
- import { _ as CodemationEngineExecutionLimitsConfig, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-CGFYVcSb.js";
1
+ import "./index-ChIfeWzk.js";
2
+ import "./ItemsInputNormalizer-CFkfNMLt.js";
3
+ 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";
4
+ import { _ as CodemationEngineExecutionLimitsConfig, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-K51b7oXe.js";
5
5
  import "./CodemationWhitelabelConfig-Ca2mCUeC.js";
6
6
  export { type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, type CodemationApplicationRuntimeConfig, type CodemationConfig, type CodemationDatabaseConfig, type CodemationDatabaseKind, type CodemationEngineExecutionLimitsConfig, type CodemationEventBusConfig, type CodemationEventBusKind, type CodemationPlugin, type CodemationPluginConfig, type CodemationPluginContext, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, type DefineCodemationAppOptions, type DefinePluginOptions, type FriendlyCodemationDatabaseConfig, type FriendlyCodemationExecutionConfig, defineCodemationApp, definePlugin, workflow };
package/dist/client.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { l as Logger, t as CodemationWhitelabelConfig, u as LoggerFactory } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
2
2
  import { i as LogLevelPolicy, n as logLevelPolicyFactory, r as LogLevel } from "./LogLevelPolicyFactory-ewCHLDLn.js";
3
- import { a as ApiPaths, i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-CXG9Dxft.js";
3
+ import { a as ApiPaths, i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-HNItQ7ol.js";
4
4
  import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-Cev3qK46.js";
5
5
 
6
6
  //#region src/infrastructure/logging/BrowserLoggerFactory.d.ts
package/dist/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as logLevelPolicyFactory, r as ConsoleLogger } from "./LogLevelPolicyFactory-DCUzIN6G.js";
2
- import { n as InAppCallbackUrlPolicy, t as ApiPaths } from "./ApiPaths-Dv1dcHu_.js";
2
+ import { n as InAppCallbackUrlPolicy, t as ApiPaths } from "./ApiPaths-DCvrlIjg.js";
3
3
  import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-CegIF_ne.js";
4
4
 
5
5
  //#region src/infrastructure/logging/BrowserLoggerFactory.ts
@@ -1,7 +1,7 @@
1
- import "./index-DilAYwnH.js";
2
- import "./ItemsInputNormalizer-_RwIfRIQ.js";
3
- import "./CodemationAppContext-CGFYVcSb.js";
1
+ import "./index-ChIfeWzk.js";
2
+ import "./ItemsInputNormalizer-CFkfNMLt.js";
3
+ import "./CodemationAppContext-K51b7oXe.js";
4
4
  import "./CodemationWhitelabelConfig-Ca2mCUeC.js";
5
- import "./CodemationConfigNormalizer-48f-T66P.js";
6
- import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-_PIYqwVx.js";
5
+ import "./CodemationConfigNormalizer-B4rDYC9h.js";
6
+ import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-Dt4jyLx6.js";
7
7
  export { type CodemationConsumerApp, CodemationConsumerAppResolver, CodemationConsumerConfigLoader, type CodemationConsumerConfigResolution };
@@ -1,9 +1,9 @@
1
- import "./index-DilAYwnH.js";
2
- import { mt as CredentialHealth, ut as AnyCredentialType, xt as CredentialSessionFactoryArgs } from "./ItemsInputNormalizer-_RwIfRIQ.js";
3
- import "./CodemationAppContext-CGFYVcSb.js";
1
+ import "./index-ChIfeWzk.js";
2
+ import { mt as CredentialSessionFactoryArgs, rt as AnyCredentialType, st as CredentialHealth } from "./ItemsInputNormalizer-CFkfNMLt.js";
3
+ import "./CodemationAppContext-K51b7oXe.js";
4
4
  import "./CodemationWhitelabelConfig-Ca2mCUeC.js";
5
- import { i as CredentialInstanceService, n as CredentialType, r as CredentialBindingService } from "./CredentialServices-BLloBztI.js";
6
- import "./CredentialContractsRegistry-Bq2bq28t.js";
5
+ import { i as CredentialInstanceService, n as CredentialType, r as CredentialBindingService } from "./CredentialServices-B3wPyp2y.js";
6
+ import "./CredentialContractsRegistry-Dgu-rEXi.js";
7
7
 
8
8
  //#region src/infrastructure/credentials/OpenAiApiKeyCredentialShapes.types.d.ts
9
9
  /**
@@ -1,6 +1,6 @@
1
1
  import "./decorateParam-BWxkAUSj.js";
2
2
  import "./decorate-CXWmflG_.js";
3
- import { a as CredentialInstanceService, g as OpenAiApiKeyCredentialHealthTester, h as OpenAiApiKeyCredentialTypeFactory, i as CredentialBindingService } from "./CredentialServices-Dk8yypeL.js";
3
+ import { a as CredentialInstanceService, g as OpenAiApiKeyCredentialHealthTester, h as OpenAiApiKeyCredentialTypeFactory, i as CredentialBindingService } from "./CredentialServices-Bios0dM8.js";
4
4
 
5
5
  //#region src/credentials.ts
6
6
  const defaultOpenAiApiKeyCredentialTypeFactory = new OpenAiApiKeyCredentialTypeFactory(new OpenAiApiKeyCredentialHealthTester(globalThis.fetch));
@@ -1,5 +1,5 @@
1
- import "./index-DilAYwnH.js";
2
- import { X as WorkflowDefinition, h as Container } from "./ItemsInputNormalizer-_RwIfRIQ.js";
1
+ import "./index-ChIfeWzk.js";
2
+ import { A as WorkflowDefinition, W as Container } from "./ItemsInputNormalizer-CFkfNMLt.js";
3
3
 
4
4
  //#region src/presentation/server/CodemationTsyringeParamInfoReader.d.ts
5
5
  declare class CodemationTsyringeParamInfoReader {
package/dist/dto.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import "./index-DilAYwnH.js";
2
- import { at as RunStatus, b as TestCaseRunStatus, x as TestSuiteRunStatus, z as JsonValue } from "./ItemsInputNormalizer-_RwIfRIQ.js";
3
- import { a as UpdateCredentialInstanceRequest, c as WorkflowCredentialHealthSlotDto, i as CredentialOAuth2ConnectionDto, n as CredentialInstanceDto, o as UpsertCredentialBindingRequest, r as CredentialInstanceWithSecretsDto, s as WorkflowCredentialHealthDto, t as CreateCredentialInstanceRequest } from "./CredentialContractsRegistry-Bq2bq28t.js";
4
- import { a as TelemetrySpanStatus } from "./TelemetryContracts-BtDx84Cp.js";
1
+ import "./index-ChIfeWzk.js";
2
+ import { X as TestSuiteRunStatus, Y as TestCaseRunStatus, y as JsonValue, z as RunStatus } from "./ItemsInputNormalizer-CFkfNMLt.js";
3
+ import { a as CredentialInstanceWithSecretsDto, c as UpsertCredentialBindingRequest, i as CredentialInstanceDto, l as WorkflowCredentialHealthDto, n as AppsResponse, o as CredentialOAuth2ConnectionDto, r as CreateCredentialInstanceRequest, s as UpdateCredentialInstanceRequest, t as AppGalleryEntry, u as WorkflowCredentialHealthSlotDto } from "./CredentialContractsRegistry-Dgu-rEXi.js";
4
+ import { a as TelemetrySpanStatus } from "./TelemetryContracts-DpZEODQM.js";
5
5
  import { i as WorkflowSummary, n as WorkflowEdgeDto, r as WorkflowNodeDto, t as WorkflowDto } from "./WorkflowViewContracts-B7aFQcIw.js";
6
6
  import { _ as withInviteUserResponseLoginMethodsDefaults, a as CollectionSummaryDto, c as AcceptUserInviteRequestDto, d as UpdateUserAccountStatusRequestDto, f as UpsertLocalBootstrapUserResultDto, g as VerifyUserInviteResponseDto, h as UserAccountStatus, i as CollectionRowDto, l as InviteUserRequestDto, m as UserAccountDtoInput, n as CollectionFieldDto, o as ListCollectionRowsResponseDto, p as UserAccountDto, r as CollectionIndexDto, s as SyncCollectionsResponseDto, t as CollectionDetailDto, u as InviteUserResponseDto, v as withUserAccountLoginMethodsDefaults } from "./CollectionContracts.types-DDyFYT_D.js";
7
7
 
@@ -213,5 +213,5 @@ interface TestAssertionDto {
213
213
  readonly createdAt: string;
214
214
  }
215
215
  //#endregion
216
- export { type AcceptUserInviteRequestDto, type AssertionMetricTrendDto, type AssertionMetricTrendPointDto, type CollectionDetailDto, type CollectionFieldDto, type CollectionIndexDto, type CollectionRowDto, type CollectionSummaryDto, type CreateCredentialInstanceRequest, type CredentialInstanceDto, type CredentialInstanceWithSecretsDto, type CredentialOAuth2ConnectionDto, type InviteUserRequestDto, type InviteUserResponseDto, type ListCollectionRowsResponseDto, type StartTestSuiteRunRequest, type StartTestSuiteRunResponse, type SyncCollectionsResponseDto, type TelemetryDashboardAiAggregateDto, type TelemetryDashboardBucketCostDto, type TelemetryDashboardBucketIntervalDto, type TelemetryDashboardCostAggregateDto, type TelemetryDashboardCostCurrencyTotalDto, type TelemetryDashboardCostKeyTotalDto, type TelemetryDashboardDimensionsDto, type TelemetryDashboardFiltersDto, type TelemetryDashboardRunAggregateDto, type TelemetryDashboardRunListItemDto, type TelemetryDashboardRunOriginDto, type TelemetryDashboardRunsDto, type TelemetryDashboardRunsRequestDto, type TelemetryDashboardSummaryDto, type TelemetryDashboardTimeseriesBucketDto, type TelemetryDashboardTimeseriesDto, type TelemetryDashboardTimeseriesRequestDto, type TestAssertionDto, type TestSuiteChildRunDto, type TestSuiteRunDetailDto, type TestSuiteRunSummaryDto, type UpdateCredentialInstanceRequest, type UpdateUserAccountStatusRequestDto, type UpsertCredentialBindingRequest, type UpsertLocalBootstrapUserResultDto, type UserAccountDto, type UserAccountDtoInput, type UserAccountStatus, type VerifyUserInviteResponseDto, type WorkflowCredentialHealthDto, type WorkflowCredentialHealthSlotDto, type WorkflowDto, type WorkflowEdgeDto, type WorkflowNodeDto, type WorkflowSummary, withInviteUserResponseLoginMethodsDefaults, withUserAccountLoginMethodsDefaults };
216
+ export { type AcceptUserInviteRequestDto, type AppGalleryEntry, type AppsResponse, type AssertionMetricTrendDto, type AssertionMetricTrendPointDto, type CollectionDetailDto, type CollectionFieldDto, type CollectionIndexDto, type CollectionRowDto, type CollectionSummaryDto, type CreateCredentialInstanceRequest, type CredentialInstanceDto, type CredentialInstanceWithSecretsDto, type CredentialOAuth2ConnectionDto, type InviteUserRequestDto, type InviteUserResponseDto, type ListCollectionRowsResponseDto, type StartTestSuiteRunRequest, type StartTestSuiteRunResponse, type SyncCollectionsResponseDto, type TelemetryDashboardAiAggregateDto, type TelemetryDashboardBucketCostDto, type TelemetryDashboardBucketIntervalDto, type TelemetryDashboardCostAggregateDto, type TelemetryDashboardCostCurrencyTotalDto, type TelemetryDashboardCostKeyTotalDto, type TelemetryDashboardDimensionsDto, type TelemetryDashboardFiltersDto, type TelemetryDashboardRunAggregateDto, type TelemetryDashboardRunListItemDto, type TelemetryDashboardRunOriginDto, type TelemetryDashboardRunsDto, type TelemetryDashboardRunsRequestDto, type TelemetryDashboardSummaryDto, type TelemetryDashboardTimeseriesBucketDto, type TelemetryDashboardTimeseriesDto, type TelemetryDashboardTimeseriesRequestDto, type TestAssertionDto, type TestSuiteChildRunDto, type TestSuiteRunDetailDto, type TestSuiteRunSummaryDto, type UpdateCredentialInstanceRequest, type UpdateUserAccountStatusRequestDto, type UpsertCredentialBindingRequest, type UpsertLocalBootstrapUserResultDto, type UserAccountDto, type UserAccountDtoInput, type UserAccountStatus, type VerifyUserInviteResponseDto, type WorkflowCredentialHealthDto, type WorkflowCredentialHealthSlotDto, type WorkflowDto, type WorkflowEdgeDto, type WorkflowNodeDto, type WorkflowSummary, withInviteUserResponseLoginMethodsDefaults, withUserAccountLoginMethodsDefaults };
217
217
  //# sourceMappingURL=dto.d.ts.map
@@ -1,5 +1,5 @@
1
- import { B as NodeActivationId, D as WebhookInvocationMatch, E as HttpMethod, Et as CredentialTypeId, J as RunnableNodeConfig, K as RunId, O as WebhookTriggerMatcher, Ot as NodeId, Q as NodeInputsByPort, R as Items, U as NodeOutputs, W as ParentExecutionRef, X as WorkflowDefinition, Z as CurrentStateExecutionRequest, _t as CredentialJsonRecord, a as ParamDeep, c as NodeActivationContinuation, ct as WebhookRunResult, d as NodeExecutionRequestHandler, et as PersistedWorkflowTokenRegistryLike, g as TypeToken, it as RunResult, k as WebhookTriggerResolution, kt as WorkflowId, lt as WorkflowExecutionRepository, m as WorkflowSnapshotResolver, nt as RunExecutionOptions, ot as RunStopCondition, p as WorkflowRepository, s as LiveWorkflowRepository, tt as RunCurrentState, u as NodeExecutionRequest, ut as AnyCredentialType } from "./ItemsInputNormalizer-_RwIfRIQ.js";
2
- import { ZodType, z } from "zod";
1
+ import { A as WorkflowDefinition, At as NodeId, B as RunStopCondition, C as NodeOutputs, Ct as WebhookTriggerMatcher, E as RunId, F as RunCurrentState, H as WebhookRunResult, I as RunExecutionOptions, M as NodeInputsByPort, P as PersistedWorkflowTokenRegistryLike, R as RunResult, St as WebhookInvocationMatch, U as WorkflowExecutionRepository, b as NodeActivationId, f as ResumeContext, j as CurrentStateExecutionRequest, jt as WorkflowId, l as NodeExecutionRequest, m as WorkflowSnapshotResolver, o as LiveWorkflowRepository, p as WorkflowRepository, s as NodeActivationContinuation, u as NodeExecutionRequestHandler, v as Items, w as ParentExecutionRef, wt as WebhookTriggerResolution, xt as HttpMethod } from "./ItemsInputNormalizer-CFkfNMLt.js";
2
+ import { ZodType } from "zod";
3
3
 
4
4
  //#region ../core/src/contracts/Clock.d.ts
5
5
  /** Port for time; inject `SystemClock` in production and a fake/test clock in tests. */
@@ -7,28 +7,6 @@ interface Clock {
7
7
  now(): Date;
8
8
  }
9
9
  //#endregion
10
- //#region ../core/src/authoring/defineNode.types.d.ts
11
- type ResolvableCredentialType = AnyCredentialType | CredentialTypeId;
12
- type DefinedNodeCredentialBinding = ResolvableCredentialType | Readonly<{
13
- readonly type: ResolvableCredentialType | ReadonlyArray<ResolvableCredentialType>;
14
- readonly label?: string;
15
- readonly optional?: true;
16
- readonly helpText?: string;
17
- readonly helpUrl?: string;
18
- }>;
19
- type DefinedNodeCredentialBindings = Readonly<Record<string, DefinedNodeCredentialBinding>>;
20
- type DefinedNodeConfigInput<TConfigResolved extends CredentialJsonRecord, TItemJson> = ParamDeep<TConfigResolved, TItemJson>;
21
- interface DefinedNode<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson, TOutputJson, _TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
22
- readonly kind: "defined-node";
23
- readonly key: TKey$1;
24
- readonly title: string;
25
- readonly description?: string;
26
- create<TConfigItemJson = TInputJson>(config: DefinedNodeConfigInput<TConfig, TConfigItemJson>, name?: string, id?: string): RunnableNodeConfig<TInputJson, TOutputJson>;
27
- register(context: {
28
- registerNode<TValue>(token: TypeToken<TValue>, implementation?: TypeToken<TValue>): void;
29
- }): void;
30
- }
31
- //#endregion
32
10
  //#region ../core/src/authoring/defineCollection.types.d.ts
33
11
  type CollectionFieldType = "text" | "int" | "bigint" | "double" | "bool" | "timestamptz" | "jsonb" | "uuid";
34
12
  interface CollectionFieldDefinition {
@@ -102,9 +80,14 @@ interface EngineRunContinuationService {
102
80
  error: Error;
103
81
  }): Promise<RunResult>;
104
82
  waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
105
- status: "completed" | "failed";
83
+ status: "completed" | "failed" | "halted";
106
84
  }>>;
107
85
  waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
86
+ resumeRun(args: {
87
+ runId: RunId;
88
+ taskId: string;
89
+ resumeContext: ResumeContext;
90
+ }): Promise<RunResult>;
108
91
  }
109
92
  interface EngineNodeExecutionRequestHandler {
110
93
  handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
@@ -181,9 +164,18 @@ declare class Engine implements NodeActivationContinuation, NodeExecutionRequest
181
164
  error: Error;
182
165
  }): Promise<RunResult>;
183
166
  waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
184
- status: "completed" | "failed";
167
+ status: "completed" | "failed" | "halted";
185
168
  }>>;
186
169
  waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
170
+ /**
171
+ * Re-activate a suspended run item with a human decision (HITL).
172
+ * The HTTP resume endpoint calls this; this method exposes the engine primitive.
173
+ */
174
+ resumeRun(args: {
175
+ runId: RunId;
176
+ taskId: string;
177
+ resumeContext: ResumeContext;
178
+ }): Promise<RunResult>;
187
179
  handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
188
180
  }
189
181
  //#endregion
@@ -293,5 +285,56 @@ interface OAuthFlowExecutor {
293
285
  }): Promise<OAuthMaterial>;
294
286
  }
295
287
  //#endregion
296
- export { DefinedCollection as a, Clock as c, CollectionDefinition as i, RunIntentService as n, DefinedNode as o, Engine as r, DefinedNodeConfigInput as s, OAuthFlowExecutor as t };
297
- //# sourceMappingURL=index-DilAYwnH.d.ts.map
288
+ //#region ../core/src/credentials/CredentialMaterialProvider.types.d.ts
289
+ /**
290
+ * Material provider seam — see `docs/design/credentials-oauth-unification.md`,
291
+ * "Material provider seam" section. Sits beside the workspace's
292
+ * `CredentialStore`; persistence of the row stays at the store, persistence of
293
+ * the bytes goes through this provider so they can live at the control plane
294
+ * in managed mode.
295
+ */
296
+ /**
297
+ * Pointer to material bytes. For local rows `ref` is the workspace instance id
298
+ * and the bytes co-locate with the row (existing `CredentialOAuth2Material` /
299
+ * `CredentialSecretMaterial` tables). For control-plane rows `ref` is the
300
+ * CP-side credential id; the workspace stores only the pointer.
301
+ */
302
+ type CredentialMaterialRef = Readonly<{
303
+ source: "local" | "control-plane";
304
+ id: string;
305
+ }>;
306
+ /**
307
+ * Decrypted material bytes returned by a provider. Shape matches
308
+ * `OAuthMaterial` — every supported credential type today is OAuth-shaped.
309
+ */
310
+ type MaterialBundle = OAuthMaterial;
311
+ /**
312
+ * Caller context recorded by the CP material endpoint per fetch (D5 in the
313
+ * `credentials-vault` sprint README). The local provider accepts but ignores
314
+ * it; standalone mode has no audit log.
315
+ */
316
+ type CallerContext = Readonly<{
317
+ workspaceId: string;
318
+ caller: Readonly<{
319
+ kind: "workflow-node";
320
+ workflowId: string;
321
+ nodeId: string;
322
+ }> | Readonly<{
323
+ kind: "concierge";
324
+ chatId: string;
325
+ }> | Readonly<{
326
+ kind: "research-agent";
327
+ chatId: string;
328
+ }> | Readonly<{
329
+ kind: "manual";
330
+ userId: string;
331
+ }>;
332
+ reason?: string;
333
+ }>;
334
+ interface CredentialMaterialProvider {
335
+ getMaterial(ref: CredentialMaterialRef, context: CallerContext): Promise<MaterialBundle>;
336
+ setMaterial(ref: CredentialMaterialRef, material: MaterialBundle): Promise<void>;
337
+ }
338
+ //#endregion
339
+ export { CollectionDefinition as a, Engine as i, OAuthFlowExecutor as n, DefinedCollection as o, RunIntentService as r, Clock as s, CredentialMaterialProvider as t };
340
+ //# sourceMappingURL=index-ChIfeWzk.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,24 +1,25 @@
1
- import "./index-DilAYwnH.js";
2
- import { $ as PersistedRunState, R as Items, tt as RunCurrentState } from "./ItemsInputNormalizer-_RwIfRIQ.js";
3
- 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-DiKKogum.js";
4
- 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-CGFYVcSb.js";
1
+ import "./index-ChIfeWzk.js";
2
+ import { F as RunCurrentState, N as PersistedRunState, v as Items } from "./ItemsInputNormalizer-CFkfNMLt.js";
3
+ 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";
4
+ 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";
5
5
  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";
6
6
  import "./LogLevelPolicyFactory-ewCHLDLn.js";
7
- import { a as ApiPaths, i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-CXG9Dxft.js";
7
+ import { a as ApiPaths, i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-HNItQ7ol.js";
8
8
  import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-Cev3qK46.js";
9
- import "./CodemationConfigNormalizer-48f-T66P.js";
10
- import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-_PIYqwVx.js";
11
- import "./CredentialServices-BLloBztI.js";
12
- import "./CredentialContractsRegistry-Bq2bq28t.js";
13
- import "./TelemetryContracts-BtDx84Cp.js";
9
+ import "./CodemationConfigNormalizer-B4rDYC9h.js";
10
+ import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-Dt4jyLx6.js";
11
+ import "./CredentialServices-B3wPyp2y.js";
12
+ import "./CredentialContractsRegistry-Dgu-rEXi.js";
13
+ import "./TelemetryContracts-DpZEODQM.js";
14
14
  import "./WorkflowViewContracts-B7aFQcIw.js";
15
15
  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";
16
- 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-DP7djJ9S.js";
17
- import { r as PrismaDatabaseClient, t as AppConfigFactory } from "./AppConfigFactory-BT0y0LVC.js";
18
- import "./InternalHonoApiRouteRegistrar-c7t3KnV_.js";
19
- import { i as CodemationFrontendAuthSnapshotFactory, n as InternalAuthBootstrapFactory, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-Dv04tJ-6.js";
20
- import { n as CodemationPostgresPrismaClientFactory } from "./persistenceServer-B71RGvSj.js";
21
- import { c as CodemationServerGateway } from "./server-09PKasWR.js";
16
+ 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";
17
+ import { n as PrismaDatabaseClient, t as AppConfigFactory } from "./AppConfigFactory-DncmwCD1.js";
18
+ import "./PrismaMigrationDeployer-DdEcXXVi.js";
19
+ import "./InternalHonoApiRouteRegistrar-Ce1yxpnO.js";
20
+ import { i as CodemationFrontendAuthSnapshotFactory, n as InternalAuthBootstrapFactory, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-ClEjZP74.js";
21
+ import { t as CodemationPostgresPrismaClientFactory } from "./CodemationPostgresPrismaClientFactory-CTNTPnDr.js";
22
+ import { c as CodemationServerGateway } from "./server-B5trn7y4.js";
22
23
  import { Server } from "node:http";
23
24
 
24
25
  //#region src/application/queries/ListUserAccountsQuery.d.ts
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { n as definePlugin, t as defineCodemationApp } from "./CodemationAuthoring.types-BteaR3Dc.js";
2
2
  import { n as logLevelPolicyFactory } from "./LogLevelPolicyFactory-DCUzIN6G.js";
3
- import { t as ApiPaths } from "./ApiPaths-Dv1dcHu_.js";
3
+ import { t as ApiPaths } from "./ApiPaths-DCvrlIjg.js";
4
4
  import { i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-CegIF_ne.js";
5
5
  import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-By-6tuGc.js";
6
6
  import { o as BootTimer, t as ServerLoggerFactory } from "./ServerLoggerFactory-Ckk52S3w.js";
7
7
  import "./decorateParam-BWxkAUSj.js";
8
8
  import "./decorate-CXWmflG_.js";
9
- import { f as ApplicationRequestError, m as ApplicationTokens } from "./CredentialServices-Dk8yypeL.js";
9
+ import { f as ApplicationRequestError, m as ApplicationTokens } from "./CredentialServices-Bios0dM8.js";
10
10
  import "./CodemationTsyringeTypeInfoRegistrar-Bj6FJYFz.js";
11
- import { C as CodemationHonoApiApp, D as FrontendAppConfigFactory, E as InternalAuthBootstrapFactory, F as StartWorkflowRunCommand, I as UpsertLocalBootstrapUserCommand, L as ListUserAccountsQuery, N as GetRunStateQuery, O as CodemationFrontendAuthSnapshotFactory, T as PublicFrontendBootstrapFactory, a as GetCollectionQuery, c as InsertCollectionRowCommand, d as FrontendRuntime, f as CollectionSchemaSyncerHolder, i as GetCollectionRowQuery, k as WorkflowWebsocketServer, l as DeleteCollectionRowCommand, m as AppContainerLifecycle, n as ListCollectionsQuery, o as UpdateCollectionRowCommand, p as DatabaseMigrations, r as ListCollectionRowsQuery, s as SyncCollectionsCommand, t as AppContainerFactory, u as WorkerRuntime } from "./AppContainerFactory-DRTjG7nG.js";
12
- import "./WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js";
13
- import "./InternalPingRegistrar-DY3kSfxP.js";
14
- import { r as CodemationPluginPackageMetadata, t as AppConfigFactory } from "./AppConfigFactory-Cx4qQvRk.js";
11
+ import { C as CodemationHonoApiApp, D as FrontendAppConfigFactory, E as InternalAuthBootstrapFactory, F as StartWorkflowRunCommand, I as UpsertLocalBootstrapUserCommand, L as ListUserAccountsQuery, N as GetRunStateQuery, O as CodemationFrontendAuthSnapshotFactory, T as PublicFrontendBootstrapFactory, a as GetCollectionQuery, c as InsertCollectionRowCommand, d as FrontendRuntime, f as CollectionSchemaSyncerHolder, i as GetCollectionRowQuery, k as WorkflowWebsocketServer, l as DeleteCollectionRowCommand, m as AppContainerLifecycle, n as ListCollectionsQuery, o as UpdateCollectionRowCommand, p as DatabaseMigrations, r as ListCollectionRowsQuery, s as SyncCollectionsCommand, t as AppContainerFactory, u as WorkerRuntime } from "./AppContainerFactory-CHCXP2rn.js";
12
+ import "./InternalPingRegistrar-BavAAnvk.js";
13
+ import "./WorkflowPolicyUiPresentationFactory-DfvD2VHk.js";
14
+ import { r as CodemationPluginPackageMetadata, t as AppConfigFactory } from "./AppConfigFactory-D4LL1aOR.js";
15
15
  import { n as CodemationBootstrapRequest, t as CodemationPluginListMerger } from "./CodemationPluginListMerger-D1B1IEbt.js";
16
- import { t as CodemationPostgresPrismaClientFactory } from "./persistenceServer-C-hH4z6l.js";
17
- import { r as CodemationServerGateway } from "./server-vtRCPgRJ.js";
16
+ import { t as CodemationPostgresPrismaClientFactory } from "./CodemationPostgresPrismaClientFactory-C7156Fe-.js";
17
+ import { r as CodemationServerGateway } from "./server-CNj_y0QO.js";
18
18
  import { workflow } from "@codemation/core-nodes";
19
19
  import { createServer } from "node:http";
20
20
 
@@ -0,0 +1,44 @@
1
+ import "../../index-ChIfeWzk.js";
2
+ import "../../ItemsInputNormalizer-CFkfNMLt.js";
3
+ import { i as AppPersistenceConfig } from "../../CodemationAppContext-K51b7oXe.js";
4
+ import "../../CodemationWhitelabelConfig-Ca2mCUeC.js";
5
+
6
+ //#region src/infrastructure/persistence/PrismaMigrationOperations.d.ts
7
+
8
+ /**
9
+ * Contains all runtime logic for deploying Prisma migrations.
10
+ * This class is loaded lazily via `await import(...)` from PrismaMigrationDeployer
11
+ * so that the dynamic fs/path/createRequire operations never appear in the
12
+ * static module graph visible to the Turbopack / Next.js NFT tracer.
13
+ */
14
+ declare class PrismaMigrationOperations {
15
+ private static readonly normalizedRuntimeMigrationName;
16
+ private readonly require;
17
+ deployPersistence(persistence: AppPersistenceConfig, env?: Readonly<NodeJS.ProcessEnv>): Promise<void>;
18
+ deploy(args: Readonly<{
19
+ databaseUrl: string;
20
+ env?: Readonly<NodeJS.ProcessEnv>;
21
+ }>): Promise<void>;
22
+ resolvePackageRoot(env?: Readonly<NodeJS.ProcessEnv>): string;
23
+ private deploySqlite;
24
+ private deployPostgres;
25
+ private deployWithProvider;
26
+ private resolveAppliedMigration;
27
+ private runPrismaCommand;
28
+ private tryRecoverPartiallyAppliedNormalizedRuntimeMigration;
29
+ private isRecoverableNormalizedRuntimeMigrationError;
30
+ private repairPartiallyAppliedNormalizedRuntimeSqliteDatabase;
31
+ private hasActiveFailedMigrationRecord;
32
+ private readSqliteTableColumns;
33
+ private ensureNormalizedRuntimeRepairArtifacts;
34
+ private cleanupNormalizedRuntimeLegacyArtifacts;
35
+ private sqliteFilePathToDatabaseUrl;
36
+ private createProcessEnvironment;
37
+ private resolvePrismaCliPath;
38
+ private resolveAbsolutePrismaConfigPath;
39
+ private ensureSqliteParentDirectoryExists;
40
+ private createDeployError;
41
+ }
42
+ //#endregion
43
+ export { PrismaMigrationOperations };
44
+ //# sourceMappingURL=PrismaMigrationOperations.d.ts.map