openapi: 3.0.3 info: title: ai operate - OpenAPI 3.0 description: |- This is ai operate OpenAPI. version: 1.0.0 components: schemas: ObjectFileItemDto: type: object properties: objectKey: { type: string } name: { type: string } directory: { type: boolean } etag: { type: string } size: { type: integer, format: int64 } contentType: { type: string } lastModified: { type: integer, format: int64 } operationStatus: { type: string } lastError: { type: string } ObjectFileListDto: type: object properties: data: type: array items: $ref: '#/components/schemas/ObjectFileItemDto' total: type: integer format: int64 ObjectFileUrlDto: type: object properties: url: { type: string } ObjectFileUploadInitRequest: type: object required: [ filename, sizeBytes ] properties: prefix: { type: string } filename: { type: string } contentType: { type: string } sizeBytes: { type: integer, format: int64 } ObjectFileUploadInitDto: type: object properties: objectKey: { type: string } provider: { type: string } uploadUrl: { type: string } method: { type: string } headers: type: object additionalProperties: { type: string } expiresAt: { type: integer, format: int64 } providerExtras: type: object additionalProperties: { type: string } ObjectFileUploadCompleteRequest: type: object required: [ objectKey ] properties: objectKey: { type: string } ObjectFileUploadAbortRequest: type: object required: [ objectKey ] properties: objectKey: { type: string } ObjectFileUploadHeartbeatRequest: type: object required: [ objectKey ] properties: objectKey: { type: string } ObjectFileBatchDeleteRequest: type: object required: [ objectKeys ] properties: objectKeys: type: array items: { type: string } ObjectBatchResultDto: type: object properties: success: { type: boolean } failedIds: type: array items: { type: string } ObjectStorageSyncTaskDto: type: object properties: id: { type: string } bucket: { type: string } provider: { type: string } status: { type: string } scannedCount: { type: integer, format: int64 } inSyncCount: { type: integer, format: int64 } ossOnlyCount: { type: integer, format: int64 } dbOnlyCount: { type: integer, format: int64 } mismatchCount: { type: integer, format: int64 } inProgressCount: { type: integer, format: int64 } errorMessage: { type: string } createdAt: { type: integer, format: int64 } startedAt: { type: integer, format: int64 } completedAt: { type: integer, format: int64 } ObjectStorageSyncDiffDto: type: object properties: id: { type: string } objectKey: { type: string } diffType: { type: string } resolutionStatus: { type: string } ossEtag: { type: string } ossSize: { type: integer, format: int64 } ossModifiedAt: { type: integer, format: int64 } dbEtag: { type: string } dbSize: { type: integer, format: int64 } dbModifiedAt: { type: integer, format: int64 } resolutionAction: { type: string } resolutionError: { type: string } ObjectStorageSyncDiffListDto: type: object properties: data: type: array items: $ref: '#/components/schemas/ObjectStorageSyncDiffDto' total: type: integer format: int64 ObjectStorageResolveRequest: type: object required: [ diffIds, action ] properties: diffIds: type: array items: { type: string } action: { type: string } FileDto: type: object properties: id: type: integer description: 文件ID fullFileName: type: string description: 文件全名 relativePath: type: string description: 知识库仓库内相对路径(相对 repo 根目录) url: type: string description: 文件URL RagInfoDto: type: object properties: textChunkId: type: string description: 文本块ID textChunk: type: string description: 文本块 srcFile: $ref: '#/components/schemas/FileDto' LoginRequestDto: type: object properties: username: type: string password: type: string format: password validateCode: type: string description: 验证码 hash: type: string description: 验证码Hash AuthResultDto: type: object properties: token: type: string description: JWT access token expiresIn: type: integer format: int64 description: token 有效秒数 SessionInfoDto: type: object properties: userId: type: string description: 用户ID username: type: string description: 用户名 role: type: integer description: 用户角色 UserDto: type: object properties: userId: type: string description: 用户ID username: type: string description: 用户名 role: type: integer description: 用户角色,1-系统管理员,2-知识库管理员,3-普通用户 createTime: type: integer format: int64 description: 创建时间 email: type: string description: 邮箱 deleted: type: boolean description: 是否为从审计历史反查出的已删除用户 UserListDto: type: object properties: data: type: array items: $ref: '#/components/schemas/UserDto' UserCreateRequestDto: type: object properties: username: type: string description: 用户名 password: type: string format: password description: 密码 role: type: integer description: 用户角色,1-系统管理员,2-知识库管理员,3-普通用户 UserRoleUpdateRequestDto: type: object properties: userId: type: string description: 用户ID role: type: integer description: 用户角色,1-系统管理员,2-知识库管理员,3-普通用户 UserPasswordUpdateRequestDto: type: object properties: userId: type: string description: 用户ID,不传时修改当前用户密码 newPassword: type: string format: password description: 新密码 ApiKeyCreateRequestDto: type: object required: [keyName, username] properties: keyName: { type: string, description: API Key 显示名称 } username: { type: string, description: 新建 API 专用用户名 } role: { type: integer, description: 用户角色,1-系统管理员,2-知识库管理员,3-普通用户 } ApiKeyRoleUpdateRequestDto: type: object required: [role] properties: role: { type: integer, description: 用户角色,1-系统管理员,2-知识库管理员,3-普通用户 } ApiKeyDto: type: object properties: id: { type: string } keyName: { type: string } userId: { type: string } username: { type: string } role: { type: integer } maskedKey: { type: string, description: 脱敏后的 API Key } createTime: { type: integer, format: int64 } lastUsedTime: { type: integer, format: int64 } ApiKeyCreateResultDto: type: object properties: key: { $ref: '#/components/schemas/ApiKeyDto' } apiKey: { type: string, description: 仅创建时返回一次的完整 API Key } RegisterEnabledDto: type: object properties: enabled: type: boolean description: 是否开启邮箱自助注册 RegisterSendCodeRequestDto: type: object properties: email: type: string description: 注册邮箱 validateCode: type: string description: 人机验证码 hash: type: string description: 人机验证码 Hash RegisterRequestDto: type: object properties: username: type: string description: 用户名(可选,默认与邮箱相同) password: type: string format: password description: 密码 email: type: string description: 邮箱 code: type: string description: 邮箱验证码 ResetPasswordSendCodeRequestDto: type: object properties: email: type: string description: 注册邮箱 validateCode: type: string description: 人机验证码 hash: type: string description: 人机验证码 Hash ResetPasswordRequestDto: type: object properties: email: type: string description: 邮箱 newPassword: type: string format: password description: 新密码 code: type: string description: 邮箱验证码 ValidateCaptchaDto: type: object properties: sliderX: type: number format: float hash: type: string track: type: array items: $ref: '#/components/schemas/Track' required: - sliderX - hash ValidatePowCaptchaDto: type: object properties: hash: type: string powNonce: type: string required: - hash - powNonce Track: type: object properties: t: type: integer format: int64 description: 时间戳 pointerX: type: number format: float description: 光标在屏幕上的x坐标 pointerY: type: number format: float description: 光标在屏幕上的y坐标 SlideCaptchaResp: type: object description: 滑动验证码 properties: hash: type: string description: 验证码签名 puzzleUrl: type: string description: 凹槽图片url width: type: integer format: int32 description: 凹槽图片宽度 height: type: integer format: int32 description: 凹槽图片高度 sliderUrl: type: string description: 滑块图片url sliderSize: type: integer format: int32 description: 滑块图片宽度 sliderY: type: number format: float description: 滑块图片高度 PowCaptchaResp: type: object description: 纯 PoW 验证挑战 properties: hash: type: string description: 验证码签名 powSalt: type: string description: PoW salt powDifficulty: type: integer format: int32 description: PoW 难度(前导零个数) EmbeddingsRequestDto: type: object properties: input: type: array items: type: string EmbeddingsResponseDto: type: object properties: data: type: array items: $ref: '#/components/schemas/EmbeddingsDtoItem' EmbeddingsDtoItem: type: object properties: hash: type: string embeddingModel: type: string embeddingProvider: type: string text: type: string embeddings: type: array items: type: number format: float KnowledgeRetrieveItemDto: type: object properties: hash: description: 嵌入text的哈希值(SHA-1),同时也作为唯一标识符 type: string score: description: 匹配度[-1,1] type: number format: float hybridScore: description: 混合检索得分 type: number format: float denseScore: description: 稠密向量检索得分 type: number format: float sparseScore: description: 稀疏向量检索得分 type: number format: float metricType: type: string enum: [ "L2", "IP", "COSINE", "JACCARD" ] denseMetricType: description: 稠密向量检索指标 type: string enum: [ "L2", "IP", "COSINE", "JACCARD" ] sparseMetricType: description: 稀疏向量检索指标 type: string enum: [ "BM25" ] embeddingModel: type: string embeddingProvider: type: string dimension: description: 嵌入向量的维度 type: integer outline: description: 嵌入文本值 type: string textChunk: description: 文本块 type: string textChunkId: description: 文本块ID type: string sourceFile: description: 源文件路径 type: string isFiltered: type: boolean default: false description: 是否被表达式过滤 KnowledgeGetListDto: type: object properties: data: type: array items: $ref: '#/components/schemas/KnowledgeDto' KnowledgeCollectionListDto: type: object properties: data: type: array items: $ref: '#/components/schemas/KnowledgeCollectionDto' KnowledgeCollectionDto: type: object properties: repositoryId: type: string description: 知识仓库ID,聊天请求优先使用此ID collection: type: string description: Milvus collection 名称,用于检索请求 selectionValue: type: string description: 前端选择值,按 collection 去重后与 collection 保持一致 name: type: string description: 前端展示名称;多个知识库复用同一 collection 时用逗号拼接知识库名称,单个空名称显示 -- repoCode: type: string description: 知识库目录名 repositoryName: type: string description: 仓库级展示名称 type: type: string description: 仓库类型 KnowledgeSyncResult: type: object description: 知识库目录同步提交结果(异步接受或拒绝) properties: success: type: boolean description: 是否成功接受后台同步任务 message: type: string description: 失败原因或接受提示(成功时可为空) KnowledgeSyncStatusDto: type: object description: 知识库维护运行时状态(Embedding 健康 + 同步任务 + 文件进度) properties: ready: type: boolean description: Embedding 是否已探测成功且可用于知识库写入 dimension: type: integer description: 探测到的向量维度 modelName: type: string description: 当前生效 Embedding 模型名 providerType: type: string description: 当前生效 Embedding provider embeddingBatchSize: type: integer description: 当前生效的 Embedding API 批量大小 lastProbeTime: type: integer format: int64 description: 最近一次 Embedding 探测时间(毫秒) probeError: type: string description: Embedding 探测失败时的错误信息 taskType: type: string description: 维护任务类型 enum: [ IDLE, INITIALIZING, PROBING, INCREMENTAL_SYNC, FULL_REBUILD, FAILED ] maintenanceActive: type: boolean description: 是否有进行中的维护任务 fullRebuildRunning: type: boolean description: 完全重建主体是否执行中 exclusiveSyncActive: type: boolean description: exclusive 重建门禁是否生效 lastFailureMessage: type: string description: 最近一次失败原因 phase: type: string description: 本轮文件同步阶段 enum: [ IDLE, PREPARING, SCANNING, DELETING, UPSERTING, COMPLETED ] totalCount: type: integer description: 本轮 diff 文件总数 processedCount: type: integer description: 已处理文件数 currentFilePath: type: string description: 当前正在处理的文件路径 files: type: array description: 本轮 diff 文件进度 items: $ref: '#/components/schemas/KnowledgeSyncFileStatusDto' KnowledgeSyncFileStatusDto: type: object description: 本轮同步中的单文件状态 properties: filePath: type: string description: 仓库内相对路径 changeType: type: string description: 变更类型 enum: [ ADDED, MODIFIED, DELETED ] status: type: string description: 处理状态 enum: [ PENDING, IN_PROGRESS, SYNCED, DELETED, SKIPPED, FAILED ] collection: type: string description: 目标 collection knowledgeCount: type: integer description: 写入的知识条数 errorMessage: type: string description: 跳过或失败原因 KnowledgeDto: type: object properties: textChunkId: type: string description: 逻辑文本块 ID(UUIDv7) outline: type: array description: 标题链(heading_path) items: type: string textChunk: type: string description: 完整正文(MySQL LONGTEXT) embeddingModel: type: string description: 嵌入模型名称 embeddingProvider: type: string description: 嵌入模型提供商名称 dimension: description: 嵌入向量的维度 type: integer description: type: string description: 描述 fileName: type: string description: 文件名 fileId: type: integer description: 文件ID sourceFile: type: string description: 源文件路径 createTime: type: integer description: 创建时间 format: int64 updateTime: type: integer description: 更新时间 format: int64 createUsername: type: string description: 创建者 KnowledgeAddDto: type: object properties: id: type: string description: 逻辑文本块 ID(UUIDv7) outline: type: array description: 标题链(heading_path) items: type: string textChunk: type: string description: 完整正文(MySQL LONGTEXT) description: type: string description: 描述 fileId: type: integer description: 文件ID classify: type: string description: 分类(/分隔) example: 数通/配置 fileLocation: type: string description: 文件中的位置 KnowledgeRetrieveResponseDto: type: object properties: data: type: array items: $ref: '#/components/schemas/KnowledgeRetrieveItemDto' ContextIdDto: type: object properties: contextId: type: string AgentInfoDto: type: object description: 已注册智能体摘要 properties: agentId: type: string description: 智能体唯一标识 name: type: string description: 当前语言下的智能体展示名称 description: type: string description: 当前语言下的智能体描述 showHotQuestions: type: boolean description: 是否在聊天页展示热门问题模板 sort: type: integer description: 展示排序权重,越小越靠前 logo: type: string description: 列表与聊天页 emoji logo AgentInfoList: type: object properties: agents: type: array items: $ref: '#/components/schemas/AgentInfoDto' AgentPluginPackageDto: type: object description: 已安装的 Agent 插件包 properties: agentDir: type: string description: 安装目录名,如 example-agent-1.0.0-SNAPSHOT jarName: type: string description: 包内 JAR 文件名 agentIds: type: array items: type: string description: 预扫描得到的插件 agentId 列表 loaded: type: boolean description: 是否已在当前 reload 中成功加载 AgentPluginStatusDto: type: object description: Agent 插件状态 properties: jarFiles: type: array items: type: string description: 目录下的 JAR 文件名列表 loadedAgentIds: type: array items: type: string description: 当前已由插件 JAR 加载的 agentId 列表 packages: type: array items: $ref: '#/components/schemas/AgentPluginPackageDto' description: 已安装插件包列表 AgentInstallResult: type: object description: Agent 插件安装结果 properties: success: type: boolean description: 是否安装成功 message: type: string description: 失败原因(成功时可为空) conflict: type: boolean description: 是否因冲突被拒绝(需用户确认 replace 后重试) conflictingAgentIds: type: array items: type: string description: 与已安装插件冲突的 agentId existingAgentDir: type: string description: 冲突时已存在的安装目录名 incomingAgentIds: type: array items: type: string description: 待安装包中的 agentId jarFiles: type: array items: type: string description: 安装后目录下的 JAR 标签列表 loadedAgentIds: type: array items: type: string description: 安装重载后由插件加载的 agentId 列表 AgentReloadResult: type: object description: Agent 插件 JAR 重载结果 properties: success: type: boolean description: 是否重载成功 message: type: string description: 失败原因(成功时可为空) jarFiles: type: array items: type: string description: 目录下的 JAR 文件名列表 loadedAgentIds: type: array items: type: string description: 重载后由插件加载的 agentId 列表 AskQuestionDto: type: object description: Agent 向用户提问并等待用户补充输入 required: [ type, version, question, options ] properties: type: type: string enum: [ ask_question ] description: 固定为 ask_question version: type: integer description: 协议版本 default: 1 question: type: string description: 面向用户展示的问题 options: type: array description: LLM 生成的候选回答选项 items: type: string TurnStepDto: type: object description: Agent 单轮状态轨迹中的一个步骤 properties: state: type: string enum: [ "IDLE", "AGENT_ORCHESTRATING", "THINKING", "STREAMING_TEXT", "CALLING_TOOL", "LOAD_SKILL", "COMPLETED", "FAILED", "CANCELLED" ] description: Agent 状态 toolName: type: string description: 工具或技能名称(CALLING_TOOL / LOAD_SKILL 时) ts: type: integer format: int64 description: 步骤时间戳(毫秒) MessageDto: type: object description: 聊天消息 properties: index: type: integer description: 消息序号 role: type: string enum: [ "system", "user", "assistant", "tool" ] description: 角色 content: type: string description: 面向用户的最终回答正文 reasoningContent: type: string description: Provider 深度思考推理正文(Anthropic/Ollama reasoningContent),与 content 并列 displayInChat: type: boolean description: 是否在会话主界面渲染气泡;false 表示仅模型上下文或折叠展示(如纯工具调用轮次) default: true messageKind: type: string enum: [ "normal", "tool_round", "tool_result" ] description: 消息子类型,便于前端区分样式 turnSteps: type: array description: 该条 assistant 回复对应的 Agent 执行步骤轨迹(历史回放) items: $ref: '#/components/schemas/TurnStepDto' feedback: type: integer description: 反馈 enum: [ 0, 1, 2 ] x-enum-varnames: [ "NONE", "GOOD", "BAD" ] srcFile: type: array items: $ref: '#/components/schemas/FileDto' attachments: type: array description: 用户消息携带的对象存储附件 items: $ref: '#/components/schemas/ChatAttachmentDto' pendingQuestion: $ref: '#/components/schemas/AskQuestionDto' ChatAttachmentDto: type: object required: [ name, contentType ] properties: objectKey: type: string description: 对象存储键;历史消息与预览使用。新发图片可省略,由服务端上传后回填 name: type: string description: 原始文件名 contentType: type: string description: MIME 类型 size: type: integer format: int64 description: 文件大小 url: type: string description: 历史展示使用的稳定内容地址 data: type: string description: Base64 编码的图片字节,仅 WebSocket 发送消息时使用,服务端上传 OSS 后不持久化 ChatRequestDto: type: object properties: background: type: boolean default: false description: 仅 WebSocket 消息中显式传入 JSON 布尔 true 时允许断线后继续;连接按最近一条消息决定后台模式,否则断线调用会话停止逻辑 contextId: type: string description: 会话ID messages: type: array items: $ref: '#/components/schemas/MessageDto' retrievalKb: type: boolean description: 是否检索知识库 default: true toolGroupName: type: array description: 使用的工具组 default: [ "general" ] items: type: string systemPrompt: type: string description: 系统提示词 default: GENERAL_ASSISTANT enum: [ GENERAL_ASSISTANT, TOOL_USE ] thinkingMode: type: string description: 本轮深度思考;不传则按 Agent 默认再回退提供商配置。provider_default 不向 API 传 thinking,由提供商/模型默认 enum: [ provider_default, on, off ] manualOrchestrateAgentId: type: string description: 通用助手手动直连的子智能体 ID;仅 universal_assistant 生效,传入后跳过编排决策 knowledgeRepositoryIds: type: array description: 本轮明确选择的知识仓库ID;每轮重新校验读取权限 items: type: string knowledgeCollections: type: array description: 通用知识库问答助手本轮选择的知识库 collection 列表;仅 knowledge_qa_assistant 生效 items: type: string ChatResponseDto: type: object properties: contextId: type: string description: 聊天上下文ID message: $ref: '#/components/schemas/MessageDto' done: type: boolean default: false error: type: boolean default: false errorCode: type: string errorMessage: type: string HistoryContextList: type: object properties: data: type: array items: $ref: '#/components/schemas/HistoryContextItem' HistoryContextItem: type: object description: 聊天历史 properties: contextId: type: string description: 聊天上下文ID agentId: type: string description: 智能体ID(与记忆隔离维度一致,非空) userId: type: string description: 已废弃;用户态历史列表不再返回。跨用户场景请用 AuditContextItemDto.username/userId deprecated: true title: type: string description: 标题 lastUpdateTime: type: integer format: int64 description: 最后访问时间 ChatContextDto: type: object description: 聊天对话上下文 properties: contextId: type: string description: 聊天上下文ID agentId: type: string description: 智能体ID messages: type: array items: $ref: '#/components/schemas/MessageDto' MessageFeedbackRequest: type: object properties: contextId: type: string description: 上下文ID agentId: type: string description: 智能体ID(必填非空,与记忆隔离维度一致) index: type: integer description: 消息序号 feedback: type: integer description: 反馈 enum: [ 0, 1, 2 ] x-enum-varnames: [ "NONE", "GOOD", "BAD" ] CheckApiResponse: type: object properties: status: type: integer description: 0 - 正常,1 - 连接异常,2 - 认证异常 enum: [ 0, 1, 2 ] x-enum-varnames: [ "NORMAL", "CONNECT_ERROR", "AUTH_ERROR" ] description: type: string description: 描述 PropertyDto: type: object properties: propertyName: type: string description: 属性名称 propertyValue: type: string description: 值 ProviderConfigDto: type: object description: 模型提供商配置(LLM/Embedding),apiKey 已脱敏 properties: id: type: string description: 主键(UUIDv7) apiType: type: string description: API 类型 enum: [ llm, embedding ] configName: type: string description: 配置名称 providerType: type: string description: 提供商类型 config: type: object description: 提供商差异化字段;不同 providerType 字段集合不同 additionalProperties: true enabled: type: boolean description: 是否启用 isCurrent: type: boolean description: 是否当前生效 description: type: string description: 描述 createTime: type: integer format: int64 description: 创建时间(毫秒) updateTime: type: integer format: int64 description: 更新时间(毫秒) ProviderConfigUpsertDto: type: object description: 新增/更新模型提供商配置入参 required: - configName - providerType properties: apiType: type: string description: API 类型(仅新增时必填;更新时忽略) enum: [ llm, embedding ] configName: type: string description: 配置名称(展示用,可重复) providerType: type: string description: 提供商类型 config: type: object description: 提供商差异化字段;apiKey 留空表示沿用原值 additionalProperties: true description: type: string description: 描述 enabled: type: boolean description: 是否启用,默认 true default: true makeCurrent: type: boolean description: 新增时是否立即设为当前生效 default: false EmbeddingRuntimeStatusDto: type: object description: Embedding 运行时探测状态 properties: ready: type: boolean description: 是否已探测成功且可用于知识库写入 dimension: type: integer description: 探测到的向量维度 checkEmbeddingHash: type: string description: 探针向量 SHA-256,用于标记向量版本 modelName: type: string description: 当前生效模型名 providerType: type: string description: 当前生效 provider lastProbeTime: type: integer format: int64 description: 最近一次探测时间(毫秒) probeError: type: string description: 探测失败时的错误信息 fullRebuildRunning: type: boolean description: 知识库 exclusive 完全重建是否进行中 embeddingBatchSize: type: integer description: 当前生效的 Embedding API 批量大小(默认 10) McpToolItem: type: object properties: name: type: string description: 接口名称 description: type: string description: 接口描述 McpStatusItem: type: object properties: name: type: string description: MCP 服务名称 type: type: string description: MCP 类型 endpoint: type: string description: MCP 接口地址或命令 status: type: string description: 在线状态 tools: type: array description: 接口列表 items: $ref: '#/components/schemas/McpToolItem' QaTemplateItem: type: object properties: question: type: string description: 问题 QaTemplateList: type: object properties: data: type: array items: $ref: '#/components/schemas/QaTemplateItem' # 审计:Token 用量按用户聚合行 AuditTokenSummaryItemDto: type: object properties: userId: { type: string } username: { type: string } callCount: { type: integer, format: int64 } inputTokens: { type: integer, format: int64 } outputTokens: { type: integer, format: int64 } billableTokens: { type: integer, format: int64 } # 审计:Token 用量总览(含全局合计) AuditTokenSummaryDto: type: object properties: data: type: array items: $ref: '#/components/schemas/AuditTokenSummaryItemDto' total: type: integer format: int64 description: 聚合用户行总数(分页用) globalCallCount: { type: integer, format: int64 } globalInputTokens: { type: integer, format: int64 } globalOutputTokens: { type: integer, format: int64 } globalBillableTokens: { type: integer, format: int64 } # 审计:Token 调用明细行 AuditTokenRecordDto: type: object properties: id: { type: string } userId: { type: string } username: { type: string } contextId: { type: string } agentId: { type: string } turnId: { type: string } callSeq: { type: integer } callKind: { type: string } providerType: { type: string } modelName: { type: string } inputTokens: { type: integer } outputTokens: { type: integer } totalTokens: { type: integer } billableTokenCount: { type: integer } usageStatus: { type: string } createTime: { type: integer, format: int64 } AuditTokenRecordListDto: type: object properties: data: type: array items: $ref: '#/components/schemas/AuditTokenRecordDto' total: type: integer format: int64 AuditTokenRecordDeleteRequestDto: type: object required: [ ids ] properties: ids: type: array minItems: 1 items: { type: string } AuditTokenUserDeleteRequestDto: type: object required: [ userIds ] properties: userIds: type: array minItems: 1 items: { type: string } AuditContextDeleteItemDto: type: object required: [ contextId, agentId ] properties: contextId: { type: string } agentId: { type: string } AuditContextDeleteRequestDto: type: object required: [ items ] properties: items: type: array minItems: 1 items: $ref: '#/components/schemas/AuditContextDeleteItemDto' # 审计:聊天会话列表(带 total) AuditContextListDto: type: object properties: data: type: array items: $ref: '#/components/schemas/AuditContextItemDto' total: type: integer format: int64 # 审计:会话列表项(独立于用户态 HistoryContextItem) AuditContextItemDto: type: object description: 审计会话列表项 properties: contextId: type: string description: 聊天上下文ID agentId: type: string description: 智能体ID userId: type: string description: 会话所属用户ID username: type: string description: 用户名(join app_user) title: type: string description: 标题 lastUpdateTime: type: integer format: int64 description: 最后更新时间(毫秒) # 审计:会话消息详情(独立于用户态 ChatContextDto) AuditContextDetailDto: type: object description: 审计会话消息详情 properties: contextId: type: string agentId: type: string userId: type: string username: type: string description: 用户名(join app_user) title: type: string lastUpdateTime: type: integer format: int64 messages: type: array items: $ref: '#/components/schemas/MessageDto'