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

compose

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

Documentation

Overview

Package compose orchestrates one composition end to end so the CLI stays a thin rendering layer over the same path the tests exercise.

Index

Constants

View Source
const OmitReason = "the role's MCP scope omits the server this skill documents"

OmitReason is the trace wording for a skill dropped through OmitSkills.

Variables

This section is empty.

Functions

func IsExternalOnlyError

func IsExternalOnlyError(err error) bool

IsExternalOnlyError reports whether composition failed after resolving an external-only policy. Launchers use it to prohibit unsafe fallback.

Types

type Options

type Options struct {
	PersonPolicy         string
	PersonSource         string
	PersonalityLibraries []string
	// OperatingBase is the host doctrine that leads the bundle's instructions,
	// so a projected role no longer depends on a host-owned load point.
	OperatingBase string
	// OperatingAppendix is the configured tail, kept out of OperatingBase so the
	// roster-card rewrite cannot reach it. agent-compose#6987.
	OperatingAppendix string
}

type Result

type Result struct {
	Resolution   *resolver.Resolution
	Bundle       *bundle.Result
	ExternalOnly bool
}

func Run

func Run(requestPath, outDir string) (*Result, error)

func RunRoots

func RunRoots(
	req *schema.Request,
	roots []RootSource,
	outDir string,
	opts Options,
) (*Result, error)

RunRoots composes trusted absolute provider roots selected by a host launcher without weakening the portable KDL path rules.

func RunRootsWithMissing

func RunRootsWithMissing(
	req *schema.Request,
	roots []RootSource,
	missing []schema.MissingSource,
	outDir string,
	opts Options,
) (*Result, error)

RunRootsWithMissing preserves explicit provider exclusions in the resolver trace while composing the trusted roots that remain available.

func RunWithOptions

func RunWithOptions(requestPath, outDir string, opts Options) (*Result, error)

RunWithOptions applies a host person selection beneath any explicit request-local selection.

type RootSource

type RootSource struct {
	ID            string
	Root          string
	Reason        string
	Scope         string
	Skills        []string
	BindingSkills []string
	// Catalogue reads Root as a bare skills directory rather than a provider
	// tree, which is what an org grant expands to.
	Catalogue bool
	// OmitSkills names ordinary skills to drop after selection, such as the
	// tool reference of an MCP server the launch does not mount.
	OmitSkills []string
}

RootSource names one trusted provider root selected by a host launcher.

func OrgRoots

func OrgRoots(
	role string,
	sources []*schema.Source,
	set *catalogset.Set,
) ([]RootSource, error)

OrgRoots expands every org a role uses into one root per contributing catalogue, bounded by the org's selectors. See docs/skill-selectors.md.

Jump to

Keyboard shortcuts

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