config

package
v0.44.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultUpstreamRepo is the canonical fullsend repository for layered workflow calls.
	DefaultUpstreamRepo = "fullsend-ai/fullsend"
	// DefaultUpstreamRef is the default ref for layered upstream workflow calls.
	DefaultUpstreamRef = "main"
	// DefaultGHRunner is the default GitHub Actions runner image for scaffold workflows.
	DefaultGHRunner = "ubuntu-24.04"
	// DefaultSandboxImage and DefaultCodeImage are the sandbox images
	// `fullsend agent new` writes into a generated harness. They track the
	// fleet's pins in fullsend-ai/agents (harness/triage.yaml and
	// harness/code.yaml) and are repinned by hand on the same cadence as the
	// fleet repin PRs. `agent new --image` overrides them.
	DefaultSandboxImage = "ghcr.io/fullsend-ai/fullsend-sandbox@sha256:f8255971fec8a72a60adb20f501e55098f237e699dc829f0894647c0de2a19c2"
	DefaultCodeImage    = "ghcr.io/fullsend-ai/fullsend-code@sha256:ea2a31f38ee80e2a9a898a898a289fe432aa882fa5a4046c3236ab8e2627d7e7"
)
View Source
const (
	// DefaultPerRepoMintURL is the hosted public mint used when no
	// mint_url is configured in config.yaml or config.base.yaml.
	DefaultPerRepoMintURL = "https://mint.fullsend.sh"

	// DefaultPerRepoInferenceProvider is the default inference backend.
	DefaultPerRepoInferenceProvider = "vertex"

	// DefaultPerRepoInferenceRegion is the default GCP region for
	// inference requests.
	DefaultPerRepoInferenceRegion = "global"
)

Operational code defaults for per-repo configs. These are the terminal values in the overlay → base → code defaults chain (ADR 0069 Decision 2). Callers that need the canonical default value without constructing a full config can reference these constants directly.

View Source
const (
	OverlayConfigFile = "config.yaml"
	BaseConfigFile    = "config.base.yaml"
)

Layer file names of a per-repo config directory (ADR 0069).

Variables

This section is empty.

Functions

func ApplyManagedShorthands added in v0.44.0

func ApplyManagedShorthands(managed PerRepoConfigWriter, runtime string, allowedRemoteResources []string)

ApplyManagedShorthands writes the authoritative repos.yaml runtime and allowed_remote_resources values onto a managed configuration. Empty runtime and a nil allowlist are left unset so code defaults / config.base.yaml still apply at read time. An explicit empty allowlist is deny-all.

func DefaultAgentRoles

func DefaultAgentRoles() []string

DefaultAgentRoles returns the standard set of agent roles installed when no custom roles are specified. The fix stage reuses the coder app (role: coder) so it does not need a separate app or PEM.

func DefaultAllowedRemoteResources added in v0.24.0

func DefaultAllowedRemoteResources() []string

DefaultAllowedRemoteResources returns the standard allowlist prefixes for base composition and agent registration URLs.

func EnsureDefaultAllowedRemoteResources added in v0.31.0

func EnsureDefaultAllowedRemoteResources(existing []string) []string

