{
  "moduleId": "telegram-standard",
  "channelName": "telegram",
  "displayName": "Telegram",
  "interface": {
    "shortDescription": "Connect DotCraft to Telegram bots and chats.",
    "localizedShortDescription": {
      "en": "Connect DotCraft to Telegram bots and chats.",
      "zh-Hans": "让 DotCraft 接入 Telegram 机器人和会话。"
    },
    "longDescription": "Use the Telegram channel to route chat messages into DotCraft, send structured replies, and keep lightweight bot workflows close to your project context.",
    "localizedLongDescription": {
      "en": "Use the Telegram channel to route chat messages into DotCraft, send structured replies, and keep lightweight bot workflows close to your project context.",
      "zh-Hans": "通过 Telegram 渠道把会话消息接入 DotCraft、发送结构化回复，并让轻量机器人工作流贴近项目上下文。"
    },
    "previewPrompt": "Turn this Telegram update into a workspace action item.",
    "localizedPreviewPrompt": {
      "en": "Turn this Telegram update into a workspace action item.",
      "zh-Hans": "把这条 Telegram 更新整理成工作区行动项。"
    }
  },
  "packageName": "@dotcraft/channel-telegram",
  "configFileName": "telegram.json",
  "supportedTransports": [
    "websocket"
  ],
  "requiresInteractiveSetup": false,
  "capabilitySummary": {
    "hasChannelTools": true,
    "hasStructuredDelivery": true,
    "requiresInteractiveSetup": false,
    "capabilitySetMayVaryByEnvironment": false
  },
  "sdkContractVersion": "1.0.0",
  "supportedProtocolVersions": [
    "0.2"
  ],
  "variant": "standard",
  "launcher": {
    "bin": "dotcraft-channel-telegram",
    "supportsWorkspaceFlag": true,
    "supportsConfigOverrideFlag": true
  },
  "configDescriptors": [
    {
      "key": "dotcraft.wsUrl",
      "displayLabel": "AppServer WebSocket URL",
      "description": "DotCraft AppServer WebSocket endpoint (ws:// or wss://).",
      "localizedDisplayLabel": {
        "en": "AppServer WebSocket URL",
        "zh-Hans": "AppServer WebSocket 地址"
      },
      "localizedDescription": {
        "en": "DotCraft AppServer WebSocket endpoint (ws:// or wss://).",
        "zh-Hans": "DotCraft AppServer 的 WebSocket 端点（ws:// 或 wss://）。"
      },
      "required": true,
      "dataKind": "string",
      "masked": false,
      "interactiveSetupOnly": false,
      "defaultValue": "ws://127.0.0.1:9100/ws"
    },
    {
      "key": "dotcraft.token",
      "displayLabel": "AppServer Auth Token",
      "description": "Optional token used by DotCraft AppServer WebSocket transport.",
      "localizedDisplayLabel": {
        "en": "AppServer Auth Token",
        "zh-Hans": "AppServer 认证令牌"
      },
      "localizedDescription": {
        "en": "Optional token used by DotCraft AppServer WebSocket transport.",
        "zh-Hans": "DotCraft AppServer WebSocket 传输使用的可选认证令牌。"
      },
      "required": false,
      "dataKind": "secret",
      "masked": true,
      "interactiveSetupOnly": false
    },
    {
      "key": "telegram.botToken",
      "displayLabel": "Telegram Bot Token",
      "description": "Bot token issued by BotFather.",
      "localizedDisplayLabel": {
        "en": "Telegram Bot Token",
        "zh-Hans": "Telegram Bot Token"
      },
      "localizedDescription": {
        "en": "Bot token issued by BotFather.",
        "zh-Hans": "由 BotFather 签发的 Telegram Bot Token。"
      },
      "required": true,
      "dataKind": "secret",
      "masked": true,
      "interactiveSetupOnly": false
    },
    {
      "key": "telegram.httpsProxy",
      "displayLabel": "Telegram HTTPS Proxy",
      "description": "Optional HTTPS proxy URL used for Telegram Bot API requests.",
      "localizedDisplayLabel": {
        "en": "Telegram HTTPS Proxy",
        "zh-Hans": "Telegram HTTPS 代理"
      },
      "localizedDescription": {
        "en": "Optional HTTPS proxy URL used for Telegram Bot API requests.",
        "zh-Hans": "Telegram Bot API 请求使用的可选 HTTPS 代理地址。"
      },
      "required": false,
      "dataKind": "string",
      "masked": false,
      "interactiveSetupOnly": false,
      "advanced": true
    },
    {
      "key": "telegram.approvalTimeoutMs",
      "displayLabel": "Approval Timeout (ms)",
      "description": "Timeout before Telegram approval requests auto-cancel.",
      "localizedDisplayLabel": {
        "en": "Approval Timeout (ms)",
        "zh-Hans": "审批超时（毫秒）"
      },
      "localizedDescription": {
        "en": "Timeout before Telegram approval requests auto-cancel.",
        "zh-Hans": "Telegram 审批请求自动取消前的等待时长。"
      },
      "required": false,
      "dataKind": "number",
      "masked": false,
      "interactiveSetupOnly": false,
      "advanced": true,
      "defaultValue": 120000
    },
    {
      "key": "telegram.pollTimeoutMs",
      "displayLabel": "Poll Timeout (ms)",
      "description": "Long-poll timeout for Telegram getUpdates requests.",
      "localizedDisplayLabel": {
        "en": "Poll Timeout (ms)",
        "zh-Hans": "轮询超时（毫秒）"
      },
      "localizedDescription": {
        "en": "Long-poll timeout for Telegram getUpdates requests.",
        "zh-Hans": "Telegram getUpdates 长轮询请求的超时时间。"
      },
      "required": false,
      "dataKind": "number",
      "masked": false,
      "interactiveSetupOnly": false,
      "advanced": true,
      "defaultValue": 30000
    }
  ]
}
