taskstate

package
v0.0.0-...-f56615f Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package taskstate provides model-managed plans and explicit long-term goals.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Goal

type Goal struct {
	Objective    string    `json:"objective"`
	TokenBudget  int       `json:"token_budget,omitempty"`
	Status       string    `json:"status"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	InputTokens  int64     `json:"input_tokens,omitempty"`
	OutputTokens int64     `json:"output_tokens,omitempty"`
	TotalTokens  int64     `json:"total_tokens,omitempty"`
	Turns        int       `json:"turns,omitempty"`
}

type Plan

type Plan struct {
	Explanation string    `json:"explanation,omitempty"`
	Steps       []Step    `json:"plan,omitempty"`
	UpdatedAt   time.Time `json:"updated_at,omitempty"`
}

type State

type State struct {
	// contains filtered or unexported fields
}

func New

func New(plan Plan, goal *Goal) *State

func (*State) RecordUsage

func (s *State) RecordUsage(usage provider.Usage)

func (*State) Reset

func (s *State) Reset()

func (*State) Restore

func (s *State) Restore(plan Plan, goal *Goal)

func (*State) Snapshot

func (s *State) Snapshot() (Plan, *Goal)

func (*State) Tools

func (s *State) Tools() []tool.Tool

type Step

type Step struct {
	Step   string     `json:"step"`
	Status StepStatus `json:"status"`
}

type StepStatus

type StepStatus string
const (
	StatusPending    StepStatus = "pending"
	StatusInProgress StepStatus = "in_progress"
	StatusCompleted  StepStatus = "completed"
)

Jump to

Keyboard shortcuts

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