scaffold

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package scaffold materializes agent project templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDockerfile

func GenerateDockerfile(dir string, data ScaffoldData) error

GenerateDockerfile renders the Dockerfile template into dir/Dockerfile. Called by the build pipeline before every docker build so agents always get the latest Dockerfile — even on upgrades of previously-built agents.

func Materialize

func Materialize(dir string, data ScaffoldData) error

Materialize renders all scaffold templates into dir using data. Panics if a template references a missing field in data.

Types

type ScaffoldData

type ScaffoldData struct {
	AgentID         string // UUID
	Module          string // Go module name for the agent (typically "agent")
	GoVersion       string // e.g., "1.24"
	AgentSDKVersion string // displayed in the agent's go.mod require line (informational — replace directives are unconditional)
	AgentBaseImage  string // runtime base image referenced by the agent's Dockerfile (FROM line). Threaded from cfg.AgentBaseImage so operators can pin it (typically a versioned ghcr ref).
}

ScaffoldData holds values substituted into templates.

Jump to

Keyboard shortcuts

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