use rmcp::schemars;
use serde::Deserialize;
use crate::schema::{
OptionScopeSchema, ResizeDirectionSchema, SelectPaneDirectionSchema,
SelectWindowDirectionSchema,
};
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct SessionArgs {
pub session: String,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct CreateSessionArgs {
pub name: String,
pub start_directory: Option<String>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct PaneArgs {
pub pane: String,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct WindowArgs {
pub window: String,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct SelectPaneArgs {
pub pane: String,
#[schemars(with = "Option<SelectPaneDirectionSchema>")]
pub direction: Option<String>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct RunCommandArgs {
pub pane: String,
pub command: String,
pub seconds: Option<u64>,
#[serde(default)]
pub suppress_history: bool,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct ShowEnvironmentArgs {
pub session: Option<String>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct ShowHooksArgs {
pub session: Option<String>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct SelectLayoutArgs {
pub window: String,
pub layout: String,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct PasteTextArgs {
pub pane: String,
pub text: String,
#[serde(default)]
pub enter: bool,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct WaitForTextArgs {
pub pane: String,
#[schemars(length(max = 32))]
pub patterns: Option<Vec<String>>,
#[schemars(length(max = 32))]
pub stop: Option<Vec<String>>,
#[serde(default)]
pub regex: bool,
#[serde(default)]
pub match_case: bool,
pub seconds: Option<u64>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct CaptureSinceArgs {
pub pane: String,
pub cursor: Option<String>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct SelectWindowArgs {
pub window: String,
#[schemars(with = "Option<SelectWindowDirectionSchema>")]
pub direction: Option<String>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct SearchPanesArgs {
#[schemars(length(max = 4096))]
pub pattern: String,
#[serde(default)]
pub regex: bool,
#[serde(default)]
pub match_case: bool,
#[serde(default)]
pub history: bool,
pub session: Option<String>,
pub window: Option<String>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct OptionArgs {
pub name: String,
#[schemars(with = "Option<OptionScopeSchema>")]
pub scope: Option<String>,
pub target: Option<String>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct SnapshotArgs {
pub pane: String,
pub max_lines: Option<usize>,
#[serde(default)]
pub history: bool,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct ChannelArgs {
pub channel: String,
pub seconds: Option<u64>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct ResizePaneArgs {
pub pane: String,
#[schemars(with = "ResizeDirectionSchema")]
pub direction: String,
pub cells: u32,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct CapturePaneArgs {
pub pane: String,
#[serde(default)]
pub history: bool,
#[serde(default)]
pub last_command: bool,
pub start: Option<i32>,
pub end: Option<i32>,
}
#[derive(Debug, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct SendKeysArgs {
pub pane: String,
pub text: Option<String>,
pub keys: Option<Vec<String>>,
#[serde(default)]
pub enter: bool,
}