MCPcopy Create free account
hub / github.com/compozy/agh / validateAgentTaskLeaseSeconds

Function validateAgentTaskLeaseSeconds

internal/cli/task.go:2960–2969  ·  view source on GitHub ↗
(seconds int64)

Source from the content-addressed store, hash-verified

2958}
2959
2960func validateAgentTaskLeaseSeconds(seconds int64) error {
2961 if seconds < 0 {
2962 return fmt.Errorf("cli: --lease-seconds must be zero or positive: %d", seconds)
2963 }
2964 maxSeconds := int64(taskpkg.MaxRunLeaseDuration.Seconds())
2965 if seconds > maxSeconds {
2966 return fmt.Errorf("cli: --lease-seconds must be less than or equal to %d", maxSeconds)
2967 }
2968 return nil
2969}
2970
2971func trimAgentTaskCapabilities(values []string) []string {
2972 if len(values) == 0 {

Callers 2

newTaskNextCommandFunction · 0.85
newTaskHeartbeatCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected