qwen-code/packages/channels/plugin-example/src/index.ts
tanzhenxin c97c548acb feat(channels): make plugin-example package publishable
- Update channel-base to use built dist/ output with proper exports
- Add README with quick start guide and usage instructions
- Add qwen-extension.json manifest for extension discovery
- Add start-server CLI for running the mock WebSocket server
- Update dependencies from local file: to npm version

This enables the plugin-example package to be published and installed
as a standalone extension for testing the channel plugin system.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 04:21:56 +00:00

21 lines
792 B
TypeScript

import type { ChannelPlugin } from '@qwen-code/channel-base';
import { MockPluginChannel } from './MockPluginChannel.js';
export { MockPluginChannel } from './MockPluginChannel.js';
export type { MockPluginConfig } from './MockPluginChannel.js';
export { createMockServer } from './mock-server.js';
export type { MockServerHandle, MockServerOptions } from './mock-server.js';
export type { InboundMessage, OutboundMessage, WsMessage } from './protocol.js';
export const plugin: ChannelPlugin = {
channelType: 'plugin-example',
displayName: 'Plugin Example',
requiredConfigFields: ['serverWsUrl'],
createChannel: (name, config, bridge, options) =>
new MockPluginChannel(
name,
config as typeof config & { serverWsUrl: string },
bridge,
options,
),
};