Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailureMessage ¶
FailureMessage renders the bounded prompt injected after real auto-gate failures. It asks the agent to fix the work, never to mutate quest state.
func MisconfiguredLines ¶
MisconfiguredLines renders console-only diagnostics for broken checks.
Types ¶
type CheckRunner ¶
CheckRunner runs one auto-gate iteration.
type Config ¶
type Config struct {
MaxIters int
MaxWall time.Duration
StuckAfter int
BlockedTimeout time.Duration
}
Config holds the loop stop conditions. Zero values disable that ceiling.
type Engine ¶
type Engine struct {
Check CheckRunner
Inject Injector
Events <-chan Event
Clock Clock
Config Config
OnIteration func(Iteration)
OnBlocked func()
}
Engine is the pure quest loop core. All side effects are supplied by collaborators; it does not touch tmux, the filesystem, quest status, or gates.
type Event ¶
type Event struct {
Kind EventKind
}
Event is a turn-end or pause signal supplied by a watcher.
type EventKind ¶
type EventKind string
EventKind is an observed agent-state transition relevant to the loop.
type Outcome ¶
type Outcome struct {
Kind OutcomeKind
Reason StopReason
Iterations int
LastResults []gate.Result
Err error
}
Outcome describes why the engine stopped.
type OutcomeKind ¶
type OutcomeKind string
OutcomeKind is the terminal result of a loop run.
const ( OutcomeGreen OutcomeKind = "green" OutcomeMisconfigured OutcomeKind = "misconfigured" OutcomeStopped OutcomeKind = "stopped" OutcomeError OutcomeKind = "error" )
type StateWatcher ¶
type StateWatcher struct {
// contains filtered or unexported fields
}
StateWatcher polls one session's state.json for primary-pane done and blocked edges. It is intentionally decoupled from the engine and command wiring.
func NewStateWatcher ¶
func NewStateWatcher(stateRoot, sessionID string, interval time.Duration) StateWatcher
NewStateWatcher returns a poll watcher rooted at stateRoot.
type StopReason ¶
type StopReason string
StopReason explains an OutcomeStopped result.
const ( StopBudget StopReason = "budget" StopStuck StopReason = "stuck" StopBlockedTimeout StopReason = "blocked_timeout" StopCanceled StopReason = "canceled" StopEventSource StopReason = "event_source_closed" )