Skip to content

Add optional Feishu and Lark messaging - #74

Open
JeffPengCoder wants to merge 3 commits into
NVIDIA:mainfrom
JeffPengCoder:feat/feishu-channel
Open

JeffPengCoder wants to merge 3 commits into
NVIDIA:mainfrom
JeffPengCoder:feat/feishu-channel

Conversation

@JeffPengCoder

@JeffPengCoder JeffPengCoder commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Add optional Feishu/Lark messaging through OpenClaw's official Feishu plugin, pinned to 2026.6.10 to match the chart runtime. Operators can use bot DMs or mentions in explicitly allowed groups over an outbound WebSocket connection, without exposing a callback endpoint.

Bot credentials come from an existing Kubernetes Secret. Require explicit user IDs, restrict group IDs and senders, isolate group conversations by sender, and preserve Slack when both channels are enabled. Disable Feishu workplace/document tools so enabling messaging does not add a second tool surface. Document platform setup and delivery/access-control acceptance checks, and refresh the bundled agent documentation. New conversations follow the existing View policy; the existing Edit approval behavior is unchanged.

The initialization follow-up supplies all enabled Feishu/Slack credential references to every init container that invokes the OpenClaw CLI: Feishu, Slack, Brave web search, and OpenShell installers when present, as well as the gateway. These commands read the shared openclaw.json. Previously, the OpenShell initializer had neither FEISHU_APP_ID nor FEISHU_APP_SECRET despite those variables being referenced in the enabled channel config. Use a shared Helm helper so the gateway and installers resolve the same Secret names/keys, including when Slack and Feishu are enabled together. Credentials remain Kubernetes secretKeyRef entries, with no credential values copied into the seed ConfigMap.

Merge upstream main and retain both Feishu validation and the newer upstream Redfish validation; regenerate the documentation bundle from the combined Markdown. The generic default-agent display-name option is submitted independently in PR #87.

Validation

Current source branch after merging upstream main:

  • node --test utils/*.test.mjs helm/mosaic-stack/tests/*.test.mjs tests/docs/*.test.mjs: 230 passed, 0 failed, 2 optional integration tests skipped (OpenClaw runtime memory and live VictoriaMetrics).
  • node --test helm/afoa-inference/tests/*.test.mjs: 4 passed.
  • helm lint helm/mosaic-stack and helm lint helm/afoa-inference: passed.
  • python3 docs/package_agent_docs.py --check: passed.
  • sphinx-build -W --keep-going -q -b html -c docs . docs/_build/html: passed with no warnings.
  • Source-policy tests and git diff --check: passed.
  • Used the same chart dependency setup as CI: published OpenShell chart and an IRAOP test stub, for local rendering/testing only.

The new semantic regression test first reproduced the missing Feishu environment references in init-openshell-plugin. It now parses the rendered YAML and compares every OpenClaw CLI container's channel environment entries against the variables referenced by the complete rendered channel config. Covers channels disabled, Feishu only, Slack only, both together, and both with Brave and custom Secret names/key names. Separately compared the complete default OpenClaw JSON and Pod specification with upstream main; both are identical when channels are disabled.

Live Spark acceptance on 2026-11-01 used a deployed chart backport and the real Feishu application, with OpenClaw/Feishu 2026.6.10:

  • Plugin installation and gateway startup completed; one explicit user and one explicit group were configured, with group mentions required.
  • The real user's group @mention was received by OpenClaw, routed into its existing default agent, and answered by the configured model through the application bot. The user confirmed receipt.
  • Proactive native-channel send succeeded. A complete existing alert/investigation report was subsequently delivered through the native channel and confirmed in the group. This was a delivery replay; it did not create a new fault or add unattended alert/report orchestration.
  • Full operator procedure and recorded evidence: Feishu Webhook/native handoff.

Bot DMs, negative user/group/mention cases, and a dedicated post-restart real-message check remain operator acceptance steps in the guide. Slack/Brave coexistence is covered by source rendering regression tests; this update does not claim a live Slack/Brave messaging test. The source update itself was validated locally and was not redeployed over the working Spark installation.

Checklist

  • I am familiar with the Contributing Guidelines.
  • Every new commit is signed off under the Developer Certificate of Origin.
  • New or existing validation covers these changes.
  • Documentation is up to date with these changes.

Additional real channel acceptance — 2026-11-02

This dated update supersedes the earlier pending DM/rebuild items. Full commands, all policy replay rows, original replies and failures are preserved in the companion documentation PR #1, especially docs/spark_background_gpu_alert_native_feishu_20261102.zh-CN.md and the dual-mode Feishu runbook section 17.

  • Real allowlisted DM passed, with native direct-session history and platform readback.
  • Explicitly recreated the gateway Pod: old UID da7cec2b-b7f7-4c1c-b733-dd3f1a209bca to new UID 02fad834-25b3-4e87-bfa5-dad4f58876c5. App Secret fingerprints, display identity and allowlists were preserved. Real DM and group mention both received model-generated replies afterward (feishu-extra-20261102-restart-dm, feishu-extra-20261102-restart-group).
  • User confirmed sending the unmentioned group test; no corresponding agent session was observed. Ordinary group-message readback returned 230027 because the app lacks that read scope. We did not broaden permissions or claim that the missing event proves local plugin rejection.
  • Nine offline cases ran through the installed official plugin's actual exported policy functions: allowlisted DM/group/sender dispatch, synthetic unlisted DM/group/sender reject, disabled DM reject, and allowlisted unmentioned sender skip. Every gate/reason/result is retained. No second real account was available; real unallowlisted-identity/group acceptance remains outstanding.
  • A separate persistent background investigation worker is proposed in upstream #89; it is not implicitly installed by this channel PR. Its new GPU-cache simulation run automatically collected actual logs, called IRAOP, generated an uncorrected complete report and delivered 11,966 bytes through this native channel. Platform readback succeeded and the recipient confirmed the complete matching Run ID bg-gpu-20261102t005029z / incident 2803c2516df6ec7c3eed3f2f. Restarting the completed worker while the same alert remained firing produced no new investigation or send.

This update adds validation evidence, not further source changes to #74.

Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>

This branch has not been deployed

No deployments
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