Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsTrimmedString ¶
AsTrimmedString returns the trimmed string form of v, or "" for non-strings.
func NormalizeNativeTerminalJSON ¶ added in v0.20.0
func NormalizeNativeTerminalJSON(raw []byte, protocol NativeTerminalProtocol) []byte
Keep protocol repair narrow: never invent a terminal event, repair truncated arguments, or change length/refusal/error outcomes. RawMessage preserves usage, large integer metadata, reasoning, signatures, and provider extensions.
func ParseJSONLike ¶
ParseJSONLike parses raw as JSON, returning an empty map for empty input and wrapping unparseable input as {"value": raw}.
Types ¶
type NativeTerminalProtocol ¶ added in v0.20.0
type NativeTerminalProtocol uint8
NativeTerminalProtocol identifies native wire formats with narrowly bounded terminal compatibility repairs.
const ( NativeChatCompletions NativeTerminalProtocol = iota + 1 NativeMessages NativeResponses )
type NativeTerminalStream ¶ added in v0.20.0
type NativeTerminalStream struct {
Protocol NativeTerminalProtocol
// contains filtered or unexported fields
}
NativeTerminalStream owns only bounded evidence for actual tool calls. It accepts complete SSE data payloads; framing, timeouts, and byte limits remain with the relay. Zero values are valid when Protocol is set before use.
func (*NativeTerminalStream) AddData ¶ added in v0.20.0
func (s *NativeTerminalStream) AddData(raw []byte) []byte