attention

package
v0.202.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: BSD-2-Clause Imports: 8 Imported by: ? 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 attention reads stored answers from the attention-controller store.

The store keeps one card per question a worker asked, plus a delivery report per card. A card whose answer exists but was never delivered is an answer the worker never saw; re-surfacing it on the next resume is what lets the task continue instead of asking the same question again.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StoredAnswer

type StoredAnswer struct {
	// ItemID identifies the attention item the answer belongs to.
	ItemID string
	// Answer is the answer text, already formatted for display.
	Answer string
}

StoredAnswer is an answer that was stored against a task's session but never delivered to that session.

type StoredAnswerReader

type StoredAnswerReader interface {
	FindUnconsumed(ctx context.Context, sessionID string) (*StoredAnswer, error)
}

StoredAnswerReader finds an unconsumed stored answer for a session.

It returns (nil, nil) when the session has no undelivered answered item.

func NewHTTPStoredAnswerReader

func NewHTTPStoredAnswerReader(baseURL string, client *http.Client) StoredAnswerReader

NewHTTPStoredAnswerReader creates a reader backed by the attention store at baseURL. The caller owns client and must supply one with a timeout — a blackholed store must never block a resume forever.

Jump to

Keyboard shortcuts

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