Skip to content

Onboard Feishu setup falls back to legacy register/activate path and never writes channel config #151

@zhyongrui

Description

@zhyongrui

Summary

Running openclaw onboard and selecting Feishu during channel setup can end with:

  • feishu missing register/activate export
  • feishu plugin not available

After that, onboarding finishes without writing any channels.feishu config, even though Feishu is shown as installed.

Reproduction

  1. Start from a fresh local config directory.
  2. Run openclaw onboard.
  3. Select Feishu/Lark (飞书) in QuickStart / channel setup.
  4. Continue through setup.

Actual behavior

The setup UI reports:

  • Feishu: installed
  • Feishu: not configured
  • feishu missing register/activate export
  • feishu plugin not available

~/.openclaw/openclaw.json ends up with only:

  • plugins.entries.openclawcode.config.defaultNotificationLocale

and no channels.feishu block is written.

Expected behavior

Feishu should load through its setup entry, prompt for the required Feishu configuration, and write the resulting channels.feishu config during onboarding.

Root cause

The Feishu bundled setup entry is emitted in the new bundled channel setup contract shape:

  • kind: "bundled-channel-setup-entry"
  • loadSetupPlugin()

Example built artifact:

  • dist/extensions/feishu/setup-entry.js

However, the setup-time loader path in src/plugins/loader.ts still resolves setup exports using the legacy shape:

function resolveSetupChannelRegistration(moduleExport: unknown): {
  plugin?: ChannelPlugin;
} {
  const resolved = unwrapDefaultModuleExport(moduleExport);
  if (!resolved || typeof resolved !== "object") {
    return {};
  }
  const setup = resolved as {
    plugin?: unknown;
  };
  if (!setup.plugin || typeof setup.plugin !== "object") {
    return {};
  }
  return {
    plugin: setup.plugin as ChannelPlugin,
  };
}

So when manifestRecord.setupSource is present, the loader does not recognize the bundled setup entry contract, fails to register the setup plugin, and then falls through to the generic plugin export path, which expects register/activate. That produces the misleading error:

  • missing register/activate export

Relevant locations:

  • src/plugins/loader.ts (resolveSetupChannelRegistration, setup-only/setup-runtime branch)
  • dist/extensions/feishu/setup-entry.js
  • dist/channel-entry-contract-*.js (defineBundledChannelSetupEntry returns kind: "bundled-channel-setup-entry" + loadSetupPlugin)
  • src/flows/channel-setup.ts (surfaces plugin not available)

Notes

This likely affects other bundled channel plugins that use defineBundledChannelSetupEntry(...), not just Feishu.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions