Skip to content

Channel configuration reference

This page documents TypeScript channel registration and adapter config files for Desktop-managed and standalone deployments.

Registration modes

Desktop-managed built-in modules

Use this shape when DotCraft owns the bundled module process:

json
{
  "ExternalChannels": {
    "qq": {
      "enabled": true,
      "transport": "managedWebsocket",
      "builtinModule": "channel-qq"
    }
  }
}

Desktop writes this registration for bundled modules and injects the AppServer endpoint into the adapter config at runtime.

Standalone adapters

Use this shape when you run the adapter process yourself:

json
{
  "AppServer": {
    "Mode": "WebSocket",
    "WebSocket": {
      "Host": "127.0.0.1",
      "Port": 9100,
      "Token": ""
    }
  },
  "ExternalChannels": {
    "qq": {
      "enabled": true,
      "transport": "websocket"
    }
  }
}

Standalone adapters read dotcraft.wsUrl and dotcraft.token from their adapter config file.

Built-in module names

ChannelBuilt-in moduleAdapter config
QQchannel-qq.craft/qq.json
WeComchannel-wecom.craft/wecom.json
Feishu / Larkchannel-feishu.craft/feishu.json
Telegramchannel-telegram.craft/telegram.json
Weixinchannel-weixin.craft/weixin.json

Adapter config files

Every TypeScript channel config has a dotcraft section and a platform section. Desktop hides dotcraft.* fields in the UI and supplies them automatically for managed modules.

QQ

json
{
  "dotcraft": {
    "wsUrl": "ws://127.0.0.1:9100/ws",
    "token": ""
  },
  "qq": {
    "host": "127.0.0.1",
    "port": 6700,
    "accessToken": "",
    "adminUsers": [123456789],
    "whitelistedUsers": [],
    "whitelistedGroups": [],
    "approvalTimeoutMs": 60000,
    "requireMentionInGroups": true
  }
}
FieldDescriptionDefault
dotcraft.wsUrlAppServer WebSocket endpoint for standalone adapters. Desktop-managed runtime overrides this value.ws://127.0.0.1:9100/ws
dotcraft.tokenAppServer WebSocket token for standalone adapters. Desktop-managed runtime overrides this value.Empty
qq.hostOneBot reverse WebSocket listen host.127.0.0.1
qq.portOneBot reverse WebSocket listen port.6700
qq.accessTokenOptional OneBot access token. Must match NapCat when set.Empty
qq.adminUsersQQ user IDs with admin permission.[]
qq.whitelistedUsersQQ user IDs allowed to chat with DotCraft.[]
qq.whitelistedGroupsQQ group IDs allowed to chat with DotCraft.[]
qq.approvalTimeoutMsApproval timeout in milliseconds.60000
qq.requireMentionInGroupsRequire @mention in QQ groups.true

WeCom

json
{
  "dotcraft": {
    "wsUrl": "ws://127.0.0.1:9100/ws",
    "token": ""
  },
  "wecom": {
    "host": "0.0.0.0",
    "port": 9000,
    "scheme": "http",
    "robots": [
      {
        "path": "/dotcraft",
        "token": "wecom-token",
        "aesKey": "wecom-encoding-aes-key"
      }
    ],
    "adminUsers": ["zhangsan"],
    "whitelistedUsers": [],
    "whitelistedChats": [],
    "approvalTimeoutMs": 60000
  }
}
FieldDescriptionDefault
dotcraft.wsUrlAppServer WebSocket endpoint for standalone adapters. Desktop-managed runtime overrides this value.ws://127.0.0.1:9100/ws
dotcraft.tokenAppServer WebSocket token for standalone adapters. Desktop-managed runtime overrides this value.Empty
wecom.hostCallback server listen host.0.0.0.0
wecom.portCallback server listen port.9000
wecom.schemeCallback server scheme. Use https only when TLS cert and key paths are configured.http
wecom.tls.certPathTLS certificate path for direct HTTPS callback serving.Empty
wecom.tls.keyPathTLS private key path for direct HTTPS callback serving.Empty
wecom.robotsRobot callback credentials: path, token, and aesKey.[]
wecom.defaultRobotDefault Token and EncodingAESKey used when a robot-specific entry omits them.Empty
wecom.adminUsersWeCom UserIds with admin permission.[]
wecom.whitelistedUsersWeCom UserIds allowed to chat with DotCraft.[]
wecom.whitelistedChatsWeCom ChatIds allowed to chat with DotCraft.[]
wecom.approvalTimeoutMsApproval timeout in milliseconds.60000

