Skip to content

Add Devin CLI provider - #23

Closed
ThePlenkov wants to merge 35 commits into
mainfrom
fix/devin-cli-provider
Closed

Add Devin CLI provider#23
ThePlenkov wants to merge 35 commits into
mainfrom
fix/devin-cli-provider

Conversation

@ThePlenkov

@ThePlenkov ThePlenkov commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Upstream PR: awslabs#26

User description

Add Devin CLI provider implementation with unit tests and registration in all required locations.

What Changed

  • Implemented DevinCliProvider with prompt/status parsing and /exit handling
  • MCP integration via temp --config, launching cao-mcp-server and passing CAO_TERMINAL_ID
  • Supports agent_profile system prompts and soft allowed_tools enforcement via a prepended security prompt
  • Registered devin_cli across the app: ProviderType, provider manager factory, api/main.py providers list, launch workspace-access list, settings agent dirs, agent profile listing, and tool_mapping (Bash/Read/Write)
  • Added comprehensive unit tests and fixtures; updated API test to include devin_cli
  • NEW: Added Playwright E2E tests for web UI integration
  • NEW: Added devcontainer for true end-to-end testing (bypasses WSL limitations)

True End-to-End Testing with Devcontainer

The Problem

WSL has tmux limitations ([Errno 95] Operation not supported) that prevent real Devin CLI spawns. Unit and API tests pass, but actual agent spawning cannot be tested in WSL.

The Solution: Devcontainer on Host Machine

A .devcontainer/ configuration that:

  • Runs on host machine Docker (not WSL) - bypasses tmux limitations
  • Installs Devin CLI and mounts your credentials from ~/.config/devin/
  • Installs Playwright browsers (Chromium, Firefox, WebKit)
  • Pre-installs agent profiles for Devin CLI
  • Forwards port 9889 for CAO server

How to Use for True E2E Testing

Prerequisites:

  1. Docker installed on your host machine (not WSL)
  2. VS Code with Dev Containers extension
  3. Devin CLI credentials on host at ~/.config/devin/

Steps:

# 1. Open project in VS Code Dev Container
code .
# Press F1 → "Dev Containers: Reopen in Container"

# 2. Start CAO server (inside devcontainer)
cao-server --host 0.0.0.0 --port 9889

# 3. Run E2E tests (from host machine or devcontainer)
cd web
npm run test:e2e

# 4. Access web UI
open http://localhost:9889

Why This Works:

  • ✅ Real tmux sessions (no WSL limitations)
  • ✅ Actual Devin CLI spawns with your credentials
  • ✅ Full stack testing: frontend → API → backend → tmux → Devin CLI
  • ✅ Playwright can test real user interactions

Alternative: CI Testing

If you don't have Docker on your host machine, the CI pipeline (which runs on real Linux) will perform the true end-to-end testing of Devin CLI spawns.

Web UI E2E Tests - Why They Matter

What They Test

These E2E tests verify the complete user journey through the CAO web interface:

  • Web interface loads and renders correctly
  • Devin CLI appears in the providers list (both API and UI)
  • Spawn Agent modal opens and shows Devin CLI as an option
  • Agent profiles are available for Devin CLI selection
  • Provider registration works end-to-end

How They Help vs Existing Tests

Existing Unit Tests:

  • ✅ Test individual functions in isolation
  • ✅ Fast and focused
  • ❌ Don't test integration between components
  • ❌ Don't catch UI rendering issues
  • ❌ Don't verify user interaction flows

Existing API Tests:

  • ✅ Test HTTP endpoints
  • ✅ Verify backend logic
  • ❌ Don't test frontend rendering
  • ❌ Don't catch JavaScript errors
  • ❌ Don't verify UI state management

NEW E2E Tests:

  • ✅ Test the full stack: frontend → API → backend
  • ✅ Verify UI rendering and user interactions
  • ✅ Catch integration issues between React components and backend
  • ✅ Provide confidence that web features work for real users
  • ✅ Prevent regressions in web UI functionality

