feat: port upstream agents.json detection engine - #15
Closed
cursor[bot] wants to merge 3 commits into
Closed
Conversation
Vendors vercel/detect-agent agents.json and evaluates match conditions (env_set/env_value/env_matches/file_exists/no_tty/anyOf/allOf), adding cline, openclaw, goose, junie, kiro, and extended codex/antigravity/opencode/ pi detectors while keeping the Python is_agent API and PI_CODING_AGENT compat. Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Drive determine_agent tests from vendored testcases.json and add coverage for cline, openclaw, extended codex/antigravity, and AI_AGENT verbatim names. Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Update README for the agents.json-driven port and newly supported agents from vercel/detect-agent. Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Collaborator
|
Closing in favor of existing automation PR #14 (reuse; do not stack multiple sync PRs). |
Broly Security ScanNote Baseline snapshot is missing for this repo. Broly is running in PR-only fallback mode until the first scheduled baseline completes. This does not block the PR. Note ✅ Clean scan Note Re-scan this PR anytime with
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agents.json-driven detection engine to the Python package (condition tree evaluator + vendoredagents.json)PATH/.pi/agent), plus extended Codex (CODEX_SANDBOX_NETWORK_DISABLED), Antigravity (ANTIGRAVITY_CLI_ALIAS), and OpenCode (OPENCODE)is_agent/None) and backward-compatiblePI_CODING_AGENTdetectiontestcases.jsonUpstream
Synced against https://github.com/vercel/detect-agent @
eab8cc9(detect-agent 1.1.0), including:feat: detect goose, junie, pi, and kiro agents(needs license #5)feat(agents): add cline and openclaw; extend codex and antigravity detectors(chore(main): release detect_agent 0.3.0 #11)Tests
python3 -m pytestpython3 -m ruff check .python3 -m ruff format --check .python3 -m mypy detect_agent