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 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 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