Documentation
¶
Overview ¶
Package report is Lagrange's convention for a run's situation report: what a run is doing and, at the end, what it built, in a form every Lagrange client can show (the Runs page, Telegram, a terminal) without knowing the agent.
An agent publishes the report as an artifact of the run's root task, named "report" (ID "report"), with one data part {Key: {...}} (see Report). Each new report replaces the last one. The relay records it in the activity log as data.report of the artifact entry, so a run's latest report is in its entries.
Notice is for the person who started the run: Lagrange forwards each report that carries one to their notification channels (Telegram), so set it on the report that announces something (a failure, the run landing) and leave it empty on the next ones.
Index ¶
Constants ¶
const ( // ArtifactName is the name of a report artifact, and its ID. ArtifactName = "report" // Key is the data part key of a report. Key = "https://threeagents.dev/ext/report" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Report ¶
type Report struct {
// Headline is what the run is about, in a line: its goal.
Headline string `json:"headline"`
// Status is where the run stands, in a word or two ("working", "landed", "failed").
Status string `json:"status,omitempty"`
// Progress counts the run's steps, when it has countable ones.
Progress *Progress `json:"progress,omitempty"`
// Built is what the run made, one item per piece.
Built []Item `json:"built,omitempty"`
// Stats are the numbers worth seeing, in order ("Wall time": "14m").
Stats []Stat `json:"stats,omitempty"`
// Outcome is how the run ended, in words.
Outcome string `json:"outcome,omitempty"`
// Notice, when set, is forwarded to whoever started the run.
Notice string `json:"notice,omitempty"`
At time.Time `json:"at"`
}
Report is a run's situation report.
func (Report) Event ¶
func (r Report) Event(info a2a.TaskInfoProvider) *a2a.TaskArtifactUpdateEvent
Event returns the artifact event that publishes r on the task info names (the run's root task), replacing any earlier report.