goalloop

package
v0.107.11 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package goalloop holds the session-goal rules shared by the TUI and the backend: the round prompts, the GOAL_MET completion and GOAL_NEEDS_INPUT checks, and the round limit resolution.

Index

Constants

View Source
const MetToken = "GOAL_MET"

MetToken is the literal a reply must lead with to declare the goal accomplished.

View Source
const NeedsInputToken = "GOAL_NEEDS_INPUT"

NeedsInputToken is the literal a reply leads with when the goal cannot advance without the user's answer; the goal then pauses until the user replies.

Variables

This section is empty.

Functions

func ClearedNotice

func ClearedNotice(goal string) string

ClearedNotice is the request-only text of a plain user turn after the user cleared the goal that history still shows.

func ContinuePrompt

func ContinuePrompt(goal string) string

ContinuePrompt is the user turn submitted after every unfinished round.

func MaxRounds

func MaxRounds(dir string, global int) int

MaxRounds resolves the continuation limit: a project override for dir wins over the global config value, which wins over the built-in default.

func Met

func Met(final string) bool

Met reports whether a final reply declares the goal accomplished. As the continuation prompt demands, the reply must lead with the token: only whitespace and Markdown emphasis, heading, quote or code markers may precede it, and it must end at a word boundary. A mention later in the reply ("not GOAL_MET yet") never counts.

func NeedsInput

func NeedsInput(final string) bool

NeedsInput reports whether a final reply asks the user for input the goal cannot advance without. It follows the same leading-token rule as Met.

func PausedNotice

func PausedNotice(goal string) string

PausedNotice is the request-only text of a plain user turn while the goal is paused by the user (or restored paused). The goal stays visible in history, so without it the model tends to pick the goal back up on its own.

func ReplyPrompt

func ReplyPrompt(goal string) string

ReplyPrompt is the request-only instruction of the round that carries the user's answer to a goal that paused for input; the visible user turn is the answer itself.

func StartPrompt

func StartPrompt(goal string) string

StartPrompt is the request-only instruction of the round that sets a goal. It carries the same rules as later rounds, so even the first round can finish the goal or ask for the user's input.

Types

This section is empty.

Jump to

Keyboard shortcuts

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