Frobs.Prompt (fnord v0.9.29)

View Source

UI-driven prompting for frob parameters. This module uses UI to prompt the user for each property defined in a frob's spec.json and returns a map of coerced values. It relies on AI.Tools.Params for validation/coercion.

Supports JSON Schema composition keywords (anyOf, oneOf, allOf) via schema resolution: nullable unions prompt for the non-null type, simple multi-type unions offer a type chooser, allOf merges and prompts the merged schema, and anything else falls back to raw JSON input.

Summary

Functions

Prompt the user for parameters described by spec.

Functions

prompt_for_params(spec, ui \\ UI)

@spec prompt_for_params(map(), module()) :: {:ok, map()} | {:error, term()}

Prompt the user for parameters described by spec.

Returns {:ok, map} or {:error, reason}.