Example Issues E2E Tests Catch

  • Frontend shows wrong provider list (API works, UI broken)
  • Modal doesn't open due to JavaScript error
  • Provider dropdown missing options (CSS/React state issue)
  • Button clicks don't trigger API calls (event handler bug)

Trade-offs

  • Pros: Catches integration bugs, validates user experience, prevents UI regressions
  • Cons: Slower than unit tests, can be flaky in CI, requires browser setup

Overall, E2E tests complement unit and API tests by providing confidence that the complete user experience works correctly, not just individual components in isolation.

Bug Fixes

  • Fixed Markdown heading collision in prompt detection: do not treat response headings (#) as input prompts; terminate on horizontal rules/status bar only

Summary by CodeRabbit

  • New Features

    • Added Devin CLI provider support across the app and web UI, including provider selection and profile/tool mapping.
    • The providers API now reports devin_cli as installed when the devin binary is available.
    • Added UI+API and Playwright end-to-end coverage for the Devin CLI provider.
  • Bug Fixes

    • Improved launch confirmation/warnings flow for Devin CLI when workspace access is required.
    • Enhanced terminal input delivery with provider-dependent paste-buffer behavior.
  • Chores

    • Updated CI and web test setup (Playwright/Vitest config, scripts, and fixtures).

CodeAnt-AI Description

Add Devin CLI as a supported provider with web UI and status detection

What Changed

  • Added Devin CLI as a selectable provider in the app and web UI, including provider listings, profile locations, and workspace access
  • Devin CLI now starts with its saved profile settings, keeps existing MCP settings, and supports its orchestration tools during multi-agent workflows
  • Input handling now uses the command style Devin CLI expects, which avoids pasted input issues and improves task submission
  • Status detection and response parsing were added for Devin CLI, including handling for idle, working, and finished states
  • Added unit, API, and end-to-end tests for Devin CLI setup, provider registration, and supervisor workflows

Impact

✅ Use Devin CLI from the agent picker
✅ Fewer input failures when sending tasks to Devin CLI
✅ More reliable agent status updates in WSL

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas of improvement in your code repository, ensuring your repository maintains high standards of code health.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR successfully adds Devin CLI provider support with comprehensive implementation and test coverage. The provider follows established patterns in the codebase and is properly registered in all required locations:

✅ Complete provider implementation with status detection logic
✅ Comprehensive unit test coverage (initialization, status detection, response extraction, tool restrictions, registration)
✅ Proper integration with provider manager, tool mapping, and CLI commands
✅ Temporary file handling with cleanup
✅ MCP server configuration support

The implementation is well-structured and ready to merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@codeant-ai codeant-ai Bot added the size:XL This PR changes 500-999 lines, ignoring generated files label Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Adds Devin CLI provider support across provider registration, input delivery, status handling, web UI exposure, and test coverage.

Changes

Devin CLI Provider Integration

Layer / File(s) Summary
Provider registration and defaults
src/cli_agent_orchestrator/models/provider.py, src/cli_agent_orchestrator/cli/commands/launch.py, src/cli_agent_orchestrator/api/main.py, src/cli_agent_orchestrator/services/settings_service.py, src/cli_agent_orchestrator/utils/agent_profiles.py, src/cli_agent_orchestrator/utils/tool_mapping.py, web/src/components/AgentPanel.tsx, src/cli_agent_orchestrator/constants.py
Declares ProviderType.DEVIN_CLI = "devin_cli" and registers it in API provider installation reporting, workspace-access provider checks, default agent directories, profile source labels, tool mapping, web fallback providers, and FIFO directory comments.
Input delivery and backend plumbing
src/cli_agent_orchestrator/providers/base.py, src/cli_agent_orchestrator/backends/base.py, src/cli_agent_orchestrator/backends/tmux_backend.py, src/cli_agent_orchestrator/backends/herdr_backend.py, src/cli_agent_orchestrator/clients/tmux.py, src/cli_agent_orchestrator/services/terminal_service.py, test/backends/test_tmux_backend.py, test/services/test_terminal_service_full.py
Extends send_keys with use_paste_buffer, threads the flag through tmux and Herdr backends, selects it from the active provider in terminal service, and updates related tests.
Status monitor and Devin provider core
src/cli_agent_orchestrator/services/status_monitor.py, src/cli_agent_orchestrator/providers/devin_cli.py
Refactors status monitor helper flow and implements the Devin CLI provider, including temp-file handling, command assembly, MCP config merging, initialization, terminal-output parsing, message extraction, exit, and cleanup behavior.
Provider manager and unit validation
src/cli_agent_orchestrator/providers/manager.py, test/providers/test_devin_cli_unit.py, test/providers/fixtures/devin_cli_*.txt, test/api/test_api_endpoints.py
Centralizes provider factory selection, adds Devin CLI provider creation, and covers provider wiring, status parsing, command construction, and fixture-driven unit behavior.
E2E and web surface validation
test/e2e/conftest.py, test/e2e/test_supervisor_orchestration.py, web/package.json, web/playwright.config.ts, web/e2e/devin-provider.spec.ts, web/vite.config.ts, .github/workflows/ci.yml, test/providers/conftest.py, test/providers/test_kiro_cli_integration.py
Adds Devin CLI E2E orchestration coverage, Playwright setup, web provider visibility checks, Vitest exclusions, CI/web package install updates, and async test polling changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

  • [feat] Add Devin CLI provider #3: The PR directly implements Devin CLI provider support across provider registration, orchestration, UI exposure, and tests, matching the issue’s objective.

Poem

🐇 I hop through tmux with a Devin cheer,
New prompts and profiles appear right here.
Paste-buffer paths and status clues align,
devin_cli glows in the review sunshine.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 78.26% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a Devin CLI provider.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/devin-cli-provider
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch fix/devin-cli-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the DevinCliProvider to support the Devin CLI, along with its registration across the orchestrator and a suite of unit tests. The code review highlights several critical integration issues where the new provider violates the BaseProvider interface: initialize should be asynchronous (and its unit tests updated accordingly), get_status must accept a buffer parameter to avoid runtime TypeErrors, and the constructor and manager should support skill_prompt to enable custom skills. Additionally, temporary files should be cleaned up in _build_command to prevent leaks.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
Comment thread src/cli_agent_orchestrator/providers/manager.py Outdated
Comment thread test/providers/test_devin_cli_unit.py Outdated
Comment thread src/cli_agent_orchestrator/providers/devin_cli.py
Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
@kilo-code-bot

kilo-code-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • test/providers/conftest.py - No critical issues found in incremental diff
  • test/providers/test_kiro_cli_integration.py - No critical issues found in incremental diff
Previous Review Summaries (8 snapshots, latest commit 325cd33)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 325cd33)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • .github/workflows/ci.yml - No critical issues found in incremental diff

