Skip to content

Add optional native Feishu/Lark messaging - #81

Closed
kangclzjc wants to merge 2 commits into
NVIDIA:mainfrom
kangclzjc:feat/feishu-messaging
Closed

kangclzjc wants to merge 2 commits into
NVIDIA:mainfrom
kangclzjc:feat/feishu-messaging

Conversation

@kangclzjc

Copy link
Copy Markdown

Description

Add optional Feishu/Lark messaging through OpenClaw's official @openclaw/feishu channel plugin, pinned to 2026.6.10 to match the chart runtime. The gateway opens an outbound persistent connection to the Feishu Open Platform, so no ingress or public endpoint is required. Bot credentials come from an existing Kubernetes Secret.

Access control

  • Direct messages are limited to openclaw.feishu.allowedUserIds. Group messages need three things: the chat is listed in groupChatIds, the sender is allowlisted, and the message @mentions the bot. Wildcard user entries are rejected.
  • Every Feishu run is View. An automation-guard hook enforces this per run, so it holds even if someone changes the conversation's stored mode from the web UI. Feishu has no identity-verified approval path.
  • The plugin's document, wiki, drive, Bitable, chat, permission, and scope tools are disabled. Its bundled skills are already excluded by agents.defaults.skills.

Plugin integrity

  • The init container installs the plugin by npm spec, which keeps OpenClaw's trusted-official status. The plugin needs that status for its persistent message de-duplication store; a path or tarball install loses it.
  • The pod does not start unless the integrity that npm verified matches openclaw.feishu.pluginIntegrity.

Sender names

  • Name lookups need contact:contact.base:readonly, and the sender must be inside the app's contact data range. contact:user.base:readonly alone is rejected by the user API.
  • openclaw.feishu.resolveSenderNames can turn lookups off where that scope cannot be granted.

Scheduled delivery

Documentation

  • Feishu app setup, including scopes and the persistent-connection event subscription.
  • Egress hosts: open.feishu.cn, msg-frontier.feishu.cn, registry.npmjs.org, and the Lark equivalents.
  • Secret rotation and plugin version updates.
  • A log-based troubleshooting table, since the Feishu connection does not affect gateway readiness.

Relation to #74

#74 targets the same feature. This PR is rebased on current main. It adds the per-run View enforcement, the integrity pin with trusted install, the corrected contact scope, scheduled delivery, and live-tenant validation. I'm happy to consolidate with #74 in whichever direction the maintainers prefer.

Out of scope

  • Feishu Edit approvals. The Feishu plugin has no native approval client or interactive-handler dispatch.
  • A per-channel queue mode. OpenClaw 2026.6.10 rejects plugin channels under messages.queue.byChannel, and the gateway fails with Invalid config. Feishu therefore uses the default queue mode.

Validation

  • Full repository suite: 225 tests, 223 passed, 2 existing conditional skips, 0 failed.
  • helm lint, documentation bundle freshness, and git diff --check pass.
  • I used the same chart dependency setup as CI: the published OpenShell chart and an IRAOP test stub.
  • Replayed the rendered openclaw pod in Docker:
    • Every init container ran, and the gateway loaded the plugin as a trusted install.
    • A wrong integrity value stopped the init container.
    • An upgrade from an earlier path-installed plugin left no duplicate.
    • Readiness stayed healthy with invalid credentials.
  • Ran end to end on a single-node kubeadm cluster with a real Feishu tenant:
    • An allowlisted DM got a streamed card reply.
    • A non-allowlisted sender was rejected before agent dispatch.
    • The agent saw the resolved sender name.
    • A manual run of a scheduled job was delivered to a Feishu DM.

Checklist

🤖 Generated with Claude Code

kangclzjc and others added 2 commits October 30, 2026 11:50
Install OpenClaw's Feishu channel plugin, pinned to the chart's OpenClaw
release, and connect through the plugin's outbound persistent connection
so no ingress is required. Install it by npm spec, which OpenClaw trusts
as the official package, and stop the pod unless the integrity that npm
verified matches the pinned value.

Allowlisted users can message the bot directly or mention it in listed
group chats. Feishu runs always stay in View, and the plugin's document,
wiki, drive, Bitable, chat, and permission tools are disabled. Sender
names need the contact:contact.base:readonly scope and can be turned
off. Document setup, egress, and log-based troubleshooting, since the
Feishu connection does not affect gateway readiness.

Signed-off-by: Kang Zhang <kangz@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Make the OpenClaw scheduler an explicit opt-in through
openclaw.cron.enabled, matching the Teams follow-up, so isolated jobs
can announce their results to a Feishu user or group. Document job
creation and the admin scope the gateway CLI must be granted after
each pod start. Verified against a live tenant: a manual run of a
daily read-only check was delivered to a Feishu direct message.

Signed-off-by: Kang Zhang <kangz@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant