How super-mortal/astrbot_plugin_group_digest works
群聊总结 is an AstrBot plugin for cross-platform group-chat analysis, report generation, and optional comic creation, with an embedded WebUI for operations. The primary workflow is a user or scheduled trigger, message collection, statistical and LLM analysis, report rendering, and delivery. Separate product branches cover comics, incremental/checkpointed runs, configuration and template management, and operational observability. The README documents these capabilities; sampled source confirms pipeline checkpoints, trace/task handling, history persistence, and dashboard trace retrieval, but does not expose every service call.
Main entry points: analysis_application_service.py Analysis Service · main.py Plugin Lifecycle · analysis_command_handler.py Command Handlers · routes WebUI Routes
Components 26
Plugin Entry
- Plugin Lifecycle
main.py - Command Handlers
src/application/handlers/analysis_command_handler.py - Remote Commands
src/application/handlers/remote_command_handler.py - Auto Scheduler
src/infrastructure/scheduler/auto_scheduler.py
Analysis Workflow
- Analysis Service
src/application/services/analysis_application_service.py - Message Repository
src/domain/repositories/message_repository.py - Platform Adapters
src/infrastructure/platform/adapters - Domain Analysis
src/domain/services/analysis_domain_service.py - Analysis Modules
src/infrastructure/analysis/analyzers - Stage and Checkpoint Context
src/application/services/pipeline_context.py - Incremental Analysis
src/application/services/incremental_analysis_service.py
Reports and Comics
- Report Generation
src/infrastructure/reporting/generators.py - Comic Generation
src/application/services/comic_application_service.py - Image Drawing
src/infrastructure/drawing/drawing_client.py - Report Delivery
src/infrastructure/messaging/message_sender.py
Operations Data
- Report History
src/infrastructure/persistence/history_manager.py - Trace Store
src/infrastructure/persistence/trace_sqlite_store.py - Active Tasks
src/infrastructure/webui/active_task_manager.py - Configuration
src/infrastructure/config/config_manager.py
Web Console
- WebUI Routes
src/infrastructure/webui/routes - Dashboard Bridge
- Management Dashboard
dashboard/src/app/App.tsx - Trace Insights
dashboard/src/pages/context-insight/model/useContextInsightViewModel.ts
Other components
- Chat User
- AstrBot Runtime
- LLM Service
Connections 30
- Chat User → Command Handlers: issues commands
- Chat User → Management Dashboard: manages plugin
- AstrBot Runtime → Plugin Lifecycle: loads plugin
- Plugin Lifecycle → Auto Scheduler: sets schedules
- Command Handlers → Analysis Service: triggers analysis
- Remote Commands → Analysis Service: triggers analysis
- Auto Scheduler → Analysis Service: triggers analysis
- Analysis Service → Message Repository: retrieves messages
- Message Repository → Platform Adapters: accesses chat data
- Analysis Service → Domain Analysis: analyzes input
- Domain Analysis → Analysis Modules: runs modules
- Analysis Modules → LLM Service: requests analysis
- Analysis Service → Stage and Checkpoint Context: records stages
- Analysis Service → Incremental Analysis: supports incremental runs
- Analysis Service → Report Generation: renders report
- Analysis Service → Comic Generation: starts comic workflow
- Comic Generation → Image Drawing: requests images
- Analysis Service → Report Delivery: delivers results
- Analysis Service → Report History: saves summary
- Plugin Lifecycle → Trace Store: initializes tracing
- Plugin Lifecycle → Active Tasks: starts task tracking
- Active Tasks → Trace Store: persists task status
- Management Dashboard → Dashboard Bridge: requests API data
- Dashboard Bridge → WebUI Routes: calls WebUI API
- WebUI Routes → Trace Store: queries traces
- WebUI Routes → Active Tasks: reads task state
- Trace Insights → Dashboard Bridge: fetches trace data
- Management Dashboard → Trace Insights: shows trace insights
- Command Handlers → Configuration: reads settings
- Plugin Lifecycle → Configuration: initializes config