Help us shape the future of Go! Take the 2026 Go Developer Survey

schema

package
v2.219.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeliveryNativeSkills = "native-skills"
	DeliveryCompiled     = "compiled"
	ModelTierFrontier    = "frontier"
	ModelTierCommodity   = "commodity"
	ModelTierOSS         = "oss"

	ProviderScopePerson  = "person"
	ProviderScopeRequest = "request"
	ProviderScopeDefault = "default"
	ProviderScopeHarness = "harness"
	ProviderScopeRole    = "role"
	// ProviderScopeOrg is a catalogue an org grant admitted. It is a catalogue
	// provider, so it carries the catalogue category like the default scope.
	ProviderScopeOrg = "org"

	// CoreLibraryRoot names the embedded personality library wherever a
	// personality-library root is accepted. See docs/personality.md.
	CoreLibraryRoot = "roster:core"
)

Variables

View Source
var CardSections = []string{"voice", "run"}

CardSections are the identity card sections a request may omit. The rest of the card is what makes a bundle an identity, so it is not omittable.

Functions

func IsModelTier

func IsModelTier(value string) bool

IsModelTier reports whether value belongs to the complete stable model-tier vocabulary. Model identity and provider routing remain caller-owned facts.

func LoadSources

func LoadSources(req *Request, requestPath string) ([]*Source, []MissingSource, error)

LoadSources reads each declared source relative to the request file. A missing required source fails; a missing optional one returns for the trace.

func ModelTiers

func ModelTiers() []string

ModelTiers returns the canonical presentation order for model tiers.

func OmitOrdinarySkills added in v2.200.0

func OmitOrdinarySkills(source *Source, names []string, reason string)

OmitOrdinarySkills drops the named skills and records each as excluded for reason. A name the source lacks is skipped, as one list goes to every provider.

func SelectOrdinarySkills

func SelectOrdinarySkills(source *Source, definition, binding []string) error

SelectOrdinarySkills applies a definition's selector, then a role binding's over the result so it narrows only. See docs/kdl-contracts.md.

Types

type ContentRef

type ContentRef struct {
	ID         string
	Path       string
	EntryPoint string
	Selectors  []string
}

type IdentityOverride

type IdentityOverride struct {
	Name string
}

IdentityOverride renames the seat a request composes. It says who is speaking, never what the role is. See docs/person-contract.md.

type MissingSource

type MissingSource struct {
	ID            string
	Reason        string
	Skills        []string
	ProviderScope string
	Warning       bool
}

MissingSource records an optional source whose declaration was absent, so the resolver can note the exclusion in the trace.

type OrgDefinition

type OrgDefinition struct {
	ID     string
	Owner  string
	Skills []string
}

OrgDefinition is one whole-forge-owner provider. It names an owner rather than a path: the catalogues are discovered, not listed. See docs/skill-catalogues.md.

type OrgUse

type OrgUse struct {
	Org string
}

OrgUse is one role's reference to a declared org.

type ProviderDefinition

type ProviderDefinition struct {
	ID     string
	Path   string
	Skills []string
}

ProviderDefinition names one document-local ordinary-skill provider. Path remains logical until cascade resolves it beneath projects_root.

type ProviderUse

type ProviderUse struct {
	Provider string
	Required bool
	Skills   []string
}

ProviderUse binds one document-local skill-provider repository to a role. Skills narrows within the definition's selector for this role alone.

type RepositoryDefinition

type RepositoryDefinition struct {
	ID     string
	Path   string
	Skills []string
}

RepositoryDefinition names one logical repository policy target. Optional Skills turns the repository into a bounded ordinary-skill provider.

type RepositorySelection

type RepositorySelection struct {
	Identity string `json:"identity"`
	Source   string `json:"source"`
	Scope    string `json:"scope"`
	Reason   string `json:"reason"`
}

RepositorySelection carries one immutable repository identity and its compiler decision provenance into a bundle.

type RepositoryUse

type RepositoryUse struct {
	Repository string
	Skills     []string
}

RepositoryUse is one reference to a document-local repository definition. Skills narrows within the definition's selector for this role alone.

type Request

type Request struct {
	PersonPolicy         string
	PersonSource         string
	PersonalityLibraries []string
	Role                 string
	Delivery             string
	ModelTier            string
	Identity             *IdentityOverride
	Sources              []SourceLocator
	Repositories         []RepositorySelection
	// BoundaryOmissions names defer-side boundaries this deployment does not
	// compose. See docs/ownership.md.
	BoundaryOmissions []string
	// CardOmissions names identity card sections this deployment does not
	// render. Only the sections in CardSections can go. See docs/roster-composition.md.
	CardOmissions []string
}

func ParseRequest

func ParseRequest(path string) (*Request, error)

type SelectorOverlap

type SelectorOverlap struct {
	Role      string
	Skill     string
	Selectors []string
}

SelectorOverlap records one composed skill admitted by multiple selectors while retaining their complete diagnostic and trace provenance.

type Source

type Source struct {
	ID               string
	Root             string
	Files            fs.FS
	Declaration      []byte
	Instructions     []ContentRef
	Skills           []ContentRef
	RoleSkills       map[string][]ContentRef
	SelectorOverlaps []SelectorOverlap
	Providers        map[string]ProviderDefinition
	RoleProviders    map[string][]ProviderUse
	Repositories     map[string]RepositoryDefinition
	Orgs             map[string]OrgDefinition
	RoleOrgs         map[string][]OrgUse
	GlobalRepos      []RepositoryUse
	RoleRepos        map[string][]RepositoryUse
	ResidentRepos    []RepositoryUse
	AdmissionReason  string
	ProviderScope    string
	ExcludedSkills   []ContentRef
	SelectorReason   string
	// ExcludedReasons overrides the selector wording for a skill dropped for
	// another cause, keyed by skill ID.
	ExcludedReasons map[string]string
}

func LoadCatalogue

func LoadCatalogue(id, root string) (*Source, error)

LoadCatalogue reads a bare skills directory as a source. A catalogue holds skill directories directly, with no .agents/skills, invariant or role graph.

func LoadSource

func LoadSource(sourcePath string) (*Source, error)

LoadSource reads one explicit declaration or infers an AOS knowledge provider root for direct consumers such as roster.

func (*Source) FileSystem

func (s *Source) FileSystem() fs.FS

FileSystem returns embedded content for shipped sources and disk content for declared or inferred providers.

func (*Source) ReadFile

func (s *Source) ReadFile(name string) ([]byte, error)

type SourceLocator

type SourceLocator struct {
	ID          string
	Declaration string
	Root        string
	Required    bool
}

Jump to

Keyboard shortcuts

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