Previous review (commit f94d97d)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • .github/workflows/ci.yml - No critical issues found in incremental diff

Previous review (commit 0032a82)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • .github/workflows/ci.yml - No critical issues found in incremental diff

Previous review (commit 2427398)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • src/cli_agent_orchestrator/providers/manager.py - Refactored provider creation logic into factory methods

Previous review (commit f990d4e)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • web/e2e/devin-provider.spec.ts - Type annotation improvements only

Previous review (commit 2b1b42d)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • src/cli_agent_orchestrator/constants.py - FIFO_DIR moved from /tmp to CAO_HOME_DIR/fifos
  • src/cli_agent_orchestrator/providers/devin_cli.py - Refactored temp file read/write to use open() instead of Path methods

Previous review (commit b8c121b)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
src/cli_agent_orchestrator/providers/devin_cli.py 200 Removed security validation for temp file path - potential path traversal vulnerability
Files Reviewed (4 files)
  • sonar-project.properties - new SonarQube suppression config
  • src/cli_agent_orchestrator/constants.py - comment change only
  • src/cli_agent_orchestrator/providers/devin_cli.py - 1 issue (removed security check still present)
  • web/vite.config.ts - test configuration update

Fix these issues in Kilo Cloud

Previous review (commit a1b5197)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
src/cli_agent_orchestrator/providers/devin_cli.py 200 Removed security validation for temp file path - potential path traversal vulnerability
Files Reviewed (3 files)
  • src/cli_agent_orchestrator/constants.py - comment change only
  • src/cli_agent_orchestrator/providers/devin_cli.py - 1 issue (removed security check)
  • web/vite.config.ts - configuration update

