status

package
v0.13.11 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package status defines the session status model shared by every package that observes or reports on agent sessions: three orthogonal dimensions (process, turn, interaction) and the derivation of a single display Group from them. See docs/specifications/system-spec.md, "Session status model" (lines 41-56), for the spec this package implements.

This package is dependency-free by design: it is the one place these types exist, so every other package can share them without pulling in anything beyond the standard library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group string

Group is the derived, display-facing status shown to users.

const (
	GroupNeedsInput     Group = "needs_input"
	GroupWorking        Group = "working"
	GroupReadyForReview Group = "ready_for_review"
	GroupCompleted      Group = "completed"
)

func Derive

func Derive(s Status) Group

Derive maps a Status to its display Group, per the precedence hierarchy in system-spec.md:51-56:

  1. Any process other than running (exited or lost) is Completed, regardless of turn or interaction.
  2. Otherwise, an active or unknown turn is Working: the spec's Working rule ORs in both with no interaction qualifier, so it wins outright.
  3. Otherwise (running and idle), interaction decides: prompt or permission is Needs input; none or unknown is Ready for review.

type Interaction

type Interaction string

Interaction is what kind of input the agent is waiting on, if any.

const (
	InteractionNone       Interaction = "none"
	InteractionPrompt     Interaction = "prompt"
	InteractionPermission Interaction = "permission"
	InteractionUnknown    Interaction = "unknown"
)

type Process

type Process string

Process is the lifecycle state of a session's underlying process.

const (
	ProcessRunning Process = "running"
	ProcessExited  Process = "exited"
	ProcessLost    Process = "lost"
)

type Status

type Status struct {
	Process     Process
	Turn        Turn
	Interaction Interaction
}

Status is a session's raw state along the three orthogonal dimensions.

type Turn

type Turn string

Turn is whether the agent is currently computing or waiting on the user.

const (
	TurnActive  Turn = "active"
	TurnIdle    Turn = "idle"
	TurnUnknown Turn = "unknown"
)

Jump to

Keyboard shortcuts

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