Documentation
¶
Overview ¶
Package config handles configuration loading and validation.
Index ¶
Constants ¶
View Source
const DefaultGitHubTokenRef = "${DARK_FACTORY_GITHUB_TOKEN}" // #nosec G101 -- env var reference, not a credential
DefaultGitHubTokenRef is the default env var reference for the GitHub token.
Variables ¶
View Source
var AvailableWorkflows = Workflows{WorkflowDirect, WorkflowPR}
AvailableWorkflows contains all valid workflow values.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ProjectName string `yaml:"projectName"`
Workflow Workflow `yaml:"workflow"`
Prompts PromptsConfig `yaml:"prompts"`
Specs SpecsConfig `yaml:"specs"`
ContainerImage string `yaml:"containerImage"`
Model string `yaml:"model"`
ValidationCommand string `yaml:"validationCommand"`
DebounceMs int `yaml:"debounceMs"`
ServerPort int `yaml:"serverPort"`
NetAdmin bool `yaml:"netAdmin"`
AutoMerge bool `yaml:"autoMerge"`
AutoRelease bool `yaml:"autoRelease"`
VerificationGate bool `yaml:"verificationGate"`
AutoReview bool `yaml:"autoReview"`
MaxReviewRetries int `yaml:"maxReviewRetries"`
AllowedReviewers []string `yaml:"allowedReviewers,omitempty"`
UseCollaborators bool `yaml:"useCollaborators"`
PollIntervalSec int `yaml:"pollIntervalSec"`
GitHub GitHubConfig `yaml:"github"`
}
Config holds the dark-factory configuration.
func (Config) ResolvedGitHubToken ¶ added in v0.15.0
ResolvedGitHubToken returns the GitHub token with environment variables resolved. Logs a warning if a non-default token is configured but the env var is empty.
type GitHubConfig ¶ added in v0.15.0
type GitHubConfig struct {
Token string `yaml:"token"`
}
GitHubConfig holds GitHub-specific configuration.
type PromptsConfig ¶ added in v0.20.3
type PromptsConfig struct {
InboxDir string `yaml:"inboxDir"`
InProgressDir string `yaml:"inProgressDir"`
CompletedDir string `yaml:"completedDir"`
LogDir string `yaml:"logDir"`
}
PromptsConfig holds directories for the prompt lifecycle.
type SpecsConfig ¶ added in v0.20.3
type SpecsConfig struct {
InboxDir string `yaml:"inboxDir"`
InProgressDir string `yaml:"inProgressDir"`
CompletedDir string `yaml:"completedDir"`
LogDir string `yaml:"logDir"`
}
SpecsConfig holds directories for the spec lifecycle.
Click to show internal directories.
Click to hide internal directories.