Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions agents.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
{
"key": "GEMINI",
"name": "gemini",
"name": "gemini_cli",
"match": {
"type": "anyOf",
"conditions": [{ "type": "env_set", "name": "GEMINI_CLI" }]
Expand All @@ -45,7 +45,7 @@
},
{
"key": "CODEX",
"name": "codex",
"name": "codex_cli",
"match": {
"type": "anyOf",
"conditions": [
Expand Down Expand Up @@ -77,7 +77,7 @@
},
{
"key": "OPENCODE",
"name": "opencode",
"name": "open_code",
"match": {
"type": "anyOf",
"conditions": [
Expand Down Expand Up @@ -123,7 +123,7 @@
{
"key": "COWORK",
"name": "cowork",
"description": "Claude Cowork. Evaluated before `claude` so the more specific COWORK marker wins. Requires CLAUDE_CODE_IS_COWORK plus a Claude Code marker.",
"description": "Claude Cowork. Evaluated before `claude_code` so the more specific COWORK marker wins. Requires CLAUDE_CODE_IS_COWORK plus a Claude Code marker.",
"match": {
"type": "allOf",
"conditions": [
Expand All @@ -140,7 +140,7 @@
},
{
"key": "CLAUDE",
"name": "claude",
"name": "claude_code",
"match": {
"type": "anyOf",
"conditions": [
Expand Down
2 changes: 1 addition & 1 deletion agents.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"agents": {
"type": "array",
"description": "Known agents, evaluated top to bottom. Order matters: place more specific agents before more general ones (e.g. cowork before claude).",
"description": "Known agents, evaluated top to bottom. Order matters: place more specific agents before more general ones (e.g. cowork before claude_code).",
"items": { "$ref": "#/definitions/agent" }
}
},
Expand Down
16 changes: 8 additions & 8 deletions testcases.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,26 @@
},

{
"name": "detects gemini from GEMINI_CLI",
"name": "detects gemini_cli from GEMINI_CLI",
"env": { "GEMINI_CLI": "1" },
"expectedIsAgent": true,
"expectedAgentKey": "GEMINI"
},

{
"name": "detects codex from CODEX_SANDBOX",
"name": "detects codex_cli from CODEX_SANDBOX",
"env": { "CODEX_SANDBOX": "seatbelt" },
"expectedIsAgent": true,
"expectedAgentKey": "CODEX"
},
{
"name": "detects codex from CODEX_CI",
"name": "detects codex_cli from CODEX_CI",
"env": { "CODEX_CI": "1" },
"expectedIsAgent": true,
"expectedAgentKey": "CODEX"
},
{
"name": "detects codex from CODEX_THREAD_ID",
"name": "detects codex_cli from CODEX_THREAD_ID",
"env": { "CODEX_THREAD_ID": "thread-123" },
"expectedIsAgent": true,
"expectedAgentKey": "CODEX"
Expand All @@ -94,13 +94,13 @@
},

{
"name": "detects opencode from OPENCODE_CLIENT",
"name": "detects open_code from OPENCODE_CLIENT",
"env": { "OPENCODE_CLIENT": "opencode" },
"expectedIsAgent": true,
"expectedAgentKey": "OPENCODE"
},
{
"name": "detects opencode from OPENCODE",
"name": "detects open_code from OPENCODE",
"env": { "OPENCODE": "1" },
"expectedIsAgent": true,
"expectedAgentKey": "OPENCODE"
Expand Down Expand Up @@ -148,13 +148,13 @@
},

{
"name": "detects claude from CLAUDE_CODE",
"name": "detects claude_code from CLAUDE_CODE",
"env": { "CLAUDE_CODE": "1" },
"expectedIsAgent": true,
"expectedAgentKey": "CLAUDE"
},
{
"name": "detects claude from CLAUDECODE",
"name": "detects claude_code from CLAUDECODE",
"env": { "CLAUDECODE": "1" },
"expectedIsAgent": true,
"expectedAgentKey": "CLAUDE"
Expand Down
Loading