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.
This commit is contained in:
t
2026-08-21 00:41:07 +08:00
parent 3d47227fbd
commit 2bbf42b741
447 changed files with 1901 additions and 8920 deletions
-25
View File
@@ -32,18 +32,6 @@ error.e0032: "MCP endpoint is required."
error.e0033: "MCP server is not enabled."
error.e0034: "MCP server configuration not found."
error.e0035: "MCP is not enabled."
error.e0036: "OIDC clientId is not configured."
error.e0037: "OIDC clientSecret is not configured."
error.e0038: "OIDC id_token is missing."
error.e0039: "OIDC issuer is not configured."
error.e0040: "OIDC redirectUrl is not configured."
error.e0041: "OIDC authorization code is required."
error.e0042: "OIDC user information not found."
error.e0043: "OIDC user identifier not found."
error.e0044: "OIDC sign-in secret is not configured."
error.e0045: "OIDC sign-in is not enabled."
error.e0046: "OIDC sign-in state is invalid or has expired."
error.e0047: "The system user linked to this OIDC account does not exist."
error.e0048: "OSS accessKeyId is not configured."
error.e0049: "OSS accessKeySecret is not configured."
error.e0050: "OSS bucket is not configured."
@@ -183,8 +171,6 @@ error.e0183: "Closed conversations cannot be linked to customers."
error.e0184: "Restore this deleted Skill before changing its status."
error.e0185: "This AI Agent is linked to channels and cannot be deleted."
error.e0186: "Platform message not found."
error.e0187: "The current OIDC binding has been disabled."
error.e0188: "The current WeCom binding has been disabled."
error.e0189: "This conversation is not currently handled by AI."
error.e0190: "This conversation has already been assigned."
error.e0191: "This conversation has been assigned to another agent."
@@ -356,22 +342,11 @@ error.mcp.connectServerFailed: "Failed to connect to MCP Server: %v"
error.wxwork.unsupportedOutboundMessageType: "Unsupported WeCom outbound message type: %s"
error.wxwork.currentUnsupportedOutboundMessageType: "The current WeCom outbound message type is not supported yet: %s"
error.param.required: "Parameter %s is required."
error.oidc.loginDisabled: "OIDC login is not enabled."
error.oidc.stateSecretMissing: "OIDC login secret is not configured."
error.oidc.profileMissing: "OIDC user information does not exist."
error.oidc.bindingDisabled: "The current OIDC binding has been disabled."
error.oidc.boundUserMissing: "The system user bound to this OIDC account does not exist."
error.wxwork.loginDisabled: "WeCom login is not enabled."
error.wxwork.loginSecretMissing: "WeCom login secret is not configured."
error.wxwork.profileMissing: "WeCom user information does not exist."
error.wxwork.bindingDisabled: "The current WeCom binding has been disabled."
error.wxwork.boundUserMissing: "The system user bound to this WeCom account does not exist."
error.wxwork.userIDMissing: "Failed to get the WeCom user ID."
error.wxwork.userIDTaken: "The WeCom user ID is already used as a system username."
error.wxwork.mobileTaken: "The WeCom mobile number is already used by a system user."
error.wxwork.emailTaken: "The WeCom email address is already used by a system user."
error.wxwork.configIncomplete: "WeCom is not enabled or its configuration is incomplete."
error.customerSession.secretMissing: "Customer session secret is not configured."
error.conversation.createFailed: "Failed to create conversation."
error.conversation.tagNotFound: "Tag not found."
error.aiConfig.noneEnabled: "No available AI configuration is configured."
-25
View File
@@ -32,18 +32,6 @@ error.e0032: "MCP endpoint不能为空"
error.e0033: "MCP服务未启用"
error.e0034: "MCP服务配置不存在"
error.e0035: "MCP未启用"
error.e0036: "OIDC clientId 未配置"
error.e0037: "OIDC clientSecret 未配置"
error.e0038: "OIDC id_token 不存在"
error.e0039: "OIDC issuer 未配置"
error.e0040: "OIDC redirectUrl 未配置"
error.e0041: "OIDC 授权 code 不能为空"
error.e0042: "OIDC 用户信息不存在"
error.e0043: "OIDC 用户标识不存在"
error.e0044: "OIDC 登录密钥未配置"
error.e0045: "OIDC 登录未启用"
error.e0046: "OIDC 登录状态无效或已过期"
error.e0047: "OIDC 账号绑定的系统用户不存在"
error.e0048: "OSS accessKeyId 未配置"
error.e0049: "OSS accessKeySecret 未配置"
error.e0050: "OSS bucket 未配置"
@@ -183,8 +171,6 @@ error.e0183: "已关闭的会话无法关联客户"
error.e0184: "已删除的 Skill 不能直接修改状态,请先恢复"
error.e0185: "已有接入渠道绑定该 AI Agent,无法删除"
error.e0186: "平台消息不存在"
error.e0187: "当前 OIDC 绑定已停用"
error.e0188: "当前企业微信绑定已停用"
error.e0189: "当前会话不处于 AI 接待状态"
error.e0190: "当前会话已分配客服"
error.e0191: "当前会话已分配给其他客服"
@@ -356,22 +342,11 @@ error.mcp.connectServerFailed: "连接 MCP Server 失败: %v"
error.wxwork.unsupportedOutboundMessageType: "不支持的企业微信下行消息类型: %s"
error.wxwork.currentUnsupportedOutboundMessageType: "当前暂不支持企业微信下行消息类型: %s"
error.param.required: "参数:%s不能为空"
error.oidc.loginDisabled: "OIDC 登录未启用"
error.oidc.stateSecretMissing: "OIDC 登录密钥未配置"
error.oidc.profileMissing: "OIDC 用户信息不存在"
error.oidc.bindingDisabled: "当前 OIDC 绑定已停用"
error.oidc.boundUserMissing: "OIDC 账号绑定的系统用户不存在"
error.wxwork.loginDisabled: "企业微信登录未启用"
error.wxwork.loginSecretMissing: "企业微信登录密钥未配置"
error.wxwork.profileMissing: "企业微信用户信息不存在"
error.wxwork.bindingDisabled: "当前企业微信绑定已停用"
error.wxwork.boundUserMissing: "企业微信账号绑定的系统用户不存在"
error.wxwork.userIDMissing: "企业微信用户ID获取失败"
error.wxwork.userIDTaken: "企业微信用户ID已被系统用户名占用"
error.wxwork.mobileTaken: "企业微信手机号已被系统用户占用"
error.wxwork.emailTaken: "企业微信邮箱已被系统用户占用"
error.wxwork.configIncomplete: "企业微信未启用或配置不完整"
error.customerSession.secretMissing: "客服会话密钥未配置"
error.conversation.createFailed: "创建会话失败"
error.conversation.tagNotFound: "标签不存在"
error.aiConfig.noneEnabled: "未配置可用的 AI 配置"