🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@vercel/detect-agent

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/detect-agent - npm Package Compare versions

Comparing version
1.0.0
to
1.1.0
+11
-1
./dist/index.js

@@ -35,2 +35,4 @@ "use strict";

const CODEX = "codex";
const AUGMENT_CLI = "augment-cli";
const OPENCODE = "opencode";
const KNOWN_AGENTS = {

@@ -43,3 +45,5 @@ CURSOR,

GEMINI,
CODEX
CODEX,
AUGMENT_CLI,
OPENCODE
};

@@ -68,2 +72,8 @@ async function determineAgent() {

}
if (process.env.AUGMENT_AGENT) {
return { isAgent: true, agent: { name: AUGMENT_CLI } };
}
if (process.env.OPENCODE_CLIENT) {
return { isAgent: true, agent: { name: OPENCODE } };
}
if (process.env.CLAUDECODE || process.env.CLAUDE_CODE) {

@@ -70,0 +80,0 @@ return { isAgent: true, agent: { name: CLAUDE } };

# @vercel/detect-agent
## 1.1.0
### Minor Changes
- Detect Augment and OpenCode agents ([#14635](https://github.com/vercel/vercel/pull/14635))
## 1.0.0

@@ -4,0 +10,0 @@

@@ -8,3 +8,5 @@ declare const CURSOR: "cursor";

declare const CODEX: "codex";
export type KnownAgentNames = typeof CURSOR | typeof CURSOR_CLI | typeof CLAUDE | typeof DEVIN | typeof REPLIT | typeof GEMINI | typeof CODEX;
declare const AUGMENT_CLI: "augment-cli";
declare const OPENCODE: "opencode";
export type KnownAgentNames = typeof CURSOR | typeof CURSOR_CLI | typeof CLAUDE | typeof DEVIN | typeof REPLIT | typeof GEMINI | typeof CODEX | typeof AUGMENT_CLI | typeof OPENCODE;
export interface KnownAgentDetails {

@@ -28,4 +30,6 @@ name: KnownAgentNames;

readonly CODEX: "codex";
readonly AUGMENT_CLI: "augment-cli";
readonly OPENCODE: "opencode";
};
export declare function determineAgent(): Promise<AgentResult>;
export {};

@@ -35,2 +35,4 @@ "use strict";

const CODEX = "codex";
const AUGMENT_CLI = "augment-cli";
const OPENCODE = "opencode";
const KNOWN_AGENTS = {

@@ -43,3 +45,5 @@ CURSOR,

GEMINI,
CODEX
CODEX,
AUGMENT_CLI,
OPENCODE
};

@@ -68,2 +72,8 @@ async function determineAgent() {

}
if (process.env.AUGMENT_AGENT) {
return { isAgent: true, agent: { name: AUGMENT_CLI } };
}
if (process.env.OPENCODE_CLIENT) {
return { isAgent: true, agent: { name: OPENCODE } };
}
if (process.env.CLAUDECODE || process.env.CLAUDE_CODE) {

@@ -70,0 +80,0 @@ return { isAgent: true, agent: { name: CLAUDE } };

+1
-1
{
"name": "@vercel/detect-agent",
"version": "1.0.0",
"version": "1.1.0",
"description": "Detect if code is running in an AI agent or automated development environment",

@@ -5,0 +5,0 @@ "keywords": [