EnsureDefaultAllowedRemoteResources returns a new slice with default allowed-remote-resources prefixes merged into the provided list. Nil input (field omitted from YAML) returns defaults alone. An explicit empty slice (allowed_remote_resources: []) is returned unchanged to preserve deny-all semantics. Non-empty input gets any missing defaults appended (preserving the caller's original ordering).

func FormatSafetyRelaxations added in v0.44.0

func FormatSafetyRelaxations(rs []SafetyRelaxation) string

FormatSafetyRelaxations joins relaxations for error and status output.

func IsAgentExplicitlyDisabled added in v0.33.0

func IsAgentExplicitlyDisabled(agents []AgentEntry, name string) bool

IsAgentExplicitlyDisabled returns true if the last config entry matching name has Enabled explicitly set to false. Iterates in reverse to respect last-writer-wins ordering.

func IsPerRepoYAML added in v0.31.0

func IsPerRepoYAML(data []byte) bool

IsPerRepoYAML probes raw YAML for structural markers that distinguish perRepoConfig from orgConfig. orgConfig has org-only top-level keys (dispatch, repos, defaults); perRepoConfig never does. The "inference" key is shared: orgConfig uses it for the provider name, perRepoConfig uses it for nested inference backend settings. Org configs always contain dispatch/repos/defaults (non-omitempty), so the remaining markers are sufficient for detection.

func PerRepoDefaultRoles added in v0.8.0

func PerRepoDefaultRoles() []string

PerRepoDefaultRoles returns agent roles for per-repo installation. The "fullsend" dispatch role is excluded because per-repo mode uses the target repo's shim workflow for dispatch instead of a separate app.

func ReservedSubagentKeys added in v0.42.0

func ReservedSubagentKeys() []string

ReservedSubagentKeys returns the persona names reserved by the runtime (in addition to the run's own agent name and ValidAgentNames).

func SafetyRelaxationKeys added in v0.44.0

func SafetyRelaxationKeys(rs []SafetyRelaxation) []string

SafetyRelaxationKeys returns the affected configuration keys in order.

func ValidAgentNames added in v0.38.0

func ValidAgentNames() []string

ValidAgentNames returns the built-in agents fullsend dispatches by name — the names an agents: entry may tune without a source. These are the names passed to `fullsend run <agent>` and used by workflow stages. They are NOT harness role: values — "code" and "fix" both carry role: coder.

func ValidAuthorizationProviders added in v0.44.0

func ValidAuthorizationProviders() []string

ValidAuthorizationProviders returns the set of recognized authorization provider names.

func ValidConfigAgentName added in v0.44.0

func ValidConfigAgentName(name string) bool

ValidRoles returns the set of agent roles accepted in `.fullsend` `roles:` / `defaults.roles` config. This is intentionally narrower than mintcore's canonical roles: mint-only dogfood roles (e.g. scribe) can be registered with `fullsend mint add-role` before scaffold/workflow wiring lands, and must not silently pass config validation. ValidConfigAgentName reports whether name is acceptable as an agents: entry name. Exported so a caller that generates an agent can apply the same rule before writing anything, rather than discovering the mismatch when registration fails after the files are already on disk.

func ValidEffort added in v0.38.0

func ValidEffort(level string) bool

ValidEffort reports whether level is an accepted effort value.

func ValidEffortLevels added in v0.38.0

func ValidEffortLevels() []string

ValidEffortLevels returns the accepted effort values, in documentation order.

func ValidModelAliasKeys added in v0.42.0

func ValidModelAliasKeys() []string

ValidModelAliasKeys returns the accepted alias keys for models.aliases.

func ValidModelRef added in v0.38.0

func ValidModelRef(ref string) bool

ValidModelRef reports whether ref is a well-formed model reference (single segment or provider/id form). Exported for use by harness validation and per-run override validation.

func ValidProviders added in v0.0.3

func ValidProviders() []string

ValidProviders returns the set of recognized inference providers.

func ValidRoles

func ValidRoles() []string

func ValidRuntimes added in v0.30.0

func ValidRuntimes() []string

ValidRuntimes returns the set of recognized agent runtimes. "pi" (#6464) and "codex" (#6920) are both opt-in per repo, per agent, or as a repos.yaml default; "dummy" and "dummy-playback" are for behaviour test orgs only.

func ValidSubagentKey added in v0.42.0

func ValidSubagentKey(key string) bool

ValidSubagentKey reports whether key is a well-formed sub-agent persona name: lowercase alphanumeric segments joined by hyphens, or "default". Maximum 64 characters.

func ValidateAgentEntries added in v0.25.0

func ValidateAgentEntries(agents []AgentEntry, allowlist []string) error

ValidateAgentEntries validates a complete, self-contained agent list — a per-repo config with its full parent chain resolved — enforcing both the allowlist check and the compiled-in-name requirement. See validateAgentEntries for the relaxed checks used during repos.yaml config overlay validation (ADR 0122).

func ValidateManagedLayer added in v0.44.0

func ValidateManagedLayer(w PerRepoConfigWriter) error

ValidateManagedLayer validates a single repos.yaml managed-configuration layer (defaults.config or one repository's config block, ADR 0122) in isolation: before defaults.config and the repository config are merged, and before the repos.yaml runtime / allowed_remote_resources shorthands are applied. It runs the same locally-set field checks as Validate, plus structural checks on this layer's own agent entries (name format, duplicate names, URL scheme and integrity hash) — but it does not check a URL agent against an allowlist (the allowed_remote_resources shorthand isn't applied to this layer yet) and does not require an override-only entry (no source) to name a compiled-in agent (it may tune a custom agent registered in config.base.yaml, which this layer cannot see). Those two checks run in ValidateMergedManaged once the shorthand is applied.

func ValidateMergedManaged added in v0.44.0

func ValidateMergedManaged(w PerRepoConfigWriter) error

ValidateMergedManaged validates a repos.yaml managed configuration (ADR 0122) after defaults.config and the repository config have been merged and the repos.yaml runtime / allowed_remote_resources shorthands applied (mergeManagedConfig). The resolved allowlist is now correct, so a URL-sourced agent entry is checked against it; an override-only entry is still not required to name a compiled-in agent, since config.base.yaml — which may register the agent it tunes — is not layered on until the managed file is written and later read through LayeredConfig.

func ValidateModelAliases added in v0.42.0

func ValidateModelAliases(aliases map[string]string) error

ValidateModelAliases checks a models.aliases map: every key is one of ValidModelAliasKeys, every value is a ValidModelRef, and no value is itself an alias key — the runtimes consult the alias table once, so `sonnet: opus` would reach the provider as the literal id "opus". Exported because the run path validates the effective (merged) map (nothing writes the block through the CLI, so Validate on the write paths alone would never see a hand-edited file).

Types

type AgentEntry

type AgentEntry struct {
	Name      string             `yaml:"name,omitempty"`
	Source    string             `yaml:"source,omitempty"`
	Ref       string             `yaml:"ref,omitempty"`
	Enabled   *bool              `yaml:"enabled,omitempty"`
	Runtime   string             `yaml:"runtime,omitempty"`
	Model     string             `yaml:"model,omitempty"`
	Effort    string             `yaml:"effort,omitempty"`
	Subagents map[string]*string `yaml:"subagents,omitempty"`
}

AgentEntry represents a registered agent source in config. It supports both string shorthand (just the source URL/path) and object form (with an explicit name override).

Enabled controls whether the agent participates in the merged agent set. When nil (omitted) the agent defaults to enabled. When explicitly set to false the agent is suppressed — this allows disabling built-in scaffold agents without removing their role. A suppression-only entry (Enabled=false, no Source) is valid.

Ref records the original branch or tag ref that was resolved to a commit SHA when the agent was adopted via `agent add`. When present, `agent update` re-resolves against this ref instead of the repo's default branch, so agents adopted from non-default branches stay on their intended branch across updates. Empty for entries that predate this field or were adopted with an explicit commit SHA.

Runtime, Model and Effort tune how the agent runs (ADR 0091): they override the repo-wide runtime: key and the harness model:/effort: for this agent, beneath the per-run --runtime/--model/--effort flags and FULLSEND_* variables. An enabled entry may carry them without a Source — an override-only entry — when Name is a built-in agent (ValidAgentNames) or matches a sourced entry in a parent layer; the built-in keeps resolving through the agents-repo fallback.

Subagents maps persona names to model references, controlling which model each sub-agent persona runs on. The "default" key sets the fallback for personas without an explicit entry. A nil *string value tombstones an inherited entry (per-key layered merge, like ConfigModelAliases). Values are ValidModelRef through the repo alias table. Keys must match ValidSubagentKey.

func AgentSettingsFor added in v0.38.0

func AgentSettingsFor(agents []AgentEntry, name string) (AgentEntry, bool)

AgentSettingsFor returns the entry for name (case-insensitive) from an effective (merged) agent list, and whether one exists. Callers read Runtime/Model/Effort from it.

func UpsertAgentSettings added in v0.38.0

func UpsertAgentSettings(agents []AgentEntry, name, runtime, model, effort string, subagents map[string]*string) []AgentEntry

UpsertAgentSettings sets runtime/model/effort/subagents for name on a layer's local agent list: on the entry with that name when present, else as a new override-only entry. An empty value clears that setting. Returns the updated list.

func (AgentEntry) DerivedName added in v0.24.0

func (a AgentEntry) DerivedName() string

DerivedName returns the explicit Name if set, otherwise derives one from the Source filename (e.g. "triage.yaml" → "triage").

func (AgentEntry) HasSettings added in v0.38.0

func (a AgentEntry) HasSettings() bool

HasSettings reports whether the entry tunes runtime, model, effort or subagents.

func (AgentEntry) IsEnabled added in v0.33.0

func (a AgentEntry) IsEnabled() bool

IsEnabled returns whether the agent entry is enabled. A nil Enabled pointer (field omitted) defaults to true.

func (AgentEntry) IsOverrideOnly added in v0.38.0

func (a AgentEntry) IsOverrideOnly() bool

IsOverrideOnly reports whether the entry only tunes an agent defined elsewhere: enabled, no source, at least one setting.

func (*AgentEntry) UnmarshalYAML added in v0.24.0

func (a *AgentEntry) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements yaml.Unmarshaler so that a plain string is treated as a source-only entry, while a mapping decodes normally. Old-format entries (role/name/slug identity tuples from pre-ADR-0058 config) are detected and rejected with a clear error message.

type AgentLister added in v0.31.0

type AgentLister interface {
	AgentEntries() []AgentEntry
}

AgentLister provides read access to registered agent entries.

type AllowTargets added in v0.18.0

type AllowTargets struct {
	Orgs  []string `yaml:"orgs,omitempty"`
	Repos []string `yaml:"repos,omitempty"`
}

AllowTargets defines which orgs and repos agents may create issues in.

type AllowedResourcesReader added in v0.31.0

type AllowedResourcesReader interface {
	AllowedResources() []string
}

AllowedResourcesReader provides read access to the allowed remote resources list.

type AuthorizationProvider added in v0.44.0

type AuthorizationProvider struct {
	Provider string `yaml:"provider"`
}

AuthorizationProvider identifies an opt-in authorization backend that supplements the default collaborator-API permission check.

type CommentNotificationConfig added in v0.15.0

type CommentNotificationConfig struct {
	Start      string `yaml:"start,omitempty"`
	Completion string `yaml:"completion,omitempty"`
}

CommentNotificationConfig controls start/completion comments. Valid start values: "enabled" (default), "disabled". Valid completion values: "enabled" (default), "on_failure", "disabled".

type ConfigReader added in v0.31.0

type ConfigReader interface {
	AgentLister
	KillSwitchReader
	AllowedResourcesReader
	CreateIssuesReader
	StatusNotificationsReader
	ConfigVersion() string
	IsOrgMode() bool
}

ConfigReader is the common read interface for fields shared by both orgConfig and perRepoConfig. Consumer packages should depend on this interface rather than accessing struct fields directly.

func LoadConfig added in v0.31.0

func LoadConfig(dir string, opts LoadOpts) (ConfigReader, error)

LoadConfig reads config.yaml (and config.base.yaml if present) from dir, returning a ConfigReader. For per-repo configs the parent chain is wired as overlay (config.yaml) → base (config.base.yaml) → code defaults. This is the preferred entry point for consumer packages that only need read access.

type ConfigWriter added in v0.31.0

type ConfigWriter interface {
	ConfigReader
	SetKillSwitch(bool)
	SetAgents([]AgentEntry)
	SetAllowedRemoteResources([]string)
	SetStatusNotifications(*StatusNotificationConfig)
	Marshal() ([]byte, error)
	Validate() error
}

ConfigWriter extends ConfigReader with mutation methods shared by both config modes.

func LoadConfigWriter added in v0.32.0

func LoadConfigWriter(dir string, opts LoadOpts) (ConfigWriter, error)

LoadConfigWriter reads config.yaml (and config.base.yaml if present) from dir, returning a ConfigWriter. For per-repo configs the parent chain is wired as overlay (config.yaml) → base (config.base.yaml) → code defaults. Only the overlay layer is mutable; base and defaults are read-only via the parent pointer. This is the preferred entry point for consumer packages that need read-write access (e.g. CLI commands that modify and write-back config).

type CreateIssuesConfig added in v0.18.0

type CreateIssuesConfig struct {
	AllowTargets AllowTargets `yaml:"allow_targets"`
}

CreateIssuesConfig controls cross-repo issue creation by agents.

type CreateIssuesReader added in v0.31.0

type CreateIssuesReader interface {
	IssueCreationConfig() *CreateIssuesConfig
}

CreateIssuesReader provides read access to cross-repo issue creation configuration.

type DispatchConfig

type DispatchConfig struct {
	Platform string `yaml:"platform"`
	Mode     string `yaml:"mode,omitempty"`     // "oidc-mint"
	MintURL  string `yaml:"mint_url,omitempty"` // informational, set when mode=oidc-mint
}

DispatchConfig configures how agent work is dispatched.

type InferenceConfig added in v0.0.3

type InferenceConfig struct {
	Provider string `yaml:"provider"`
}

InferenceConfig configures the inference provider used by agents (org-mode config).

type KillSwitchReader added in v0.31.0

type KillSwitchReader interface {
	IsKillSwitchActive() bool
}

KillSwitchReader provides read access to the kill switch state.

type LoadOpts added in v0.31.0

type LoadOpts struct {
	// MissingOK returns a default config when config.yaml is absent.
	MissingOK bool
}

LoadOpts controls how LoadConfig handles a missing config.yaml.

type ManagedConfig added in v0.44.0

type ManagedConfig struct {
	// contains filtered or unexported fields
}

ManagedConfig is a sparse per-repo managed configuration as declared in repos.yaml defaults.config and per-repository config blocks (ADR 0122). The zero value means the key was omitted.

func (ManagedConfig) IsSet added in v0.44.0

func (o ManagedConfig) IsSet() bool

IsSet reports whether a config mapping was present in YAML, including an empty mapping (`config: {}`) that opts a repository into managed configuration without supplying values.

func (ManagedConfig) IsZero added in v0.44.0

func (o ManagedConfig) IsZero() bool

IsZero reports whether the managed configuration was omitted. yaml.v3 uses this for omitempty so unset blocks are not marshaled as null.

func (ManagedConfig) MarshalYAML added in v0.44.0

func (o ManagedConfig) MarshalYAML() (interface{}, error)

MarshalYAML encodes the managed configuration as a sparse mapping without the config.yaml file header.

func (*ManagedConfig) UnmarshalYAML added in v0.44.0

func (o *ManagedConfig) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML strictly decodes a mapping into a sparse per-repo managed configuration. Unknown fields and the runtime / allowed_remote_resources shorthands are rejected with field-specific errors.

func (ManagedConfig) Writer added in v0.44.0

Writer returns the managed configuration as a PerRepoConfigWriter, or nil if unset.

type ModelsConfig added in v0.42.0

type ModelsConfig struct {
	// Aliases overrides fullsend's pinned alias table per key.
	// Keys are alias names (opus, sonnet, haiku, fable); values are
	// model ids or provider/id specs validated with ValidModelRef.
	Aliases map[string]string `yaml:"aliases,omitempty"`
}

ModelsConfig groups model-related repo config under a single YAML key. Currently only Aliases; future keys (e.g. defaults, catalog metadata) can be added without flat-key proliferation.

type OpenAIWIFConfig added in v0.38.0

type OpenAIWIFConfig struct {
	Audience           string `yaml:"audience,omitempty"`
	IdentityProviderID string `yaml:"identity_provider_id,omitempty"`
	ServiceAccountID   string `yaml:"service_account_id,omitempty"`
}

OpenAIWIFConfig identifies the OpenAI Workload Identity provider and service-account mapping a run exchanges its GitHub OIDC token with.

func (OpenAIWIFConfig) IsZero added in v0.38.0

func (c OpenAIWIFConfig) IsZero() bool

IsZero reports whether no identifier is set.

func (OpenAIWIFConfig) Missing added in v0.38.0

func (c OpenAIWIFConfig) Missing() []string

Missing lists the identifiers still unset, in a fixed order, so a partially configured block can be reported precisely.

func (OpenAIWIFConfig) Trimmed added in v0.38.0

func (c OpenAIWIFConfig) Trimmed() OpenAIWIFConfig

Trimmed returns the identifiers with surrounding whitespace removed, so a whitespace-only YAML value counts as unset.

type OrgConfigReader added in v0.31.0

type OrgConfigReader interface {
	ConfigReader
	DispatchSettings() DispatchConfig
	InferenceSettings() InferenceConfig
	OrgRepoDefaults() RepoDefaults
	RepoMap() map[string]RepoConfig
	EnabledRepos() []string
	DisabledRepos() []string
}

OrgConfigReader extends ConfigReader with org-mode-specific fields.

func ParseOrgConfig

func ParseOrgConfig(data []byte) (OrgConfigReader, error)

ParseOrgConfig parses YAML bytes into an OrgConfigReader.

type OrgConfigWriter added in v0.31.0

type OrgConfigWriter interface {
	OrgConfigReader
	ConfigWriter
	SetDispatch(DispatchConfig)
	SetInference(InferenceConfig)
	SetDefaultRuntime(string)
	SetRepo(name string, rc RepoConfig)
	DeleteRepo(name string)
}

OrgConfigWriter extends OrgConfigReader and ConfigWriter with org-specific mutation methods.

func NewOrgConfig

func NewOrgConfig(allRepos, enabledRepos, roles []string, inferenceProvider, org string) OrgConfigWriter

NewOrgConfig creates a new orgConfig with sensible defaults. The returned OrgConfigWriter provides full read-write access.

func ParseOrgConfigWriter added in v0.33.0

func ParseOrgConfigWriter(data []byte) (OrgConfigWriter, error)

ParseOrgConfigWriter parses YAML bytes into an OrgConfigWriter for callers that need to modify the config after parsing.

type PerRepoConfigReader added in v0.31.0

type PerRepoConfigReader interface {
	ConfigReader
	ConfigRoles() []string
	ConfigRuntime() string
	ConfigForge() string
	ConfigTracker() string
	ConfigMintURL() string
	ConfigKeepHistory() bool
	ConfigInferenceProvider() string
	ConfigInferenceProject() string
	ConfigInferenceRegion() string
	ConfigInferenceWIFProvider() string
	ConfigInferenceOpenAI() OpenAIWIFConfig
	// ConfigModelAliases returns the effective model alias map, merged
	// per-key through the parent chain. nil (the code default) means no
	// aliases are configured: every alias resolves through the runtime's
	// compiled-in table.
	ConfigModelAliases() map[string]string
	// IsOwnersFileAuthEnabled reports whether the owners_file
	// authorization provider is listed.
	IsOwnersFileAuthEnabled() bool
}

PerRepoConfigReader extends ConfigReader with per-repo-specific fields. Methods are prefixed with "Config" to avoid conflicts with the struct field names (Roles and Runtime).

func ParsePerRepoConfig added in v0.8.0

func ParsePerRepoConfig(data []byte) (PerRepoConfigReader, error)

ParsePerRepoConfig parses YAML bytes into a PerRepoConfigReader.

type PerRepoConfigWriter added in v0.33.0

type PerRepoConfigWriter interface {
	PerRepoConfigReader
	ConfigWriter
	SetRoles([]string)
	SetRuntime(string)
	SetMintURL(string)
	SetKeepHistory(bool)
	SetInferenceProvider(string)
	SetInferenceProject(string)
	SetInferenceRegion(string)
	SetInferenceWIFProvider(string)
	SetInferenceOpenAI(OpenAIWIFConfig)
	SetModelAliases(map[string]string)
	SetOwnersFileAuthEnabled(bool)
}

PerRepoConfigWriter extends PerRepoConfigReader and ConfigWriter with per-repo-specific mutation methods.

func LayerOnBase added in v0.44.0

func LayerOnBase(overlay PerRepoConfigWriter, baseYAML []byte) (PerRepoConfigWriter, error)

LayerOnBase returns a writer whose local fields are overlay's and whose parent chain is base → code defaults. baseYAML may be empty, in which case the parent is code defaults only. The overlay is cloned so the caller's value is not mutated.

func MergeManaged added in v0.44.0

func MergeManaged(parent, child PerRepoConfigWriter) PerRepoConfigWriter

MergeManaged combines two sparse managed-configuration layers using the per-field merge rules of per-repo config. child wins where it sets a value; unspecified child fields inherit from parent. Neither code defaults nor a config.base.yaml layer are baked in. A nil layer is treated as unset.

func NewEmptyPerRepoOverlay added in v0.36.0

func NewEmptyPerRepoOverlay() PerRepoConfigWriter

NewEmptyPerRepoOverlay creates an empty per-repo config suitable for use as a stub overlay when a preset base layer is provided. No roles, agents, or version are populated; the overlay inherits everything from the base layer via the parent fallback chain.

func NewPerRepoConfig added in v0.8.0

func NewPerRepoConfig(roles []string, targetRepo string) PerRepoConfigWriter

NewPerRepoConfig creates a new perRepoConfig with the given roles. The returned ConfigWriter provides read-write access to shared config fields; use PerRepoConfigReader type assertion for per-repo-specific methods.

func NewPerRepoConfigFromOrg added in v0.34.0

func NewPerRepoConfigFromOrg(orgCfg OrgConfigReader, repoName, targetRepo string) PerRepoConfigWriter

NewPerRepoConfigFromOrg creates a per-repo config by mapping portable fields from an org config. Per-repo role overrides (repos.<name>.roles) take precedence over defaults.roles. Non-portable fields (max_implementation_retries, auto_merge) are not carried over — callers should warn separately.

func ParsePerRepoConfigWriter added in v0.33.0

func ParsePerRepoConfigWriter(data []byte) (PerRepoConfigWriter, error)

ParsePerRepoConfigWriter parses YAML bytes into a PerRepoConfigWriter for callers that need to modify the config after parsing.

func ParsePerRepoConfigWriterLayered added in v0.38.0

func ParsePerRepoConfigWriterLayered(overlayData []byte, baseData []byte) (PerRepoConfigWriter, error)

ParsePerRepoConfigWriterLayered parses overlay and optional base YAML bytes into a PerRepoConfigWriter with the parent chain overlay → base → code defaults. When baseData is nil the result is equivalent to ParsePerRepoConfigWriter (parent = code defaults only). This is the preferred entry point when both layers are available as raw bytes (e.g. fetched from a forge API) rather than on the local filesystem (where LoadConfigWriter should be used instead).

type PerRepoInferenceConfig added in v0.36.0

type PerRepoInferenceConfig struct {
	Provider    string `yaml:"provider,omitempty"`
	Project     string `yaml:"project,omitempty"`
	Region      string `yaml:"region,omitempty"`
	WIFProvider string `yaml:"wif_provider,omitempty"`
	// OpenAI holds the OpenAI Workload Identity Federation identifiers
	// (ADR 0092). They are not secrets: the mapping they name only
	// trusts a GitHub OIDC token whose claims match, and the run prints
	// them. The FULLSEND_OPENAI_* runner variables, when set, take
	// precedence over this block.
	OpenAI *OpenAIWIFConfig `yaml:"openai,omitempty"`
}

PerRepoInferenceConfig groups inference backend settings for per-repo configs. The Provider field identifies the inference backend (currently only "vertex"); Project, Region, and WIFProvider hold provider-specific connection details.

type ReactionNotificationConfig added in v0.38.0

type ReactionNotificationConfig struct {
	Start      string `yaml:"start,omitempty"`
	Completion string `yaml:"completion,omitempty"`
}

ReactionNotificationConfig controls start/completion emoji reactions, an alternative to comments that doesn't generate a GitHub notification. Unlike comments, both fields default to "disabled" — reactions are an opt-in addition rather than a default-on behavior. Valid start values: "enabled", "disabled" (default). Valid completion values: "enabled", "on_failure", "disabled" (default).

type RepoConfig

type RepoConfig struct {
	Roles   []string `yaml:"roles,omitempty"`
	Enabled bool     `yaml:"enabled"`
}

RepoConfig holds per-repo configuration. StatusNotifications is intentionally absent here — notification style is an org-wide UX decision (consistent appearance across all repos), unlike roles and auto_merge which are operationally per-repo.

type RepoDefaults

type RepoDefaults struct {
	Roles                    []string                  `yaml:"roles"`
	Runtime                  string                    `yaml:"runtime,omitempty"`
	MaxImplementationRetries int                       `yaml:"max_implementation_retries"`
	AutoMerge                bool                      `yaml:"auto_merge"`
	StatusNotifications      *StatusNotificationConfig `yaml:"status_notifications,omitempty"`
}

RepoDefaults holds default settings applied to all repos.

type SafetyRelaxation added in v0.44.0

type SafetyRelaxation struct {
	Key       string
	Current   string
	Candidate string
}

SafetyRelaxation is one candidate value that is less restrictive than the current effective configuration without an explicit local declaration in the managed configuration (ADR 0122).

func CheckManagedSafetyGate added in v0.44.0

func CheckManagedSafetyGate(current PerRepoConfigReader, candidate PerRepoConfigWriter) []SafetyRelaxation

CheckManagedSafetyGate compares current and candidate effective configurations (both already layered managed → base → code defaults). A less-restrictive candidate is reported unless candidate declares that relaxation locally. candidate must be the layered *perRepoConfig so omitted vs explicit local fields can be distinguished.

func CheckManagedSafetyGateFromLayers added in v0.44.0

func CheckManagedSafetyGateFromLayers(currentYAML []byte, candidate PerRepoConfigWriter, baseYAML []byte) ([]SafetyRelaxation, error)

CheckManagedSafetyGateFromLayers layers currentYAML (the installed .fullsend/config.yaml, or empty when the file is missing) and candidate onto the same parent chain (baseYAML → code defaults) and reports implicit relaxations. Omitted candidate keys fall through the parent chain rather than being ignored because the sparse file lacks them.

func (SafetyRelaxation) String added in v0.44.0

func (r SafetyRelaxation) String() string

type StatusNotificationConfig added in v0.15.0

type StatusNotificationConfig struct {
	Comment  CommentNotificationConfig  `yaml:"comment,omitempty"`
	Reaction ReactionNotificationConfig `yaml:"reaction,omitempty"`
}

StatusNotificationConfig controls status comments and reactions posted on issues/PRs when agents start and complete.

type StatusNotificationsReader added in v0.36.0

type StatusNotificationsReader interface {
	StatusNotifications() *StatusNotificationConfig
}

StatusNotificationsReader provides read access to status notification configuration (comment start & completion).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL