ai-agent-detect 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/index.js +6 -0
- package/package.json +22 -0
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ai-agent-detect
|
|
2
|
+
|
|
3
|
+
Detect which AI agent is running your code — structured identity and capabilities.
|
|
4
|
+
|
|
5
|
+
**Status: name claimed, v0 in development.** This package does not do anything useful yet.
|
|
6
|
+
|
|
7
|
+
## What it will be
|
|
8
|
+
|
|
9
|
+
Runtime identification for the agentic era — `isatty()` had fifty years; agents are the third consumer class:
|
|
10
|
+
|
|
11
|
+
- **Structured identity**: `{ name, version, mode, source, confidence }` — parsed, not a raw string. Reads the `AI_AGENT` environment variable standard, the `AGENT` convention (Goose, Amp), and vendor tells (`CLAUDECODE=1`, …).
|
|
12
|
+
- **Signals beyond env vars**: parent-process-tree walking (detect the agent ancestor even with a stripped environment), TTY state (interactive vs headless).
|
|
13
|
+
- **Capability detection**: not just *which* agent, but what it honors — which context files it reads, which skill directories it discovers.
|
|
14
|
+
- **Adaptive-output helpers**: `isAgent()` as the new `isatty()` — emit agent-optimized output when your consumer is an agent.
|
|
15
|
+
|
|
16
|
+
## Relationship to `detect-agent`
|
|
17
|
+
|
|
18
|
+
[`detect-agent`](https://www.npmjs.com/package/detect-agent) (Vercel) answers the boolean question — *is* this an agent environment, and its name — via declarative rules. This package aims one level up: structured identity, richer signals than env/file existence checks can express, and capabilities. It will consume the `agents.json` definitions as a compatibility tier.
|
|
19
|
+
|
|
20
|
+
## Alias
|
|
21
|
+
|
|
22
|
+
`agent-detect` is held as an alias of this package.
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ai-agent-detect",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Detect which AI agent is running your code — structured identity (name, version, mode) and capabilities. Reads the AI_AGENT standard and the signals it misses.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "George Mihailov",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "index.js",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"ai-agent",
|
|
11
|
+
"AI_AGENT",
|
|
12
|
+
"agent-detection",
|
|
13
|
+
"detection",
|
|
14
|
+
"claude-code",
|
|
15
|
+
"codex",
|
|
16
|
+
"cursor",
|
|
17
|
+
"gemini-cli",
|
|
18
|
+
"amp",
|
|
19
|
+
"isagent",
|
|
20
|
+
"agentic"
|
|
21
|
+
]
|
|
22
|
+
}
|