horto_os_ui_mcp/tool_args.rs
1//! JSON-schema parameter structs for rmcp `Parameters<T>` tool handlers.
2
3use schemars::JsonSchema;
4use serde::Deserialize;
5
6/// Confirm string for destructive HTTP mutate.
7#[derive(Debug, Deserialize, JsonSchema)]
8pub struct BackupEtcArgs {
9 /// Must be exactly `backup-etc`.
10 pub confirm: String,
11}
12
13/// Apply mode and pipeline kind for setup tools.
14#[derive(Debug, Deserialize, JsonSchema)]
15pub struct SetupRunArgs {
16 /// When true, apply privileged changes on the box (default false = plan only).
17 #[serde(default)]
18 pub apply: bool,
19 /// Full pipeline when true (default true).
20 #[serde(default = "default_true")]
21 pub full: bool,
22 /// Skip piper download on the box.
23 #[serde(default)]
24 pub skip_piper: bool,
25}
26
27/// Single setup step.
28#[derive(Debug, Deserialize, JsonSchema)]
29pub struct SetupStepArgs {
30 /// Step id (`s1`, `m1`, `d1`, …).
31 pub step_id: String,
32 /// When true, apply privileged changes on the box (default false = plan only).
33 #[serde(default)]
34 pub apply: bool,
35 /// Treat the step as part of the full pipeline when true (default true).
36 #[serde(default = "default_true")]
37 pub full: bool,
38}
39
40/// Confirm for docker rebuild.
41#[derive(Debug, Deserialize, JsonSchema)]
42pub struct DockerRebuildArgs {
43 /// Must be exactly `docker-rebuild`.
44 pub confirm: String,
45}
46
47const fn default_true() -> bool {
48 true
49}