Skip to main content

Module task

Module task 

Source
Expand description

Turning what the caller typed into the text an agent actually runs on.

Two inputs land here: --task, which is either a prompt or the path of a file holding one, and the dynamic --<region> flags, whose values take an explicit @ before a path. Left off entirely, --task opens the user’s editor on a commented template.

Everything in this module is Leviath policy rather than OS behavior, and none of it carries a #[cfg]. Finding and running the editor itself is the OS’s business and lives in leviath_sys::editor.

Functions§

read_region_value
Resolve one CLI region-flag value: @path reads (and trims) that file’s contents; anything else is literal text. Unlike --task, the @ is an explicit file marker, so a missing @file is an error (the user meant a file), not a literal fallback.
resolve_task
Resolve the task text from what --task was given, if anything.