agentresult

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agentresult converts agent envelope payloads into the CRD status shapes — the one place the float-bearing wire format meets the no-float structural schemas. Both job controllers (investigation, remediation) use it so cost/confidence formatting and size caps never drift apart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analysis

Analysis maps one envelope analysis dimension; nil when unassessed.

func FailedStage added in v0.8.0

func FailedStage(reported *envelope.Stage, outcome, detail string) envelope.Stage

FailedStage builds the stage to record for a run the controller is failing.

When the agent reported a stage, that stage is kept and only the verdict is overwritten: a run that failed still burned turns, tokens and money, and throwing its accounting away is what blanks a child's usage and leaves the harness/model rollup scopes with nothing to key on. reported is nil only when no event arrived at all (a vanished or unparseable Job), and then there is genuinely nothing but the verdict to record.

func FormatConfidence

func FormatConfidence(f float64) string

FormatConfidence renders confidence as the CRD's decimal string; empty when out of range.

func FormatCost

func FormatCost(f float64) string

FormatCost renders a float cost as the CRD's decimal string (6 fractional digits — micro-USD precision); empty when unreported.

func FromStage

func FromStage(st *envelope.Stage) *v1alpha1.StageResult

FromStage maps an envelope stage onto the CRD stage result.

func TruncateDetail

func TruncateDetail(s string) string

TruncateDetail caps a short detail/summary for a CRD field.

func TruncateReport

func TruncateReport(s string) string

TruncateReport caps a report markdown for a CRD field.

Types

This section is empty.

Jump to

Keyboard shortcuts

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