Commit Graph

17 Commits

Author SHA1 Message Date
dzq 5b40a79d6d feat(cabinet-tool): 优化返回数据并新增统计信息
- 返回数据简化: cells 列表仅保留第一条,减少 LLM 数据量
- 新增 stats 统计字段: 包含总数/空闲/占用数及各类型数量
- 完整数据存入缓存: 通过 cacheId 供代码执行工具后续提取
- 更新 Agent 提示词: 说明数据变化及缓存使用方式
- 添加优化方案文档

BREAKING CHANGE: cabinetTool 返回数据结构变更,新增 stats 字段
2026-01-10 17:56:14 +08:00
dzq 3654ad60f7 ♻️ refactor(agent): 移除模式列表查询功能并更新数据结构
- 移除 shopTool 的 modeList 查询类型及相关 API 调用
- 移除 goodsTool 中的 categoryId 查询参数
- 更新 DTO 接口定义,调整字段命名规范
- 新增 ProductInfoDTO、CellInfoDTO、CabinetInfoDTO 接口

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-10 09:36:02 +08:00
dzq 09e71ca348 feat(agent): 新增工具执行结果缓存功能
为所有查询工具添加缓存支持,提升数据处理效率:

- 新增 ToolCacheService 缓存服务,支持 5 分钟 TTL 自动过期
- goods/cabinet/shop/dynamicInfo/searchEntity 工具执行后自动缓存结果
- code-executor-tool 支持通过 cacheIds 参数引用缓存数据
- 更新 Agent 系统指令说明缓存使用方式和变量命名规则

示例使用:
- 查询商品:返回 cacheId (如 cacheGoods_1)
- 代码执行:{ code: "...", cacheIds: ["cacheGoods_1"] }

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-08 18:05:39 +08:00
dzq e158ae34ef feat(agent): 新增实体搜索工具及API接口
新增实体搜索功能,支持按名称模糊查询店铺、柜机、商品等实体。

主要变更:
- 新增 searchEntityTool 工具,支持 shop/cabinet/goods 三种实体类型查询
- 新增 agent API 模块,统一管理实体搜索和详情查询接口
- 重构 cabinetTool 使用新的 cabinetDetail API
- 增强 shopTool,新增 shopDetail 查询类型
- 添加 axios 调试日志便于问题排查
- 新增 Agent API 接口文档

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-08 17:03:31 +08:00
dzq 1334ad6baa feat(agent): 新增代码执行工具并切换模型配置
- 新增 code-executor-tool 工具,支持 JavaScript 代码同步执行
- 添加代码执行工具的系统提示词说明
- 切换模型提供商为小咪模型 (mimimo)
- 更新工具索引导出新工具
2026-01-08 15:22:50 +08:00
dzq 2431649079 注释 2026-01-07 18:01:51 +08:00
dzq 5382e3c998 feat(agent): 新增智能柜、门店和借还动态工具功能
新增 cabinetTool、shopTool 和 dynamicInfoTool 工具,扩展多功能代理能力:
1. cabinetTool 支持查询智能柜详情
2. shopTool 支持查询门店列表和模式列表
3. dynamicInfoTool 支持查询商品借还记录
同时更新代理提示词和相关API接口
2026-01-07 16:02:30 +08:00
dzq f21bd8f6b9 refactor: 移除计算器工具及相关功能
移除不再使用的计算器工具,包括工具定义、导出、测试用例和代理集成
更新package.json中的脚本命名以保持一致性
2026-01-07 11:06:11 +08:00
dzq 8e10300e54 命令 2026-01-05 17:29:00 +08:00
dzq eada12cbaf refactor(agent): 移除未使用的工具功能
删除天气、时间、文件列表和笑话工具及相关代码,仅保留计算器和商品查询功能
更新代理描述和测试路由以反映功能变更
2026-01-04 11:45:33 +08:00
dengquanzhang 726befe2fa 改为小米模型 2025-12-21 23:16:00 +08:00
dzq 4a7ddd9e72 feat: add memory functionality to multi-function agent and update schemas
- Integrated memory capabilities into the multi-function agent using LibSQLStore for persistent storage.
- Updated agent instructions to reflect memory features, allowing the agent to remember previous conversations and user preferences.
- Modified request schemas to include optional memory parameters for better context management in interactions.
2025-12-16 11:10:08 +08:00
dzq 4d1e218437 feat: 添加应用配置文件,设置环境变量和日志路径 2025-12-12 11:08:38 +08:00
dzq bddd42a6c0 feat: 更新服务器端口为7328,调整相关文档和示例 2025-12-12 10:59:51 +08:00
dzq 7be8cc973e feat: add goods tool for querying product information and integrate with multi-function agent
- Implemented goodsTool for querying product lists and details based on product ID.
- Added API methods for fetching product lists and single product information.
- Created Axios instance with request interceptors for handling API responses and errors.
- Updated multiFunctionAgent to include goodsTool for enhanced functionality.
- Defined types for API responses and pagination.
- Configured Vite for building the server with proper chunking and external dependencies.
2025-12-12 10:48:12 +08:00
dzq 28bab592de feat: Add Multi-Function Agent with Express API and tools
- Implemented Multi-Function Agent with capabilities for weather, time, calculator, file listing, and jokes.
- Created Express API for accessing the agent, including endpoints for generating responses, streaming, and testing tools.
- Added middleware for error handling, response formatting, and request validation.
- Defined schemas for request validation using Zod.
- Translated agent instructions and tool descriptions to Chinese for localization.
- Included README documentation for API usage and project structure.
2025-12-11 17:43:08 +08:00
dzq f3e5a0db54 feat: add multi-function agent with tools for weather, time, calculator, file listing, and jokes
- Created multiFunctionAgent to handle multiple user requests.
- Implemented tools for weather information, current time, basic arithmetic operations, file listing, and telling jokes.
- Added necessary schemas and execution logic for each tool.
- Set up main Mastra instance to include the new agent.
- Created a script to run the agent and test its functionality.
- Configured TypeScript settings for the project.
2025-12-11 15:18:09 +08:00