feat(Agent):jobs and files - #46
Merged
Merged
Conversation
kongming611
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
数据库与文件库
旧 uploaded_files 直接替换为 file_objects + user_files。
增加文件去重、逻辑文件记录、访问计数和 Job 冻结文件快照。
增加 analysis_job_inputs 输入账本、waiting_input 状态、租约 fencing 和恢复字段。
checkpoint 从 MySQL 迁移后的清理流程统一使用 job_id。
Agent 与 Job 链路
Web 进程只负责鉴权、创建 Job 和 SSE。
独立 worker 负责领取任务、执行 LangGraph、调用 MCP/RAG。
支持 initial、resume、stale recovery、cancel。
SSE 事件持久化到 analysis_job_events,支持 Last-Event-ID 续传。
管理员治理
管理端增加任务输入、事件、结果和 checkpoint 安全摘要查看。
文件预览、下载、物理删除增加权限、审计、确认、重新认证和活动 Job 阻断。
修复文件审计目标类型从旧的 uploaded_file 统一为 user_file。
测试
增加 Job 恢复、输入校验、图执行、幂等、迁移和会话删除测试。
当前 Docker 单元测试结果:269 passed。