feat(agent-runtimes): OpenClaw + Hermes runtime adapters for operations agents

Analysed against 6d9bffc810 files changedby 1012839419a-alt
Open PR on GitHub

Change-risk score

9.6out of 10Elevated
Repository health
6.6to7.3base against this head

This change sits in the top third of this repository's own risk distribution, the band worth reviewing closely. It is riskier than 89% of this repository's own commits.

The largest health movement is in base.py, down 1.3. Nothing outside this PR depends on a contract it changed.

Files changed
10
in this diff
Contracts changed
0
removed or signature
Outside callers
0
not in this diff
Findings added
39
3 resolved

Blast radius on the repo map

Every file in the repository, grouped into its own directories and sized by lines. The ones this PR changes are lit, and everything that imports them is marked.

backendchromecompatdocsfrontendiiiopenspecscriptstestsapibrowser_act_packsschemasservicesskillsworkflowdify_gra…appcomponentslibchangesintegrationunitecommercelead-generationsocial-listeningintellige…(app)flowrecordsuiunlumen-uiflowworkflowapichannelscontrolpipeline
changed, health fellchanged, health rosechanged, health heldimports a changed fileuntouchedchanged by this PR

Drawing 1,488 of 1,631 files at a readable size, grouped by directory and sized by lines of code. 10 changed here reach 11 more by import. 143 are too small to see at this width, which is what the frame below is for.

Inside backend

agent_runtimesapibrowser_act_packschannelscontrolimage_st…llmmigratio…plan_irpluginsschemassecurityservicesskillsworkflowv1ecommercelead-generat…social-listeningversionsintelligencebrows…cr…opencli_…skil…agen…in…jo…__i…im…inte…cu…pi…exe…val…capa…cont…op…workf…url…image_s…op…plugin…prov…reco…cor…loo…tr…tasks…capabili…compiler…data_ope…dataflow…demand_a…dify_im…ex…fl…hda_tem…htt…int…joy…kat…las…nat…native_intell…nati…no…open…opencli_hd…patcher.pyresea…research_o…runti…runtime_regis…situa…swarm…tool_…trigg…tur…turb…tur…work…brow…cha…co…dashbo…image_st…nodes.…oper…ope…pr…pro…studi…st…ta…work…od…co…report…simula…SK…SK…SK…

630 files, 4 changed by this PR and 10 that import one. This PR changes 7 files in total, spread across more than one top-level directory. Click any directory above to frame it instead.

Changed

What this PR added, and what it took away

Introduced findings are the ones inside the lines this PR added, not the file's existing ones. The resolved column is the only place in the product that lists them.

