transcript

package
v0.34.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package transcript records and replays rig/1 sessions as JSONL: one {"dir":">","msg":{...}} per message, ">" from the host to the plugin and "<" back. A replay sends the host's messages and checks the plugin answers with the recorded ones. Record sessions that do not depend on time: a stream's batching follows the clock.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Replay

func Replay(ctx context.Context, cmd *exec.Cmd, lines []Line, wait time.Duration) error

Replay runs cmd and plays the transcript to it. Each run of plugin lines between two host lines is compared as a set, so concurrent answers may come in any order.

Types

type Line

type Line struct {
	Dir string          `json:"dir"`
	Msg json.RawMessage `json:"msg"`
}

func Parse

func Parse(r io.Reader) ([]Line, error)

type Recorder

type Recorder struct {
	// contains filtered or unexported fields
}

func NewRecorder

func NewRecorder(w io.Writer) *Recorder

func (*Recorder) Tap

func (r *Recorder) Tap(dir byte, line []byte)

Tap is rpc.Options.Tap.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL