Help us shape the future of Go! Take the 2026 Go Developer Survey

assembler

package
v0.87.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package assembler composes a structurally-valid workflow scaffold from a chosen capability set (+ optional explicit modules). Pure + deterministic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalConfig

func MarshalConfig(app *AssembledApp) ([]byte, error)

MarshalConfig renders the assembled app to workflow.yaml bytes. Pure; shared by the CLI emitter + the MC2-bis boot test (P4: avoids cmd/wfctl <-> capability/ assembler import cycle).

Types

type AssembledApp

type AssembledApp struct {
	Modules   []config.ModuleConfig
	Workflows map[string]any // {http: {server, router, routes[]?}} — P1 + crud routes
	Requires  config.RequiresConfig
	Findings  []Finding
	Unmatched []string

	// GlueGaps are unselected Attaches.To targets the grammar could not resolve
	// (NEXT_STEPS). RuntimeHooks are the Category-B runtime preconditions the
	// grammar documented (fired by the engine at boot; ⊥ offline-emit). Both
	// feed the agent wizard-state (Task 8).
	GlueGaps     []string
	RuntimeHooks []string
}

AssembledApp is the assembler output: module instances + a workflows.http section (so http.server gets AddRouter at boot via ConfigureWorkflow — P1), required external plugins, findings (NEXT_STEPS), + unmatched requested caps.

func Assemble

Assemble composes a structurally-valid scaffold from the chosen capability set (+ explicit modules). Pure: no I/O. Runs the in-process schema.ValidateConfig gate (V3, fail-closed) before returning — on validation failure returns a non-nil error and a nil *AssembledApp (⊥ write-on-fail).

type AssemblyInput

type AssemblyInput struct {
	Capabilities []string         `json:"capabilities"`
	Modules      []ExplicitModule `json:"modules"`
	Goal         string           `json:"goal"`
}

AssemblyInput is the parsed --set payload.

type ExplicitModule

type ExplicitModule struct {
	Type   string         `json:"type"`
	Name   string         `json:"name,omitempty"`
	Config map[string]any `json:"config,omitempty"`
}

ExplicitModule is an agent-pinned/injected module instance.

type Finding

type Finding struct {
	Level   string // "info" | "warn"
	Code    string
	Message string
}

Finding is a NEXT_STEPS item (V8 honest wiring).

Jump to

Keyboard shortcuts

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