Skip to content

Channel configuration reference

This page documents how TypeScript channels are registered in Desktop-managed and standalone deployments, and the fields and defaults of every adapter config file.

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 whose members may 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",
    "streaming": {
      "enabled": true
    },
    "cli": {
      "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.cli.enabledExpose the bundled official Feishu CLI to Threads created by this Channel.false
feishu.cli.userScopesFeishu user scopes requested when authorizing an account for read-only personal access. Empty keeps every command on the bot identity.Empty
feishu.debug.adapterStreamEnable adapter stream debug logs.false
feishu.debug.textMergeEnable text merge debug logs.false

When feishu.cli.enabled is true, Feishu-origin Threads receive the FeishuCli tool. Every invocation requests approval. The adapter exchanges its configured app credentials for a cached tenant access token and runs the bundled CLI as the bot. The CLI child receives the App ID and an access token, never the App Secret.

The adapter injects a usage policy into the Feishu Thread context. Read a known Skill directly, and call skills list only when you do not know which Skill applies. When a Skill links a reference, load it with skills read <skill-name> <relative-path> before running the business command. Identity comes from the tool's identity input rather than --as, which the adapter rejects. whoami reports the effective identity and token status.

feishu.cli.userScopes lists the Feishu user scopes to request, and stays empty until an operator opts in; only scopes already enabled for the app can be granted. DotCraft appends offline_access and runs the device authorization itself, so the CLI's own auth and config commands stay unavailable. One authorized account serves the whole Channel, which is why identity: "user" is accepted only for read-only commands. The authorization is stored in the Channel's module state directory in plain text, alongside the App Secret already kept there. Personal access covers the operator's side.

The bundled CLI runs only through FeishuCli, never from a shell. CLI file arguments must stay inside the workspace. Document, wiki, file, media, and page tokens are business resource identifiers and are allowed. Raw api, CLI auth/config/profile management, --profile, caller-supplied --yes, runtime installation, and self-update are unavailable. The adapter appends --yes only after DotCraft approval and the pinned CLI's risk classification identify a high-risk-write operation. --help returns plain-text help without requesting a tenant token. Business commands still return structured JSON.

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