Documentation
¶
Overview ¶
Package derivetest is test support for the derive engine: it stores raw data as ingest would and inspects the derived tables.
Index ¶
- func APIError(ts string, kv ...any) string
- func At(sec int) string
- func Cwd(line, cwd string) string
- func Line(typ, ts string, kv ...any) string
- func Notify(ts, toolUseID string, ms int) string
- func Prompt(ts, text string) string
- func Reply(ts, msgID, model string, usage map[string]any, blocks ...map[string]any) string
- func Result(ts, toolUseID string, isError bool, toolUseResult map[string]any) string
- func Side(line, agentID string) string
- func SidePrompt(ts, text string) string
- func TaskNote(ts string) string
- func Text(s string) map[string]any
- func Tool(id, name string, input map[string]any) map[string]any
- func Turn(ts string, ms int) string
- func Unix(sec int) int64
- func Usage(in, out, read, w5, w1 int) map[string]any
- type Env
- func (e *Env) Derive(t testing.TB, userID string, batch int) int
- func (e *Env) Device(t testing.TB, userID, name string) string
- func (e *Env) Dump(t testing.TB, userID string, repl map[string]string) string
- func (e *Env) Exec(t testing.TB, q string, args ...any)
- func (e *Env) N(t testing.TB, q string, args ...any) int
- func (e *Env) Put(t testing.TB, userID, deviceID string, files ...File)
- func (e *Env) Reset(t testing.TB, userID string)
- func (e *Env) Row(t testing.TB, q string, args ...any) string
- func (e *Env) User(t testing.TB, sub string) string
- type File
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SidePrompt ¶
SidePrompt is the first user line of a subagent.
Types ¶
type Env ¶
Env is a migrated test database with an application pool.
func (*Env) Derive ¶
Derive runs DeriveUser with the given batch size (0 = default) and returns the rows processed.
func (*Env) Dump ¶
Dump is the canonical text of all derived tables of the user, with every key of repl replaced by its value.