toolcallrepair

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package toolcallrepair holds YAML config decode and bundle construction for the standard-distribution tool-call-repair feature (ADR 0007 / issue #152).

The SDK Finalizer adapter and Engine live in internal/plugins/features/toolcallrepair/repair; FeatureBundle maps Config into that adapter and contributes PlaneToolCallFinalizers and PlaneToolCallFinalizationMaxArgsBytes. Enablement is config.PluginConfig.Enabled only (plain bool: omit means false / opt-out when a matching features row is present).

Index

Constants

View Source
const (
	ModeConservative          = "conservative"
	OnUnrepairablePassThrough = "pass_through"
	OnUnrepairableError       = "error"
	DefaultMaxArgsBytes       = 64 * 1024 // locked equal to core by TestDefaultMaxArgsBytesMatchCore
	DefaultFinalizerOrder     = 40
)
View Source
const (
	MaxSchemaBytesCap   = lipapi.MaxToolParametersBytes
	MaxNestingDepthCap  = 256
	MaxNodesCap         = 65_536
	MaxPropertiesCap    = 16_384
	MaxLocalRefDepthCap = 256
	MaxCacheEntriesCap  = 4_096
	MaxCacheBytesCap    = 64 * 1024 * 1024
)
View Source
const ID = "tool-call-repair"

Variables

This section is empty.

Functions

func FeatureBundle

func FeatureBundle(cfg Config) (lipfeature.FeatureBundle, error)

FeatureBundle constructs a schema-V1 feature bundle from validated configuration, contributing the tool-call repair finalizer and finalization max args byte limit.

Types

type Config

type Config struct {
	Mode           string       `yaml:"mode"`
	MaxArgsBytes   int          `yaml:"max_args_bytes"`
	OnUnrepairable string       `yaml:"on_unrepairable"`
	Order          *int         `yaml:"order"`
	Schema         SchemaConfig `yaml:"schema"`
}

func DecodeConfig

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

func (Config) FinalizerOrder

func (c Config) FinalizerOrder() int

type SchemaConfig

type SchemaConfig struct {
	MaxSchemaBytes   int `yaml:"max_schema_bytes"`
	MaxNestingDepth  int `yaml:"max_nesting_depth"`
	MaxNodes         int `yaml:"max_nodes"`
	MaxProperties    int `yaml:"max_properties"`
	MaxLocalRefDepth int `yaml:"max_local_ref_depth"`
	MaxCacheEntries  int `yaml:"max_cache_entries"`
	MaxCacheBytes    int `yaml:"max_cache_bytes"`
}

Directories

Path Synopsis
Package toolcallrepair holds the deterministic native tool-call repair engine contract (ADR 0007, issue #152).
Package toolcallrepair holds the deterministic native tool-call repair engine contract (ADR 0007, issue #152).
jsonshape
Package jsonshape provides protocol-neutral JSON size and shape preflight using encoding/json.Decoder.Token.
Package jsonshape provides protocol-neutral JSON size and shape preflight using encoding/json.Decoder.Token.

Jump to

Keyboard shortcuts

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