laneevents

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package laneevents stores timeline events for agent lanes and tasks.

Index

Constants

View Source
const (
	LaneStarted            = "lane.started"
	LaneReady              = "lane.ready"
	LanePromptMisdelivery  = "lane.prompt_misdelivery"
	LaneBlocked            = "lane.blocked"
	LaneRed                = "lane.red"
	LaneGreen              = "lane.green"
	LaneCommitCreated      = "lane.commit.created"
	LanePROpened           = "lane.pr.opened"
	LaneMergeReady         = "lane.merge.ready"
	ShipPrepared           = "ship.prepared"
	ShipCommitsSelected    = "ship.commits_selected"
	ShipMerged             = "ship.merged"
	ShipPushedMain         = "ship.pushed_main"
	ShipProvenance         = "ship.provenance"
	LaneFinished           = "lane.finished"
	LaneFailed             = "lane.failed"
	BranchStaleAgainstMain = "branch.stale_against_main"

	ProvenanceLiveLane    = "live_lane"
	ProvenanceTest        = "test"
	ProvenanceHealthcheck = "healthcheck"
	ProvenanceReplay      = "replay"
	ProvenanceTransport   = "transport"
)

Variables

This section is empty.

Functions

func CanonicalLaneEvent

func CanonicalLaneEvent(eventType string, status string, finishReason string) string

func EventFingerprint

func EventFingerprint(event Event) string

func IsTerminal

func IsTerminal(event Event) bool

func PayloadHash

func PayloadHash(event Event) string

func RequiredLaneEvents

func RequiredLaneEvents() []string

Types

type Binding

type Binding struct {
	Owner         string `json:"owner,omitempty"`
	Scope         string `json:"scope,omitempty"`
	WatcherAction string `json:"watcher_action,omitempty"`
}

type Event

type Event struct {
	Sequence          int64          `json:"sequence"`
	Type              string         `json:"type"`
	LaneEvent         string         `json:"lane_event"`
	LaneID            string         `json:"lane_id,omitempty"`
	SessionID         string         `json:"session_id,omitempty"`
	TaskID            string         `json:"task_id,omitempty"`
	Status            string         `json:"status,omitempty"`
	Message           string         `json:"message,omitempty"`
	Classification    string         `json:"classification,omitempty"`
	Evidence          map[string]any `json:"evidence,omitempty"`
	FinishReason      string         `json:"finish_reason,omitempty"`
	TokensOutput      int64          `json:"tokens_output,omitempty"`
	CreatedAt         time.Time      `json:"created_at"`
	Provenance        Provenance     `json:"provenance"`
	Binding           Binding        `json:"binding,omitempty"`
	Terminal          bool           `json:"terminal,omitempty"`
	Fingerprint       string         `json:"fingerprint,omitempty"`
	PayloadHash       string         `json:"payload_hash,omitempty"`
	DuplicateOf       string         `json:"duplicate_of,omitempty"`
	MateriallyDiffers bool           `json:"materially_differs,omitempty"`
}

func Normalize

func Normalize(event Event) Event

type Projection

type Projection struct {
	Events                       []Event `json:"events"`
	ActionableTerminal           *Event  `json:"actionable_terminal,omitempty"`
	DuplicateTerminals           []Event `json:"duplicate_terminals,omitempty"`
	MateriallyDifferentTerminals []Event `json:"materially_different_terminals,omitempty"`
}

func Reconcile

func Reconcile(events []Event) Projection

type Provenance

type Provenance struct {
	Source      string  `json:"source"`
	Environment string  `json:"environment"`
	Emitter     string  `json:"emitter"`
	Confidence  float64 `json:"confidence"`
}

func NormalizeProvenance

func NormalizeProvenance(provenance Provenance) Provenance

Jump to

Keyboard shortcuts

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