manifest.json 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. {
  2. "id": "telegram",
  3. "name": "Telegram Bot",
  4. "description": "Telegram Bot API integration with long polling via background worker. Messages are forwarded to the LLM and replies are sent back automatically.",
  5. "version": "3.2.0",
  6. "author": "Ferenc Szontagh & Zoë",
  7. "runtime": "quickjs",
  8. "sdkVersion": 1,
  9. "auto_start": true,
  10. "config": [
  11. {
  12. "key": "bot_token",
  13. "label": "Telegram Bot API token (from @BotFather)",
  14. "secret": true
  15. },
  16. {
  17. "key": "authorized_user_id",
  18. "label": "Authorized Telegram user ID (only this user can interact with the bot)",
  19. "secret": false
  20. },
  21. {
  22. "key": "polling_enabled",
  23. "label": "Enable long polling (recommended for private use, no public URL needed)",
  24. "secret": false,
  25. "default": "true"
  26. },
  27. {
  28. "key": "polling_interval",
  29. "label": "Polling interval in milliseconds (recommended: 2000-5000)",
  30. "secret": false,
  31. "default": "2000"
  32. },
  33. {
  34. "key": "polling_timeout",
  35. "label": "Long polling timeout in seconds (recommended: 25-30)",
  36. "secret": false,
  37. "default": "30"
  38. }
  39. ],
  40. "tools": [
  41. {
  42. "name": "send_message",
  43. "description": "Send a text message to a Telegram chat",
  44. "parameters": {
  45. "type": "object",
  46. "properties": {
  47. "chat_id": { "type": "string", "description": "Target chat ID or @username" },
  48. "text": { "type": "string", "description": "Message text (1-4096 characters)" },
  49. "parse_mode": { "type": "string", "description": "Text formatting mode", "enum": ["HTML", "Markdown", "MarkdownV2"] },
  50. "disable_notification": { "type": "boolean", "description": "Send silently" },
  51. "reply_to_message_id": { "type": "integer", "description": "Reply to message ID" }
  52. },
  53. "required": ["chat_id", "text"]
  54. }
  55. },
  56. {
  57. "name": "send_to_owner",
  58. "description": "Send a message to the authorized user (bot owner)",
  59. "parameters": {
  60. "type": "object",
  61. "properties": {
  62. "text": { "type": "string", "description": "Message text (1-4096 characters)" },
  63. "parse_mode": { "type": "string", "description": "Text formatting mode", "enum": ["HTML", "Markdown", "MarkdownV2"] }
  64. },
  65. "required": ["text"]
  66. }
  67. },
  68. {
  69. "name": "send_photo",
  70. "description": "Send a photo to a Telegram chat",
  71. "parameters": {
  72. "type": "object",
  73. "properties": {
  74. "chat_id": { "type": "string", "description": "Target chat ID" },
  75. "photo": { "type": "string", "description": "Photo URL or file_id" },
  76. "caption": { "type": "string", "description": "Photo caption" },
  77. "parse_mode": { "type": "string", "description": "Caption formatting mode", "enum": ["HTML", "Markdown", "MarkdownV2"] }
  78. },
  79. "required": ["chat_id", "photo"]
  80. }
  81. },
  82. {
  83. "name": "send_document",
  84. "description": "Send a document/file to a Telegram chat",
  85. "parameters": {
  86. "type": "object",
  87. "properties": {
  88. "chat_id": { "type": "string", "description": "Target chat ID" },
  89. "document": { "type": "string", "description": "Document URL or file_id" },
  90. "caption": { "type": "string", "description": "Document caption" },
  91. "parse_mode": { "type": "string", "description": "Caption formatting mode", "enum": ["HTML", "Markdown", "MarkdownV2"] }
  92. },
  93. "required": ["chat_id", "document"]
  94. }
  95. },
  96. {
  97. "name": "forward_message",
  98. "description": "Forward a message from one chat to another",
  99. "parameters": {
  100. "type": "object",
  101. "properties": {
  102. "chat_id": { "type": "string", "description": "Target chat ID" },
  103. "from_chat_id": { "type": "string", "description": "Source chat ID" },
  104. "message_id": { "type": "integer", "description": "Message ID to forward" }
  105. },
  106. "required": ["chat_id", "from_chat_id", "message_id"]
  107. }
  108. },
  109. {
  110. "name": "get_me",
  111. "description": "Get bot information",
  112. "parameters": { "type": "object", "properties": {} }
  113. },
  114. {
  115. "name": "get_chat",
  116. "description": "Get chat information",
  117. "parameters": {
  118. "type": "object",
  119. "properties": {
  120. "chat_id": { "type": "string", "description": "Chat ID" }
  121. },
  122. "required": ["chat_id"]
  123. }
  124. },
  125. {
  126. "name": "set_webhook",
  127. "description": "Set webhook URL for the bot (alternative to polling)",
  128. "parameters": {
  129. "type": "object",
  130. "properties": {
  131. "webhook_url": { "type": "string", "description": "Public HTTPS URL for webhook" },
  132. "secret_token": { "type": "string", "description": "Optional secret token for verification" }
  133. },
  134. "required": ["webhook_url"]
  135. }
  136. },
  137. {
  138. "name": "delete_webhook",
  139. "description": "Delete webhook and switch to polling mode",
  140. "parameters": { "type": "object", "properties": {} }
  141. },
  142. {
  143. "name": "get_webhook_info",
  144. "description": "Get current webhook configuration",
  145. "parameters": { "type": "object", "properties": {} }
  146. }
  147. ],
  148. "permissions": {
  149. "allowNetwork": true,
  150. "allowStorage": true,
  151. "allowFiles": true
  152. }
  153. }