controlspace

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package controlspace launches a session worker in the control agent space, as a child process of the controller.

The child is the same Peen binary running `peen worker`, started in the session workspace under the controller's own process identity. Its launch document arrives on stdin, so the credential never appears in the process table or on disk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Launcher

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

Launcher starts control workers.

func New

func New(options Options) (*Launcher, error)

New resolves the binary a control worker runs.

func (*Launcher) Kind

func (l *Launcher) Kind() worker.Kind

Kind reports the agent space kind this launcher serves.

func (*Launcher) Launch

func (l *Launcher) Launch(
	ctx context.Context,
	request worker.LaunchRequest,
) (worker.Process, error)

Launch starts one `peen worker` child in the session workspace.

type Options

type Options struct {
	// BinaryPath is the Peen binary to run. Empty means this process's own
	// executable, which is what makes a control worker the same build as its
	// controller.
	BinaryPath string

	// Environment is the base environment every worker inherits. Empty means
	// the controller's own. Either way the controller-only settings are
	// removed before a worker gets it.
	Environment []string

	// ProviderCredentialKeys names the variables that hold the provider
	// credentials the worker's model calls need. They stay in the worker's
	// environment even when their names start with PEEN_.
	ProviderCredentialKeys []string
}

Options builds a control launcher.

Jump to

Keyboard shortcuts

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