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

assembly

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package assembly enumerates the compiled composition of the orb product — compiled extensions, first-party plugins, and MCP — as ordered rows with stable ids, resolves their enablement from settings, and loads the result. Enumeration and boot share this one implementation, so what a dump prints is exactly what boots (P3). The package holds no state: N assemblies with N settings managers coexist in one process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(cwd string, resolved []Resolved) (*extensions.Registry, []extensions.CompiledLoadError)

Load registers the enabled rows into a Registry, preserving extensions.LoadCompiled semantics: "<inline:id>" registration paths, a nil registry when nothing is enabled, and identical error text.

Types

type Options

type Options struct {
	Memory memory.Store
	// BridgeManagement exposes the host-supplied settings page before service activation.
	BridgeManagement bool
	Bridge           extensions.Factory
	BridgeAgentCalls extensions.Factory
	CWD              string
	AgentDir         string
	Settings         *config.SettingsManager
	// Compiled rows supplied by the assembly owner (cmd/orb's compiled
	// extensions, or an embedder's own), first in boot order.
	Compiled []extensions.CompiledExtension
	// MCP includes settings-configured MCP servers as a hidden row. Leave it
	// off for metadata-only runs so no configured server is eagerly spawned.
	MCP bool
}

Options are the explicit inputs of one assembly; nothing is read from the environment.

type Resolved

type Resolved struct {
	Row
	Enabled   bool
	DecidedBy string // "default", "goExtensions", "plugins", "always", "--no-extensions"
}

Resolved is a Row plus its effective enablement and the layer that decided it.

func Resolve

func Resolve(rows []Row, settings *config.SettingsManager, disableAll bool) []Resolved

Resolve applies the settings gates: DefaultEnabled, then the goExtensions override, then — for plugin rows — the plugins gates (plugin-control is always on, as is host-supplied Bridge management; capability execution stays opt-in). disableAll (--no-extensions) turns everything off.

type Row

type Row struct {
	ID             string
	Description    string
	Source         Source
	Hidden         bool
	DefaultEnabled bool
	Factory        extensions.Factory
}

Row is one composable unit of the product, addressable by its stable ID. Row ids are a public contract (P3): renaming one is a breaking change.

func Rows

func Rows(options Options) ([]Row, []string)

Rows enumerates the composition in boot order: caller compiled rows, plugin-control, the first-party plugin catalog, then MCP when configured. The warnings surface MCP settings problems.

type Source

type Source string

Source records which mechanism contributes a row.

const (
	SourceCompiled Source = "compiled"
	SourcePlugin   Source = "plugin"
	SourceMCP      Source = "mcp"
)

Jump to

Keyboard shortcuts

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