lifecycle

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendTransitionRecord

func AppendTransitionRecord(chain *proof.Chain, transition Transition, eventType string) error

func ChainPath

func ChainPath(statePath string) string

func LoadChain

func LoadChain(path string) (*proof.Chain, error)

func ParseExpiry

func ParseExpiry(raw string, now time.Time) (time.Time, error)

func RecordsForAgent

func RecordsForAgent(chain *proof.Chain, agentID string) []proof.Record

func SaveChain

func SaveChain(path string, chain *proof.Chain) error

Types

type InventoryMutation added in v1.2.0

type InventoryMutation struct {
	Action        string
	AgentID       string
	Owner         string
	EvidenceURL   string
	ControlID     string
	Reason        string
	ReviewCadence string
	ExpiresAt     time.Time
	Now           time.Time
}

type ObservedTool

type ObservedTool struct {
	AgentID       string
	LegacyAgentID string
	ToolID        string
	ToolType      string
	Org           string
	Repo          string
	Location      string
	DataClass     string
	EndpointClass string
	AutonomyLevel string
	RiskScore     float64
}

type Transition

type Transition struct {
	AgentID       string         `json:"agent_id" yaml:"agent_id"`
	PreviousState string         `json:"previous_state" yaml:"previous_state"`
	NewState      string         `json:"new_state" yaml:"new_state"`
	Trigger       string         `json:"trigger" yaml:"trigger"`
	Diff          map[string]any `json:"diff,omitempty" yaml:"diff,omitempty"`
	Timestamp     string         `json:"timestamp" yaml:"timestamp"`
}

func ApplyInventoryMutation added in v1.2.0

func ApplyInventoryMutation(m manifest.Manifest, mutation InventoryMutation) (manifest.Manifest, Transition, error)

func ApplyManualState

func ApplyManualState(m manifest.Manifest, agentID, state, approver, scope, reason string, expiresAt time.Time, now time.Time) (manifest.Manifest, Transition, error)

func Reconcile

func Reconcile(previous manifest.Manifest, observed []ObservedTool, now time.Time) (manifest.Manifest, []Transition)

Jump to

Keyboard shortcuts

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