🎩 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.1.0
to
1.1.1
+7
-2
./dist/index.js

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

const CODEX = "codex";
const ANTIGRAVITY = "antigravity";
const AUGMENT_CLI = "augment-cli";

@@ -46,2 +47,3 @@ const OPENCODE = "opencode";

CODEX,
ANTIGRAVITY,
AUGMENT_CLI,

@@ -69,5 +71,8 @@ OPENCODE

}
if (process.env.CODEX_SANDBOX) {
if (process.env.CODEX_SANDBOX || process.env.CODEX_CI || process.env.CODEX_THREAD_ID) {
return { isAgent: true, agent: { name: CODEX } };
}
if (process.env.ANTIGRAVITY_AGENT) {
return { isAgent: true, agent: { name: ANTIGRAVITY } };
}
if (process.env.AUGMENT_AGENT) {

@@ -88,3 +93,3 @@ return { isAgent: true, agent: { name: AUGMENT_CLI } };

return { isAgent: true, agent: { name: DEVIN } };
} catch (error) {
} catch (_error) {
}

@@ -91,0 +96,0 @@ return { isAgent: false, agent: void 0 };

# @vercel/detect-agent
## 1.1.1
### Patch Changes
- Add Antigravity agent detection via `ANTIGRAVITY_AGENT` environment variable ([#15413](https://github.com/vercel/vercel/pull/15413))
- Detect Codex when `CODEX_CI` or `CODEX_THREAD_ID` is present. ([#15412](https://github.com/vercel/vercel/pull/15412))
## 1.1.0

@@ -4,0 +12,0 @@

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

declare const CODEX: "codex";
declare const ANTIGRAVITY: "antigravity";
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 type KnownAgentNames = typeof CURSOR | typeof CURSOR_CLI | typeof CLAUDE | typeof DEVIN | typeof REPLIT | typeof GEMINI | typeof CODEX | typeof ANTIGRAVITY | typeof AUGMENT_CLI | typeof OPENCODE;
export interface KnownAgentDetails {

@@ -30,2 +31,3 @@ name: KnownAgentNames;

readonly CODEX: "codex";
readonly ANTIGRAVITY: "antigravity";
readonly AUGMENT_CLI: "augment-cli";

@@ -32,0 +34,0 @@ readonly OPENCODE: "opencode";

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

const CODEX = "codex";
const ANTIGRAVITY = "antigravity";
const AUGMENT_CLI = "augment-cli";

@@ -46,2 +47,3 @@ const OPENCODE = "opencode";

CODEX,
ANTIGRAVITY,
AUGMENT_CLI,

@@ -69,5 +71,8 @@ OPENCODE

}
if (process.env.CODEX_SANDBOX) {
if (process.env.CODEX_SANDBOX || process.env.CODEX_CI || process.env.CODEX_THREAD_ID) {
return { isAgent: true, agent: { name: CODEX } };
}
if (process.env.ANTIGRAVITY_AGENT) {
return { isAgent: true, agent: { name: ANTIGRAVITY } };
}
if (process.env.AUGMENT_AGENT) {

@@ -88,3 +93,3 @@ return { isAgent: true, agent: { name: AUGMENT_CLI } };

return { isAgent: true, agent: { name: DEVIN } };
} catch (error) {
} catch (_error) {
}

@@ -91,0 +96,0 @@ return { isAgent: false, agent: void 0 };

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

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

@@ -34,2 +34,3 @@ # @vercel/detect-agent

- **Codex** (OpenAI)
- **Antigravity** (Google DeepMind)
- **Replit** (online IDE)

@@ -36,0 +37,0 @@