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

assembly

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 25 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 Catalog added in v0.9.0

func Catalog(option ...CatalogOptions) map[string]extensions.Factory

Catalog returns fresh extension factories for embedders to select per instance.

func Control added in v0.9.0

func Control(cwd, agentDir string, settings *config.SettingsManager) extensions.Factory

Control registers /plugins independently of the default-off plugin catalog. cwd and agentDir feed the in-window package installer; empty values disable it (SDK embedders composing their own assemblies).

func Description added in v0.9.0

func Description(name string) string

Description returns the one-line description used by the CLI and TUI.

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.

func Names added in v0.9.0

func Names() []string

Names returns the stable first-party plugin order.

Types

type CatalogOptions added in v0.9.0

type CatalogOptions struct {
	UsageCache       *usage.Cache
	Memory           memorysdk.Store
	Bridge           extensions.Factory
	BridgeAgentCalls extensions.Factory
	StreamFn         engine.StreamFn
	HTTPClient       *http.Client
	Settings         *config.SettingsManager
	Policy           *permissions.Policy
	AgentDir         string
	// ClaudeSessions is host-supplied: it runs processes the SDK layer never owns.
	ClaudeSessions extensions.Factory
	// Bash builds the host's bash tool, which background jobs run through.
	Bash jobs.Bash
}

CatalogOptions supplies explicit runtime seams so bundled plugins remain instance-scoped.

type Options

type Options struct {
	UsageCache *usage.Cache
	Memory     memory.Store
	// BridgeManagement exposes the host-supplied settings page before service activation.
	BridgeManagement bool
	Bridge           extensions.Factory
	BridgeAgentCalls extensions.Factory
	ClaudeSessions   extensions.Factory
	Bash             jobs.Bash
	CWD              string
	AgentDir         string
	Settings         *config.SettingsManager
	Policy           *permissions.Policy
	// 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