mcp: add systemd://unit/{name} and docker://container/{name} resource templates
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YShymaPrXmc3KYRUg2HMSs
This commit is contained in:
1 parent
74802efd0e
commit
28b3a8b572
6 files changed
+115
-7
No files matched your search
@@ -218,7 +218,7 @@ impl DockerSource for BollardDocker {
|
||||
}
|
||||
|
||||
/// Strip the leading `/` and reject names that could alter the request path.
|
||||
fn normalize_name(name: &str) -> Result<String, AppError> {
|
||||
pub(crate) fn normalize_name(name: &str) -> Result<String, AppError> {
|
||||
let n = name.trim().trim_start_matches('/');
|
||||
let valid = n.len() <= 255
|
||||
&& n.chars().next().is_some_and(|c| c.is_ascii_alphanumeric())
|
||||
|
||||
Reference in new issue
Block a user