agentutil

package
v0.82.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationValue

func DurationValue(value interface{}) time.Duration

DurationValue interprets generic input values as a duration.

Semantics: - time.Duration and int64 are treated as already-normalized durations. - int/int32/float/json.Number/string numeric values are treated as seconds. - duration strings like "30s" use time.ParseDuration.

func IntValue

func IntValue(value interface{}) int

IntValue extracts an integer from loosely typed map inputs.

func StringValue

func StringValue(value interface{}) string

StringValue extracts a string from loosely typed map inputs.

func StringifyToolResult

func StringifyToolResult(result core.ToolResult) string

StringifyToolResult formats tool output for trace/transcript usage.

func TruncateString

func TruncateString(value string, limit int) string

TruncateString shortens text while preserving a visible ellipsis.

Types

This section is empty.

Jump to

Keyboard shortcuts

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