Skip to content

Commit 8a50db3

Browse files
authored
Merge pull request #147 from detailobsessed/feat/devin-handoff-backend
feat(devin): expose handoff backend in MCP server enum
2 parents d267020 + 195d95e commit 8a50db3

4 files changed

Lines changed: 17 additions & 7 deletions

File tree

‎plugins/devin/README.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ Requires Python ≥ 3.10. No third-party packages — the server is pure stdlib.
6262
| `sleep_unschedule` | remove the nightly cron entry |
6363

6464
Default backend is `mock` (no API spend); the `claude`, `codex`, and `copilot`
65-
backends use the corresponding authenticated CLI and budget. The seven tools
66-
call the same `python -m skillopt_sleep` actions as the other shared-engine
67-
integrations.
65+
backends use the corresponding authenticated CLI and budget. The `handoff`
66+
backend runs the cycle with no model subprocess or API key — the engine writes
67+
pending model calls to `.skillopt-sleep-handoff/PROMPTS.md` + `pending.json`
68+
(exit code 3) and resumes after answers are placed in `answers/<id>.md`; re-run
69+
`sleep_run` with the same arguments to resume. The seven tools call the same
70+
`python -m skillopt_sleep` actions as the other shared-engine integrations.
6871

6972
## Data boundary
7073

‎plugins/devin/devin-rules.snippet.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ Always pass the absolute Devin workspace as `project`, especially for
2424
`sleep_adopt`. Default backend is `mock` (no provider calls). The `claude`,
2525
`codex`, and `copilot` backend values use the corresponding installed and
2626
authenticated CLI; they do not require this plugin to implement a separate
27-
API-key flow.
27+
API-key flow. The `handoff` backend runs the cycle with no model subprocess
28+
or API key — the engine writes pending model calls to
29+
`.skillopt-sleep-handoff/` and exits; answer each prompt in a fresh context
30+
and re-run `sleep_run` to resume (typically 3–6 rounds).
2831

2932
The Devin conversion and mock workflow stay local. A real backend sends
3033
truncated transcript excerpts and derived tasks to the selected provider for

‎plugins/devin/mcp_server.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
"properties": {
6363
"project": {"type": "string",
6464
"description": "Project dir to evolve (default: cwd)."},
65-
"backend": {"type": "string", "enum": ["mock", "claude", "codex", "copilot"],
66-
"description": "mock = no API spend (default); claude/codex/copilot = real."},
65+
"backend": {"type": "string", "enum": ["mock", "claude", "codex", "copilot", "handoff"],
66+
"description": "mock = no API spend (default); claude/codex/copilot = real; handoff = session answers prompts, no API subprocess."},
6767
"scope": {"type": "string", "enum": ["invoked", "all"],
6868
"description": "Harvest scope (default: invoked project only)."},
6969
"source": {"type": "string", "enum": ["claude", "codex", "auto"],

‎tests/test_devin_plugin.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_actions_map_to_engine_subcommands(self):
4646

4747
def test_backends_in_enum(self):
4848
backends = mcp_server._TOOL_SCHEMA["properties"]["backend"]["enum"]
49-
for b in ["mock", "claude", "codex", "copilot"]:
49+
for b in ["mock", "claude", "codex", "copilot", "handoff"]:
5050
self.assertIn(b, backends)
5151

5252
def test_schema_has_key_engine_params(self):
@@ -64,6 +64,10 @@ class TestClaudeHomeExpansion(unittest.TestCase):
6464
(the documented mcp-config sets SKILLOPT_DEVIN_CLAUDE_HOME="~/...")."""
6565

6666
def test_env_tilde_is_expanded(self):
67+
# Re-insert the devin plugin path at position 0 so importlib.reload
68+
# picks up this module, not plugins/copilot/mcp_server.py when both
69+
# test modules are loaded in the same process.
70+
sys.path.insert(0, PLUGIN)
6771
os.environ["SKILLOPT_DEVIN_CLAUDE_HOME"] = "~/.skillopt-sleep-devin"
6872
try:
6973
importlib.reload(mcp_server)

0 commit comments

Comments
 (0)