docs(channels): add plugin developer guide and rename mock to plugin-example

- Add comprehensive developer guide for building channel plugins
- Add user-facing docs for installing/configuring custom channel plugins
- Replace custom-channels.md with new plugins.md
- Rename @qwen-code/channel-mock to @qwen-code/channel-plugin-example
- Add messageId field to Envelope type for response correlation

This provides clear documentation for developers building custom channel
adapters and renames the mock package to better reflect its purpose as
a reference implementation example.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
tanzhenxin 2026-03-27 03:19:34 +00:00
parent 01c2e5a373
commit 987eebd1c4
17 changed files with 246 additions and 270 deletions

View file

@ -0,0 +1,23 @@
/**
* Shared protocol types for mock channel WebSocket communication.
*/
/** Server → Plugin Channel (WebSocket) */
export interface InboundMessage {
type: 'inbound';
messageId: string;
senderId: string;
senderName: string;
chatId: string;
text: string;
}
/** Plugin Channel → Server (WebSocket) */
export interface OutboundMessage {
type: 'outbound';
messageId: string;
chatId: string;
text: string;
}
export type WsMessage = InboundMessage | OutboundMessage;