|
1 | | -__version__ = "1.1.0" |
| 1 | +"""CSP Bot - Multi-platform chat bot using chatom. |
2 | 2 |
|
| 3 | +This package provides a CSP-based bot framework that leverages |
| 4 | +chatom for unified cross-platform chat support. |
| 5 | +
|
| 6 | +Key features: |
| 7 | +- Unified Message, User, Channel models via chatom |
| 8 | +- Cross-platform mention generation |
| 9 | +- Backend-specific message formatting |
| 10 | +- Entity recognition and parsing |
| 11 | +- Support for Slack, Symphony, and Discord |
| 12 | +""" |
| 13 | + |
| 14 | +__version__ = "2.0.0" |
| 15 | + |
| 16 | +# Re-export chatom types for convenience |
| 17 | +from chatom import Channel, Message, User |
3 | 18 |
|
4 | | -from .backends import * |
5 | 19 | from .bot import Bot |
6 | | -from .bot_config import * |
7 | | -from .commands import * |
8 | | -from .config import * |
9 | | -from .gateway import * |
10 | | -from .structs import * |
11 | | -from .utils import * |
| 20 | +from .bot_config import BotConfig, DiscordConfig, SlackConfig, SymphonyConfig |
| 21 | +from .commands import ( |
| 22 | + BaseCommand, |
| 23 | + BaseCommandModel, |
| 24 | + EchoCommand, |
| 25 | + HelpCommand, |
| 26 | + NoResponseCommand, |
| 27 | + ReplyCommand, |
| 28 | + ReplyToAllCommand, |
| 29 | + ReplyToAuthorCommand, |
| 30 | + ReplyToOtherCommand, |
| 31 | + ScheduleCommand, |
| 32 | + StatusCommand, |
| 33 | + mention_user, |
| 34 | +) |
| 35 | +from .gateway import CspBotGateway, Gateway, GatewayChannels, GatewayModule, GatewaySettings |
| 36 | +from .structs import Backend, BotCommand, BotMessage, CommandVariant |
| 37 | +from .utils import format_message, get_backend_format, is_valid_url, mention_users |
| 38 | + |
| 39 | +# Alias for backwards compatibility with tests |
| 40 | +Channels = GatewayChannels |
| 41 | + |
| 42 | +__all__ = ( |
| 43 | + # Version |
| 44 | + "__version__", |
| 45 | + # Chatom re-exports |
| 46 | + "Channel", |
| 47 | + "Message", |
| 48 | + "User", |
| 49 | + # Bot |
| 50 | + "Bot", |
| 51 | + # Config |
| 52 | + "BotConfig", |
| 53 | + "DiscordConfig", |
| 54 | + "SlackConfig", |
| 55 | + "SymphonyConfig", |
| 56 | + # Commands |
| 57 | + "BaseCommand", |
| 58 | + "BaseCommandModel", |
| 59 | + "EchoCommand", |
| 60 | + "HelpCommand", |
| 61 | + "NoResponseCommand", |
| 62 | + "ReplyCommand", |
| 63 | + "ReplyToAllCommand", |
| 64 | + "ReplyToAuthorCommand", |
| 65 | + "ReplyToOtherCommand", |
| 66 | + "ScheduleCommand", |
| 67 | + "StatusCommand", |
| 68 | + # Gateway |
| 69 | + "Channels", |
| 70 | + "CspBotGateway", |
| 71 | + "Gateway", |
| 72 | + "GatewayChannels", |
| 73 | + "GatewayModule", |
| 74 | + "GatewaySettings", |
| 75 | + # Structs |
| 76 | + "Backend", |
| 77 | + "BotCommand", |
| 78 | + "BotMessage", |
| 79 | + "CommandVariant", |
| 80 | + # Utils |
| 81 | + "format_message", |
| 82 | + "get_backend_format", |
| 83 | + "is_valid_url", |
| 84 | + "mention_user", |
| 85 | + "mention_users", |
| 86 | +) |
0 commit comments