kurihada
|
1d380d0bcb
|
refactor(core): 统一模板引擎到 src/template/ 目录
- 将 agent/prompt-template/ 目录合并到 src/template/
- 新增通用模板函数 renderTemplate、render
- 新增 Agent 特定函数 renderPromptTemplate、renderPrompt
- 新增 createToolDescriptionContext 支持工具描述模板变量
- 支持 ${GREP_TOOL_NAME} 等 Claude Code 风格变量
- 更新所有相关导入路径
|
2025-12-16 16:05:10 +08:00 |
|
kurihada
|
452f19e2a9
|
refactor(core): 移除未使用的 prompt-template templates 目录
|
2025-12-16 14:19:36 +08:00 |
|
kurihada
|
58f1bc8718
|
feat(core): 实现动态提示词模板系统
- 新增 prompt-template 模块,支持运行时变量替换
- 支持 ${variable}、${obj.prop}、${cond ? "a" : "b"} 语法
- AgentInfo 新增 promptTemplate 字段标记动态模板
- Plan Agent 提示词改用模板语法,支持动态工具名和计划文件路径
- AgentExecutor.buildSystemPrompt 集成模板渲染
- 新增 27 个单元测试验证模板功能
|
2025-12-16 14:15:10 +08:00 |
|
kurihada
|
f3995d158c
|
feat(core): 实现动态系统提示词加载
- 创建 SystemPrompt 模块,根据模型类型动态加载对应的提示词
- 从 OpenCode 拷贝提示词文件 (anthropic/beast/gemini/qwen/plan.txt)
- 修改 Build/Plan Agent 预设,移除内联 prompt
- Agent 类新增 resolveSystemPrompt 方法处理提示词加载逻辑
- 构建脚本自动复制 prompts 目录到 dist
|
2025-12-15 23:05:08 +08:00 |
|
kurihada
|
5e32375f0e
|
feat: 重构为 Monorepo 架构并实现 HTTP Server
架构变更:
- 采用 pnpm workspaces 实现 Monorepo 结构
- 将现有代码迁移到 packages/core
- 新增 packages/server HTTP 服务层
Server 功能:
- REST API: 会话管理、工具管理、配置管理
- WebSocket: 实时双向通信支持
- SSE: 服务端事件推送
- Hono + Bun 作为运行时
API 端点:
- GET/POST /api/sessions - 会话 CRUD
- GET/POST /api/sessions/:id/messages - 消息管理
- GET /api/sessions/:id/events - SSE 事件流
- WS /api/ws/:sessionId - WebSocket 连接
- GET/POST /api/tools - 工具管理
- GET/PUT /api/config - 配置管理
|
2025-12-12 10:42:20 +08:00 |
|