Documentation
¶
Index ¶
- Constants
- func BaseProcessExecEnv(workDir string) []string
- func CollectEnvKeys(v any, out map[string]struct{})
- func DecryptSecretsFile(data []byte, key []byte) (map[string]string, error)
- func EncryptSecretsFile(entries map[string]string, key []byte) ([]byte, error)
- func EnvKey(ref string) string
- func FirstShellCommandToken(command string) string
- func InjectScopedEnv(ctx context.Context, base []string, scope string, keys []string, ...) []string
- func IsIntegrationScope(scope string) bool
- func MCPCredentialScope(serverName string) string
- func ManifestFromAPIIndex(data []byte) (map[string]map[string]struct{}, error)
- func ManifestFromMCPFile(data []byte) (map[string]map[string]struct{}, error)
- func ManifestFromShellBashFile(data []byte) (map[string]map[string]struct{}, error)
- func MergeEncryptedSecretsFile(existing []byte, key []byte, updates map[string]string) ([]byte, error)
- func MergeManifests(parts ...map[string]map[string]struct{}) map[string]map[string]struct{}
- func OpenAPICredentialScope(apiName string) string
- func ParseSecretsMasterKey(raw string) ([]byte, error)
- func ScopedStorageKey(scope, storageKey string) string
- func SecretFromContext(ctx context.Context, ref string) (capscredentials.Secret, bool)
- func ShellBashCredentialScope(cmd string) string
- func ShellBashScopeForCommand(command string) (cmd string, scope string)
- func ValidateIntegrationScope(scope string) error
- func WithSecrets(ctx context.Context, secrets map[string]string) context.Context
Constants ¶
const ( MCPCredentialScopePrefix = "mcp." OpenAPICredentialScopePrefix = "openapi." ShellBashCredentialScopePrefix = "shell-bash." )
const SecretsMasterKeyEnv = "AGENTKIT_SECRETS_KEY"
SecretsMasterKeyEnv is the environment / credentials.config.env key for the AES-256 key used to encrypt secrets.enc.json. It is not subject to Prefix.
Variables ¶
This section is empty.
Functions ¶
func BaseProcessExecEnv ¶ added in v0.3.27
BaseProcessExecEnv returns a minimal host environment for subprocesses (PATH, HOME, …).
func CollectEnvKeys ¶ added in v0.3.11
CollectEnvKeys walks JSON-decoded values and records env: variable names.
func DecryptSecretsFile ¶ added in v0.3.4
DecryptSecretsFile parses and decrypts all entries in data.
func EncryptSecretsFile ¶ added in v0.3.4
EncryptSecretsFile serializes entries to encrypted JSON.
func FirstShellCommandToken ¶ added in v0.3.27
FirstShellCommandToken returns the first token of a bash -lc command string (minimal parse).
func InjectScopedEnv ¶ added in v0.3.27
func InjectScopedEnv(ctx context.Context, base []string, scope string, keys []string, store capscredentials.Store) []string
InjectScopedEnv resolves env:KEY under scope for each key and appends KEY=value to base. Missing or empty secrets are skipped.
func IsIntegrationScope ¶ added in v0.3.24
IsIntegrationScope reports whether scope is mcp.*, openapi.*, or shell-bash.*.
func MCPCredentialScope ¶ added in v0.3.27
MCPCredentialScope maps an mcpServers key to integration credential scope.
func ManifestFromAPIIndex ¶ added in v0.3.11
ManifestFromAPIIndex maps each apis key (scope) to allowed env keys.
func ManifestFromMCPFile ¶ added in v0.3.11
ManifestFromMCPFile maps each mcpServers key to allowed env keys under scope mcp.<name>.
func ManifestFromShellBashFile ¶ added in v0.3.27
ManifestFromShellBashFile maps each commands key to allowed env keys under scope shell-bash.<name>.
func MergeEncryptedSecretsFile ¶ added in v0.3.4
func MergeEncryptedSecretsFile(existing []byte, key []byte, updates map[string]string) ([]byte, error)
MergeEncryptedSecretsFile decrypts existing (if any), applies updates, and re-encrypts.
func MergeManifests ¶ added in v0.3.11
MergeManifests unions scope maps; later maps overwrite key sets for the same scope.
func OpenAPICredentialScope ¶ added in v0.3.27
OpenAPICredentialScope maps an api.json apis entry name to integration credential scope.
func ParseSecretsMasterKey ¶ added in v0.3.4
ParseSecretsMasterKey derives a 32-byte AES key via SHA-256(passphrase).
func ScopedStorageKey ¶ added in v0.3.12
ScopedStorageKey names an integration secret entry in secrets.enc.json or dotenv.
func SecretFromContext ¶
SecretFromContext returns a secret when ctx carries an override for ref.
func ShellBashCredentialScope ¶ added in v0.3.27
ShellBashCredentialScope maps a shell command basename to integration credential scope.
func ShellBashScopeForCommand ¶ added in v0.3.27
ShellBashScopeForCommand derives command basename and scope shell-bash.<cmd>.
func ValidateIntegrationScope ¶ added in v0.3.12
ValidateIntegrationScope reports whether scope is a non-empty integration credential scope.
Types ¶
This section is empty.