1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
use clap::Args;
#[derive(Debug, Args)]
pub(crate) struct RunArgs {
/// Print the LLM trace summary after execution.
#[arg(long)]
pub trace: bool,
/// Print a categorical timing breakdown after execution (LLM vs tools
/// vs steps vs VM/residual). Implies tracing instrumentation; OK to
/// combine with `--trace`.
#[arg(long)]
pub profile: bool,
/// Write the profile rollup as JSON to the given path. Implies `--profile`.
#[arg(long = "profile-json", value_name = "PATH")]
pub profile_json: Option<String>,
/// Deny specific builtins as a comma-separated list.
#[arg(long, conflicts_with = "allow")]
pub deny: Option<String>,
/// Allow only the listed builtins as a comma-separated list.
#[arg(long, conflicts_with = "deny")]
pub allow: Option<String>,
/// Evaluate inline Harn code instead of a file.
#[arg(short = 'e')]
pub eval: Option<String>,
/// Extra skill-discovery roots. Repeatable; each path is a
/// directory of `<name>/SKILL.md` bundles, equivalent to a
/// single-entry `$HARN_SKILLS_PATH`. Highest-priority layer —
/// wins ties against every other layer. See `docs/src/skills.md`.
#[arg(long = "skill-dir", value_name = "PATH")]
pub skill_dir: Vec<String>,
/// Replay LLM responses from a JSONL fixture file instead of
/// calling the configured provider.
#[arg(
long = "llm-mock",
value_name = "PATH",
conflicts_with = "llm_mock_record"
)]
pub llm_mock: Option<String>,
/// Record executed LLM responses into a JSONL fixture file.
#[arg(
long = "llm-mock-record",
value_name = "PATH",
conflicts_with = "llm_mock"
)]
pub llm_mock_record: Option<String>,
/// Emit a signed provenance receipt after the run.
#[arg(long)]
pub attest: bool,
/// Write the signed provenance receipt to this path instead of `.harn/receipts/`.
#[arg(long = "receipt-out", value_name = "PATH", requires = "attest")]
pub receipt_out: Option<String>,
/// Agent id used to look up or generate the receipt signing key.
#[arg(long = "attest-agent", value_name = "ID", requires = "attest")]
pub attest_agent: Option<String>,
/// Path to the .harn file to execute.
pub file: Option<String>,
/// Positional arguments passed to the pipeline as the global `argv`
/// list. Place them after a `--` separator: `harn run script.harn -- a b c`.
// `last = true` alone routes post-`--` tokens into `argv`; combining it
// with `trailing_var_arg = true` panics at clap runtime.
#[arg(last = true)]
pub argv: Vec<String>,
}