Documentation
¶
Overview ¶
Package config handles Runefile discovery and settings resolution.
Index ¶
Constants ¶
const CurrentVersion = "1"
CurrentVersion is the Runefile semantics version this build implements. Breaking changes are opt-in per file via `set rune_version := "..."`; the default interpretation never changes under a user (FR-033).
Variables ¶
var ErrNotFound = errors.New("no Runefile found in this directory or any parent")
ErrNotFound is returned when no Runefile can be located by upward discovery.
Functions ¶
func Compatible ¶
Compatible reports whether this build can interpret the file's declared version. An empty pragma (the common case) is always compatible and uses the default interpretation.
func Compose ¶
Compose resolves a file's imports (spliced into the same namespace) and mods (loaded as child namespaces addressable as name::task). It mutates f in place and returns any diagnostics (including reported name collisions, FR-011).
func Discover ¶
Discover walks startDir and its ancestors, returning the absolute path of the nearest Runefile / .runefile (case-insensitive). It returns ErrNotFound if none exists up to the filesystem root.
func Resolve ¶
Resolve picks the Runefile to use. If fileFlag is non-empty it is used directly (and must exist); otherwise discovery walks up from startDir.
func RuneVersion ¶
RuneVersion returns the version pragma declared by a file, or "" if none.
Types ¶
type Settings ¶
type Settings struct {
Default string // set default := "task"
WorkingDir string // set working-directory := "path"
Quiet bool // set quiet
Export bool // set export (export all variables to the task env)
Fallback bool // set fallback
Dotenv string // set dotenv := ".env"
Shell []string // set shell := ["bash", "-cu"]
Python []string // set python := ["python3"]
Node []string // set node := ["node"]
AgentCmd []string // set agent_cmd := ["claude", "-p"]
}
Settings holds the resolved module settings that influence execution.