contextinput

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: 9 Imported by: 0

Documentation

Overview

Package contextinput owns the neutral immutable semantic input consumed by context queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

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

Input is the complete, immutable semantic universe consumed by contextq. Its mutable representations remain private; Snapshot returns an independent projection for one bound consumer.

func New

func New(layout Layout, loaded currentstate.Loaded, plans PlanContext, tree *snapshot.Tree, lock *manifest.Lock, declarations []outputplan.Declaration, eligible, ignores []string) Input

New defensively retains one selected semantic universe.

func (Input) Snapshot

func (v Input) Snapshot() Snapshot

Snapshot returns an independent semantic projection.

type Layout

type Layout struct {
	DocsDir, ADRDir, IndexMd, PlansDir, DomainsDir string
	Docs, Singletons                               map[string]string
}

Layout is the fixed documentation layout needed to project context results.

type PlanContext

type PlanContext struct {
	Plans []plan.Plan
	// contains filtered or unexported fields
}

PlanContext carries parsed plans and their resolved reverse ADR links.

func NewPlanContext

func NewPlanContext(plans []plan.Plan, corpus adr.Corpus) PlanContext

NewPlanContext builds a defensive reverse link projection from already parsed plans.

func (PlanContext) LinkedPlans

func (c PlanContext) LinkedPlans(identity string) []string

LinkedPlans returns a defensive path projection.

type PlanReference

type PlanReference struct{ Path, Filename string }

PlanReference identifies one plan linked to an ADR.

type Snapshot

type Snapshot struct {
	Layout        Layout
	Loaded        currentstate.Loaded
	PlanState     PlanContext
	Tree          *snapshot.Tree
	Lock          *manifest.Lock
	Declarations  []outputplan.Declaration
	Eligible      []string
	ContextIgnore []string
}

Snapshot is one defensive projection of an Input. The selected Tree is deliberately shared because snapshot.Tree exposes immutable values only.

Jump to

Keyboard shortcuts

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