core: restore network approval protocol helper

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-23 20:48:11 -07:00
co-authored by Codex
parent e2494aeaa1
commit 7c8927ed29
@@ -345,6 +345,18 @@ pub(crate) fn guardian_assessment_action_value(action: &GuardianApprovalRequest)
}
}
fn network_approval_protocol_value(protocol: NetworkApprovalProtocol) -> Value {
Value::String(
match protocol {
NetworkApprovalProtocol::Http => "http",
NetworkApprovalProtocol::Https => "https",
NetworkApprovalProtocol::Socks5Tcp => "socks5_tcp",
NetworkApprovalProtocol::Socks5Udp => "socks5_udp",
}
.to_string(),
)
}
pub(crate) fn guardian_request_id(request: &GuardianApprovalRequest) -> &str {
match request {
GuardianApprovalRequest::Shell { id, .. }