mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
* feat(gateway): add LINE Messaging API platform plugin
Adds LINE as a bundled platform plugin under `plugins/platforms/line/`,
synthesized from the strongest pieces of seven open community PRs. The
adapter requires zero core edits — `Platform("line")` is auto-discovered
via the bundled-plugin scan in `gateway/config.py`, and all hooks
(setup, env-enablement, cron delivery, standalone send) are wired
through `register_platform()` kwargs the way IRC and Teams do it.
Highlights merged into one plugin:
- **Reply token preferred, Push fallback.** Try the free reply token
first (single-use, ~60s TTL); fall back to metered Push when the
token is absent, expired, or rejected. (PR #21023)
- **Slow-LLM Template Buttons postback.** When the LLM is still running
past `LINE_SLOW_RESPONSE_THRESHOLD` (default 45s), the adapter burns
the original reply token to send a "Get answer" button bubble. The
user taps it to fetch the cached answer via a fresh reply token —
also free. State machine: PENDING → READY → DELIVERED, ERROR for
cancelled runs (orphan resolves to `LINE_INTERRUPTED_TEXT` after
/stop). Set threshold to 0 to disable. (PR #18153)
- **Three-allowlist gating** — separate user / group / room allowlists
with `LINE_ALLOW_ALL_USERS=true` dev-only escape hatch. (PR #18153)
- **Markdown URL preservation.** Strip bold/italic/code-fence/heading
markers (LINE renders them literally) but keep `[label](url)` →
`label (url)` so URLs stay tappable. (PR #18153)
- **System-message bypass** for `⚡ Interrupting`, `⏳ Queued`, etc. —
busy-acks reach the user as visible bubbles instead of being
swallowed into the postback cache. (PR #18153)
- **Media via public HTTPS URLs.** LINE doesn't accept binary uploads;
images/audio/video must be HTTPS-reachable. The adapter serves
registered tempfiles under `/line/media/<token>/<filename>` from the
same aiohttp app. Allowed-roots traversal guard covers
`tempfile.gettempdir()`, `/tmp` (→ `/private/tmp` on macOS), and
`HERMES_HOME`. `LINE_PUBLIC_URL` overrides URL construction for
setups behind tunnels/proxies. (PR #8398)
- **5-message-per-call batching.** LINE rejects >5 messages per
Reply/Push; smart-chunker caps text at 4500 chars per bubble.
- **Inbound dedup** via `webhookEventId` LRU. (PR #21023)
- **Self-message filter** via `/v2/bot/info` userId lookup. (PR #21023)
- **Loading-animation indicator** wired to LINE's `chat/loading/start`
endpoint, DM-only (LINE rejects it for groups/rooms). (PR #21023)
- **Out-of-process cron delivery** via `_standalone_send`, so
`deliver: line` cron jobs work even when cron runs detached from
the gateway.
- **Webhook hardening** — 1 MiB body cap, constant-time HMAC-SHA256
signature verification, dedup, scoped lock so two profiles can't
bind the same channel.
Validation
----------
- `scripts/run_tests.sh tests/gateway/test_line_plugin.py` →
73 passed in 1.05s
- `scripts/run_tests.sh tests/gateway/test_line_plugin.py
tests/gateway/test_irc_adapter.py
tests/gateway/test_plugin_platform_interface.py
tests/gateway/test_platform_registry.py
tests/gateway/test_config.py` → 193 passed, 7 skipped
- E2E import + register + signature roundtrip + `Platform("line")`
bundled-plugin discovery verified against current `origin/main`.
Closes the seven open LINE PRs (#18153, #16832, #6676, #21023, #14942,
#14988, #8398) by superseding them with a single plugin-form
implementation that takes the best idea from each.
Co-authored-by: pwlee <32443648+leepoweii@users.noreply.github.com>
Co-authored-by: Jetha Chan <jetha@google.com>
Co-authored-by: Cattia <openclaw@liyangchen.me>
Co-authored-by: perng <charles@perng.com>
Co-authored-by: Soichiro Yoshimura <soichiro0111.dev@gmail.com>
Co-authored-by: David Zhou <77736378+David-0x221Eight@users.noreply.github.com>
Co-authored-by: Yu-ga <74749461+yuga-hashimoto@users.noreply.github.com>
* docs(platforms): document platform-specific slow-LLM UX pattern
Add a 'Platform-Specific Slow-LLM UX' section to the platform-adapter
developer guide covering the _keep_typing override pattern that LINE
uses for its Template Buttons postback flow.
Three subsections:
- Pattern: subclass _keep_typing to layer mid-flight UX (with code)
- Pattern: subclass send to route through a cache instead of sending
- When this pattern is appropriate (vs. always-Push fallback)
Plus a short pointer in gateway/platforms/ADDING_A_PLATFORM.md so
tree-readers find the prose walkthrough on the docsite.
Filed because the LINE plugin (PR #23197) was the first bundled
adapter to need this pattern — every prior plugin (irc, teams,
google_chat) handles slow responses with the default typing-loop and
a regular send_text. Documenting now while the rationale is fresh.
---------
Co-authored-by: pwlee <32443648+leepoweii@users.noreply.github.com>
Co-authored-by: Jetha Chan <jetha@google.com>
Co-authored-by: Cattia <openclaw@liyangchen.me>
Co-authored-by: perng <charles@perng.com>
Co-authored-by: Soichiro Yoshimura <soichiro0111.dev@gmail.com>
Co-authored-by: David Zhou <77736378+David-0x221Eight@users.noreply.github.com>
Co-authored-by: Yu-ga <74749461+yuga-hashimoto@users.noreply.github.com>
261 lines
7.8 KiB
TypeScript
261 lines
7.8 KiB
TypeScript
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
|
|
|
|
const sidebars: SidebarsConfig = {
|
|
docs: [
|
|
'user-stories',
|
|
{
|
|
type: 'category',
|
|
label: 'Getting Started',
|
|
collapsed: true,
|
|
items: [
|
|
'getting-started/quickstart',
|
|
'getting-started/installation',
|
|
'getting-started/termux',
|
|
'getting-started/nix-setup',
|
|
'getting-started/updating',
|
|
'getting-started/learning-path',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Using Hermes',
|
|
collapsed: true,
|
|
items: [
|
|
'user-guide/cli',
|
|
'user-guide/tui',
|
|
'user-guide/windows-native',
|
|
'user-guide/windows-wsl-quickstart',
|
|
'user-guide/configuration',
|
|
'user-guide/configuring-models',
|
|
'user-guide/sessions',
|
|
'user-guide/profiles',
|
|
'user-guide/profile-distributions',
|
|
'user-guide/git-worktrees',
|
|
'user-guide/docker',
|
|
'user-guide/security',
|
|
'user-guide/checkpoints-and-rollback',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Features',
|
|
collapsed: true,
|
|
items: [
|
|
'user-guide/features/overview',
|
|
'user-guide/features/tool-gateway',
|
|
{
|
|
type: 'category',
|
|
label: 'Core',
|
|
items: [
|
|
'user-guide/features/tools',
|
|
'user-guide/features/skills',
|
|
'user-guide/features/curator',
|
|
'user-guide/features/memory',
|
|
'user-guide/features/memory-providers',
|
|
'user-guide/features/context-files',
|
|
'user-guide/features/context-references',
|
|
'user-guide/features/personality',
|
|
'user-guide/features/skins',
|
|
'user-guide/features/plugins',
|
|
'user-guide/features/built-in-plugins',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Automation',
|
|
items: [
|
|
'user-guide/features/cron',
|
|
'user-guide/features/delegation',
|
|
'user-guide/features/kanban',
|
|
'user-guide/features/kanban-tutorial',
|
|
'user-guide/features/goals',
|
|
'user-guide/features/code-execution',
|
|
'user-guide/features/hooks',
|
|
'user-guide/features/batch-processing',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Media & Web',
|
|
items: [
|
|
'user-guide/features/voice-mode',
|
|
'user-guide/features/web-search',
|
|
'user-guide/features/browser',
|
|
'user-guide/features/computer-use',
|
|
'user-guide/features/vision',
|
|
'user-guide/features/image-generation',
|
|
'user-guide/features/tts',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Management',
|
|
items: [
|
|
'user-guide/features/web-dashboard',
|
|
'user-guide/features/extending-the-dashboard',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Advanced',
|
|
items: [
|
|
'user-guide/features/rl-training',
|
|
'user-guide/features/spotify',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Skills',
|
|
collapsed: true,
|
|
items: [
|
|
'reference/skills-catalog',
|
|
'reference/optional-skills-catalog',
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Messaging Platforms',
|
|
collapsed: true,
|
|
items: [
|
|
'user-guide/messaging/index',
|
|
'user-guide/messaging/telegram',
|
|
'user-guide/messaging/discord',
|
|
'user-guide/messaging/slack',
|
|
'user-guide/messaging/whatsapp',
|
|
'user-guide/messaging/signal',
|
|
'user-guide/messaging/email',
|
|
'user-guide/messaging/sms',
|
|
'user-guide/messaging/homeassistant',
|
|
'user-guide/messaging/mattermost',
|
|
'user-guide/messaging/matrix',
|
|
'user-guide/messaging/dingtalk',
|
|
'user-guide/messaging/feishu',
|
|
'user-guide/messaging/wecom',
|
|
'user-guide/messaging/wecom-callback',
|
|
'user-guide/messaging/weixin',
|
|
'user-guide/messaging/bluebubbles',
|
|
'user-guide/messaging/qqbot',
|
|
'user-guide/messaging/yuanbao',
|
|
'user-guide/messaging/teams',
|
|
'user-guide/messaging/teams-meetings',
|
|
'user-guide/messaging/msgraph-webhook',
|
|
'user-guide/messaging/line',
|
|
'user-guide/messaging/open-webui',
|
|
'user-guide/messaging/webhooks',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Integrations',
|
|
collapsed: true,
|
|
items: [
|
|
'integrations/index',
|
|
'integrations/providers',
|
|
'user-guide/features/mcp',
|
|
'user-guide/features/acp',
|
|
'user-guide/features/api-server',
|
|
'user-guide/features/honcho',
|
|
'user-guide/features/provider-routing',
|
|
'user-guide/features/fallback-providers',
|
|
'user-guide/features/credential-pools',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Guides & Tutorials',
|
|
collapsed: true,
|
|
items: [
|
|
'guides/tips',
|
|
'guides/local-llm-on-mac',
|
|
'guides/daily-briefing-bot',
|
|
'guides/team-telegram-assistant',
|
|
'guides/python-library',
|
|
'guides/use-mcp-with-hermes',
|
|
'guides/use-soul-with-hermes',
|
|
'guides/use-voice-mode-with-hermes',
|
|
'guides/build-a-hermes-plugin',
|
|
'guides/automate-with-cron',
|
|
'guides/cron-script-only',
|
|
'guides/automation-templates',
|
|
'guides/cron-troubleshooting',
|
|
'guides/work-with-skills',
|
|
'guides/delegation-patterns',
|
|
'guides/github-pr-review-agent',
|
|
'guides/webhook-github-pr-review',
|
|
'guides/migrate-from-openclaw',
|
|
'guides/aws-bedrock',
|
|
'guides/azure-foundry',
|
|
'guides/microsoft-graph-app-registration',
|
|
'guides/operate-teams-meeting-pipeline',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Developer Guide',
|
|
collapsed: true,
|
|
items: [
|
|
'developer-guide/contributing',
|
|
{
|
|
type: 'category',
|
|
label: 'Architecture',
|
|
items: [
|
|
'developer-guide/architecture',
|
|
'developer-guide/agent-loop',
|
|
'developer-guide/prompt-assembly',
|
|
'developer-guide/context-compression-and-caching',
|
|
'developer-guide/gateway-internals',
|
|
'developer-guide/session-storage',
|
|
'developer-guide/provider-runtime',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Extending',
|
|
items: [
|
|
'developer-guide/adding-tools',
|
|
'developer-guide/adding-providers',
|
|
'developer-guide/adding-platform-adapters',
|
|
'developer-guide/memory-provider-plugin',
|
|
'developer-guide/context-engine-plugin',
|
|
'developer-guide/model-provider-plugin',
|
|
'developer-guide/image-gen-provider-plugin',
|
|
'developer-guide/creating-skills',
|
|
'developer-guide/extending-the-cli',
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Internals',
|
|
items: [
|
|
'developer-guide/tools-runtime',
|
|
'developer-guide/acp-internals',
|
|
'developer-guide/cron-internals',
|
|
'developer-guide/environments',
|
|
'developer-guide/trajectory-format',
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
type: 'category',
|
|
label: 'Reference',
|
|
items: [
|
|
'reference/cli-commands',
|
|
'reference/slash-commands',
|
|
'reference/profile-commands',
|
|
'reference/environment-variables',
|
|
'reference/tools-reference',
|
|
'reference/toolsets-reference',
|
|
'reference/mcp-config-reference',
|
|
'reference/model-catalog',
|
|
'reference/skills-catalog',
|
|
'reference/optional-skills-catalog',
|
|
'reference/faq',
|
|
],
|
|
},
|
|
],
|
|
};
|
|
|
|
export default sidebars;
|