Documentation
¶
Index ¶
- func DelegationApprovalValueFromEvent(ev agent.AgentEvent) (agent.AgentCustomEventDelegationValue, bool)
- func LLMUsageFooter(llmUsage *agent.LLMUsage) string
- func MarksStreamDelta(ev agent.AgentEvent) bool
- func PrintRunFooters(result *agent.AgentRunResult)
- func RunIDLine(runID string) string
- func RunResultFromFinishedEvent(ev agent.AgentEvent) *agent.AgentRunResult
- func ShowLLMUsage() bool
- func ShowTelemetry() bool
- func TelemetryFooter(telemetry *agent.AgentTelemetry) string
- func ToolApprovalValueFromEvent(ev agent.AgentEvent) (agent.AgentCustomEventApprovalValue, bool)
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
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
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.