pub fn is_valid_id(s: &str) -> boolExpand description
T-310: charset rule for project.id and agent ids — both flow,
unquoted, into shell-bound strings ({project}:{agent} in
supervisor::build_up_command) and into tmux session names. A
conservative ASCII allowlist keeps every downstream consumer safe
at the boundary instead of forcing each call site to quote
defensively. : is intentionally NOT allowed — it’s reserved as
the canonical <project>:<agent> join separator everywhere in
teamctl, and admitting it into an id would make id() parse
ambiguous.
Rejected by construction: any whitespace, any shell metacharacter
(;, |, &, $, backtick, (, ), <, >, *, ?, ~,
!, #, ', ", \), any control char, any non-ASCII (incl.
emoji), the empty string.