output

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONEmitter

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

JSONEmitter writes NDJSON events for CI consumption.

func NewJSONEmitter

func NewJSONEmitter(w io.Writer) *JSONEmitter

func (*JSONEmitter) Emit

func (e *JSONEmitter) Emit(v map[string]any)

func (*JSONEmitter) LLMResponse

func (e *JSONEmitter) LLMResponse(input, output int, cost float64)

func (*JSONEmitter) SessionEnd

func (e *JSONEmitter) SessionEnd(sessionID, outcome string, turns int, totalCost float64)

func (*JSONEmitter) SessionStart

func (e *JSONEmitter) SessionStart(sessionID, agent string)

func (*JSONEmitter) ToolCall

func (e *JSONEmitter) ToolCall(tool, args string)

func (*JSONEmitter) ToolResult

func (e *JSONEmitter) ToolResult(raw string, isError bool)

type Sink

type Sink struct {
	Out    io.Writer
	Status io.Writer
}

Sink wires writers for text or JSON modes.

type StatusEventWriter

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

StatusEventWriter parses engine status lines into tool events.

func NewStatusEventWriter

func NewStatusEventWriter(emitter *JSONEmitter) *StatusEventWriter

func (*StatusEventWriter) Write

func (w *StatusEventWriter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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