import { o as DefinedCollection } from "./index-Cy08dvyb.js"; import { E as NodeInspectorSummaryRow, M as RunnableNodeConfig, N as RunnableNodeOutputJson, P as WorkflowDefinition, S as Items, X as TypeToken, at as DefinedNodeConfigInput, ct as AnyCredentialType, f as NodeExecutionContext, ht as CredentialJsonRecord, i as ToolConfig, it as DefinedNode, n as AgentMessageConfig, nt as ChainCursor, r as ChatModelConfig, rt as AnyRunnableNodeConfig, st as McpServerDeclaration, t as AgentGuardrailConfig, x as Item } from "./ItemsInputNormalizer-C2gLv7d9.js"; import { c as CodemationPluginContext, m as CodemationConfig, o as CodemationPlugin, t as CodemationAppContext } from "./CodemationAppContext-CA4xzGA6.js"; import { t as CodemationWhitelabelConfig } from "./CodemationWhitelabelConfig-CPKKZwGp.js"; import "ai"; import { ZodType, z } from "zod"; //#region ../core-nodes/src/nodes/nodeOptions.types.d.ts interface NodeBaseOptions { readonly id?: string; readonly description?: string; } //#endregion //#region ../core-nodes/src/nodes/aggregate.d.ts declare class Aggregate implements RunnableNodeConfig { readonly name: string; readonly aggregate: (items: Items, ctx: NodeExecutionContext>) => TOut | Promise; readonly kind: "node"; readonly type: TypeToken; readonly execution: { readonly hint: "local"; }; readonly keepBinaries: true; readonly icon: "builtin:aggregate-rows"; readonly id?: string; readonly description?: string; constructor(name: string, aggregate: (items: Items, ctx: NodeExecutionContext>) => TOut | Promise, idOrOptions?: string | NodeBaseOptions); inspectorSummary(): ReadonlyArray | undefined; } //#endregion //#region ../core-nodes/src/nodes/filter.d.ts declare class Filter implements RunnableNodeConfig { readonly name: string; readonly predicate: (item: Item, index: number, items: Items, ctx: NodeExecutionContext>) => boolean; readonly kind: "node"; readonly type: TypeToken; readonly execution: { readonly hint: "local"; }; readonly icon: "lucide:filter"; readonly id?: string; readonly description?: string; constructor(name: string, predicate: (item: Item, index: number, items: Items, ctx: NodeExecutionContext>) => boolean, idOrOptions?: string | NodeBaseOptions); inspectorSummary(): ReadonlyArray | undefined; } //#endregion //#region ../core-nodes/src/nodes/if.d.ts declare class If implements RunnableNodeConfig { readonly name: string; readonly predicate: (item: Item, index: number, items: Items, ctx: NodeExecutionContext>) => boolean; readonly kind: "node"; readonly type: TypeToken; readonly execution: { readonly hint: "local"; }; readonly icon: "lucide:split@rot=90"; readonly declaredOutputPorts: readonly ["true", "false"]; readonly id?: string; readonly description?: string; constructor(name: string, predicate: (item: Item, index: number, items: Items, ctx: NodeExecutionContext>) => boolean, idOrOptions?: string | NodeBaseOptions); inspectorSummary(): ReadonlyArray | undefined; } //#endregion //#region ../core-nodes/src/nodes/switch.d.ts type SwitchCaseKeyResolver = (item: Item, index: number, items: Items, ctx: NodeExecutionContext>) => string | Promise; declare class Switch implements RunnableNodeConfig { readonly name: string; readonly cfg: Readonly<{ cases: readonly string[]; defaultCase: string; resolveCaseKey: SwitchCaseKeyResolver; }>; readonly kind: "node"; readonly type: TypeToken; readonly execution: { readonly hint: "local"; }; readonly icon: "lucide:git-branch-plus"; readonly declaredOutputPorts: ReadonlyArray; readonly id?: string; readonly description?: string; constructor(name: string, cfg: Readonly<{ cases: readonly string[]; defaultCase: string; resolveCaseKey: SwitchCaseKeyResolver; }>, idOrOptions?: string | NodeBaseOptions); inspectorSummary(): ReadonlyArray; } //#endregion //#region ../core-nodes/src/nodes/split.d.ts declare class Split implements RunnableNodeConfig { readonly name: string; readonly getElements: (item: Item, ctx: NodeExecutionContext>) => readonly TElem[]; readonly kind: "node"; readonly type: TypeToken; readonly execution: { readonly hint: "local"; }; readonly keepBinaries: true; readonly continueWhenEmptyOutput: true; readonly icon: "builtin:split-rows"; readonly id?: string; readonly description?: string; constructor(name: string, getElements: (item: Item, ctx: NodeExecutionContext>) => readonly TElem[], idOrOptions?: string | NodeBaseOptions); inspectorSummary(): ReadonlyArray | undefined; } //#endregion //#region ../core-nodes/src/nodes/mapData.d.ts interface MapDataOptions extends NodeBaseOptions { readonly keepBinaries?: boolean; } declare class MapData implements RunnableNodeConfig { readonly name: string; readonly map: (item: Item, ctx: NodeExecutionContext>) => TOutputJson; private readonly options; readonly kind: "node"; readonly type: TypeToken; readonly execution: { readonly hint: "local"; }; readonly continueWhenEmptyOutput: true; readonly icon: "lucide:square-pen"; readonly keepBinaries: boolean; readonly description?: string; constructor(name: string, map: (item: Item, ctx: NodeExecutionContext>) => TOutputJson, options?: MapDataOptions); get id(): string | undefined; inspectorSummary(): ReadonlyArray | undefined; } //#endregion //#region ../core-nodes/src/nodes/merge.d.ts type MergeMode = "passThrough" | "append" | "mergeByPosition"; //#endregion //#region ../core-nodes/src/workflowAuthoring/WorkflowAuthoringOptions.types.d.ts type WorkflowAgentMessages = AgentMessageConfig; interface WorkflowAgentOptions { readonly messages: WorkflowAgentMessages; readonly model: string | ChatModelConfig; readonly tools?: ReadonlyArray; readonly outputSchema?: TOutputSchema; readonly retryPolicy?: RunnableNodeConfig["retryPolicy"]; readonly guardrails?: AgentGuardrailConfig; readonly id?: string; } //#endregion //#region ../core-nodes/src/workflowAuthoring/WorkflowBranchBuilder.types.d.ts type WorkflowMapCallback$1 = (item: Item, ctx: NodeExecutionContext>) => TNextJson; declare class WorkflowBranchBuilder { private readonly steps; constructor(steps?: ReadonlyArray); then>(config: TConfig): WorkflowBranchBuilder>; map(mapper: WorkflowMapCallback$1): WorkflowBranchBuilder; map(name: string, mapper: WorkflowMapCallback$1, options?: MapDataOptions): WorkflowBranchBuilder; wait(duration: number | string): WorkflowBranchBuilder; wait(name: string, duration: number | string, id?: string): WorkflowBranchBuilder; split(getElements: (item: Item, ctx: NodeExecutionContext>) => readonly TElem[]): WorkflowBranchBuilder; split(name: string, getElements: (item: Item, ctx: NodeExecutionContext>) => readonly TElem[], id?: string): WorkflowBranchBuilder; filter(predicate: (item: Item, index: number, items: Items, ctx: NodeExecutionContext>) => boolean): WorkflowBranchBuilder; filter(name: string, predicate: (item: Item, index: number, items: Items, ctx: NodeExecutionContext>) => boolean, id?: string): WorkflowBranchBuilder; aggregate(aggregateFn: (items: Items, ctx: NodeExecutionContext>) => TOut | Promise): WorkflowBranchBuilder; aggregate(name: string, aggregateFn: (items: Items, ctx: NodeExecutionContext>) => TOut | Promise, id?: string): WorkflowBranchBuilder; agent(options: WorkflowAgentOptions): WorkflowBranchBuilder>; agent(options: WorkflowAgentOptions): WorkflowBranchBuilder>; agent(name: string, options: WorkflowAgentOptions): WorkflowBranchBuilder : Record>; node(definitionOrKey: DefinedNode | string, config: DefinedNodeConfigInput, name?: string, id?: string): TCurrentJson extends TInputJson ? WorkflowBranchBuilder : never; getSteps(): ReadonlyArray; } //#endregion //#region ../core-nodes/src/workflowAuthoring/WorkflowChain.types.d.ts type BranchCallback = (branch: WorkflowBranchBuilder) => WorkflowBranchBuilder; type RouteBranchCallback = (branch: WorkflowChain) => WorkflowChain; type WorkflowMapCallback = (item: Item, ctx: NodeExecutionContext>) => TNextJson; type WorkflowIfPredicate = (item: Item, ctx: NodeExecutionContext>) => boolean; type WorkflowSwitchCaseKeyResolver = (item: Item, ctx: NodeExecutionContext>) => string | Promise; declare class WorkflowChain { private readonly chain; constructor(chain: ChainCursor); then>(config: TConfig): WorkflowChain>; map(mapper: WorkflowMapCallback): WorkflowChain; map(name: string, mapper: WorkflowMapCallback, options?: MapDataOptions): WorkflowChain; wait(duration: number | string): WorkflowChain; wait(name: string, duration: number | string, id?: string): WorkflowChain; split(getElements: (item: Item, ctx: NodeExecutionContext>) => readonly TElem[]): WorkflowChain; split(name: string, getElements: (item: Item, ctx: NodeExecutionContext>) => readonly TElem[], id?: string): WorkflowChain; filter(predicate: (item: Item, index: number, items: Items, ctx: NodeExecutionContext>) => boolean): WorkflowChain; filter(name: string, predicate: (item: Item, index: number, items: Items, ctx: NodeExecutionContext>) => boolean, id?: string): WorkflowChain; aggregate(aggregateFn: (items: Items, ctx: NodeExecutionContext>) => TOut | Promise): WorkflowChain; aggregate(name: string, aggregateFn: (items: Items, ctx: NodeExecutionContext>) => TOut | Promise, id?: string): WorkflowChain; merge(): WorkflowChain; merge(cfg: Readonly<{ mode: MergeMode; prefer?: ReadonlyArray; }>, id?: string): WorkflowChain; merge(name: string, cfg?: Readonly<{ mode: MergeMode; prefer?: ReadonlyArray; }>, id?: string): WorkflowChain; if(predicate: WorkflowIfPredicate, branches: Readonly<{ true?: BranchCallback; false?: BranchCallback; }>): WorkflowChain; if(name: string, predicate: WorkflowIfPredicate, branches: Readonly<{ true?: BranchCallback; false?: BranchCallback; }>): WorkflowChain; route(branches: Readonly | undefined>>): WorkflowChain; switch(cfg: Readonly<{ cases: readonly string[]; defaultCase: string; resolveCaseKey: WorkflowSwitchCaseKeyResolver; branches: Readonly | undefined>>; }>): WorkflowChain; switch(name: string, cfg: Readonly<{ cases: readonly string[]; defaultCase: string; resolveCaseKey: WorkflowSwitchCaseKeyResolver; branches: Readonly | undefined>>; }>, id?: string): WorkflowChain; agent(options: WorkflowAgentOptions): WorkflowChain>; agent(options: WorkflowAgentOptions): WorkflowChain>; agent(name: string, options: WorkflowAgentOptions): WorkflowChain : Record>; node(definitionOrKey: DefinedNode | string, config: DefinedNodeConfigInput, name?: string, id?: string): TCurrentJson extends TInputJson ? WorkflowChain : never; build(): WorkflowDefinition; } //#endregion //#region ../core-nodes/src/workflowAuthoring/WorkflowAuthoringBuilder.types.d.ts declare class WorkflowAuthoringBuilder { private readonly id; private readonly workflowName; constructor(id: string, workflowName?: string); name(name: string): WorkflowAuthoringBuilder; manualTrigger(defaultItems: TOutputJson | ReadonlyArray): WorkflowChain; manualTrigger(name: string, defaultItems?: TOutputJson | ReadonlyArray, id?: string): WorkflowChain; } //#endregion //#region ../core-nodes/src/workflowAuthoring.types.d.ts declare function workflow(id: string): WorkflowAuthoringBuilder; //#endregion //#region src/presentation/config/CodemationAuthoring.types.d.ts interface FriendlyCodemationDatabaseConfig { readonly kind: "postgresql" | "sqlite"; readonly url?: string; readonly urlEnv?: string; readonly filePath?: string; } interface FriendlyCodemationExecutionConfig { readonly mode?: "inline" | "queue"; readonly modeEnv?: string; readonly queuePrefix?: string; readonly workerQueues?: ReadonlyArray; readonly redisUrl?: string; readonly redisUrlEnv?: string; } interface DefineCodemationAppOptions extends Omit { readonly name?: string; readonly codemationVersion?: string; readonly auth?: CodemationConfig["auth"]; readonly database?: FriendlyCodemationDatabaseConfig; readonly execution?: FriendlyCodemationExecutionConfig; readonly nodes?: ReadonlyArray, unknown, unknown>>; readonly collections?: ReadonlyArray; readonly credentialTypes?: ReadonlyArray; readonly credentials?: ReadonlyArray; readonly register?: (context: CodemationAppContext) => void; readonly whitelabel?: CodemationWhitelabelConfig; readonly workflowsDir?: string; } interface DefinePluginOptions { readonly name?: string; readonly pluginPackageId?: string; readonly nodes?: ReadonlyArray, unknown, unknown>>; readonly collections?: ReadonlyArray; readonly credentials?: ReadonlyArray; readonly mcpServers?: ReadonlyArray; readonly register?: (context: CodemationPluginContext) => void | Promise; readonly sandbox?: CodemationConfig; } declare function defineCodemationApp(options: DefineCodemationAppOptions): CodemationConfig; declare function definePlugin(options: DefinePluginOptions): CodemationPlugin & Readonly<{ sandbox?: CodemationConfig; }>; //#endregion export { defineCodemationApp as a, FriendlyCodemationExecutionConfig as i, DefinePluginOptions as n, definePlugin as o, FriendlyCodemationDatabaseConfig as r, workflow as s, DefineCodemationAppOptions as t }; //# sourceMappingURL=CodemationAuthoring.types-DXkP7M6R.d.ts.map