mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
- 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>
21 lines
792 B
TypeScript
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,
|
|
),
|
|
};
|