runctx

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 5 Imported by: 0

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 Grant

type Grant struct {
	Name        string
	Description string
}

Grant describes a credential grant available inside the container.

type MCPServer

type MCPServer struct {
	Name        string
	Description string
}

MCPServer describes an MCP server available to the agent.

type NetworkPolicy

type NetworkPolicy struct {
	Policy       string
	AllowedHosts []string
}

NetworkPolicy describes the network access policy for the run.

type Port

type Port struct {
	Name          string
	ContainerPort int
	EnvHostPort   string
}

Port describes a port mapping from the container to the host.

type RuntimeContext

type RuntimeContext struct {
	RunID         string
	Agent         string
	Workspace     string
	Grants        []Grant
	Services      []Service
	Ports         []Port
	NetworkPolicy *NetworkPolicy
	MCPServers    []MCPServer
}

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.

type Service

type Service struct {
	Name    string
	Version string
	EnvURL  string
}

Service describes an infrastructure service available to the run.

Jump to

Keyboard shortcuts

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