mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
docs: backfill coverage for recently-merged features (#11942)
Fills documentation gaps that accumulated as features merged ahead of their docs updates. All additions are verified against code and the originating PRs. Providers: - Ollama Cloud (#10782) — new provider section, env vars, quickstart/fallback rows - xAI Grok Responses API + TTS (#10783) — provider note, TTS table + config - Google Gemini CLI OAuth (#11270) — quickstart/fallback/cli-commands entries - NVIDIA NIM (#11774) — NVIDIA_API_KEY / NVIDIA_BASE_URL in env-vars reference - HERMES_INFERENCE_PROVIDER enum updated Messaging: - DISCORD_ALLOWED_ROLES (#11608) — env-vars, discord.md access control section - DingTalk QR device-flow (#11574) — wizard path in Option A + openClaw disclosure - Feishu document comment intelligent reply (#11898) — full section + 3-tier access control + CLI Skills / commands: - concept-diagrams skill (#11363) — optional-skills-catalog entry - /gquota (#11270) — slash-commands reference Build: docusaurus build passes, ascii-guard lint 0 errors.
This commit is contained in:
parent
45acd9beb5
commit
11a89cc032
11 changed files with 132 additions and 7 deletions
|
|
@ -244,6 +244,54 @@ Interactive cards require **three** configuration steps in the Feishu Developer
|
|||
Without all three steps, Feishu will successfully *send* interactive cards (sending only requires `im:message:send` permission), but clicking any button will return error 200340. The card appears to work — the error only surfaces when a user interacts with it.
|
||||
:::
|
||||
|
||||
## Document Comment Intelligent Reply
|
||||
|
||||
Beyond chat, the adapter can also answer `@`-mentions left on **Feishu/Lark documents**. When a user comments on a document (local text selection or whole-doc comment) and @-mentions the bot, Hermes reads the document plus the surrounding comment thread and posts an LLM reply inline on the thread.
|
||||
|
||||
Powered by the `drive.notice.comment_add_v1` event, the handler:
|
||||
|
||||
- Fetches the document content and comment timeline in parallel (20 messages for whole-doc threads, 12 for local-selection threads).
|
||||
- Runs the agent with the `feishu_doc` + `feishu_drive` toolsets scoped to that single comment session.
|
||||
- Chunks replies at 4000 chars and posts them back as threaded replies.
|
||||
- Caches per-document sessions for 1 hour with a 50-message cap so follow-up comments on the same doc keep context.
|
||||
|
||||
### 3-Tier Access Control
|
||||
|
||||
Document-comment replies are **explicit-grant only** — there is no implicit allow-all mode. Permissions resolve in this order (first match wins, per field):
|
||||
|
||||
1. **Exact doc** — rule scoped to a specific document token.
|
||||
2. **Wildcard** — rule that matches a pattern of docs.
|
||||
3. **Top-level** — default rule for the workspace.
|
||||
|
||||
Two policies are available per rule:
|
||||
|
||||
- **`allowlist`** — a static list of users / tenants.
|
||||
- **`pairing`** — static list ∪ runtime-approved store. Useful for rollouts where moderators can grant access live.
|
||||
|
||||
Rules live in `~/.hermes/feishu_comment_rules.json` (pairing grants in `~/.hermes/feishu_comment_pairing.json`) with mtime-cached hot-reload — edits take effect on the next comment event without restarting the gateway.
|
||||
|
||||
CLI:
|
||||
|
||||
```bash
|
||||
# Inspect current rules and pairing state
|
||||
python -m gateway.platforms.feishu_comment_rules status
|
||||
|
||||
# Simulate an access check for a specific doc + user
|
||||
python -m gateway.platforms.feishu_comment_rules check <fileType:fileToken> <user_open_id>
|
||||
|
||||
# Manage pairing grants at runtime
|
||||
python -m gateway.platforms.feishu_comment_rules pairing list
|
||||
python -m gateway.platforms.feishu_comment_rules pairing add <user_open_id>
|
||||
python -m gateway.platforms.feishu_comment_rules pairing remove <user_open_id>
|
||||
```
|
||||
|
||||
### Required Feishu App Configuration
|
||||
|
||||
On top of the chat/card permissions already granted, add the drive comment event:
|
||||
|
||||
- Subscribe to `drive.notice.comment_add_v1` in **Event Subscriptions**.
|
||||
- Grant the `docs:doc:readonly` and `drive:drive:readonly` scopes so the handler can read document content.
|
||||
|
||||
## Media Support
|
||||
|
||||
### Inbound (receiving)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue