Skip to main content

ScriptEnvProvider

Trait ScriptEnvProvider 

Source
pub trait ScriptEnvProvider: Send + Sync {
    // Required method
    fn env(
        &self,
        ctx: &dyn RunContext,
        as_identity: Option<&str>,
    ) -> HashMap<String, String>;
}
Expand description

Builds the per-script-step environment.

as_identity, when Some, names the identity this step should act as. Providers resolve the identity into harness-defined auth material — typically by injecting credentials as env vars. Examples:

  • GitHub App installation name → GH_TOKEN (conductor’s default impl)
  • AWS service account ID → AWS_ACCESS_KEY_ID / related vars
  • Slack bot user ID → SLACK_BOT_TOKEN
  • Agent persona key → API key scoped to that persona

Providers that don’t model named identities ignore the parameter.

Required Methods§

Source

fn env( &self, ctx: &dyn RunContext, as_identity: Option<&str>, ) -> HashMap<String, String>

Implementors§