MCPcopy Create free account
hub / github.com/AI45Lab/Code / cancelled_run_event

Function cancelled_run_event

core/src/ahp/contract.rs:94–111  ·  view source on GitHub ↗
(
    run_id: &str,
    session_id: &str,
    agent_id: &str,
    depth: u32,
    reason: Option<&str>,
)

Source from the content-addressed store, hash-verified

92}
93
94pub fn cancelled_run_event(
95 run_id: &str,
96 session_id: &str,
97 agent_id: &str,
98 depth: u32,
99 reason: Option<&str>,
100) -> a3s_ahp::AhpEvent {
101 run_lifecycle_event(RunLifecycleParams {
102 run_id,
103 session_id,
104 agent_id,
105 depth,
106 status: a3s_ahp::RunStatus::Cancelled,
107 prompt: None,
108 result_summary: None,
109 error: reason.map(str::to_string),
110 })
111}
112
113struct RunLifecycleParams<'a> {
114 run_id: &'a str,

Callers 1

publish_run_cancelledMethod · 0.85

Calls 1

run_lifecycle_eventFunction · 0.85

Tested by

no test coverage detected