assembler

package
v0.82.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 8 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: <name>, router: <name>}} — P1
	Requires  config.RequiresConfig
	Findings  []Finding
	Unmatched []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