Versions in this module Expand all Collapse all v0 v0.3.1 Oct 31, 2026 v0.3.0 Oct 31, 2026 Changes in this version + func FrameHTML(frame string) string type Env + func (e Env) TempDir(name string) (string, error) + type ExportChapter struct + Caption string + ID string + Label string + Steps []ExportStep + type ExportStep struct + Caption string + Expect Expects + HTML string + Keys []string + Label string + type ExportedStory struct + App string + Area string + Chapters []ExportChapter + Fixture string + Height int + ID string + Name string + Version int + Width int type Library + func (lib Library) Export(s *Story) (ExportedStory, error) type Options + TempRoot string type RunOptions + Observe func(RunPosition) + type RunPosition struct + Action int + After int + Session *Session v0.2.0 Oct 31, 2026 Changes in this version + type Action struct + Caption string + Expect Expects + ID string + Keys []Event + Label string + Notes []Note type Event + Note string + type Note struct + After int + Keys string + Note string type Story + Actions []Action + Notes []Note + Setup []Event + func (s *Story) EventCount() int v0.1.1 Oct 30, 2026 v0.1.0 Oct 30, 2026 Changes in this version + const HistorySize + func Check(ss *Session, e Expect) []string + func Golden(frame string) string + func Lookup(apps []App, s *Story) (*App, *Fixture, error) + func Slug(name string) string + func Sort(stories []*Story) + func Unbatch(t Tagged) (tea.Cmd, bool) + func Wrap(gen int, cmd tea.Cmd) tea.Cmd + func WriteStory(dir string, s *Story) (string, error) + type App struct + Expected func(op, err string) bool + Fields []string + Fixtures []Fixture + Name string + Summary string + type Built struct + Close func() + Emit func() bool + HasPane func() bool + Init bool + Model *ochazuke.Model + Program tea.Model + Snapshot func() (Snapshot, error) + Start func() error + Writes func() []string + type CheckSpec struct + Ask string + Dirty bool + Name string + Refuse string + Verb string + type Driver struct + Opt Options + Quit bool + S *Session + Trace []Step + Wait time.Duration + func NewDriver(ss *Session, opt Options) *Driver + func (d *Driver) Arrived() []Event + func (d *Driver) Close() + func (d *Driver) Play(events []Event, after func(n int) error) error + func (d *Driver) Step(e Event) error + type Edge struct + From string + To string + Via string + type Entry struct + N int + Name string + Path string + Rec *Recording + type Env struct + ConfigDir string + FilesDir string + Height int + Now func() time.Time + Options Options + Raw json.RawMessage + Reset func() + Seed json.RawMessage + StateDir string + Story *Story + Width int + func (e Env) Field(name string, v any) (bool, error) + func (e Env) NewRuntime() (*ochazuke.Runtime, *ochazuke.Model, error) + func (e Env) Sandbox(m *ochazuke.Model) error + type Event struct + Job string + Key string + Paste string + Restart bool + State string + T int64 + Tick string + Type string + func Classify(ss *Session, msg tea.Msg) *Event + func (e *Event) UnmarshalJSON(b []byte) error + func (e Event) MarshalJSON() ([]byte, error) + func (e Event) String() string + type Expect struct + After int + Attrs map[string]string + Badge string + Cell *string + Colored map[string]string + Contains []string + Dimmed *int + Focus string + Highlighted *int + HighlightedText string + Lacks []string + Modal *string + Mode string + NoColor []string + NoNotices bool + NoSegments bool + NoTicker bool + Notices []string + Order []string + Page string + Quit *bool + Register *string + Segments []string + Shift *int + Styled map[string]string + Ticker []string + Visible *bool + Writes *[]string + type Expects []Expect + func (x *Expects) UnmarshalJSON(b []byte) error + func (x Expects) MarshalJSON() ([]byte, error) + type Fixture struct + Build func(Env) (Built, error) + Name string + Summary string + type Library struct + Apps []App + Store Store + Stories []*Story + func (lib Library) Build(s *Story, opt Options) (*Session, error) + func (lib Library) Replay(rec *Recording, expect Expects) Result + func (lib Library) Resolve(s *Story) (*Story, []Event, error) + func (lib Library) Run(s *Story, opt RunOptions) (res Result) + func (lib Library) Subject(s *Story) explore.Subject + func (lib Library) Trim(base string, initial *Story, events []Event, t TrimSpec) (*Story, []string, error) + type Minimum struct + Edges []Edge + Verbs map[string]map[string][]string + func Derive(traces ...[]Step) Minimum + func (m Minimum) Markdown() string + func (m Minimum) Trapped() []string + type Options struct + Mono bool + type Ran struct + Mode string + OK bool + Verb string + type Recorder struct + Rec Recording + func NewRecorder(s *Story, now func() time.Time) *Recorder + func (r *Recorder) Add(e Event) + type Recording struct + Events []Event + Expect Expects + Initial *Story + Started time.Time + Story string + type Result struct + Err error + Failed []string + Skipped bool + Story *Story + Trace []Step + Updated bool + func (r Result) OK() bool + type RunOptions struct + Golden bool + Update bool + type Session struct + App *App + Fixture *Fixture + M *ochazuke.Model + Program tea.Model + R *ochazuke.Runtime + Reset bool + StateDir string + Story *Story + func (ss *Session) Close() + func (ss *Session) Cursor() *tea.Cursor + func (ss *Session) Emit() bool + func (ss *Session) Frame() string + func (ss *Session) HasPane() bool + func (ss *Session) Rebuild(restart bool) (*Session, error) + func (ss *Session) Snapshot() (Snapshot, error) + func (ss *Session) Start() tea.Cmd + func (ss *Session) Update(msg tea.Msg) tea.Cmd + func (ss *Session) View() tea.View + func (ss *Session) Writes() []string + type Snapshot struct + Fields map[string]json.RawMessage + Seed json.RawMessage + Warn []string + type Step struct + After string + Before string + Event Event + Ran []Ran + type Store struct + Dir string + func DefaultStore(getenv func(string) string, host string) Store + func (s Store) Delete(ref string) (string, error) + func (s Store) History() ([]Entry, error) + func (s Store) Keep(n int, name string) (string, error) + func (s Store) Load(ref string) (*Entry, error) + func (s Store) Move(path, name string) (string, error) + func (s Store) Push(rec *Recording) (string, error) + func (s Store) Save(rec *Recording, name string) (string, error) + func (s Store) Saved() ([]Entry, error) + type Story struct + Accent string + App string + Area string + Base string + Checks []CheckSpec + Chrome string + Config map[string]json.RawMessage + Expect Expects + Fields map[string]json.RawMessage + Files []string + Fixture string + Height int + Name string + Path string + Script []Event + Seed json.RawMessage + Session map[string]any + Settings []ochazuke.Setting + Skip string + Start int + State bool + Theme string + Themes json.RawMessage + Values map[string]any + Width int + func Find(stories []*Story, name string) *Story + func LoadDir(dir string) ([]*Story, error) + func LoadFS(fsys fs.FS, root string) ([]*Story, error) + func Parse(data []byte, where string) (*Story, error) + func (s *Story) Field(name string, v any) (bool, error) + func (s *Story) GoldenPath() string + func (s *Story) ReadGolden() ([]byte, error) + func (s *Story) Size() (int, int) + func (s *Story) UnmarshalJSON(b []byte) error + func (s *Story) WriteGolden(frame string) error + func (s Story) MarshalJSON() ([]byte, error) + type Tagged struct + Gen int + Msg tea.Msg + type TrimSpec struct + As string + At int + From int + Snapshot bool + To int + func (t TrimSpec) Window(n int) (int, int, error)