tools

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 19 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

Index

Constants

View Source
const (
	OutcomeGiven    = "given"
	OutcomeBlocked  = "blocked"
	OutcomeCut      = "cut"
	OutcomeRepeated = "repeated"
)

Outcomes of a hint, as monitoring counts them

Variables

This section is empty.

Functions

This section is empty.

Types

type Given

type Given struct {
	// Hints given, those held back as they looked like instructions slipped in by someone else, and those cut to what a hint keeps
	Hints, Blocked, Cut int
	// Instruction files the newest hints were of, newest last
	Recent []string
}

What came of the hints since icebath started

type Hints

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

The hints of the folders the agent's work first enters in each session: the instruction files of a folder a tool call reaches for the first time, and of the folders between it and the session's own, added after the call's result, never to the system prompt, which so stays as the provider's prompt cache holds it

func Register

func Register(registry *tools.Registry, store *sessions.Registry) *Hints

func (*Hints) Add

func (h *Hints) Add(ctx context.Context, def tools.Def, call *tools.Call, _ string) string

Hints of the folders the call reaches for the first time in its session, and of those between each and the session's folder, the deepest first: what a tool says of the paths it works on, the path arguments any tool takes, and for a shell the folders a command moves to and the paths it names. Nothing where the settings turn hints or project rules off, or for a call of no session

func (*Hints) Compacted

func (h *Hints) Compacted(_ *config.Config, session string)

Forgets what the session was hinted once its context is compacted, so a hint the summary folded away is given again on the next visit

func (*Hints) Given

func (h *Hints) Given() Given

What came of the hints since icebath started

func (*Hints) Telling

func (h *Hints) Telling(tell func(outcome string))

Hands each hint given or held back from now on to tell, such as monitoring's count of them; tell never blocks

func (*Hints) Tools

func (*Hints) Tools() []tools.Def

The hints bring no tools of their own

Jump to

Keyboard shortcuts

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