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
- func ClearedNotice(goal string) string
- func ContinueGoal(prompt string) (string, bool)
- func ContinuePrompt(goal string) string
- func MaxRounds(dir string, global int) int
- func Met(final string) bool
- func NeedsInput(final string) bool
- func PausedNotice(goal string) string
- func ReplyPrompt(goal string) string
- func StartPrompt(goal string) string
Constants ¶
const MetToken = "GOAL_MET"
MetToken is the literal a reply must lead with to declare the goal accomplished.
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 ¶
ClearedNotice is the request-only text of a plain user turn after the user cleared the goal that history still shows.
func ContinueGoal ¶ added in v0.107.31
ContinueGoal reports whether prompt is a ContinuePrompt and, if so, its goal.
func ContinuePrompt ¶
ContinuePrompt is the user turn submitted after every unfinished round.
func MaxRounds ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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.