Documentation
¶
Overview ¶
Package agentproduct defines the caller-provided Agent product identity used for outbound observability and IM message display.
Index ¶
Constants ¶
const ( // EnvName is the runtime override for the Agent product identity. EnvName = "DWS_AGENT_PRODUCT" // HeaderName is the observability header used for the Agent product. // It is intentionally separate from the routing/PAT claw-type header. HeaderName = "x-dws-agent-product" // 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.