Expand description
Detects how the agent session behind a hook invocation is billed (gateway / API key / subscription), so the server can tell real spend from subscription usage priced at API list rates.
Detection is static: it reads the hook’s environment (hooks inherit the
agent’s environment) and the agent’s own auth/config files, never runs the
agent or touches the network, and answers Unknown rather than guess. All
inputs come through Probe so tests drive it with fixture files and a
fake environment instead of mutating the process environment.
Structs§
- Probe
- Everything detection may look at.
Functions§
- detect
- detect_
current - Billing mode of the current hook invocation, from the real environment.