launch

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 11 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 is what a task agent is prompted with and how the prompt reaches it: the skill line, the driven marker and the Enter retry.

Index

Constants

View Source
const DrivenMarker = "--driven"

DrivenMarker tells a skill the run is driven from another session: no interactive question, every ask through run state (modes/driven.md).

View Source
const ModeDiscuss = "discuss"
View Source
const ModePlan = "plan"

Variables

View Source
var (
	EnterRetry = 10 * time.Second
	EnterPoll  = 500 * time.Millisecond
)

A typed prompt's Enter can arrive while the input box is still busy with the text, and be lost; these bound how long a typed prompt is watched for that before Enter is pressed again, once.

Functions

func DependencyClause

func DependencyClause(id string, dep *Dependency) string

DependencyClause names the base task and where its plan is. What to do with that (design against the plan, not this checkout, with no fallback for its absence) is the fetch step's rule, so the prompt does not repeat it.

func Driven

func Driven(text string) string

Driven marks an f10 command as sent from outside; plain text (an answer, a steering note) goes as it is, since the agent it reaches already knows.

func HoldsPrompt

func HoldsPrompt(screen, text string) bool

HoldsPrompt reports whether the input box on screen still holds text, unsubmitted. A screen with no box found holds nothing, so no Enter is pressed where f10 cannot see what it would submit.

func Prompt

func Prompt(
	mode string,
	fl runplan.ShipFlow,
	id string,
	dep *Dependency,
	plan string,
	pick *hostops.Pickup,
	note string,
) string

Prompt is what the agent is told. A saved plan, or a flow with no plan entry, turns plan-then-ship into ship alone. Driven mode takes every gap on its default and fetch carries the dependency's contract, so the prompt states neither; a picked-up PR is never shipped unread.

func PromptAgentAs

func PromptAgentAs(ctx context.Context, path, id, suffix, text string) (string, error)

PromptAgentAs prompts the task's agent in the worktree at path, falling back to the bare name an agent started before the path hash still answers to, and names the agent that took the text.

func PromptChecked

func PromptChecked(ctx context.Context, path, id, suffix, text string) (string, error)

PromptChecked types text into the task's agent, then waits up to EnterRetry for the agent's prompt mark and presses Enter once if the text is still in its input box. The note says what the check did; it is never an error, since the prompt itself went out.

func RetryEnter

func RetryEnter(ctx context.Context, b agentctl.Backend, name, text string) string

RetryEnter presses Enter once when the agent's input box still holds text. It says what it did, or why it could not look, "" when the prompt had gone through.

func WatchEnter

func WatchEnter(ctx context.Context, b agentctl.Backend, root, name, text string, sent time.Time) string

WatchEnter is PromptChecked's wait, for a prompt typed at sent into the agent in the checkout at root. Only the prompt mark ends it early: an empty input box may be one that has not drawn the text yet.

Types

type Dependency

type Dependency struct {
	Task    string
	Branch  string
	Plan    string // the plan's path, or "" when no checkout can reach it
	Planned bool   // the plan exists at that path
}

A Dependency is what --after records on the new branch: the base task, its branch as a bare name (`origin/` stripped, since the pr step targets a branch and ship looks it up local-first), and where its plan is.

Jump to

Keyboard shortcuts

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