@codemation/host 0.0.4 → 0.0.7
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/README.md +3 -3
- package/dist/{PrismaMigrationDeployer-B7cHGrXP.js → AppConfigFactory-DWIz2hy-.js} +104 -58
- package/dist/AppConfigFactory-DWIz2hy-.js.map +1 -0
- package/dist/{client-Yh7-CQud.d.ts → AppConfigFactory-DmHOpg8O.d.ts} +52 -31
- package/dist/{CodemationFrontendBootstrapRequest-CNEk-C4D.js → AppContainerFactory-B5eRpvAa.js} +3269 -3374
- package/dist/AppContainerFactory-B5eRpvAa.js.map +1 -0
- package/dist/{CodemationWhitelabelConfig-DgbjgtrR.d.ts → CodemationAuthConfig-Bh2cCNCI.d.ts} +32 -2
- package/dist/{CodemationConfig-XCkSV2dj.d.ts → CodemationConfig-D2ULNkec.d.ts} +53 -49
- package/dist/CodemationConfigNormalizer-CBLxXaRV.d.ts +9 -0
- package/dist/{CodemationConsumerConfigLoader-scS_RQMy.js → CodemationConsumerConfigLoader-BBzAr6L_.js} +128 -3
- package/dist/CodemationConsumerConfigLoader-BBzAr6L_.js.map +1 -0
- package/dist/{CodemationConsumerConfigLoader-Dmm2TzAA.d.ts → CodemationConsumerConfigLoader-BLvzcfb7.d.ts} +4 -4
- package/dist/CodemationPluginListMerger-B0-e4CJ6.d.ts +391 -0
- package/dist/{CodemationPluginListMerger-BNmaoXQL.js → CodemationPluginListMerger-DrVOw9KP.js} +18 -10
- package/dist/CodemationPluginListMerger-DrVOw9KP.js.map +1 -0
- package/dist/{CredentialServices-DpDpm8mL.d.ts → CredentialServices-BeuMtqYA.d.ts} +3 -3
- package/dist/{CredentialServices-BKBGe7l3.js → CredentialServices-DNb3CZwW.js} +3 -3
- package/dist/CredentialServices-DNb3CZwW.js.map +1 -0
- package/dist/FrontendAppConfig-D50wjj_n.d.ts +27 -0
- package/dist/{WorkflowViewContracts-DCLpTn25.d.ts → FrontendAppConfigFactory-Bj-DZNlt.d.ts} +29 -2
- package/dist/FrontendAppConfigJsonCodec-1_L7H_Qo.d.ts +20 -0
- package/dist/FrontendAppConfigJsonCodec-nOCQI0ag.js +84 -0
- package/dist/FrontendAppConfigJsonCodec-nOCQI0ag.js.map +1 -0
- package/dist/{LogLevelPolicy-4cq9z0TI.d.ts → LogLevelPolicy-BS_NlAOg.d.ts} +2 -2
- package/dist/{ServerLoggerFactory-BRHxIDS7.js → ServerLoggerFactory-BltIIDfQ.js} +4 -129
- package/dist/ServerLoggerFactory-BltIIDfQ.js.map +1 -0
- package/dist/client.d.ts +5 -3
- package/dist/client.js +2 -1
- package/dist/client.js.map +1 -1
- package/dist/consumer.d.ts +5 -4
- package/dist/consumer.js +4 -4
- package/dist/credentials.d.ts +4 -4
- package/dist/credentials.js +3 -3
- package/dist/devServerSidecar.d.ts +1 -1
- package/dist/{index-Bs4F1IsC.d.ts → index-CkiptHb-.d.ts} +19 -20
- package/dist/index.d.ts +14 -19
- package/dist/index.js +12 -11
- package/dist/nextServer.d.ts +244 -9
- package/dist/nextServer.js +8 -8
- package/dist/persistenceServer-CaehMh3M.d.ts +9 -0
- package/dist/{persistenceServer-8tcM2S48.js → persistenceServer-DVeWUbc3.js} +2 -2
- package/dist/{persistenceServer-8tcM2S48.js.map → persistenceServer-DVeWUbc3.js.map} +1 -1
- package/dist/persistenceServer.d.ts +7 -6
- package/dist/persistenceServer.js +4 -4
- package/dist/{server-Dd65rNm6.js → server-C65z_kqm.js} +47 -17
- package/dist/server-C65z_kqm.js.map +1 -0
- package/dist/{server-BBdsATju.d.ts → server-Dyo8qh4k.d.ts} +23 -4
- package/dist/server.d.ts +12 -9
- package/dist/server.js +11 -10
- package/package.json +6 -6
- package/src/application/commands/WorkflowCommandHandlers.ts +9 -0
- package/src/application/dev/BootRuntimeSnapshotHolder.ts +2 -2
- package/src/application/dev/BootRuntimeSummary.types.ts +2 -2
- package/src/application/queries/WorkflowQueryHandlers.ts +7 -0
- package/src/applicationTokens.ts +1 -1
- package/src/bootstrap/AppContainerFactory.ts +584 -0
- package/src/bootstrap/{PreparedCodemationRuntime.ts → AppContainerLifecycle.ts} +3 -8
- package/src/bootstrap/runtime/AppConfigFactory.ts +155 -30
- package/src/bootstrap/runtime/DatabaseMigrations.ts +18 -0
- package/src/bootstrap/runtime/FrontendRuntime.ts +44 -0
- package/src/bootstrap/runtime/WorkerRuntime.ts +55 -0
- package/src/client.ts +7 -0
- package/src/index.ts +15 -5
- package/src/infrastructure/persistence/PrismaMigrationDeployer.ts +2 -2
- package/src/infrastructure/persistence/SchedulerPersistenceCompatibilityValidator.ts +2 -2
- package/src/infrastructure/scheduler/WorkerRuntimeScheduler.ts +16 -0
- package/src/infrastructure/scheduler/bullmq/BullmqNodeExecutionScheduler.ts +47 -0
- package/src/infrastructure/scheduler/bullmq/BullmqScheduler.ts +33 -0
- package/src/infrastructure/scheduler/bullmq/BullmqWorker.ts +48 -0
- package/src/infrastructure/scheduler/bullmq/RedisConnectionOptionsFactory.ts +48 -0
- package/src/nextServer.ts +12 -3
- package/src/persistenceServer.ts +2 -2
- package/src/presentation/config/AppConfig.ts +25 -1
- package/src/presentation/frontend/CodemationFrontendAuthSnapshot.ts +14 -0
- package/src/presentation/frontend/CodemationFrontendAuthSnapshotFactory.ts +84 -0
- package/src/presentation/frontend/CodemationFrontendAuthSnapshotJsonCodec.ts +58 -0
- package/src/presentation/frontend/FrontendAppConfig.ts +10 -0
- package/src/presentation/frontend/FrontendAppConfigFactory.ts +26 -0
- package/src/presentation/frontend/FrontendAppConfigJsonCodec.ts +58 -0
- package/src/presentation/http/CodemationServerGatewayFactory.ts +22 -16
- package/src/presentation/server/AppConfigLoader.ts +39 -0
- package/src/presentation/server/CodemationConsumerAppResolver.ts +2 -2
- package/src/presentation/server/CodemationConsumerConfigLoader.ts +3 -2
- package/src/server.ts +7 -0
- package/vitest.shared.ts +0 -4
- package/dist/CodemationConsumerConfigLoader-scS_RQMy.js.map +0 -1
- package/dist/CodemationFrontendBootstrapRequest-CNEk-C4D.js.map +0 -1
- package/dist/CodemationPluginListMerger-BNmaoXQL.js.map +0 -1
- package/dist/CodemationPluginListMerger-BRYqEk0y.d.ts +0 -793
- package/dist/CredentialServices-BKBGe7l3.js.map +0 -1
- package/dist/PrismaMigrationDeployer-B7cHGrXP.js.map +0 -1
- package/dist/ServerLoggerFactory-BRHxIDS7.js.map +0 -1
- package/dist/persistenceServer-DPSj_-oU.d.ts +0 -37
- package/dist/server-Dd65rNm6.js.map +0 -1
- package/src/bootstrap/CodemationContainerFactory.ts +0 -310
- package/src/bootstrap/CodemationFrontendBootstrapRequest.ts +0 -16
- package/src/bootstrap/CodemationWorkerBootstrapRequest.ts +0 -19
- package/src/bootstrap/PreparedCodemationRuntimeFactory.ts +0 -308
- package/src/bootstrap/boot/CliRuntimeBootService.ts +0 -27
- package/src/bootstrap/boot/FrontendRuntimeBootService.ts +0 -86
- package/src/bootstrap/boot/WorkerRuntimeBootService.ts +0 -64
- package/src/bootstrap/runtime/ResolvedImplementationSelectionFactory.ts +0 -118
- package/src/codemationApplication.ts +0 -311
- package/src/infrastructure/credentials/FrameworkBuiltinCredentialTypesRegistrar.ts +0 -21
- package/src/infrastructure/persistence/DatabasePersistenceResolver.ts +0 -91
- package/src/infrastructure/runtime/WorkerRuntimeScheduler.ts +0 -35
- package/src/presentation/config/CodemationApplicationFacade.ts +0 -5
- /package/dist/{decorate-B-N_5S4p.js → decorate-B0PP651O.js} +0 -0
- /package/dist/{decorateParam-BTcc3KNk.js → decorateParam-DrsXNPuw.js} +0 -0
|
@@ -1,793 +0,0 @@
|
|
|
1
|
-
import { a as Logger, o as LoggerFactory, t as CodemationWhitelabelConfig } from "./CodemationWhitelabelConfig-DgbjgtrR.js";
|
|
2
|
-
import { t as LogLevelPolicy } from "./LogLevelPolicy-4cq9z0TI.js";
|
|
3
|
-
import { A as RunIdFactory, B as PersistedRunState, D as Item, E as BinaryAttachment, F as NodeExecutionScheduler, H as RunSummary, I as NodeResolver, M as WorkflowId, N as BinaryStorage, O as NodeDefinition, P as NodeActivationContinuation, R as WebhookInvocationMatch, S as CredentialTypeDefinition, T as ActivationIdFactory, U as WorkflowExecutionRepository, V as RunCurrentState, W as Clock, g as CredentialOAuth2AuthDefinition, i as EngineExecutionLimitsPolicy, j as WorkflowDefinition, k as RunId, n as Container, o as RunEvent, r as TypeToken, s as AnyCredentialType, t as RunIntentService, y as CredentialSessionService, z as WorkflowActivationPolicy } from "./index-Bs4F1IsC.js";
|
|
4
|
-
import { a as CodemationConfig, b as CodemationAuthConfig, f as CodemationSchedulerKind, i as CodemationApplicationRuntimeConfig, m as CodemationPlugin, u as CodemationEventBusKind, v as CodemationClassToken, y as AppConfig } from "./CodemationConfig-XCkSV2dj.js";
|
|
5
|
-
import { a as CredentialInstanceService, c as CredentialFieldEnvOverlayService, l as CredentialTypeRegistryImpl, n as CredentialType, o as CredentialMaterialResolver, r as CredentialRuntimeMaterialService, s as CredentialSecretCipher, t as CredentialStore } from "./CredentialServices-DpDpm8mL.js";
|
|
6
|
-
import { n as DatabasePersistenceResolver, r as ResolvedDatabasePersistence, t as PrismaClient } from "./client-Yh7-CQud.js";
|
|
7
|
-
import { n as WorkflowSummary, t as WorkflowDto } from "./WorkflowViewContracts-DCLpTn25.js";
|
|
8
|
-
import "reflect-metadata";
|
|
9
|
-
import { PGlite } from "@electric-sql/pglite";
|
|
10
|
-
import { Hono } from "hono";
|
|
11
|
-
|
|
12
|
-
//#region src/application/bus/Command.d.ts
|
|
13
|
-
declare abstract class Command<TResult> {
|
|
14
|
-
protected readonly __resultType?: TResult;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/application/bus/CommandBus.d.ts
|
|
18
|
-
interface CommandBus {
|
|
19
|
-
execute<TResult>(command: Command<TResult>): Promise<TResult>;
|
|
20
|
-
}
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/application/bus/Query.d.ts
|
|
23
|
-
declare abstract class Query<TResult> {
|
|
24
|
-
protected readonly __resultType?: TResult;
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/application/bus/QueryBus.d.ts
|
|
28
|
-
interface QueryBus {
|
|
29
|
-
execute<TResult>(query: Query<TResult>): Promise<TResult>;
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/application/contracts/userDirectoryContracts.types.d.ts
|
|
33
|
-
type UserAccountStatus = "invited" | "active" | "inactive";
|
|
34
|
-
type UserAccountDto = Readonly<{
|
|
35
|
-
id: string;
|
|
36
|
-
email: string;
|
|
37
|
-
status: UserAccountStatus;
|
|
38
|
-
inviteExpiresAt: string | null;
|
|
39
|
-
/** Ways the user can sign in (password + linked OAuth / OIDC / email-link accounts). */
|
|
40
|
-
loginMethods: ReadonlyArray<string>;
|
|
41
|
-
}>;
|
|
42
|
-
/** Result of CLI/bootstrap `upsert` for a local password user (distinct from invite-based onboarding). */
|
|
43
|
-
type UpsertLocalBootstrapUserResultDto = Readonly<{
|
|
44
|
-
outcome: "created" | "updated";
|
|
45
|
-
}>;
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/application/queries/ListUserAccountsQuery.d.ts
|
|
48
|
-
declare class ListUserAccountsQuery extends Query<ReadonlyArray<UserAccountDto>> {}
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region src/application/commands/UpsertLocalBootstrapUserCommand.d.ts
|
|
51
|
-
declare class UpsertLocalBootstrapUserCommand extends Command<UpsertLocalBootstrapUserResultDto> {
|
|
52
|
-
readonly email: string;
|
|
53
|
-
readonly password: string;
|
|
54
|
-
constructor(email: string, password: string);
|
|
55
|
-
}
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region src/application/dev/BootRuntimeSummary.types.d.ts
|
|
58
|
-
/** Resolved persistence + scheduler wiring captured at host prepare time (dev banner / diagnostics). */
|
|
59
|
-
type BootRuntimeSummary = Readonly<{
|
|
60
|
-
databasePersistence: ResolvedDatabasePersistence;
|
|
61
|
-
eventBusKind: CodemationEventBusKind;
|
|
62
|
-
queuePrefix: string;
|
|
63
|
-
schedulerKind: CodemationSchedulerKind;
|
|
64
|
-
redisUrl?: string;
|
|
65
|
-
}>;
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/domain/runs/WorkflowRunRepository.d.ts
|
|
68
|
-
interface WorkflowRunRepository {
|
|
69
|
-
load(runId: string): Promise<PersistedRunState | undefined>;
|
|
70
|
-
save(state: PersistedRunState): Promise<void>;
|
|
71
|
-
listRuns(args: Readonly<{
|
|
72
|
-
workflowId?: string;
|
|
73
|
-
limit?: number;
|
|
74
|
-
}>): Promise<ReadonlyArray<RunSummary>>;
|
|
75
|
-
deleteRun(runId: RunId): Promise<void>;
|
|
76
|
-
}
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/domain/workflows/WorkflowDebuggerOverlayState.d.ts
|
|
79
|
-
type WorkflowDebuggerOverlayState = Readonly<{
|
|
80
|
-
workflowId: string;
|
|
81
|
-
updatedAt: string;
|
|
82
|
-
copiedFromRunId?: string;
|
|
83
|
-
currentState: RunCurrentState;
|
|
84
|
-
}>;
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region src/domain/workflows/WorkflowDebuggerOverlayRepository.d.ts
|
|
87
|
-
interface WorkflowDebuggerOverlayRepository {
|
|
88
|
-
load(workflowId: string): Promise<WorkflowDebuggerOverlayState | undefined>;
|
|
89
|
-
save(state: WorkflowDebuggerOverlayState): Promise<void>;
|
|
90
|
-
}
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region src/domain/workflows/WorkflowDefinitionRepository.d.ts
|
|
93
|
-
interface WorkflowDefinitionRepository {
|
|
94
|
-
listDefinitions(): Promise<ReadonlyArray<WorkflowDefinition>>;
|
|
95
|
-
getDefinition(workflowId: string): Promise<WorkflowDefinition | undefined>;
|
|
96
|
-
resolveSnapshot(args: Readonly<{
|
|
97
|
-
workflowId: string;
|
|
98
|
-
workflowSnapshot?: unknown;
|
|
99
|
-
}>): Promise<WorkflowDefinition | undefined>;
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/application/bus/CommandHandler.d.ts
|
|
103
|
-
declare abstract class CommandHandler<TCommand extends Command<TResult>, TResult> {
|
|
104
|
-
abstract execute(command: TCommand): Promise<TResult>;
|
|
105
|
-
}
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region src/domain/workflows/WorkflowActivationRepository.d.ts
|
|
108
|
-
type WorkflowActivationRow = Readonly<{
|
|
109
|
-
workflowId: string;
|
|
110
|
-
isActive: boolean;
|
|
111
|
-
}>;
|
|
112
|
-
interface WorkflowActivationRepository {
|
|
113
|
-
loadAll(): Promise<ReadonlyArray<WorkflowActivationRow>>;
|
|
114
|
-
upsert(workflowId: string, active: boolean): Promise<void>;
|
|
115
|
-
}
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region src/application/bus/QueryHandler.d.ts
|
|
118
|
-
declare abstract class QueryHandler<TQuery extends Query<TResult>, TResult> {
|
|
119
|
-
abstract execute(query: TQuery): Promise<TResult>;
|
|
120
|
-
}
|
|
121
|
-
//#endregion
|
|
122
|
-
//#region src/application/binary/RunBinaryAttachmentLookupService.d.ts
|
|
123
|
-
declare class RunBinaryAttachmentLookupService {
|
|
124
|
-
private readonly workflowRunRepository;
|
|
125
|
-
private readonly workflowDebuggerOverlayRepository;
|
|
126
|
-
constructor(workflowRunRepository: WorkflowRunRepository, workflowDebuggerOverlayRepository: WorkflowDebuggerOverlayRepository);
|
|
127
|
-
findForRun(runId: string, binaryId: string): Promise<BinaryAttachment | undefined>;
|
|
128
|
-
findForWorkflowOverlay(workflowId: string, binaryId: string): Promise<BinaryAttachment | undefined>;
|
|
129
|
-
private findInRunState;
|
|
130
|
-
private findInCurrentState;
|
|
131
|
-
private findInOutputsByNode;
|
|
132
|
-
private findInNodeSnapshots;
|
|
133
|
-
private findInCurrentStateSnapshots;
|
|
134
|
-
private findInMutableState;
|
|
135
|
-
private findInPortItemMap;
|
|
136
|
-
private findInItems;
|
|
137
|
-
}
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region src/presentation/http/ServerHttpRouteParams.d.ts
|
|
140
|
-
type ServerHttpRouteParams = Readonly<Record<string, string>>;
|
|
141
|
-
//#endregion
|
|
142
|
-
//#region src/presentation/http/routeHandlers/BinaryHttpRouteHandlerFactory.d.ts
|
|
143
|
-
declare class BinaryHttpRouteHandler {
|
|
144
|
-
private readonly queryBus;
|
|
145
|
-
private readonly commandBus;
|
|
146
|
-
private readonly binaryStorage;
|
|
147
|
-
constructor(queryBus: QueryBus, commandBus: CommandBus, binaryStorage: BinaryStorage);
|
|
148
|
-
getRunBinaryContent(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
149
|
-
getWorkflowOverlayBinaryContent(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
150
|
-
postWorkflowDebuggerOverlayBinaryUpload(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
151
|
-
private createBinaryResponse;
|
|
152
|
-
private createContentDisposition;
|
|
153
|
-
private escapeFilename;
|
|
154
|
-
}
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region src/presentation/http/hono/HonoApiRouteRegistrar.d.ts
|
|
157
|
-
interface HonoApiRouteRegistrar {
|
|
158
|
-
register(app: Hono): void;
|
|
159
|
-
}
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region src/presentation/http/routeHandlers/CredentialHttpRouteHandler.d.ts
|
|
162
|
-
declare class CredentialHttpRouteHandler {
|
|
163
|
-
private readonly queryBus;
|
|
164
|
-
private readonly commandBus;
|
|
165
|
-
constructor(queryBus: QueryBus, commandBus: CommandBus);
|
|
166
|
-
getCredentialTypes(): Promise<Response>;
|
|
167
|
-
getCredentialFieldEnvStatus(): Promise<Response>;
|
|
168
|
-
getCredentialInstances(): Promise<Response>;
|
|
169
|
-
getCredentialInstance(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
170
|
-
postCredentialInstance(request: Request): Promise<Response>;
|
|
171
|
-
putCredentialInstance(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
172
|
-
deleteCredentialInstance(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
173
|
-
putCredentialBinding(request: Request): Promise<Response>;
|
|
174
|
-
postCredentialInstanceTest(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
175
|
-
getWorkflowCredentialHealth(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
176
|
-
}
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region src/infrastructure/logging/LogLevelPolicyFactory.d.ts
|
|
179
|
-
/**
|
|
180
|
-
* Process-wide {@link LogLevelPolicy} singleton for server and browser loggers.
|
|
181
|
-
* Plain class (no `@injectable` from `@codemation/core`): client components import this file; decorating would pull core into the browser bundle.
|
|
182
|
-
*/
|
|
183
|
-
declare class LogLevelPolicyFactory {
|
|
184
|
-
private readonly policy;
|
|
185
|
-
create(): LogLevelPolicy;
|
|
186
|
-
}
|
|
187
|
-
/** Shared factory for call sites outside the DI container (e.g. next-host bootstrap). */
|
|
188
|
-
declare const logLevelPolicyFactory: LogLevelPolicyFactory;
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region src/application/dev/DevBootstrapSummaryJson.types.d.ts
|
|
191
|
-
type DevBootstrapSummaryJson = Readonly<{
|
|
192
|
-
logLevel: string;
|
|
193
|
-
codemationLogLevelEnv?: string;
|
|
194
|
-
databaseLabel: string;
|
|
195
|
-
schedulerLabel: string;
|
|
196
|
-
eventBusLabel: string;
|
|
197
|
-
redisUrlRedacted?: string;
|
|
198
|
-
activeWorkflows: ReadonlyArray<Readonly<{
|
|
199
|
-
id: string;
|
|
200
|
-
name: string;
|
|
201
|
-
}>>;
|
|
202
|
-
}>;
|
|
203
|
-
//#endregion
|
|
204
|
-
//#region src/domain/credentials/OAuth2ProviderRegistry.d.ts
|
|
205
|
-
type JsonRecord = Readonly<Record<string, unknown>>;
|
|
206
|
-
type OAuth2ResolvedProvider = Readonly<{
|
|
207
|
-
providerId: string;
|
|
208
|
-
authorizeUrl: string;
|
|
209
|
-
tokenUrl: string;
|
|
210
|
-
userInfoUrl?: string;
|
|
211
|
-
}>;
|
|
212
|
-
declare class OAuth2ProviderRegistry {
|
|
213
|
-
private static readonly googleProvider;
|
|
214
|
-
resolve(definition: CredentialTypeDefinition, publicConfig: JsonRecord): OAuth2ResolvedProvider;
|
|
215
|
-
resolveClientId(auth: CredentialOAuth2AuthDefinition, publicConfig: JsonRecord): string;
|
|
216
|
-
resolveClientSecretFieldKey(auth: CredentialOAuth2AuthDefinition): string;
|
|
217
|
-
private resolveBuiltInProvider;
|
|
218
|
-
private resolvePublicConfigProvider;
|
|
219
|
-
}
|
|
220
|
-
//#endregion
|
|
221
|
-
//#region src/domain/credentials/OAuth2ConnectServiceFactory.d.ts
|
|
222
|
-
type OAuth2AuthRedirectResult = Readonly<{
|
|
223
|
-
instanceId: string;
|
|
224
|
-
redirectUri: string;
|
|
225
|
-
redirectUrl: string;
|
|
226
|
-
}>;
|
|
227
|
-
type OAuth2CallbackResult = Readonly<{
|
|
228
|
-
instanceId: string;
|
|
229
|
-
connectedEmail?: string;
|
|
230
|
-
}>;
|
|
231
|
-
declare class OAuth2ConnectService {
|
|
232
|
-
private readonly credentialStore;
|
|
233
|
-
private readonly credentialInstanceService;
|
|
234
|
-
private readonly credentialTypeRegistry;
|
|
235
|
-
private readonly credentialRuntimeMaterialService;
|
|
236
|
-
private readonly credentialFieldEnvOverlayService;
|
|
237
|
-
private readonly credentialMaterialResolver;
|
|
238
|
-
private readonly credentialSecretCipher;
|
|
239
|
-
private readonly oauth2ProviderRegistry;
|
|
240
|
-
private readonly appConfig;
|
|
241
|
-
private static readonly stateTtlMs;
|
|
242
|
-
constructor(credentialStore: CredentialStore, credentialInstanceService: CredentialInstanceService, credentialTypeRegistry: CredentialTypeRegistryImpl, credentialRuntimeMaterialService: CredentialRuntimeMaterialService, credentialFieldEnvOverlayService: CredentialFieldEnvOverlayService, credentialMaterialResolver: CredentialMaterialResolver, credentialSecretCipher: CredentialSecretCipher, oauth2ProviderRegistry: OAuth2ProviderRegistry, appConfig: AppConfig);
|
|
243
|
-
createAuthRedirect(instanceId: string, requestOrigin: string): Promise<OAuth2AuthRedirectResult>;
|
|
244
|
-
handleCallback(args: Readonly<{
|
|
245
|
-
code?: string | null;
|
|
246
|
-
state?: string | null;
|
|
247
|
-
requestOrigin: string;
|
|
248
|
-
}>): Promise<OAuth2CallbackResult>;
|
|
249
|
-
getRedirectUri(requestOrigin: string): string;
|
|
250
|
-
/**
|
|
251
|
-
* `new URL(path, base)` requires `base` to be an absolute URL with a scheme.
|
|
252
|
-
* Misconfigured CODEMATION_PUBLIC_BASE_URL (e.g. `localhost:3000` without http://) or odd
|
|
253
|
-
* forwarded headers otherwise throw TypeError: Invalid URL.
|
|
254
|
-
*
|
|
255
|
-
* Comma-separated values (proxy chains or copy-paste mistakes like `http,http`) use the
|
|
256
|
-
* first segment only; obviously invalid hostnames are rejected.
|
|
257
|
-
*/
|
|
258
|
-
private ensureAbsoluteUrlForOAuth2Base;
|
|
259
|
-
private requireOAuth2Type;
|
|
260
|
-
private exchangeAuthorizationCode;
|
|
261
|
-
private mergeTokenMaterial;
|
|
262
|
-
private resolveExpiry;
|
|
263
|
-
private resolveGrantedScopes;
|
|
264
|
-
private resolveConnectedEmail;
|
|
265
|
-
private findEmail;
|
|
266
|
-
private parseJsonRecord;
|
|
267
|
-
private createTokenExchangeErrorMessage;
|
|
268
|
-
private createOpaqueValue;
|
|
269
|
-
private createPkceCodeChallenge;
|
|
270
|
-
private normalizeBaseUrl;
|
|
271
|
-
}
|
|
272
|
-
//#endregion
|
|
273
|
-
//#region src/presentation/http/routeHandlers/OAuth2HttpRouteHandlerFactory.d.ts
|
|
274
|
-
declare class OAuth2HttpRouteHandler {
|
|
275
|
-
private readonly oauth2ConnectService;
|
|
276
|
-
private readonly credentialInstanceService;
|
|
277
|
-
constructor(oauth2ConnectService: OAuth2ConnectService, credentialInstanceService: CredentialInstanceService);
|
|
278
|
-
getAuthRedirect(request: Request): Promise<Response>;
|
|
279
|
-
getCallback(request: Request): Promise<Response>;
|
|
280
|
-
getRedirectUri(request: Request): Promise<Response>;
|
|
281
|
-
postDisconnect(request: Request): Promise<Response>;
|
|
282
|
-
private resolveRequestOrigin;
|
|
283
|
-
/** Proxies may send comma-separated lists (chain); use the first host/proto only. */
|
|
284
|
-
private static firstCommaSeparatedValue;
|
|
285
|
-
/**
|
|
286
|
-
* Serialize popup payload for an inline script using `serialize-javascript`
|
|
287
|
-
* (Webpack / HTML plugin stack): escapes angle brackets, slashes, and Unicode line
|
|
288
|
-
* terminators so string values cannot break out of the script block.
|
|
289
|
-
*/
|
|
290
|
-
private createPopupHtml;
|
|
291
|
-
}
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region src/presentation/http/routeHandlers/RunHttpRouteHandler.d.ts
|
|
294
|
-
declare class RunHttpRouteHandler {
|
|
295
|
-
private readonly queryBus;
|
|
296
|
-
private readonly commandBus;
|
|
297
|
-
constructor(queryBus: QueryBus, commandBus: CommandBus);
|
|
298
|
-
getRun(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
299
|
-
postRuns(request: Request, _: ServerHttpRouteParams): Promise<Response>;
|
|
300
|
-
patchRunWorkflowSnapshot(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
301
|
-
patchRunNodePin(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
302
|
-
postRunNode(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
303
|
-
}
|
|
304
|
-
//#endregion
|
|
305
|
-
//#region src/infrastructure/webhooks/RequestToWebhookItemMapper.d.ts
|
|
306
|
-
declare class RequestToWebhookItemMapper {
|
|
307
|
-
private readonly binaryStorage;
|
|
308
|
-
private readonly runIdFactory;
|
|
309
|
-
private readonly activationIdFactory;
|
|
310
|
-
constructor(binaryStorage: BinaryStorage, runIdFactory: RunIdFactory, activationIdFactory: ActivationIdFactory);
|
|
311
|
-
map(request: Request, match: WebhookInvocationMatch): Promise<Item>;
|
|
312
|
-
private mapMultipart;
|
|
313
|
-
private parseJsonBody;
|
|
314
|
-
private isJsonRequest;
|
|
315
|
-
private resolveBody;
|
|
316
|
-
private toHeaders;
|
|
317
|
-
private toQuery;
|
|
318
|
-
}
|
|
319
|
-
//#endregion
|
|
320
|
-
//#region src/presentation/http/routeHandlers/WebhookHttpRouteHandler.d.ts
|
|
321
|
-
declare class WebhookHttpRouteHandler {
|
|
322
|
-
private readonly commandBus;
|
|
323
|
-
private readonly runIntentService;
|
|
324
|
-
private readonly requestToWebhookItemMapper;
|
|
325
|
-
constructor(commandBus: CommandBus, runIntentService: RunIntentService, requestToWebhookItemMapper: RequestToWebhookItemMapper);
|
|
326
|
-
postWebhook(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
327
|
-
}
|
|
328
|
-
//#endregion
|
|
329
|
-
//#region src/application/mapping/DataMapper.d.ts
|
|
330
|
-
interface DataMapper<TSource, TTarget> {
|
|
331
|
-
map(source: TSource): Promise<TTarget>;
|
|
332
|
-
}
|
|
333
|
-
//#endregion
|
|
334
|
-
//#region src/application/mapping/WorkflowPolicyUiPresentationFactory.d.ts
|
|
335
|
-
/** UI-facing policy labels derived from workflow/node definitions (live or hydrated snapshot). */
|
|
336
|
-
declare class WorkflowPolicyUiPresentationFactory {
|
|
337
|
-
workflowHasErrorHandler(workflow: WorkflowDefinition): boolean;
|
|
338
|
-
nodeRetrySummary(config: NodeDefinition["config"]): string | undefined;
|
|
339
|
-
nodeHasErrorHandler(config: NodeDefinition["config"]): boolean;
|
|
340
|
-
snapshotNodeRetrySummary(config: unknown): string | undefined;
|
|
341
|
-
snapshotNodeHasErrorHandler(config: unknown): boolean;
|
|
342
|
-
private asRecord;
|
|
343
|
-
}
|
|
344
|
-
//#endregion
|
|
345
|
-
//#region src/application/mapping/WorkflowDefinitionMapper.d.ts
|
|
346
|
-
declare class WorkflowDefinitionMapper implements DataMapper<WorkflowDefinition, WorkflowDto> {
|
|
347
|
-
private readonly policyUi;
|
|
348
|
-
private readonly workflowActivationPolicy;
|
|
349
|
-
constructor(policyUi: WorkflowPolicyUiPresentationFactory, workflowActivationPolicy: WorkflowActivationPolicy);
|
|
350
|
-
map(workflow: WorkflowDefinition): Promise<WorkflowDto>;
|
|
351
|
-
mapSync(workflow: WorkflowDefinition): WorkflowDto;
|
|
352
|
-
toSummary(workflow: WorkflowDefinition): WorkflowSummary;
|
|
353
|
-
private buildConnectionChildMeta;
|
|
354
|
-
private agentHasConnectionMetadata;
|
|
355
|
-
private toNodes;
|
|
356
|
-
private toEdges;
|
|
357
|
-
private createLanguageModelNode;
|
|
358
|
-
private createToolNode;
|
|
359
|
-
private nodeTypeName;
|
|
360
|
-
}
|
|
361
|
-
//#endregion
|
|
362
|
-
//#region src/presentation/http/routeHandlers/WorkflowHttpRouteHandler.d.ts
|
|
363
|
-
declare class WorkflowHttpRouteHandler {
|
|
364
|
-
private readonly queryBus;
|
|
365
|
-
private readonly commandBus;
|
|
366
|
-
private readonly workflowDefinitionMapper;
|
|
367
|
-
constructor(queryBus: QueryBus, commandBus: CommandBus, workflowDefinitionMapper: WorkflowDefinitionMapper);
|
|
368
|
-
getWorkflows(_: Request, __: ServerHttpRouteParams): Promise<Response>;
|
|
369
|
-
getWorkflow(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
370
|
-
patchWorkflowActivation(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
371
|
-
getWorkflowRuns(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
372
|
-
getWorkflowDebuggerOverlay(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
373
|
-
putWorkflowDebuggerOverlay(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
374
|
-
postCopyWorkflowDebuggerOverlay(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
375
|
-
}
|
|
376
|
-
//#endregion
|
|
377
|
-
//#region src/infrastructure/config/CodemationPluginRegistrar.d.ts
|
|
378
|
-
declare class CodemationPluginRegistrar {
|
|
379
|
-
apply(args: Readonly<{
|
|
380
|
-
plugins: ReadonlyArray<CodemationPlugin>;
|
|
381
|
-
container: Container;
|
|
382
|
-
appConfig: AppConfig;
|
|
383
|
-
registerCredentialType: (type: AnyCredentialType) => void;
|
|
384
|
-
loggerFactory: LoggerFactory;
|
|
385
|
-
}>): Promise<void>;
|
|
386
|
-
}
|
|
387
|
-
//#endregion
|
|
388
|
-
//#region src/bootstrap/CodemationContainerRegistration.d.ts
|
|
389
|
-
interface CodemationContainerRegistrationBase<TValue> {
|
|
390
|
-
readonly token: TypeToken<TValue>;
|
|
391
|
-
}
|
|
392
|
-
interface CodemationValueRegistration<TValue> extends CodemationContainerRegistrationBase<TValue> {
|
|
393
|
-
readonly useValue: TValue;
|
|
394
|
-
}
|
|
395
|
-
interface CodemationClassRegistration<TValue> extends CodemationContainerRegistrationBase<TValue> {
|
|
396
|
-
readonly useClass: CodemationClassToken<TValue>;
|
|
397
|
-
}
|
|
398
|
-
interface CodemationFactoryRegistration<TValue> extends CodemationContainerRegistrationBase<TValue> {
|
|
399
|
-
readonly useFactory: (container: Container) => TValue;
|
|
400
|
-
}
|
|
401
|
-
type CodemationContainerRegistration<TValue = unknown> = CodemationValueRegistration<TValue> | CodemationClassRegistration<TValue> | CodemationFactoryRegistration<TValue>;
|
|
402
|
-
//#endregion
|
|
403
|
-
//#region src/presentation/config/CodemationConfigNormalizer.d.ts
|
|
404
|
-
type NormalizedCodemationConfig = CodemationConfig & Readonly<{
|
|
405
|
-
containerRegistrations: ReadonlyArray<CodemationContainerRegistration<unknown>>;
|
|
406
|
-
}>;
|
|
407
|
-
declare class CodemationConfigNormalizer {
|
|
408
|
-
normalize(config: CodemationConfig): NormalizedCodemationConfig;
|
|
409
|
-
private collectRegistration;
|
|
410
|
-
private normalizeRuntimeConfig;
|
|
411
|
-
private normalizeDatabaseConfig;
|
|
412
|
-
private normalizeSchedulerConfig;
|
|
413
|
-
private normalizeEventBusConfig;
|
|
414
|
-
private mergeWorkflows;
|
|
415
|
-
}
|
|
416
|
-
//#endregion
|
|
417
|
-
//#region src/application/contracts/WorkflowWebsocketMessage.d.ts
|
|
418
|
-
type WorkflowWebsocketMessage = Readonly<{
|
|
419
|
-
kind: "event";
|
|
420
|
-
event: RunEvent;
|
|
421
|
-
}> | Readonly<{
|
|
422
|
-
kind: "workflowChanged";
|
|
423
|
-
workflowId: string;
|
|
424
|
-
}> | Readonly<{
|
|
425
|
-
kind: "devBuildStarted";
|
|
426
|
-
workflowId: string;
|
|
427
|
-
buildVersion?: string;
|
|
428
|
-
}> | Readonly<{
|
|
429
|
-
kind: "devBuildCompleted";
|
|
430
|
-
workflowId: string;
|
|
431
|
-
buildVersion: string;
|
|
432
|
-
}> | Readonly<{
|
|
433
|
-
kind: "devBuildFailed";
|
|
434
|
-
workflowId: string;
|
|
435
|
-
message: string;
|
|
436
|
-
}>;
|
|
437
|
-
//#endregion
|
|
438
|
-
//#region src/application/websocket/WorkflowWebsocketPublisher.d.ts
|
|
439
|
-
interface WorkflowWebsocketPublisher {
|
|
440
|
-
publishToRoom(roomId: string, message: WorkflowWebsocketMessage): Promise<void>;
|
|
441
|
-
}
|
|
442
|
-
//#endregion
|
|
443
|
-
//#region src/presentation/websocket/WorkflowWebsocketServer.d.ts
|
|
444
|
-
declare class WorkflowWebsocketServer implements WorkflowWebsocketPublisher {
|
|
445
|
-
private readonly port;
|
|
446
|
-
private readonly bindHost;
|
|
447
|
-
private readonly logger;
|
|
448
|
-
private websocketServer;
|
|
449
|
-
private readonly sockets;
|
|
450
|
-
private readonly roomIdsBySocket;
|
|
451
|
-
private started;
|
|
452
|
-
constructor(port: number, bindHost: string, logger: Logger);
|
|
453
|
-
start(): Promise<void>;
|
|
454
|
-
stop(): Promise<void>;
|
|
455
|
-
publishToRoom(roomId: string, message: WorkflowWebsocketMessage): Promise<void>;
|
|
456
|
-
private connect;
|
|
457
|
-
private handleMessage;
|
|
458
|
-
private awaitListening;
|
|
459
|
-
private closeAfterFailedStart;
|
|
460
|
-
private parseClientMessage;
|
|
461
|
-
}
|
|
462
|
-
//#endregion
|
|
463
|
-
//#region src/bootstrap/CodemationBootstrapRequest.d.ts
|
|
464
|
-
declare class CodemationBootstrapRequest {
|
|
465
|
-
readonly consumerRoot: string;
|
|
466
|
-
readonly repoRoot: string;
|
|
467
|
-
readonly workflowSources: ReadonlyArray<string>;
|
|
468
|
-
readonly env?: Readonly<NodeJS.ProcessEnv>;
|
|
469
|
-
constructor(args: Readonly<{
|
|
470
|
-
consumerRoot: string;
|
|
471
|
-
repoRoot: string;
|
|
472
|
-
workflowSources?: ReadonlyArray<string>;
|
|
473
|
-
env?: Readonly<NodeJS.ProcessEnv>;
|
|
474
|
-
}>);
|
|
475
|
-
resolveEnvironment(): NodeJS.ProcessEnv;
|
|
476
|
-
}
|
|
477
|
-
//#endregion
|
|
478
|
-
//#region src/bootstrap/CodemationFrontendBootstrapRequest.d.ts
|
|
479
|
-
declare class CodemationFrontendBootstrapRequest {
|
|
480
|
-
readonly bootstrap: CodemationBootstrapRequest;
|
|
481
|
-
readonly skipPresentationServers: boolean;
|
|
482
|
-
constructor(args: Readonly<{
|
|
483
|
-
bootstrap: CodemationBootstrapRequest;
|
|
484
|
-
skipPresentationServers?: boolean;
|
|
485
|
-
}>);
|
|
486
|
-
}
|
|
487
|
-
//#endregion
|
|
488
|
-
//#region src/infrastructure/runtime/WorkerRuntimeScheduler.d.ts
|
|
489
|
-
type WorkerRuntimeHandle = Readonly<{
|
|
490
|
-
stop: () => Promise<void>;
|
|
491
|
-
}>;
|
|
492
|
-
interface WorkerRuntimeScheduler extends NodeExecutionScheduler {
|
|
493
|
-
createWorker(args: Readonly<{
|
|
494
|
-
queues: ReadonlyArray<string>;
|
|
495
|
-
workflowsById: ReadonlyMap<WorkflowId, WorkflowDefinition>;
|
|
496
|
-
nodeResolver: NodeResolver;
|
|
497
|
-
credentialSessions: CredentialSessionService;
|
|
498
|
-
workflowExecutionRepository: WorkflowExecutionRepository;
|
|
499
|
-
continuation: NodeActivationContinuation;
|
|
500
|
-
binaryStorage?: BinaryStorage;
|
|
501
|
-
workflows?: unknown;
|
|
502
|
-
now?: () => Date;
|
|
503
|
-
/** When set, must match the host engine policy so worker execution contexts use the same limits as `runtime.engineExecutionLimits`. */
|
|
504
|
-
executionLimitsPolicy?: EngineExecutionLimitsPolicy;
|
|
505
|
-
}>): WorkerRuntimeHandle;
|
|
506
|
-
close(): Promise<void>;
|
|
507
|
-
}
|
|
508
|
-
//#endregion
|
|
509
|
-
//#region src/infrastructure/persistence/SchedulerPersistenceCompatibilityValidator.d.ts
|
|
510
|
-
/**
|
|
511
|
-
* Ensures scheduler and database selections are compatible (e.g. BullMQ requires shared TCP PostgreSQL).
|
|
512
|
-
*/
|
|
513
|
-
declare class SchedulerPersistenceCompatibilityValidator {
|
|
514
|
-
validate(args: Readonly<{
|
|
515
|
-
schedulerKind: CodemationSchedulerKind;
|
|
516
|
-
persistence: ResolvedDatabasePersistence;
|
|
517
|
-
}>): void;
|
|
518
|
-
}
|
|
519
|
-
//#endregion
|
|
520
|
-
//#region src/bootstrap/runtime/ResolvedImplementationSelectionFactory.d.ts
|
|
521
|
-
type ResolvedImplementationSelection = Readonly<{
|
|
522
|
-
databasePersistence: ResolvedDatabasePersistence;
|
|
523
|
-
eventBusKind: CodemationEventBusKind;
|
|
524
|
-
queuePrefix: string;
|
|
525
|
-
redisUrl?: string;
|
|
526
|
-
schedulerKind: CodemationSchedulerKind;
|
|
527
|
-
workerRuntimeScheduler?: WorkerRuntimeScheduler;
|
|
528
|
-
}>;
|
|
529
|
-
declare class ResolvedImplementationSelectionFactory {
|
|
530
|
-
private readonly databasePersistenceResolver;
|
|
531
|
-
private readonly schedulerPersistenceCompatibilityValidator;
|
|
532
|
-
constructor(databasePersistenceResolver?: DatabasePersistenceResolver, schedulerPersistenceCompatibilityValidator?: SchedulerPersistenceCompatibilityValidator);
|
|
533
|
-
resolve(args: Readonly<{
|
|
534
|
-
consumerRoot: string;
|
|
535
|
-
runtimeConfig: CodemationApplicationRuntimeConfig;
|
|
536
|
-
env: Readonly<NodeJS.ProcessEnv>;
|
|
537
|
-
}>): ResolvedImplementationSelection;
|
|
538
|
-
private resolveSchedulerKind;
|
|
539
|
-
private resolveEventBusKind;
|
|
540
|
-
private readSchedulerKind;
|
|
541
|
-
private readEventBusKind;
|
|
542
|
-
private requireRedisUrl;
|
|
543
|
-
}
|
|
544
|
-
//#endregion
|
|
545
|
-
//#region src/bootstrap/PreparedCodemationRuntime.d.ts
|
|
546
|
-
declare class PreparedCodemationRuntime {
|
|
547
|
-
readonly container: Container;
|
|
548
|
-
readonly runtimeSummary: BootRuntimeSummary;
|
|
549
|
-
readonly implementationSelection: ResolvedImplementationSelection;
|
|
550
|
-
readonly usesProvidedPrismaClientOverride: boolean;
|
|
551
|
-
private readonly ownedPrismaClient;
|
|
552
|
-
private readonly ownedPglite;
|
|
553
|
-
constructor(container: Container, runtimeSummary: BootRuntimeSummary, implementationSelection: ResolvedImplementationSelection, usesProvidedPrismaClientOverride: boolean, ownedPrismaClient: PrismaClient | null, ownedPglite: PGlite | null);
|
|
554
|
-
stop(args?: Readonly<{
|
|
555
|
-
stopWebsocketServer?: boolean;
|
|
556
|
-
}>): Promise<void>;
|
|
557
|
-
}
|
|
558
|
-
//#endregion
|
|
559
|
-
//#region src/bootstrap/runtime/AppConfigFactory.d.ts
|
|
560
|
-
declare class AppConfigFactory {
|
|
561
|
-
private readonly implementationSelectionFactory;
|
|
562
|
-
constructor(implementationSelectionFactory?: ResolvedImplementationSelectionFactory);
|
|
563
|
-
create(args: Readonly<{
|
|
564
|
-
repoRoot: string;
|
|
565
|
-
consumerRoot: string;
|
|
566
|
-
env: NodeJS.ProcessEnv;
|
|
567
|
-
workflowSources: ReadonlyArray<string>;
|
|
568
|
-
runtimeConfig: CodemationApplicationRuntimeConfig;
|
|
569
|
-
authConfig: CodemationAuthConfig | undefined;
|
|
570
|
-
whitelabelConfig: CodemationWhitelabelConfig;
|
|
571
|
-
}>): AppConfig;
|
|
572
|
-
}
|
|
573
|
-
//#endregion
|
|
574
|
-
//#region src/bootstrap/PreparedCodemationRuntimeFactory.d.ts
|
|
575
|
-
declare class PreparedCodemationRuntimeFactory {
|
|
576
|
-
private readonly implementationSelectionFactory;
|
|
577
|
-
private readonly appConfigFactory;
|
|
578
|
-
constructor(implementationSelectionFactory?: ResolvedImplementationSelectionFactory, appConfigFactory?: AppConfigFactory);
|
|
579
|
-
prepare(args: Readonly<{
|
|
580
|
-
container: Container;
|
|
581
|
-
repoRoot: string;
|
|
582
|
-
consumerRoot: string;
|
|
583
|
-
env: NodeJS.ProcessEnv;
|
|
584
|
-
workflowSources: ReadonlyArray<string>;
|
|
585
|
-
runtimeConfig: CodemationApplicationRuntimeConfig;
|
|
586
|
-
applicationAuthConfig: CodemationAuthConfig | undefined;
|
|
587
|
-
whitelabelConfig: CodemationWhitelabelConfig;
|
|
588
|
-
hasConfiguredCredentialSessionServiceRegistration: boolean;
|
|
589
|
-
}>): Promise<PreparedCodemationRuntime>;
|
|
590
|
-
private createRuntimeSummary;
|
|
591
|
-
private createRunEventBus;
|
|
592
|
-
private createRunPersistence;
|
|
593
|
-
private hasProvidedPrismaClientOverride;
|
|
594
|
-
private resolveInjectedOrOwnedPrismaClient;
|
|
595
|
-
private registerRuntimeNodeActivationScheduler;
|
|
596
|
-
private createBinaryStorage;
|
|
597
|
-
private requireRedisUrl;
|
|
598
|
-
private resolveWebSocketPort;
|
|
599
|
-
}
|
|
600
|
-
//#endregion
|
|
601
|
-
//#region src/bootstrap/CodemationContainerRegistrationRegistrar.d.ts
|
|
602
|
-
declare class CodemationContainerRegistrationRegistrar {
|
|
603
|
-
apply(container: Container, registrations: ReadonlyArray<CodemationContainerRegistration<unknown>>): void;
|
|
604
|
-
private applyRegistration;
|
|
605
|
-
private isValueRegistration;
|
|
606
|
-
private isClassRegistration;
|
|
607
|
-
}
|
|
608
|
-
//#endregion
|
|
609
|
-
//#region src/bootstrap/CodemationContainerFactory.d.ts
|
|
610
|
-
type CodemationContainerState = Readonly<{
|
|
611
|
-
application: CodemationApplication;
|
|
612
|
-
registrations: ReadonlyArray<CodemationContainerRegistration<unknown>>;
|
|
613
|
-
runtimeConfig: CodemationApplicationRuntimeConfig;
|
|
614
|
-
workflows: ReadonlyArray<WorkflowDefinition>;
|
|
615
|
-
credentialTypes: ReadonlyArray<CredentialType<any, any, unknown>>;
|
|
616
|
-
sharedWorkflowWebsocketServer: WorkflowWebsocketServer | null;
|
|
617
|
-
}>;
|
|
618
|
-
declare class CodemationContainerFactory {
|
|
619
|
-
private readonly containerRegistrationRegistrar;
|
|
620
|
-
constructor(containerRegistrationRegistrar?: CodemationContainerRegistrationRegistrar);
|
|
621
|
-
create(state: CodemationContainerState): Container;
|
|
622
|
-
private registerCredentialTypes;
|
|
623
|
-
private registerConfiguredRegistrations;
|
|
624
|
-
private registerCoreInfrastructure;
|
|
625
|
-
private registerRepositoriesAndBuses;
|
|
626
|
-
private registerApplicationServicesAndRoutes;
|
|
627
|
-
private registerOperationalInfrastructure;
|
|
628
|
-
private synchronizeLiveWorkflowRepository;
|
|
629
|
-
}
|
|
630
|
-
//#endregion
|
|
631
|
-
//#region src/bootstrap/CodemationWorkerBootstrapRequest.d.ts
|
|
632
|
-
declare class CodemationWorkerBootstrapRequest {
|
|
633
|
-
readonly bootstrap: CodemationBootstrapRequest;
|
|
634
|
-
readonly queues: ReadonlyArray<string>;
|
|
635
|
-
readonly bootstrapSource?: string | null;
|
|
636
|
-
constructor(args: Readonly<{
|
|
637
|
-
bootstrap: CodemationBootstrapRequest;
|
|
638
|
-
queues: ReadonlyArray<string>;
|
|
639
|
-
bootstrapSource?: string | null;
|
|
640
|
-
}>);
|
|
641
|
-
}
|
|
642
|
-
//#endregion
|
|
643
|
-
//#region src/bootstrap/boot/CliRuntimeBootService.d.ts
|
|
644
|
-
declare class CliRuntimeBootService {
|
|
645
|
-
boot(args: Readonly<{
|
|
646
|
-
preparedRuntime: PreparedCodemationRuntime;
|
|
647
|
-
}>): Promise<void>;
|
|
648
|
-
private applyDatabaseMigrations;
|
|
649
|
-
}
|
|
650
|
-
//#endregion
|
|
651
|
-
//#region src/bootstrap/boot/FrontendRuntimeBootService.d.ts
|
|
652
|
-
declare class FrontendRuntimeBootService {
|
|
653
|
-
boot(args: Readonly<{
|
|
654
|
-
preparedRuntime: PreparedCodemationRuntime;
|
|
655
|
-
skipPresentationServers?: boolean;
|
|
656
|
-
}>): Promise<void>;
|
|
657
|
-
private applyDatabaseMigrations;
|
|
658
|
-
private hydrateWorkflowActivationPolicy;
|
|
659
|
-
private registerSessionVerification;
|
|
660
|
-
}
|
|
661
|
-
//#endregion
|
|
662
|
-
//#region src/bootstrap/boot/WorkerRuntimeBootService.d.ts
|
|
663
|
-
declare class WorkerRuntimeBootService {
|
|
664
|
-
boot(args: Readonly<{
|
|
665
|
-
preparedRuntime: PreparedCodemationRuntime;
|
|
666
|
-
queues: ReadonlyArray<string>;
|
|
667
|
-
}>): Promise<Readonly<{
|
|
668
|
-
stop: () => Promise<void>;
|
|
669
|
-
}>>;
|
|
670
|
-
private applyDatabaseMigrations;
|
|
671
|
-
}
|
|
672
|
-
//#endregion
|
|
673
|
-
//#region src/codemationApplication.d.ts
|
|
674
|
-
type StopHandle = Readonly<{
|
|
675
|
-
stop: () => Promise<void>;
|
|
676
|
-
}>;
|
|
677
|
-
type CodemationStopHandle = StopHandle;
|
|
678
|
-
type CodemationApplicationConfig = CodemationConfig;
|
|
679
|
-
declare class CodemationApplication {
|
|
680
|
-
private readonly pluginRegistrar;
|
|
681
|
-
private readonly containerFactory;
|
|
682
|
-
private readonly preparedRuntimeFactory;
|
|
683
|
-
private readonly configNormalizer;
|
|
684
|
-
private readonly appConfigFactory;
|
|
685
|
-
private readonly cliRuntimeBootService;
|
|
686
|
-
private readonly frontendRuntimeBootService;
|
|
687
|
-
private readonly workerRuntimeBootService;
|
|
688
|
-
private configuredContainer;
|
|
689
|
-
private preparedRuntime;
|
|
690
|
-
private workflows;
|
|
691
|
-
private runtimeConfig;
|
|
692
|
-
private containerRegistrations;
|
|
693
|
-
private hasConfiguredCredentialSessionServiceRegistration;
|
|
694
|
-
private plugins;
|
|
695
|
-
private sharedWorkflowWebsocketServer;
|
|
696
|
-
private applicationAuthConfig;
|
|
697
|
-
private whitelabelConfig;
|
|
698
|
-
private frameworkBuiltinCredentialTypesRegistered;
|
|
699
|
-
private credentialTypes;
|
|
700
|
-
constructor(pluginRegistrar?: CodemationPluginRegistrar, containerFactory?: CodemationContainerFactory, preparedRuntimeFactory?: PreparedCodemationRuntimeFactory, configNormalizer?: CodemationConfigNormalizer, appConfigFactory?: AppConfigFactory, cliRuntimeBootService?: CliRuntimeBootService, frontendRuntimeBootService?: FrontendRuntimeBootService, workerRuntimeBootService?: WorkerRuntimeBootService);
|
|
701
|
-
useConfig(config: CodemationApplicationConfig): this;
|
|
702
|
-
useWorkflows(workflows: ReadonlyArray<WorkflowDefinition>): this;
|
|
703
|
-
useRuntimeConfig(runtimeConfig: CodemationApplicationRuntimeConfig): this;
|
|
704
|
-
private useContainerRegistrations;
|
|
705
|
-
usePlugins(plugins: ReadonlyArray<CodemationPlugin>): this;
|
|
706
|
-
useSharedWorkflowWebsocketServer(workflowWebsocketServer: WorkflowWebsocketServer): this;
|
|
707
|
-
getRuntimeConfig(): CodemationApplicationRuntimeConfig;
|
|
708
|
-
getWorkflows(): ReadonlyArray<WorkflowDefinition>;
|
|
709
|
-
getContainer(): Container;
|
|
710
|
-
getBootRuntimeSummary(): BootRuntimeSummary | null;
|
|
711
|
-
registerCredentialType(type: CredentialType<any, any, unknown>): void;
|
|
712
|
-
applyPlugins(request: CodemationBootstrapRequest): Promise<void>;
|
|
713
|
-
prepareContainer(request: CodemationBootstrapRequest): Promise<PreparedCodemationRuntime>;
|
|
714
|
-
bootCli(request: CodemationBootstrapRequest): Promise<PreparedCodemationRuntime>;
|
|
715
|
-
bootFrontend(request: CodemationFrontendBootstrapRequest): Promise<PreparedCodemationRuntime>;
|
|
716
|
-
bootWorker(request: CodemationWorkerBootstrapRequest): Promise<CodemationStopHandle>;
|
|
717
|
-
stop(args?: Readonly<{
|
|
718
|
-
stopWebsocketServer?: boolean;
|
|
719
|
-
}>): Promise<void>;
|
|
720
|
-
private ensureConfiguredContainer;
|
|
721
|
-
private invalidatePreparedState;
|
|
722
|
-
}
|
|
723
|
-
//#endregion
|
|
724
|
-
//#region src/application/auth/AuthenticatedPrincipal.d.ts
|
|
725
|
-
type AuthenticatedPrincipal = Readonly<{
|
|
726
|
-
id: string;
|
|
727
|
-
email: string | null;
|
|
728
|
-
name: string | null;
|
|
729
|
-
}>;
|
|
730
|
-
//#endregion
|
|
731
|
-
//#region src/application/auth/SessionVerifier.d.ts
|
|
732
|
-
interface SessionVerifier {
|
|
733
|
-
verify(request: Request): Promise<AuthenticatedPrincipal | null>;
|
|
734
|
-
}
|
|
735
|
-
//#endregion
|
|
736
|
-
//#region src/application/bus/DomainEvent.d.ts
|
|
737
|
-
declare abstract class DomainEvent {}
|
|
738
|
-
//#endregion
|
|
739
|
-
//#region src/application/bus/DomainEventBus.d.ts
|
|
740
|
-
interface DomainEventBus {
|
|
741
|
-
publish(event: DomainEvent): Promise<void>;
|
|
742
|
-
}
|
|
743
|
-
//#endregion
|
|
744
|
-
//#region src/application/bus/DomainEventHandler.d.ts
|
|
745
|
-
declare abstract class DomainEventHandler<TEvent extends DomainEvent> {
|
|
746
|
-
abstract handle(event: TEvent): Promise<void>;
|
|
747
|
-
}
|
|
748
|
-
//#endregion
|
|
749
|
-
//#region src/applicationTokens.d.ts
|
|
750
|
-
declare const ApplicationTokens: {
|
|
751
|
-
readonly CodemationAuthConfig: TypeToken<CodemationAuthConfig | undefined>;
|
|
752
|
-
readonly CodemationWhitelabelConfig: TypeToken<CodemationWhitelabelConfig>;
|
|
753
|
-
readonly AppConfig: TypeToken<AppConfig>;
|
|
754
|
-
readonly WebSocketPort: TypeToken<number>;
|
|
755
|
-
readonly WebSocketBindHost: TypeToken<string>;
|
|
756
|
-
readonly QueryBus: TypeToken<QueryBus>;
|
|
757
|
-
readonly CommandBus: TypeToken<CommandBus>;
|
|
758
|
-
readonly DomainEventBus: TypeToken<DomainEventBus>;
|
|
759
|
-
readonly QueryHandler: TypeToken<QueryHandler<Query<unknown>, unknown>>;
|
|
760
|
-
readonly CommandHandler: TypeToken<CommandHandler<Command<unknown>, unknown>>;
|
|
761
|
-
readonly DomainEventHandler: TypeToken<DomainEventHandler<DomainEvent>>;
|
|
762
|
-
readonly HonoApiRouteRegistrar: TypeToken<HonoApiRouteRegistrar>;
|
|
763
|
-
readonly WorkflowWebsocketPublisher: TypeToken<WorkflowWebsocketPublisher>;
|
|
764
|
-
readonly WorkerRuntimeScheduler: TypeToken<WorkerRuntimeScheduler>;
|
|
765
|
-
readonly WorkflowDefinitionRepository: TypeToken<WorkflowDefinitionRepository>;
|
|
766
|
-
readonly WorkflowActivationRepository: TypeToken<WorkflowActivationRepository>;
|
|
767
|
-
readonly WorkflowDebuggerOverlayRepository: TypeToken<WorkflowDebuggerOverlayRepository>;
|
|
768
|
-
readonly WorkflowRunRepository: TypeToken<WorkflowRunRepository>;
|
|
769
|
-
readonly LoggerFactory: TypeToken<LoggerFactory>;
|
|
770
|
-
/**
|
|
771
|
-
* Opt-in timing/diagnostics logger (`CODEMATION_PERFORMANCE_LOGGING` + normal minimum log level).
|
|
772
|
-
*/
|
|
773
|
-
readonly PerformanceDiagnosticsLogger: TypeToken<Logger>;
|
|
774
|
-
readonly CredentialStore: TypeToken<CredentialStore>;
|
|
775
|
-
readonly PrismaClient: TypeToken<PrismaClient>;
|
|
776
|
-
readonly SessionVerifier: TypeToken<SessionVerifier>;
|
|
777
|
-
readonly Clock: TypeToken<Clock>;
|
|
778
|
-
};
|
|
779
|
-
//#endregion
|
|
780
|
-
//#region src/presentation/config/CodemationPluginListMerger.d.ts
|
|
781
|
-
/**
|
|
782
|
-
* Merges explicitly configured plugins with auto-discovered plugins.
|
|
783
|
-
* Configured plugins are applied first; discovered plugins fill in gaps.
|
|
784
|
-
* Plugins that declare `pluginPackageId` are deduped by that string so the same npm package is not
|
|
785
|
-
* registered twice when the consumer config lists a plugin and discovery also finds it, or when two
|
|
786
|
-
* module evaluations produce different `constructor` identities for the same logical plugin.
|
|
787
|
-
*/
|
|
788
|
-
declare class CodemationPluginListMerger {
|
|
789
|
-
merge(configuredPlugins: ReadonlyArray<CodemationPlugin>, discoveredPlugins: ReadonlyArray<CodemationPlugin>): ReadonlyArray<CodemationPlugin>;
|
|
790
|
-
}
|
|
791
|
-
//#endregion
|
|
792
|
-
export { CommandBus as A, BinaryHttpRouteHandler as C, ListUserAccountsQuery as D, UpsertLocalBootstrapUserCommand as E, UpsertLocalBootstrapUserResultDto as O, HonoApiRouteRegistrar as S, WorkflowRunRepository as T, OAuth2HttpRouteHandler as _, CodemationApplicationConfig as a, logLevelPolicyFactory as b, CodemationFrontendBootstrapRequest as c, WorkflowHttpRouteHandler as d, WorkflowDefinitionMapper as f, RunHttpRouteHandler as g, RequestToWebhookItemMapper as h, CodemationApplication as i, QueryBus as k, CodemationBootstrapRequest as l, WebhookHttpRouteHandler as m, ApplicationTokens as n, CodemationStopHandle as o, WorkflowPolicyUiPresentationFactory as p, SessionVerifier as r, CodemationWorkerBootstrapRequest as s, CodemationPluginListMerger as t, WorkflowWebsocketServer as u, DevBootstrapSummaryJson as v, RunBinaryAttachmentLookupService as w, CredentialHttpRouteHandler as x, LogLevelPolicyFactory as y };
|
|
793
|
-
//# sourceMappingURL=CodemationPluginListMerger-BRYqEk0y.d.ts.map
|