@codemation/host 0.8.0 → 0.9.0

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 +37 -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-jpYXGZGe.js} +1724 -474
  8. package/dist/AppContainerFactory-jpYXGZGe.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-BlG9qV5S.js} +4 -4
  58. package/dist/{server-vtRCPgRJ.js.map → server-BlG9qV5S.js.map} +1 -1
  59. package/dist/server.d.ts +10 -10
  60. package/dist/server.js +8 -8
  61. package/package.json +10 -9
  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 +77 -0
  114. package/src/hitl/HitlTimeoutWorker.ts +138 -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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @codemation/host
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#170](https://github.com/MadeRelevant/codemation/pull/170) [`0b3d2a3`](https://github.com/MadeRelevant/codemation/commit/0b3d2a3dc379c0d8a6509ae97e47f6bb880caea3) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(credentials): app gallery API (framework half)
8
+
9
+ Adds the framework-side credential "app gallery" surface that the control
10
+ plane's credentials gallery UI consumes:
11
+ - `@codemation/host`: a `GET /api/credentials/apps` endpoint backed by a new
12
+ `GetCredentialAppsQuery` / handler and an `AppGalleryProjector` that projects
13
+ the configured credential types + connected instances into `AppGalleryEntry`
14
+ rows (`AppsResponse`). Wired through `CredentialContractsRegistry`,
15
+ `ApiPaths.credentialApps()`, the credential route registrar/handler, and DI.
16
+ - `@codemation/canvas-core`: `WorkflowCanvasApiClient.fetchCredentialApps()`,
17
+ the `credentialAppsQueryKey`, and a `useCredentialAppsQuery` hook.
18
+ - `@codemation/next-host`: `NextHostApiClientAdapter.fetchCredentialApps()` so
19
+ the dev shell satisfies the canvas API client contract.
20
+
21
+ - [#167](https://github.com/MadeRelevant/codemation/pull/167) [`3044474`](https://github.com/MadeRelevant/codemation/commit/3044474495525490735510ff74500b53761284b6) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(hitl): Human-in-the-Loop — engine suspend/resume, inbox approval node + channels (local + control-plane), agent-as-tool, decision/timeout handling, inbox decision UX (toast + node status icons + "waiting for approval"), plus the consolidated dev/canvas/host fixes shipped alongside.
22
+
23
+ ### Patch Changes
24
+
25
+ - [#170](https://github.com/MadeRelevant/codemation/pull/170) [`0b3d2a3`](https://github.com/MadeRelevant/codemation/commit/0b3d2a3dc379c0d8a6509ae97e47f6bb880caea3) Thanks [@cblokland90](https://github.com/cblokland90)! - fix(host): allow CP_WEB_ORIGIN to be a comma-separated CORS allowlist
26
+
27
+ `ManagedCorsMiddleware` compared the request origin with `===` against the raw
28
+ `CP_WEB_ORIGIN` value, so when the provisioner injects more than one origin
29
+ (e.g. the Caddy origin plus the direct dev port) the joined string never
30
+ matched any real origin. Every CORS preflight 403'd, which left the control
31
+ plane's workspace canvas stuck on "Getting your canvas ready…". The middleware
32
+ now parses `CP_WEB_ORIGIN` as a comma-separated allowlist and echoes back the
33
+ request's own origin when it is a member.
34
+
35
+ - Updated dependencies [[`3044474`](https://github.com/MadeRelevant/codemation/commit/3044474495525490735510ff74500b53761284b6)]:
36
+ - @codemation/core@0.12.0
37
+ - @codemation/core-nodes@0.9.0
38
+ - @codemation/eventbus-redis@0.0.40
39
+
3
40
  ## 0.8.0
4
41
 
5
42
  ### Minor Changes
@@ -120,6 +120,9 @@ var ApiPaths = class {
120
120
  static credentialInstances() {
121
121
  return `${this.credentialsBasePath}/instances`;
122
122
  }
123
+ static credentialApps() {
124
+ return `${this.credentialsBasePath}/apps`;
125
+ }
123
126
  static credentialInstance(instanceId, withSecrets) {
124
127
  const base = `${this.credentialInstances()}/${encodeURIComponent(instanceId)}`;
125
128
  return withSecrets ? `${base}?withSecrets=1` : base;
@@ -231,8 +234,16 @@ var ApiPaths = class {
231
234
  static internalAuthBootstrap() {
232
235
  return `${this.bootstrapBasePath}/auth/internal`;
233
236
  }
237
+ /** Token-authenticated: resume a suspended HITL task. */
238
+ static hitlTaskResume(taskId) {
239
+ return `${this.apiBasePath}/hitl/tasks/${encodeURIComponent(taskId)}/resume`;
240
+ }
241
+ /** Session-authenticated: record a decision on a suspended HITL task. */
242
+ static hitlTaskDecide(taskId) {
243
+ return `${this.apiBasePath}/hitl/tasks/${encodeURIComponent(taskId)}/decide`;
244
+ }
234
245
  };
235
246
 
236
247
  //#endregion
237
248
  export { InAppCallbackUrlPolicy as n, ApiPaths as t };
238
- //# sourceMappingURL=ApiPaths-Dv1dcHu_.js.map
249
+ //# sourceMappingURL=ApiPaths-DCvrlIjg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiPaths-Dv1dcHu_.js","names":[],"sources":["../src/infrastructure/auth/InAppCallbackUrlPolicy.ts","../src/presentation/http/ApiPaths.ts"],"sourcesContent":["/**\n * Restricts post-login navigation targets to same-origin relative paths (no open redirects).\n */\nexport class InAppCallbackUrlPolicy {\n private static readonly fallbackPath = \"/\";\n\n resolveSafeRelativeCallbackUrl(raw: string | undefined | null): string {\n if (raw === undefined || raw === null) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n if (this.containsAsciiControl(raw)) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n const trimmed = raw.trim();\n if (trimmed.length === 0) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n if (!trimmed.startsWith(\"/\")) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n if (trimmed.startsWith(\"//\")) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n if (trimmed.includes(\"\\\\\")) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n return trimmed;\n }\n\n private containsAsciiControl(value: string): boolean {\n for (let index = 0; index < value.length; index += 1) {\n const code = value.charCodeAt(index);\n if (code <= 0x1f || code === 0x7f) {\n return true;\n }\n }\n return false;\n }\n}\n","export class ApiPaths {\n private static readonly apiBasePath = \"/api\";\n\n private static readonly workflowsBasePath = `${this.apiBasePath}/workflows`;\n\n private static readonly runsBasePath = `${this.apiBasePath}/runs`;\n\n private static readonly credentialsBasePath = `${this.apiBasePath}/credentials`;\n\n private static readonly oauth2BasePath = `${this.apiBasePath}/oauth2`;\n\n private static readonly webhooksBasePath = `${this.apiBasePath}/webhooks`;\n\n private static readonly usersBasePath = `${this.apiBasePath}/users`;\n\n private static readonly telemetryBasePath = `${this.apiBasePath}/telemetry`;\n\n private static readonly whitelabelBasePath = `${this.apiBasePath}/whitelabel`;\n\n private static readonly bootstrapBasePath = `${this.apiBasePath}/bootstrap`;\n\n private static readonly authBasePath = `${this.apiBasePath}/auth`;\n\n private static readonly collectionsBasePath = `${this.apiBasePath}/collections`;\n\n static collections(): string {\n return this.collectionsBasePath;\n }\n\n static collection(name: string): string {\n return `${this.collectionsBasePath}/${encodeURIComponent(name)}`;\n }\n\n static collectionRows(name: string): string {\n return `${this.collection(name)}/rows`;\n }\n\n static collectionRow(name: string, id: string): string {\n return `${this.collectionRows(name)}/${encodeURIComponent(id)}`;\n }\n\n static syncCollections(): string {\n return `${this.collectionsBasePath}/sync`;\n }\n\n static workflows(): string {\n return this.workflowsBasePath;\n }\n\n static workflow(workflowId: string): string {\n return `${this.workflowsBasePath}/${encodeURIComponent(workflowId)}`;\n }\n\n static workflowActivation(workflowId: string): string {\n return `${this.workflow(workflowId)}/activation`;\n }\n\n static workflowRuns(workflowId: string): string {\n return `${this.workflow(workflowId)}/runs`;\n }\n\n static workflowTestSuiteRuns(workflowId: string): string {\n return `${this.workflow(workflowId)}/test-suite-runs`;\n }\n\n /**\n * `GET` returns per-assertion-metric trends across the workflow's recent suite runs. With\n * no `names` arg, every distinct assertion name is returned (so the multi-select can populate);\n * with `names`, only the requested subset is returned (order preserved).\n */\n static workflowAssertionMetricTrends(workflowId: string, names?: ReadonlyArray<string>): string {\n const base = `${this.workflow(workflowId)}/assertion-metric-trends`;\n if (!names || names.length === 0) {\n return base;\n }\n return `${base}?names=${names.map((n) => encodeURIComponent(n)).join(\",\")}`;\n }\n\n static testSuiteRun(testSuiteRunId: string): string {\n return `${this.apiBasePath}/test-suite-runs/${encodeURIComponent(testSuiteRunId)}`;\n }\n\n static testSuiteRunAssertions(testSuiteRunId: string): string {\n return `${this.testSuiteRun(testSuiteRunId)}/assertions`;\n }\n\n static testSuiteRunChildRuns(testSuiteRunId: string): string {\n return `${this.testSuiteRun(testSuiteRunId)}/runs`;\n }\n\n static runAssertions(runId: string): string {\n return `${this.runState(runId)}/assertions`;\n }\n\n static workflowCredentialHealth(workflowId: string): string {\n return `${this.workflow(workflowId)}/credential-health`;\n }\n\n static workflowDebuggerOverlay(workflowId: string): string {\n return `${this.workflow(workflowId)}/debugger-overlay`;\n }\n\n static workflowDebuggerOverlayCopyRun(workflowId: string): string {\n return `${this.workflowDebuggerOverlay(workflowId)}/copy-run`;\n }\n\n static workflowDebuggerOverlayBinaryUpload(workflowId: string): string {\n return `${this.workflowDebuggerOverlay(workflowId)}/binary/upload`;\n }\n\n static workflowOverlayBinaryContent(workflowId: string, binaryId: string): string {\n return `${this.workflow(workflowId)}/debugger-overlay/binary/${encodeURIComponent(binaryId)}/content`;\n }\n\n static runs(): string {\n return this.runsBasePath;\n }\n\n static run(): string {\n return this.runs();\n }\n\n static credentialTypes(): string {\n return `${this.credentialsBasePath}/types`;\n }\n\n static credentialsEnvStatus(): string {\n return `${this.credentialsBasePath}/env-status`;\n }\n\n static credentialInstances(): string {\n return `${this.credentialsBasePath}/instances`;\n }\n\n static credentialInstance(instanceId: string, withSecrets?: boolean): string {\n const base = `${this.credentialInstances()}/${encodeURIComponent(instanceId)}`;\n return withSecrets ? `${base}?withSecrets=1` : base;\n }\n\n static credentialInstanceTest(instanceId: string): string {\n return `${this.credentialInstance(instanceId)}/test`;\n }\n\n static credentialBindings(): string {\n return `${this.apiBasePath}/credential-bindings`;\n }\n\n static oauth2RedirectUri(): string {\n return `${this.oauth2BasePath}/redirect-uri`;\n }\n\n static oauth2Disconnect(instanceId: string): string {\n return `${this.oauth2BasePath}/disconnect?instanceId=${encodeURIComponent(instanceId)}`;\n }\n\n static credentialOAuthStart(): string {\n return `${this.credentialsBasePath}/oauth/start`;\n }\n\n static workflowWebsocket(): string {\n return `${this.workflowsBasePath}/ws`;\n }\n\n /** Dev gateway: stable browser WebSocket for build lifecycle (CLI → gateway → browser). */\n static devGatewaySocket(): string {\n return `${this.apiBasePath}/dev/socket`;\n }\n\n /** Dev gateway: HTTP notify endpoint used by the Codemation CLI during consumer rebuilds. */\n static devGatewayNotify(): string {\n return `${this.apiBasePath}/dev/notify`;\n }\n\n static webhooks(): string {\n return this.webhooksBasePath;\n }\n\n static users(): string {\n return this.usersBasePath;\n }\n\n static telemetryDashboardSummary(): string {\n return `${this.telemetryBasePath}/dashboard/summary`;\n }\n\n static telemetryDashboardTimeseries(): string {\n return `${this.telemetryBasePath}/dashboard/timeseries`;\n }\n\n static telemetryDashboardDimensions(): string {\n return `${this.telemetryBasePath}/dashboard/dimensions`;\n }\n\n static telemetryDashboardRuns(): string {\n return `${this.telemetryBasePath}/dashboard/runs`;\n }\n\n static telemetryRunTrace(runId: string): string {\n return `${this.telemetryBasePath}/runs/${runId}/trace`;\n }\n\n static authSession(): string {\n return `${this.authBasePath}/session`;\n }\n\n static authLogin(): string {\n return `${this.authBasePath}/login`;\n }\n\n static authLogout(): string {\n return `${this.authBasePath}/logout`;\n }\n\n static authOAuthStart(providerId: string, callbackUrl?: string): string {\n const base = `${this.authBasePath}/oauth/${encodeURIComponent(providerId)}/start`;\n if (!callbackUrl) {\n return base;\n }\n return `${base}?callbackUrl=${encodeURIComponent(callbackUrl)}`;\n }\n\n static authOAuthCallback(providerId: string): string {\n return `${this.authBasePath}/oauth/${encodeURIComponent(providerId)}/callback`;\n }\n\n static userInviteVerify(): string {\n return `${this.usersBasePath}/invites/verify`;\n }\n\n static userInviteAccept(): string {\n return `${this.usersBasePath}/invites/accept`;\n }\n\n static userInvites(): string {\n return `${this.usersBasePath}/invites`;\n }\n\n static userInviteRegenerate(userId: string): string {\n return `${this.usersBasePath}/${encodeURIComponent(userId)}/invites/regenerate`;\n }\n\n static userStatus(userId: string): string {\n return `${this.usersBasePath}/${encodeURIComponent(userId)}/status`;\n }\n\n static runState(runId: string): string {\n return `${this.runsBasePath}/${encodeURIComponent(runId)}`;\n }\n\n static runDetail(runId: string): string {\n return `${this.runState(runId)}/detail`;\n }\n\n static runWorkflowSnapshot(runId: string): string {\n return `${this.runState(runId)}/workflow-snapshot`;\n }\n\n static runNodePin(runId: string, nodeId: string): string {\n return `${this.runState(runId)}/nodes/${encodeURIComponent(nodeId)}/pin`;\n }\n\n static runNode(runId: string, nodeId: string): string {\n return `${this.runState(runId)}/nodes/${encodeURIComponent(nodeId)}/run`;\n }\n\n static runBinaryContent(runId: string, binaryId: string): string {\n return `${this.runState(runId)}/binary/${encodeURIComponent(binaryId)}/content`;\n }\n\n /** Anonymous: consumer logo from `codemation.config.ts` whitelabel.logoPath. */\n static whitelabelLogo(): string {\n return `${this.whitelabelBasePath}/logo`;\n }\n\n static frontendBootstrap(): string {\n return `${this.bootstrapBasePath}/frontend`;\n }\n\n static internalAuthBootstrap(): string {\n return `${this.bootstrapBasePath}/auth/internal`;\n }\n}\n"],"mappings":";;;;AAGA,IAAa,yBAAb,MAAa,uBAAuB;CAClC,OAAwB,eAAe;CAEvC,+BAA+B,KAAwC;AACrE,MAAI,QAAQ,UAAa,QAAQ,KAC/B,QAAO,uBAAuB;AAEhC,MAAI,KAAK,qBAAqB,IAAI,CAChC,QAAO,uBAAuB;EAEhC,MAAM,UAAU,IAAI,MAAM;AAC1B,MAAI,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AC;;CAGrE,OAAO,iBAAiB,OAAe,UAA0B;AAC/D,SAAO,GAAG,KAAK,SAAS,MAAM,CAAC,UAAU,mBAAmB,SAAS,CAAC;;;CAIxE,OAAO,iBAAyB;AAC9B,SAAO,GAAG,KAAK,mBAAmB;;CAGpC,OAAO,oBAA4B;AACjC,SAAO,GAAG,KAAK,kBAAkB;;CAGnC,OAAO,wBAAgC;AACrC,SAAO,GAAG,KAAK,kBAAkB"}
1
+ {"version":3,"file":"ApiPaths-DCvrlIjg.js","names":[],"sources":["../src/infrastructure/auth/InAppCallbackUrlPolicy.ts","../src/presentation/http/ApiPaths.ts"],"sourcesContent":["/**\n * Restricts post-login navigation targets to same-origin relative paths (no open redirects).\n */\nexport class InAppCallbackUrlPolicy {\n private static readonly fallbackPath = \"/\";\n\n resolveSafeRelativeCallbackUrl(raw: string | undefined | null): string {\n if (raw === undefined || raw === null) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n if (this.containsAsciiControl(raw)) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n const trimmed = raw.trim();\n if (trimmed.length === 0) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n if (!trimmed.startsWith(\"/\")) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n if (trimmed.startsWith(\"//\")) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n if (trimmed.includes(\"\\\\\")) {\n return InAppCallbackUrlPolicy.fallbackPath;\n }\n return trimmed;\n }\n\n private containsAsciiControl(value: string): boolean {\n for (let index = 0; index < value.length; index += 1) {\n const code = value.charCodeAt(index);\n if (code <= 0x1f || code === 0x7f) {\n return true;\n }\n }\n return false;\n }\n}\n","export class ApiPaths {\n private static readonly apiBasePath = \"/api\";\n\n private static readonly workflowsBasePath = `${this.apiBasePath}/workflows`;\n\n private static readonly runsBasePath = `${this.apiBasePath}/runs`;\n\n private static readonly credentialsBasePath = `${this.apiBasePath}/credentials`;\n\n private static readonly oauth2BasePath = `${this.apiBasePath}/oauth2`;\n\n private static readonly webhooksBasePath = `${this.apiBasePath}/webhooks`;\n\n private static readonly usersBasePath = `${this.apiBasePath}/users`;\n\n private static readonly telemetryBasePath = `${this.apiBasePath}/telemetry`;\n\n private static readonly whitelabelBasePath = `${this.apiBasePath}/whitelabel`;\n\n private static readonly bootstrapBasePath = `${this.apiBasePath}/bootstrap`;\n\n private static readonly authBasePath = `${this.apiBasePath}/auth`;\n\n private static readonly collectionsBasePath = `${this.apiBasePath}/collections`;\n\n static collections(): string {\n return this.collectionsBasePath;\n }\n\n static collection(name: string): string {\n return `${this.collectionsBasePath}/${encodeURIComponent(name)}`;\n }\n\n static collectionRows(name: string): string {\n return `${this.collection(name)}/rows`;\n }\n\n static collectionRow(name: string, id: string): string {\n return `${this.collectionRows(name)}/${encodeURIComponent(id)}`;\n }\n\n static syncCollections(): string {\n return `${this.collectionsBasePath}/sync`;\n }\n\n static workflows(): string {\n return this.workflowsBasePath;\n }\n\n static workflow(workflowId: string): string {\n return `${this.workflowsBasePath}/${encodeURIComponent(workflowId)}`;\n }\n\n static workflowActivation(workflowId: string): string {\n return `${this.workflow(workflowId)}/activation`;\n }\n\n static workflowRuns(workflowId: string): string {\n return `${this.workflow(workflowId)}/runs`;\n }\n\n static workflowTestSuiteRuns(workflowId: string): string {\n return `${this.workflow(workflowId)}/test-suite-runs`;\n }\n\n /**\n * `GET` returns per-assertion-metric trends across the workflow's recent suite runs. With\n * no `names` arg, every distinct assertion name is returned (so the multi-select can populate);\n * with `names`, only the requested subset is returned (order preserved).\n */\n static workflowAssertionMetricTrends(workflowId: string, names?: ReadonlyArray<string>): string {\n const base = `${this.workflow(workflowId)}/assertion-metric-trends`;\n if (!names || names.length === 0) {\n return base;\n }\n return `${base}?names=${names.map((n) => encodeURIComponent(n)).join(\",\")}`;\n }\n\n static testSuiteRun(testSuiteRunId: string): string {\n return `${this.apiBasePath}/test-suite-runs/${encodeURIComponent(testSuiteRunId)}`;\n }\n\n static testSuiteRunAssertions(testSuiteRunId: string): string {\n return `${this.testSuiteRun(testSuiteRunId)}/assertions`;\n }\n\n static testSuiteRunChildRuns(testSuiteRunId: string): string {\n return `${this.testSuiteRun(testSuiteRunId)}/runs`;\n }\n\n static runAssertions(runId: string): string {\n return `${this.runState(runId)}/assertions`;\n }\n\n static workflowCredentialHealth(workflowId: string): string {\n return `${this.workflow(workflowId)}/credential-health`;\n }\n\n static workflowDebuggerOverlay(workflowId: string): string {\n return `${this.workflow(workflowId)}/debugger-overlay`;\n }\n\n static workflowDebuggerOverlayCopyRun(workflowId: string): string {\n return `${this.workflowDebuggerOverlay(workflowId)}/copy-run`;\n }\n\n static workflowDebuggerOverlayBinaryUpload(workflowId: string): string {\n return `${this.workflowDebuggerOverlay(workflowId)}/binary/upload`;\n }\n\n static workflowOverlayBinaryContent(workflowId: string, binaryId: string): string {\n return `${this.workflow(workflowId)}/debugger-overlay/binary/${encodeURIComponent(binaryId)}/content`;\n }\n\n static runs(): string {\n return this.runsBasePath;\n }\n\n static run(): string {\n return this.runs();\n }\n\n static credentialTypes(): string {\n return `${this.credentialsBasePath}/types`;\n }\n\n static credentialsEnvStatus(): string {\n return `${this.credentialsBasePath}/env-status`;\n }\n\n static credentialInstances(): string {\n return `${this.credentialsBasePath}/instances`;\n }\n\n static credentialApps(): string {\n return `${this.credentialsBasePath}/apps`;\n }\n\n static credentialInstance(instanceId: string, withSecrets?: boolean): string {\n const base = `${this.credentialInstances()}/${encodeURIComponent(instanceId)}`;\n return withSecrets ? `${base}?withSecrets=1` : base;\n }\n\n static credentialInstanceTest(instanceId: string): string {\n return `${this.credentialInstance(instanceId)}/test`;\n }\n\n static credentialBindings(): string {\n return `${this.apiBasePath}/credential-bindings`;\n }\n\n static oauth2RedirectUri(): string {\n return `${this.oauth2BasePath}/redirect-uri`;\n }\n\n static oauth2Disconnect(instanceId: string): string {\n return `${this.oauth2BasePath}/disconnect?instanceId=${encodeURIComponent(instanceId)}`;\n }\n\n static credentialOAuthStart(): string {\n return `${this.credentialsBasePath}/oauth/start`;\n }\n\n static workflowWebsocket(): string {\n return `${this.workflowsBasePath}/ws`;\n }\n\n /** Dev gateway: stable browser WebSocket for build lifecycle (CLI → gateway → browser). */\n static devGatewaySocket(): string {\n return `${this.apiBasePath}/dev/socket`;\n }\n\n /** Dev gateway: HTTP notify endpoint used by the Codemation CLI during consumer rebuilds. */\n static devGatewayNotify(): string {\n return `${this.apiBasePath}/dev/notify`;\n }\n\n static webhooks(): string {\n return this.webhooksBasePath;\n }\n\n static users(): string {\n return this.usersBasePath;\n }\n\n static telemetryDashboardSummary(): string {\n return `${this.telemetryBasePath}/dashboard/summary`;\n }\n\n static telemetryDashboardTimeseries(): string {\n return `${this.telemetryBasePath}/dashboard/timeseries`;\n }\n\n static telemetryDashboardDimensions(): string {\n return `${this.telemetryBasePath}/dashboard/dimensions`;\n }\n\n static telemetryDashboardRuns(): string {\n return `${this.telemetryBasePath}/dashboard/runs`;\n }\n\n static telemetryRunTrace(runId: string): string {\n return `${this.telemetryBasePath}/runs/${runId}/trace`;\n }\n\n static authSession(): string {\n return `${this.authBasePath}/session`;\n }\n\n static authLogin(): string {\n return `${this.authBasePath}/login`;\n }\n\n static authLogout(): string {\n return `${this.authBasePath}/logout`;\n }\n\n static authOAuthStart(providerId: string, callbackUrl?: string): string {\n const base = `${this.authBasePath}/oauth/${encodeURIComponent(providerId)}/start`;\n if (!callbackUrl) {\n return base;\n }\n return `${base}?callbackUrl=${encodeURIComponent(callbackUrl)}`;\n }\n\n static authOAuthCallback(providerId: string): string {\n return `${this.authBasePath}/oauth/${encodeURIComponent(providerId)}/callback`;\n }\n\n static userInviteVerify(): string {\n return `${this.usersBasePath}/invites/verify`;\n }\n\n static userInviteAccept(): string {\n return `${this.usersBasePath}/invites/accept`;\n }\n\n static userInvites(): string {\n return `${this.usersBasePath}/invites`;\n }\n\n static userInviteRegenerate(userId: string): string {\n return `${this.usersBasePath}/${encodeURIComponent(userId)}/invites/regenerate`;\n }\n\n static userStatus(userId: string): string {\n return `${this.usersBasePath}/${encodeURIComponent(userId)}/status`;\n }\n\n static runState(runId: string): string {\n return `${this.runsBasePath}/${encodeURIComponent(runId)}`;\n }\n\n static runDetail(runId: string): string {\n return `${this.runState(runId)}/detail`;\n }\n\n static runWorkflowSnapshot(runId: string): string {\n return `${this.runState(runId)}/workflow-snapshot`;\n }\n\n static runNodePin(runId: string, nodeId: string): string {\n return `${this.runState(runId)}/nodes/${encodeURIComponent(nodeId)}/pin`;\n }\n\n static runNode(runId: string, nodeId: string): string {\n return `${this.runState(runId)}/nodes/${encodeURIComponent(nodeId)}/run`;\n }\n\n static runBinaryContent(runId: string, binaryId: string): string {\n return `${this.runState(runId)}/binary/${encodeURIComponent(binaryId)}/content`;\n }\n\n /** Anonymous: consumer logo from `codemation.config.ts` whitelabel.logoPath. */\n static whitelabelLogo(): string {\n return `${this.whitelabelBasePath}/logo`;\n }\n\n static frontendBootstrap(): string {\n return `${this.bootstrapBasePath}/frontend`;\n }\n\n static internalAuthBootstrap(): string {\n return `${this.bootstrapBasePath}/auth/internal`;\n }\n\n /** Token-authenticated: resume a suspended HITL task. */\n static hitlTaskResume(taskId: string): string {\n return `${this.apiBasePath}/hitl/tasks/${encodeURIComponent(taskId)}/resume`;\n }\n\n /** Session-authenticated: record a decision on a suspended HITL task. */\n static hitlTaskDecide(taskId: string): string {\n return `${this.apiBasePath}/hitl/tasks/${encodeURIComponent(taskId)}/decide`;\n }\n}\n"],"mappings":";;;;AAGA,IAAa,yBAAb,MAAa,uBAAuB;CAClC,OAAwB,eAAe;CAEvC,+BAA+B,KAAwC;AACrE,MAAI,QAAQ,UAAa,QAAQ,KAC/B,QAAO,uBAAuB;AAEhC,MAAI,KAAK,qBAAqB,IAAI,CAChC,QAAO,uBAAuB;EAEhC,MAAM,UAAU,IAAI,MAAM;AAC1B,MAAI,QAAQ,WAAW,EACrB,QAAO,uBAAuB;AAEhC,MAAI,CAAC,QAAQ,WAAW,IAAI,CAC1B,QAAO,uBAAuB;AAEhC,MA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