Documentation
¶
Overview ¶
Package items owns public Items: it projects execution observations to the supported Item variants, merges them into stored Items and builds the ordered public events that report each Item change.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Change ¶
type Change struct {
// Previous is the stored Item, zero for a new one.
Previous v1.Item
Item v1.Item
// Output reports whether a new Item takes the Turn's next output index.
// Inputs, function results included, take none.
Output bool
// Delta is the text or command output fragment this observation
// contributed, nil when it contributed none.
Delta *string
}
Change is one decided Item write.
type Stored ¶
type Stored struct {
// Item is the stored Item, or the zero Item when the Update adds a new one.
Item v1.Item
// NativeMessage reports that the Turn has an assistant message other than
// this Item. Observe reads it only when the Update NeedsNativeMessage.
NativeMessage bool
// FunctionResult is the result the application saved for the call, if any.
// Observe reads it only for an Update with a ResultCall.
FunctionResult json.RawMessage
}
Stored is what a Session already holds for an Update's Item.
type Update ¶
type Update struct {
Item v1.Item
AppendText bool
CommandOutputDelta *string
// An aggregate answer is used only when no native message identity was recorded.
AggregateFinal bool
}
func (Update) NeedsNativeMessage ¶
NeedsNativeMessage reports whether Observe reads Stored.NativeMessage for u: an aggregate answer applies only when the Turn recorded no native message.
func (Update) ResultCall ¶
ResultCall returns the call whose saved result Observe reads for u, a function result.