shared

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelegationApprovalValueFromEvent

func DelegationApprovalValueFromEvent(ev agent.AgentEvent) (agent.AgentCustomEventDelegationValue, bool)

DelegationApprovalValueFromEvent returns the CUSTOM sub-agent delegation payload when ev is that stream event.

func LLMUsageFooter added in v0.2.2

func LLMUsageFooter(llmUsage *agent.LLMUsage) string

LLMUsageFooter returns a multi-line block describing token usage, or "".

func MarksStreamDelta

func MarksStreamDelta(ev agent.AgentEvent) bool

MarksStreamDelta returns true when the event carries assistant or reasoning text deltas.

func PrintRunFooters added in v0.2.2

func PrintRunFooters(result *agent.AgentRunResult)

PrintRunFooters prints usage and telemetry when SHOW_LLM_USAGE / SHOW_TELEMETRY are enabled.

func RunIDLine added in v0.3.0

func RunIDLine(runID string) string

RunIDLine returns a formatted line for printing the run ID at stream or async-run start. Callers should print this immediately after receiving the runID from Stream or Run — before consuming the channel — to illustrate that the ID is available synchronously.

func RunResultFromFinishedEvent

func RunResultFromFinishedEvent(ev agent.AgentEvent) *agent.AgentRunResult

RunResultFromFinishedEvent returns the typed result from a RUN_FINISHED event, or nil.

func ShowLLMUsage added in v0.2.2

func ShowLLMUsage() bool

ShowLLMUsage reports whether examples should print token usage (SHOW_LLM_USAGE; default false).

func ShowTelemetry added in v0.2.2

func ShowTelemetry() bool

ShowTelemetry reports whether examples should print run telemetry (SHOW_TELEMETRY; default false).

func TelemetryFooter added in v0.2.2

func TelemetryFooter(telemetry *agent.AgentTelemetry) string

TelemetryFooter returns a multi-line block describing run telemetry, or "".

func ToolApprovalValueFromEvent

func ToolApprovalValueFromEvent(ev agent.AgentEvent) (agent.AgentCustomEventApprovalValue, bool)

ToolApprovalValueFromEvent returns the CUSTOM tool-approval payload when ev is that stream event.

Types

This section is empty.

Jump to

Keyboard shortcuts

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