MCPcopy Create free account
hub / github.com/github/gh-aw / validateMaxContinuationsSupport

Method validateMaxContinuationsSupport

pkg/workflow/agent_validation.go:142–152  ·  view source on GitHub ↗

validateMaxContinuationsSupport validates that max-continuations is only used with engines that support this feature

(frontmatter map[string]any, engine CodingAgentEngine)

Source from the content-addressed store, hash-verified

140
141// validateMaxContinuationsSupport validates that max-continuations is only used with engines that support this feature
142func (c *Compiler) validateMaxContinuationsSupport(frontmatter map[string]any, engine CodingAgentEngine) error {
143 // Check if max-continuations is specified in the engine config
144 _, engineConfig := c.ExtractEngineConfig(frontmatter)
145
146 hasMaxContinuations := engineConfig != nil && engineConfig.MaxContinuations != 0
147
148 if hasMaxContinuations {
149 agentValidationLog.Printf("Validating max-continuations support: engine=%s", engine.GetID())
150 }
151 return validateCapabilitySupport("max-continuations", hasMaxContinuations, engine.GetCapabilities().MaxContinuations, engine.GetID())
152}
153
154// validateMaxToolDenialsSupport validates that max-tool-denials is only used with
155// the Copilot engine in Copilot SDK mode.

Callers 1

Calls 5

ExtractEngineConfigMethod · 0.95
GetIDMethod · 0.65
GetCapabilitiesMethod · 0.65
PrintfMethod · 0.45

Tested by

no test coverage detected