agentenv

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package agentenv detects well-known environment variables set by AI coding agents (Claude Code, Antigravity, etc.) and resolves the driving agent's name so the CLI can advertise it in its User-Agent header, letting the Prolific API attribute requests to the agent that drove them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detected

func Detected() string

Detected returns the name of the AI agent driving the CLI, or "" if none is detected. Branded tools map to a fixed slug; generic vars forward their value verbatim, provided it contains no control characters or whitespace. Unset, empty, or malformed values yield "".

func ValidHeaderValue

func ValidHeaderValue(s string) bool

ValidHeaderValue reports whether s is safe to embed as a single space-separated User-Agent token: no ASCII control characters (0x00-0x1F), DEL (0x7F), or the ASCII space character. Other Unicode whitespace is not rejected but is not expected from the known env vars or --skill input.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL