Repository navigation
feat: add Factory Droid and Devin CLI agent adapters - #27
Merged
Merged
Conversation
Adds two new agent adapters following the existing AgentAdapter pattern (build_command()/extract_report()/extract_usage()), registered in agents/registry.py and cli.py's AgentId enum: - droid.py: Factory CLI (`droid exec`). Authenticates via FACTORY_API_KEY (env var, so it can run headlessly in CI once configured). Defaults to read-only mode with no extra flag needed. Flag parsing (`--`, `--cwd`, `--output-format json`) was verified directly against the real CLI. - devin.py: Devin CLI (`devin -p`). Authenticates only via a one-time interactive `devin auth login` -- no env-var/API-key path exists, so unlike Droid it can't be authenticated from a bare CI runner without a human logging in first. Requires --respect-workspace-trust false, or non-interactive runs fail on any directory Devin hasn't seen before. 15 new unit tests (tests/test_agents/test_droid.py, test_devin.py) cover build_command()/extract_report()/extract_usage(), following the pattern in test_codex.py. Both adapters run cleanly through the full `secfoo run` pipeline (prompt rendered, real CLI invoked, clean status returned) but have NOT been verified against a live account -- no FACTORY_API_KEY or Devin login was available while writing this. See each file's docstring for exactly what was and wasn't verified. Testing: - pytest tests: 700 passed, 0 failed - ruff check on the new/changed files: clean (cli.py's pre-existing Optional[X]-style findings are unrelated to this change) Ref: SECFOO-6 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
What does this change, and why?
Adds two new agent adapters (SECFOO-6): Factory Droid and Devin, following
the existing
AgentAdapterpattern used by claude/codex/gemini. Both areregistered in
agents/registry.pyandcli.py'sAgentIdenum, with unittests following
test_codex.py's pattern.NOT yet verified against a live account: no
FACTORY_API_KEYor Devinlogin was available while writing this. Both adapters run cleanly through
the full
secfoo runpipeline end to end (correct command built, real CLIinvoked, clean status returned) — see each file's docstring for the exact
flags verified and what still needs a real account to confirm.
Testing
pytest testspasses (700 passed)ruff check .passes on the new/changed files (cli.py's pre-existingOptional[X]-style findings are unrelated to this change)🤖 Generated with Claude Code