monitor

package
v3.1.0-dev.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package monitor parses the structured transition records returned by a monitor.collect tool and defines the argument contract for monitor.ack.

Index

Constants

View Source
const (
	// AckSubjectArg is the argument key carrying the Transition.SubjectKey
	// being acknowledged.
	AckSubjectArg = "subject_key"

	// AckByArg is the argument key carrying the operator identity that
	// recorded the acknowledgement.
	AckByArg = "ack_by"
)

Canonical argument names passed to the MCP tool configured under monitor.ack.tool when forwarding an operator acknowledgement.

Kept in internal/monitor alongside Transition.SubjectKey so the producer (POST /monitor-ack forwarding in pkg/compose) and any consumer assertions stay locked to a single definition.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set struct {
	Transitions []Transition `json:"transitions"`
	Degraded    bool         `json:"degraded"`
}

Set is the parsed transition envelope extracted from a collect tool's output at monitor.transitions_from.

func Parse

func Parse(raw string) (Set, error)

Parse decodes the JSON text returned by a collect tool into a Set.

func ParseResult

func ParseResult(result map[string]any) (Set, error)

ParseResult extracts a transition Set from an ADK tool result map (looking up the "output" text key when present, or marshaling the map).

type Transition

type Transition struct {
	Kind       string            `json:"kind"`
	Edge       string            `json:"edge"`
	SubjectKey string            `json:"subject_key"`
	Summary    string            `json:"summary"`
	ChangedAt  string            `json:"changed_at,omitempty"`
	Attrs      map[string]string `json:"attrs"`
}

Transition is one edge reported by the collect tool's transitions array.

Jump to

Keyboard shortcuts

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