aboutsummaryrefslogtreecommitdiff
path: root/src/cli/spec.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/spec.rs')
-rw-r--r--src/cli/spec.rs19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/cli/spec.rs b/src/cli/spec.rs
index 4c68e3a5..f27eed49 100644
--- a/src/cli/spec.rs
+++ b/src/cli/spec.rs
@@ -160,6 +160,16 @@ fn workspace_command() -> Command {
.arg(required("workspace_id", "WORKSPACE_ID"))
.arg(required("label", "LABEL").num_args(1..)),
)
+ .subcommand(
+ Command::new("report-metadata")
+ .about("Report display-only workspace metadata")
+ .arg(required("workspace_id", "WORKSPACE_ID"))
+ .arg(option("source", "ID"))
+ .arg(repeatable_option("token", "NAME=VALUE"))
+ .arg(repeatable_option("clear-token", "NAME"))
+ .arg(option("seq", "N"))
+ .arg(option("ttl-ms", "N")),
+ )
.subcommand(id_command("close", "workspace_id", "Close a workspace"))
}
@@ -467,7 +477,6 @@ fn report_agent_command() -> Command {
.arg(option("agent", "LABEL"))
.arg(pane_agent_state_option("state"))
.arg(option("message", "TEXT"))
- .arg(option("custom-status", "TEXT"))
.arg(option("seq", "N"))
.arg(option("agent-session-id", "ID"))
.arg(path_option("agent-session-path", "PATH"))
@@ -505,10 +514,10 @@ fn report_metadata_command() -> Command {
.arg(flag("clear-title"))
.arg(option("display-agent", "TEXT"))
.arg(flag("clear-display-agent"))
- .arg(option("custom-status", "TEXT"))
- .arg(flag("clear-custom-status"))
.arg(option("state-label", "STATUS=TEXT"))
.arg(flag("clear-state-labels"))
+ .arg(repeatable_option("token", "NAME=VALUE"))
+ .arg(repeatable_option("clear-token", "NAME"))
.arg(option("seq", "N"))
.arg(option("ttl-ms", "N"))
}
@@ -817,6 +826,10 @@ fn option(name: &'static str, value_name: &'static str) -> Arg {
.action(ArgAction::Set)
}
+fn repeatable_option(name: &'static str, value_name: &'static str) -> Arg {
+ option(name, value_name).action(ArgAction::Append)
+}
+
fn path_option(name: &'static str, value_name: &'static str) -> Arg {
option(name, value_name).value_hint(ValueHint::AnyPath)
}