Documentation
¶
Index ¶
Constants ¶
View Source
const (
// EncryptedFileDisabled turns off encrypted storage (tests or legacy-only .env).
EncryptedFileDisabled = "-"
)
Variables ¶
This section is empty.
Functions ¶
func EnvGraphSource ¶ added in v0.1.19
EnvGraphSource exposes credentials/env config.env entries to ${env:NAME} / ${var:NAME} gate probes and interpolation. It does not read config.files or build a Store.
func New ¶
func New(cfg Config, deps EnvDeps) (credentials.Store, error)
New registers credentials/env: Resolve secrets from environment variables.
Best practices:
- Reference a secret as env:NAME from the consumer's apiKeyRef rather than inlining it in YAML.
- Use config.env for inline secrets in YAML; process environment still takes precedence.
- Use files for local development .env files; config env takes precedence over files and encrypted storage.
- Set AGENTKIT_SECRETS_KEY in config.env (or process env) to unlock global:secrets.enc.json.
- Dotenv and encrypted files are loaded into memory; run "/env -u" to reload from disk.
Types ¶
type Config ¶
type Config struct {
// Prefix is prepended to every lookup key.
Prefix string `json:"prefix"`
// Env holds in-memory KEY=VALUE pairs from config, used after process environment misses.
Env map[string]string `json:"env"`
// Files are dotenv-style KEY=VALUE files used after context, process environment, and config env misses.
Files []string `json:"files"`
// EncryptedFile is the workspace-relative AES-GCM secrets file (default global:secrets.enc.json).
// Set to EncryptedFileDisabled ("-") to disable.
EncryptedFile string `json:"encryptedFile"`
}
Click to show internal directories.
Click to hide internal directories.