state

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoRef

type MemoRef struct {
	Key     string `json:"key"`
	Version int64  `json:"version"`
}

MemoRef locates a stored memo under an authoritative session or A-leg scope. Version is a monotonic counter bumped by the memo store on each mutation so callers can detect stale references.

func (MemoRef) Equal

func (r MemoRef) Equal(other MemoRef) bool

Equal reports whether two memo references identify the same store entry revision.

func (MemoRef) IsEmpty

func (r MemoRef) IsEmpty() bool

IsEmpty reports whether a memo reference points to no memo.

type MemoState

type MemoState struct {
	// Memo is the bounded planning content captured from a thinker turn.
	Memo string
	// SourceSelector is the selector string that selected the thinker branch.
	SourceSelector string
	// Backend identifies the backend instance that produced the memo.
	Backend string
	// Model identifies the model that produced the memo.
	Model string
	// RequestID identifies the thinker request that produced the memo.
	RequestID string
	// CreatedAt is when the memo was captured.
	CreatedAt time.Time
	// InjectedCount is how many executor turns have received this memo.
	InjectedCount int
	// RegularTurnsRemaining is the remaining memo injection budget.
	RegularTurnsRemaining int
	// VisibleToClient records whether the memo content has been surfaced to
	// the client (visible mode). Used to suppress duplicate injection.
	VisibleToClient bool
	// ExtractionSource describes how Memo was derived. Whole-output capture is
	// the only derivation path, so this is always ExtractionSourceFull.
	ExtractionSource string
	// StreamInterrupted records whether the thinker stream was interrupted
	// before completion while capturing this memo.
	StreamInterrupted bool
}

MemoState is the persisted thinker memo and its observable metadata.

Jump to

Keyboard shortcuts

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