/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Task } from "@workglow/task-graph"; import type { FromSchema } from "@workglow/util/schema"; declare const inputSchema: { readonly type: "object"; readonly properties: { readonly input: { readonly title: "Single Input"; readonly description: "A single value to output"; }; }; readonly additionalProperties: false; }; declare const outputSchema: { readonly type: "object"; readonly properties: {}; readonly additionalProperties: true; }; export type SplitTaskInput = FromSchema; export type SplitTaskOutput = FromSchema; /** * Splits an array (or single value) input into one output per element, named * `output_0`, `output_1`, ... Single values become a single-element output. */ export declare class SplitTask extends Task { static type: string; static category: string; static title: string; static description: string; static cachePolicy: CachePolicy; static inputSchema(): { readonly type: "object"; readonly properties: { readonly input: { readonly title: "Single Input"; readonly description: "A single value to output"; }; }; readonly additionalProperties: false; }; static outputSchema(): { readonly type: "object"; readonly properties: {}; readonly additionalProperties: true; }; execute(input: Input, _context: IExecuteContext): Promise; executePreview(input: Input): Promise; } export declare const split: (input: SplitTaskInput, config?: TaskConfig) => Promise<{ [x: string]: unknown; }>; declare module "@workglow/task-graph" { interface Workflow { split: CreateWorkflow; } } export {};