feat: 添加DACP邮件发送功能,支持真实发送与Demo模式,增强邮件发送的配置管理和错误提示,优化用户体验。

This commit is contained in:
sean
2025-06-18 18:52:53 +08:00
parent c8f6545dd5
commit 50cade3feb
6 changed files with 623 additions and 151 deletions

View File

@ -0,0 +1,156 @@
<execution>
<constraint>
## 技术和环境限制
- **配置依赖性**:真实发送需要用户在~/.promptx/dacp/send_email.json配置邮箱信息
- **服务可用性**需要DACP服务运行在localhost:3002或指定端口
- **网络连接要求**发送真实邮件需要稳定的网络连接和SMTP服务可达性
- **邮件服务商限制**:不同服务商有发送频率和内容限制
- **协议格式约束**必须符合DACP协议标准的请求格式
</constraint>
<rule>
## 强制执行规则
- **服务ID固定**:必须使用"dacp-promptx-service"作为service_id
- **action名称固定**:必须使用"send_email"作为action
- **必需参数验证**user_request是必需参数不能为空
- **配置错误处理**:配置缺失或无效时必须向用户说明具体解决方案
- **安全信息保护**:不得在日志或响应中暴露用户的邮箱密码
</rule>
<guideline>
## 使用指导原则
- **智能需求解析**:从用户自然语言中提取收件人、主题、内容等信息
- **上下文感知**根据urgency、recipient_type等上下文调整邮件语气
- **友好降级**无配置时自动使用Demo模式同时提供配置指导
- **错误信息友好化**:将技术错误转化为用户可理解的解决建议
</guideline>
<process>
## 邮件发送执行流程
### Step 1: 需求分析和参数准备
```
1. 解析用户输入,提取邮件要素(收件人、主题、内容)
2. 确定邮件类型和紧急程度
3. 构造user_request自然语言描述
4. 准备context上下文信息
5. 验证所有必需参数完整性
```
### Step 2: DACP服务调用
```json
// 标准DACP邮件请求格式
{
"service_id": "dacp-promptx-service",
"action": "send_email",
"parameters": {
"user_request": "用户的自然语言邮件描述",
"context": {
"urgency": "high|medium|low",
"recipient_type": "colleague|superior|client"
}
}
}
```
### Step 3: 配置文件格式要求
```json
// ~/.promptx/dacp/send_email.json 配置文件格式
{
"provider": "gmail|outlook|qq|163|126",
"smtp": {
"user": "your-email@gmail.com",
"password": "your-app-password"
},
"sender": {
"name": "Your Name",
"email": "your-email@gmail.com"
}
}
```
### Step 4: 结果处理和用户反馈
```
1. 检查响应状态和demo_mode字段
2. Demo模式提供配置指导和创建配置文件的详细说明
3. 真实发送确认发送成功并显示message_id
4. 错误处理:解析错误原因并提供具体解决方案
5. 向用户反馈执行结果和后续建议
```
### 配置错误处理流程
```
配置缺失 → 显示配置文件路径和格式 → 指导创建配置
配置无效 → 指出具体错误字段 → 提供修复建议
认证失败 → 检查密码和服务器设置 → 应用专用密码指导
发送失败 → 网络和SMTP检查 → 故障排除建议
```
### 邮件服务商配置指导
```
Gmail: 需要启用两步验证并生成应用专用密码
Outlook: 使用账户密码确保SMTP已启用
QQ/163/126: 需要开启SMTP服务并使用授权码
```
### 配置指导详细说明
```
📧 DACP邮件服务配置说明
📍 配置文件位置:~/.promptx/dacp/send_email.json
📝 完整配置示例:
{
"provider": "gmail",
"smtp": {
"user": "your-email@gmail.com",
"password": "your-app-password"
},
"sender": {
"name": "Your Name",
"email": "your-email@gmail.com"
}
}
💡 支持的邮件服务商gmail, outlook, qq, 163, 126
🔐 Gmail用户专用设置
1. 进入 Google 账户设置
2. 启用两步验证
3. 生成应用专用密码
4. 使用生成的密码替换 "your-app-password"
📞 其他服务商设置:
- Outlook: 直接使用账户密码
- QQ/163/126: 需要开启SMTP服务并使用授权码
```
</process>
<criteria>
## 邮件发送质量评价标准
### 功能完整性
- ✅ 正确调用DACP邮件服务
- ✅ 准确解析用户邮件需求
- ✅ 妥善处理配置和发送异常
- ✅ 提供完整的配置指导
### 用户体验质量
- ✅ 自然语言交互流畅
- ✅ 错误提示友好明确
- ✅ 配置指导详细实用
- ✅ Demo模式平滑降级
### 安全合规性
- ✅ 不暴露敏感配置信息
- ✅ 遵循邮件发送最佳实践
- ✅ 用户级配置安全存储
- ✅ 符合反垃圾邮件规范
### 系统稳定性
- ✅ 配置缺失时不影响系统运行
- ✅ 合理的错误处理和重试机制
- ✅ 完整的执行反馈和日志记录
- ✅ 多邮件服务商兼容支持
</criteria>
</execution>

