Commit Graph

33 Commits

Author SHA1 Message Date
t 18c9354095 refactor: 将客服后端重构为宿主可嵌入模块
- 注入数据库、运行时配置、统一响应、文件存储和平台 AI 能力,补充业务读写工具与客户快捷操作契约。

- 移除模块内重复的组织、客户、工单、标签、技能、旧工作流、MCP 和迁移实现,将身份权限与业务主体交由宿主管理。

- 使用 libSQL 重构向量存储,并完善图片消息、访客身份、排队调度、企业微信和支持聊天页面。

- 统一 HTTP、DTO 与 WebSocket 的 snake_case 协议,补齐模块初始化、业务动作和公共载荷等回归测试。
2026-08-28 22:23:13 +08:00
t 2bbf42b741 refactor(auth): delegate access control to be-system
Remove Agent Desk users, roles, login sessions, tokens, and local permission persistence. Expose the backend as an embeddable ai-agent module with host-provided subject lookup and operation authorization callbacks, and complete the frontend/backend repository split.
2026-08-21 00:41:07 +08:00
mlogclub 07370fe9a2 refactor: enhance MCP tool management with risk policies and confirmation handling 2026-07-28 11:33:15 +08:00
mlogclub 847f688398 Refactor AI Agent configuration and workflow handling
- Removed runtime mode handling from AIAgentConfigWorkbench and related components.
- Updated tests to reflect changes in AI Agent policy copy and configuration.
- Changed terminology from "workflow" to "revision" in various components and API responses.
- Simplified agent binding logic in channel editing.
- Cleaned up unused variables and types related to runtime modes.
- Updated localization files for consistency with new terminology.
2026-07-27 23:29:02 +08:00
mlogclub 34051a4631 feat: Enhance AI Agent and Channel Management
- Updated labels in the AI Agents dashboard for clarity, changing "流程状态" to "Playbook 状态" and "未发布流程" to "未发布 Playbook".
- Introduced AI Agent rollout percentage management in channel editing, allowing users to set and rollback rollout percentages.
- Added new API endpoints for rolling back AI Agent rollout and fetching agent run metrics.
- Implemented new UI components for displaying agent run details, including status, duration, and input/output tokens.
- Enhanced type definitions for AdminChannel and AIAgent to include rollout percentages and runtime modes.
- Updated navigation to include a section for agent runs.
- Added new translations for agent run features in both English and Chinese.
2026-07-25 12:04:06 +08:00
mlogclub 3439d20537 feat(i18n): Enhance internationalization support for tool specifications and notifications
- Added TitleKey and DescriptionKey fields to ToolSpec for dynamic localization.
- Updated tool specifications to use i18nx for titles, descriptions, and appendices.
- Refactored notification messages to utilize i18nx for localization in conversation and ticket assignment events.
- Improved localization in the debug dialog component for skill definitions.
- Added new translation keys in English and Chinese for ticket and conversation assignment notifications.
- Ensured that fallback messages are properly localized based on user locale.
2026-06-03 09:36:33 +08:00
mlogclub 0b4a1b4594 Refactor error handling in services to use internationalized error messages
- Updated OSSStorage validation errors to use internationalized messages.
- Changed error messages in provider.go for unsupported file storage types.
- Refactored tag_service.go to replace hardcoded error messages with internationalized versions.
- Updated ticket_service.go to use internationalized error messages for various validation checks.
- Refactored ticket_tag_service.go to use internationalized error messages for tag validation.
- Changed ticket_view_service.go to use internationalized error messages for view validation.
- Updated tool_catalog_service.go to use internationalized error messages for tool code validation.
- Refactored user_service.go to replace error messages with internationalized versions.
- Updated ws_service.go to use internationalized error messages for WebSocket handling.
- Refactored wxwork_kf_inbound_service.go to use internationalized error messages for message handling.
- Updated wxwork_kf_outbound_service.go to use internationalized error messages for outbound message handling.
- Refactored wxwork_login_service.go to use internationalized error messages for login handling.
- Updated login.go in wxwork package to use internationalized error messages for login state and ticket validation.
2026-06-02 20:51:13 +08:00
mlogclub b128447a7e Refactor localization strings to English across various services and UI components
- Updated titles and subtitles in channel_service.go for web channel and WeChat MP channel configurations.
- Changed handoff messages in conversation_human_dispatch_service.go to English.
- Modified notification messages in event handlers for ticket and conversation assignments to English.
- Adjusted ticket creation messages in ticket_service.go to reflect English localization.
- Updated default locale settings in i18n configuration files to English (en-US).
- Changed HTML language attribute in layout.tsx to English.
- Refactored widget locale detection logic in agent-desk-sdk.ts to prioritize English.
2026-05-31 21:57:31 +08:00
mlogclub 101577f163 Refactor internal services to use agent-desk package structure
- Updated import paths in multiple service files to reflect the new agent-desk module.
- Added a new configuration file for agent-desk in the Docker setup.
2026-05-31 18:43:48 +08:00
mlogclub 5d7c10aeab refactor: rename agent widget references to AI agent for consistency
- Updated runtime configuration to use __CS_AI_AGENT_WIDGET_CONFIG__ instead of __CS_AGENT_WIDGET_CONFIG__.
- Changed message types in support host bridge from "cs-agent" to "cs-ai-agent".
- Minified SDK script updated to reflect new AI agent naming conventions.
- Adjusted scrollbar styles in main.scss to use .cs-ai-agent-scrollbar instead of .cs-agent-scrollbar.
2026-05-30 21:19:36 +08:00
mlogclub 988f55c80d refactor: support i18n 2026-05-25 12:06:15 +08:00
mlogclub 7a9cffe21e fix: add structured graph tool results 2026-05-10 00:02:23 +08:00
mlogclub 42077c1aab Refactor skill handling and improve runtime trace capabilities
- Removed the selectSkill method from prepareService and adjusted related logic in the Run method of Service.
- Updated tool catalog to parse agent allowed tool codes directly.
- Simplified Request and RunInput structures by removing unnecessary fields.
- Enhanced the RuntimeTraceCollector to manage skill activation and visibility.
- Introduced a new databaseSkillBackend to manage skill definitions and their metadata.
- Added tests for skill backend functionalities to ensure correct behavior.
- Updated various factory methods to accommodate changes in skill handling.
- Improved documentation and descriptions for better clarity.
2026-04-19 09:57:34 +08:00
mlogclub aa7f94e08f feat: add support for Graph Tools in AIAgent model and related services 2026-04-14 15:10:50 +08:00
mlogclub 8d560bb6bd feat: introduce ToolSourceType enum and refactor related code to use it 2026-04-14 15:05:38 +08:00
mlogclub 3f85c7fc2c feat: add unit tests for NewRuntimeStaticTool and ResolveToolMetadata functions 2026-04-14 09:58:08 +08:00
mlogclub ceb5df87fd feat: implement ResolveToolMetadata function and update tool metadata resolution across the codebase 2026-04-14 09:51:03 +08:00
mlogclub d87253dddd feat: refactor agent factory and introduce helper functions for tool metadata and instruction assembly 2026-04-14 09:47:42 +08:00
mlogclub 0ea113c621 feat: refactor tool catalog to build static tools dynamically and improve tool code normalization 2026-04-14 09:39:56 +08:00
mlogclub 6499126f40 feat: refactor tool metadata handling and simplify allowed tool code checks 2026-04-12 23:15:27 +08:00
mlogclub c5941e91e0 feat: enhance ToolSpec with Appendix field and refactor agent instruction assembly 2026-04-12 23:14:27 +08:00
mlogclub ef6815a3c6 feat: refactor tool metadata resolution to utilize ToolSpec and enhance tool catalog service 2026-04-12 22:30:00 +08:00
mlogclub 11252d31da feat: refactor tool definitions to use structured ToolSpec and update related references 2026-04-12 22:27:09 +08:00
mlogclub 89227c02c4 feat: add TriageServiceRequest tool and related graph for analyzing service requests and drafting tickets 2026-04-12 13:39:16 +08:00
mlogclub e42c77c8ae feat: add AnalyzeConversation tool and related graph for analyzing conversation risks and summaries 2026-04-12 13:36:01 +08:00
mlogclub a66b78eecc feat: add PrepareTicketDraft tool and related graph for drafting ticket information 2026-04-12 13:32:07 +08:00
mlogclub 560ebdbf13 feat: implement skill middleware and enhance tool handling for selected skills 2026-04-12 10:11:17 +08:00
mlogclub 15afa10c7d feat: implement Handoff Graph Tool for managing AI to human transitions 2026-04-10 16:00:10 +08:00
mlogclub 3db7bec662 feat: refactor ticket creation process to use Graph Tool for confirmation and state management 2026-04-10 15:45:51 +08:00
mlogclub e7a600b7d5 feat: add auto-injection flag for tools and filter auto-injected tools in UI 2026-04-10 15:41:02 +08:00
mlogclub 8961ec4342 feat: add tool search functionality and enhance tool management in AI agent 2026-04-10 14:57:46 +08:00
mlogclub 1370e4b675 feat: enhance AI agent functionality with tool management and logging improvements
- Added AllowedToolCodes field to Context for managing tool access.
- Introduced ResumeSource in aiReplyTraceData to track resume points.
- Enhanced logging with additional fields: PlannedSkillName, SkillRouteTrace, InterruptType, ResumeSource, and FinalStatus.
- Implemented functions to parse and resolve allowed tool codes for agents and skills.
- Refactored skill definition creation and update logic to streamline request handling.
- Updated MCP tool catalog to include source type and integrated built-in tools.
- Improved UI components to display additional tool information and enhance user experience.
2026-04-10 14:43:57 +08:00
mlogclub dbd1c5fe66 Refactor MCP tool handling by introducing tool code normalization and parsing, enhancing request and response structures for AIAgentMCPTool 2026-04-09 13:49:03 +08:00