sentinel

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package sentinel centralizes the loop-control markers an unattended bee agent uses to signal turn outcomes back to the orchestrator.

Both `bee zzz` (single-objective overnight loop) and `bee agents` (parallel worktree agents) speak the same protocol — keeping the regex set in one place avoids drift, makes the contract self-documenting, and gives both orchestrators identical detection semantics. The status enums those orchestrators write to disk remain distinct: zzz tracks RUN lifecycle (running/completed/failed/aborted); bgreg.Status tracks AGENT-turn state (active/awaiting/done/failed/idle). Different abstractions, intentionally not collapsed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBlocked

func IsBlocked(s string) bool

IsBlocked is a thin shortcut for the common BLOCKED check.

func IsDone

func IsDone(s string) bool

IsDone is a thin shortcut for the common DONE check.

func IsNeedsInput

func IsNeedsInput(s string) bool

IsNeedsInput is a thin shortcut for the NEEDS-INPUT check.

Types

type Kind

type Kind int

Kind classifies the sentinel found in an agent's final text.

const (
	KindNone Kind = iota
	KindDone
	KindBlocked
	KindNeedsInput
)

func Classify

func Classify(s string) Kind

Classify returns the first sentinel kind that appears anchored to the start of any line in s, or KindNone when no sentinel is present.

DONE wins over BLOCKED/NEEDS-INPUT if multiple match — agents that complete the objective shouldn't be misclassified as blocked just because they quoted prior failure text.

func (Kind) String

func (k Kind) String() string

String renders the sentinel kind in the same casing the agent emits.

Jump to

Keyboard shortcuts

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