outputplan

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package outputplan owns immutable semantic output declarations and plans.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactRole

type ArtifactRole string

ArtifactRole classifies an input to a planned output.

const (
	ArtifactConfig             ArtifactRole = "config"
	ArtifactLock               ArtifactRole = "lock"
	ArtifactManifest           ArtifactRole = "manifest"
	ArtifactTemplate           ArtifactRole = "template"
	ArtifactConventionPart     ArtifactRole = "convention-part"
	ArtifactAuthoredData       ArtifactRole = "authored-data"
	ArtifactTopicMetadata      ArtifactRole = "topic-metadata"
	ArtifactClaimPart          ArtifactRole = "claim-part"
	ArtifactDecisionRecord     ArtifactRole = "decision-record"
	ArtifactManagedOutput      ArtifactRole = "managed-output"
	ArtifactProtocolDescriptor ArtifactRole = "protocol-descriptor"
)

type Declaration

type Declaration struct {
	// contains filtered or unexported fields
}

Declaration records one deterministic output and its semantic inputs.

func NewDeclaration

func NewDeclaration(path, templateID string, declarers []string, inputs []Input, dependencies []string) Declaration

func (Declaration) Declarers

func (d Declaration) Declarers() []string

func (Declaration) Inputs

func (d Declaration) Inputs() []Input

func (Declaration) Path

func (d Declaration) Path() string

func (Declaration) TemplateID

func (d Declaration) TemplateID() string

type Input

type Input struct {
	// contains filtered or unexported fields
}

Input is one semantic input consumed by an output.

func NewInput

func NewInput(path string, role ArtifactRole) Input

func (Input) Path

func (i Input) Path() string

func (Input) Role

func (i Input) Role() ArtifactRole

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node is one immutable path in a Plan.

func NewNode

func NewNode(spec NodeSpec) Node

func (Node) Declarers

func (n Node) Declarers() []string

func (Node) Output

func (n Node) Output() (Output, bool)

func (Node) Path

func (n Node) Path() string

type NodeSpec

type NodeSpec struct {
	Path                string
	Recipe              Recipe
	Policy              Policy
	Declarers           []string
	DeclarerProjections []string
	DependsOn           []string
	ConsumedInputs      []Input
	ObservedTemplateID  string
	Output              *Output
}

NodeSpec is Publisher's construction projection for one plan node.

type Output

type Output struct {
	// contains filtered or unexported fields
}

Output is one immutable rendered output carried by a plan.

func NewOutput

func NewOutput(spec OutputSpec) Output

func (Output) Artifact

func (o Output) Artifact() string

func (Output) Assembled

func (o Output) Assembled() string

func (Output) ConfigHash

func (o Output) ConfigHash() string

func (Output) Content

func (o Output) Content() string

func (Output) Declarer

func (o Output) Declarer() string

func (Output) DeclarerProjection

func (o Output) DeclarerProjection() string

func (Output) Encoder

func (o Output) Encoder() string

func (Output) Kind

func (o Output) Kind() string

func (Output) MarkerParts

func (o Output) MarkerParts() []string

func (Output) PartVarRefs

func (o Output) PartVarRefs() []string

func (Output) Path

func (o Output) Path() string

func (Output) Policy

func (o Output) Policy() Policy

func (Output) Provenance

func (o Output) Provenance() int

func (Output) RegenChecked

func (o Output) RegenChecked() bool

func (Output) StubDefaults

func (o Output) StubDefaults() []string

func (Output) StubParts

func (o Output) StubParts() []string

func (Output) TemplateHash

func (o Output) TemplateHash() string

func (Output) TemplateID

func (o Output) TemplateID() string

type OutputSpec

type OutputSpec struct {
	Path, Content, TemplateID, TemplateHash, ConfigHash string
	RegenChecked                                        bool
	Policy                                              Policy
	Declarer, DeclarerProjection, Encoder               string
	Provenance                                          int
	Assembled, Kind, Artifact                           string
	StubDefaults, StubParts, MarkerParts, PartVarRefs   []string
	ConsumedInputs                                      []Input
	ObservedTemplateID                                  string
}

OutputSpec is the construction projection for one rendered output. Publisher consumes it immediately; Output stores every slice defensively.

type Plan

type Plan struct {
	// contains filtered or unexported fields
}

Plan is the immutable desired-output authority for one operation.

func New

func New(nodes []Node, declarations []Declaration) Plan

func (Plan) Declarations

func (p Plan) Declarations() []Declaration

func (Plan) Nodes

func (p Plan) Nodes() []Node

func (Plan) Outputs

func (p Plan) Outputs() []Output

func (Plan) Paths

func (p Plan) Paths() []string

type Policy

type Policy struct {
	ValidateFrontmatter bool
	ScanReferences      bool
	ScanSkillReferences bool
	Regenerate          bool
}

Policy is the complete lifecycle policy attached to an output.

type Recipe

type Recipe struct {
	// contains filtered or unexported fields
}

Recipe is the normalized output-affecting identity used for coalescing.

func NewRecipe

func NewRecipe(templateID, templateHash, configHash string, policy Policy, encoder, provenance string) Recipe

type TreeReader

type TreeReader interface {
	ReadFile(path string) ([]byte, bool, error)
	Paths(prefix string) ([]string, error)
}

TreeReader is the read-only operation-tree authority used during planning.

Jump to

Keyboard shortcuts

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