/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { GraphAsTaskConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, GraphAsTask } from "@workglow/task-graph"; import type { FromSchema } from "@workglow/util/schema"; declare const inputSchema: { readonly type: "object"; readonly properties: { readonly json: { readonly type: "string"; readonly title: "JSON"; readonly description: "The JSON to parse"; }; }; readonly additionalProperties: false; }; export type JsonTaskInput = FromSchema; declare const outputSchema: { readonly type: "object"; readonly properties: { readonly output: { readonly title: "Output"; readonly description: "Output depends on the generated task graph"; }; }; readonly additionalProperties: false; }; export type JsonTaskOutput = FromSchema; /** * JsonTask is a specialized task that creates and manages task graphs from JSON configurations. * It allows dynamic creation of task networks by parsing JSON definitions of tasks and their relationships. */ export declare class JsonTask = GraphAsTaskConfig> extends GraphAsTask { static type: string; static category: string; static title: string; static description: string; static inputSchema(): { readonly type: "object"; readonly properties: { readonly json: { readonly type: "string"; readonly title: "JSON"; readonly description: "The JSON to parse"; }; }; readonly additionalProperties: false; }; static outputSchema(): { readonly type: "object"; readonly properties: { readonly output: { readonly title: "Output"; readonly description: "Output depends on the generated task graph"; }; }; readonly additionalProperties: false; }; /** * Regenerates the task subgraph from the current JSON input. Accepts either * a graph-format `{ tasks, dataflows }` or a dependency-format array. */ regenerateGraph(): void; } export declare const json: (input: JsonTaskInput, config?: TaskConfig) => Promise<{ output?: unknown; }>; declare module "@workglow/task-graph" { interface Workflow { json: CreateWorkflow; } } export {};