changeworkflowplan

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(raw any) (map[string]any, error)

Build returns the canonical JSON projection for one explicit snapshot.

func BuildAgentEnvelope

func BuildAgentEnvelope(raw any) (map[string]any, error)

BuildAgentEnvelope returns the bounded generic agent-envelope projection.

func BuildText

func BuildText(raw any) (string, error)

BuildText returns the bounded plain-text projection for one explicit snapshot.

func MergeSuccessor

func MergeSuccessor(prior map[string]any, delta map[string]any) (map[string]any, error)

MergeSuccessor applies the only fields owned by a successor delta and returns a fresh input value for ordinary admission tests and integrations.

func RenderText

func RenderText(lines []TextLine) (string, error)

RenderText emits the canonical plain bytes from a structured projection.

func RuleID

func RuleID(err error) string

RuleID returns the stable failing rule without exposing rejected caller data.

Types

type Result

type Result struct {
	AgentEnvelope map[string]any
	Plan          map[string]any
	Text          string
	TextLines     []TextLine
}

Result is the complete set of deterministic presentation projections for one admitted snapshot. Callers select one projection; none is authoritative.

func Project

func Project(raw any) (Result, error)

Project admits raw input once and derives every supported presentation from the resulting immutable values.

type TextLine

type TextLine struct {
	Label string
	Value string
}

TextLine separates command-owned labels from admitted values so a caller may style labels without parsing or altering semantic text values.

func BuildTextProjection

func BuildTextProjection(raw any) ([]TextLine, error)

BuildTextProjection returns a fresh command-owned label/value projection. Labels may be styled by an app; values must be emitted unchanged.

Jump to

Keyboard shortcuts

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