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

toolcall

package
v0.1.58 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MaxErrorMessageBytes = 60000

Variables

View Source
var ToolCallByOpPathURI = "/v1/api/agently/toolcall/byOp/by-op/{opId}"
View Source
var ToolCallByTurnPathURI = "/v1/api/agently/toolcall/byTurn/by-turn"

Functions

func SanitizeErrorMessage

func SanitizeErrorMessage(value string) string

SanitizeErrorMessage returns a DB-safe, UTF-8-valid tool error summary.

Types

type MutableToolCallView

type MutableToolCallView = ToolCall

func NewMutableToolCallView

func NewMutableToolCallView(opts ...MutableToolCallViewOption) *MutableToolCallView

type MutableToolCallViewOption

type MutableToolCallViewOption func(*MutableToolCallView)

func WithToolCallErrorMessage

func WithToolCallErrorMessage(v string) MutableToolCallViewOption

func WithToolCallIteration

func WithToolCallIteration(v int) MutableToolCallViewOption

func WithToolCallMessageID

func WithToolCallMessageID(v string) MutableToolCallViewOption

func WithToolCallOpID

func WithToolCallOpID(v string) MutableToolCallViewOption

func WithToolCallRunID

func WithToolCallRunID(v string) MutableToolCallViewOption

func WithToolCallStatus

func WithToolCallStatus(v string) MutableToolCallViewOption

func WithToolCallToolKind

func WithToolCallToolKind(v string) MutableToolCallViewOption

func WithToolCallToolName

func WithToolCallToolName(v string) MutableToolCallViewOption

func WithToolCallTurnID

func WithToolCallTurnID(v string) MutableToolCallViewOption

type MutableToolCallViews

type MutableToolCallViews struct {
	ToolCalls []*MutableToolCallView
}

func NewMutableToolCallViews

func NewMutableToolCallViews(rows ...*MutableToolCallView) *MutableToolCallViews

type ToolCall

type ToolCall struct {
	MessageID string  `sqlx:"message_id,primaryKey" validate:"required"`
	TurnID    *string `sqlx:"turn_id" json:",omitempty"`
	OpID      string  `sqlx:"op_id" validate:"required"`
	Attempt   int     `sqlx:"attempt"`
	ToolName  string  `sqlx:"tool_name" validate:"required"`
	ToolKind  string  `sqlx:"tool_kind" validate:"required"`
	// capability_tags and resource_uris removed
	Status string `sqlx:"status" validate:"required"`
	// request_snapshot removed
	RequestHash *string `sqlx:"request_hash" json:",omitempty"`
	// response_snapshot removed
	ErrorCode         *string    `sqlx:"error_code" json:",omitempty"`
	ErrorMessage      *string    `sqlx:"error_message" json:",omitempty"`
	Retriable         *int       `sqlx:"retriable" json:",omitempty"`
	StartedAt         *time.Time `sqlx:"started_at" json:",omitempty"`
	CompletedAt       *time.Time `sqlx:"completed_at" json:",omitempty"`
	LatencyMS         *int       `sqlx:"latency_ms" json:",omitempty"`
	Cost              *float64   `sqlx:"cost" json:",omitempty"`
	TraceID           *string    `sqlx:"trace_id" json:",omitempty"`
	SpanID            *string    `sqlx:"span_id" json:",omitempty"`
	RequestPayloadID  *string    `sqlx:"request_payload_id"`
	ResponsePayloadID *string    `sqlx:"response_payload_id"`
	RunID             *string    `sqlx:"run_id" json:",omitempty"`
	Iteration         *int       `sqlx:"iteration" json:",omitempty"`
	// ResponseOverflow flags that response content exceeded preview limit.
	ResponseOverflow bool `sqlx:"-" json:",omitempty"`

	Has *ToolCallHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-"`
}

func (*ToolCall) SetAttempt

func (t *ToolCall) SetAttempt(v int)

func (*ToolCall) SetCompletedAt

func (t *ToolCall) SetCompletedAt(v time.Time)

func (*ToolCall) SetErrorMessage

func (t *ToolCall) SetErrorMessage(v string)

func (*ToolCall) SetIteration

func (t *ToolCall) SetIteration(v int)

func (*ToolCall) SetMessageID

func (t *ToolCall) SetMessageID(v string)

func (*ToolCall) SetOpID

func (t *ToolCall) SetOpID(v string)

func (*ToolCall) SetResponseOverflow

func (t *ToolCall) SetResponseOverflow(v bool)

func (*ToolCall) SetRunID

func (t *ToolCall) SetRunID(v string)

func (*ToolCall) SetStatus

func (t *ToolCall) SetStatus(v string)

func (*ToolCall) SetToolKind

func (t *ToolCall) SetToolKind(v string)

func (*ToolCall) SetToolName

func (t *ToolCall) SetToolName(v string)

func (*ToolCall) SetTurnID

func (t *ToolCall) SetTurnID(v string)

type ToolCallByOpInput

type ToolCallByOpInput struct {
	ConversationId string
	OpId           string
	Has            *ToolCallByOpInputHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-"`
}

type ToolCallByOpInputHas

type ToolCallByOpInputHas struct {
	ConversationId bool
	OpId           bool
}

type ToolCallByOpOutput

type ToolCallByOpOutput struct {
	response.Status `json:",omitempty"`
	Data            []*ToolCallByOpView
	Metrics         response.Metrics
}

type ToolCallByOpView

type ToolCallByOpView struct {
	MessageId         string  `sqlx:"message_id"`
	TurnId            *string `sqlx:"turn_id"`
	OpId              string  `sqlx:"op_id"`
	TraceId           *string `sqlx:"trace_id"`
	ResponsePayloadId *string `sqlx:"response_payload_id"`
}

type ToolCallByTurnInput

type ToolCallByTurnInput struct {
	ConversationId string
	TurnId         string
	Has            *ToolCallByTurnInputHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-"`
}

type ToolCallByTurnInputHas

type ToolCallByTurnInputHas struct {
	ConversationId bool
	TurnId         bool
}

type ToolCallByTurnOutput

type ToolCallByTurnOutput struct {
	response.Status `json:",omitempty"`
	Data            []*ToolCallByTurnView
	Metrics         response.Metrics
}

type ToolCallByTurnView

type ToolCallByTurnView struct {
	MessageId string  `sqlx:"message_id"`
	TurnId    *string `sqlx:"turn_id"`
	OpId      string  `sqlx:"op_id"`
	Attempt   int     `sqlx:"attempt"`
}

type ToolCallHas

type ToolCallHas struct {
	MessageID bool
	TurnID    bool
	OpID      bool
	Attempt   bool
	ToolName  bool
	ToolKind  bool
	// CapabilityTags removed
	// ResourceURIs removed
	Status bool
	// RequestSnapshot removed
	RequestHash bool
	// ResponseSnapshot removed
	ErrorCode         bool
	ErrorMessage      bool
	Retriable         bool
	StartedAt         bool
	CompletedAt       bool
	LatencyMS         bool
	Cost              bool
	TraceID           bool
	SpanID            bool
	RequestPayloadID  bool
	ResponsePayloadID bool
	RunID             bool
	Iteration         bool
	ResponseOverflow  bool
}

Jump to

Keyboard shortcuts

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