Introduced (39)
  • highcomplex method
    backend/agent_runtimes/base.py:170

    validate_common_config has cyclomatic complexity 18

  • highcomplex method
    backend/agent_runtimes/hermes_adapter.py:140

    invoke has cyclomatic complexity 15

  • highcomplex method
    backend/agent_runtimes/openclaw_adapter.py:192

    invoke has cyclomatic complexity 19

  • highbumpy road
    backend/agent_runtimes/openclaw_adapter.py:192

    invoke has 5 nested blocks at the same level (bumpy road)

  • mediumnested complexity
    backend/agent_runtimes/hermes_adapter.py:140

    invoke nests 4 levels deep

  • mediumnested complexity
    backend/agent_runtimes/openclaw_adapter.py:192

    invoke nests 4 levels deep

  • mediumnested complexity
    backend/agent_runtimes/openclaw_adapter.py:169

    _parse_stdout nests 4 levels deep

  • mediumcomplex method
    backend/agent_runtimes/hermes_adapter.py:75

    validate_config has cyclomatic complexity 10

  • mediumcomplex method
    backend/agent_runtimes/openclaw_adapter.py:103

    validate_config has cyclomatic complexity 10

  • mediumcomplex method
    backend/agent_runtimes/openclaw_adapter.py:63

    _extract_reply_text has cyclomatic complexity 12

  • mediumlow cohesion
    backend/agent_runtimes/hermes_adapter.py:63

    HermesRuntimeAdapter has low cohesion (LCOM4=2): its 7 methods split into 2 groups that share no fields or calls

  • mediumbumpy road
    backend/agent_runtimes/hermes_adapter.py:140

    invoke has 4 nested blocks at the same level (bumpy road)

  • mediumdry violation
    backend/agent_runtimes/hermes_adapter.py:169

    68% of file duplicated; worst clone shares 31 lines with backend/agent_runtimes/openclaw_adapter.py

  • mediumdry violation
    backend/agent_runtimes/openclaw_adapter.py:223

    47% of file duplicated; worst clone shares 31 lines with backend/agent_runtimes/hermes_adapter.py

  • mediumdry violation
    tests/unit/agent_runtimes/test_hermes_adapter.py:65

    60% of file duplicated; worst clone shares 27 lines with tests/unit/agent_runtimes/test_openclaw_adapter.py

  • mediumdry violation
    tests/unit/agent_runtimes/test_openclaw_adapter.py:58

    69% of file duplicated; worst clone shares 27 lines with tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumlow cohesion
    backend/agent_runtimes/openclaw_adapter.py:91

    OpenClawRuntimeAdapter has low cohesion (LCOM4=2): its 8 methods split into 2 groups that share no fields or calls

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_hermes_adapter.py:117

    assertion block at lines 117-118 is duplicated in tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_hermes_adapter.py:134

    assertion block at lines 134-136 is duplicated in tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_hermes_adapter.py:131

    assertion block at lines 131-132 is duplicated in tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_hermes_adapter.py:170

    assertion block at lines 170-171 is duplicated in tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_hermes_adapter.py:155

    assertion block at lines 155-157 is duplicated in tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_hermes_adapter.py:97

    assertion block at lines 97-99 is duplicated in tests/unit/agent_runtimes/test_openclaw_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_hermes_adapter.py:213

    assertion block at lines 213-215 is duplicated in tests/unit/agent_runtimes/test_openclaw_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_hermes_adapter.py:202

    assertion block at lines 202-204 is duplicated in tests/unit/agent_runtimes/test_openclaw_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_openclaw_adapter.py:173

    assertion block at lines 173-174 is duplicated in tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_openclaw_adapter.py:132

    assertion block at lines 132-135 is duplicated in tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_openclaw_adapter.py:154

    assertion block at lines 154-155 is duplicated in tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_openclaw_adapter.py:199

    assertion block at lines 199-200 is duplicated in tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_openclaw_adapter.py:188

    assertion block at lines 188-190 is duplicated in tests/unit/agent_runtimes/test_hermes_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_openclaw_adapter.py:90

    assertion block at lines 90-91 is duplicated in tests/unit/agent_runtimes/test_openclaw_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_openclaw_adapter.py:104

    assertion block at lines 104-105 is duplicated in tests/unit/agent_runtimes/test_openclaw_adapter.py

  • mediumduplicated assertion block
    tests/unit/agent_runtimes/test_openclaw_adapter.py:118

    assertion block at lines 118-119 is duplicated in tests/unit/agent_runtimes/test_openclaw_adapter.py

  • lowlarge method
    backend/agent_runtimes/hermes_adapter.py:140

    invoke is 69 lines long

  • lowlarge method
    backend/agent_runtimes/openclaw_adapter.py:192

    invoke is 82 lines long

  • lowerror handling
    backend/agent_runtimes/hermes_adapter.py:180

    caught exception is swallowed without any handling

  • lowerror handling
    backend/agent_runtimes/openclaw_adapter.py:232

    caught exception is swallowed without any handling

  • lowdry violation
    frontend/app/(app)/control/page.tsx:265

    11% of file duplicated; worst clone shares 11 lines with frontend/app/(app)/control/page.tsx

  • lowbumpy road
    backend/agent_runtimes/openclaw_adapter.py:63

    _extract_reply_text has 3 nested blocks at the same level (bumpy road)

Resolved (3)
  • complex method
    backend/agent_runtimes/pi_adapter.py
  • bumpy road
    backend/agent_runtimes/pi_adapter.py
  • io in loop
    backend/workflow/trigger_scope.py

Who else knows this code

The primary author of each changed file by share of its recent commits, mined from git history. Advisory: it says who has context, not who must review.

  • frontend/app/(app)/operations-agents/page.tsx2233admin 100% of 2 commits
  • frontend/scripts/check-control-plane-regressions.mjs2233admin 100% of 6 commits
  • backend/agent_runtimes/base.pyCurry 96% of 4 commits
  • backend/workflow/trigger_scope.py2233admin 100% of 1 commits
  • frontend/lib/api/hooks.ts2233admin 62% of 15 commits

Tests that cover this change

Test files that import a file this PR changes. Not a coverage measurement: it is the import graph, so it says which tests are worth running, not which lines they reach.

  • tests/unit/agent_runtimes/test_base.py
  • tests/unit/agent_runtimes/test_bbx_adapter.py
  • tests/unit/agent_runtimes/test_miniflow_adapter.py
  • tests/integration/test_trigger_scoped_workflow_execution.py
  • tests/unit/agent_runtimes/test_opentabs_adapter.py
  • tests/unit/agent_runtimes/test_pi_adapter.py

6 changed files have no test importing them.

Get this on your own pull requests

This page came from an index of 2233admin/opencli-Razormind. No model calls, no configuration, and it refreshes on every push. Install the bot and every pull request gets one of these.