#14014: refactor(feishu): mark as built-in plugin with private flag
channel: feishu
stale
Cluster:
Plugin Enhancements and Fixes
# 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
#22577: fix(feishu): use senderKey fallback for DM session isolation
by leesonchen · 2026-02-21
70.7%
#9268: Fix: Register feishu as official channel in CHAT_CHANNEL_ORDER
by vishaltandale00 · 2026-02-05
68.8%
#9196: Fix: Use local plugins for unpublished npm packages
by vishaltandale00 · 2026-02-05
68.1%
#12849: fix(plugins): fallback bundled channel specs when npm install retur...
by vincentkoc · 2026-02-09
68.0%
#19941: fix(nostr): move openclaw from devDependencies to peerDependencies
by AustinEral · 2026-02-18
66.3%
#22735: feat(plugin): add feishu-media extension
by cintia09 · 2026-02-21
65.9%
#2556: fix(plugin-install): handle existing plugins and filter workspace deps
by longmaba · 2026-01-27
65.3%
#11454: fix(plugins): remove workspace:* from extension dependencies
by AnonO6 · 2026-02-07
65.2%
#20973: Fix: Feishu duplicate plugin ID, Docker pairing docs, broken formal...
by neipor · 2026-02-19
65.1%
#20360: fix(feishu): remove workspace protocol from published package metadata
by tanujbhaud · 2026-02-18
64.8%