Documentation
¶
Overview ¶
Package agentproduct defines the caller-provided Agent product identity carried on outbound DWS requests.
Index ¶
Constants ¶
const ( // EnvName is the runtime override for the Agent product identity. EnvName = "DWS_AGENT_PRODUCT" // HeaderName is the existing wire header used for the Agent product. HeaderName = "claw-type" // MaxValueBytes bounds the value because it is attached to every outbound // MCP request. Supported values are ASCII, so bytes and characters match. MaxValueBytes = 64 )
Variables ¶
var ErrInvalid = errors.New("invalid agent product")
ErrInvalid is returned when an Agent product value is unsafe or does not match the supported wire format. The error intentionally excludes the raw caller-controlled value.
Functions ¶
func Parse ¶
Parse normalizes and validates a caller-provided Agent product. Only surrounding ASCII spaces and tabs are trimmed; other control or Unicode whitespace remains visible to validation and is rejected. An unset or ASCII-whitespace-only value means "use the edition default".
func ResolveFromEnv ¶
ResolveFromEnv returns the validated DWS_AGENT_PRODUCT value, or fallback when the environment variable is unset or empty. Invalid caller input is returned as an error so command entrypoints can fail before network access.
Types ¶
This section is empty.