bedelightful / be-delightful-module
BeDelightful Module
Installs: 0
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
pkg:composer/bedelightful/be-delightful-module
Requires
- 96qbhy/hyperf-auth: ^3.1
- bedelightful/api-response: ~0.1
- hyperf/amqp: ^3.1
- hyperf/cache: ^3.1
- hyperf/constants: ~3.1
- hyperf/crontab: ~3.1.0
- hyperf/database: ~3.1.0
- hyperf/db-connection: ~3.1.0
- hyperf/engine-swow: ^2.12
- hyperf/guzzle: ~3.1.0
- hyperf/http-message: ~3.1.0
- hyperf/http-server: ~3.1.0
- hyperf/logger: ~3.1.0
- hyperf/phar: ~3.1.0
- hyperf/process: ~3.1.0
- hyperf/rate-limit: ^3.1
- hyperf/redis: ~3.1.0
- hyperf/snowflake: ~3.1.0
- hyperf/socketio-server: ^3.1
- hyperf/translation: ~3.1.0
- hyperf/validation: ^3.1
- hyperf/websocket-client: ^3.1
- hyperf/websocket-server: ~3.1.0
- overtrue/chinese-calendar: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- hyperf/devtool: ~3.1.0
- hyperf/testing: ~3.1.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- roave/security-advisories: dev-latest
This package is auto-updated.
Last update: 2026-01-14 18:08:45 UTC
README
Introduction
Be Delightful Module is an extension package based on the Hyperf framework, designed as an enhanced extension module specifically for delightful-service. This module adopts Domain-Driven Design (DDD) architecture, providing a clear layered structure and rich functional components for applications.
Be Delightful Module needs to be used together with delightful-service. Its core function is to establish an information transmission channel between users and the Super Maggie AI agent by taking over delightful-service message events. This design allows users to interact seamlessly with the agent, thereby obtaining a more intelligent service experience.
As a bridging module, Be Delightful Module not only handles message delivery but also converts data formats, coordinates event processes, and provides necessary context information to ensure the agent can accurately understand user intent and provide appropriate responses.
Features
- Built on Hyperf 3.1, perfectly adapted to existing delightful-service architecture
- Follows Domain-Driven Design (DDD) architecture with clear code organization and easy maintenance
- Provides resource sharing functionality, supporting cross-module resource access
- Serves as message channel connecting users with Super Maggie AI agent
- Supports event listening and processing, real-time response to user requests
- Provides workspace management, supporting multi-topic and multi-task processing
- Implements file management system, supporting agent file operations
- PSR-compliant code organization ensuring code quality
System Architecture
As an extension of delightful-service, Be Delightful Module plays the following role in the overall system:
User Request → delightful-service → Be Delightful Module → Super Maggie AI Agent
↑ |
└─────────────────┘
Response Return
The module integrates with delightful-service through the following methods:
- Listen to message events from delightful-service
- Process and transform message formats
- Forward messages to Super Maggie AI agent
- Receive and process agent responses
- Return processing results to delightful-service
Installation
Install via Composer:
composer require bedelightful/be-delightful-module
Basic Usage
Configuration
The module provides a ConfigProvider for registering related services and features. Configure in the config/autoload directory of your Hyperf application:
<?php return [ // Load ConfigProvider \BeDelightful\BeDelightful\ConfigProvider::class, ];
Integration with delightful-service
To integrate Be Delightful Module with delightful-service, you need to take over dependencies in delightful-service:
[
'dependencies_priority' => [
// Agent execution event
AgentExecuteInterface::class => BeAgentMessageSubscriberV2::class,
BeAgentMessageInterface::class => BeAgentMessage::class,
]
]
Domain Layer Usage
The module is designed based on DDD architecture and contains the following main layers:
- Domain Layer: Contains business logic and entities, such as core functions like message processing and workspace management
- Application Layer: Coordinates domain objects to complete complex business scenarios, such as message delivery processes
- Infrastructure Layer: Provides technical support, including data storage, external service calls, etc.
- Interfaces Layer: Handles external requests and responses, provides API interfaces
Development
Directory Structure
src/
├── Application/ # Application layer, handles business processes
│ ├── Share/ # Resource sharing services
│ └── BeAgent/ # Super agent services
├── Domain/ # Domain layer, contains core business logic
│ ├── Share/ # Resource sharing domain models
│ └── BeAgent/ # Super agent domain models
├── Infrastructure/ # Infrastructure layer, provides technical implementation
│ ├── ExternalAPI/ # External API calls
│ └── Utils/ # Utility classes
├── Interfaces/ # Interfaces layer, handles external interactions
│ ├── Share/ # Resource sharing interfaces
│ └── BeAgent/ # Super agent interfaces
├── Listener/ # Event listeners
└── ConfigProvider.php # Configuration provider
Commands
This extension package provides a series of useful commands:
# Code style fixes composer fix # Static code analysis composer analyse # Run tests composer test # Start Hyperf service composer start
Message Flow
The basic flow for Be Delightful Module to process messages is as follows:
- User sends message in delightful-service
- delightful-service triggers message event
- Be Delightful Module listens to the event and extracts message content
- Message is converted to a format understandable by Super Maggie AI agent
- Message is sent to Super Maggie AI agent
- Agent processes the message and generates a response
- Be Delightful Module receives the response and converts the format
- Response is passed back to delightful-service through events
- User receives the agent's response
Testing
Run tests:
composer test
Contributing Guidelines
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a Pull Request
Related Resources
- Hyperf Official Documentation
- PSR Standards
- Domain-Driven Design Reference
- Delightful Service Documentation
Authors
- delightful team - team@delightful.ai
License
This project uses a private license - see internal team documentation for details.
Project Status
This module is under active development as an enhancement component of delightful-service, continuously providing upgrades to intelligent interaction capabilities. We welcome feedback and suggestions from team members to jointly improve this critical module.