Help us shape the future of Go! Take the 2026 Go Developer Survey

streamevent

package
v0.233.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitDebugEvent

func EmitDebugEvent(eventType string, fields map[string]any)

EmitDebugEvent writes a JSON-line describing an operational lifecycle event keyed by `type`. Used for things that are NOT conversation messages (e.g. compaction triggers, token-threshold crossings).

No-op unless debug is enabled (see package docs).

func EmitDebugMessage

func EmitDebugMessage(role, content, kind string, extra map[string]any)

EmitDebugMessage writes a JSON-line that mirrors the shape of a normal conversation message but flagged `hidden: true` and tagged with a `kind` discriminator so observers can distinguish it from real conversation turns. Used to surface internally-injected messages (e.g. the hidden user-role system-reminder appended every N turns) that the user would not otherwise see.

No-op unless debug is enabled (see package docs).

func SetDebugEnabledForTest

func SetDebugEnabledForTest(enabled bool) func()

SetDebugEnabledForTest forces the debug gate to a specific value, bypassing the global-logger probe. Returns a restore function. Test-only.

func SetWriter

func SetWriter(w io.Writer) func()

SetWriter overrides the destination io.Writer for emitted events and returns a restore function. Used by tests; production callers should not touch it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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