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

Function group_has_hook_spec

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

Source from the content-addressed store, hash-verified

537}
538
539fn group_has_hook_spec(
540 group: &Value,
541 command: &str,
542 status_message: Option<&str>,
543 timeout_sec: Option<u64>,
544) -> bool {
545 group
546 .get("hooks")
547 .and_then(Value::as_array)
548 .is_some_and(|hooks| {
549 hooks
550 .iter()
551 .any(|hook| hook_matches_spec(hook, command, status_message, timeout_sec))
552 })
553}
554
555fn hook_matches_spec(
556 hook: &Value,

Callers 1

Calls 3

hook_matches_specFunction · 0.85
getMethod · 0.65
iterMethod · 0.45

Tested by

no test coverage detected