Documentation
¶
Overview ¶
Package procenv builds environments for subprocesses that agents can influence.
The runtime process holds credentials that no agent-controlled subprocess needs: the datastore URL, the Temporal client credentials, the internal service token, and encrypted credential keys. Child processes receive only the environment required for their specific operation.
Callers therefore build child environments from an explicit allowlist and add whatever else that specific child legitimately needs.
Index ¶
Constants ¶
const AllowlistEnvVar = "AGENT_RUNTIME_SUBPROCESS_ENV_ALLOWLIST"
AllowlistEnvVar names a comma-separated list of additional keys to pass through, as an escape hatch for deployments that need a variable we have not anticipated. It is read from the parent environment.
Variables ¶
This section is empty.
Functions ¶
func Allowed ¶
Allowed reports whether a key passes the built-in allowlist. It ignores the deployment escape hatch so callers can test the static policy directly.
func Command ¶
func Command() []string
Command excludes provider credentials and the deployment allowlist escape hatch from agent-selected commands. Specific service clients use Sanitized.
func HostGit ¶ added in v0.11.2
func HostGit() []string
HostGit builds the environment for git processes the runtime itself runs against repositories (clone, fetch, push). Those never execute agent-selected programs, so on top of the sanitized base they carry the host's git transport configuration and honour the deployment allowlist. Provider credentials are still excluded.
func Sanitized ¶
Sanitized returns the allowlisted subset of the current process environment, with overrides applied last. Overrides are "KEY=VALUE" entries and replace any allowlisted value for the same key, so a caller can pass a credential a specific child needs without widening the allowlist for every other child.
func SanitizedFrom ¶
SanitizedFrom is Sanitized against an explicit base environment.
Types ¶
This section is empty.