launch

package
v0.71.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 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 DrivenEnv = "F10_DRIVEN"

DrivenEnv marks the environment of an agent a drive runs, so a hook can tell a drive's agent from one the user works in.

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 plan step's rule, so the prompt does not repeat it.

func DiscussionPrompt added in v0.64.0

func DiscussionPrompt(d Discussion, note string) string

DiscussionPrompt reads every task, shows how they relate and what the drive would propose, then waits. Its outcome is a start command, whose first group continues in this worktree.

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 InputReady added in v0.62.0

func InputReady(ctx context.Context, path, id, suffix string) (bool, error)

InputReady reports whether the task's agent shows Claude's input box, which a permission dialog or a menu replaces while it is open.

func JoinClause added in v0.71.0

func JoinClause(id string, deps []Dependency) string

JoinClause names a join's bases and their plans, for a plan that designs against all of them. A join branches from the default branch, which holds none of their code while they are only planned.

func Prompt

func Prompt(
	mode, id string, dep *Dependency, plan string, pick *hostops.Pickup, note string, closed ...Closed,
) string

Prompt is what an agent that waits for a person is told: a discussion, or a picked-up PR, which is never shipped unread. A task run through its flow is prompted by its drive, one skill at a time.

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 Closed added in v0.65.0

type Closed struct {
	ID      string   // the task, as its label
	Shipped []string // "<sha> <subject>", newest first
	More    int      // shipping commits left out of Shipped
	Release string   // the oldest tag holding the newest of them, or ""
	Typos   []string // open tasks one digit off the id, as "<id> (<title>)"
}

Closed is what a discussion's agent is told about a task the tracker already closed. It holds the commits that shipped the task, and the open tasks a typo of its id would have meant.

func (Closed) Note added in v0.65.0

func (c Closed) Note() string

Note is the report's line for the closed task.

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.

type Discussion added in v0.64.0

type Discussion struct {
	Tasks   []string // every id, the worktree's first
	Parents []string // the ids among them with subtasks
	Closed  []Closed // the ids among them the tracker closed
}

A Discussion is what a discussion of a parent or of several tasks covers; a lone task with no subtasks has none.

Jump to

Keyboard shortcuts

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