Skip to main content

extract_declared_env_allow

Function extract_declared_env_allow 

Source
pub fn extract_declared_env_allow(
    artifact_name: &str,
    artifact_version: &str,
    manifest_yaml: &str,
) -> Result<Vec<String>, RuntimeError>
Expand description

The capabilities.env.allow a packed manifest declares, read on its own.

Narrow on purpose. murmur_artifact::RuntimeManifest::from_yaml_str validates the whole manifest, and that resolves every ${VAR} in a gateway.api_key against the reading process’s environment — so a parent asking what its child declares would have to already hold the child’s variables before it could read which ones they are. Reading the one key answers that without the circle.

A manifest with no capabilities: block, or none under env:, declares nothing and yields an empty list. Malformed YAML, or an env.allow that is not a list of strings, is an error naming the artifact and version.