/** * Helper utilities for semantic input analysis. * * Constants, classification logic, and value-processing functions * used by the main input-analyzer module. */ import type { InputFieldMeta } from '../../types/yaml-workflow'; /** Max array length to embed as a default — larger arrays are execution-specific data. */ export declare const MAX_DEFAULT_ARRAY_LENGTH = 3; /** Max JSON string length to embed as an object default. */ export declare const MAX_DEFAULT_OBJECT_SIZE = 200; /** Max string length to embed as a fixed default — longer strings are execution-specific content. */ export declare const MAX_DEFAULT_STRING_LENGTH = 500; /** Keys that represent user-provided, per-invocation values. */ export declare const DYNAMIC_KEYS: Set; /** Keys that represent implementation details with sensible defaults. */ export declare const FIXED_KEYS: Set; /** Keys that represent inter-step wired data (output from a previous step). */ export declare const WIRED_KEYS: Set; export interface ExtractedStepLike { kind: 'tool' | 'llm'; toolName: string; arguments: Record; result?: unknown; } /** * Classify a single argument key as dynamic, fixed, or wired. */ export declare function classifyArgument(key: string, value: unknown, _context?: { stepIndex: number; toolName: string; }): 'dynamic' | 'fixed' | 'wired'; /** * Check if an array argument was likely produced by a prior step's result. * Compares the item keys of the argument array against result arrays from prior steps. */ export declare function isArrayWiredFromPriorStep(value: unknown[], priorSteps: ExtractedStepLike[]): boolean; /** Convert a snake_case/camelCase field name to a readable description. */ export declare function humanize(name: string): string; /** Infer a JSON Schema type string from a JS value. */ export declare function inferType(value: unknown): string; /** * Cap a default value to prevent embedding large execution-specific data. * Returns undefined if the value is too large to serve as a sensible default. */ export declare function capDefault(value: unknown): unknown | undefined; /** * Flatten a nested object argument into individual top-level input fields. * * For example, `login: { url: '...', username: '...', password: '...' }` * becomes three separate fields: `login_url` (dynamic), `username` (dynamic), * `password` (dynamic), preserving the relationship via description. */ export declare function flattenDynamicObject(parentKey: string, obj: Record, stepIndex: number, toolName: string, originalPrompt: string, seen: Map): void;