← Back to Pull requests

dingtalk: DingTalk platform, formerly built into Hermes core #108

Open
unknown opened this pull request with 527 lines diff across 6 files
View on GitHub
unknown unknown commented on Nov 24, 2026 12:04 UTC
Author

What this does, in plain words

DingTalk (钉钉, Alibaba's workplace chat) stops being built into Hermes core and becomes the dingtalk plugin here: built by Nous Research, not supported, and likely not maintained going forward; community fixes are welcome. Existing DingTalk users get it installed automatically; nobody else does.

The slate (merge order)

1. NousResearch/hermes-agent#159638: core removal + the LEFT_CORE migration row.
2. This PR: the plugin.
3. NousResearch/hermes-agent#159639: data-only catalog entry plugin-catalog/dingtalk.yaml (hold, re-pinned to this PR's merge sha).

What changes

  • Existing user: nothing to do. hermes update (or the next agent/gateway start) sees the profile ran DingTalk and installs this plugin once. Same platform name dingtalk, same DINGTALK_ env vars, same platforms.dingtalk keys (client_id, client_secret, robot_code, card_template_id, webhook_url, require_mention, mention_patterns, free_response_chats, allowed_chats, allowed_users), same DINGTALK_HOME_CHANNEL, same QR setup in hermes gateway setup.

  • New user: hermes plugins install dingtalk.
  • Contents

  • Import with history (e3d9d12): git filter-repo of hermes-agent main for plugins/platforms/dingtalk/, its pre-plugin home gateway/platforms/dingtalk.py, hermes_cli/dingtalk_auth.py (the QR device-flow login, now the plugin's own setup step) and the three DingTalk test files: 109 commits, authors kept.

  • One packaging commit (c0b9fff):

  • - plugin.yaml name: dingtalk (core's was dingtalk-platform; core keeps that name as a plugins.disabled alias), homepage, the full DINGTALK_
    env list; pyproject.toml with the pins core's dingtalk extra carried (dingtalk-stream==0.24.3, alibabacloud-dingtalk==2.2.65, qrcode==7.4.2) plus websockets>=15.0.1,<16.
    - register.py: register() is inert on a core that still bundles DingTalk; PlatformEntry fields newer than the running core are passed only when it has them.
    - Platform("dingtalk") resolved at call time (no Platform.DINGTALK); core's EnvCred row becomes env_enablement() for env_enablement_fn (same seed: client id/secret + home channel).
    - Core's platform.dingtalk.emotion.thinking/done strings move to a local _i18n.py for all 17 languages core shipped.
    - Core's dingtalk PM extra is gone, so the lazy installers no longer call pm; the SDKs come with the plugin's own deps.
    - Private core imports replaced with the published plugin API (gateway_setup_wizard.confirm_reconfigure, cli_output printers, a local access_token redaction instead of gateway.outbound.send._error).
    - Tests: conftest modelled on yuanbao/tests/conftest.py; the DingTalk cases core's removal deleted from shared core test files are ported in tests/test_ported_core_contracts.py; tests/test_plugin_packaging.py pins the registration contract.
    - Card art assets/dingtalk.jpg (1200x600), README + root README row.

    Verification

    | Check | Result |
    |---|---|
    | Plugin suite vs a core tree with DingTalk removed (core PR head), SDKs installed | 68 passed |
    | Same, SDKs absent | 66 passed, 2 skipped (real qrcode / dingtalk_stream) |
    | hermes plugins validate dingtalk vs core PR head | Validation passed (security scan safe, no core override); warns on 2 private imports, the same two Yuanbao has (gateway.platforms.send_targets, the plugins.platforms inert probe) |
    | scan_plugin vs core PR head and vs v0.23.4 export | safe / safe |
    | ruff (core config) | clean |

    Live migration probe (real gateway run --force, fake HOME/HERMES_HOME/XDG/lock dir, own PIDs, DINGTALK_OPENAPI_ENDPOINT at a closed loopback port): see the core PR; the first start installs this plugin at c0b9fff and this plugin's adapter (hermes_plugins.dingtalk.adapter) connects in the same start.

    Not covered

  • DingTalk's real backend: every connect goes to a closed loopback port.

  • plugins validate on core main is expected to fail while core still bundles DingTalk (platform dingtalk registered twice is avoided by the inert guard, but CI here runs against core main): green once the core PR lands.
  • Diff: 527 lines (+395 / -132) across 6 files Reviewer: unsupportedpastels Review duration: 510m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.48) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 527 lines diff across 6 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.375
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #108"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.8% (MEDIUM) · Higher = larger blast radius
    47.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 25.5% · Safe to merge
    25.5%