Fix these issues in Kilo Cloud


Reviewed by step-3.7-flash-20260528 · Input: 269.5K · Output: 3.5K · Cached: 605.2K

Comment thread test/providers/test_devin_cli_unit.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
test/providers/test_devin_cli_unit.py (1)

1-362: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Apply Black formatting to pass CI checks.

The pipeline reports Black formatting failures (would reformat). Run:

uv run black test/providers/test_devin_cli_unit.py
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/providers/test_devin_cli_unit.py` around lines 1 - 362, The test file
test_devin_cli_unit.py does not conform to Black formatting standards, causing
CI pipeline failures. Run the Black code formatter on this file by executing the
command provided in the comment to automatically reformat the file according to
Black's standards. This will fix all formatting issues reported by the pipeline
such as line length, spacing, and other style conventions that Black enforces.

Source: Pipeline failures

src/cli_agent_orchestrator/providers/devin_cli.py (1)

1-353: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Run Black on this file before merge.

CI is currently failing because this file would be reformatted by Black. Please format it to unblock the quality gate.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cli_agent_orchestrator/providers/devin_cli.py` around lines 1 - 353, The
file devin_cli.py needs to be formatted according to Black's code style
standards to pass the CI quality gate. Run the Black formatter on this file by
executing the command: black src/cli_agent_orchestrator/providers/devin_cli.py.
This will automatically reformat the code to comply with Black's standards
without requiring manual changes to the logic or structure.

Source: Pipeline failures

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/cli_agent_orchestrator/providers/devin_cli.py`:
- Line 228: The list comprehension on line 228 uses the ambiguous loop variable
`l` which triggers linting errors and reduces readability. Rename the loop
variable `l` to a more descriptive name such as `line` throughout the
comprehension `[l for l in tail[:idx] if l.strip()]` to improve code clarity and
comply with linting standards. Replace all occurrences of `l` in this
comprehension with the new variable name.

In `@src/cli_agent_orchestrator/utils/tool_mapping.py`:
- Around line 51-56: The "fs_*" mapping in the "devin_cli" configuration
includes "Bash" as an allowed permission, which grants arbitrary shell execution
to profiles that only authorize wildcard filesystem operations. Remove "Bash"
from the "fs_*" list in the mapping so that filesystem wildcard access only
includes "Read" and "Write" permissions, without implicitly granting
execute_bash capabilities.

---

Outside diff comments:
In `@src/cli_agent_orchestrator/providers/devin_cli.py`:
- Around line 1-353: The file devin_cli.py needs to be formatted according to
Black's code style standards to pass the CI quality gate. Run the Black
formatter on this file by executing the command: black
src/cli_agent_orchestrator/providers/devin_cli.py. This will automatically
reformat the code to comply with Black's standards without requiring manual
changes to the logic or structure.

In `@test/providers/test_devin_cli_unit.py`:
- Around line 1-362: The test file test_devin_cli_unit.py does not conform to
Black formatting standards, causing CI pipeline failures. Run the Black code
formatter on this file by executing the command provided in the comment to
automatically reformat the file according to Black's standards. This will fix
all formatting issues reported by the pipeline such as line length, spacing, and
other style conventions that Black enforces.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a274b730-1d69-4dc7-b425-1aed3d0223c6

📥 Commits

Reviewing files that changed from the base of the PR and between 32db4e1 and fc6df1c.

📒 Files selected for processing (16)
  • src/cli_agent_orchestrator/api/main.py
  • src/cli_agent_orchestrator/cli/commands/launch.py
  • src/cli_agent_orchestrator/models/provider.py
  • src/cli_agent_orchestrator/providers/devin_cli.py
  • src/cli_agent_orchestrator/providers/manager.py
  • src/cli_agent_orchestrator/services/settings_service.py
  • src/cli_agent_orchestrator/utils/agent_profiles.py
  • src/cli_agent_orchestrator/utils/tool_mapping.py
  • test/api/test_api_endpoints.py
  • test/providers/fixtures/devin_cli_completed_output.txt
  • test/providers/fixtures/devin_cli_complex_response.txt
  • test/providers/fixtures/devin_cli_error_output.txt
  • test/providers/fixtures/devin_cli_heading_response.txt
  • test/providers/fixtures/devin_cli_idle_output.txt
  • test/providers/fixtures/devin_cli_processing_output.txt
  • test/providers/test_devin_cli_unit.py

Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
Comment thread src/cli_agent_orchestrator/utils/tool_mapping.py
Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found across 16 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
Comment thread src/cli_agent_orchestrator/utils/tool_mapping.py Outdated
Comment thread src/cli_agent_orchestrator/providers/devin_cli.py Outdated
Comment thread src/cli_agent_orchestrator/providers/manager.py Outdated
Copilot AI and others added 9 commits June 28, 2026 11:22
…tools via security prompt

Agent-Logs-Url: https://github.com/ThePlenkov/cli-agent-orchestrator/sessions/1a11fb12-9327-45e4-a3bd-6eb94a07f9eb

Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
This commit addresses feedback from PR #10 to align with the
build-cao-provider skill requirements:

**MCP Configuration Enhancement:**
- Merge MCP servers from agent profile with user's existing Devin config
- Ensure CAO_TERMINAL_ID is set in env for all MCP servers (critical for orchestration)
- Preserve user's existing MCP settings while adding cao-mcp-server
- Support agent profiles with custom MCP server configurations

**E2E Testing Infrastructure:**
- Add require_devin fixture to test/e2e/conftest.py
- Add TestDevinCliSupervisorOrchestration class with 3 test methods:
  - test_supervisor_handoff: validates handoff MCP tool delegation
  - test_supervisor_assign_and_handoff: validates multi-agent workflow
  - test_supervisor_assign_three_analysts: canonical examples/assign smoke test

**Agent Profile Installation:**
- Install analysis_supervisor, data_analyst, and report_generator profiles for devin_cli
- Enables supervisor orchestration patterns (assign + handoff + send_message)

These changes implement critical requirements from the build-cao-provider
skill, particularly lesson #1 (CAO_TERMINAL_ID forwarding) and the E2E
supervisor orchestration validation pattern.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Add devin_cli to FALLBACK_PROVIDERS in AgentPanel.tsx
- Add 'Devin' to SOURCE_LABELS
- Add Playwright E2E test scripts to package.json

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
These tests verify that Devin CLI is properly integrated with the CAO web interface:
- Web interface loads correctly
- Devin CLI appears in providers list
- Spawn Agent modal shows Devin CLI option
- Agent profiles are available for Devin CLI
- Provider registration is functional

Compared to existing unit/API tests, these E2E tests:
- Test the full user journey through the web UI
- Catch integration issues between frontend and backend
- Verify UI rendering and user interaction flows
- Provide confidence that web features work end-to-end

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…paste-buffer control

Root cause: The event-driven architecture (commit 75e98ac) changed
wait_until_status to rely on FIFO-based status monitoring. In WSL2,
tmux pipe-pane cannot write to named pipes, causing the buffer to stay
empty and status to remain UNKNOWN forever. cao-poc worked because it
used the old API (provider.get_status() with backend.get_history()).

Changes:
- status_monitor: Add fallback to backend.get_history() for tmux backends
  when FIFO buffer is empty (e.g., WSL limitation). Reads pane history
  directly and runs provider detection on it. Caches result to avoid
  repeated history reads. Provides WSL compatibility without affecting
  the normal FIFO path.
- base.py: Add use_paste_buffer property to allow providers to opt out
  of paste-buffer (Devin CLI doesn't support it for user input)
- tmux_client: Add use_paste_buffer parameter to send_keys; when False,
  uses send-keys instead of paste-buffer for user input
- devin_cli: Refactor to align with cao-poc implementation; add
  use_paste_buffer_for_input=False; improve _clean() with OSC pattern
  removal; add allowed_tools security constraint support; fix
  get_status() signature to match base class (buffer parameter)
- constants: Move FIFO_DIR to /tmp to avoid WSL2 Windows mount
  limitations (already documented, now enforced)
- tests: Update devin_cli unit tests for new signature; add
  @pytest.mark.asyncio to async test; fix error message assertions;
  update API test provider count from 11 to 12; enable E2E tests
  (removed WSL skip decorator)

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ThePlenkov
ThePlenkov force-pushed the fix/devin-cli-provider branch from fc6df1c to 2dd285e Compare June 28, 2026 11:59
@codeant-ai

codeant-ai Bot commented Jun 28, 2026

Copy link
Copy Markdown

CodeAnt AI is running Incremental review

@codeant-ai codeant-ai Bot added size:XXL This PR changes 1000+ lines, ignoring generated files and removed size:XL This PR changes 500-999 lines, ignoring generated files labels Jun 28, 2026
@codeant-ai

codeant-ai Bot commented Jun 28, 2026

Copy link
Copy Markdown

CodeAnt AI Incremental review completed.

@gemini-code-assist

Copy link
Copy Markdown

Hi ThePlenkov, thank you for the updates. It's great to see these fixes addressing the critical issues identified in the review. Since you've confirmed that the initialize method is now async, the get_status signature matches the contract, and the DevinCliProvider is correctly integrated, these changes should resolve the reported blockers. Please ensure all tests pass in your CI environment to confirm the integration is stable.

@gemini-code-assist

Copy link
Copy Markdown

Hi ThePlenkov, thank you for these additional fixes. It's great to see the loop variable issue, the security constraint regarding Bash execution, and the formatting issues addressed. These improvements, combined with your previous fixes, should resolve the critical issues and ensure the DevinCliProvider is robust and secure. Please verify that all tests pass in your CI environment and that the SonarQube Quality Gate now passes as expected.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@ThePlenkov Thanks for the update — renaming l to line at Line 245 addresses the readability concern.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@ThePlenkov Thanks for the fix — removing Bash from the fs_* mapping addresses the privilege-escalation concern and keeps filesystem wildcard access scoped to read/write only.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@gemini-code-assist

Copy link
Copy Markdown

Hi ThePlenkov, thank you for the comprehensive updates and for addressing the feedback regarding the loop variable, security constraints, and formatting. It's great to see the DevinCliProvider now fully integrated with robust status detection and E2E test coverage. Since the critical issues have been resolved and the SonarQube Quality Gate is expected to pass, this looks like a solid implementation. Please ensure all CI checks, including the new E2E tests, pass successfully to confirm the integration is stable.

Configure Web UI Build to use public npmjs.org registry
and clear npm cache to avoid JFrog artifacts when offline.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@codeant-ai

codeant-ai Bot commented Jun 28, 2026

Copy link
Copy Markdown

CodeAnt AI is running Incremental review

@codeant-ai codeant-ai Bot added size:XXL This PR changes 1000+ lines, ignoring generated files and removed size:XXL This PR changes 1000+ lines, ignoring generated files labels Jun 28, 2026
@codeant-ai

codeant-ai Bot commented Jun 28, 2026

Copy link
Copy Markdown

CodeAnt AI Incremental review completed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/cli_agent_orchestrator/providers/devin_cli.py (1)

292-298: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep prompt detection horizontal-rule-aware.

Line 297 still matches any line starting with # when the status bar is present, so Markdown headings can be treated as Devin prompts despite the safer _has_input_prompt() helper above. Use the same prompt-context check here before returning IDLE/COMPLETED.

Suggested fix
-        # 2. Check for the # prompt with fallback
-        has_prompt = self._detect_prompt_with_fallback(clean_output)
+        # 2. Check for the # prompt with horizontal-rule context to avoid
+        # Markdown heading collisions in agent responses.
+        has_prompt = self._has_input_prompt(lines)

Also applies to: 324-331

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cli_agent_orchestrator/providers/devin_cli.py` around lines 292 - 298,
The prompt fallback in _detect_prompt_with_fallback is too permissive and can
misread Markdown headings as Devin prompts when the status bar is visible.
Update this logic to use the same prompt-context check as _has_input_prompt
before treating a trailing “#” as a prompt, and apply the same safeguard in the
related IDLE/COMPLETED detection path. Keep the relaxed fallback, but only
return true when the hash line is actually in prompt context rather than any
heading-like line.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/cli_agent_orchestrator/providers/devin_cli.py`:
- Around line 292-298: The prompt fallback in _detect_prompt_with_fallback is
too permissive and can misread Markdown headings as Devin prompts when the
status bar is visible. Update this logic to use the same prompt-context check as
_has_input_prompt before treating a trailing “#” as a prompt, and apply the same
safeguard in the related IDLE/COMPLETED detection path. Keep the relaxed
fallback, but only return true when the hash line is actually in prompt context
rather than any heading-like line.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6c9d8881-a985-48a3-9789-06c37c5acb22

📥 Commits

Reviewing files that changed from the base of the PR and between 2d96ffc and 0032a82.

📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • src/cli_agent_orchestrator/constants.py
  • src/cli_agent_orchestrator/providers/devin_cli.py
  • src/cli_agent_orchestrator/providers/manager.py
  • web/e2e/devin-provider.spec.ts
  • web/vite.config.ts
✅ Files skipped from review due to trivial changes (1)
  • src/cli_agent_orchestrator/constants.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • web/vite.config.ts
  • .github/workflows/ci.yml
  • web/e2e/devin-provider.spec.ts

ThePlenkov and others added 4 commits June 28, 2026 16:55
Remove unnecessary --registry flag and cache clean since npm
uses public registry by default. Only need to remove package-lock.json.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Remove rm -f package-lock.json so CI generates fresh lock file
with public registry URLs. This fixes SonarCloud warning about
unpredictable dependencies.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Local npm install fails with Invalid Version error. Keeping
rm -f package-lock.json in workflow for now. Will generate
proper lock file when npm is fixed or when online.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Remove rm -f package-lock.json so CI generates fresh lock file
with public registry URLs. This will fix SonarCloud warning.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread .github/workflows/ci.yml Outdated
ThePlenkov and others added 2 commits June 28, 2026 17:14
Add package-lock.json generated with public npm registry
to fix SonarCloud warning about unpredictable dependencies.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Restore rm -f package-lock.json to workflow as originally designed.
Now that package-lock.json is committed with public registry URLs,
CI can regenerate it fresh each run.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ThePlenkov
ThePlenkov force-pushed the fix/devin-cli-provider branch 3 times, most recently from 95ca53c to 325cd33 Compare June 28, 2026 15:39
@codeant-ai

codeant-ai Bot commented Jun 28, 2026

Copy link
Copy Markdown

CodeAnt AI is running Incremental review

@codeant-ai codeant-ai Bot added size:XXL This PR changes 1000+ lines, ignoring generated files and removed size:XXL This PR changes 1000+ lines, ignoring generated files labels Jun 28, 2026
@codeant-ai

codeant-ai Bot commented Jun 28, 2026

Copy link
Copy Markdown

CodeAnt AI Incremental review completed.

@ThePlenkov
ThePlenkov deleted the branch main June 28, 2026 15:56
@ThePlenkov ThePlenkov closed this Jun 28, 2026
@ThePlenkov ThePlenkov reopened this Jun 28, 2026
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@sonarqubecloud

Copy link
Copy Markdown

@ThePlenkov
ThePlenkov deleted the branch main June 28, 2026 16:13
@ThePlenkov ThePlenkov closed this Jun 28, 2026
ThePlenkov added a commit that referenced this pull request Jul 1, 2026
Reformat 6 files to comply with Black code style requirements:
- Split long lines to meet 88 character limit
- Remove trailing whitespace
- Fix docstring indentation
- Remove extra blank lines

Fixes CI failure in Code Quality job (PR #23)

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
ThePlenkov added a commit that referenced this pull request Jul 1, 2026
The test_send_input_allows_manual_answer_when_provider_waits_for_user_answer
test was failing because it didn't expect the use_paste_buffer parameter that
was added to send_keys in the WSL compatibility fix. This commit updates the
test to set the use_paste_buffer_for_input attribute on the mock provider and
include use_paste_buffer in the assertion.

Fixes Python 3.11 unit test failure in PR #23.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants