forked from mirrors/kingfisher
Added TOON output support, to optimize usage of kingfisher from LLM/agent workflows
This commit is contained in:
parent
1339f03e9d
commit
349b8165aa
16 changed files with 316 additions and 9 deletions
|
|
@ -15,7 +15,7 @@ pub struct OutputArgs<Format: ValueEnum + Send + Sync + 'static> {
|
|||
#[arg(global = true, long, short, value_hint = ValueHint::FilePath)]
|
||||
pub output: Option<PathBuf>,
|
||||
|
||||
/// Output format (defaults to `pretty` if not specified)
|
||||
/// Output format (defaults to `pretty`; use `toon` for LLM/agent integrations)
|
||||
#[arg(global = true, long, short, default_value = "pretty")]
|
||||
pub format: Format,
|
||||
}
|
||||
|
|
@ -50,6 +50,9 @@ pub enum ReportOutputFormat {
|
|||
/// BSON (binary JSON) format
|
||||
Bson,
|
||||
|
||||
/// TOON format optimized for LLMs and agents
|
||||
Toon,
|
||||
|
||||
/// SARIF format (experimental)
|
||||
Sarif,
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ pub struct RevokeArgs {
|
|||
#[arg(long = "no-builtins", default_value_t = false)]
|
||||
pub no_builtins: bool,
|
||||
|
||||
/// Output format: text or json
|
||||
#[arg(long, default_value = "text", value_parser = ["text", "json"])]
|
||||
/// Output format: text, json, or toon (`toon` is recommended for LLMs)
|
||||
#[arg(long, default_value = "text", value_parser = ["text", "json", "toon"])]
|
||||
pub format: String,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ pub struct ValidateArgs {
|
|||
#[arg(long = "no-builtins", default_value_t = false)]
|
||||
pub no_builtins: bool,
|
||||
|
||||
/// Output format: text or json
|
||||
#[arg(long, default_value = "text", value_parser = ["text", "json"])]
|
||||
/// Output format: text, json, or toon (`toon` is recommended for LLMs)
|
||||
#[arg(long, default_value = "text", value_parser = ["text", "json", "toon"])]
|
||||
pub format: String,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue