Read the script
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function(x) {
if (typeof require !== "undefined") return require.apply(this, arguments);
throw Error('Dynamic require of "' + x + '" is not supported');
});
var __commonJS = (cb, mod) => function __require2() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// node_modules/detect-agent/dist/index.js
var require_dist = __commonJS({
"node_modules/detect-agent/dist/index.js"(exports, module) {
"use strict";
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp2(target, name, { get: all[name], enumerable: true });
};
var __copyProps2 = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames2(from))
if (!__hasOwnProp2.call(to, key) && key !== except)
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
var index_exports = {};
__export(index_exports, {
KNOWN_AGENTS: () => KNOWN_AGENTS,
determineAgent: () => determineAgent
});
module.exports = __toCommonJS(index_exports);
var agents_default = {
$schema: "./agents.schema.json",
version: 1,
description: "Language-agnostic specification for detecting AI agents and automated development environments. Agents are evaluated in array order; the first agent whose `match` condition is satisfied wins. Every agent's `match` is a combinator (`anyOf`/`allOf`) whose `conditions` are evaluated as a tree: combinators nest, and `env_set`/`env_value`/`file_exists` are leaf checks. See agents.schema.json for the full structure.",
aiAgentVar: "AI_AGENT",
agents: [
{
key: "CURSOR",
name: "cursor",
match: {
type: "anyOf",
conditions: [{ type: "env_set", name: "CURSOR_TRACE_ID" }]
}
},
{
key: "CURSOR_CLI",
name: "cursor-cli",
match: {
type: "anyOf",
conditions: [
{ type: "env_set", name: "CURSOR_AGENT" },
{
type: "env_value",
name: "CURSOR_EXTENSION_HOST_ROLE",
value: "agent-exec"
}
]
}
},
{
key: "KIMI",
name: "kimi",
description: "Kimi Code plugin hooks. KIMI_CODE_HOME may be configured outside an active Kimi session, so detection uses the plugin-scoped KIMI_PLUGIN_ROOT marker.",
match: {
type: "anyOf",
conditions: [{ type: "env_set", name: "KIMI_PLUGIN_ROOT" }]
}
},
{
key: "GROK",
name: "grok",
description: "Grok Build plugin hooks. Evaluated before Claude Code because Grok supports Claude Code plugins and may expose compatibility markers.",
match: {
type: "anyOf",
conditions: [
{ type: "env_set", name: "GROK_PLUGIN_ROOT" },
{ type: "env_set", name: "GROK_PLUGIN_DATA" }
]
}
},
{
key: "GEMINI",
name: "gemini_cli",
match: {
type: "anyOf",
conditions: [{ type: "env_set", name: "GEMINI_CLI" }]
}
},
{
key: "CLINE",
name: "cline",
match: {
type: "anyOf",
conditions: [{ type: "env_set", name: "CLINE_ACTIVE" }]
}
},
{
key: "CODEX",
name: "codex_cli",
match: {
type: "anyOf",
conditions: [
{ type: "env_set", name: "CODEX_SANDBOX" },
{ type: "env_set", name: "CODEX_CI" },
{ type: "env_set", name: "CODEX_THREAD_ID" },
{ type: "env_set", name: "CODEX_SANDBOX_NETWORK_DISABLED" }
]
}
},
{
key: "ANTIGRAVITY",
name: "antigravity",
match: {
type: "anyOf",
conditions: [
{ type: "env_set", name: "ANTIGRAVITY_AGENT" },
{ type: "env_set", name: "ANTIGRAVITY_CLI_ALIAS" }
]
}