@codemation/host 0.7.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.
- package/CHANGELOG.md +89 -0
- package/LICENSE +37 -1
- package/dist/{ApiPaths-Dv1dcHu_.js → ApiPaths-DCvrlIjg.js} +12 -1
- package/dist/{ApiPaths-Dv1dcHu_.js.map → ApiPaths-DCvrlIjg.js.map} +1 -1
- package/dist/{AppConfigFactory-Cx4qQvRk.js → AppConfigFactory-D4LL1aOR.js} +77 -297
- package/dist/AppConfigFactory-D4LL1aOR.js.map +1 -0
- package/dist/{AppConfigFactory-DnLoQ9Li.d.ts → AppConfigFactory-DncmwCD1.d.ts} +2918 -199
- package/dist/{AppContainerFactory-DqKYCRNP.js → AppContainerFactory-jpYXGZGe.js} +1733 -475
- package/dist/AppContainerFactory-jpYXGZGe.js.map +1 -0
- package/dist/{CodemationAppContext-CKVv9W9q.d.ts → CodemationAppContext-K51b7oXe.d.ts} +9 -3
- package/dist/{CodemationAuthoring.types-DA3G3s6d.d.ts → CodemationAuthoring.types-BXlXIl4K.d.ts} +9 -4
- package/dist/{CodemationAuthoring.types-NGkBcmmT.js → CodemationAuthoring.types-BteaR3Dc.js} +3 -2
- package/dist/CodemationAuthoring.types-BteaR3Dc.js.map +1 -0
- package/dist/{CodemationConfigNormalizer-BAKjetJ6.d.ts → CodemationConfigNormalizer-B4rDYC9h.d.ts} +3 -3
- package/dist/{CodemationConsumerConfigLoader-GYpBBvqE.js → CodemationConsumerConfigLoader-By-6tuGc.js} +3 -1
- package/dist/CodemationConsumerConfigLoader-By-6tuGc.js.map +1 -0
- package/dist/{CodemationConsumerConfigLoader-nxOqvv46.d.ts → CodemationConsumerConfigLoader-Dt4jyLx6.d.ts} +3 -2
- package/dist/{CodemationPluginListMerger-DKLAHT2b.d.ts → CodemationPluginListMerger-DS6I3Xe0.d.ts} +64 -27
- package/dist/{persistenceServer-C-hH4z6l.js → CodemationPostgresPrismaClientFactory-C7156Fe-.js} +2 -2
- package/dist/CodemationPostgresPrismaClientFactory-C7156Fe-.js.map +1 -0
- package/dist/CodemationPostgresPrismaClientFactory-CTNTPnDr.d.ts +9 -0
- package/dist/{CredentialContractsRegistry-Bq2bq28t.d.ts → CredentialContractsRegistry-Dgu-rEXi.d.ts} +16 -3
- package/dist/{CredentialServices-Be2I60Th.d.ts → CredentialServices-B3wPyp2y.d.ts} +4 -4
- package/dist/{CredentialServices-Dk8yypeL.js → CredentialServices-Bios0dM8.js} +10 -4
- package/dist/CredentialServices-Bios0dM8.js.map +1 -0
- package/dist/{InternalPingRegistrar-DY3kSfxP.js → InternalPingRegistrar-BavAAnvk.js} +19 -16
- package/dist/InternalPingRegistrar-BavAAnvk.js.map +1 -0
- package/dist/{ItemsInputNormalizer-_RwIfRIQ.d.ts → ItemsInputNormalizer-CFkfNMLt.d.ts} +1434 -1225
- package/dist/PrismaMigrationDeployer-DdEcXXVi.d.ts +14 -0
- package/dist/{PublicFrontendBootstrapFactory-CY2FS-5g.d.ts → PublicFrontendBootstrapFactory-ClEjZP74.d.ts} +2 -2
- package/dist/{PublicFrontendBootstrapJsonCodec-CXG9Dxft.d.ts → PublicFrontendBootstrapJsonCodec-HNItQ7ol.d.ts} +6 -1
- package/dist/{TelemetryContracts-BtDx84Cp.d.ts → TelemetryContracts-DpZEODQM.d.ts} +2 -2
- package/dist/{WorkflowPolicyUiPresentationFactory-6MyjCvBO.d.ts → WorkflowPolicyUiPresentationFactory-BNn2fvR_.d.ts} +2 -2
- package/dist/{WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js → WorkflowPolicyUiPresentationFactory-DfvD2VHk.js} +1 -1
- package/dist/{WorkflowPolicyUiPresentationFactory-Bb-ae_Zh.js.map → WorkflowPolicyUiPresentationFactory-DfvD2VHk.js.map} +1 -1
- package/dist/authoring.d.ts +4 -4
- package/dist/authoring.js +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/consumer.d.ts +5 -5
- package/dist/consumer.js +1 -1
- package/dist/credentials.d.ts +5 -5
- package/dist/credentials.js +1 -1
- package/dist/devServerSidecar.d.ts +2 -2
- package/dist/dto.d.ts +5 -5
- package/dist/{index-DilAYwnH.d.ts → index-ChIfeWzk.d.ts} +71 -28
- package/dist/index.d.ts +49 -17
- package/dist/index.js +106 -13
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/persistence/PrismaMigrationOperations.d.ts +44 -0
- package/dist/infrastructure/persistence/PrismaMigrationOperations.js +302 -0
- package/dist/infrastructure/persistence/PrismaMigrationOperations.js.map +1 -0
- package/dist/mapping.d.ts +2 -2
- package/dist/mapping.js +1 -1
- package/dist/nextServer.d.ts +15 -39
- package/dist/nextServer.js +6 -6
- package/dist/pairing.d.ts +27 -8
- package/dist/pairing.js +19 -3
- package/dist/pairing.js.map +1 -0
- package/dist/{pairing.types-snfZ_OzB.d.ts → pairing.types-D9Bjn98U.d.ts} +1 -1
- package/dist/persistenceServer.d.ts +31 -7
- package/dist/persistenceServer.js +2 -2
- package/dist/{server-C4bS62rg.d.ts → server-B5trn7y4.d.ts} +5 -5
- package/dist/{server-Y7kxwtCK.js → server-BlG9qV5S.js} +5 -5
- package/dist/{server-Y7kxwtCK.js.map → server-BlG9qV5S.js.map} +1 -1
- package/dist/server.d.ts +10 -10
- package/dist/server.js +9 -9
- package/package.json +28 -25
- package/playwright.config.ts +8 -2
- package/playwright.scaffolded-dev.config.ts +8 -2
- package/prisma/migrations/20260526120000_credential_material_pointer/migration.sql +18 -0
- package/prisma/migrations/20260527120000_add_human_task/migration.sql +32 -0
- package/prisma/migrations/20260527130000_add_hitl_state_json/migration.sql +6 -0
- package/prisma/migrations/20260527130000_add_hmac_nonce/migration.sql +12 -0
- package/prisma/migrations.sqlite/20260526120000_credential_material_pointer/migration.sql +13 -0
- package/prisma/migrations.sqlite/20260527120000_add_human_task/migration.sql +30 -0
- package/prisma/migrations.sqlite/20260527130000_add_hitl_state_json/migration.sql +6 -0
- package/prisma/migrations.sqlite/20260527130000_add_hmac_nonce/migration.sql +9 -0
- package/prisma/schema.postgresql.prisma +48 -0
- package/prisma/schema.sqlite.prisma +48 -0
- package/prisma-generated/prisma-postgresql-client/edge.js +40 -6
- package/prisma-generated/prisma-postgresql-client/index-browser.js +36 -2
- package/prisma-generated/prisma-postgresql-client/index.d.ts +3179 -163
- package/prisma-generated/prisma-postgresql-client/index.js +40 -6
- package/prisma-generated/prisma-postgresql-client/package.json +1 -1
- package/prisma-generated/prisma-postgresql-client/schema.prisma +48 -0
- package/prisma-generated/prisma-sqlite-client/edge.js +40 -6
- package/prisma-generated/prisma-sqlite-client/index-browser.js +36 -2
- package/prisma-generated/prisma-sqlite-client/index.d.ts +3175 -163
- package/prisma-generated/prisma-sqlite-client/index.js +40 -6
- package/prisma-generated/prisma-sqlite-client/package.json +1 -1
- package/prisma-generated/prisma-sqlite-client/schema.prisma +48 -0
- package/src/application/contracts/CredentialContractsRegistry.ts +15 -0
- package/src/application/credentials/AppGalleryProjector.ts +69 -0
- package/src/application/hitl/DecideHumanTaskCommandHandler.ts +149 -0
- package/src/application/hitl/DecisionSchemaValidator.ts +22 -0
- package/src/application/hitl/HitlCallbackHandler.ts +96 -0
- package/src/application/mapping/WorkflowDefinitionMapper.ts +1 -3
- package/src/application/queries/CredentialQueryHandlers.ts +2 -0
- package/src/application/queries/GetCredentialAppsQuery.ts +4 -0
- package/src/application/queries/GetCredentialAppsQueryHandler.ts +27 -0
- package/src/application/telemetry/ResumeTelemetryContextForRun.ts +53 -0
- package/src/application/telemetry/TelemetryRetentionTimestampFactory.ts +9 -8
- package/src/applicationTokens.ts +11 -1
- package/src/auth/managed/ManagedCorsMiddleware.ts +20 -5
- package/src/bootstrap/AppContainerFactory.ts +121 -3
- package/src/bootstrap/runtime/HeadlessApiRuntime.ts +47 -0
- package/src/credentials/CachingCredentialMaterialProvider.ts +96 -0
- package/src/credentials/CompositeCredentialMaterialProvider.ts +47 -0
- package/src/credentials/ControlPlaneCatalogFetcher.ts +8 -28
- package/src/credentials/ControlPlaneCredentialMaterialProvider.ts +79 -0
- package/src/credentials/CredentialOAuth2MaterialReader.ts +2 -7
- package/src/credentials/InternalCredentialsBindingRegistrar.ts +83 -0
- package/src/credentials/LocalCredentialMaterialProvider.ts +92 -0
- package/src/domain/credentials/CredentialInstanceService.ts +5 -1
- package/src/domain/credentials/CredentialTypeRegistryImpl.ts +18 -4
- package/src/domain/workflows/WorkflowActivationPreflightRules.ts +7 -4
- package/src/dto.ts +2 -0
- package/src/hitl/ControlPlaneInboxChannel.ts +102 -0
- package/src/hitl/HitlResumeTokenSigner.ts +80 -0
- package/src/hitl/HitlTimeoutJobScheduler.ts +77 -0
- package/src/hitl/HitlTimeoutWorker.ts +138 -0
- package/src/hitl/InboxChannelResolver.ts +49 -0
- package/src/hitl/LocalInboxChannel.ts +37 -0
- package/src/index.ts +3 -0
- package/src/infrastructure/persistence/PrismaCredentialStore.ts +10 -0
- package/src/infrastructure/persistence/PrismaHmacNonceStore.ts +29 -0
- package/src/infrastructure/persistence/PrismaHumanTaskStore.ts +156 -0
- package/src/infrastructure/persistence/PrismaMigrationDeployer.ts +53 -383
- package/src/infrastructure/persistence/PrismaMigrationOperations.ts +401 -0
- package/src/infrastructure/persistence/PrismaWorkflowRunRepository.ts +39 -0
- package/src/mcp/AgentMcpIntegrationImpl.ts +5 -1
- package/src/pairing/HmacNonceStore.ts +14 -0
- package/src/pairing/HmacNonceStoreToken.ts +4 -0
- package/src/pairing/HmacRequestSigner.ts +10 -1
- package/src/pairing/InMemoryHmacNonceStore.ts +24 -0
- package/src/pairing/IncomingHmacVerifier.ts +28 -12
- package/src/pairing/InternalHmacAuthMiddleware.ts +1 -1
- package/src/pairing/index.ts +3 -0
- package/src/presentation/config/CodemationAuthoring.types.ts +7 -1
- package/src/presentation/config/CodemationConfig.ts +6 -0
- package/src/presentation/http/ApiPaths.ts +14 -0
- package/src/presentation/http/HeadlessHttpServerFactory.ts +56 -0
- package/src/presentation/http/hono/HonoHttpAnonymousRoutePolicyRegistry.ts +4 -0
- package/src/presentation/http/hono/registrars/CredentialHonoApiRouteRegistrar.ts +1 -0
- package/src/presentation/http/hono/registrars/HitlDecideHonoApiRouteRegistrar.ts +54 -0
- package/src/presentation/http/hono/registrars/HitlInternalCallbackHonoApiRouteRegistrar.ts +33 -0
- package/src/presentation/http/hono/registrars/HitlResumeHonoApiRouteRegistrar.ts +43 -0
- package/src/presentation/http/routeHandlers/CredentialHttpRouteHandler.ts +9 -0
- package/src/presentation/http/routeHandlers/OAuth2HttpRouteHandlerFactory.ts +1 -1
- package/src/presentation/server/CodemationConsumerConfigLoader.ts +7 -2
- package/src/presentation/websocket/WorkflowWebsocketServerFactory.ts +16 -0
- package/src/server.ts +7 -2
- package/src/workflows/InternalWorkflowTestRunRegistrar.ts +9 -0
- package/tsconfig.json +1 -0
- package/dist/AppConfigFactory-Cx4qQvRk.js.map +0 -1
- package/dist/AppContainerFactory-DqKYCRNP.js.map +0 -1
- package/dist/CodemationAuthoring.types-NGkBcmmT.js.map +0 -1
- package/dist/CodemationConsumerConfigLoader-GYpBBvqE.js.map +0 -1
- package/dist/CredentialServices-Dk8yypeL.js.map +0 -1
- package/dist/InternalPingRegistrar-DY3kSfxP.js.map +0 -1
- package/dist/persistenceServer-C-hH4z6l.js.map +0 -1
- package/dist/persistenceServer-CeTHtC6E.d.ts +0 -30
- package/src/credentials/catalogTypes.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,94 @@
|
|
|
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
|
+
|
|
40
|
+
## 0.8.0
|
|
41
|
+
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- [#150](https://github.com/MadeRelevant/codemation/pull/150) [`8ac207a`](https://github.com/MadeRelevant/codemation/commit/8ac207ab263542e46fad0b9e1ea584fbb71a747c) Thanks [@cblokland90](https://github.com/cblokland90)! - Add workspace-host Docker image packaging and managed template peerDeps fix.
|
|
45
|
+
- Move @codemation/\* from dependencies to peerDependencies in the managed template (avoids n8n-style dual-instance singleton trap at runtime; framework packages resolve from the base image)
|
|
46
|
+
- Add codemationVersion: "1.0.0" field to managed template codemation.config.ts and DefineCodemationAppOptions (reserved compatibility-date slot, no enforcement yet)
|
|
47
|
+
- Add packages/host/src/bin/server.ts standalone entry point for workspace pod runtime
|
|
48
|
+
- Add packaging/workspace-host/Dockerfile for the codemation-workspace-host:1.0.0 base image
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- [#153](https://github.com/MadeRelevant/codemation/pull/153) [`a70e182`](https://github.com/MadeRelevant/codemation/commit/a70e182a852026e4f6d8f317fe9862417dc23ce6) Thanks [@cblokland90](https://github.com/cblokland90)! - Move UI-only packages (monaco-editor, react, @xyflow/react, dagre, lucide-react, rc-tree, etc.) from `dependencies` to `devDependencies` in @codemation/host. No runtime source in `packages/host/src` imports these packages — they were vestigial from before the UI was extracted to @codemation/next-host. Moving them ensures pnpm filtered installs (e.g. `--filter @codemation/host...`) no longer pull in ~1.5 GB of UI dependencies, which is required for the workspace-host container image to stay small.
|
|
53
|
+
|
|
54
|
+
- [#156](https://github.com/MadeRelevant/codemation/pull/156) [`5315e23`](https://github.com/MadeRelevant/codemation/commit/5315e2361492560601ac2c97491aa58c49346fd4) Thanks [@cblokland90](https://github.com/cblokland90)! - fix(host): only throw on invalid WORKSPACE_PAIRING_SECRET in managed mode
|
|
55
|
+
|
|
56
|
+
Previously, setting WORKSPACE_PAIRING_SECRET to an invalid value (not a 32-byte base64 string) would crash the host at boot time even when running in non-managed mode (the default). Framework consumers who accidentally set this env var or left a misconfigured value would see an opaque boot error unrelated to their actual configuration.
|
|
57
|
+
|
|
58
|
+
After this fix, the invalid-secret error is only propagated in `auth.kind: "managed"` mode. In all other modes, the error is caught, a warning is logged, and the host boots normally without pairing infrastructure wired up. Managed-mode consumers continue to see the full error at startup.
|
|
59
|
+
|
|
60
|
+
- [#152](https://github.com/MadeRelevant/codemation/pull/152) [`ac860a5`](https://github.com/MadeRelevant/codemation/commit/ac860a5af1df3e5766581e644fef8cc0d1b24eba) Thanks [@cblokland90](https://github.com/cblokland90)! - Fix ControlPlaneCatalogFetcher calling wrong URL path (sprint-mvp/01).
|
|
61
|
+
|
|
62
|
+
The fetcher was calling `/api/catalog/*` (session-gated in the CP) instead of
|
|
63
|
+
`/internal/catalog/*` (HMAC-gated). The CP's `/api/*` router returned 401 for
|
|
64
|
+
every HMAC-signed request because it requires a Better Auth session cookie, not a
|
|
65
|
+
workspace pairing signature.
|
|
66
|
+
|
|
67
|
+
This caused every provisioned workspace to log steady `HTTP 401 Unauthorized`
|
|
68
|
+
errors from `ControlPlaneCatalogFetcher`, blocking OAuth credential-type and MCP
|
|
69
|
+
server catalog fetches.
|
|
70
|
+
|
|
71
|
+
- [#157](https://github.com/MadeRelevant/codemation/pull/157) [`3025b86`](https://github.com/MadeRelevant/codemation/commit/3025b8685b0d7ad60c506b5a0f21967e681a25ea) Thanks [@cblokland90](https://github.com/cblokland90)! - Shrink workspace-host Docker image by decoupling CLI from next-host at runtime.
|
|
72
|
+
|
|
73
|
+
`@codemation/cli`: demote `@codemation/next-host` from `dependencies` to `devDependencies`. The CLI's
|
|
74
|
+
non-headless serve path resolves the next-host package at runtime via `require.resolve()`; the
|
|
75
|
+
headless path (used by workspace-host pods) never touches it. Consumers that install `@codemation/cli`
|
|
76
|
+
from the registry and need the UI shell must add `@codemation/next-host` as a direct dependency.
|
|
77
|
+
|
|
78
|
+
`@codemation/core-nodes`: demote `lucide-react` from `dependencies` to `devDependencies`. The package
|
|
79
|
+
only references lucide icon names as strings (e.g. `"lucide:bot"`); it never imports the react library
|
|
80
|
+
at runtime. This removes ~46 MB from runtime installs of `@codemation/core-nodes`.
|
|
81
|
+
|
|
82
|
+
`@codemation/host`: promote `execa` and `dotenv` from `devDependencies` to `dependencies`. Both are
|
|
83
|
+
required at Dockerfile build time by `scripts/generate-prisma-clients.mjs` (imports `execaSync` from
|
|
84
|
+
`execa`) and `prisma.config.ts` (imports `dotenv/config`). These files run during `prisma:generate`
|
|
85
|
+
which executes in the production builder stage with `--prod` install (no devDeps available).
|
|
86
|
+
|
|
87
|
+
- Updated dependencies [[`e0933eb`](https://github.com/MadeRelevant/codemation/commit/e0933ebc51806a9593f94758860c591b8346a7a5), [`3025b86`](https://github.com/MadeRelevant/codemation/commit/3025b8685b0d7ad60c506b5a0f21967e681a25ea)]:
|
|
88
|
+
- @codemation/core@0.11.1
|
|
89
|
+
- @codemation/core-nodes@0.8.1
|
|
90
|
+
- @codemation/eventbus-redis@0.0.39
|
|
91
|
+
|
|
3
92
|
## 0.7.0
|
|
4
93
|
|
|
5
94
|
### Minor Changes
|
package/LICENSE
CHANGED
|
@@ -1 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
Codemation Pre-Stable License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Made Relevant B.V. All rights reserved.
|
|
4
|
+
|
|
5
|
+
1. Definitions
|
|
6
|
+
|
|
7
|
+
"Software" means the Codemation source code, documentation, and artifacts in this repository and any published npm packages in the Codemation monorepo.
|
|
8
|
+
|
|
9
|
+
"Stable Version" means the first published release of the package `@codemation/core` on the public npm registry with version 1.0.0 or higher.
|
|
10
|
+
|
|
11
|
+
2. Permitted use (before Stable Version)
|
|
12
|
+
|
|
13
|
+
Until a Stable Version exists, you may use, copy, modify, and distribute the Software only for non-commercial purposes, including personal learning, research, evaluation, and internal use within your organization that does not charge third parties for access to the Software or a product or service whose primary value is the Software.
|
|
14
|
+
|
|
15
|
+
3. Restrictions (before Stable Version)
|
|
16
|
+
|
|
17
|
+
Until a Stable Version exists, you must not:
|
|
18
|
+
|
|
19
|
+
a) Sell, rent, lease, or sublicense the Software or a derivative work for a fee;
|
|
20
|
+
|
|
21
|
+
b) Offer the Software or a derivative work as part of a paid product or service (including hosting, support, or consulting) where the Software is a material part of the offering;
|
|
22
|
+
|
|
23
|
+
c) Use the Software or a derivative work primarily to generate revenue or commercial advantage for you or others.
|
|
24
|
+
|
|
25
|
+
These restrictions apply to all versions published before a Stable Version, even if a later Stable Version is released under different terms.
|
|
26
|
+
|
|
27
|
+
4. After Stable Version
|
|
28
|
+
|
|
29
|
+
The maintainers may publish a Stable Version under different license terms. If they do, those terms apply only to that Stable Version and subsequent releases they designate; they do not automatically apply to earlier pre-stable versions.
|
|
30
|
+
|
|
31
|
+
5. No warranty
|
|
32
|
+
|
|
33
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
34
|
+
|
|
35
|
+
6. Third-party components
|
|
36
|
+
|
|
37
|
+
The Software may include third-party components under their own licenses. Those licenses govern those components.
|
|
@@ -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-
|
|
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,QAAQ,WAAW,EACrB,QAAO,uBAAuB;AAEhC,MAAI,CAAC,QAAQ,WAAW,IAAI,CAC1B,QAAO,uBAAuB;AAEhC,MAAI,QAAQ,WAAW,KAAK,CAC1B,QAAO,uBAAuB;AAEhC,MAAI,QAAQ,SAAS,KAAK,CACxB,QAAO,uBAAuB;AAEhC,SAAO;;CAGT,AAAQ,qBAAqB,OAAwB;AACnD,OAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS,GAAG;GACpD,MAAM,OAAO,MAAM,WAAW,MAAM;AACpC,OAAI,QAAQ,MAAQ,SAAS,IAC3B,QAAO;;AAGX,SAAO;;;;;;ACpCX,IAAa,WAAb,MAAsB;CACpB,OAAwB,cAAc;CAEtC,OAAwB,oBAAoB,GAAG,KAAK,YAAY;CAEhE,OAAwB,eAAe,GAAG,KAAK,YAAY;CAE3D,OAAwB,sBAAsB,GAAG,KAAK,YAAY;CAElE,OAAwB,iBAAiB,GAAG,KAAK,YAAY;CAE7D,OAAwB,mBAAmB,GAAG,KAAK,YAAY;CAE/D,OAAwB,gBAAgB,GAAG,KAAK,YAAY;CAE5D,OAAwB,oBAAoB,GAAG,KAAK,YAAY;CAEhE,OAAwB,qBAAqB,GAAG,KAAK,YAAY;CAEjE,OAAwB,oBAAoB,GAAG,KAAK,YAAY;CAEhE,OAA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OAAuB;AACrC,SAAO,GAAG,KAAK,aAAa,GAAG,mBAAmB,MAAM;;CAG1D,OAAO,UAAU,OAAuB;AACtC,SAAO,GAAG,KAAK,SAAS,MAAM,CAAC;;CAGjC,OAAO,oBAAoB,OAAuB;AAChD,SAAO,GAAG,KAAK,SAAS,MAAM,CAAC;;CAGjC,OAAO,WAAW,OAAe,QAAwB;AACvD,SAAO,GAAG,KAAK,SAAS,MAAM,CAAC,SAAS,mBAAmB,OAAO,CAAC;;CAGrE,OAAO,QAAQ,OAAe,QAAwB;AACpD,SAAO,GAAG,KAAK,SAAS,MAAM,CAAC,SAAS,mBAAmB,OAAO,CAAC;;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):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