Submit denial summaries and/or agent-authored proposals for policy analysis. Returns the gateway response so callers can surface accepted/rejected counts, rejection reasons, and server-assigned `accepted_chunk_ids` (e.g., the `policy.local` API forwards these to the in-sandbox agent so it can watch proposal state via `GET /v1/proposals/{id}`).
(
&self,
sandbox_name: &str,
summaries: Vec<DenialSummary>,
proposed_chunks: Vec<PolicyChunk>,
network_activity_summaries: Vec<NetworkActivitySummary>,
| 765 | /// (e.g., the `policy.local` API forwards these to the in-sandbox agent |
| 766 | /// so it can watch proposal state via `GET /v1/proposals/{id}`). |
| 767 | pub async fn submit_policy_analysis( |
| 768 | &self, |
| 769 | sandbox_name: &str, |
| 770 | summaries: Vec<DenialSummary>, |
| 771 | proposed_chunks: Vec<PolicyChunk>, |
| 772 | network_activity_summaries: Vec<NetworkActivitySummary>, |
| 773 | analysis_mode: &str, |
| 774 | ) -> Result<SubmitPolicyAnalysisResponse> { |
| 775 | let response = self |
| 776 | .client |
| 777 | .clone() |
| 778 | .submit_policy_analysis(SubmitPolicyAnalysisRequest { |
| 779 | name: sandbox_name.to_string(), |
| 780 | summaries, |
| 781 | proposed_chunks, |
| 782 | network_activity_summaries, |
| 783 | analysis_mode: analysis_mode.to_string(), |
| 784 | }) |
| 785 | .await |
| 786 | .into_diagnostic()?; |
| 787 | |
| 788 | Ok(response.into_inner()) |
| 789 | } |
| 790 | |
| 791 | /// Fetch the current draft chunks for a sandbox. `status_filter` may be |
| 792 | /// `"pending"`, `"approved"`, `"rejected"`, or empty for all. Used by |
nothing calls this directly
no outgoing calls
no test coverage detected