@vercel/detect-agent
Advanced tools
+9
-1
@@ -41,2 +41,3 @@ "use strict"; | ||
| const GITHUB_COPILOT_CLI = "github-copilot-cli"; | ||
| const V0 = "v0"; | ||
| const KNOWN_AGENTS = { | ||
@@ -54,3 +55,4 @@ CURSOR, | ||
| OPENCODE, | ||
| GITHUB_COPILOT | ||
| GITHUB_COPILOT, | ||
| V0 | ||
| }; | ||
@@ -67,2 +69,8 @@ async function determineAgent() { | ||
| } | ||
| if (name === V0) { | ||
| return { | ||
| isAgent: true, | ||
| agent: { name: V0 } | ||
| }; | ||
| } | ||
| return { | ||
@@ -69,0 +77,0 @@ isAgent: true, |
+6
-0
| # @vercel/detect-agent | ||
| ## 1.2.3 | ||
| ### Patch Changes | ||
| - Add v0 to detect-agent supported agents ([#16016](https://github.com/vercel/vercel/pull/16016)) | ||
| ## 1.2.2 | ||
@@ -4,0 +10,0 @@ |
+3
-1
@@ -13,3 +13,4 @@ declare const CURSOR: "cursor"; | ||
| declare const GITHUB_COPILOT: "github-copilot"; | ||
| export type KnownAgentNames = typeof CURSOR | typeof CURSOR_CLI | typeof CLAUDE | typeof COWORK | typeof DEVIN | typeof REPLIT | typeof GEMINI | typeof CODEX | typeof ANTIGRAVITY | typeof AUGMENT_CLI | typeof OPENCODE | typeof GITHUB_COPILOT; | ||
| declare const V0: "v0"; | ||
| export type KnownAgentNames = typeof CURSOR | typeof CURSOR_CLI | typeof CLAUDE | typeof COWORK | typeof DEVIN | typeof REPLIT | typeof GEMINI | typeof CODEX | typeof ANTIGRAVITY | typeof AUGMENT_CLI | typeof OPENCODE | typeof GITHUB_COPILOT | typeof V0; | ||
| export interface KnownAgentDetails { | ||
@@ -38,4 +39,5 @@ name: KnownAgentNames; | ||
| readonly GITHUB_COPILOT: "github-copilot"; | ||
| readonly V0: "v0"; | ||
| }; | ||
| export declare function determineAgent(): Promise<AgentResult>; | ||
| export {}; |
+9
-1
@@ -41,2 +41,3 @@ "use strict"; | ||
| const GITHUB_COPILOT_CLI = "github-copilot-cli"; | ||
| const V0 = "v0"; | ||
| const KNOWN_AGENTS = { | ||
@@ -54,3 +55,4 @@ CURSOR, | ||
| OPENCODE, | ||
| GITHUB_COPILOT | ||
| GITHUB_COPILOT, | ||
| V0 | ||
| }; | ||
@@ -67,2 +69,8 @@ async function determineAgent() { | ||
| } | ||
| if (name === V0) { | ||
| return { | ||
| isAgent: true, | ||
| agent: { name: V0 } | ||
| }; | ||
| } | ||
| return { | ||
@@ -69,0 +77,0 @@ isAgent: true, |
+1
-1
| { | ||
| "name": "@vercel/detect-agent", | ||
| "version": "1.2.2", | ||
| "version": "1.2.3", | ||
| "description": "Detect if code is running in an AI agent or automated development environment", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+1
-0
@@ -37,2 +37,3 @@ # @vercel/detect-agent | ||
| - **Replit** (online IDE) | ||
| - **v0** (Vercel's AI assistant, via `AI_AGENT=v0`) | ||
@@ -39,0 +40,0 @@ ## The AI_AGENT Standard |
26691
1.98%287
6.69%127
0.79%