Feishu

json
{
  "dotcraft": {
    "wsUrl": "ws://127.0.0.1:9100/ws",
    "token": ""
  },
  "feishu": {
    "appId": "cli_your_app_id",
    "appSecret": "your_app_secret",
    "brand": "feishu",
    "cardTitle": "DotCraft",
    "approvalTimeoutMs": 120000,
    "groupMentionRequired": true,
    "ackReactionEmoji": "GLANCE",
    "tools": {
      "docs": {
        "enabled": false
      }
    }
  }
}
FieldDescriptionDefault
dotcraft.wsUrlAppServer WebSocket endpoint for standalone adapters. Desktop-managed runtime overrides this value.ws://127.0.0.1:9100/ws
dotcraft.tokenAppServer WebSocket token for standalone adapters. Desktop-managed runtime overrides this value.Empty
feishu.appIdFeishu / Lark app ID.Required
feishu.appSecretFeishu / Lark app secret.Required
feishu.verificationTokenOptional verification token for event payloads that require it.Empty
feishu.encryptKeyOptional encrypt key for encrypted event payloads.Empty
feishu.brandService environment: feishu or lark.feishu
feishu.cardTitleTitle shown on reply, progress, and approval cards.DotCraft
feishu.approvalTimeoutMsApproval timeout in milliseconds.120000
feishu.groupMentionRequiredRequire @mention in Feishu groups.true
feishu.ackReactionEmojiEmoji type used to acknowledge handled messages.GLANCE
feishu.downloadDirLocal directory for downloaded attachments.Workspace temp directory
feishu.tools.docs.enabledRegister Feishu docx and wiki tools.false
feishu.debug.adapterStreamEnable adapter stream debug logs.false
feishu.debug.textMergeEnable text merge debug logs.false

Telegram

json
{
  "dotcraft": {
    "wsUrl": "ws://127.0.0.1:9100/ws",
    "token": ""
  },
  "telegram": {
    "botToken": "123456:telegram-bot-token",
    "httpsProxy": "",
    "approvalTimeoutMs": 120000,
    "pollTimeoutMs": 30000
  }
}
FieldDescriptionDefault
dotcraft.wsUrlAppServer WebSocket endpoint for standalone adapters. Desktop-managed runtime overrides this value.ws://127.0.0.1:9100/ws
dotcraft.tokenAppServer WebSocket token for standalone adapters. Desktop-managed runtime overrides this value.Empty
telegram.botTokenBot token issued by BotFather.Required
telegram.httpsProxyOptional HTTPS proxy for Telegram Bot API requests.Empty
telegram.approvalTimeoutMsApproval timeout in milliseconds.120000
telegram.pollTimeoutMsTelegram long-poll timeout in milliseconds.30000

Weixin

json
{
  "dotcraft": {
    "wsUrl": "ws://127.0.0.1:9100/ws",
    "token": ""
  },
  "weixin": {
    "apiBaseUrl": "https://ilinkai.weixin.qq.com",
    "pollIntervalMs": 3000,
    "pollTimeoutMs": 30000,
    "approvalTimeoutMs": 120000,
    "botType": "3"
  }
}
FieldDescriptionDefault
dotcraft.wsUrlAppServer WebSocket endpoint for standalone adapters. Desktop-managed runtime overrides this value.ws://127.0.0.1:9100/ws
dotcraft.tokenAppServer WebSocket token for standalone adapters. Desktop-managed runtime overrides this value.Empty
weixin.apiBaseUrlTencent iLink API base URL.https://ilinkai.weixin.qq.com
weixin.pollIntervalMsDelay between polling cycles in milliseconds.3000
weixin.pollTimeoutMsLong-poll timeout in milliseconds.30000
weixin.approvalTimeoutMsApproval timeout in milliseconds.120000
weixin.botTypeBot type value passed to the QR login API.3

Apache License 2.0