Commit Graph

42 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 fa123a9c41 转人工流程问题修复 2026-07-29 17:02:40 +08:00
mlogclub c66ab1050e feat: enhance agent loop tool handling and add tests for direct capability aliases 2026-07-29 11:36:14 +08:00
mlogclub 1ea76e39f9 refactor: enhance AgentLoopEngine with confirmed MCP reply handling and add tests for tool result summarization 2026-07-28 12:16:16 +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 2de50a2f3a refactor: update risk levels in tool definitions and validation logic to remove sensitive level 2026-07-26 22:32:16 +08:00
mlogclub 7b86fd1f09 feat: Implement AI Agent Workflow Binding functionality
- Added aiAgentWorkflowBindingRepository for managing workflow bindings associated with AI agents.
- Enhanced agentRevisionService to include workflow bindings in agent revisions.
- Updated aIAgentService to handle workflow bindings during agent creation and updates.
- Introduced ai_agent_workflow_binding_service for managing workflow binding logic.
- Created new API endpoints for fetching, creating, updating, and deleting AI workflows.
- Developed a new dashboard page for managing AI workflows.
- Updated frontend components to support workflow binding management in agent configuration.
- Added necessary tests for workflow binding functionality and updated existing tests for compatibility.
- Translated relevant UI texts and messages for workflow management.
2026-07-25 15:24:49 +08:00
mlogclub 6316c2b94f refactor: streamline autonomous engine logic and introduce autonomousTurn context 2026-07-25 12:21:40 +08:00
mlogclub 52bcc556d7 refactor: enhance response policies and update tests for knowledge retrieval handling 2026-07-25 12:12:26 +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 689acc997c xyflow change to flowgraam 2026-06-27 21:27:57 +08:00
mlogclub d4ff0980c4 refactor: remove graph tools references and related logic from AIAgent and workflows 2026-06-26 18:56:09 +08:00
mlogclub 023f224d51 refactor: remove unused tool filter middleware and helpers
- Deleted tool_filter_middleware_test.go and tool_helpers.go as they are no longer needed.
- Removed associated test cases in tool_helpers_test.go.
- Refactored knowledge retriever logic by moving it to a new file and updating imports.
- Introduced tooling package for tool result reduction logic.
- Updated traces package to include new trace types and structures.
- Adjusted executor and tool search tool to reflect new package structure.
2026-06-26 17:52:18 +08:00
mlogclub a628d103f9 feat(workflow): enhance AI agent workflow state management and response handling 2026-06-24 17:56:23 +08:00
mlogclub eb3a209017 feat(workflow): log failed workflow run preparation when version is disabled 2026-06-24 15:49:16 +08:00
mlogclub 26578705ad feat: enhance workflow resume functionality with interrupted run reuse and error handling 2026-06-24 11:02:16 +08:00
mlogclub a670084374 Enhance workflow execution with detailed run logging and error handling, including workflow run status tracking and node tracing 2026-06-23 22:57:18 +08:00
mlogclub 6c02d6a79c Enhance workflow execution with checkpoint data handling and introduce tests for human confirmation and ticket creation 2026-06-23 22:11:20 +08:00
mlogclub ed9d60db0d Add workflow runtime execution and condition validation 2026-06-23 09:34:08 +08:00
mlogclub 560843686b Refactor AIAgent runtime handling and remove unused fields 2026-06-23 08:37:52 +08:00
mlogclub 14f50e064f feat: add AI workflow editor 2026-06-22 00:26:16 +08:00
mlogclub 541e4c5874 refactor: replace skill code with skill ID across the application
- Updated skill handling to use skill IDs instead of skill codes in various components, services, and models.
- Modified tests to reflect changes in skill identification.
- Removed references to skill codes in favor of skill IDs for consistency and clarity.
- Updated localization files to remove skill code references and adjust error messages accordingly.
2026-06-20 20:42:07 +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 680793f527 refactor(runtime): streamline request handling and improve tool preparation methods 2026-04-19 11:19:51 +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 ad83d1dfda feat(utils): add BuildRuntimeMessageText function for message formatting 2026-04-18 22:24:30 +08:00
mlogclub 51884f1bdf refactor: change pointer receivers to value types for Conversation and UserMessage in various structs and functions 2026-04-17 18:48:45 +08:00
mlogclub 976b9defde Refactor AI Agent and AI Config handling across multiple files
- Updated function signatures to accept AI Agent and AI Config as non-pointer types for better clarity and safety.
- Modified instances where AI Agent and AI Config were dereferenced to improve code readability.
- Removed unnecessary nil checks for AI Agent and AI Config, simplifying the logic.
- Adjusted related tests and services to align with the new function signatures.
- Cleaned up code in runtime, skills, and executor packages to ensure consistency in handling AI configurations.
2026-04-17 17:57:01 +08:00
mlogclub 3b062c327c feat(skill): refactor RuntimeContext to use AIAgent and AIConfig directly, removing contextLoader 2026-04-17 17:37:36 +08:00
mlogclub d5d1956964 refactor(runtime): replace RuntimeExecutor with direct use of executor.Service 2026-04-17 17:31:28 +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 fcb2e11998 feat: refactor runtime to use application runtime executor and update related types 2026-04-14 12:13:33 +08:00
mlogclub 2cb4866fce feat: update ResumeData type from map[string]any to map[string]string for consistency 2026-04-14 11:47:13 +08:00
mlogclub 3254ba1bf4 feat: refactor tool catalog to use NewRuntimeStaticTool for dynamic tool creation 2026-04-14 09:56:52 +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 164121836d Refactor runtime executor integration and introduce eino package
- Replaced the existing runtime executor with a new eino package for better modularity.
- Updated Service struct to use the new RuntimeExecutor from eino.
- Adjusted Run and Resume methods to accommodate changes in input types and execution logic.
- Introduced new types in the eino package to align with the previous executor's functionality.
- Refactored tooling preparation logic to streamline tool definitions and improve clarity.
- Added new context builders and event consumers to enhance runtime event handling.
- Removed legacy executor code and ensured all references are updated to the new eino package.
2026-04-14 09:33:49 +08:00
mlogclub 2e03ae7914 feat: refactor request types and service integration for improved runtime handling 2026-04-13 21:15:56 +08:00
mlogclub c44ffc0bdc feat: implement runtime service with tool catalog and skill selection logic 2026-04-13 20:43:37 +08:00
mlogclub 521729f5d3 feat: implement runtime service and types for application integration 2026-04-13 20:37:22 +08:00