refactor: 系统性移除DACP架构 - 简化框架专注@tool协议
🗑️ 核心清理 - 完全移除DACP服务架构和HTTP模式 - 删除DACPCommand、DACPConfigManager等核心组件 - 清理所有DACP相关文件、测试和文档 - 从CLI移除dacp命令,精简为6大核心锦囊 📁 删除内容 Core: - src/dacp/ - 整个DACP服务目录 - src/lib/core/pouch/commands/DACPCommand.js - src/lib/utils/DACPConfigManager.js Tests: - src/tests/commands/DACPCommand.unit.test.js - src/tests/integration/dacp-integration.test.js - src/tests/e2e/dacp-*-e2e.test.js - src/tests/unit/DACPConfigManager.unit.test.js Scripts & Docs: - scripts/test-*dacp*.js - docs/dacp-*.md - prompt/core/dacp-*.execution.md 🔧 代码清理 CLI: - src/bin/promptx.js: 移除dacp命令和--with-dacp选项 - 帮助信息更新:7大命令→6大核心命令 Core: - src/lib/core/pouch/PouchCLI.js: 移除dacp命令注册 - src/lib/core/pouch/commands/index.js: 清理DACPCommand引用 MCP: - src/lib/mcp/toolDefinitions.js: 移除promptx_dacp工具定义 - src/lib/commands/MCPServerCommand.js: 清理所有DACP方法和引用 - src/lib/commands/MCPStreamableHttpCommand.js: 移除DACP参数映射 Registry: - src/package.registry.json: 自动更新,移除2个DACP execution资源 - package.json: 移除dacp相关npm脚本 📊 架构简化结果 - 资源总数:63个 → 61个 (移除2个DACP execution) - CLI命令:7个 → 6大核心锦囊 - 代码复杂度显著降低,专注核心功能 ✅ 验证通过 - @tool://calculator 计算功能正常: 6 × 7 = 42 - @tool://send-email 邮件工具正常 - MCP Server启动正常 - 所有锦囊命令工作正常 🎯 新架构重点 1. 角色系统 - AI专业能力激活 2. 记忆系统 - 知识学习和回忆 3. @tool协议 - JavaScript工具执行 4. MCP集成 - AI应用连接 💡 技术收益 - 移除HTTP服务复杂度 - 统一@tool协议标准 - 简化维护和扩展 - 提升性能和稳定性 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -111,46 +111,6 @@ const TOOL_DEFINITIONS = [
|
||||
tags: z.string().optional().describe('自定义标签,用空格分隔,可选')
|
||||
})
|
||||
},
|
||||
{
|
||||
name: 'promptx_dacp',
|
||||
description: '🚀 [DACP专业服务工具] 专业执行工具 - 需要明确知道如何使用特定DACP服务时调用。工具存在但需要专业知识才能正确使用,不建议在不了解服务配置和参数的情况下尝试。',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
service_id: {
|
||||
type: 'string',
|
||||
description: 'DACP服务ID,如:dacp-email-service'
|
||||
},
|
||||
action: {
|
||||
type: 'string',
|
||||
description: '具体操作,如:send_email'
|
||||
},
|
||||
parameters: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
user_request: {
|
||||
type: 'string',
|
||||
description: '用户自然语言需求'
|
||||
},
|
||||
context: {
|
||||
type: 'object',
|
||||
description: '上下文信息'
|
||||
}
|
||||
},
|
||||
required: ['user_request']
|
||||
}
|
||||
},
|
||||
required: ['service_id', 'action', 'parameters']
|
||||
},
|
||||
zodSchema: z.object({
|
||||
service_id: z.string().describe('DACP服务ID,如:dacp-email-service'),
|
||||
action: z.string().describe('具体操作,如:send_email'),
|
||||
parameters: z.object({
|
||||
user_request: z.string().describe('用户自然语言需求'),
|
||||
context: z.object({}).optional().describe('上下文信息')
|
||||
})
|
||||
})
|
||||
},
|
||||
{
|
||||
name: 'promptx_tool',
|
||||
description: '🔧 [工具执行器] 执行通过@tool协议声明的JavaScript工具 - 支持角色配置中定义的专业工具能力,如@tool://calculator数学计算、@tool://send-email邮件发送等。提供安全沙箱执行、参数验证、错误处理和性能监控。',
|
||||
|
||||
Reference in New Issue
Block a user