agentstatus

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 2 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 agentstatus resolves product-neutral agent activity and health into one presentation shared by human-facing views.

Index

Constants

View Source
const DefaultDoneTTL = 10 * time.Minute

DefaultDoneTTL is the window in which a finished turn still reads as recently finished. Long enough to survive a coffee break, short enough that the lane never becomes a second idle column.

Variables

This section is empty.

Functions

This section is empty.

Types

type Freshness

type Freshness string
const (
	FreshnessUnknown     Freshness = "unknown"
	FreshnessCurrent     Freshness = "current"
	FreshnessStale       Freshness = "stale"
	FreshnessUnavailable Freshness = "unavailable"
)

type Input

type Input struct {
	ProviderSupported bool
	Unavailable       bool
	Ambiguous         bool
	Missing           bool
	Orphaned          bool
	Paused            bool
	Err               bool
	LegacyStatus      string
	LegacyIcon        string
	Activity          agentactivity.Tracker
	CapturedAt        time.Time
	Now               time.Time
	StaleAfter        time.Duration
	// DoneTTL bounds how long a completed turn stays in the done lane. Done is
	// an inbox of recent finishes, not a permanent bucket: past the TTL an
	// unacknowledged completion decays into idle on its own, so the lane keeps
	// meaning "this just finished" without requiring the user to dismiss it.
	// Zero disables decay.
	DoneTTL time.Duration
}

type LaneID

type LaneID string
const (
	LaneWorking LaneID = "working"
	LaneBlocked LaneID = "blocked"
	LaneDone    LaneID = "done"
	LaneIdle    LaneID = "idle"
	LanePaused  LaneID = "paused"
)

type Presentation

type Presentation struct {
	Lane       LaneID
	Icon       string
	Label      string
	Attention  bool
	Evidence   string
	ChangedAt  time.Time
	CapturedAt time.Time
	Health     bool
	Semantic   bool
	Freshness  Freshness
	// Inferred marks an idle whose provider has no completion signal, so its
	// absence from the done lane is a limitation rather than a fact.
	Inferred bool
}

func Resolve

func Resolve(in Input) Presentation

Resolve applies health/liveness precedence before semantic activity. The conservative legacy projection is used only when a provider has no activity detector, keeping old integrations usable without manufacturing evidence.

Jump to

Keyboard shortcuts

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