providerenv

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyHomePolicy

func ApplyHomePolicy(
	homePaths aghconfig.HomePaths,
	providerName string,
	homePolicy aghconfig.ProviderHomePolicy,
	env []string,
) ([]string, error)

ApplyHomePolicy updates provider launch environment according to the provider home policy. Operator home intentionally leaves the incoming env untouched.

func ApplyPiAgentDirPolicy

func ApplyPiAgentDirPolicy(
	homePaths aghconfig.HomePaths,
	providerName string,
	homePolicy aghconfig.ProviderHomePolicy,
	env []string,
) ([]string, error)

ApplyPiAgentDirPolicy points native Pi auth at the same isolated home used by both session launch and provider auth commands.

func EnsurePrivateDir

func EnsurePrivateDir(path string) error

EnsurePrivateDir creates or tightens an AGH-owned provider state directory.

func EnsurePrivateDirUnder

func EnsurePrivateDirUnder(root string, path string) error

EnsurePrivateDirUnder creates or tightens an AGH-owned provider state directory while proving the resolved path remains below root.

func ResolveHomeEnv

func ResolveHomeEnv(
	homePaths aghconfig.HomePaths,
	providerName string,
	homePolicy aghconfig.ProviderHomePolicy,
	env []string,
) ([]string, error)

ResolveHomeEnv returns the provider home environment for display or diagnostics without creating provider-owned directories.

func ResolvePiAgentDirEnv

func ResolvePiAgentDirEnv(
	homePaths aghconfig.HomePaths,
	providerName string,
	homePolicy aghconfig.ProviderHomePolicy,
	env []string,
) ([]string, error)

ResolvePiAgentDirEnv returns the Pi native-auth environment for display or diagnostics without creating provider-owned directories.

func SafeProviderHomeSegment

func SafeProviderHomeSegment(value string) bool

SafeProviderHomeSegment reports whether a provider name can be used as one path segment below $AGH_HOME/providers.

func SetEnvValue

func SetEnvValue(env []string, key string, value string) []string

SetEnvValue returns env with exactly one KEY=value entry.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL