Documentation
¶
Overview ¶
Package runctx provides runtime context types and rendering for agent instruction files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Render ¶
func Render(rc *RuntimeContext) string
Render produces a markdown document describing the runtime context. Sections for optional fields (Grants, Services, etc.) are only included when their corresponding slice is non-empty or pointer is non-nil.
Types ¶
type AllowedHost ¶ added in v0.4.0
type AllowedHost struct {
Host string
Rules []string // human-readable rule summaries, e.g. "allow GET /repos/*"
}
AllowedHost describes a host that the run is allowed to access, optionally with per-path rules that restrict specific methods/paths.
type NetworkPolicy ¶
type NetworkPolicy struct {
Policy string
AllowedHosts []AllowedHost
}
NetworkPolicy describes the network access policy for the run.
type RuntimeContext ¶
type RuntimeContext struct {
RunID string
Agent string
Workspace string
Grants []Grant
Services []Service
Ports []Port
NetworkPolicy *NetworkPolicy
MCPServers []MCPServer
HasDependencies bool // true when the config declares any dependencies
}
RuntimeContext holds the information about a moat run that is rendered into agent instruction files (CLAUDE.md, AGENTS.md, etc.).
func BuildFromConfig ¶
func BuildFromConfig(cfg *config.Config, runID string) *RuntimeContext
BuildFromConfig constructs a RuntimeContext from a moat config and run ID.