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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
use clap::Args;
#[derive(Debug, Args)]
pub(crate) struct DumpHighlightKeywordsArgs {
/// Path to the generated keyword file (relative to the repo root).
#[arg(long, default_value = "docs/theme/harn-keywords.js")]
pub output: String,
/// Path to the portable machine-readable vocabulary manifest.
#[arg(long, default_value = "spec/language-vocabulary.json")]
pub json_output: String,
/// Package-local projection used by the standalone browser demo.
#[arg(long, default_value = "crates/harn-wasm/demo/language-vocabulary.json")]
pub wasm_json_output: String,
/// Verify the on-disk file matches what would be generated; exit non-zero
/// if stale. Used by CI to prevent drift between the highlighter and the
/// lexer/stdlib.
#[arg(long)]
pub check: bool,
}
#[derive(Debug, Args)]
pub(crate) struct DumpPromptGrammarArgs {
/// Path to the generated TextMate grammar (relative to the repo root).
#[arg(
long,
default_value = "editors/vscode/syntaxes/harn-prompt.tmLanguage.json"
)]
pub output: String,
/// Verify the on-disk grammar matches what would be generated; exit
/// non-zero if stale. Used by CI to prevent drift between the editor
/// grammar and the prompt-template engine.
#[arg(long)]
pub check: bool,
}
#[derive(Debug, Args)]
pub(crate) struct DumpPortableBenchmarkSchemaArgs {
/// Path to the generated Portable Kernel benchmark receipt schema.
#[arg(
long,
default_value = "spec/schemas/portable-kernel-benchmark.v1.schema.json"
)]
pub output: String,
/// Verify the committed schema matches the kernel-owned receipt contract.
#[arg(long)]
pub check: bool,
}
#[derive(Debug, Args)]
pub(crate) struct DumpTriggerQuickrefArgs {
/// Path to the generated trigger quickref file (relative to the repo root).
#[arg(long, default_value = "docs/llm/harn-triggers-quickref.md")]
pub output: String,
/// Verify the on-disk file matches what would be generated; exit non-zero
/// if stale. Used by CI to prevent drift between the quickref and the
/// runtime trigger provider catalog.
#[arg(long)]
pub check: bool,
}
#[derive(Debug, Args)]
pub(crate) struct DumpConnectorMatrixArgs {
/// Path to the generated connector parity matrix page (relative to the repo root).
#[arg(long, default_value = "docs/src/connectors/parity-matrix.md")]
pub output: String,
/// Package manifest, package directory, or directory tree to scan. Repeatable.
#[arg(long = "source", value_name = "PATH")]
pub sources: Vec<String>,
/// Verify the on-disk file matches what would be generated; exit non-zero
/// if stale. Used by CI to prevent drift from connector package manifests.
#[arg(long)]
pub check: bool,
}
#[derive(Debug, Args)]
pub(crate) struct ConnectorSchemaCodegenArgs {
/// Schema module to read. Defaults to the embedded canonical copy
/// (`harn_stdlib::CONNECTOR_EVENT_SCHEMAS_SOURCE`).
#[arg(long, value_name = "FILE")]
pub schema: Option<String>,
/// Path for the vendored generated Rust file (relative to the repo root).
#[arg(long, value_name = "FILE")]
pub out: Option<String>,
/// Verify the vendored file matches the generator output; exit non-zero if
/// stale. Used by CI to prevent drift between the Harn schema and the
/// generated Rust structs.
#[arg(long)]
pub check: bool,
}
#[derive(Debug, Args)]
pub(crate) struct DumpProtocolArtifactsArgs {
/// Directory for generated protocol schemas and bindings.
#[arg(long, default_value = "spec/protocol-artifacts")]
pub output_dir: String,
/// Verify checked-in artifacts match the generator output; exit non-zero
/// if stale.
#[arg(long)]
pub check: bool,
/// Stamp generated bindings and fixtures with an explicit Harn release
/// version. Release automation uses this after updating workspace metadata
/// so the already-built generator does not need to be rebuilt.
#[arg(long, value_name = "SEMVER")]
pub artifact_version: Option<String>,
}