Skip to content

bug: doctor command doesn't support multi-account config (appId/appSecret in accounts map) #511

@easonlh

Description

@easonlh

Problem

The openclaw-lark-tools doctor command (feishu-plugin-onboard doctor) reports a false failure when the Feishu channel uses multi-account configuration:

[FAIL] Feishu channel configuration missing or incomplete
Suggestion: App ID or Secret missing. Run "feishu-plugin-onboard doctor --fix" to configure them.

Root Cause

The doctor check only validates top-level channels.feishu.appId and channels.feishu.appSecret:

const hasAppId = typeof feishuChannel.appId === 'string' && feishuChannel.appId.length > 0;
const hasAppSecret = (typeof feishuChannel.appSecret === 'string' && feishuChannel.appSecret.length > 0) || isSecretRef(feishuChannel.appSecret);
channelConfigValid = hasAppId && hasAppSecret;

It does not check channels.feishu.accounts.* for per-account credentials. When using multi-account config (credentials inside accounts map, not at the top level), the doctor always reports failure.

Config Example

{
  "channels": {
    "feishu": {
      "enabled": true,
      "accounts": {
        "main": {
          "appId": "cli_xxx",
          "appSecret": "xxx"
        }
      }
    }
  }
}

Expected Behavior

The doctor should recognize multi-account configurations and check each account's credentials individually, similar to how the plugin's own runFeishuDoctor does via getEnabledLarkAccounts().

Environment

  • @larksuite/openclaw-lark-tools: 1.0.45
  • OpenClaw: 2026.5.14-beta.1
  • Node.js: v22+

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcommandssrc/commands/ — /feishu, /new, doctor, diagnose

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions