@codemation/host 0.7.0 → 0.8.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 +52 -0
- package/LICENSE +37 -1
- package/dist/{AppConfigFactory-DnLoQ9Li.d.ts → AppConfigFactory-BT0y0LVC.d.ts} +3 -3
- package/dist/{AppContainerFactory-DqKYCRNP.js → AppContainerFactory-DRTjG7nG.js} +13 -5
- package/dist/{AppContainerFactory-DqKYCRNP.js.map → AppContainerFactory-DRTjG7nG.js.map} +1 -1
- package/dist/{CodemationAppContext-CKVv9W9q.d.ts → CodemationAppContext-CGFYVcSb.d.ts} +7 -1
- package/dist/{CodemationAuthoring.types-NGkBcmmT.js → CodemationAuthoring.types-BteaR3Dc.js} +3 -2
- package/dist/CodemationAuthoring.types-BteaR3Dc.js.map +1 -0
- package/dist/{CodemationAuthoring.types-DA3G3s6d.d.ts → CodemationAuthoring.types-DiKKogum.d.ts} +7 -2
- package/dist/{CodemationConfigNormalizer-BAKjetJ6.d.ts → CodemationConfigNormalizer-48f-T66P.d.ts} +2 -2
- 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-_PIYqwVx.d.ts} +3 -2
- package/dist/{CodemationPluginListMerger-DKLAHT2b.d.ts → CodemationPluginListMerger-DP7djJ9S.d.ts} +50 -25
- package/dist/{CredentialServices-Be2I60Th.d.ts → CredentialServices-BLloBztI.d.ts} +2 -2
- package/dist/{InternalHonoApiRouteRegistrar-Ce1yxpnO.d.ts → InternalHonoApiRouteRegistrar-c7t3KnV_.d.ts} +1 -1
- package/dist/{PublicFrontendBootstrapFactory-CY2FS-5g.d.ts → PublicFrontendBootstrapFactory-Dv04tJ-6.d.ts} +2 -2
- package/dist/authoring.d.ts +2 -2
- package/dist/authoring.js +1 -1
- package/dist/consumer.d.ts +3 -3
- package/dist/consumer.js +1 -1
- package/dist/credentials.d.ts +2 -2
- package/dist/index.d.ts +44 -13
- package/dist/index.js +100 -7
- package/dist/index.js.map +1 -0
- package/dist/nextServer.d.ts +7 -33
- package/dist/nextServer.js +1 -1
- package/dist/pairing.d.ts +1 -1
- package/dist/{persistenceServer-CeTHtC6E.d.ts → persistenceServer-B71RGvSj.d.ts} +3 -3
- package/dist/persistenceServer.d.ts +4 -4
- package/dist/{server-C4bS62rg.d.ts → server-09PKasWR.d.ts} +5 -5
- package/dist/{server-Y7kxwtCK.js → server-vtRCPgRJ.js} +3 -3
- package/dist/{server-Y7kxwtCK.js.map → server-vtRCPgRJ.js.map} +1 -1
- package/dist/server.d.ts +7 -7
- package/dist/server.js +3 -3
- package/package.json +26 -24
- package/src/bootstrap/AppContainerFactory.ts +21 -3
- package/src/bootstrap/runtime/HeadlessApiRuntime.ts +47 -0
- package/src/credentials/ControlPlaneCatalogFetcher.ts +6 -6
- package/src/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/HeadlessHttpServerFactory.ts +56 -0
- package/src/presentation/server/CodemationConsumerConfigLoader.ts +7 -2
- package/src/presentation/websocket/WorkflowWebsocketServerFactory.ts +16 -0
- package/dist/CodemationAuthoring.types-NGkBcmmT.js.map +0 -1
- package/dist/CodemationConsumerConfigLoader-GYpBBvqE.js.map +0 -1
|
@@ -78,6 +78,12 @@ interface CodemationApplicationRuntimeConfig {
|
|
|
78
78
|
}
|
|
79
79
|
interface CodemationConfig {
|
|
80
80
|
readonly app?: CodemationAppDefinition;
|
|
81
|
+
/**
|
|
82
|
+
* Reserved compatibility-date field. Declares the Codemation framework version this workspace
|
|
83
|
+
* targets. Logged at INFO level on boot. No enforcement in 1.0.0.
|
|
84
|
+
* See backlog/codemation-version-compatibility-gate.md.
|
|
85
|
+
*/
|
|
86
|
+
readonly codemationVersion?: string;
|
|
81
87
|
readonly register?: (context: CodemationAppContext) => void;
|
|
82
88
|
readonly runtime?: CodemationApplicationRuntimeConfig;
|
|
83
89
|
readonly workflows?: ReadonlyArray<WorkflowDefinition>;
|
|
@@ -186,4 +192,4 @@ interface CodemationAppContext extends CodemationRegistrationContextBase {
|
|
|
186
192
|
}
|
|
187
193
|
//#endregion
|
|
188
194
|
export { CodemationContainerRegistration as C, CodemationWorkflowDiscovery as S, CodemationEngineExecutionLimitsConfig as _, AppPluginLoadSummary as a, CodemationSchedulerConfig as b, CodemationPluginContext as c, CodemationAppSchedulerConfig as d, CodemationAppSchedulerKind as f, CodemationDatabaseKind as g, CodemationDatabaseConfig as h, AppPersistenceConfig as i, CodemationPluginPackageMetadata as l, CodemationConfig as m, CodemationRegistrationContextBase as n, CodemationPlugin as o, CodemationApplicationRuntimeConfig as p, AppConfig as r, CodemationPluginConfig as s, CodemationAppContext as t, CodemationAppDefinition as u, CodemationEventBusConfig as v, CodemationClassToken as w, CodemationSchedulerKind as x, CodemationEventBusKind as y };
|
|
189
|
-
//# sourceMappingURL=CodemationAppContext-
|
|
195
|
+
//# sourceMappingURL=CodemationAppContext-CGFYVcSb.d.ts.map
|
package/dist/{CodemationAuthoring.types-NGkBcmmT.js → CodemationAuthoring.types-BteaR3Dc.js}
RENAMED
|
@@ -4,7 +4,7 @@ var CodemationAuthoringConfigFactory = class {
|
|
|
4
4
|
const appDefinition = this.createAppDefinition(options);
|
|
5
5
|
const credentialTypes = [...options.credentialTypes ?? [], ...options.credentials ?? []];
|
|
6
6
|
const register = this.composeAppRegister(options.register, options.nodes, options.collections);
|
|
7
|
-
const { workflows, plugins, runtime, log, mcpServers } = options;
|
|
7
|
+
const { workflows, plugins, runtime, log, mcpServers, codemationVersion } = options;
|
|
8
8
|
return {
|
|
9
9
|
workflows,
|
|
10
10
|
workflowDiscovery: this.mergeWorkflowDiscovery(options.workflowDiscovery, options.workflowsDir),
|
|
@@ -12,6 +12,7 @@ var CodemationAuthoringConfigFactory = class {
|
|
|
12
12
|
runtime,
|
|
13
13
|
log,
|
|
14
14
|
mcpServers,
|
|
15
|
+
codemationVersion,
|
|
15
16
|
app: appDefinition,
|
|
16
17
|
credentialTypes,
|
|
17
18
|
register
|
|
@@ -97,4 +98,4 @@ function definePlugin(options) {
|
|
|
97
98
|
|
|
98
99
|
//#endregion
|
|
99
100
|
export { definePlugin as n, defineCodemationApp as t };
|
|
100
|
-
//# sourceMappingURL=CodemationAuthoring.types-
|
|
101
|
+
//# sourceMappingURL=CodemationAuthoring.types-BteaR3Dc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodemationAuthoring.types-BteaR3Dc.js","names":[],"sources":["../src/presentation/config/CodemationAuthoring.types.ts"],"sourcesContent":["import type { AnyCredentialType, DefinedCollection, DefinedNode, McpServerDeclaration } from \"@codemation/core\";\nimport type { CodemationAppContext } from \"./CodemationAppContext\";\nimport type {\n CodemationAppDefinition,\n CodemationAppSchedulerConfig,\n CodemationConfig,\n CodemationDatabaseConfig,\n} from \"./CodemationConfig\";\nimport type { CodemationPlugin, CodemationPluginContext } from \"./CodemationPlugin\";\nimport type { CodemationWhitelabelConfig } from \"./CodemationWhitelabelConfig\";\n\nexport interface FriendlyCodemationDatabaseConfig {\n readonly kind: \"postgresql\" | \"sqlite\";\n readonly url?: string;\n /** Name of an environment variable whose value is the PostgreSQL connection URL. Co-exclusive with `url`. */\n readonly urlEnv?: string;\n readonly filePath?: string;\n}\n\nexport interface FriendlyCodemationExecutionConfig {\n readonly mode?: \"inline\" | \"queue\";\n /** Name of an environment variable whose value is \"inline\" or \"queue\". Co-exclusive with `mode`. */\n readonly modeEnv?: string;\n readonly queuePrefix?: string;\n readonly workerQueues?: ReadonlyArray<string>;\n readonly redisUrl?: string;\n /** Name of an environment variable whose value is the Redis connection URL. Co-exclusive with `redisUrl`. */\n readonly redisUrlEnv?: string;\n}\n\nexport interface DefineCodemationAppOptions extends Omit<\n CodemationConfig,\n \"app\" | \"credentialTypes\" | \"register\" | \"whitelabel\" | \"auth\" | \"collections\"\n> {\n readonly name?: string;\n /**\n * Reserved compatibility-date field. Declares the Codemation framework version this workspace\n * targets. No enforcement in 1.0.0 — presence only. See backlog/codemation-version-compatibility-gate.md.\n */\n readonly codemationVersion?: string;\n readonly auth?: CodemationConfig[\"auth\"];\n readonly database?: FriendlyCodemationDatabaseConfig;\n readonly execution?: FriendlyCodemationExecutionConfig;\n readonly nodes?: ReadonlyArray<DefinedNode<string, Record<string, unknown>, unknown, unknown>>;\n readonly collections?: ReadonlyArray<DefinedCollection>;\n readonly credentialTypes?: ReadonlyArray<AnyCredentialType>;\n readonly credentials?: ReadonlyArray<AnyCredentialType>;\n readonly register?: (context: CodemationAppContext) => void;\n readonly whitelabel?: CodemationWhitelabelConfig;\n /**\n * Path (relative to the consumer project root) to a directory from which workflows are auto-discovered.\n * All `*.ts` / `*.tsx` files (excluding `*.test.*` and `*.d.ts`) are imported and any exported\n * `WorkflowDefinition` values are registered. Co-exclusive with providing this directory in\n * `workflowDiscovery.directories`.\n */\n readonly workflowsDir?: string;\n}\n\nexport interface DefinePluginOptions {\n readonly name?: string;\n readonly pluginPackageId?: string;\n readonly nodes?: ReadonlyArray<DefinedNode<string, Record<string, unknown>, unknown, unknown>>;\n readonly collections?: ReadonlyArray<DefinedCollection>;\n readonly credentials?: ReadonlyArray<AnyCredentialType>;\n readonly mcpServers?: ReadonlyArray<McpServerDeclaration>;\n readonly register?: (context: CodemationPluginContext) => void | Promise<void>;\n readonly sandbox?: CodemationConfig;\n}\n\nclass CodemationAuthoringConfigFactory {\n static createApp(options: DefineCodemationAppOptions): CodemationConfig {\n const appDefinition = this.createAppDefinition(options);\n const credentialTypes = [...(options.credentialTypes ?? []), ...(options.credentials ?? [])];\n const register = this.composeAppRegister(options.register, options.nodes, options.collections);\n const { workflows, plugins, runtime, log, mcpServers, codemationVersion } = options;\n const workflowDiscovery = this.mergeWorkflowDiscovery(options.workflowDiscovery, options.workflowsDir);\n return {\n workflows,\n workflowDiscovery,\n plugins,\n runtime,\n log,\n mcpServers,\n codemationVersion,\n app: appDefinition,\n credentialTypes,\n register,\n };\n }\n\n static createPlugin(options: DefinePluginOptions): CodemationPlugin & Readonly<{ sandbox?: CodemationConfig }> {\n return {\n pluginPackageId: options.pluginPackageId,\n sandbox: options.sandbox,\n mcpServers: options.mcpServers,\n async register(context: CodemationPluginContext): Promise<void> {\n for (const nodeDefinition of options.nodes ?? []) {\n nodeDefinition.register(context);\n }\n for (const collection of options.collections ?? []) {\n collection.register(context);\n }\n for (const credential of options.credentials ?? []) {\n context.registerCredentialType(credential);\n }\n await options.register?.(context);\n },\n };\n }\n\n private static createAppDefinition(options: DefineCodemationAppOptions): CodemationAppDefinition | undefined {\n const scheduler = this.createSchedulerConfig(options.execution);\n const database = this.createDatabaseConfig(options.database);\n const whitelabel = this.createWhitelabel(options.name, options.whitelabel);\n if (!options.auth && !database && !scheduler && !whitelabel) {\n return undefined;\n }\n return {\n auth: options.auth,\n database,\n scheduler,\n whitelabel,\n };\n }\n\n private static createDatabaseConfig(\n database: FriendlyCodemationDatabaseConfig | undefined,\n ): CodemationDatabaseConfig | undefined {\n if (!database) {\n return undefined;\n }\n if (database.kind === \"sqlite\") {\n return {\n kind: \"sqlite\",\n sqliteFilePath: database.filePath,\n };\n }\n if (database.url !== undefined && database.urlEnv !== undefined) {\n throw new Error(\n \"defineCodemationApp: database.url and database.urlEnv are mutually exclusive — provide one or the other.\",\n );\n }\n const url = database.urlEnv !== undefined ? process.env[database.urlEnv] : database.url;\n return {\n kind: \"postgresql\",\n url,\n };\n }\n\n private static createSchedulerConfig(\n execution: FriendlyCodemationExecutionConfig | undefined,\n ): CodemationAppSchedulerConfig | undefined {\n if (!execution) {\n return undefined;\n }\n if (execution.mode !== undefined && execution.modeEnv !== undefined) {\n throw new Error(\n \"defineCodemationApp: execution.mode and execution.modeEnv are mutually exclusive — provide one or the other.\",\n );\n }\n if (execution.redisUrl !== undefined && execution.redisUrlEnv !== undefined) {\n throw new Error(\n \"defineCodemationApp: execution.redisUrl and execution.redisUrlEnv are mutually exclusive — provide one or the other.\",\n );\n }\n const rawMode = execution.modeEnv !== undefined ? process.env[execution.modeEnv] : execution.mode;\n const mode = rawMode === \"inline\" || rawMode === \"queue\" ? rawMode : undefined;\n const redisUrl = execution.redisUrlEnv !== undefined ? process.env[execution.redisUrlEnv] : execution.redisUrl;\n return {\n kind: mode,\n queuePrefix: execution.queuePrefix,\n workerQueues: execution.workerQueues,\n redisUrl,\n };\n }\n\n private static mergeWorkflowDiscovery(\n existing: CodemationConfig[\"workflowDiscovery\"],\n workflowsDir: string | undefined,\n ): CodemationConfig[\"workflowDiscovery\"] {\n if (!workflowsDir) {\n return existing;\n }\n const existingDirectories = existing?.directories ?? [];\n return {\n directories: [...existingDirectories, workflowsDir],\n };\n }\n\n private static createWhitelabel(\n name: string | undefined,\n whitelabel: CodemationWhitelabelConfig | undefined,\n ): CodemationWhitelabelConfig | undefined {\n if (!name && !whitelabel) {\n return undefined;\n }\n return {\n productName: name ?? whitelabel?.productName,\n logoPath: whitelabel?.logoPath,\n };\n }\n\n private static composeAppRegister(\n register: ((context: CodemationAppContext) => void) | undefined,\n nodes: ReadonlyArray<DefinedNode<string, Record<string, unknown>, unknown, unknown>> | undefined,\n collections: ReadonlyArray<DefinedCollection> | undefined,\n ): ((context: CodemationAppContext) => void) | undefined {\n if (!register && (!nodes || nodes.length === 0) && (!collections || collections.length === 0)) {\n return undefined;\n }\n return (context: CodemationAppContext) => {\n for (const nodeDefinition of nodes ?? []) {\n nodeDefinition.register(context);\n }\n for (const collection of collections ?? []) {\n collection.register(context);\n }\n register?.(context);\n };\n }\n}\n\nexport function defineCodemationApp(options: DefineCodemationAppOptions): CodemationConfig {\n return CodemationAuthoringConfigFactory.createApp(options);\n}\n\nexport function definePlugin(\n options: DefinePluginOptions,\n): CodemationPlugin & Readonly<{ sandbox?: CodemationConf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KzB,SAAgB,oBAAoB,SAAuD;AACzF,QAAO,iCAAiC,UAAU,QAAQ;;AAG5D,SAAgB,aACd,SAC6D;AAC7D,QAAO,iCAAiC,aAAa,QAAQ"}
|
package/dist/{CodemationAuthoring.types-DA3G3s6d.d.ts → CodemationAuthoring.types-DiKKogum.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as DefinedCollection, o as DefinedNode, s as DefinedNodeConfigInput } from "./index-DilAYwnH.js";
|
|
2
2
|
import { C as AnyRunnableNodeConfig, H as NodeInspectorSummaryRow, J as RunnableNodeConfig, L as Item, R as Items, S as ChainCursor, T as McpServerDeclaration, X as WorkflowDefinition, Y as RunnableNodeOutputJson, _t as CredentialJsonRecord, g as TypeToken, i as ToolConfig, l as NodeExecutionContext, n as AgentMessageConfig, r as ChatModelConfig, t as AgentGuardrailConfig, ut as AnyCredentialType } from "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
3
|
-
import { c as CodemationPluginContext, m as CodemationConfig, o as CodemationPlugin, t as CodemationAppContext } from "./CodemationAppContext-
|
|
3
|
+
import { c as CodemationPluginContext, m as CodemationConfig, o as CodemationPlugin, t as CodemationAppContext } from "./CodemationAppContext-CGFYVcSb.js";
|
|
4
4
|
import { t as CodemationWhitelabelConfig } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
5
5
|
import { ZodType, z } from "zod";
|
|
6
6
|
import "ai";
|
|
@@ -249,6 +249,11 @@ interface FriendlyCodemationExecutionConfig {
|
|
|
249
249
|
}
|
|
250
250
|
interface DefineCodemationAppOptions extends Omit<CodemationConfig, "app" | "credentialTypes" | "register" | "whitelabel" | "auth" | "collections"> {
|
|
251
251
|
readonly name?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Reserved compatibility-date field. Declares the Codemation framework version this workspace
|
|
254
|
+
* targets. No enforcement in 1.0.0 — presence only. See backlog/codemation-version-compatibility-gate.md.
|
|
255
|
+
*/
|
|
256
|
+
readonly codemationVersion?: string;
|
|
252
257
|
readonly auth?: CodemationConfig["auth"];
|
|
253
258
|
readonly database?: FriendlyCodemationDatabaseConfig;
|
|
254
259
|
readonly execution?: FriendlyCodemationExecutionConfig;
|
|
@@ -282,4 +287,4 @@ declare function definePlugin(options: DefinePluginOptions): CodemationPlugin &
|
|
|
282
287
|
}>;
|
|
283
288
|
//#endregion
|
|
284
289
|
export { defineCodemationApp as a, FriendlyCodemationExecutionConfig as i, DefinePluginOptions as n, definePlugin as o, FriendlyCodemationDatabaseConfig as r, workflow as s, DefineCodemationAppOptions as t };
|
|
285
|
-
//# sourceMappingURL=CodemationAuthoring.types-
|
|
290
|
+
//# sourceMappingURL=CodemationAuthoring.types-DiKKogum.d.ts.map
|
package/dist/{CodemationConfigNormalizer-BAKjetJ6.d.ts → CodemationConfigNormalizer-48f-T66P.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as CollectionDefinition } from "./index-DilAYwnH.js";
|
|
2
|
-
import { C as CodemationContainerRegistration, m as CodemationConfig } from "./CodemationAppContext-
|
|
2
|
+
import { C as CodemationContainerRegistration, m as CodemationConfig } from "./CodemationAppContext-CGFYVcSb.js";
|
|
3
3
|
|
|
4
4
|
//#region src/presentation/config/CodemationConfigNormalizer.d.ts
|
|
5
5
|
type NormalizedCodemationConfig = Omit<CodemationConfig, "collections"> & Readonly<{
|
|
@@ -8,4 +8,4 @@ type NormalizedCodemationConfig = Omit<CodemationConfig, "collections"> & Readon
|
|
|
8
8
|
}>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { NormalizedCodemationConfig as t };
|
|
11
|
-
//# sourceMappingURL=CodemationConfigNormalizer-
|
|
11
|
+
//# sourceMappingURL=CodemationConfigNormalizer-48f-T66P.d.ts.map
|
|
@@ -351,6 +351,7 @@ var CodemationConsumerConfigLoader = class CodemationConsumerConfigLoader {
|
|
|
351
351
|
discoveredWorkflowsEmptyMessageFactory = new DiscoveredWorkflowsEmptyMessageFactory();
|
|
352
352
|
pathSegmentsComputer = new WorkflowDiscoveryPathSegmentsComputer();
|
|
353
353
|
performanceDiagnosticsLogger = new ServerLoggerFactory(logLevelPolicyFactory).createPerformanceDiagnostics("codemation-config-loader.timing");
|
|
354
|
+
bootLogger = new ServerLoggerFactory(logLevelPolicyFactory).create("codemation.boot");
|
|
354
355
|
/**
|
|
355
356
|
* In-flight + completed load promises keyed by `${consumerRoot}|${configPathOverride}`. The
|
|
356
357
|
* boot path constructs MULTIPLE CodemationConsumerConfigLoader instances (one inside the CLI's
|
|
@@ -400,6 +401,7 @@ var CodemationConsumerConfigLoader = class CodemationConsumerConfigLoader {
|
|
|
400
401
|
const rawConfig = this.configExportsResolver.resolveConfig(moduleExports);
|
|
401
402
|
if (!rawConfig) throw new Error(`Config file does not export a Codemation config object: ${bootstrapSource}`);
|
|
402
403
|
const config = this.configNormalizer.normalize(rawConfig);
|
|
404
|
+
if (rawConfig.codemationVersion) this.bootLogger.info(`codemationVersion: ${rawConfig.codemationVersion}`);
|
|
403
405
|
const workflowSources = await BootTimer.measureAsync("config.resolveWorkflowSources", () => this.resolveWorkflowSources(args.consumerRoot, config));
|
|
404
406
|
phaseMs("resolveWorkflowSources");
|
|
405
407
|
const workflows = await BootTimer.measureAsync("config.loadDiscoveredWorkflows", async () => this.mergeWorkflows(config.workflows ?? [], await this.loadDiscoveredWorkflows(args.consumerRoot, config, workflowSources, importSession)));
|
|
@@ -574,4 +576,4 @@ var CodemationConsumerConfigLoader = class CodemationConsumerConfigLoader {
|
|
|
574
576
|
|
|
575
577
|
//#endregion
|
|
576
578
|
export { CodemationConfigNormalizer as a, CodemationConsumerAppResolver as i, WorkflowDiscoveryPathSegmentsComputer as n, WorkflowModulePathFinder as r, CodemationConsumerConfigLoader as t };
|
|
577
|
-
//# sourceMappingURL=CodemationConsumerConfigLoader-
|
|
579
|
+
//# sourceMappingURL=CodemationConsumerConfigLoader-By-6tuGc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodemationConsumerConfigLoader-By-6tuGc.js","names":["containerRegistrations: Array<CodemationContainerRegistration<unknown>>","credentialTypes: Array<AnyCredentialType>","collections: Array<CollectionDefinition>","workflows: Array<WorkflowDefinition>","workflowDirectories: Array<string>","workflows: WorkflowDefinition[]","workflowModulePaths: string[]","bestRoot: string | null","resolvedConfig: NormalizedCodemationConfig"],"sources":["../src/presentation/config/CodemationConfigNormalizer.ts","../src/presentation/server/CodemationConsumerConfigExportsResolver.ts","../src/presentation/server/DiscoveredWorkflowsEmptyMessageFactory.ts","../src/presentation/server/WorkflowDefinitionExportsResolver.ts","../src/presentation/server/CodemationConsumerAppResolver.ts","../src/presentation/server/WorkflowModulePathFinder.ts","../src/presentation/server/WorkflowDiscoveryPathSegmentsComputer.ts","../src/presentation/server/CodemationConsumerConfigLoader.ts"],"sourcesContent":["import type {\n AnyCredentialType,\n CollectionDefinition,\n Container,\n DefinedCollection,\n TypeToken,\n WorkflowDefinition,\n} from \"@codemation/core\";\nimport type { CodemationContainerRegistration } from \"../../bootstrap/CodemationContainerRegistration\";\nimport type { CodemationAppContext } from \"./CodemationAppContext\";\nimport type { CodemationAuthConfig } from \"./CodemationAuthConfig\";\nimport type { CodemationClassToken } from \"./CodemationClassToken\";\nimport type {\n CodemationApplicationRuntimeConfig,\n CodemationConfig,\n CodemationDatabaseConfig,\n CodemationEventBusConfig,\n CodemationSchedulerConfig,\n} from \"./CodemationConfig\";\n\nexport type NormalizedCodemationConfig = Omit<CodemationConfig, \"collections\"> &\n Readonly<{\n containerRegistrations: ReadonlyArray<CodemationContainerRegistration<unknown>>;\n collections: ReadonlyArray<CollectionDefinition>;\n }>;\n\nexport class CodemationConfigNormalizer {\n normalize(config: CodemationConfig): NormalizedCodemationConfig {\n const auth = config.app?.auth ?? config.auth;\n this.assertAuthConfig(auth);\n this.assertManagedModeConstraints(config, auth);\n const collected = this.collectRegistration(config);\n const normalizedRuntime = this.normalizeRuntimeConfig(config);\n const normalizedWorkflowDiscoveryDirectories = [\n ...(config.workflowDiscovery?.directories ?? []),\n ...collected.workflowDirectories,\n ];\n\n return {\n ...config,\n auth,\n containerRegistrations: collected.containerRegistrations,\n credentialTypes: [...(config.credentialTypes ?? []), ...collected.credentialTypes],\n collections: [...this.unwrapCollections(config.collections), ...collected.collections],\n log: config.app?.log ?? config.log,\n runtime: normalizedRuntime,\n whitelabel: config.app?.whitelabel ?? config.whitelabel,\n workflowDiscovery:\n normalizedWorkflowDiscoveryDirectories.length > 0\n ? { directories: normalizedWorkflowDiscoveryDirectories }\n : config.workflowDiscovery,\n workflows: this.mergeWorkflows(config.workflows ?? [], collected.workflows),\n };\n }\n\n /**\n * Enforces managed-mode invariants beyond what `assertAuthConfig` covers:\n * managed-mode workspaces are always Postgres and always require at least one workflow source.\n */\n private assertManagedModeConstraints(config: CodemationConfig, auth: CodemationAuthConfig | undefined): void {\n if (auth?.kind !== \"managed\") {\n return;\n }\n const hasWorkflows = (config.workflows?.length ?? 0) > 0;\n const hasWorkflowDiscovery = (config.workflowDiscovery?.directories?.length ?? 0) > 0;\n if (!hasWorkflows && !hasWorkflowDiscovery) {\n throw new Error(\n 'Managed-mode workspaces require at least one workflow source. Provide \"workflows\" or \"workflowsDir\" (which maps to workflowDiscovery.directories) in defineCodemationApp.',\n );\n }\n }\n\n private collectRegistration(config: CodemationConfig): Readonly<{\n containerRegistrations: ReadonlyArray<CodemationContainerRegistration<unknown>>;\n credentialTypes: ReadonlyArray<AnyCredentialType>;\n collections: ReadonlyArray<CollectionDefinition>;\n workflows: ReadonlyArray<WorkflowDefinition>;\n workflowDirectories: ReadonlyArray<string>;\n }> {\n if (!config.register) {\n return {\n containerRegistrations: [],\n credentialTypes: [],\n collections: [],\n workflows: [],\n workflowDirectories: [],\n };\n }\n\n const containerRegistrations: Array<CodemationContainerRegistration<unknown>> = [];\n const credentialTypes: Array<AnyCredentialType> = [];\n const collections: Array<CollectionDefinition> = [];\n const workflows: Array<WorkflowDefinition> = [];\n const workflowDirectories: Array<string> = [];\n\n const context: CodemationAppContext = {\n registerCredentialType(type) {\n credentialTypes.push(type);\n },\n registerCollection(definition) {\n collections.push(definition);\n },\n registerNode<TValue>(token: TypeToken<TValue>, implementation?: CodemationClassToken<TValue>) {\n containerRegistrations.push({\n token,\n useClass: implementation ?? (token as CodemationClassToken<TValue>),\n });\n },\n registerValue<TValue>(token: TypeToken<TValue>, value: TValue) {\n containerRegistrations.push({ token, useValue: value });\n },\n registerClass<TValue>(token: TypeToken<TValue>, implementation: CodemationClassToken<TValue>) {\n containerRegistrations.push({ token, useClass: implementation });\n },\n registerFactory<TValue>(token: TypeToken<TValue>, factory: (container: Container) => TValue) {\n containerRegistrations.push({ token, useFactory: factory });\n },\n registerWorkflow(workflow: WorkflowDefinition) {\n workflows.push(workflow);\n },\n registerWorkflows(nextWorkflows: ReadonlyArray<WorkflowDefinition>) {\n workflows.push(...nextWorkflows);\n },\n discoverWorkflows(...directories: ReadonlyArray<string>) {\n workflowDirectories.push(...directories);\n },\n };\n\n config.register(context);\n\n return {\n containerRegistrations,\n credentialTypes,\n collections,\n workflows,\n workflowDirectories,\n };\n }\n\n private unwrapCollections(\n entries: ReadonlyArray<CollectionDefinition | DefinedCollection> | undefined,\n ): ReadonlyArray<CollectionDefinition> {\n if (!entries) return [];\n return entries.map((entry) => (this.isDefinedCollection(entry) ? entry.definition : entry));\n }\n\n private isDefinedCollection(entry: CollectionDefinition | DefinedCollection): entry is DefinedCollection {\n return \"kind\" in entry && entry.kind === \"defined-collection\";\n }\n\n private normalizeRuntimeConfig(config: CodemationConfig): CodemationApplicationRuntimeConfig | undefined {\n if (!config.app) {\n return config.runtime;\n }\n const nextRuntime: CodemationApplicationRuntimeConfig = {\n ...(config.runtime ?? {}),\n frontendPort: config.app.frontendPort ?? config.runtime?.frontendPort,\n database: this.normalizeDatabaseConfig(config),\n eventBus: this.normalizeEventBusConfig(config),\n scheduler: this.normalizeSchedulerConfig(config),\n engineExecutionLimits: config.app.engineExecutionLimits ?? config.runtime?.engineExecutionLimits,\n };\n return nextRuntime;\n }\n\n private normalizeDatabaseConfig(config: CodemationConfig): CodemationDatabaseConfig | undefined {\n if (!config.app) {\n return config.runtime?.database;\n }\n if (config.app.database) {\n return config.app.database;\n }\n if (!config.app.databaseUrl) {\n return config.runtime?.database;\n }\n return {\n ...(config.runtime?.database ?? {}),\n url: config.app.databaseUrl,\n };\n }\n\n private normalizeSchedulerConfig(config: CodemationConfig): CodemationSchedulerConfig | undefined {\n if (!config.app?.scheduler) {\n return config.runtime?.scheduler;\n }\n const scheduler = config.app.scheduler;\n return {\n ...(config.runtime?.scheduler ?? {}),\n kind:\n scheduler.kind === \"queue\" ? \"bullmq\" : scheduler.kind === \"inline\" ? \"local\" : config.runtime?.scheduler?.kind,\n queuePrefix: scheduler.queuePrefix ?? config.runtime?.scheduler?.queuePrefix,\n workerQueues: scheduler.workerQueues ?? config.runtime?.scheduler?.workerQueues,\n };\n }\n\n private normalizeEventBusConfig(config: CodemationConfig): CodemationEventBusConfig | undefined {\n if (!config.app?.scheduler) {\n return config.runtime?.eventBus;\n }\n const scheduler = config.app.scheduler;\n const eventBusKind =\n scheduler.kind === \"queue\" ? \"redis\" : scheduler.kind === \"inline\" ? \"memory\" : config.runtime?.eventBus?.kind;\n return {\n ...(config.runtime?.eventBus ?? {}),\n kind: eventBusKind,\n queuePrefix: scheduler.queuePrefix ?? config.runtime?.eventBus?.queuePrefix,\n redisUrl: scheduler.redisUrl ?? config.runtime?.eventBus?.redisUrl,\n };\n }\n\n private assertAuthConfig(authConfig: CodemationConfig[\"auth\"]): void {\n if (authConfig?.kind !== \"managed\") {\n return;\n }\n if (authConfig.oauth && authConfig.oauth.length > 0) {\n throw new Error('auth.kind \"managed\" cannot be combined with oauth providers. Remove the oauth config.');\n }\n if (authConfig.oidc && authConfig.oidc.length > 0) {\n throw new Error('auth.kind \"managed\" cannot be combined with oidc providers. Remove the oidc config.');\n }\n if (authConfig.allowUnauthenticatedInDevelopment === true) {\n throw new Error(\n 'auth.kind \"managed\" cannot be combined with allowUnauthenticatedInDevelopment. Remove that flag.',\n );\n }\n }\n\n private mergeWorkflows(\n configuredWorkflows: ReadonlyArray<WorkflowDefinition>,\n registeredWorkflows: ReadonlyArray<WorkflowDefinition>,\n ): ReadonlyArray<WorkflowDefinition> | undefined {\n if (configuredWorkflows.length === 0 && registeredWorkflows.length === 0) {\n return undefined;\n }\n const workflowsById = new Map<string, WorkflowDefinition>();\n for (const workflow of registeredWorkflows) {\n workflowsById.set(workflow.id, workflow);\n }\n for (const workflow of configuredWorkflows) {\n workflowsById.set(workflow.id, workflow);\n }\n return [...workflowsById.values()];\n }\n}\n","import type { CodemationConfig } from \"../config/CodemationConfig\";\n\nexport class CodemationConsumerConfigExportsResolver {\n resolveConfig(moduleExports: Readonly<Record<string, unknown>>): CodemationConfig | null {\n const defaultExport = moduleExports.default;\n if (this.isConfig(defaultExport)) {\n return defaultExport;\n }\n const namedConfig = moduleExports.codemationHost ?? moduleExports.config;\n if (this.isConfig(namedConfig)) {\n return namedConfig;\n }\n return null;\n }\n\n private isConfig(value: unknown): value is CodemationConfig {\n if (!value || typeof value !== \"object\") {\n return false;\n }\n return (\n \"app\" in value ||\n \"register\" in value ||\n \"credentials\" in value ||\n \"runtime\" in value ||\n \"workflows\" in value ||\n \"workflowDiscovery\" in value ||\n \"plugins\" in value ||\n \"whitelabel\" in value ||\n \"auth\" in value ||\n \"log\" in value\n );\n }\n}\n","export class DiscoveredWorkflowsEmptyMessageFactory {\n create(discoveredPaths: ReadonlyArray<string>): string {\n const lines = discoveredPaths.map((p) => ` - ${p}`).join(\"\\n\");\n return [\n `Discovered ${discoveredPaths.length} file(s) under workflow discovery, but none export a WorkflowDefinition.`,\n lines,\n \"\",\n \"Move shared helpers outside the discovery directories (for example src/lib), or export at least one object with id, name, nodes, and edges from a workflow module.\",\n ].join(\"\\n\");\n }\n}\n","import type { WorkflowDefinition } from \"@codemation/core\";\nimport { WorkflowEdgePortValidator } from \"@codemation/core\";\n\n/**\n * Collects exported values that match the {@link WorkflowDefinition} shape.\n * Other exports (helpers, constants, type-only re-exports) are ignored.\n *\n * Throws if any workflow's edges reference output ports not declared by the\n * source node config. All violations are reported at once so an agent can\n * self-correct in a single pass.\n */\nexport class WorkflowDefinitionExportsResolver {\n private readonly portValidator = new WorkflowEdgePortValidator();\n\n resolve(moduleExports: Readonly<Record<string, unknown>>): ReadonlyArray<WorkflowDefinition> {\n const workflows: WorkflowDefinition[] = [];\n for (const exportedValue of Object.values(moduleExports)) {\n if (this.isWorkflowDefinition(exportedValue)) {\n this.validatePorts(exportedValue);\n workflows.push(exportedValue);\n }\n }\n return workflows;\n }\n\n private validatePorts(workflow: WorkflowDefinition): void {\n const result = this.portValidator.validate(workflow);\n if (!result.valid) {\n const lines = result.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n throw new Error(\n `Workflow \"${workflow.id}\" (\"${workflow.name}\") has ${result.errors.length} invalid edge port(s):\\n${lines}`,\n );\n }\n }\n\n private isWorkflowDefinition(value: unknown): value is WorkflowDefinition {\n if (!value || typeof value !== \"object\") {\n return false;\n }\n return \"id\" in value && \"name\" in value && \"nodes\" in value && \"edges\" in value;\n }\n}\n","import type { WorkflowDefinition } from \"@codemation/core\";\nimport { CodemationConfigNormalizer } from \"../config/CodemationConfigNormalizer\";\nimport type { NormalizedCodemationConfig } from \"../config/CodemationConfigNormalizer\";\nimport { CodemationConsumerConfigExportsResolver } from \"./CodemationConsumerConfigExportsResolver\";\nimport { DiscoveredWorkflowsEmptyMessageFactory } from \"./DiscoveredWorkflowsEmptyMessageFactory\";\nimport { WorkflowDefinitionExportsResolver } from \"./WorkflowDefinitionExportsResolver\";\n\nexport type CodemationConsumerApp = Readonly<{\n config: NormalizedCodemationConfig;\n workflowSources: ReadonlyArray<string>;\n}>;\n\nexport class CodemationConsumerAppResolver {\n private readonly configExportsResolver = new CodemationConsumerConfigExportsResolver();\n private readonly configNormalizer = new CodemationConfigNormalizer();\n private readonly workflowDefinitionExportsResolver = new WorkflowDefinitionExportsResolver();\n private readonly discoveredWorkflowsEmptyMessageFactory = new DiscoveredWorkflowsEmptyMessageFactory();\n\n resolve(\n args: Readonly<{\n configModule: Readonly<Record<string, unknown>>;\n workflowModules: ReadonlyArray<Readonly<Record<string, unknown>>>;\n workflowSourcePaths: ReadonlyArray<string>;\n workflowDiscoveryPathSegmentsList?: ReadonlyArray<readonly string[]>;\n }>,\n ): CodemationConsumerApp {\n const rawConfig = this.configExportsResolver.resolveConfig(args.configModule);\n if (!rawConfig) {\n throw new Error(\"Consumer app module does not export a Codemation config object.\");\n }\n const config = this.configNormalizer.normalize(rawConfig);\n const discoveredWorkflows = this.resolveDiscoveredWorkflows(\n args.workflowModules,\n args.workflowSourcePaths,\n args.workflowDiscoveryPathSegmentsList,\n );\n return {\n config: {\n ...config,\n workflows: this.mergeWorkflows(config.workflows ?? [], discoveredWorkflows),\n },\n workflowSources: args.workflowSourcePaths,\n };\n }\n\n private resolveDiscoveredWorkflows(\n workflowModules: ReadonlyArray<Readonly<Record<string, unknown>>>,\n workflowSourcePaths: ReadonlyArray<string>,\n workflowDiscoveryPathSegmentsList: ReadonlyArray<readonly string[]> | undefined,\n ): ReadonlyArray<WorkflowDefinition> {\n const workflowsById = new Map<string, WorkflowDefinition>();\n workflowModules.forEach((workflowModule: Readonly<Record<string, unknown>>, index: number) => {\n const pathSegments = workflowDiscoveryPathSegmentsList?.[index];\n const workflows = this.workflowDefinitionExportsResolver.resolve(workflowModule);\n workflows.forEach((workflow: WorkflowDefinition) => {\n const enriched =\n pathSegments && pathSegments.length > 0\n ? ({ ...workflow, discoveryPathSegments: pathSegments } satisfies WorkflowDefinition)\n : workflow;\n workflowsById.set(workflow.id, enriched);\n });\n });\n if (workflowsById.size === 0 && workflowSourcePaths.length > 0) {\n throw new Error(this.discoveredWorkflowsEmptyMessageFactory.create(workflowSourcePaths));\n }\n return [...workflowsById.values()];\n }\n\n private mergeWorkflows(\n configuredWorkflows: ReadonlyArray<WorkflowDefinition>,\n discoveredWorkflows: ReadonlyArray<WorkflowDefinition>,\n ): ReadonlyArray<WorkflowDefinition> {\n const workflowsById = new Map<string, WorkflowDefinition>();\n for (const workflow of discoveredWorkflows) {\n workflowsById.set(workflow.id, workflow);\n }\n for (const workflow of configuredWorkflows) {\n workflowsById.set(workflow.id, workflow);\n }\n return [...workflowsById.values()];\n }\n}\n","import { readdir } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nexport class WorkflowModulePathFinder {\n static readonly defaultWorkflowDirectories = [\"src/workflows\", \"workflows\"] as const;\n private readonly workflowExtensions = new Set([\".ts\", \".js\", \".mts\", \".mjs\"]);\n\n async discoverModulePaths(\n args: Readonly<{\n consumerRoot: string;\n workflowDirectories: ReadonlyArray<string> | undefined;\n exists: (absolutePath: string) => Promise<boolean>;\n }>,\n ): Promise<ReadonlyArray<string>> {\n const directories = args.workflowDirectories ?? WorkflowModulePathFinder.defaultWorkflowDirectories;\n const workflowModulePaths: string[] = [];\n for (const directory of directories) {\n const absoluteDirectory = path.resolve(args.consumerRoot, directory);\n if (!(await args.exists(absoluteDirectory))) {\n continue;\n }\n workflowModulePaths.push(...(await this.collectWorkflowModulePaths(absoluteDirectory)));\n }\n return workflowModulePaths;\n }\n\n private async collectWorkflowModulePaths(directoryPath: string): Promise<ReadonlyArray<string>> {\n const entries = await readdir(directoryPath, { withFileTypes: true });\n const workflowModulePaths: string[] = [];\n for (const entry of entries) {\n const entryPath = path.resolve(directoryPath, entry.name);\n if (entry.isDirectory()) {\n workflowModulePaths.push(...(await this.collectWorkflowModulePaths(entryPath)));\n continue;\n }\n if (this.isWorkflowModulePath(entryPath)) {\n workflowModulePaths.push(entryPath);\n }\n }\n return workflowModulePaths;\n }\n\n private isWorkflowModulePath(modulePath: string): boolean {\n const extension = path.extname(modulePath);\n if (!this.workflowExtensions.has(extension)) {\n return false;\n }\n const basename = path.basename(modulePath);\n if (basename.endsWith(\".d.ts\") || basename.endsWith(\".d.mts\")) {\n return false;\n }\n const withoutExt = basename.slice(0, -extension.length);\n if (withoutExt.endsWith(\".test\") || withoutExt.endsWith(\".spec\")) {\n return false;\n }\n return true;\n }\n}\n","import path from \"node:path\";\n\nimport { WorkflowModulePathFinder } from \"./WorkflowModulePathFinder\";\n\nexport class WorkflowDiscoveryPathSegmentsComputer {\n compute(\n args: Readonly<{\n consumerRoot: string;\n workflowDiscoveryDirectories: ReadonlyArray<string>;\n absoluteWorkflowModulePath: string;\n }>,\n ): readonly string[] | undefined {\n const normalizedConsumer = path.resolve(args.consumerRoot);\n const normalizedWorkflowPath = path.resolve(args.absoluteWorkflowModulePath);\n const directories =\n args.workflowDiscoveryDirectories.length > 0\n ? args.workflowDiscoveryDirectories\n : [...WorkflowModulePathFinder.defaultWorkflowDirectories];\n\n let bestRoot: string | null = null;\n for (const directory of directories) {\n const absoluteDirectory = path.resolve(normalizedConsumer, directory);\n const isPrefix =\n normalizedWorkflowPath === absoluteDirectory ||\n normalizedWorkflowPath.startsWith(`${absoluteDirectory}${path.sep}`);\n if (!isPrefix) {\n continue;\n }\n if (!bestRoot || absoluteDirectory.length > bestRoot.length) {\n bestRoot = absoluteDirectory;\n }\n }\n if (!bestRoot) {\n return undefined;\n }\n const relative = path.relative(bestRoot, normalizedWorkflowPath);\n if (relative.startsWith(\"..\") || path.isAbsolute(relative)) {\n return undefined;\n }\n if (relative.length === 0) {\n return undefined;\n }\n const parts = relative.split(path.sep).filter((segment) => segment.length > 0);\n if (parts.length === 0) {\n return undefined;\n }\n const lastIndex = parts.length - 1;\n const last = parts[lastIndex] ?? \"\";\n const ext = path.extname(last);\n parts[lastIndex] = ext ? last.slice(0, -ext.length) : last;\n return parts;\n }\n}\n","import type { WorkflowDefinition } from \"@codemation/core\";\nimport { access, stat } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport type { NamespacedUnregister } from \"tsx/esm/api\";\nimport type { CodemationConfig } from \"../config/CodemationConfig\";\nimport { CodemationConfigNormalizer } from \"../config/CodemationConfigNormalizer\";\nimport type { NormalizedCodemationConfig } from \"../config/CodemationConfigNormalizer\";\nimport { BootTimer } from \"../../bootstrap/perf/BootTimer\";\nimport { logLevelPolicyFactory } from \"../../infrastructure/logging/LogLevelPolicyFactory\";\nimport { ServerLoggerFactory } from \"../../infrastructure/logging/ServerLoggerFactory\";\nimport { DiscoveredWorkflowsEmptyMessageFactory } from \"./DiscoveredWorkflowsEmptyMessageFactory\";\nimport { CodemationConsumerConfigExportsResolver } from \"./CodemationConsumerConfigExportsResolver\";\nimport { WorkflowDefinitionExportsResolver } from \"./WorkflowDefinitionExportsResolver\";\nimport { WorkflowDiscoveryPathSegmentsComputer } from \"./WorkflowDiscoveryPathSegmentsComputer\";\nimport { WorkflowModulePathFinder } from \"./WorkflowModulePathFinder\";\n\nexport type CodemationConsumerConfigResolution = Readonly<{\n config: NormalizedCodemationConfig;\n bootstrapSource: string | null;\n workflowSources: ReadonlyArray<string>;\n}>;\n\ntype ConsumerImportSession = Readonly<{\n shouldResetImporter: boolean;\n resetCacheKeys: Set<string>;\n}>;\n\nexport class CodemationConsumerConfigLoader {\n private static readonly importerRegistrationsByTsconfig = new Map<string, NamespacedUnregister>();\n private static readonly importerNamespaceVersionByTsconfig = new Map<string, number>();\n private readonly configExportsResolver = new CodemationConsumerConfigExportsResolver();\n private readonly configNormalizer = new CodemationConfigNormalizer();\n private readonly workflowModulePathFinder = new WorkflowModulePathFinder();\n private readonly workflowDefinitionExportsResolver = new WorkflowDefinitionExportsResolver();\n private readonly discoveredWorkflowsEmptyMessageFactory = new DiscoveredWorkflowsEmptyMessageFactory();\n private readonly pathSegmentsComputer = new WorkflowDiscoveryPathSegmentsComputer();\n private readonly performanceDiagnosticsLogger = new ServerLoggerFactory(\n logLevelPolicyFactory,\n ).createPerformanceDiagnostics(\"codemation-config-loader.timing\");\n private readonly bootLogger = new ServerLoggerFactory(logLevelPolicyFactory).create(\"codemation.boot\");\n /**\n * In-flight + completed load promises keyed by `${consumerRoot}|${configPathOverride}`. The\n * boot path constructs MULTIPLE CodemationConsumerConfigLoader instances (one inside the CLI's\n * DatabaseMigrationsApplyService, another inside NextHostEdgeSeedLoader, another inside\n * AppConfigLoader for the disposable runtime) and each independently calls `load(...)`. Without\n * a cache shared across instances, the same `${consumerRoot}` ends up importing\n * codemation.config.ts + discovered workflow modules ~3 times for a single dev boot. The cache\n * has to be static so it spans every loader instance in the process.\n *\n * Callers MUST invoke `invalidateAll()` on a source-change reload — the dev source watcher\n * already tears the runtime down and reboots; it just needs to clear this map first.\n */\n private static readonly resolutionCache = new Map<string, Promise<CodemationConsumerConfigResolution>>();\n\n static invalidateAll(): void {\n this.resolutionCache.clear();\n }\n\n async load(\n args: Readonly<{ consumerRoot: string; configPathOverride?: string }>,\n ): Promise<CodemationConsumerConfigResolution> {\n const cacheKey = `${args.consumerRoot}|${args.configPathOverride ?? \"\"}`;\n const cached = CodemationConsumerConfigLoader.resolutionCache.get(cacheKey);\n if (cached) {\n return cached;\n }\n const promise = this.loadUncached(args);\n CodemationConsumerConfigLoader.resolutionCache.set(cacheKey, promise);\n try {\n return await promise;\n } catch (error) {\n // A failed load shouldn't poison the cache — future retries should re-attempt.\n CodemationConsumerConfigLoader.resolutionCache.delete(cacheKey);\n throw error;\n }\n }\n\n private async loadUncached(\n args: Readonly<{ consumerRoot: string; configPathOverride?: string }>,\n ): Promise<CodemationConsumerConfigResolution> {\n const loadStarted = performance.now();\n let mark = loadStarted;\n const importSession = this.createImportSession();\n const phaseDurations = new Map<string, number>();\n const phaseMs = (label: string): void => {\n const now = performance.now();\n const delta = now - mark;\n mark = now;\n phaseDurations.set(label, delta);\n this.performanceDiagnosticsLogger.info(\n `load.${label} +${delta.toFixed(1)}ms (cumulative ${(now - loadStarted).toFixed(1)}ms)`,\n );\n };\n const bootstrapSource = await BootTimer.measureAsync(\"config.resolveConfigPath\", () =>\n this.resolveConfigPath(args.consumerRoot, args.configPathOverride),\n );\n phaseMs(\"resolveConfigPath\");\n if (!bootstrapSource) {\n throw new Error(\n 'Codemation config not found. Expected \"codemation.config.ts\" in the consumer project root or \"src/\".',\n );\n }\n const moduleExports = await BootTimer.measureAsync(\"config.importConfigModule\", () =>\n this.importModule(bootstrapSource, importSession),\n );\n phaseMs(\"importConfigModule\");\n const rawConfig = this.configExportsResolver.resolveConfig(moduleExports);\n if (!rawConfig) {\n throw new Error(`Config file does not export a Codemation config object: ${bootstrapSource}`);\n }\n const config = this.configNormalizer.normalize(rawConfig);\n if (rawConfig.codemationVersion) {\n this.bootLogger.info(`codemationVersion: ${rawConfig.codemationVersion}`);\n }\n const workflowSources = await BootTimer.measureAsync(\"config.resolveWorkflowSources\", () =>\n this.resolveWorkflowSources(args.consumerRoot, config),\n );\n phaseMs(\"resolveWorkflowSources\");\n const workflows = await BootTimer.measureAsync(\"config.loadDiscoveredWorkflows\", async () =>\n this.mergeWorkflows(\n config.workflows ?? [],\n await this.loadDiscoveredWorkflows(args.consumerRoot, config, workflowSources, importSession),\n ),\n );\n phaseMs(\"loadDiscoveredWorkflows\");\n const resolvedConfig: NormalizedCodemationConfig = {\n ...config,\n workflows,\n };\n logLevelPolicyFactory.create().applyCodemationLogConfig(resolvedConfig.log);\n return {\n config: resolvedConfig,\n bootstrapSource,\n workflowSources,\n };\n }\n\n private async resolveConfigPath(\n consumerRoot: string,\n configPathOverride: string | undefined,\n ): Promise<string | null> {\n if (configPathOverride) {\n const explicitPath = path.isAbsolute(configPathOverride)\n ? configPathOverride\n : path.resolve(consumerRoot, configPathOverride);\n if (!(await this.exists(explicitPath))) {\n throw new Error(`Config file not found: ${explicitPath}`);\n }\n return explicitPath;\n }\n for (const candidate of this.getConventionCandidates(consumerRoot)) {\n if (await this.exists(candidate)) {\n return candidate;\n }\n }\n return null;\n }\n\n private getConventionCandidates(consumerRoot: string): ReadonlyArray<string> {\n return [\n path.resolve(consumerRoot, \"codemation.config.ts\"),\n path.resolve(consumerRoot, \"codemation.config.js\"),\n path.resolve(consumerRoot, \"src\", \"codemation.config.ts\"),\n path.resolve(consumerRoot, \"src\", \"codemation.config.js\"),\n ];\n }\n\n private async resolveWorkflowSources(consumerRoot: string, config: CodemationConfig): Promise<ReadonlyArray<string>> {\n if ((config.workflowDiscovery?.directories?.length ?? 0) === 0) {\n return [];\n }\n const discoveredPaths = await this.workflowModulePathFinder.discoverModulePaths({\n consumerRoot,\n workflowDirectories: config.workflowDiscovery?.directories,\n exists: (absolutePath) => this.exists(absolutePath),\n });\n return [...discoveredPaths].sort((left: string, right: string) => left.localeCompare(right));\n }\n\n private async loadDiscoveredWorkflows(\n consumerRoot: string,\n config: CodemationConfig,\n workflowSources: ReadonlyArray<string>,\n importSession: ConsumerImportSession,\n ): Promise<ReadonlyArray<WorkflowDefinition>> {\n const workflowDiscoveryDirectories = config.workflowDiscovery?.directories ?? [];\n const workflowsById = new Map<string, WorkflowDefinition>();\n const loadedWorkflowModules = await Promise.all(\n workflowSources.map(async (workflowSource: string) => ({\n workflowSource,\n segments: this.pathSegmentsComputer.compute({\n consumerRoot,\n workflowDiscoveryDirectories,\n absoluteWorkflowModulePath: workflowSource,\n }),\n moduleExports: await BootTimer.measureAsync(\n `workflow.${path.basename(workflowSource).replace(/\\.tsx?$/, \"\")}`,\n () => this.importModule(workflowSource, importSession),\n ),\n })),\n );\n for (const loadedWorkflowModule of loadedWorkflowModules) {\n for (const workflow of this.workflowDefinitionExportsResolver.resolve(loadedWorkflowModule.moduleExports)) {\n const enriched =\n loadedWorkflowModule.segments && loadedWorkflowModule.segments.length > 0\n ? ({ ...workflow, discoveryPathSegments: loadedWorkflowModule.segments } satisfies WorkflowDefinition)\n : workflow;\n workflowsById.set(workflow.id, enriched);\n }\n }\n if (workflowsById.size === 0 && workflowSources.length > 0) {\n throw new Error(this.discoveredWorkflowsEmptyMessageFactory.create(workflowSources));\n }\n return [...workflowsById.values()];\n }\n\n private mergeWorkflows(\n configuredWorkflows: ReadonlyArray<WorkflowDefinition>,\n discoveredWorkflows: ReadonlyArray<WorkflowDefinition>,\n ): ReadonlyArray<WorkflowDefinition> {\n const workflowsById = new Map<string, WorkflowDefinition>();\n for (const workflow of discoveredWorkflows) {\n workflowsById.set(workflow.id, workflow);\n }\n for (const workflow of configuredWorkflows) {\n workflowsById.set(workflow.id, workflow);\n }\n return [...workflowsById.values()];\n }\n\n private async importModule(\n modulePath: string,\n importSession: ConsumerImportSession,\n ): Promise<Record<string, unknown>> {\n if (this.shouldUseNativeRuntimeImport()) {\n return await this.importModuleWithNativeRuntime(modulePath);\n }\n const tsconfigPath = await this.resolveTsconfigPath(modulePath);\n const cacheKey = tsconfigPath || \"default\";\n const shouldResetImporter = importSession.shouldResetImporter;\n const didResetImporterForThisImport = shouldResetImporter && !importSession.resetCacheKeys.has(cacheKey);\n if (didResetImporterForThisImport) {\n await this.resetImporter(tsconfigPath);\n importSession.resetCacheKeys.add(cacheKey);\n }\n const importSpecifier = await this.createImportSpecifier(modulePath);\n for (let attempt = 0; attempt < 3; attempt += 1) {\n try {\n const importedModule = await (\n await this.getOrCreateImporter(tsconfigPath)\n ).import(importSpecifier, import.meta.url);\n return importedModule as Record<string, unknown>;\n } catch (error) {\n if (!this.isStoppedTransformServiceError(error) || attempt === 2) {\n throw error;\n }\n await this.resetImporter(tsconfigPath);\n }\n }\n throw new Error(`Failed to import consumer module after retries: ${modulePath}`);\n }\n\n private async importModuleWithNativeRuntime(modulePath: string): Promise<Record<string, unknown>> {\n const importedModule = await import(await this.createImportSpecifier(modulePath));\n return importedModule as Record<string, unknown>;\n }\n\n private async resolveTsconfigPath(modulePath: string): Promise<string | false> {\n const overridePath = process.env.CODEMATION_TSCONFIG_PATH;\n if (overridePath && (await this.exists(overridePath))) {\n return overridePath;\n }\n const discoveredPath = await this.findNearestTsconfig(modulePath);\n return discoveredPath ?? false;\n }\n\n private async getOrCreateImporter(tsconfigPath: string | false): Promise<NamespacedUnregister> {\n const cacheKey = tsconfigPath || \"default\";\n const existingImporter = CodemationConsumerConfigLoader.importerRegistrationsByTsconfig.get(cacheKey);\n if (existingImporter) {\n return existingImporter;\n }\n const { register } = await import(/* webpackIgnore: true */ this.resolveTsxImporterModuleSpecifier());\n const namespaceVersion = this.nextNamespaceVersion(cacheKey);\n const nextImporter = register({\n // A fresh namespace prevents cache hits from prior scoped imports after a dev rebuild.\n namespace: this.toNamespace(cacheKey, namespaceVersion),\n tsconfig: tsconfigPath,\n });\n CodemationConsumerConfigLoader.importerRegistrationsByTsconfig.set(cacheKey, nextImporter);\n return nextImporter;\n }\n\n private async resetImporter(tsconfigPath: string | false): Promise<void> {\n const cacheKey = tsconfigPath || \"default\";\n const existingImporter = CodemationConsumerConfigLoader.importerRegistrationsByTsconfig.get(cacheKey);\n if (!existingImporter) {\n return;\n }\n CodemationConsumerConfigLoader.importerRegistrationsByTsconfig.delete(cacheKey);\n await existingImporter.unregister().catch(() => null);\n }\n\n private nextNamespaceVersion(cacheKey: string): number {\n const nextVersion = (CodemationConsumerConfigLoader.importerNamespaceVersionByTsconfig.get(cacheKey) ?? 0) + 1;\n CodemationConsumerConfigLoader.importerNamespaceVersionByTsconfig.set(cacheKey, nextVersion);\n return nextVersion;\n }\n\n private toNamespace(cacheKey: string, namespaceVersion: number): string {\n return `codemation_consumer_${cacheKey.replace(/[^a-zA-Z0-9_-]+/g, \"_\")}_${namespaceVersion}`;\n }\n\n private resolveTsxImporterModuleSpecifier(): string {\n return [\"tsx\", \"esm\", \"api\"].join(\"/\");\n }\n\n private async findNearestTsconfig(modulePath: string): Promise<string | null> {\n let currentDirectory = path.dirname(modulePath);\n while (true) {\n const candidate = path.resolve(currentDirectory, \"tsconfig.json\");\n if (await this.exists(candidate)) {\n return candidate;\n }\n const parentDirectory = path.dirname(currentDirectory);\n if (parentDirectory === currentDirectory) {\n return null;\n }\n currentDirectory = parentDirectory;\n }\n }\n\n private async createImportSpecifier(modulePath: string): Promise<string> {\n const moduleUrl = pathToFileURL(modulePath);\n const moduleStats = await stat(modulePath);\n moduleUrl.searchParams.set(\"t\", String(moduleStats.mtimeMs));\n return moduleUrl.href;\n }\n\n private shouldUseNativeRuntimeImport(): boolean {\n return process.env.CODEMATION_TS_RUNTIME === \"ts-node\";\n }\n\n private shouldResetImporterBeforeImport(): boolean {\n return (process.env.CODEMATION_DEV_SERVER_TOKEN?.trim().length ?? 0) > 0;\n }\n\n private createImportSession(): ConsumerImportSession {\n return {\n resetCacheKeys: new Set<string>(),\n shouldResetImporter: this.shouldResetImporterBeforeImport(),\n };\n }\n\n private isStoppedTransformServiceError(error: unknown): boolean {\n return error instanceof Error && error.message.includes(\"The service is no longer running\");\n }\n\n private async exists(filePath: string): Promise<boolean> {\n try {\n await access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n}\n"],"mappings":";;;;;;;;AA0BA,IAAa,6BAAb,MAAwC;CACtC,UAAU,QAAsD;EAC9D,MAAM,OAAO,OAAO,KAAK,QAAQ,OAAO;AACxC,OAAK,iBAAiB,KAAK;AAC3B,OAAK,6BAA6B,QAAQ,KAAK;EAC/C,MAAM,YAAY,KAAK,oBAAoB,OAAO;EAClD,MAAM,oBAAoB,KAAK,uBAAuB,OAAO;EAC7D,MAAM,yCAAyC,CAC7C,GAAI,OAAO,mBAAmB,eAAe,EAAE,EAC/C,GAAG,UAAU,oBACd;AAED,SAAO;GACL,GAAG;GACH;GACA,wBAAwB,UAAU;GAClC,iBAAiB,CAAC,GAAI,OAAO,mBAAmB,EAAE,EAAG,GAAG,UAAU,gBAAgB;GAClF,aAAa,CAAC,GAAG,KAAK,kBAAkB,OAAO,YAAY,EAAE,GAAG,UAAU,YAAY;GACtF,KAAK,OAAO,KAAK,OAAO,OAAO;GAC/B,SAAS;GACT,YAAY,OAAO,KAAK,cAAc,OAAO;GAC7C,mBACE,uCAAuC,SAAS,IAC5C,EAAE,aAAa,wCAAwC,GACvD,OAAO;GACb,WAAW,KAAK,eAAe,OAAO,aAAa,EAAE,EAAE,UAAU,UAAU;GAC5E;;;;;;CAOH,AAAQ,6BAA6B,QAA0B,MAA8C;AAC3G,MAAI,MAA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GAAG;;CAG7E,AAAQ,oCAA4C;AAClD,SAAO;GAAC;GAAO;GAAO;GAAM,CAAC,KAAK,IAAI;;CAGxC,MAAc,oBAAoB,YAA4C;EAC5E,IAAI,mBAAmB,KAAK,QAAQ,WAAW;AAC/C,SAAO,MAAM;GACX,MAAM,YAAY,KAAK,QAAQ,kBAAkB,gBAAgB;AACjE,OAAI,MAAM,KAAK,OAAO,UAAU,CAC9B,QAAO;GAET,MAAM,kBAAkB,KAAK,QAAQ,iBAAiB;AACtD,OAAI,oBAAoB,iBACtB,QAAO;AAET,sBAAmB;;;CAIvB,MAAc,sBAAsB,YAAqC;EACvE,MAAM,YAAY,cAAc,WAAW;EAC3C,MAAM,cAAc,MAAM,KAAK,WAAW;AAC1C,YAAU,aAAa,IAAI,KAAK,OAAO,YAAY,QAAQ,CAAC;AAC5D,SAAO,UAAU;;CAGnB,AAAQ,+BAAwC;AAC9C,SAAO,QAAQ,IAAI,0BAA0B;;CAG/C,AAAQ,kCAA2C;AACjD,UAAQ,QAAQ,IAAI,6BAA6B,MAAM,CAAC,UAAU,KAAK;;CAGzE,AAAQ,sBAA6C;AACnD,SAAO;GACL,gCAAgB,IAAI,KAAa;GACjC,qBAAqB,KAAK,iCAAiC;GAC5D;;CAGH,AAAQ,+BAA+B,OAAyB;AAC9D,SAAO,iBAAiB,SAAS,MAAM,QAAQ,SAAS,mCAAmC;;CAG7F,MAAc,OAAO,UAAoC;AACvD,MAAI;AACF,SAAM,OAAO,SAAS;AACtB,UAAO;UACD;AACN,UAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as NormalizedCodemationConfig } from "./CodemationConfigNormalizer-
|
|
1
|
+
import { t as NormalizedCodemationConfig } from "./CodemationConfigNormalizer-48f-T66P.js";
|
|
2
2
|
|
|
3
3
|
//#region src/presentation/server/CodemationConsumerAppResolver.d.ts
|
|
4
4
|
type CodemationConsumerApp = Readonly<{
|
|
@@ -36,6 +36,7 @@ declare class CodemationConsumerConfigLoader {
|
|
|
36
36
|
private readonly discoveredWorkflowsEmptyMessageFactory;
|
|
37
37
|
private readonly pathSegmentsComputer;
|
|
38
38
|
private readonly performanceDiagnosticsLogger;
|
|
39
|
+
private readonly bootLogger;
|
|
39
40
|
/**
|
|
40
41
|
* In-flight + completed load promises keyed by `${consumerRoot}|${configPathOverride}`. The
|
|
41
42
|
* boot path constructs MULTIPLE CodemationConsumerConfigLoader instances (one inside the CLI's
|
|
@@ -78,4 +79,4 @@ declare class CodemationConsumerConfigLoader {
|
|
|
78
79
|
}
|
|
79
80
|
//#endregion
|
|
80
81
|
export { CodemationConsumerAppResolver as i, CodemationConsumerConfigResolution as n, CodemationConsumerApp as r, CodemationConsumerConfigLoader as t };
|
|
81
|
-
//# sourceMappingURL=CodemationConsumerConfigLoader-
|
|
82
|
+
//# sourceMappingURL=CodemationConsumerConfigLoader-_PIYqwVx.d.ts.map
|
package/dist/{CodemationPluginListMerger-DKLAHT2b.d.ts → CodemationPluginListMerger-DP7djJ9S.d.ts}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { c as Clock, i as CollectionDefinition, r as Engine, t as OAuthFlowExecutor } from "./index-DilAYwnH.js";
|
|
2
2
|
import { $ as PersistedRunState, A as WorkflowRunDetailDto, G as PersistedRunPolicySnapshot, K as RunId, T as McpServerDeclaration, X as WorkflowDefinition, b as TestCaseRunStatus, d as NodeExecutionRequestHandler, f as NodeExecutionScheduler, g as TypeToken, h as Container, kt as WorkflowId, o as BinaryStorage, p as WorkflowRepository, rt as RunPruneCandidate, st as RunSummary, tt as RunCurrentState, ut as AnyCredentialType, v as RunEvent, w as WorkflowActivationPolicy, y as RunEventBus } from "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
3
|
-
import { C as CodemationContainerRegistration, l as CodemationPluginPackageMetadata, o as CodemationPlugin, r as AppConfig } from "./CodemationAppContext-
|
|
3
|
+
import { C as CodemationContainerRegistration, l as CodemationPluginPackageMetadata, o as CodemationPlugin, r as AppConfig } from "./CodemationAppContext-CGFYVcSb.js";
|
|
4
4
|
import { a as CodemationAuthConfig, l as Logger, t as CodemationWhitelabelConfig, u as LoggerFactory } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
5
5
|
import { t as LogLevelPolicyFactory } from "./LogLevelPolicyFactory-ewCHLDLn.js";
|
|
6
|
-
import { t as CredentialStore } from "./CredentialServices-
|
|
6
|
+
import { t as CredentialStore } from "./CredentialServices-BLloBztI.js";
|
|
7
7
|
import { i as TelemetryMetricPointStore, n as TelemetryArtifactStore, o as TelemetrySpanStore, r as TelemetryExporter, s as TelemetrySpanUpsert, t as RunTraceContextRepository } from "./TelemetryContracts-BtDx84Cp.js";
|
|
8
|
-
import { n as PrismaMigrationDeployer, r as PrismaDatabaseClient } from "./AppConfigFactory-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { n as PrismaMigrationDeployer, r as PrismaDatabaseClient } from "./AppConfigFactory-BT0y0LVC.js";
|
|
9
|
+
import { t as InternalHonoApiRouteRegistrar } from "./InternalHonoApiRouteRegistrar-c7t3KnV_.js";
|
|
10
|
+
import { s as ProcessRunner } from "./PublicFrontendBootstrapFactory-Dv04tJ-6.js";
|
|
11
11
|
import "reflect-metadata";
|
|
12
12
|
import { Hono, MiddlewareHandler } from "hono";
|
|
13
13
|
import "jose";
|
|
@@ -600,6 +600,49 @@ interface SessionVerifier {
|
|
|
600
600
|
verify(request: Request): Promise<AuthenticatedPrincipal | null>;
|
|
601
601
|
}
|
|
602
602
|
//#endregion
|
|
603
|
+
//#region src/presentation/http/ServerHttpRouteParams.d.ts
|
|
604
|
+
type ServerHttpRouteParams = Readonly<Record<string, string>>;
|
|
605
|
+
//#endregion
|
|
606
|
+
//#region src/presentation/http/routeHandlers/BinaryHttpRouteHandlerFactory.d.ts
|
|
607
|
+
declare class BinaryHttpRouteHandler {
|
|
608
|
+
private readonly queryBus;
|
|
609
|
+
private readonly commandBus;
|
|
610
|
+
private readonly binaryStorage;
|
|
611
|
+
constructor(queryBus: QueryBus, commandBus: CommandBus, binaryStorage: BinaryStorage);
|
|
612
|
+
getRunBinaryContent(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
613
|
+
getWorkflowOverlayBinaryContent(_: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
614
|
+
postWorkflowDebuggerOverlayBinaryUpload(request: Request, params: ServerHttpRouteParams): Promise<Response>;
|
|
615
|
+
private createBinaryResponse;
|
|
616
|
+
private createContentDisposition;
|
|
617
|
+
private escapeFilename;
|
|
618
|
+
}
|
|
619
|
+
//#endregion
|
|
620
|
+
//#region src/presentation/http/hono/HonoApiRouteRegistrar.d.ts
|
|
621
|
+
interface HonoApiRouteRegistrar {
|
|
622
|
+
register(app: Hono): void;
|
|
623
|
+
}
|
|
624
|
+
//#endregion
|
|
625
|
+
//#region src/auth/managed/ManagedCorsMiddleware.d.ts
|
|
626
|
+
/**
|
|
627
|
+
* CORS allowlist middleware for managed mode.
|
|
628
|
+
*
|
|
629
|
+
* Only the single `CP_WEB_ORIGIN` value (provisioner-injected) is permitted.
|
|
630
|
+
* All other origins are refused on preflight with a 403.
|
|
631
|
+
*/
|
|
632
|
+
declare class ManagedCorsMiddleware {
|
|
633
|
+
private readonly allowedOrigin;
|
|
634
|
+
constructor(allowedOrigin: string);
|
|
635
|
+
handle(): MiddlewareHandler;
|
|
636
|
+
}
|
|
637
|
+
//#endregion
|
|
638
|
+
//#region src/presentation/http/hono/CodemationHonoApiAppFactory.d.ts
|
|
639
|
+
declare class CodemationHonoApiApp {
|
|
640
|
+
private readonly app;
|
|
641
|
+
constructor(sessionVerifier: SessionVerifier, registrars: ReadonlyArray<HonoApiRouteRegistrar>, binaryHttpRouteHandler: BinaryHttpRouteHandler, internalRegistrars: ReadonlyArray<InternalHonoApiRouteRegistrar>, corsMiddlewareList: ReadonlyArray<ManagedCorsMiddleware>);
|
|
642
|
+
getHono(): Hono;
|
|
643
|
+
fetch(request: Request): Response | Promise<Response>;
|
|
644
|
+
}
|
|
645
|
+
//#endregion
|
|
603
646
|
//#region src/application/bus/CommandHandler.d.ts
|
|
604
647
|
declare abstract class CommandHandler<TCommand extends Command<TResult>, TResult> {
|
|
605
648
|
abstract execute(command: TCommand): Promise<TResult>;
|
|
@@ -642,24 +685,6 @@ interface WorkflowDebuggerOverlayRepository {
|
|
|
642
685
|
save(state: WorkflowDebuggerOverlayState): Promise<void>;
|
|
643
686
|
}
|
|
644
687
|
//#endregion
|
|
645
|
-
//#region src/presentation/http/hono/HonoApiRouteRegistrar.d.ts
|
|
646
|
-
interface HonoApiRouteRegistrar {
|
|
647
|
-
register(app: Hono): void;
|
|
648
|
-
}
|
|
649
|
-
//#endregion
|
|
650
|
-
//#region src/auth/managed/ManagedCorsMiddleware.d.ts
|
|
651
|
-
/**
|
|
652
|
-
* CORS allowlist middleware for managed mode.
|
|
653
|
-
*
|
|
654
|
-
* Only the single `CP_WEB_ORIGIN` value (provisioner-injected) is permitted.
|
|
655
|
-
* All other origins are refused on preflight with a 403.
|
|
656
|
-
*/
|
|
657
|
-
declare class ManagedCorsMiddleware {
|
|
658
|
-
private readonly allowedOrigin;
|
|
659
|
-
constructor(allowedOrigin: string);
|
|
660
|
-
handle(): MiddlewareHandler;
|
|
661
|
-
}
|
|
662
|
-
//#endregion
|
|
663
688
|
//#region src/audit/IAuditEmitter.d.ts
|
|
664
689
|
/**
|
|
665
690
|
* Workspace-local audit emitter contract.
|
|
@@ -763,5 +788,5 @@ declare class CodemationPluginListMerger {
|
|
|
763
788
|
private tryAdd;
|
|
764
789
|
}
|
|
765
790
|
//#endregion
|
|
766
|
-
export { Command as S,
|
|
767
|
-
//# sourceMappingURL=CodemationPluginListMerger-
|
|
791
|
+
export { Command as C, CommandBus as S, AppContainerLifecycle as _, CodemationHonoApiApp as a, QueryBus as b, SessionVerifier as c, WorkflowRunRetentionPruneScheduler as d, ServerLoggerFactory as f, DatabaseMigrations as g, CollectionSchemaSyncerHolder as h, WorkflowDebuggerOverlayRepository as i, WorkerRuntime as l, WorkflowRunRepository as m, CodemationBootstrapRequest as n, BinaryHttpRouteHandler as o, LogFilter as p, ApplicationTokens as r, ServerHttpRouteParams as s, CodemationPluginListMerger as t, FrontendRuntime as u, AppContainerFactory as v, Query as x, WorkflowWebsocketServer as y };
|
|
792
|
+
//# sourceMappingURL=CodemationPluginListMerger-DP7djJ9S.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dt as CredentialTypeRegistry, Et as CredentialTypeId, St as CredentialSessionService, T as McpServerDeclaration, Tt as CredentialTypeDefinition, X as WorkflowDefinition, _t as CredentialJsonRecord, bt as CredentialRequirement, dt as CredentialBinding, ft as CredentialBindingKey, gt as CredentialInstanceRecord, ht as CredentialInstanceId, mt as CredentialHealth, p as WorkflowRepository, pt as CredentialFieldSchema, ut as AnyCredentialType, wt as CredentialType, yt as CredentialOAuth2AuthDefinition } from "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
2
|
-
import { r as AppConfig } from "./CodemationAppContext-
|
|
2
|
+
import { r as AppConfig } from "./CodemationAppContext-CGFYVcSb.js";
|
|
3
3
|
import { u as LoggerFactory } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
4
4
|
import { a as UpdateCredentialInstanceRequest, n as CredentialInstanceDto, r as CredentialInstanceWithSecretsDto, s as WorkflowCredentialHealthDto, t as CreateCredentialInstanceRequest } from "./CredentialContractsRegistry-Bq2bq28t.js";
|
|
5
5
|
|
|
@@ -284,4 +284,4 @@ type MutableCredentialSessionService = CredentialSessionService & Readonly<{
|
|
|
284
284
|
}>;
|
|
285
285
|
//#endregion
|
|
286
286
|
export { CredentialSecretCipher as a, CredentialInstanceService as i, CredentialType$1 as n, McpServerCatalog as o, CredentialBindingService as r, CredentialStore as t };
|
|
287
|
-
//# sourceMappingURL=CredentialServices-
|
|
287
|
+
//# sourceMappingURL=CredentialServices-BLloBztI.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as AppConfig } from "./CodemationAppContext-
|
|
1
|
+
import { r as AppConfig } from "./CodemationAppContext-CGFYVcSb.js";
|
|
2
2
|
import { a as CodemationAuthConfig } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
3
3
|
import { a as CodemationFrontendAuthSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-Cev3qK46.js";
|
|
4
4
|
import { ChildProcess } from "node:child_process";
|
|
@@ -79,4 +79,4 @@ declare class PublicFrontendBootstrapFactory {
|
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
81
|
export { ProcessRunOptions as a, CodemationFrontendAuthSnapshotFactory as i, InternalAuthBootstrapFactory as n, ProcessRunResult as o, FrontendAppConfigFactory as r, ProcessRunner as s, PublicFrontendBootstrapFactory as t };
|
|
82
|
-
//# sourceMappingURL=PublicFrontendBootstrapFactory-
|
|
82
|
+
//# sourceMappingURL=PublicFrontendBootstrapFactory-Dv04tJ-6.d.ts.map
|
package/dist/authoring.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./index-DilAYwnH.js";
|
|
2
2
|
import "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
3
|
-
import { a as defineCodemationApp, i as FriendlyCodemationExecutionConfig, n as DefinePluginOptions, o as definePlugin, r as FriendlyCodemationDatabaseConfig, s as workflow, t as DefineCodemationAppOptions } from "./CodemationAuthoring.types-
|
|
4
|
-
import { _ as CodemationEngineExecutionLimitsConfig, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-
|
|
3
|
+
import { a as defineCodemationApp, i as FriendlyCodemationExecutionConfig, n as DefinePluginOptions, o as definePlugin, r as FriendlyCodemationDatabaseConfig, s as workflow, t as DefineCodemationAppOptions } from "./CodemationAuthoring.types-DiKKogum.js";
|
|
4
|
+
import { _ as CodemationEngineExecutionLimitsConfig, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-CGFYVcSb.js";
|
|
5
5
|
import "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
6
6
|
export { type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, type CodemationApplicationRuntimeConfig, type CodemationConfig, type CodemationDatabaseConfig, type CodemationDatabaseKind, type CodemationEngineExecutionLimitsConfig, type CodemationEventBusConfig, type CodemationEventBusKind, type CodemationPlugin, type CodemationPluginConfig, type CodemationPluginContext, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, type DefineCodemationAppOptions, type DefinePluginOptions, type FriendlyCodemationDatabaseConfig, type FriendlyCodemationExecutionConfig, defineCodemationApp, definePlugin, workflow };
|
package/dist/authoring.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as definePlugin, t as defineCodemationApp } from "./CodemationAuthoring.types-
|
|
1
|
+
import { n as definePlugin, t as defineCodemationApp } from "./CodemationAuthoring.types-BteaR3Dc.js";
|
|
2
2
|
import { workflow } from "@codemation/core-nodes";
|
|
3
3
|
|
|
4
4
|
export { defineCodemationApp, definePlugin, workflow };
|
package/dist/consumer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./index-DilAYwnH.js";
|
|
2
2
|
import "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
3
|
-
import "./CodemationAppContext-
|
|
3
|
+
import "./CodemationAppContext-CGFYVcSb.js";
|
|
4
4
|
import "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
5
|
-
import "./CodemationConfigNormalizer-
|
|
6
|
-
import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-
|
|
5
|
+
import "./CodemationConfigNormalizer-48f-T66P.js";
|
|
6
|
+
import { i as CodemationConsumerAppResolver, n as CodemationConsumerConfigResolution, r as CodemationConsumerApp, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-_PIYqwVx.js";
|
|
7
7
|
export { type CodemationConsumerApp, CodemationConsumerAppResolver, CodemationConsumerConfigLoader, type CodemationConsumerConfigResolution };
|
package/dist/consumer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./LogLevelPolicyFactory-DCUzIN6G.js";
|
|
2
|
-
import { i as CodemationConsumerAppResolver, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-
|
|
2
|
+
import { i as CodemationConsumerAppResolver, t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-By-6tuGc.js";
|
|
3
3
|
import "./ServerLoggerFactory-Ckk52S3w.js";
|
|
4
4
|
import "./decorateParam-BWxkAUSj.js";
|
|
5
5
|
import "./decorate-CXWmflG_.js";
|
package/dist/credentials.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./index-DilAYwnH.js";
|
|
2
2
|
import { mt as CredentialHealth, ut as AnyCredentialType, xt as CredentialSessionFactoryArgs } from "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
3
|
-
import "./CodemationAppContext-
|
|
3
|
+
import "./CodemationAppContext-CGFYVcSb.js";
|
|
4
4
|
import "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
5
|
-
import { i as CredentialInstanceService, n as CredentialType, r as CredentialBindingService } from "./CredentialServices-
|
|
5
|
+
import { i as CredentialInstanceService, n as CredentialType, r as CredentialBindingService } from "./CredentialServices-BLloBztI.js";
|
|
6
6
|
import "./CredentialContractsRegistry-Bq2bq28t.js";
|
|
7
7
|
|
|
8
8
|
//#region src/infrastructure/credentials/OpenAiApiKeyCredentialShapes.types.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import "./index-DilAYwnH.js";
|
|
2
2
|
import { $ as PersistedRunState, R as Items, tt as RunCurrentState } from "./ItemsInputNormalizer-_RwIfRIQ.js";
|
|
3
|
-
import { a as defineCodemationApp, i as FriendlyCodemationExecutionConfig, n as DefinePluginOptions, o as definePlugin, r as FriendlyCodemationDatabaseConfig, s as workflow, t as DefineCodemationAppOptions } from "./CodemationAuthoring.types-
|
|
4
|
-
import { S as CodemationWorkflowDiscovery, _ as CodemationEngineExecutionLimitsConfig, a as AppPluginLoadSummary, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, l as CodemationPluginPackageMetadata, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, r as AppConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, w as CodemationClassToken, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-
|
|
5
|
-
import { a as CodemationAuthConfig, c as CodemationAuthOidcProviderConfig, i as CodemationLogRule, n as CodemationLogConfig, o as CodemationAuthKind, r as CodemationLogLevelName, s as CodemationAuthOAuthProviderConfig, t as CodemationWhitelabelConfig } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
3
|
+
import { a as defineCodemationApp, i as FriendlyCodemationExecutionConfig, n as DefinePluginOptions, o as definePlugin, r as FriendlyCodemationDatabaseConfig, s as workflow, t as DefineCodemationAppOptions } from "./CodemationAuthoring.types-DiKKogum.js";
|
|
4
|
+
import { S as CodemationWorkflowDiscovery, _ as CodemationEngineExecutionLimitsConfig, a as AppPluginLoadSummary, b as CodemationSchedulerConfig, c as CodemationPluginContext, d as CodemationAppSchedulerConfig, f as CodemationAppSchedulerKind, g as CodemationDatabaseKind, h as CodemationDatabaseConfig, l as CodemationPluginPackageMetadata, m as CodemationConfig, n as CodemationRegistrationContextBase, o as CodemationPlugin, p as CodemationApplicationRuntimeConfig, r as AppConfig, s as CodemationPluginConfig, t as CodemationAppContext, u as CodemationAppDefinition, v as CodemationEventBusConfig, w as CodemationClassToken, x as CodemationSchedulerKind, y as CodemationEventBusKind } from "./CodemationAppContext-CGFYVcSb.js";
|
|
5
|
+
import { a as CodemationAuthConfig, c as CodemationAuthOidcProviderConfig, i as CodemationLogRule, l as Logger, n as CodemationLogConfig, o as CodemationAuthKind, r as CodemationLogLevelName, s as CodemationAuthOAuthProviderConfig, t as CodemationWhitelabelConfig } from "./CodemationWhitelabelConfig-Ca2mCUeC.js";
|
|
6
6
|
import "./LogLevelPolicyFactory-ewCHLDLn.js";
|
|
7
7
|
import { a as ApiPaths, i as CodemationFrontendAuthSnapshotJsonCodec, n as InternalAuthBootstrapJsonCodec, r as FrontendAppConfigJsonCodec, t as PublicFrontendBootstrapJsonCodec } from "./PublicFrontendBootstrapJsonCodec-CXG9Dxft.js";
|
|
8
8
|
import { a as CodemationFrontendAuthSnapshot, i as CodemationFrontendAuthProviderSnapshot, n as InternalAuthBootstrap, r as FrontendAppConfig, t as PublicFrontendBootstrap } from "./PublicFrontendBootstrap-Cev3qK46.js";
|
|
9
|
-
import "./CodemationConfigNormalizer-
|
|
10
|
-
import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-
|
|
11
|
-
import "./CredentialServices-
|
|
9
|
+
import "./CodemationConfigNormalizer-48f-T66P.js";
|
|
10
|
+
import { t as CodemationConsumerConfigLoader } from "./CodemationConsumerConfigLoader-_PIYqwVx.js";
|
|
11
|
+
import "./CredentialServices-BLloBztI.js";
|
|
12
12
|
import "./CredentialContractsRegistry-Bq2bq28t.js";
|
|
13
13
|
import "./TelemetryContracts-BtDx84Cp.js";
|
|
14
14
|
import "./WorkflowViewContracts-B7aFQcIw.js";
|
|
15
15
|
import { a as CollectionSummaryDto, f as UpsertLocalBootstrapUserResultDto, i as CollectionRowDto, o as ListCollectionRowsResponseDto, p as UserAccountDto, s as SyncCollectionsResponseDto, t as CollectionDetailDto } from "./CollectionContracts.types-DDyFYT_D.js";
|
|
16
|
-
import {
|
|
17
|
-
import { r as PrismaDatabaseClient, t as AppConfigFactory } from "./AppConfigFactory-
|
|
18
|
-
import
|
|
19
|
-
import "./
|
|
20
|
-
import { n as CodemationPostgresPrismaClientFactory } from "./persistenceServer-
|
|
21
|
-
import { c as CodemationServerGateway } from "./server-
|
|
16
|
+
import { C as Command, S as CommandBus, _ as AppContainerLifecycle, a as CodemationHonoApiApp, b as QueryBus, g as DatabaseMigrations, h as CollectionSchemaSyncerHolder, l as WorkerRuntime, n as CodemationBootstrapRequest, r as ApplicationTokens, t as CodemationPluginListMerger, u as FrontendRuntime, v as AppContainerFactory, x as Query, y as WorkflowWebsocketServer } from "./CodemationPluginListMerger-DP7djJ9S.js";
|
|
17
|
+
import { r as PrismaDatabaseClient, t as AppConfigFactory } from "./AppConfigFactory-BT0y0LVC.js";
|
|
18
|
+
import "./InternalHonoApiRouteRegistrar-c7t3KnV_.js";
|
|
19
|
+
import { i as CodemationFrontendAuthSnapshotFactory, n as InternalAuthBootstrapFactory, r as FrontendAppConfigFactory, t as PublicFrontendBootstrapFactory } from "./PublicFrontendBootstrapFactory-Dv04tJ-6.js";
|
|
20
|
+
import { n as CodemationPostgresPrismaClientFactory } from "./persistenceServer-B71RGvSj.js";
|
|
21
|
+
import { c as CodemationServerGateway } from "./server-09PKasWR.js";
|
|
22
|
+
import { Server } from "node:http";
|
|
22
23
|
|
|
23
24
|
//#region src/application/queries/ListUserAccountsQuery.d.ts
|
|
24
25
|
declare class ListUserAccountsQuery extends Query<ReadonlyArray<UserAccountDto>> {}
|
|
@@ -76,6 +77,36 @@ declare class BootTimer {
|
|
|
76
77
|
private static popPhase;
|
|
77
78
|
}
|
|
78
79
|
//#endregion
|
|
80
|
+
//#region src/presentation/websocket/WorkflowWebsocketServerFactory.d.ts
|
|
81
|
+
declare class WorkflowWebsocketServerFactory {
|
|
82
|
+
create(appConfig: AppConfig): WorkflowWebsocketServer;
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/presentation/http/HeadlessHttpServerFactory.d.ts
|
|
86
|
+
/**
|
|
87
|
+
* Creates a Node.js http.Server that bridges IncomingMessage to Hono's Fetch API.
|
|
88
|
+
* Used by {@link import("../../bootstrap/runtime/HeadlessApiRuntime").HeadlessApiRuntime}
|
|
89
|
+
* to serve the Hono API without Next.js.
|
|
90
|
+
*/
|
|
91
|
+
declare class HeadlessHttpServerFactory {
|
|
92
|
+
create(honoApp: CodemationHonoApiApp, port: number, logger: Logger): Server;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/bootstrap/runtime/HeadlessApiRuntime.d.ts
|
|
96
|
+
/**
|
|
97
|
+
* Boots the Codemation API + WebSocket servers without the Next.js UI process.
|
|
98
|
+
* Used by `codemation serve web --headless` for workspace pod containers where the
|
|
99
|
+
* UI is served externally (e.g. from the control-plane's customer-ui).
|
|
100
|
+
*/
|
|
101
|
+
declare class HeadlessApiRuntime {
|
|
102
|
+
private readonly appContainerFactory;
|
|
103
|
+
private readonly websocketServerFactory;
|
|
104
|
+
private readonly httpServerFactory;
|
|
105
|
+
private readonly logger;
|
|
106
|
+
constructor(appContainerFactory: AppContainerFactory, websocketServerFactory: WorkflowWebsocketServerFactory, httpServerFactory: HeadlessHttpServerFactory, logger: Logger);
|
|
107
|
+
start(appConfig: AppConfig): Promise<void>;
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
79
110
|
//#region src/application/collections/ListCollectionsQuery.d.ts
|
|
80
111
|
declare class ListCollectionsQuery extends Query<ReadonlyArray<CollectionSummaryDto>> {}
|
|
81
112
|
//#endregion
|
|
@@ -178,5 +209,5 @@ interface CodemationPackageManifest {
|
|
|
178
209
|
readonly plugin?: string;
|
|
179
210
|
}
|
|
180
211
|
//#endregion
|
|
181
|
-
export { ApiPaths, type AppConfig, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, type AppPluginLoadSummary, ApplicationRequestError, ApplicationTokens, BootTimer, type BootTracePhase, type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, type CodemationApplicationRuntimeConfig, type CodemationAuthConfig, type CodemationAuthKind, type CodemationAuthOAuthProviderConfig, type CodemationAuthOidcProviderConfig, CodemationBootstrapRequest, type CodemationClassToken, type CodemationConfig, CodemationConsumerConfigLoader, type CodemationDatabaseConfig, type CodemationDatabaseKind, type CodemationEngineExecutionLimitsConfig, type CodemationEventBusConfig, type CodemationEventBusKind, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, type CodemationLogConfig, type CodemationLogLevelName, type CodemationLogRule, type CodemationPackageManifest, type CodemationPlugin, type CodemationPluginConfig, type CodemationPluginContext, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, CodemationServerGateway, type CodemationWhitelabelConfig, type CodemationWorkflowDiscovery, CollectionSchemaSyncerHolder, type CommandBus, DatabaseMigrations, type DefineCodemationAppOptions, type DefinePluginOptions, DeleteCollectionRowCommand, type FriendlyCodemationDatabaseConfig, type FriendlyCodemationExecutionConfig, type FrontendAppConfig, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, GetCollectionQuery, GetCollectionRowQuery, GetRunStateQuery, InsertCollectionRowCommand, type InternalAuthBootstrap, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListCollectionRowsQuery, ListCollectionsQuery, ListUserAccountsQuery, type PrismaDatabaseClient as PrismaClient, type PublicFrontendBootstrap, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, type QueryBus, type RunCommandResult, StartWorkflowRunCommand, SyncCollectionsCommand, UpdateCollectionRowCommand, UpsertLocalBootstrapUserCommand, type UpsertLocalBootstrapUserResultDto, WorkerRuntime, defineCodemationApp, definePlugin, workflow };
|
|
212
|
+
export { ApiPaths, type AppConfig, AppConfigFactory, AppContainerFactory, AppContainerLifecycle, type AppPluginLoadSummary, ApplicationRequestError, ApplicationTokens, BootTimer, type BootTracePhase, type CodemationAppContext, type CodemationAppDefinition, type CodemationAppSchedulerConfig, type CodemationAppSchedulerKind, type CodemationApplicationRuntimeConfig, type CodemationAuthConfig, type CodemationAuthKind, type CodemationAuthOAuthProviderConfig, type CodemationAuthOidcProviderConfig, CodemationBootstrapRequest, type CodemationClassToken, type CodemationConfig, CodemationConsumerConfigLoader, type CodemationDatabaseConfig, type CodemationDatabaseKind, type CodemationEngineExecutionLimitsConfig, type CodemationEventBusConfig, type CodemationEventBusKind, type CodemationFrontendAuthProviderSnapshot, type CodemationFrontendAuthSnapshot, CodemationFrontendAuthSnapshotFactory, CodemationFrontendAuthSnapshotJsonCodec, type CodemationLogConfig, type CodemationLogLevelName, type CodemationLogRule, type CodemationPackageManifest, type CodemationPlugin, type CodemationPluginConfig, type CodemationPluginContext, CodemationPluginListMerger, CodemationPluginPackageMetadata, CodemationPostgresPrismaClientFactory, type CodemationRegistrationContextBase, type CodemationSchedulerConfig, type CodemationSchedulerKind, CodemationServerGateway, type CodemationWhitelabelConfig, type CodemationWorkflowDiscovery, CollectionSchemaSyncerHolder, type CommandBus, DatabaseMigrations, type DefineCodemationAppOptions, type DefinePluginOptions, DeleteCollectionRowCommand, type FriendlyCodemationDatabaseConfig, type FriendlyCodemationExecutionConfig, type FrontendAppConfig, FrontendAppConfigFactory, FrontendAppConfigJsonCodec, FrontendRuntime, GetCollectionQuery, GetCollectionRowQuery, GetRunStateQuery, HeadlessApiRuntime, HeadlessHttpServerFactory, InsertCollectionRowCommand, type InternalAuthBootstrap, InternalAuthBootstrapFactory, InternalAuthBootstrapJsonCodec, ListCollectionRowsQuery, ListCollectionsQuery, ListUserAccountsQuery, type PrismaDatabaseClient as PrismaClient, type PublicFrontendBootstrap, PublicFrontendBootstrapFactory, PublicFrontendBootstrapJsonCodec, type QueryBus, type RunCommandResult, StartWorkflowRunCommand, SyncCollectionsCommand, UpdateCollectionRowCommand, UpsertLocalBootstrapUserCommand, type UpsertLocalBootstrapUserResultDto, WorkerRuntime, WorkflowWebsocketServerFactory, defineCodemationApp, definePlugin, workflow };
|
|
182
213
|
//# sourceMappingURL=index.d.ts.map
|