agentloopguard

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultVerifierRole             = "loop_guard"
	DefaultVerifierTimeoutSeconds   = 4
	DefaultMaxSemanticContinuations = 3
	DefaultNoProgressLimit          = 2

	MaxVerifierRoleLength     = 128
	MaxVerifierTimeoutSeconds = 300
	MaxSemanticContinuations  = 64
	MaxNoProgressLimit        = 64
)
View Source
const ID = providerID

ID is the standard feature factory id and provider identity.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(config ...Config) terminaldecision.Provider

NewProvider constructs the conservative, stateless ALG provider with default provider settings. Feature composition validates the raw config before calling this constructor.

Types

type Config

type Config struct {
	Enabled                  bool                     `yaml:"enabled"`
	VerifierRole             string                   `yaml:"verifier_role"`
	VerifierTimeoutSeconds   int                      `yaml:"verifier_timeout_seconds"`
	VerifierTimeout          time.Duration            `yaml:"-"`
	MaxSemanticContinuations int                      `yaml:"max_semantic_continuations"`
	NoProgressLimit          int                      `yaml:"no_progress_limit"`
	ExplicitCompletionPolicy ExplicitCompletionPolicy `yaml:"explicit_completion_policy"`
}

Config is the generation-local ALG contribution. Verifier and progress bounds are retained in the immutable provider configuration and consumed by the stateless provider.

func DecodeConfig

func DecodeConfig(n yaml.Node) (Config, error)

DecodeConfig parses and validates the nested feature YAML block.

func (Config) Normalize

func (c Config) Normalize() (Config, error)

Normalize fills safe defaults and validates all provider configuration bounds.

func (Config) Validate

func (c Config) Validate() error

Validate checks an already materialized feature configuration.

type ExplicitCompletionPolicy

type ExplicitCompletionPolicy string

ExplicitCompletionPolicy controls the treatment of a trusted normalized explicit-completion fact before progress policy evaluation.

const (
	ExplicitCompletionPolicyTrust  ExplicitCompletionPolicy = "trust"
	ExplicitCompletionPolicyVerify ExplicitCompletionPolicy = "verify"
)

Directories

Path Synopsis
Package causepolicy contains the provider-independent ALG eligibility policy for canonical terminal causes and bounded evidence.
Package causepolicy contains the provider-independent ALG eligibility policy for canonical terminal causes and bounded evidence.
Package progress contains the pure ALG progress breaker and bounded recovery-intent policy.
Package progress contains the pure ALG progress breaker and bounded recovery-intent policy.

Jump to

Keyboard shortcuts

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