View File

@ -9,5 +9,6 @@
<principle>
@!execution://assistant
@!execution://dacp-service-calling
@!execution://dacp-email-sending
</principle>
</role>

View File

@ -1,8 +1,11 @@
/**
* Email Action Module for DACP PromptX Service
* 提供邮件发送功能
* 提供邮件发送功能 - 支持Demo模式和真实发送
*/
const nodemailer = require('nodemailer')
const DACPConfigManager = require('../../../lib/utils/DACPConfigManager')
// Email action handler
async function send_email(parameters) {
const { user_request, context = {} } = parameters;
@ -124,7 +127,39 @@ function validateEmailData(emailData) {
// 执行邮件发送
async function executeSendEmail(emailData, context) {
// Demo模式模拟发送
const configManager = new DACPConfigManager()
// 检查是否有用户配置
const hasConfig = await configManager.hasActionConfig('send_email')
if (!hasConfig) {
// 无配置回退到Demo模式
return await executeDemoSendEmail(emailData, context)
}
// 读取配置
const config = await configManager.readActionConfig('send_email')
// 验证配置
const validation = configManager.validateEmailConfig(config)
if (!validation.valid) {
// 配置无效,抛出友好错误
const errorMessage = configManager.generateConfigErrorMessage('send_email', validation)
throw new Error(errorMessage)
}
try {
// 真实邮件发送
return await executeRealSendEmail(emailData, config, context)
} catch (error) {
// 发送失败,提供友好提示
console.error('邮件发送失败:', error.message)
throw new Error(`\n📧 邮件发送失败\n\n❌ 错误信息: ${error.message}\n\n💡 可能的解决方案:\n • 检查邮箱密码是否正确\n • 确认已启用SMTP服务\n • 验证网络连接状态\n • Gmail用户确保使用应用专用密码\n`)
}
}
// Demo模式发送
async function executeDemoSendEmail(emailData, context) {
console.log('📧 [DACP Demo] Simulating email send:');
console.log(` To: ${emailData.to}`);
console.log(` Subject: ${emailData.subject}`);
@ -133,15 +168,19 @@ async function executeSendEmail(emailData, context) {
// 模拟网络延迟
await new Promise(resolve => setTimeout(resolve, 100));
const configManager = new DACPConfigManager()
const configHint = configManager.generateConfigErrorMessage('send_email')
return {
message_id: `msg_${Date.now()}`,
status: 'sent',
message_id: `demo_msg_${Date.now()}`,
status: 'demo_sent',
recipient: emailData.to,
subject: emailData.subject,
body: emailData.body,
sent_at: emailData.timestamp,
urgency: emailData.urgency,
demo_mode: true,
config_hint: configHint,
execution_metrics: {
parsing_time: '10ms',
validation_time: '5ms',
@ -150,6 +189,61 @@ async function executeSendEmail(emailData, context) {
};
}
// 真实邮件发送
async function executeRealSendEmail(emailData, config, context) {
const startTime = Date.now()
// 获取提供商配置
const configManager = new DACPConfigManager()
const providerConfig = configManager.getProviderConfig(config.provider)
if (!providerConfig) {
throw new Error(`不支持的邮件服务提供商: ${config.provider}`)
}
// 创建邮件传输器
const transporter = nodemailer.createTransport({
host: providerConfig.smtp,
port: providerConfig.port,
secure: providerConfig.secure,
auth: {
user: config.smtp.user,
pass: config.smtp.password
}
})
// 构建邮件选项
const mailOptions = {
from: `"${config.sender.name}" <${config.sender.email}>`,
to: emailData.to,
subject: emailData.subject,
html: emailData.body.replace(/\n/g, '<br>'),
text: emailData.body
}
// 发送邮件
const info = await transporter.sendMail(mailOptions)
const endTime = Date.now()
return {
message_id: info.messageId,
status: 'sent',
recipient: emailData.to,
subject: emailData.subject,
body: emailData.body,
sent_at: new Date().toISOString(),
urgency: emailData.urgency,
demo_mode: false,
provider: config.provider,
smtp_response: info.response,
execution_metrics: {
parsing_time: '10ms',
validation_time: '5ms',
sending_time: `${endTime - startTime}ms`
}
}
}
// 导出所有email相关的actions
module.exports = {
send_email

View File

@ -9,10 +9,11 @@
"test": "jest"
},
"dependencies": {
"express": "^4.18.2",
"body-parser": "^1.20.2",
"cors": "^2.8.5",
"joi": "^17.11.0"
"express": "^4.18.2",
"joi": "^17.11.0",
"nodemailer": "^7.0.3"
},
"devDependencies": {
"jest": "^29.7.0",

View File

@ -0,0 +1,207 @@
const fs = require('fs-extra')
const path = require('path')
const os = require('os')
/**
* DACP用户级配置管理器
* 管理 ~/.promptx/dacp/ 下的配置文件
*/
class DACPConfigManager {
constructor() {
this.userHome = os.homedir()
this.dacpConfigDir = path.join(this.userHome, '.promptx', 'dacp')
}
/**
* 确保DACP配置目录存在
*/
async ensureConfigDir() {
await fs.ensureDir(this.dacpConfigDir)
}
/**
* 获取指定action的配置文件路径
* @param {string} action - action名称如 'send_email'
* @returns {string} 配置文件完整路径
*/
getConfigPath(action) {
return path.join(this.dacpConfigDir, `${action}.json`)
}
/**
* 读取action配置
* @param {string} action - action名称
* @returns {Promise<Object|null>} 配置对象或null
*/
async readActionConfig(action) {
const configPath = this.getConfigPath(action)
try {
if (await fs.pathExists(configPath)) {
return await fs.readJson(configPath)
}
return null
} catch (error) {
console.warn(`读取DACP配置失败 ${action}:`, error.message)
return null
}
}
/**
* 写入action配置
* @param {string} action - action名称
* @param {Object} config - 配置对象
*/
async writeActionConfig(action, config) {
await this.ensureConfigDir()
const configPath = this.getConfigPath(action)
await fs.writeJson(configPath, config, { spaces: 2 })
}
/**
* 检查action配置是否存在
* @param {string} action - action名称
* @returns {Promise<boolean>}
*/
async hasActionConfig(action) {
const configPath = this.getConfigPath(action)
return await fs.pathExists(configPath)
}
/**
* 验证邮件配置
* @param {Object} config - 邮件配置对象
* @returns {Object} 验证结果 {valid: boolean, errors: string[]}
*/
validateEmailConfig(config) {
const errors = []
if (!config) {
errors.push('配置对象不能为空')
return { valid: false, errors }
}
// 验证provider
if (!config.provider) {
errors.push('缺少邮件服务提供商(provider)配置')
}
// 验证SMTP配置
if (!config.smtp) {
errors.push('缺少SMTP配置')
} else {
if (!config.smtp.user) {
errors.push('缺少SMTP用户名(smtp.user)')
}
if (!config.smtp.password) {
errors.push('缺少SMTP密码(smtp.password)')
}
}
// 验证发件人配置
if (!config.sender) {
errors.push('缺少发件人配置(sender)')
} else {
if (!config.sender.email) {
errors.push('缺少发件人邮箱(sender.email)')
}
if (!config.sender.name) {
errors.push('缺少发件人姓名(sender.name)')
}
}
return {
valid: errors.length === 0,
errors
}
}
/**
* 获取邮件服务提供商配置
* @param {string} provider - 提供商名称
* @returns {Object} 提供商配置
*/
getProviderConfig(provider) {
const providers = {
gmail: {
smtp: 'smtp.gmail.com',
port: 587,
secure: false,
requireAuth: true
},
outlook: {
smtp: 'smtp-mail.outlook.com',
port: 587,
secure: false,
requireAuth: true
},
qq: {
smtp: 'smtp.qq.com',
port: 465,
secure: true,
requireAuth: true
},
'163': {
smtp: 'smtp.163.com',
port: 465,
secure: true,
requireAuth: true
},
'126': {
smtp: 'smtp.126.com',
port: 465,
secure: true,
requireAuth: true
}
}
return providers[provider] || null
}
/**
* 生成配置错误提示信息
* @param {string} action - action名称
* @param {Object} validation - 验证结果
* @returns {string} 错误提示信息
*/
generateConfigErrorMessage(action, validation = null) {
const configPath = this.getConfigPath(action)
let message = `\n📧 DACP邮件服务配置缺失\n\n`
if (!validation) {
// 配置文件不存在
message += `❌ 配置文件不存在: ${configPath}\n\n`
message += `📝 请创建配置文件,内容如下:\n\n`
message += `{\n`
message += ` "provider": "gmail",\n`
message += ` "smtp": {\n`
message += ` "user": "your-email@gmail.com",\n`
message += ` "password": "your-app-password"\n`
message += ` },\n`
message += ` "sender": {\n`
message += ` "name": "Your Name",\n`
message += ` "email": "your-email@gmail.com"\n`
message += ` }\n`
message += `}\n\n`
message += `💡 支持的邮件服务商: gmail, outlook, qq, 163, 126\n\n`
message += `🔐 Gmail用户需要使用应用专用密码:\n`
message += ` 1. 进入 Google 账户设置\n`
message += ` 2. 启用两步验证\n`
message += ` 3. 生成应用专用密码\n`
message += ` 4. 使用生成的密码替换上面的 "your-app-password"\n`
} else {
// 配置不完整
message += `❌ 配置文件存在但不完整: ${configPath}\n\n`
message += `缺少以下配置项:\n`
validation.errors.forEach(error => {
message += `${error}\n`
})
message += `\n请检查并完善配置文件。\n`
}
return message
}
}
module.exports = DACPConfigManager

View File

@ -4,9 +4,9 @@
"metadata": {
"version": "2.0.0",
"description": "package 级资源注册表",
"createdAt": "2025-06-18T09:27:19.817Z",
"updatedAt": "2025-06-18T09:27:19.821Z",
"resourceCount": 46
"createdAt": "2025-06-18T10:00:59.258Z",
"updatedAt": "2025-06-18T10:00:59.263Z",
"resourceCount": 47
},
"resources": [
{
@ -17,9 +17,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://prompt/domain/assistant/assistant.role.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.818Z",
"updatedAt": "2025-06-18T09:27:19.818Z",
"scannedAt": "2025-06-18T09:27:19.818Z"
"createdAt": "2025-06-18T10:00:59.259Z",
"updatedAt": "2025-06-18T10:00:59.259Z",
"scannedAt": "2025-06-18T10:00:59.259Z"
}
},
{
@ -30,9 +30,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://prompt/domain/assistant/thought/assistant.thought.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -43,9 +43,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/assistant/execution/assistant.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -56,9 +56,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://prompt/domain/frontend-developer/frontend-developer.role.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -69,9 +69,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://prompt/domain/frontend-developer/thought/frontend-developer.thought.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -82,9 +82,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/java-backend-developer/execution/code-quality.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -95,9 +95,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/frontend-developer/execution/frontend-developer.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -108,9 +108,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/frontend-developer/execution/technical-architecture.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -121,9 +121,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/frontend-developer/execution/user-experience.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -134,9 +134,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/frontend-developer/execution/wechat-miniprogram-development.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -147,9 +147,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://prompt/domain/java-backend-developer/java-backend-developer.role.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -160,9 +160,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://prompt/domain/java-backend-developer/thought/java-backend-developer.thought.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -173,9 +173,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/java-backend-developer/execution/database-design.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -186,9 +186,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/java-backend-developer/execution/java-backend-developer.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -199,9 +199,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/java-backend-developer/execution/spring-ecosystem.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -212,9 +212,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/java-backend-developer/execution/system-architecture.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.819Z",
"updatedAt": "2025-06-18T09:27:19.819Z",
"scannedAt": "2025-06-18T09:27:19.819Z"
"createdAt": "2025-06-18T10:00:59.260Z",
"updatedAt": "2025-06-18T10:00:59.260Z",
"scannedAt": "2025-06-18T10:00:59.260Z"
}
},
{
@ -225,9 +225,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://prompt/domain/nuwa/nuwa.role.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.261Z",
"updatedAt": "2025-06-18T10:00:59.261Z",
"scannedAt": "2025-06-18T10:00:59.261Z"
}
},
{
@ -238,9 +238,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://prompt/domain/nuwa/thought/role-creation.thought.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.261Z",
"updatedAt": "2025-06-18T10:00:59.261Z",
"scannedAt": "2025-06-18T10:00:59.261Z"
}
},
{
@ -251,9 +251,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/nuwa/execution/dpml-authoring.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.261Z",
"updatedAt": "2025-06-18T10:00:59.261Z",
"scannedAt": "2025-06-18T10:00:59.261Z"
}
},
{
@ -264,9 +264,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/nuwa/execution/role-design-patterns.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.261Z",
"updatedAt": "2025-06-18T10:00:59.261Z",
"scannedAt": "2025-06-18T10:00:59.261Z"
}
},
{
@ -277,9 +277,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/nuwa/execution/role-generation.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.261Z",
"updatedAt": "2025-06-18T10:00:59.261Z",
"scannedAt": "2025-06-18T10:00:59.261Z"
}
},
{
@ -290,9 +290,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/nuwa/execution/visualization-enhancement.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.261Z",
"updatedAt": "2025-06-18T10:00:59.261Z",
"scannedAt": "2025-06-18T10:00:59.261Z"
}
},
{
@ -303,9 +303,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://prompt/domain/product-manager/product-manager.role.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.261Z",
"updatedAt": "2025-06-18T10:00:59.261Z",
"scannedAt": "2025-06-18T10:00:59.261Z"
}
},
{
@ -316,9 +316,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://prompt/domain/product-manager/thought/product-manager.thought.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -329,9 +329,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/product-manager/execution/market-analysis.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -342,9 +342,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/product-manager/execution/product-manager.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -355,9 +355,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/product-manager/execution/user-research.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -368,9 +368,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://prompt/domain/sean/sean.role.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -381,9 +381,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://prompt/domain/sean/thought/sean.thought.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -394,9 +394,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/sean/execution/sean-decision-framework.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -407,9 +407,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://prompt/domain/xiaohongshu-marketer/xiaohongshu-marketer.role.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -420,9 +420,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/thought/xiaohongshu-marketer.thought.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -433,9 +433,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/brand-marketing.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -446,9 +446,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/community-building.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -459,9 +459,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/content-creation.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -472,9 +472,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/content-optimization.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -485,9 +485,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/data-analytics.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -498,9 +498,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/ecommerce-conversion.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -511,9 +511,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/performance-optimization.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -524,9 +524,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/platform-compliance.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -537,9 +537,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/team-collaboration.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.820Z",
"updatedAt": "2025-06-18T09:27:19.820Z",
"scannedAt": "2025-06-18T09:27:19.820Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -550,9 +550,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/user-operation.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.821Z",
"updatedAt": "2025-06-18T09:27:19.821Z",
"scannedAt": "2025-06-18T09:27:19.821Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
@ -563,9 +563,22 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/domain/xiaohongshu-marketer/execution/xiaohongshu-marketer.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.821Z",
"updatedAt": "2025-06-18T09:27:19.821Z",
"scannedAt": "2025-06-18T09:27:19.821Z"
"createdAt": "2025-06-18T10:00:59.262Z",
"updatedAt": "2025-06-18T10:00:59.262Z",
"scannedAt": "2025-06-18T10:00:59.262Z"
}
},
{
"id": "dacp-email-sending",
"source": "package",
"protocol": "execution",
"name": "Dacp Email Sending 执行模式",
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/core/dacp-email-sending.execution.md",
"metadata": {
"createdAt": "2025-06-18T10:00:59.263Z",
"updatedAt": "2025-06-18T10:00:59.263Z",
"scannedAt": "2025-06-18T10:00:59.263Z"
}
},
{
@ -576,9 +589,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://prompt/core/dacp-service-calling.execution.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.821Z",
"updatedAt": "2025-06-18T09:27:19.821Z",
"scannedAt": "2025-06-18T09:27:19.821Z"
"createdAt": "2025-06-18T10:00:59.263Z",
"updatedAt": "2025-06-18T10:00:59.263Z",
"scannedAt": "2025-06-18T10:00:59.263Z"
}
},
{
@ -589,9 +602,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://prompt/core/recall.thought.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.821Z",
"updatedAt": "2025-06-18T09:27:19.821Z",
"scannedAt": "2025-06-18T09:27:19.821Z"
"createdAt": "2025-06-18T10:00:59.263Z",
"updatedAt": "2025-06-18T10:00:59.263Z",
"scannedAt": "2025-06-18T10:00:59.263Z"
}
},
{
@ -602,21 +615,21 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://prompt/core/remember.thought.md",
"metadata": {
"createdAt": "2025-06-18T09:27:19.821Z",
"updatedAt": "2025-06-18T09:27:19.821Z",
"scannedAt": "2025-06-18T09:27:19.821Z"
"createdAt": "2025-06-18T10:00:59.263Z",
"updatedAt": "2025-06-18T10:00:59.263Z",
"scannedAt": "2025-06-18T10:00:59.263Z"
}
}
],
"stats": {
"totalResources": 46,
"totalResources": 47,
"byProtocol": {
"role": 7,
"thought": 9,
"execution": 30
"execution": 31
},
"bySource": {
"package": 46
"package": 47
}
}
}