ReqManagedAgents.Provisioner.Name.Policy (ReqManagedAgents v0.12.0)

Copy Markdown View Source

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

charset()

@type charset() :: :alnum_underscore | :permissive

leading()

@type leading() :: :alpha | :any

t()

@type t() :: %ReqManagedAgents.Provisioner.Name.Policy{
  charset: charset(),
  leading: leading(),
  max_length: pos_integer()
}

Functions

agent_core()

@spec agent_core() :: t()

The Bedrock AgentCore harnessName policy: [a-zA-Z][a-zA-Z0-9_]{0,39}.

claude_managed_agents()

@spec claude_managed_agents() :: t()

The Claude Managed Agents agent name policy: 256 characters, unrestricted charset.