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

launch

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

Documentation

Overview

Package launch is the refresh-then-exec path: compose, project, and hand off to the real harness with a recursion guard and a last-known-good net.

Index

Constants

View Source
const (
	SessionBundleEnv = "AGENT_COMPOSE_SESSION_BUNDLE"
	SessionLayoutEnv = "AGENT_COMPOSE_SESSION_LAYOUT"
)

SessionBundleEnv and SessionLayoutEnv bind a session to the bundle it was launched with, which a path walk cannot do. See docs/whoami.md.

View Source
const AttributionRoleEnv = "AGENT_GIT_ATTRIBUTION_ROLE"

AttributionRoleEnv carries the composed role to the git attribution shim. Per-session: the host projection is global. See coilysiren/inbox#362.

View Source
const EnvDepth = "AGENT_COMPOSE_LAUNCH_DEPTH"

EnvDepth counts the agent-compose launches a process sits inside, where the sentinel only says that it is inside one. Absent means none.

View Source
const EnvSentinel = "AGENT_COMPOSE_LAUNCH"

EnvSentinel marks a process launched by agent-compose. Both call sites read it to skip work a parent already did, and neither refuses on it alone.

View Source
const MaxNestedDepth = 1

MaxNestedDepth bounds deliberate agent-to-agent launches. One hop lets a session start a second seat while a runaway loop still terminates.

Variables

This section is empty.

Functions

func DepthEnv

func DepthEnv(depth int) string

DepthEnv stamps the depth a launched process runs at.

func NestedDepth

func NestedDepth(sentinel, depth string) (int, error)

NestedDepth resolves the depth a launched child runs at, refusing anything past MaxNestedDepth. The bound is the guard rather than an opt-in. #403

Types

type Options

type Options struct {
	RequestPath  string
	Layout       string
	TargetDir    string
	OutDir       string
	PersonPolicy string
	PersonSource string
}

type Result

type Result struct {
	BundleDir    string
	BundleReused bool
	Projected    int
	Fallback     bool
	Warning      string
	Warnings     []string
}

func Refresh

func Refresh(opts Options) (*Result, error)

Refresh composes and projects, falling back to a validated last-known-good projection on failure with the cause surfaced as a warning.

Jump to

Keyboard shortcuts

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