compose

package
v0.13.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend implements backend.Backend using agent-compose.

func NewBackend

func NewBackend(engine *Engine) *Backend

NewBackend creates a Backend wrapping a compose Engine.

func (*Backend) ClaimIdle

func (b *Backend) ClaimIdle() string

ClaimIdle returns the name of an idle sandbox and marks it busy.

func (*Backend) CreateSandbox

func (b *Backend) CreateSandbox(ctx context.Context, opts mcpserver.SandboxOpts) (string, error)

func (*Backend) DeleteSandbox

func (b *Backend) DeleteSandbox(ctx context.Context, name string) error

func (*Backend) ExecStream

func (b *Backend) ExecStream(ctx context.Context, name string, command []string) (mcpserver.ExecResult, error)

func (*Backend) IdleCount

func (b *Backend) IdleCount(_ context.Context) (int, error)

func (*Backend) ListSandboxes

func (b *Backend) ListSandboxes(ctx context.Context) ([]mcpserver.SandboxStatus, error)

func (*Backend) Release

func (b *Backend) Release(name string)

Release marks a sandbox as idle again.

type Engine

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

Engine wraps agent-compose's Engine with aimux-specific defaults.

func New

func New(opts Options) (*Engine, error)

New creates an Engine from aimux config.

func (*Engine) Inner

func (e *Engine) Inner() *pkgcompose.Engine

Inner returns the underlying agent-compose Engine for direct access.

func (*Engine) KillSandbox

func (e *Engine) KillSandbox(ctx context.Context, name string) error

KillSandbox stops a sandbox by name.

func (*Engine) LaunchInSandbox

func (e *Engine) LaunchInSandbox(provider, dir string, opts LaunchOpts) (*LaunchResult, error)

LaunchInSandbox provisions an OpenShell sandbox (create, inject OTEL env, set egress policy) and returns its name. It does not open the interactive terminal; the caller does that via terminal.NewOpenShellExec(SandboxName), which runs "openshell sandbox connect" in a real PTY.

type LaunchOpts

type LaunchOpts struct {
	Name         string
	Image        string
	Provider     string
	OTELEndpoint string
}

LaunchOpts configures a sandbox launch.

type LaunchResult

type LaunchResult struct {
	SandboxName   string
	OTELSessionID string
}

LaunchResult carries information about a successfully provisioned sandbox. The interactive terminal is established separately by the caller via terminal.NewOpenShellExec(SandboxName, ...).

type Options

type Options struct {
	Binary   string              // openshell binary path (default: "openshell")
	Gateway  string              // gateway endpoint
	Insecure bool                // skip TLS verification
	Image    string              // default sandbox image
	Executor pkgcompose.Executor // optional: inject for testing
}

Options configures the compose Engine adapter.

Jump to

Keyboard shortcuts

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