feat: add Lark channel adapter#241
Conversation
Adds a built-in Lark/Feishu adapter with setup wizard support, documentation, and tests so users can connect OpenACP through a self-built Lark bot over WebSocket. Also improves Windows package-runner resolution and makes the build script cross-platform.
|
Hey @strangeland — this is great work! The Lark implementation is solid: the single-chat + thread-per-session model, WebSocket event stream, interactive cards, and the setup wizard are all well-thought-out. However, there's an architectural mismatch here that needs to be addressed before we can merge. The IssueThis PR bundles Lark directly into the OpenACP core ( Compare this with how Discord and Slack adapters are distributed:
These are external plugins that users opt into: openacp plugin install @openacp/discord-adapter
openacp plugin install @openacp/lark-adapter # ← what we want for LarkWhat to Do InsteadPlease convert this into a standalone plugin package — the same pattern as the Discord adapter. The CLI has a scaffold command to get you started: # 1. Scaffold a new plugin project
openacp plugin create --name @your-org/lark-adapter
# 2. Start developing with hot-reload
cd lark-adapter
npm install
openacp dev .
# 3. Run tests
npm test
# 4. Build and publish to npm
npm run build
npm publish --access public
# 5. Users install it like any other plugin
openacp plugin install @your-org/lark-adapterYour existing code is excellent and maps almost 1-to-1 onto the external plugin structure — // ❌ Before (core-internal imports)
import type { OpenACPPlugin, InstallContext } from "../../core/plugin/types.js"
// ✅ After (SDK imports)
import type { OpenACPPlugin, InstallContext } from "@openacp/plugin-sdk"Also revert the core changes: Docs
Once submitted as an external plugin, we're happy to feature it in the README and docs as an officially supported adapter. The Lark/Feishu community will love this! |
Adds a built-in Lark/Feishu adapter with setup wizard support, documentation, and tests so users can connect OpenACP through a self-built Lark bot over WebSocket. Also improves Windows package-runner resolution and makes the build script cross-platform.
Summary
Related Issues
Type of Change
Changes Made
Testing
pnpm test— all tests passPlatform Impact
Screenshots / Recordings
Checklist
.jsextensions)pnpm buildsuccessfullysrc/cli/plugin-template/