//#region src/clientinfo/agent.d.ts /** * Detects the AI coding agent (e.g. Claude Code, Cursor, Gemini CLI) that * is running the current Node.js process. The detected product name is * appended to the user-agent header so that Databricks can understand * which agents are invoking the SDK. * * The agent list and precedence rules are kept in sync across the Go, * Java, Python, and TypeScript SDKs. * * @module */ /** * Checks environment variables for known AI agents and returns the * detected product name. * * Explicit product-specific env vars always take precedence over the * generic `AGENT` and `AI_AGENT` env vars, so that an explicit signal * (e.g. `CLAUDECODE=1`) always wins over a conflicting `AGENT=` * value. * * Returns: * * - The product name when exactly one known env var is set. * - `"multiple"` when multiple known env vars are set. Agent env vars * can be stacked when one agent invokes another as a subagent (e.g. * Claude Code spawning a Cursor CLI subprocess), so the child process * inherits env vars from multiple layers. * - A sanitized, length-capped value from `AGENT` or `AI_AGENT` when no * known env var is set (see {@link agentEnvFallback}). * - `""` when nothing is set. */ declare function lookupAgentProvider(): string; /** * Returns the detected AI agent name, cached for the process lifetime. * * Returns one of: * * - The known product name when exactly one agent is detected via * explicit env matchers. * - `"multiple"` when multiple explicit matchers fire for different * agents (typically nested agents, e.g. Cursor CLI running as a * Claude Code subagent). * - A sanitized, length-capped value from `AGENT` or `AI_AGENT` when no * explicit matcher fired (see {@link agentEnvFallback}). * - `""` when no agent is detected. */ declare function agentProvider(): string; /** * Clears the cached agent detection result so that the next call to * {@link agentProvider} re-evaluates the environment. Exported for * testing only. */ declare function clearAgentCache(): void; //#endregion export { agentProvider, clearAgentCache, lookupAgentProvider }; //# sourceMappingURL=agent.d.ts.map