Documentation
¶
Overview ¶
Package sessiontest builds session events from terse JSON for the sessions test suites. Import it from _test files only.
Fixtures name events by their time: Ev(t, typ, 5200, …) has id "e5200" and is processed 5.2s after Epoch, so a tool result can point at its call by that number.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Epoch = time.Date(2026, 1, 1, 14, 0, 0, 0, time.UTC)
Epoch is time zero for fixture timestamps.
Functions ¶
func JS ¶
JS quotes s as a JSON string, escaping control bytes the way the wire does (%q would emit Go escapes JSON rejects).
Types ¶
type Event ¶
type Event = anthropic.BetaManagedAgentsSessionEventUnion
Event is the wire event union the sessions packages consume.
func Canonical ¶
Canonical is the reference session fixture: a user request, then three model requests (thinking, text, tool calls) ending on a call awaiting approval.
func Ev ¶
Ev is a processed event of type typ with id "e<ms>", processed at Epoch+ms. extra is more JSON fields, without braces.