Per-provider naming constraints for ReqManagedAgents.Provisioner.Name.
max_length and charset differ sharply between providers: AgentCore's
harnessName is capped at 40 characters over [a-zA-Z][a-zA-Z0-9_], while the
Claude Managed Agents agent name allows 256 with no documented charset
restriction. Parameterising both keeps one fit-and-fallback implementation
without pushing AWS's charset onto names that never needed it — forcing
[a-zA-Z0-9_] onto CMA would rewrite every hyphenated agent name and rotate
resources for no benefit.
The two constructors below are the only supported policies. The struct itself
is public, though, so a hand-built policy whose max_length cannot hold a
digest plus the truncation hash is possible — ReqManagedAgents.Provisioner.Name.compose/3
rejects one with a message naming the minimum rather than failing obscurely
inside the fit.
Summary
Functions
The Bedrock AgentCore harnessName policy: [a-zA-Z][a-zA-Z0-9_]{0,39}.
The Claude Managed Agents agent name policy: 256 characters, unrestricted charset.
Types
@type charset() :: :alnum_underscore | :permissive
@type leading() :: :alpha | :any
@type t() :: %ReqManagedAgents.Provisioner.Name.Policy{ charset: charset(), leading: leading(), max_length: pos_integer() }