Documentation
¶
Overview ¶
Package degrade provides tool classification and timeout budget lookup for graceful degradation (Phase 13). Every registered MCP tool maps to a ToolClass, and each class has a configurable timeout budget.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BudgetFor ¶
func BudgetFor(toolName string, cfg config.DegradationConfig) time.Duration
BudgetFor returns the timeout budget for the given tool name using the supplied DegradationConfig. If the config has a positive override for the tool's class, that value is used; otherwise the hardcoded default applies.
T-13-01: negative/zero config values are clamped to defaults; this function never returns a zero or negative duration.
Types ¶
type ToolClass ¶
type ToolClass string
ToolClass categorizes tools by their expected latency profile.
func ToolClassFor ¶
ToolClassFor returns the ToolClass for the given tool name. Unknown tools default to ClassRead (tightest budget).