feat(messaging): add WeChat (personal) channel for Hermes#3512
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
📝 WalkthroughWalkthroughThis PR adds WeChat (iLink) messaging adapter support to Hermes. It introduces configuration types for WeChat account metadata, extends the Docker build to manage TLS certificates and state directories, wires WeChat config into environment variable generation, establishes network policies for iLink API access, and updates tests and cleanup logic to handle the new messaging provider. ChangesWeChat Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
14ec41a to
ef3267b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@agents/hermes/config/messaging-config.ts`:
- Around line 87-94: The buildWechatEnvLines function currently treats
wechatConfig.accountId as optional but this code path only runs when WeChat is
enabled and WEIXIN_ACCOUNT_ID is required; update buildWechatEnvLines to fail
fast by checking wechatConfig.accountId and throwing a clear error (e.g.,
Error('Missing WEIXIN_ACCOUNT_ID: wechatConfig.accountId is required when WeChat
is enabled')) when it's falsy, rather than silently omitting the
WEIXIN_ACCOUNT_ID line; reference the function buildWechatEnvLines and the
wechatConfig.accountId/WEIXIN_ACCOUNT_ID symbols so the check is added at the
start of that function.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 975a48d9-19b5-4874-9136-bba639d87b38
📒 Files selected for processing (12)
agents/hermes/Dockerfileagents/hermes/Dockerfile.baseagents/hermes/config/build-env.tsagents/hermes/config/messaging-config.tsagents/hermes/generate-config.tsagents/hermes/manifest.yamlagents/hermes/policy-additions.yamlnemoclaw-blueprint/policies/presets/wechat.yamlsrc/lib/actions/sandbox/destroy.tssrc/lib/agent/defs.test.tstest/destroy-cleanup-sandbox-services.test.tstest/generate-hermes-config.test.ts
Wire the Hermes Python adapter into the existing WeChat iLink pipeline: share the wechat preset and provider slot OpenClaw uses, generate WEIXIN_* env vars from the same NEMOCLAW_WECHAT_* build args, persist weixin/accounts state across rebuilds, and clean up the wechat-bridge provider on destroy. Includes a non-interactive e2e covering policy shape, placeholder substitution, certifi CA trust, and teardown. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ef3267b to
f2f17e1
Compare
Summary
Adds Hermes support for the WeChat channel now that the OpenClaw WeChat path has landed. This wires Hermes’
WEIXIN_*adapter contract to NemoClaw’s existingWECHAT_BOT_TOKENOpenShell credential flow, adds Hermes iLink policy coverage, and preserves WeChat state acrossrebuilds without baking secrets into the sandbox image.
Related Issue
Feature #3006
Changes
WEIXIN_TOKEN,WEIXIN_ACCOUNT_ID,WEIXIN_BASE_URL, andWEIXIN_ALLOWED_USERSfrom NemoClaw channel state.WEIXIN_TOKENplaceholder to the existingWECHAT_BOT_TOKENcredential slot so OpenClaw and Hermes share the same OpenShell provider model.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Additional focused checks run:
npm run typecheck:clinode_modules/.bin/vitest --run test/generate-hermes-config.test.ts test/destroy-cleanup-sandbox-services.test.ts src/lib/agent/defs.test.ts test/e2e/scenario-framework-tests/e2e-convention-lint.test.ts test/e2e/scenario-framework-tests/e2e-parity-map.test.tsnode_modules/.bin/biome check agents/hermes/config/build-env.ts agents/hermes/config/messaging-config.ts agents/hermes/generate-config.ts src/lib/actions/sandbox/destroy.ts src/lib/agent/defs.test.ts test/destroy-cleanup-sandbox-services.test.ts test/generate-hermes- config.test.tsnode_modules/.bin/tsx scripts/e2e/lint-conventions.tsnode_modules/.bin/tsx scripts/e2e/extract-legacy-assertions.ts --checknode_modules/.bin/tsx scripts/e2e/check-parity-map.ts --strictSigned-off-by: San Dang sdang@nvidia.com
Two things to double-check before opening:
Summary by CodeRabbit
New Features