config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultReviewMaxDiffBytes = 400_000

DefaultReviewMaxDiffBytes keeps a reviewer prompt well under a model's context window. A 1.6 MB diff is what broke a real run.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Backend           string            `yaml:"backend"`
	Gate              GateConfig        `yaml:"gate"`
	ToolPolicy        PolicyConfig      `yaml:"tool_policy"`
	AskAndWaitTimeout map[string]string `yaml:"ask_and_wait_timeout"`
	RoleModels        map[string]string `yaml:"role_models"`
	Graph             GraphConfig       `yaml:"graph"`
	GitHub            GitHubConfig      `yaml:"github"`
	Review            ReviewConfig      `yaml:"review"`
}

func Load

func Load(path string) (*Config, error)

Load reads and validates a Golem config.yaml. Backend is required — golem init never writes a config without one (spec: Distribution & Ownership — no silent default).

func (*Config) AskAndWaitTimeoutFor

func (c *Config) AskAndWaitTimeoutFor(backend string) (time.Duration, error)

func (*Config) ReviewMaxDiffBytes added in v0.1.0

func (c *Config) ReviewMaxDiffBytes() int

ReviewMaxDiffBytes resolves the reviewer diff cap.

type GateConfig

type GateConfig struct {
	Commands []string `yaml:"commands"`
	// EnvironmentChecks run before code checks and never trigger automatic code repair.
	EnvironmentChecks []string `yaml:"environment_checks"`
}

type GitHubConfig added in v0.1.0

type GitHubConfig struct {
	Repo  string `yaml:"repo"`  // "org/repo" (required; not inferred from the git remote)
	Label string `yaml:"label"` // trigger label, default "golem"
	Write bool   `yaml:"write"`
}

GitHubConfig configures CLI-mode GitHub access.

Write defaults to false. An orchestrator-managed repository must have exactly one writer, or the CLI and the orchestrator will post duplicate comments and fight over labels. `golem init` sets Write true for standalone use; the shem sets it false for repos it manages.

type GraphConfig

type GraphConfig struct {
	IgnorePatterns  []string `yaml:"ignore_patterns"`
	MaxFileSizeKB   int      `yaml:"max_file_size_kb"`
	ExtraExtensions []string `yaml:"extra_extensions"`
}

type PolicyConfig

type PolicyConfig struct {
	AllowNetwork      []string `yaml:"allow_network"`
	AllowWorktreeOnly bool     `yaml:"allow_worktree_only"`
}

type ReviewConfig added in v0.1.0

type ReviewConfig struct {
	// MaxDiffBytes caps the diff sent to the reviewer; a larger one is sent
	// as a per-file summary with a truncation marker. 0 means the default.
	MaxDiffBytes int `yaml:"max_diff_bytes"`
}

Jump to

Keyboard shortcuts

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