MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / group_has_hook_spec

Function group_has_hook_spec

atomic-agent/src/hooks/codex.rs:525–539  ·  view source on GitHub ↗
(
    group: &Value,
    command: &str,
    status_message: Option<&str>,
    timeout_sec: Option<u64>,
)

Source from the content-addressed store, hash-verified

523}
524
525fn group_has_hook_spec(
526 group: &Value,
527 command: &str,
528 status_message: Option<&str>,
529 timeout_sec: Option<u64>,
530) -> bool {
531 group
532 .get("hooks")
533 .and_then(Value::as_array)
534 .is_some_and(|hooks| {
535 hooks
536 .iter()
537 .any(|hook| hook_matches_spec(hook, command, status_message, timeout_sec))
538 })
539}
540
541fn hook_matches_spec(
542 hook: &Value,

Callers 1

Calls 3

hook_matches_specFunction · 0.85
getMethod · 0.65
iterMethod · 0.45

Tested by

no test coverage detected