launch

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package launch renders how a user continues a moved session: the first message that tells the agent what happened, and the command line for the user's shell.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultShell

func DefaultShell() string

DefaultShell is this machine's shell family.

func OSName

func OSName(goos string) string

OSName is a GOOS for people.

func PSQuote

func PSQuote(s string) string

PSQuote quotes for PowerShell.

func SessionName

func SessionName(title, location string) string

SessionName is a short name for Remote Control and session lists: "fix-tests@laptop".

func ShQuote

func ShQuote(s string) string

ShQuote quotes for POSIX shells, leaving plain words as they are.

func Shell

func Shell(c agent.Command, promptFile, family string) string

Shell renders a command for a shell family ("posix" or "powershell"). When promptFile is set, the command's last argument (the prompt) is read from that file instead of being inlined. The command's Unset variables are removed for it and its Env set (env -u K V=x, or Remove-Item and Set-Item in PowerShell, which opens a window of its own for it).

func StartPrompt

func StartPrompt(c Context) string

StartPrompt is the first message of a moved session: what happened, what that implies, and a request to check the environment before continuing.

Types

type Context

type Context struct {
	AgentName      string // the agent that resumes ("Claude Code")
	SourceLocation string
	SourceOS       string
	SourceVersion  string // the agent version that last wrote the session
	SourceCWD      string
	TargetLocation string
	TargetOS       string
	TargetCWD      string
	Branch         string
	WorktreeNote   string
	Unpushed       int
	Dirty          int
	SecretsFound   int
	Redacted       bool
	OtherAccount   bool // account-bound content was removed
	Live           bool // the source session was still running
	Fork           bool // the source keeps running
}

Context is what the moved session should know about its move.

Jump to

Keyboard shortcuts

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