Documentation
¶
Overview ¶
Package config handles loading and validating Forge configuration from forge.yaml files and environment variable overrides.
Config resolution order (first found wins):
- --config flag (explicit path)
- ./forge.yaml (working directory)
- ~/.forge/config.yaml (user home)
Environment variables override file values with the FORGE_ prefix:
FORGE_SETTINGS_POLL_INTERVAL=60s FORGE_SETTINGS_MAX_TOTAL_SMITHS=4
Index ¶
- func ConfigFilePath(configFile string) string
- func ExplicitStageProvidersWithAnvil(s SettingsConfig, anvil *AnvilConfig, stage string) []string
- func ProvidersForStageWithAnvil(s SettingsConfig, anvil *AnvilConfig, stage string) []string
- func Save(cfg *Config, path string) error
- type AnvilConfig
- type Config
- type DenyPatternsConfig
- type HooksConfig
- type NotificationsConfig
- type SettingsConfig
- func (s SettingsConfig) IsAutoMergeCrucibleChildren() bool
- func (s SettingsConfig) IsQuestgiverEnabled() bool
- func (s SettingsConfig) IsSmelterEnabled() bool
- func (s SettingsConfig) IsVulncheckEnabled() bool
- func (s SettingsConfig) MarshalYAML() (interface{}, error)
- func (s SettingsConfig) ProvidersForStage(stage string) []string
- type SmithConfig
- type TeamsNotificationConfig
- type TemperCommandsConfig
- type WebhookTargetConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFilePath ¶
ConfigFilePath returns the path of the config file that was loaded, or empty string if no file was found.
func ExplicitStageProvidersWithAnvil ¶ added in v0.13.0
func ExplicitStageProvidersWithAnvil(s SettingsConfig, anvil *AnvilConfig, stage string) []string
ExplicitStageProvidersWithAnvil returns the provider spec for a stage only if it is explicitly configured in stage_providers (per-anvil or global). Unlike ProvidersForStageWithAnvil it does NOT fall back to smith_providers or providers, so callers can distinguish "explicitly overridden" from "inherited". Returns nil when the stage has no explicit override.
func ProvidersForStageWithAnvil ¶ added in v0.13.0
func ProvidersForStageWithAnvil(s SettingsConfig, anvil *AnvilConfig, stage string) []string
ProvidersForStageWithAnvil returns the provider spec list for a pipeline stage, checking the per-anvil stage_providers first. Resolution order:
anvil.stage_providers[stage] → settings.stage_providers[stage] → settings.smith_providers (smith/warden/schematic only) → settings.providers → nil (caller applies provider.Defaults).
Types ¶
type AnvilConfig ¶
type AnvilConfig struct {
Path string `mapstructure:"path" yaml:"path"`
MaxSmiths int `mapstructure:"max_smiths" yaml:"max_smiths"`
AutoDispatch string `mapstructure:"auto_dispatch" yaml:"auto_dispatch"`
AutoDispatchTag string `mapstructure:"auto_dispatch_tag" yaml:"auto_dispatch_tag,omitempty"`
AutoDispatchMinPriority int `mapstructure:"auto_dispatch_min_priority" yaml:"auto_dispatch_min_priority"`
// Platform specifies the VCS hosting platform for this anvil.
// Valid values: "github" (default), "gitlab", "gitea", "bitbucket", "azuredevops".
// Determines which VCS provider is used for PR operations.
Platform string `mapstructure:"platform" yaml:"platform,omitempty"`
// SchematicEnabled controls whether the Schematic pre-worker runs for
// beads in this anvil. When nil, the global setting is used. Set to
// a pointer to false to disable per-anvil.
SchematicEnabled *bool `mapstructure:"schematic_enabled" yaml:"schematic_enabled,omitempty"`
// GolangciLint controls whether golangci-lint runs as a Temper step
// for Go projects. When nil (default), golangci-lint runs if the
// binary is found on PATH. Set to a pointer to false to disable.
GolangciLint *bool `mapstructure:"golangci_lint" yaml:"golangci_lint,omitempty"`
// GoRaceDetection enables the Go race detector (-race flag) as a
// separate temper step for this anvil. When nil, the global setting
// is used. Default off since -race slows tests and increases memory.
GoRaceDetection *bool `mapstructure:"go_race_detection" yaml:"go_race_detection,omitempty"`
// DepcheckEnabled controls whether the depcheck monitor scans this
// anvil for outdated dependencies. When nil (default), depcheck runs
// as normal (opt-out). Set to false to skip this anvil entirely.
DepcheckEnabled *bool `mapstructure:"depcheck_enabled" yaml:"depcheck_enabled,omitempty"`
// QuestgiverEnabled controls whether the QuestGiver monitor runs
// quests for this anvil. When nil (default), the global setting is used.
// Set to false to skip this anvil entirely.
QuestgiverEnabled *bool `mapstructure:"questgiver_enabled" yaml:"questgiver_enabled,omitempty"`
// AutoMerge enables automatic merging of PRs when they reach the
// ready-to-merge state (CI passing, no conflicts, no unresolved
// threads, no pending reviews). External PRs (ext-*) are never
// auto-merged. Default: false.
AutoMerge bool `mapstructure:"auto_merge" yaml:"auto_merge,omitempty"`
// QuestgiverSetupCmd is a shell command to run before quest execution
// for this anvil (e.g. "podman compose up -d").
QuestgiverSetupCmd string `mapstructure:"questgiver_setup_cmd" yaml:"questgiver_setup_cmd,omitempty"`
// QuestgiverTeardownCmd is a shell command to run after quest execution
// for this anvil (e.g. "podman compose down").
QuestgiverTeardownCmd string `mapstructure:"questgiver_teardown_cmd" yaml:"questgiver_teardown_cmd,omitempty"`
// Temper holds optional custom build/test/lint commands for this anvil.
// When any field is set, Forge disables the auto-detected Temper steps
// for this anvil and runs only the commands explicitly configured here.
// This enables support for Python, Rust, or repos with non-standard
// build tooling. Each value is a command string (e.g. "make build",
// "cargo test"). Commands are split on whitespace; for shell features,
// invoke a checked-in wrapper script from the configured command.
Temper *TemperCommandsConfig `mapstructure:"temper" yaml:"temper,omitempty"`
// WicketEnabled controls whether the Wicket issue triage monitor scans
// this anvil. When nil (default), the global WicketEnabled setting is
// used. Set to false to opt this anvil out entirely.
WicketEnabled *bool `mapstructure:"wicket_enabled" yaml:"wicket_enabled,omitempty"`
// WicketTrustedUsers is the list of GitHub logins whose issues are
// automatically dispatched without extra review for this anvil.
WicketTrustedUsers []string `mapstructure:"wicket_trusted_users" yaml:"wicket_trusted_users,omitempty"`
// WicketAutoDispatch, when true, automatically dispatches triaged beads
// for this anvil without waiting for manual queue approval.
WicketAutoDispatch bool `mapstructure:"wicket_auto_dispatch" yaml:"wicket_auto_dispatch,omitempty"`
// WicketIssueLabels is the list of GitHub label names that an issue must
// carry for Wicket to consider it eligible for triage in this anvil.
// An empty list means all issues are eligible (subject to WicketTriggerLabel).
WicketIssueLabels []string `mapstructure:"wicket_issue_labels" yaml:"wicket_issue_labels,omitempty"`
// WicketRepos is the list of "owner/repo" strings Wicket scans for this
// anvil. When empty, the anvil's primary repository is derived from its
// git remote.
WicketRepos []string `mapstructure:"wicket_repos" yaml:"wicket_repos,omitempty"`
// WicketTriagePrompt is an optional prompt suffix appended to the default
// Wicket triage system prompt, allowing project-specific context or
// constraints to be injected.
WicketTriagePrompt string `mapstructure:"wicket_triage_prompt" yaml:"wicket_triage_prompt,omitempty"`
// WicketIgnoreUsers is the list of GitHub logins to skip entirely when
// triaging issues for this anvil. In addition to this list, a set of
// well-known bot accounts (dependabot[bot], renovate[bot], etc.) is
// always ignored. Comparison is case-insensitive.
WicketIgnoreUsers []string `mapstructure:"wicket_ignore_users" yaml:"wicket_ignore_users,omitempty"`
// StageProviders is a per-anvil override for stage_providers. When set,
// these take precedence over the global stage_providers for beads in this
// anvil. Same keys/format as settings.stage_providers.
StageProviders map[string][]string `mapstructure:"stage_providers" yaml:"stage_providers,omitempty"`
// Smith holds optional Smith configuration for this anvil, including
// deny patterns for files and commands.
Smith *SmithConfig `mapstructure:"smith" yaml:"smith,omitempty"`
// Hooks defines optional shell commands to run before/after each
// pipeline stage. Commands receive context as environment variables
// (FORGE_BEAD_ID, FORGE_WORKTREE_PATH, FORGE_BRANCH, FORGE_ANVIL_NAME,
// FORGE_ANVIL_PATH, FORGE_STAGE, FORGE_ITERATION). A non-zero exit
// from a "before" hook aborts the stage; "after" hook failures are
// logged but do not abort the pipeline.
Hooks *HooksConfig `mapstructure:"hooks" yaml:"hooks,omitempty"`
}
AnvilConfig defines a registered repository (anvil).
type Config ¶
type Config struct {
Anvils map[string]AnvilConfig `mapstructure:"anvils" yaml:"anvils"`
Settings SettingsConfig `mapstructure:"settings" yaml:"settings"`
Notifications NotificationsConfig `mapstructure:"notifications" yaml:"notifications,omitempty"`
}
Config is the top-level configuration for The Forge.
type DenyPatternsConfig ¶ added in v0.13.0
type DenyPatternsConfig struct {
// Files is a list of glob patterns matched against file paths in the
// diff output. Examples: "*.env", ".forge/*", "*.key", "*.pem".
Files []string `mapstructure:"files" yaml:"files,omitempty"`
// Commands is a list of glob patterns matched against bash commands
// executed by Smith. Examples: "rm -rf /", "git push --force*".
Commands []string `mapstructure:"commands" yaml:"commands,omitempty"`
}
DenyPatternsConfig holds glob patterns for files and commands that Smith must not touch. File patterns are matched against changed file paths in the diff (using filepath.Match semantics). Command patterns are matched against bash commands found in Smith's output log.
type HooksConfig ¶ added in v0.13.0
type HooksConfig struct {
BeforeSchematic string `mapstructure:"before_schematic" yaml:"before_schematic,omitempty"`
AfterSchematic string `mapstructure:"after_schematic" yaml:"after_schematic,omitempty"`
BeforeSmith string `mapstructure:"before_smith" yaml:"before_smith,omitempty"`
AfterSmith string `mapstructure:"after_smith" yaml:"after_smith,omitempty"`
BeforeTemper string `mapstructure:"before_temper" yaml:"before_temper,omitempty"`
AfterTemper string `mapstructure:"after_temper" yaml:"after_temper,omitempty"`
BeforeWarden string `mapstructure:"before_warden" yaml:"before_warden,omitempty"`
AfterWarden string `mapstructure:"after_warden" yaml:"after_warden,omitempty"`
}
HooksConfig defines optional shell commands that run before/after each pipeline stage. Each field is a shell command string executed via a platform-appropriate shell (sh -c on Unix, cmd /c on Windows). Commands receive pipeline context as environment variables.
type NotificationsConfig ¶
type NotificationsConfig struct {
// Legacy flat fields — kept for backward compatibility.
TeamsWebhookURL string `mapstructure:"teams_webhook_url" yaml:"teams_webhook_url,omitempty"`
Enabled bool `mapstructure:"enabled" yaml:"enabled"`
// Events to notify on. Empty = all. Options: pr_created, bead_failed, daily_cost, worker_done, bead_decomposed, release_published, pr_ready_to_merge.
Events []string `mapstructure:"events" yaml:"events,omitempty"`
// ReleaseWebhookURLs is a list of generic JSON webhook URLs that receive
// a release_published payload when 'forge notify release' is called.
// These receive a simple JSON object (not a Teams Adaptive Card) suitable
// for custom dashboards or other receivers.
ReleaseWebhookURLs []string `mapstructure:"release_webhook_urls" yaml:"release_webhook_urls,omitempty"`
// PRReadyWebhookURLs is a list of generic JSON webhook URLs that receive
// a pr_ready_to_merge payload when a PR enters ready-to-merge state.
// These receive a simple JSON object (not a Teams Adaptive Card) suitable
// for custom dashboards or other receivers.
PRReadyWebhookURLs []string `mapstructure:"pr_ready_webhook_urls" yaml:"pr_ready_webhook_urls,omitempty"`
// Teams holds the new nested Teams webhook configuration.
// If set, takes precedence over the legacy teams_webhook_url and events fields.
Teams TeamsNotificationConfig `mapstructure:"teams" yaml:"teams,omitempty"`
// Webhooks is a list of generic JSON webhook targets. Each target can filter
// events independently. Supported events: pr_created, worker_done, bead_failed,
// bead_decomposed, pr_ready_to_merge, release, daily_cost.
Webhooks []WebhookTargetConfig `mapstructure:"webhooks" yaml:"webhooks,omitempty"`
}
NotificationsConfig holds webhook and notification settings.
func (NotificationsConfig) ResolvedTeamsEvents ¶ added in v0.4.0
func (n NotificationsConfig) ResolvedTeamsEvents() []string
ResolvedTeamsEvents returns the effective Teams event filter. The new nested teams.events takes precedence over the legacy events field.
func (NotificationsConfig) ResolvedTeamsURL ¶ added in v0.4.0
func (n NotificationsConfig) ResolvedTeamsURL() string
ResolvedTeamsURL returns the effective Teams webhook URL. The new nested teams.webhook_url takes precedence over the legacy teams_webhook_url field.
type SettingsConfig ¶
type SettingsConfig struct {
PollInterval time.Duration `mapstructure:"poll_interval" yaml:"poll_interval"`
SmithTimeout time.Duration `mapstructure:"smith_timeout" yaml:"smith_timeout"`
MaxTotalSmiths int `mapstructure:"max_total_smiths" yaml:"max_total_smiths"`
MaxReviewAttempts int `mapstructure:"max_review_attempts" yaml:"max_review_attempts"`
// MaxPipelineIterations is the maximum number of Smith-Warden cycles
// in the initial pipeline loop before declaring failure. This controls
// how many times Smith can be asked to revise its implementation based
// on Temper or Warden feedback during a single bead run. Default: 5.
MaxPipelineIterations int `mapstructure:"max_pipeline_iterations" yaml:"max_pipeline_iterations"`
ClaudeFlags []string `mapstructure:"claude_flags" yaml:"claude_flags"`
// Providers is the ordered list of AI providers to try.
// Each entry is a Kind string ("claude", "gemini") or "kind:command" pair.
// When a provider signals a rate limit the next one in the list is tried.
// Defaults to ["claude", "gemini"] when empty.
Providers []string `mapstructure:"providers" yaml:"providers,omitempty"`
// RateLimitBackoff is how long dispatchBead waits after releasing a bead
// back to open when all providers are rate limited. During this window the
// bead slot stays reserved (activeBeads) so the poller does not
// immediately re-claim it. Defaults to 5 minutes.
RateLimitBackoff time.Duration `mapstructure:"rate_limit_backoff" yaml:"rate_limit_backoff"`
// SmithProviders is the ordered list of AI providers used specifically for
// dispatch pipeline (Smith + Warden + Schematic). When empty, Providers is
// used as fallback. This lets smiths run a more capable model (e.g.
// claude/claude-opus-4-6) while lifecycle workers (quench, burnish) use a
// lighter model. Accepts the same "kind/model" format as Providers.
//
// Deprecated: Use StageProviders for per-stage configuration. SmithProviders
// is still honoured as a fallback for smith/warden/schematic when the
// corresponding StageProviders key is not set.
SmithProviders []string `mapstructure:"smith_providers" yaml:"smith_providers,omitempty"`
// StageProviders maps pipeline stage names to their own provider chains.
// Supported keys: "smith", "warden", "schematic", "cifix" (quench), "reviewfix" (burnish).
// Each value uses the same "kind/model" format as Providers. When a stage
// key is missing, the fallback chain is:
// stage_providers[stage] → smith_providers (smith/warden/schematic only) → providers → defaults
StageProviders map[string][]string `mapstructure:"stage_providers" yaml:"stage_providers,omitempty"`
// SchematicEnabled enables the Schematic pre-worker globally. When true,
// beads that exceed the word threshold or carry the "decompose" tag are
// analysed before Smith starts. Default: false.
SchematicEnabled bool `mapstructure:"schematic_enabled" yaml:"schematic_enabled"`
// SchematicWordThreshold is the minimum word count in a bead description
// to trigger automatic schematic analysis. When this value is zero or
// unset, the daemon applies an effective default of 100.
SchematicWordThreshold int `mapstructure:"schematic_word_threshold" yaml:"schematic_word_threshold,omitempty"`
// BellowsInterval is how often the Bellows PR monitor polls GitHub for
// status changes on open PRs. Defaults to 2 minutes.
BellowsInterval time.Duration `mapstructure:"bellows_interval" yaml:"bellows_interval"`
// DailyCostLimit is the maximum estimated USD spend per calendar day.
// When the running total exceeds this value, auto-dispatch is paused until
// the next calendar day. Zero means no limit (default).
DailyCostLimit float64 `mapstructure:"daily_cost_limit" yaml:"daily_cost_limit,omitempty"`
// MaxCIFixAttempts is the maximum number of CI fix cycles per PR before
// the PR is considered exhausted. Default: 5.
MaxCIFixAttempts int `mapstructure:"max_ci_fix_attempts" yaml:"max_ci_fix_attempts"`
// MaxReviewFixAttempts is the maximum number of review fix cycles per PR
// before the PR is considered exhausted. Default: 5.
MaxReviewFixAttempts int `mapstructure:"max_review_fix_attempts" yaml:"max_review_fix_attempts"`
// MaxRebaseAttempts is the maximum number of conflict rebase attempts per
// PR before the PR is considered exhausted. Default: 3.
MaxRebaseAttempts int `mapstructure:"max_rebase_attempts" yaml:"max_rebase_attempts"`
// MergeStrategy controls how PRs are merged from the Hearth TUI.
// Valid values: "squash" (default), "merge", "rebase".
MergeStrategy string `mapstructure:"merge_strategy" yaml:"merge_strategy,omitempty"`
// StaleInterval is how long a worker's log file can go without being
// modified before the worker is marked as stalled. A value of 0 disables
// stale detection. Defaults to 5 minutes.
StaleInterval time.Duration `mapstructure:"stale_interval" yaml:"stale_interval"`
// DepcheckInterval is how often the dependency checker runs 'go list -m -u all'
// on Go anvils. A value of 0 disables depcheck. Defaults to 168h (weekly).
DepcheckInterval time.Duration `mapstructure:"depcheck_interval" yaml:"depcheck_interval,omitempty"`
// DepcheckTimeout is the maximum time allowed for a single 'go list -m -u all'
// invocation per anvil. Defaults to 5 minutes.
DepcheckTimeout time.Duration `mapstructure:"depcheck_timeout" yaml:"depcheck_timeout,omitempty"`
// VulncheckInterval is how often govulncheck runs on registered Go anvils.
// Set to 0 to disable scheduled scanning. Default: 24h (daily).
VulncheckInterval time.Duration `mapstructure:"vulncheck_interval" yaml:"vulncheck_interval,omitempty"`
// VulncheckTimeout is the maximum time allowed for a single govulncheck
// invocation per anvil (govulncheck downloads the vuln DB on first run).
// Defaults to 10 minutes.
VulncheckTimeout time.Duration `mapstructure:"vulncheck_timeout" yaml:"vulncheck_timeout,omitempty"`
// VulncheckEnabled controls whether vulnerability scanning is active.
// When false, scheduled scanning and "forge scan" are disabled regardless
// of VulncheckInterval. Default: true.
VulncheckEnabled *bool `mapstructure:"vulncheck_enabled" yaml:"vulncheck_enabled,omitempty"`
// GoRaceDetection enables the Go race detector (-race flag) as a
// separate temper step globally. Per-anvil settings override this.
// Default: false.
GoRaceDetection bool `mapstructure:"go_race_detection" yaml:"go_race_detection"`
// AutoLearnRules enables automatic learning of Warden review rules from
// Copilot comments when a PR is merged. Bellows will fetch Copilot review
// comments, distill them into rules via Claude, and save them to the
// anvil's .forge/warden-rules.yaml. Default: false.
AutoLearnRules bool `mapstructure:"auto_learn_rules" yaml:"auto_learn_rules"`
// CopilotDailyRequestLimit is the maximum number of weighted Copilot
// premium requests per calendar day. When the running total exceeds this
// value, the Copilot provider is skipped in the fallback chain (other
// providers are unaffected). Zero means no limit (default).
// Premium requests are weighted by model multiplier (e.g. opus 4.6 = 3x).
CopilotDailyRequestLimit int `mapstructure:"copilot_daily_request_limit" yaml:"copilot_daily_request_limit,omitempty"`
// CrucibleEnabled enables automatic Crucible orchestration for parent beads
// that have children (blocks other beads). When true, the daemon detects
// parent beads during polling and dispatches them through the Crucible
// instead of the normal pipeline. Default: false.
CrucibleEnabled bool `mapstructure:"crucible_enabled" yaml:"crucible_enabled"`
// AutoMergeCrucibleChildren controls whether child PRs targeting a Crucible
// feature branch are automatically merged (squash) after the pipeline
// succeeds. Default: true.
AutoMergeCrucibleChildren *bool `mapstructure:"auto_merge_crucible_children" yaml:"auto_merge_crucible_children,omitempty"`
// WardenModelOverride sets an alternative model for Copilot provider entries
// when running the Warden review stage. Non-Copilot providers are unaffected.
// Useful for routing review to a cheaper model (e.g. claude-haiku-4-5 at 0.33x
// premium) while keeping Smith on a stronger model. Empty = use provider default.
WardenModelOverride string `mapstructure:"warden_model_override" yaml:"warden_model_override,omitempty"`
// SchematicModelOverride sets an alternative model for Copilot provider entries
// when running the Schematic pre-analysis stage. Non-Copilot providers are
// unaffected. Empty = use provider default.
SchematicModelOverride string `mapstructure:"schematic_model_override" yaml:"schematic_model_override,omitempty"`
// CopilotSkipWardenSmallDiffs enables automatic Warden skip for small,
// low-risk diffs when the primary provider is Copilot. Saves one premium
// request for trivial changes (docs, tests, or ≤2 files under 100 lines).
// Default: false (opt-in).
CopilotSkipWardenSmallDiffs bool `mapstructure:"copilot_skip_warden_small_diffs" yaml:"copilot_skip_warden_small_diffs"`
// CopilotBatchCIFixes enables batching multiple CI failures into a single
// Smith invocation when the provider is Copilot. Saves premium requests
// when a PR has multiple failing checks. Default: false (opt-in).
CopilotBatchCIFixes bool `mapstructure:"copilot_batch_ci_fixes" yaml:"copilot_batch_ci_fixes"`
// CopilotBatchReviewFixes enables batching multiple review comments into a
// single Smith invocation when the provider is Copilot. Saves premium
// requests when a PR has multiple review comments. Default: false (opt-in).
CopilotBatchReviewFixes bool `mapstructure:"copilot_batch_review_fixes" yaml:"copilot_batch_review_fixes"`
// WardenFullRereview, when true, forces the Warden to do a full independent
// review on every iteration instead of a focused re-review that only checks
// whether prior feedback was addressed. Default: false (focused re-review).
WardenFullRereview bool `mapstructure:"warden_full_rereview" yaml:"warden_full_rereview"`
// CopilotCombinedSmithWarden embeds Warden review criteria into the Smith
// prompt so Smith self-reviews its own diff, eliminating the separate
// Warden request. A real Warden still runs for P0-P1 beads, when the
// self-review flags concerns, or via random sampling. Only effective when
// the primary provider is Copilot. Default: false (opt-in, high risk).
CopilotCombinedSmithWarden bool `mapstructure:"copilot_combined_smith_warden" yaml:"copilot_combined_smith_warden"`
// CopilotWardenSampleRate is the probability (0.0–1.0) that a real Warden
// review is spawned even when the self-review approves, for quality
// validation. Only used when CopilotCombinedSmithWarden is true.
// Default: 0.1 (10%).
CopilotWardenSampleRate float64 `mapstructure:"copilot_warden_sample_rate" yaml:"copilot_warden_sample_rate"`
// SmelterEnabled controls whether the Smelter background process is active.
// When true (default), the Smelter runs on a schedule defined by
// SmelterInterval. Set to false to disable.
SmelterEnabled *bool `mapstructure:"smelter_enabled" yaml:"smelter_enabled,omitempty"`
// SmelterInterval is how often the Smelter runs its background processing.
// Defaults to 8h. Set to 0 to disable scheduled runs.
SmelterInterval time.Duration `mapstructure:"smelter_interval" yaml:"smelter_interval,omitempty"`
// QuestgiverEnabled controls whether the QuestGiver monitor is active
// globally. When nil (default), QuestGiver is disabled. Set to true to
// enable scheduled quest execution.
QuestgiverEnabled *bool `mapstructure:"questgiver_enabled" yaml:"questgiver_enabled,omitempty"`
// QuestgiverInterval is how often the QuestGiver monitor polls anvils
// for quests to execute. Defaults to 24h (daily).
QuestgiverInterval time.Duration `mapstructure:"questgiver_interval" yaml:"questgiver_interval,omitempty"`
// AdventurerTimeout is the maximum time allowed for a single quest
// execution. Defaults to 5 minutes.
AdventurerTimeout time.Duration `mapstructure:"adventurer_timeout" yaml:"adventurer_timeout,omitempty"`
// WicketEnabled controls whether the Wicket issue triage monitor is
// active globally. When false (default), no issue scanning occurs.
WicketEnabled bool `mapstructure:"wicket_enabled" yaml:"wicket_enabled"`
// WicketInterval is how often Wicket polls repositories for new issues.
// Defaults to 15m.
WicketInterval time.Duration `mapstructure:"wicket_interval" yaml:"wicket_interval,omitempty"`
// WicketProvider is the AI provider used for triage decisions. When
// empty, the global Providers chain is used.
WicketProvider string `mapstructure:"wicket_provider" yaml:"wicket_provider,omitempty"`
// WicketBatchSize is the maximum number of issues processed per scan
// cycle per repository. Defaults to 20.
WicketBatchSize int `mapstructure:"wicket_batch_size" yaml:"wicket_batch_size,omitempty"`
// WicketProcessedLabel is the GitHub label applied to issues that have
// already been triaged. Defaults to "forge-wicket-processed".
WicketProcessedLabel string `mapstructure:"wicket_processed_label" yaml:"wicket_processed_label,omitempty"`
// WicketNeedsHumanLabel is the GitHub label applied to issues flagged
// for human review. Defaults to "forge-needs-human".
WicketNeedsHumanLabel string `mapstructure:"wicket_needs_human_label" yaml:"wicket_needs_human_label,omitempty"`
// WicketBeadCreatedLabel is the GitHub label applied to issues for which
// a bead was created. Defaults to "forge-bead-created".
WicketBeadCreatedLabel string `mapstructure:"wicket_bead_created_label" yaml:"wicket_bead_created_label,omitempty"`
// WicketTriggerLabel is the GitHub label that, when non-empty, is required
// for Wicket to process an issue (pull model). Issues without this label
// are skipped entirely. When empty (the default), Wicket processes all
// issues in push-model fashion without any trigger-label gate.
WicketTriggerLabel string `mapstructure:"wicket_trigger_label" yaml:"wicket_trigger_label,omitempty"`
// WicketStaleDays is the number of days without an author reply before a
// Wicket issue awaiting clarification is marked as stale. After a further 7
// days, the issue is closed automatically. Defaults to 14.
WicketStaleDays int `mapstructure:"wicket_stale_days" yaml:"wicket_stale_days,omitempty"`
}
SettingsConfig holds global operational settings.
func (SettingsConfig) IsAutoMergeCrucibleChildren ¶
func (s SettingsConfig) IsAutoMergeCrucibleChildren() bool
IsAutoMergeCrucibleChildren returns true unless auto_merge_crucible_children is explicitly false. Defaults to true.
func (SettingsConfig) IsQuestgiverEnabled ¶ added in v0.9.0
func (s SettingsConfig) IsQuestgiverEnabled() bool
IsQuestgiverEnabled returns true only when questgiver_enabled is explicitly true. Defaults to false (nil = disabled).
func (SettingsConfig) IsSmelterEnabled ¶ added in v0.10.0
func (s SettingsConfig) IsSmelterEnabled() bool
IsSmelterEnabled returns true unless smelter_enabled is explicitly false. Defaults to true.
func (SettingsConfig) IsVulncheckEnabled ¶
func (s SettingsConfig) IsVulncheckEnabled() bool
IsVulncheckEnabled returns true unless vulncheck_enabled is explicitly false.
func (SettingsConfig) MarshalYAML ¶
func (s SettingsConfig) MarshalYAML() (interface{}, error)
MarshalYAML serialises SettingsConfig with time.Duration fields as human-readable strings (e.g. "30s", "5m0s") instead of nanosecond ints.
func (SettingsConfig) ProvidersForStage ¶ added in v0.13.0
func (s SettingsConfig) ProvidersForStage(stage string) []string
ProvidersForStage returns the provider spec list for the given pipeline stage. Resolution order: stage_providers[stage] → smith_providers (for smith, warden, schematic only) → providers. Returns nil when all levels are empty (caller should apply provider.Defaults).
type SmithConfig ¶ added in v0.13.0
type SmithConfig struct {
// DenyPatterns defines file and command patterns that Smith is not
// allowed to modify or execute. Violations are detected post-Smith
// via diff validation and cause the pipeline to fail the iteration.
DenyPatterns *DenyPatternsConfig `mapstructure:"deny_patterns" yaml:"deny_patterns,omitempty"`
}
SmithConfig holds per-anvil Smith configuration.
type TeamsNotificationConfig ¶ added in v0.4.0
type TeamsNotificationConfig struct {
WebhookURL string `mapstructure:"webhook_url" yaml:"webhook_url,omitempty"`
Events []string `mapstructure:"events" yaml:"events,omitempty"`
}
TeamsNotificationConfig holds configuration for the MS Teams webhook. Used in the new nested notifications.teams config structure.
type TemperCommandsConfig ¶ added in v0.13.0
type TemperCommandsConfig struct {
// Build is the build command (e.g. "make build", "cargo build").
Build string `mapstructure:"build" yaml:"build,omitempty"`
// Test is the test command (e.g. "make test", "pytest").
Test string `mapstructure:"test" yaml:"test,omitempty"`
// Lint is the lint command (e.g. "make lint", "ruff check .").
Lint string `mapstructure:"lint" yaml:"lint,omitempty"`
}
TemperCommandsConfig holds custom build/test/lint commands for an anvil. When set on an AnvilConfig, these commands replace auto-detected Temper steps.
func (*TemperCommandsConfig) IsEmpty ¶ added in v0.13.0
func (t *TemperCommandsConfig) IsEmpty() bool
IsEmpty returns true if no custom commands are configured.
type WebhookTargetConfig ¶ added in v0.4.0
type WebhookTargetConfig struct {
Name string `mapstructure:"name" yaml:"name"`
URL string `mapstructure:"url" yaml:"url"`
Events []string `mapstructure:"events" yaml:"events,omitempty"`
}
WebhookTargetConfig defines a single generic JSON webhook target. Each target receives a simple JSON payload (not an Adaptive Card) and can filter which events it receives.