Documentation
¶
Index ¶
- Constants
- func CaseFoldEqual(left, right string) bool
- func FindCaseFoldCollision(name string, existing []string) (string, bool)
- func IsValidName(name string) bool
- func IsWithin(root, candidate string) bool
- func ManifestUnknownFields(data []byte) ([]string, error)
- func Marshal(value any) ([]byte, error)
- func ResolvePath(value, baseDir, homeDir string) (string, error)
- func Save(path string, value any) error
- func ValidateName(name string) error
- type BundleClaude
- type BundleCodex
- type BundleManifest
- type ClaudeAuth
- type ClaudeAuthMode
- type ClaudeTool
- type CodexAuth
- type CodexAuthMode
- type CodexTool
- type ColorMode
- type CredentialProvider
- type CredentialSource
- type GlobalConfig
- type HomeMode
- type Manifest
- type OnePasswordConfig
- type ProviderConfigs
- type SecretEnvEntry
- type ShellConfig
- type ToolConfig
- type ToolName
- type ToolsConfig
- type ValidationError
Constants ¶
View Source
const SchemaVersion = 1
Variables ¶
This section is empty.
Functions ¶
func CaseFoldEqual ¶
func FindCaseFoldCollision ¶
func IsValidName ¶
func ManifestUnknownFields ¶
func ResolvePath ¶
ResolvePath applies the schema-v1 path rules. Relative paths resolve from baseDir, a leading "~/" resolves from homeDir, and interpolation is rejected.
func ValidateName ¶
Types ¶
type BundleClaude ¶
type BundleCodex ¶
type BundleManifest ¶
type BundleManifest struct {
Schema int `toml:"schema"`
Name string `toml:"name"`
Description string `toml:"description,omitempty"`
Claude BundleClaude `toml:"claude,omitempty"`
Codex BundleCodex `toml:"codex,omitempty"`
}
func DecodeBundleManifest ¶
func DecodeBundleManifest(data []byte, strict bool) (BundleManifest, error)
func LoadBundleManifest ¶
func LoadBundleManifest(path string, strict bool) (BundleManifest, error)
func (BundleManifest) Validate ¶
func (b BundleManifest) Validate() error
type ClaudeAuth ¶
type ClaudeAuth struct {
CredentialSource
Mode ClaudeAuthMode `toml:"mode,omitempty"`
EnvironmentKey string `toml:"environment_key,omitempty"`
CloudEnv map[string]string `toml:"cloud_env,omitempty"`
}
type ClaudeAuthMode ¶
type ClaudeAuthMode string
const ( ClaudeAuthNativeOAuth ClaudeAuthMode = "native_oauth" ClaudeAuthAPIKeyHelper ClaudeAuthMode = "api_key_helper" ClaudeAuthEnvironment ClaudeAuthMode = "environment" ClaudeAuthBedrock ClaudeAuthMode = "bedrock" ClaudeAuthVertex ClaudeAuthMode = "vertex" ClaudeAuthFoundry ClaudeAuthMode = "foundry" )
type ClaudeTool ¶
type ClaudeTool struct {
ToolConfig
Auth ClaudeAuth `toml:"auth,omitempty"`
}
type CodexAuth ¶
type CodexAuth struct {
CredentialSource
Mode CodexAuthMode `toml:"mode,omitempty"`
ExpectedMethod string `toml:"expected_method,omitempty"`
ExpectedWorkspace string `toml:"expected_workspace,omitempty"`
ProviderName string `toml:"provider_name,omitempty"`
EnvironmentKey string `toml:"environment_key,omitempty"`
}
type CodexAuthMode ¶
type CodexAuthMode string
const ( CodexAuthNativeFile CodexAuthMode = "native_file" CodexAuthNativeKeyring CodexAuthMode = "native_keyring" CodexAuthExecAPIKey CodexAuthMode = "exec_api_key" CodexAuthCustomProvider CodexAuthMode = "custom_provider" )
type CodexTool ¶
type CodexTool struct {
ToolConfig
Auth CodexAuth `toml:"auth,omitempty"`
}
type CredentialProvider ¶
type CredentialProvider string
const ( ProviderNative CredentialProvider = "native" ProviderOnePassword CredentialProvider = "1password" ProviderCommand CredentialProvider = "command" ProviderEnvironment CredentialProvider = "environment" )
type CredentialSource ¶
type CredentialSource struct {
Provider CredentialProvider `toml:"provider,omitempty"`
Reference string `toml:"reference,omitempty"`
Executable string `toml:"executable,omitempty"`
Args []string `toml:"args,omitempty"`
Variable string `toml:"variable,omitempty"`
}
CredentialSource identifies a secret without containing the secret itself. Only fields required by the selected provider may be populated.
type GlobalConfig ¶
type GlobalConfig struct {
Schema int `toml:"schema"`
DefaultShell string `toml:"default_shell,omitempty"`
DefaultTools []ToolName `toml:"default_tools,omitempty"`
Color ColorMode `toml:"color,omitempty"`
Telemetry bool `toml:"telemetry"`
Providers ProviderConfigs `toml:"providers,omitempty"`
LogRotationMB int `toml:"log_rotation_mb,omitempty"`
}
func DecodeGlobalConfig ¶
func DecodeGlobalConfig(data []byte, strict bool) (GlobalConfig, error)
func DefaultGlobalConfig ¶
func DefaultGlobalConfig() GlobalConfig
func LoadGlobalConfig ¶
func LoadGlobalConfig(path string, strict bool) (GlobalConfig, error)
func (GlobalConfig) Validate ¶
func (c GlobalConfig) Validate() error
type Manifest ¶
type Manifest struct {
Schema int `toml:"schema"`
Name string `toml:"name"`
Description string `toml:"description,omitempty"`
DefaultCWD string `toml:"default_cwd,omitempty"`
Bundles []string `toml:"bundles,omitempty"`
Shell ShellConfig `toml:"shell,omitempty"`
Tools ToolsConfig `toml:"tools"`
Env map[string]string `toml:"env,omitempty"`
SecretEnv map[string]SecretEnvEntry `toml:"secret_env,omitempty"`
Overrides map[string]string `toml:"overrides,omitempty"`
}
func NewManifest ¶
type OnePasswordConfig ¶
type OnePasswordConfig struct {
Binary string `toml:"binary,omitempty"`
}
type ProviderConfigs ¶
type ProviderConfigs struct {
OnePassword OnePasswordConfig `toml:"1password,omitempty"`
}
type SecretEnvEntry ¶
type SecretEnvEntry struct {
CredentialSource
Tools []ToolName `toml:"tools,omitempty"`
ExposeToExec bool `toml:"expose_to_exec"`
}
type ShellConfig ¶
type ToolConfig ¶
type ToolsConfig ¶
type ToolsConfig struct {
Claude *ClaudeTool `toml:"claude,omitempty"`
Codex *CodexTool `toml:"codex,omitempty"`
}
type ValidationError ¶
type ValidationError struct {
Problems []string
}
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.