WIP: promptx tools 开发中的代码

- 正在开发 promptx tools 功能
- 包含 bin、commands、DACP 相关修改
- 新增 tool 目录结构

🚧 这是开发中的代码,需要继续完善
This commit is contained in:
sean
2025-06-28 09:25:54 +08:00
parent d6455987ab
commit 70093018f8
8 changed files with 1438 additions and 55 deletions

View File

@ -105,7 +105,7 @@ program
.option('--host <address>', '绑定地址 (仅http/sse传输)', 'localhost')
.option('--cors', '启用CORS (仅http/sse传输)', false)
.option('--debug', '启用调试模式', false)
.option('--with-dacp', '同时启动DACP服务', false)
.option('--with-dacp', '(已废弃,静默忽略)', false)
.action(async (options) => {
try {
// 设置调试模式
@ -116,7 +116,8 @@ program
// 根据传输类型选择命令
if (options.transport === 'stdio') {
const mcpServer = new MCPServerCommand();
await mcpServer.execute({ withDacp: options.withDacp });
// 🔧 DACP现为Mock模式静默忽略用户的withDacp配置
await mcpServer.execute();
} else if (options.transport === 'http' || options.transport === 'sse') {
const mcpHttpServer = new MCPStreamableHttpCommand();
const serverOptions = {