mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
* feat(extensions): add load-time validation for auth capabilities Catch common misconfigurations (missing auth section, missing setup_url, short prompts) at startup via tracing::warn instead of silently failing at auth time. * feat(extensions): improve auth prompts, setup_url, and showAuthCard Add setup_url and descriptive prompts to channel and tool capabilities files. Fix showAuthCard in web gateway and improve extension manager auth flow messaging. * refactor(extensions): extract MIN_PROMPT_LENGTH constant in validate() Address review feedback: replace magic number 30 with a named constant for readability and maintainability. [skip-regression-check] Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
60 lines
1.5 KiB
JSON
60 lines
1.5 KiB
JSON
{
|
|
"type": "channel",
|
|
"name": "telegram",
|
|
"description": "Telegram Bot API channel for receiving and responding to Telegram messages",
|
|
"setup": {
|
|
"required_secrets": [
|
|
{
|
|
"name": "telegram_bot_token",
|
|
"prompt": "Enter your Telegram Bot API token (from @BotFather)",
|
|
"optional": false
|
|
}
|
|
],
|
|
"setup_url": "https://t.me/BotFather"
|
|
},
|
|
"capabilities": {
|
|
"http": {
|
|
"allowlist": [
|
|
{ "host": "api.telegram.org", "path_prefix": "/bot" }
|
|
],
|
|
"credentials": {
|
|
"telegram_bot": {
|
|
"secret_name": "telegram_bot_token",
|
|
"location": { "type": "url_path", "placeholder": "{TELEGRAM_BOT_TOKEN}" },
|
|
"host_patterns": ["api.telegram.org"]
|
|
}
|
|
},
|
|
"rate_limit": {
|
|
"requests_per_minute": 30,
|
|
"requests_per_hour": 1000
|
|
}
|
|
},
|
|
"secrets": {
|
|
"allowed_names": ["telegram_*"]
|
|
},
|
|
"channel": {
|
|
"allowed_paths": ["/webhook/telegram"],
|
|
"allow_polling": true,
|
|
"min_poll_interval_ms": 30000,
|
|
"workspace_prefix": "channels/telegram/",
|
|
"emit_rate_limit": {
|
|
"messages_per_minute": 100,
|
|
"messages_per_hour": 5000
|
|
},
|
|
"webhook": {
|
|
"secret_header": "X-Telegram-Bot-Api-Secret-Token",
|
|
"secret_name": "telegram_webhook_secret"
|
|
}
|
|
}
|
|
},
|
|
"config": {
|
|
"bot_username": null,
|
|
"owner_id": null,
|
|
"respond_to_all_group_messages": false,
|
|
"polling_enabled": false,
|
|
"poll_interval_ms": 30000,
|
|
"dm_policy": "pairing",
|
|
"allow_from": []
|
|
}
|
|
}
|