MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / poll_settings

Method poll_settings

crates/openshell-core/src/grpc_client.rs:736–759  ·  view source on GitHub ↗

Poll for current effective sandbox settings and policy metadata.

(&self, sandbox_id: &str)

Source from the content-addressed store, hash-verified

734
735 /// Poll for current effective sandbox settings and policy metadata.
736 pub async fn poll_settings(&self, sandbox_id: &str) -> Result<SettingsPollResult> {
737 let response = self
738 .client
739 .clone()
740 .get_sandbox_config(GetSandboxConfigRequest {
741 sandbox_id: sandbox_id.to_string(),
742 })
743 .await
744 .into_diagnostic()?;
745
746 let inner = response.into_inner();
747
748 Ok(SettingsPollResult {
749 policy: inner.policy,
750 version: inner.version,
751 policy_hash: inner.policy_hash,
752 config_revision: inner.config_revision,
753 policy_source: PolicySource::try_from(inner.policy_source)
754 .unwrap_or(PolicySource::Unspecified),
755 settings: inner.settings,
756 global_policy_version: inner.global_policy_version,
757 provider_env_revision: inner.provider_env_revision,
758 })
759 }
760
761 /// Submit denial summaries and/or agent-authored proposals for policy analysis.
762 ///

Callers 2

run_policy_poll_loopFunction · 0.80

Calls 1

get_sandbox_configMethod · 0.45

Tested by

no test coverage detected