/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { TaskInput } from "@workglow/task-graph"; import type { DataPortSchemaObject } from "@workglow/util/schema"; export interface ResolveInputOptions { readonly inputJson?: string; readonly inputJsonFile?: string; readonly dynamicFlags: Record; readonly schema: DataPortSchemaObject; } /** * Merge input from multiple sources with priority: * 1. --input-json or --input-json-file as base * 2. Non-TTY stdin (if no explicit input provided) * 3. Dynamic flags overlay on top */ export declare function resolveInput(opts: ResolveInputOptions): Promise>; export declare function deepMerge(target: Record, source: Record): Record; /** * Read JSON input from --input-json, --input-json-file, or non-TTY stdin. * Used for commands where dynamic flags don't apply (workflow/agent add). */ export declare function readJsonInput(opts: { inputJson?: string; inputJsonFile?: string; }): Promise; /** * Read task/workflow config from --config-json or --config-json-file. * Returns an empty object if neither is provided. */ export declare function resolveConfig(opts: { configJson?: string; configJsonFile?: string; }): Promise>; /** * Apply default values from schema for missing fields. */ export declare function applySchemaDefaults(input: Partial, schema: DataPortSchemaObject): Partial; export interface ValidationResult { readonly valid: boolean; readonly errors: string[]; } /** * Validate input against a DataPortSchemaObject. * Checks required properties and basic type matching. * Conditional required fields use {@link evaluateConditionalRequired} (same as prompting). */ export declare function validateInput(input: Partial, schema: DataPortSchemaObject): ValidationResult;