flowdocs

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 18 Imported by: 0

Documentation

Overview

Package flowdocs produces bounded source observations, never accepted intent or witnessed runtime behavior, from immutable native-index source bytes.

Index

Constants

View Source
const MaxBytes = 64 << 20
View Source
const MaxFlows = 256
View Source
const MaxManifestBytes = 256 << 20
View Source
const MaxOutputBytes = MaxManifestBytes + MaxBytes
View Source
const Schema = "corvint-flow-documentation/1"
View Source
const Version = "1"

Variables

This section is empty.

Functions

func CompareOutput

func CompareOutput(destination string, files map[string][]byte) ([]string, error)

func Encode

func Encode(v any) ([]byte, error)

func Finalize

func Finalize(ctx context.Context, root string, r *Result, revision, providerPath string) (doccorpus.Manifest, error)

Finalize is read-only: after the caller commits provider.json, it binds that later provider commit while preserving the original source revision.

func Materialize

func Materialize(destination string, r *Result) error

func MaterializeCoverage

func MaterializeCoverage(destination string, files map[string][]byte) error

MaterializeCoverage shares the confined writer with the bounded coverage descendant.

func ReadCorpusFile

func ReadCorpusFile(name string) ([]byte, error)

func ReadFile

func ReadFile(name string) ([]byte, error)

Types

type AnchorCheck

type AnchorCheck struct {
	State  string            `json:"state"`
	Before doccorpus.Anchor  `json:"before"`
	After  *doccorpus.Anchor `json:"after,omitempty"`
	Reason string            `json:"reason"`
}

type BindingCheck

type BindingCheck struct {
	ID       string            `json:"id"`
	State    string            `json:"state"`
	Before   doccorpus.Anchor  `json:"before"`
	After    *doccorpus.Anchor `json:"after,omitempty"`
	Reason   string            `json:"reason"`
	Evidence []AnchorCheck     `json:"evidence"`
}

type Call

type Call struct {
	Name   string
	Anchor doccorpus.Anchor
}

type Check

type Check struct {
	OpaqueChanges     []OpaqueChange       `json:"opaque_changes"`
	Source            doccorpus.Repository `json:"source"`
	Target            doccorpus.Repository `json:"target"`
	Bindings          []BindingCheck       `json:"bindings"`
	Added             []string             `json:"added"`
	Retired           []string             `json:"retired"`
	OutputDifferences []string             `json:"output_differences"`
	Clean             bool                 `json:"clean"`
}

func CheckRevision

func CheckRevision(ctx context.Context, root string, previous []byte, revision, output string) (Check, error)

type Flow

type Flow struct {
	ID, Name, Path string
	Paragraphs     []Paragraph
	Calls          []Call
}

type Manifest

type Manifest struct {
	OpaqueGitlinks []OpaqueGitlink          `json:"opaque_gitlinks"`
	Schema         string                   `json:"schema"`
	Version        string                   `json:"version"`
	Source         doccorpus.Repository     `json:"source"`
	Scope          string                   `json:"scope"`
	Flows          []Flow                   `json:"flows"`
	Provider       doccorpus.ProviderRecord `json:"provider"`
	Corpus         *doccorpus.Artifact      `json:"corpus,omitempty"`
	Gaps           []string                 `json:"gaps"`
	Outputs        []Output                 `json:"outputs"`
}

type OpaqueChange

type OpaqueChange struct {
	Path   string `json:"path"`
	Before string `json:"before"`
	After  string `json:"after"`
}
type OpaqueGitlink struct {
	Path   string `json:"path"`
	Commit string `json:"commit"`
}

type Options

type Options struct {
	Revision, Scope string
	Corpus          []byte
}

type Output

type Output struct{ Path, SHA256 string }

type Paragraph

type Paragraph struct {
	ID, Section, Text string
	Anchor            doccorpus.Anchor
	Bindings          []doccorpus.Anchor
	Imported          bool
}

type Result

type Result struct {
	Manifest Manifest
	Files    map[string][]byte
}

func Generate

func Generate(ctx context.Context, root string, o Options) (*Result, error)

func Open

func Open(ctx context.Context, root string, raw []byte) (*Result, error)

Open distrusts carried IDs, prose, bindings and output digests. Every byte is rederived from the pinned source and revalidated optional corpus.

Jump to

Keyboard shortcuts

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