← Back to PRs

#14014: refactor(feishu): mark as built-in plugin with private flag

by xrwang8 open 2026-02-11 09:33 View on GitHub →
channel: feishu stale
# Fix Feishu Plugin Installation and User Experience ## Problem ### Issue 1: npm Installation Fails When users attempted to install the Feishu plugin via: ```bash openclaw plugins install @openclaw/feishu ``` They encountered the following errors: ``` Error: Cannot find module '@sinclair/typebox' Require stack: - /root/.openclaw/extensions/feishu/src/bitable.ts error: Cannot find module '@sinclair/typebox' ``` **Why this happened:** - The plugin's `devDependencies` contained `"openclaw": "workspace:*"` - `workspace:*` is a monorepo-specific syntax that only works in development environments - When published to npm, this dependency reference becomes invalid - npm cannot resolve the `workspace:*` protocol - Although `@sinclair/typebox` was properly declared in `dependencies`, the broken `devDependencies` disrupted the dependency installation chain ### Issue 2: Confusing Dual Identity The plugin had an inconsistent design: - ✅ Code existed in `extensions/feishu/` and was bundled with core - ✅ All runtime dependencies (`@sinclair/typebox`, etc.) were properly declared - ⚠️ Had `install` configuration suggesting it should be installed via npm - ⚠️ System prompted users to install an already-available plugin This created user confusion: - The plugin worked out-of-the-box (bundled) - But the system asked "Install Feishu plugin?" - Attempting to install from npm failed with dependency errors --- ## Root Cause The fundamental issue was **inconsistent plugin categorization**: 1. **Workspace dependency conflict** - `devDependencies: { "openclaw": "workspace:*" }` works in monorepo development - But breaks npm package resolution for end users - `workspace:*` protocol is not understood by npm in production environments 2. **Mixed identity** - Feishu was configured as an "optional install" plugin (`install` config + published to npm) - But was also bundled with the core package - This created a "best of both worlds, worst of neither" situation --- ## Solution **Standardize Feishu as a built-in plugin**, consistent with slack, telegram, and other core communication channels. ### Changes **File:** `extensions/feishu/package.json` ```diff { "name": "@openclaw/feishu", "version": "2026.2.9", + "private": true, "description": "OpenClaw Feishu/Lark channel plugin", "type": "module", "dependencies": { "@larksuiteoapi/node-sdk": "^1.58.0", "@sinclair/typebox": "0.34.48", "zod": "^4.3.6" }, "devDependencies": { "openclaw": "workspace:*" }, "openclaw": { "extensions": ["./index.ts"], "channel": { "id": "feishu", ... "order": 35, "quickstartAllowFrom": true - }, - "install": { - "npmSpec": "@openclaw/feishu", - "localPath": "extensions/feishu", - "defaultChoice": "npm" } } } ``` **Summary:** 1. ✅ Add `"private": true` - Prevents npm publication 2. ✅ Keep `"openclaw": "workspace:*"` - Required for monorepo development 3. ✅ Remove `install` configuration - Eliminates installation prompts ## User Experience ### Before ```bash openclaw config # ⚠️ Prompts: "Install Feishu plugin?" # ⚠️ Installing from npm fails with dependency errors # ⚠️ Confusion: Plugin already exists in extensions/ ``` ### After ```bash npm install -g openclaw # Feishu is bundled openclaw config # ✅ Feishu appears in channel list # ✅ Works out-of-the-box, no installation needed ``` ## Technical Details - `private: true` prevents accidental npm publication - `workspace:*` dependency is retained for monorepo development - All runtime dependencies are properly declared in `dependencies` - No changes to `pnpm-lock.yaml` required - Consistent with existing built-in plugins: `slack`, `telegram`, `discord`, etc. ## Benefits - ✅ **Simpler user experience**: Plugin works immediately after installation - ✅ **Consistent architecture**: Matches other communication plugins - ✅ **No installation failures**: Eliminates npm install errors - ✅ **Reduced confusion**: Clear distinction between built-in and optional plugins

Most Similar PRs