blob: 6d3c96924ac1a0350758e1d6d03eef4fe9efc6d1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
//! Red team API methods.
use serde::Serialize;
use uuid::Uuid;
use super::client::{ApiClient, ApiError};
use super::supervisor::JsonValue;
/// Request body for red team notify endpoint.
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct RedTeamNotifyRequest {
/// The issue message
pub message: String,
/// Severity level: low, medium, high, critical
pub severity: String,
/// The specific task this relates to (optional)
#[serde(skip_serializing_if = "Option::is_none")]
pub related_task_id: Option<Uuid>,
/// The file path where the issue was detected (optional)
#[serde(skip_serializing_if = "Option::is_none")]
pub file_path: Option<String>,
/// Additional context about the issue (optional)
#[serde(skip_serializing_if = "Option::is_none")]
pub context: Option<String>,
}
impl ApiClient {
/// Send a red team notification about an issue found during adversarial review.
///
/// POST /api/v1/mesh/red-team/notify
pub async fn red_team_notify(&self, req: RedTeamNotifyRequest) -> Result<JsonValue, ApiError> {
self.post("/api/v1/mesh/red-team/notify", &req).await
}
}
|