Vibe.TUI.Cast.Writer (vibe v0.2.0)

Copy Markdown View Source

Writer process for native Vibe TUI cast recordings.

The writer stores exact terminal output bytes in independently compressed ETF blocks and writes a sidecar index on close. Calls are synchronous so bytes are persisted before the runtime writes the same data to the terminal.

Summary

Types

t()

@type t() :: %Vibe.TUI.Cast.Writer{
  block_bytes: term(),
  block_events: term(),
  block_seq: term(),
  blocks: term(),
  compression: term(),
  file: term(),
  header: term(),
  path: term(),
  started_at: term()
}

Functions

app_event(pid, event)

@spec app_event(pid() | nil, term()) :: :ok

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

close(pid)

@spec close(pid() | nil) :: :ok

input(pid, iodata)

@spec input(pid() | nil, IO.chardata()) :: :ok

input_redacted(pid, byte_count)

@spec input_redacted(pid() | nil, non_neg_integer()) :: :ok

key(pid, event)

@spec key(pid() | nil, term()) :: :ok

output(pid, iodata)

@spec output(pid() | nil, IO.chardata()) :: :ok

resize(pid, columns, rows)

@spec resize(pid() | nil, pos_integer(), pos_integer()) :: :ok

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()

trace_frame(pid, payload)

@spec trace_frame(pid() | nil, term()) :: :ok

trace_snapshot(pid, payload)

@spec trace_snapshot(pid() | nil, term()) :: :ok

write_index(path, header, blocks)

@spec write_index(Path.t(), map(), [map()]) :: :ok | {:error, term()}