types

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package types holds the plain data types the public application surface shares with the internal packages that produce them. It stays free of non-stdlib imports by design: pkg/application imports internal/query and internal/model, so those packages can never import pkg/application back — this leaf package is the one cycle-free home for a type both sides name (s-tac-ah2). The exported-surface boundary test in pkg/application enforces that no exported signature names an internal type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FocusWhen

type FocusWhen struct {
	From string `yaml:"from,omitempty"`
	To   string `yaml:"to,omitempty"`
}

FocusWhen is the temporal scope for a focus or one of its involvement triples. At least one of From or To must be set when the field is present; the absent end means "open-ended in that direction." Dates are ISO YYYY-MM-DD format on disk and parsed into time.Time at validation time.

func (*FocusWhen) IsZero

func (w *FocusWhen) IsZero() bool

IsZero reports whether neither end is set. A FocusWhen with IsZero() == true is invalid in frontmatter (the field should have been omitted entirely); validators surface this as a shape error.

func (*FocusWhen) Validate

func (w *FocusWhen) Validate() error

Validate checks ISO date shape on each end and that at least one end is set. Returns a descriptive error or nil. Pure — no I/O, safe to call from validators and finders.

type GraphHealth

type GraphHealth struct {
	Warnings   int
	LoadErrors int
	Issues     []HealthIssue
}

GraphHealth is a flat summary of graph-integrity problems: the count of entry warnings, the count of unreadable (load-failed) entries, and every problem as an ordered line (load failures first, then entry warnings).

func (GraphHealth) Clean

func (h GraphHealth) Clean() bool

Clean reports whether the graph carries no integrity problems at all.

type HealthIssue

type HealthIssue struct {
	Ref     string
	Message string
}

HealthIssue is one graph-integrity problem as a displayable line: the entry ID (or load ref) it concerns and the human message.

type Involvement

type Involvement struct {
	Target string
	// Actors carries canonical-only names. Distinguishing "unset" (inherit
	// focus-level default) from "explicit empty" (deliberately
	// pull-available) requires the ActorsSet field; YAML's natural decoding
	// merges both into a nil slice, so we capture the distinction at
	// frontmatter parse time.
	Actors    []string
	ActorsSet bool
	When      *FocusWhen
}

Involvement is one entry in a kind: focus decision's involvement: list. Required: Target (entry ID this involvement is about). Optional: Actors (canonical-only; per-involvement override of focus-level default — explicit empty list means "deliberately unattributed / pull-available", distinct from the unset case which inherits the focus-level default). Optional: When (per-involvement temporal scope override).

type LintFinding

type LintFinding struct {
	Category string
	Code     string
	Severity LintSeverity
	// EntryID names the entry (or file path, for load errors) the finding is
	// about; empty for store-level findings like index drift.
	EntryID string
	Message string
}

LintFinding is one categorized lint observation. Category names the provider that raised it (graph, index, procedure-runtime); Code names the specific check within it.

type LintQuery

type LintQuery struct{}

LintQuery captures intent to surface graph integrity issues. Pure intent — the graph is held by the GraphFinder that runs the query.

type LintResult

type LintResult struct {
	Findings []LintFinding
}

LintResult is the structured output of a LintQuery: categorized findings from every provider, in provider order. Presenters group by category; shells derive the exit code from Errors alone.

func (*LintResult) Errors

func (r *LintResult) Errors() int

Errors counts the findings whose severity flips the exit code.

type LintSeverity

type LintSeverity string

LintSeverity classifies a lint finding's consequence: an error is a graph integrity problem and flips the exit code; an advisory records a risk the author may accept and never flips it (d-tac-rzi — an overshooting spec still runs; d-cpt-xc3 — spec-authoring advisories are never entry warnings).

const (
	LintError    LintSeverity = "error"
	LintAdvisory LintSeverity = "advisory"
)

type PartSize

type PartSize struct {
	Part  string
	Bytes int
}

PartSize names one serve part and its byte size — the per-part accounting behind the serve-budget measurement (d-tac-qwc). Injects and lanes are the scaling parts; schema, diagnostics, and produced complete a serve's weight.

type PatchPair

type PatchPair struct {
	Old string
	New string
}

PatchPair is one exact search-replace edit, applied by the staged-attachment edit path (internal/textpatch carries the apply semantics).

type ServeLane

type ServeLane struct {
	Name string
	Text string
}

ServeLane is one rendered lane of a serve's instruction unit — the unit a host's served-once memory dedups at (d-tac-87o).

type ShowTreeBudget

type ShowTreeBudget struct {
	MaxNodes    int
	MaxChildren int
}

ShowTreeBudget bounds a tree's expansion per direction: MaxNodes caps how many whole-entry nodes one direction may carry, MaxChildren caps one node's fan-out. Children past a bound land as TruncatedRefs — the same honest frontier the depth limit renders — never silently dropped. Zero values are unbounded: explicit pulls (sdd show, the MCP show tool) pass no budget and arrive complete (d-tac-rzi).

type ViewBudget

type ViewBudget struct {
	// GroupItems caps focus groups, participant groups, and WIP markers per
	// section.
	GroupItems int
	// RefsPerEntry caps expand(refs) sub-lines per entry.
	RefsPerEntry int
	// BodyBytes caps as-bodies sections: whole bodies while bytes fit.
	BodyBytes int
}

ViewBudget names the per-shape bounds a served view applies: every cut is at a whole unit (a focus group, a marker, a body, a ref sub-line) and the shape carries the dropped count plus a runnable pull for the remainder.

type Warning

type Warning struct {
	Field   string // "refs", "closes", "supersedes"
	Value   string // the offending ID or value
	Message string // human-readable description
}

Warning represents a validation issue found on a graph entry.

Jump to

Keyboard shortcuts

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