instructions

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 3 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 instructions is what a turn's instructions carry from the loop's book: the earlier turns and, for a resume turn, what the stopped session left. Plain data; the templates of internal/turn render it.

Index

Constants

View Source
const HistoryMax = 10

HistoryMax is how many earlier turns the instructions carry.

Variables

This section is empty.

Functions

func Earlier

func Earlier(b turn.Book, seq int64) turn.Book

Earlier is the book without turn seq and the turns sent after it, for the history of seq's own instructions.

Types

type Item

type Item struct {
	Path string
	Line int
	Body string
}

type OpenItem

type OpenItem struct{ ID, Kind, Summary, WaitingOn, Since string }

OpenItem is one open item of the unit, as its instructions list it.

type Option

type Option struct {
	ID, Label string
	Publishes bool
}

type PastTurn

type PastTurn struct {
	When                                            time.Time
	Intent, Trigger, State, Verdict, Head, Endorsed string
	Summary, Next, Triage                           string
	Said                                            []string
	// Ledger is one line per op of the turn's records with its outcome.
	Ledger []string
}

PastTurn is one earlier turn. The first row of fields is the loop's, the second an agent's, Said the user's.

func History

func History(b turn.Book, limit int, log []turn.OpOutcome) []PastTurn

History is b's earlier turns, each naming its ledger ops with the outcome log holds for them.

type Question

type Question struct {
	Text, Recommend string
	Options         []Option
}

type Resume

type Resume struct {
	Question                         *Question
	Verdict                          string
	Blocking, NonBlocking            int
	ArtifactKind, ArtifactBody       string
	Items                            []Item
	Notes, Head, CurrentHead, Answer string
}

Resume is what a session that stopped left for the next one.

func ResumeOf

func ResumeOf(b turn.Book, seq int64, answer, currentHead, lastMessage string) *Resume

ResumeOf is what turn seq left: its last asked record's question, draft and artifact, and the notes of its last record, or lastMessage when the session stopped without recording. nil when the book has no such turn.

Jump to

Keyboard shortcuts

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