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

Function summarize_verification

atomic-agent/src/provenance/classify.rs:552–573  ·  view source on GitHub ↗
(
    tool_input: Option<&serde_json::Value>,
    tool_output: Option<&str>,
    status: Option<&str>,
)

Source from the content-addressed store, hash-verified

550}
551
552fn summarize_verification(
553 tool_input: Option<&serde_json::Value>,
554 tool_output: Option<&str>,
555 status: Option<&str>,
556) -> String {
557 let cmd = extract_command(tool_input);
558 let cmd = cmd.trim();
559
560 let passed = infer_verification_passed(tool_input, tool_output, status);
561
562 let result_suffix = match passed {
563 Some(true) => " (passed)",
564 Some(false) => " (failed)",
565 None => "",
566 };
567
568 if cmd.is_empty() {
569 format!("Run verification{}", result_suffix)
570 } else {
571 format!("{}{}", truncate_for_summary(cmd, 300), result_suffix)
572 }
573}
574
575/// Infer whether a verification command passed.
576///

Callers 1

summarize_tool_callFunction · 0.85

Calls 3

extract_commandFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected