mirror of
https://github.com/hanzoai/bot.git
synced 2026-11-23 17:19:21 +00:00
- Rename lobster extension → flow (dir, types, env vars, docs) - LOBSTER_* env vars → BOT_FLOW_* / BOT_* - 🦞 → 🤖 everywhere (src, docs, skills, zh-CN) - docs.bot.ai → docs.hanzo.bot - github.com/bot/bot → github.com/hanzoai/bot - @bot/* → @hanzo/bot-* (npm scope) - ~/.bot/ → ~/.hanzo/bot/ (config paths) - discord.gg/hanzo → discord.gg/XthHQQj (real Hanzo Discord) - clawhub.com → skills.hanzo.bot - ClawDock → BotDock in shell helpers - EXFOLIATE lore → Hanzo Bot branding in all locales - LOBSTER_PALETTE → BOT_PALETTE, LOBSTER_ASCII → BOT_ASCII
1.4 KiB
1.4 KiB
summary, read_when, title
| summary | read_when | title | ||
|---|---|---|---|---|
| Retry policy for outbound provider calls |
|
Retry Policy |
Retry policy
Goals
- Retry per HTTP request, not per multi-step flow.
- Preserve ordering by retrying only the current step.
- Avoid duplicating non-idempotent operations.
Defaults
- Attempts: 3
- Max delay cap: 30000 ms
- Jitter: 0.1 (10 percent)
- Provider defaults:
- Telegram min delay: 400 ms
- Discord min delay: 500 ms
Behavior
Discord
- Retries only on rate-limit errors (HTTP 429).
- Uses Discord
retry_afterwhen available, otherwise exponential backoff.
Telegram
- Retries on transient errors (429, timeout, connect/reset/closed, temporarily unavailable).
- Uses
retry_afterwhen available, otherwise exponential backoff. - Markdown parse errors are not retried; they fall back to plain text.
Configuration
Set retry policy per provider in ~/.hanzo/bot/bot.json:
{
channels: {
telegram: {
retry: {
attempts: 3,
minDelayMs: 400,
maxDelayMs: 30000,
jitter: 0.1,
},
},
discord: {
retry: {
attempts: 3,
minDelayMs: 500,
maxDelayMs: 30000,
jitter: 0.1,
},
},
},
}
Notes
- Retries apply per request (message send, media upload, reaction, poll, sticker).
- Composite flows do not retry completed steps.