API文档维护Agent
a43ddb4b63
feat: Phase 1 - 核心重构(去Project层/标题库API/配音库API/清理废弃代码)
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
## 主要变更
### 1. 清理废弃代码(18个文件删除)
- 删除 TaskModel/MilestoneModel/TaskIssueModel 及相关文件
- 删除 ProjectTitleModel/EditPlanModel/EditPlanClipModel 及相关文件
- 清理 domain/ports/adapters/application/api 各层引用
- 从 GenerationTaskModel 移除 edit_plan_id 字段
### 2. 新建标题库 API(/api/v1/titles)
- Domain: TitleLibraryItem 数据类
- Ports: TitleLibraryRepository 接口
- Adapters: SQLAlchemy 实现(软删除)
- Application: CRUD Use Cases + 配额检查(max_titles: free=50, basic=500, premium=500)
- API: GET/POST/PUT/DELETE 端点
- Schema: Pydantic 请求/响应模型
### 3. 新建配音库 API(/api/v1/voices)
- Domain: VoiceLibraryItem 数据类
- Ports: VoiceLibraryRepository 接口
- Adapters: SQLAlchemy 实现(软删除)
- Application: CRUD Use Cases + 配额检查(max_voiceovers: free=10, basic=100, premium=100)
- API: GET/POST/PUT/DELETE 端点
- Schema: Pydantic 请求/响应模型
### 4. 去掉 Project 层依赖
- 修复 authenticated_user.id → authenticated_user.user.id bug
- asset_libraries.py: project_id 改为可选查询参数
- generated_videos.py: project_id 改为可选查询参数
- 无 project_id 时通过 find_accessible_projects 获取用户可访问的所有项目
### 5. 数据库迁移
- 创建 011_phase1_core_refactor.py
- 删除 6 个废弃表:tasks, milestones, task_issues, project_titles, edit_plans, edit_plan_clips
- 从 generation_tasks 表删除 edit_plan_id 列
### 6. 其他改进
- 迁移 EditingMode 到独立模块 packages/domain/editing_mode.py
- 注册 titles_router 和 voices_router
- 添加 get_title_library_repository 和 get_voice_library_repository 依赖
- 更新 domain/ports __init__.py 导出新实体和仓储接口
## 技术细节
- 遵循六边形架构模式
- 配额检查通过 QuotaRegistry 实现
- 软删除:标题库用 is_active=False,配音库用 status='deleted'
- 配音库支持可选的 project_id 关联
## 破坏性变更
- 删除 6 个废弃表(需先备份数据)
- 删除 /api/v1/edit-plans, /api/v1/project-titles, /api/v1/project-management 端点
- generation_tasks API 不再包含 edit_plan_id 字段
2026-06-28 15:02:10 +08:00
CI Test
095e3b5d00
fix(P2-2): SMTP_FRON_NAME 拼写错误修正为 SMTP_FROM_NAME
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-28 10:26:28 +08:00
CI Test
d1f2dbffa4
fix(P1-1): auth.py forgot_password 硬编码 localhost 改为 settings.APP_BASE_URL
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-28 10:25:03 +08:00
API文档维护Agent
e2c68888e9
refactor: 统一 OSS 配置命名(MINIO_* → OSS_*)
...
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
- .env.production: MINIO_* 环境变量全部改为 OSS_* 命名
- MINIO_ENDPOINT → OSS_ENDPOINT
- MINIO_ACCESS_KEY → OSS_ACCESS_KEY_ID
- MINIO_SECRET_KEY → OSS_ACCESS_KEY_SECRET
- MINIO_BUCKET → OSS_BUCKET_NAME
- MINIO_SECURE → OSS_SECURE
- MINIO_PUBLIC_URL → OSS_PUBLIC_URL
- .env.staging: 修正 section header 为 OSS 对象存储配置
- storage.py: 移除 MinIOService 和 get_minio_service() 向后兼容别名
- test_architecture_boundaries.py: 移除 storage.py 的 allowed 例外
- 更新文档中的 MINIO_* 示例为 OSS_*:
- docs/CI-CD.md
- docs/基础设施安装指南.md
- docs/本地验证检查清单.md
- docs/静态验证报告-2026-06-19.md
2026-06-28 08:33:48 +08:00
CI Test
28733d6fc7
feat(api): add Prometheus metrics middleware and /metrics endpoint
...
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
- Add prometheus-client==0.21.1 to requirements.txt
- Create PrometheusMetricsMiddleware to track HTTP request duration, count, and in-progress requests
- Add /metrics endpoint for Prometheus scraping
- Exclude health/ready/startup/metrics paths from recording to reduce noise
2026-06-28 08:32:28 +08:00
CI Test
e90076f794
feat(auth): implement refresh token mechanism
...
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
- Add /auth/refresh endpoint for token renewal
- Login response now includes refresh_token
- Update JWT defaults: access_token 15min, refresh_token 7days
- Reuse existing RefreshTokenUseCase with Redis session store
2026-06-27 22:57:25 +08:00
API文档维护Agent
e3fb518ab2
refactor: remove all workspace_id references from codebase
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- Remove workspace_id from Pydantic models in project_management routes
- Remove workspace_id from SQLAlchemy and SQLite project management repos
- Remove workspace_id from worker tasks (storage keys, entity creation)
- Remove workspace_id from video dedup and title usage modules
- Remove workspace_id from generation and ingest worker tasks
- Clean workspace_id from all test files and scripts
- Remove workspace-specific test files (list_workspaces, workspace repos)
Task: #14 workspace_id 残留清理
2026-06-27 22:52:09 +08:00
CI Test
8d4677ddee
fix: swap parameter order in upload_asset to fix Python syntax error
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-27 21:44:15 +08:00
xiaoxia
d1833d0bd4
fix: 修复 ENABLE_REDIS_SESSION 变量名不匹配导致登录500 ( #58 )
...
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Co-authored-by: xiaoxia-dev <dev@xiaoxiajianji.com >
Co-committed-by: xiaoxia-dev <dev@xiaoxiajianji.com >
2026-06-27 19:52:35 +08:00
API文档维护Agent
8064b64ff5
docs: API文档准确性修复
...
1. 修正上传端点schema命名:新增UploadAssetRequest模型替代自动生成的Body_upload_asset名称
2. 清理认证重复端点:移除/forgot-password和/reset-password旧路由,保留/password/forgot和/password/reset
3. 清理workspace_id残留:从edit_plan/asset_diagnosis/task_center/project_title等schema中移除,project_management和projects中改为可选
4. 更新README:移除过时的多租户/订阅/refresh token描述,修正仓库地址为git.xiaoxiajianji.com,更新API路径列表
2026-06-27 19:02:31 +08:00
Audit Bot
2c6d920bcb
fix( #25 ): 移除硬编码 localhost:3000
...
- 添加 APP_BASE_URL 配置项到 Settings
- auth.py 中改用 settings.APP_BASE_URL
- register_user_use_case.py 和 password_reset_use_case.py 移除默认值
- base_url 参数改为必须由调用方传入
- 更新 .env.example 添加 APP_BASE_URL
2026-06-27 17:20:17 +08:00
Audit Bot
b58388dec0
fix( #17 ): 调整数据库连接池配置
...
- 将 DATABASE_MAX_OVERFLOW 从 40 调整为 10
- pool_size(20) + max_overflow(10) = 最大 30 连接
- 添加注释说明连接池配置
2026-06-27 17:20:17 +08:00
xiaoxia
6ce9a0e67e
Merge pull request 'fix: Redis session env fix + JWT import path fix (登录失败根因修复)' ( #52 ) from hotfix/redis-session-env-fix into develop
2026-06-27 17:18:11 +08:00
xiaoxia
a6e85092ce
fix: 统一 ENABLE_REDIS_SESSIONS 命名,修复登录因 AttributeError 导致 500
2026-06-27 17:05:48 +08:00
xiaoxia
388aafbab0
fix: correct ENABLE_REDIS_SESSIONS typo to ENABLE_REDIS_SESSION
2026-06-27 14:45:50 +08:00
CI Bot
36e12f77a9
fix: move SmartEditPlanGenerator to domain layer, remove dead workspaces route
2026-06-27 12:44:04 +08:00
CI Bot
c98ab4c1ef
feat: decouple API and Worker cross-service dependencies
2026-06-27 10:22:25 +08:00
CI Bot
11494918eb
fix: resolve all workspace removal breakage - stub permissions, quota, ports, adapters
...
- Remove Workspace from domain/__init__.py exports
- Stub domain/permissions.py (all checks pass)
- Stub domain/quota.py (all checks pass)
- Create missing port stubs: workspace_member_repository, workspace_repository, workspace_invitation_repository
- Create missing adapter stubs: workspace_repository, workspace_invitation_repository
- Create routes/permissions.py stub (require_workspace_member no-op)
- Fix .env Redis URL encoding on production server
2026-06-27 09:16:53 +08:00
CI Bot
38c66a9c68
fix: add workspace_id compatibility for removed workspace concept
2026-06-27 08:43:02 +08:00
CI Bot
9f6ed89c09
fix: update default APP_VERSION to 0.1.61
2026-06-27 00:42:24 +08:00
CI Bot
60adbf95ce
chore: remove redundant .github/workflows (using Gitea Actions)
2026-06-27 00:41:09 +08:00
xiaoxia
0e1f411356
fix: 修复 DATABASE_POOL_RECYLE 拼写错误 -> DATABASE_POOL_RECYCLE
...
- 将配置变量名从 DATABASE_POOL_RECYLE 更改为 DATABASE_POOL_RECYCLE
- 修正了拼写错误,使配置与标准 SQLAlchemy 命名一致
2026-06-27 00:01:44 +08:00
CI Bot
db8c6d55ce
fix: 统一编辑模式枚举名并删除重复workflow
...
1. 修复 edit_plan_generator.py 中的枚举名与 editing_modes.py 保持一致:
- ONE_TAKE: one-take -> one_take
- VOICEOVER -> VOICE_OVER: voiceover -> voice_over
2. 更新相关文档字符串和注释
3. 删除重复的 .gitea/workflows/tests.yml (ci-cd.yml 已包含完整测试)
2026-06-26 23:12:06 +08:00
CI Bot
a97e3e72e9
fix: 修复 dedup.py 语法错误和 pHash DCT 实现,修复 chunked_upload.py 缩进错误
2026-06-26 22:46:21 +08:00
CI Test
cd887909c7
chore: squash merge feature/smart-edit-plan into develop (resolve conflicts)
...
- Resolve CI/CD and deploy workflow conflicts with develop version
- Resolve database and dependencies conflicts with develop version
- Keep new edit plan generator and API functionality from feature branch
2026-06-26 21:21:39 +08:00
xiaoxia
f687b4207f
feat: add download_url field to generated video APIs ( #20 )
2026-06-26 21:13:18 +08:00
xiaoxia
84f3465778
feat: add chunked upload API for large file uploads ( #21 )
...
feat: add chunked upload API for large file uploads (#21 )
2026-06-26 20:57:56 +08:00
xiaoxia
0422967229
refactor: Remove workspace concept - Projects now directly under User
...
BREAKING CHANGES:
- Removed Workspace, WorkspaceMember, WorkspaceInvitation entities
- Project now has owner_user_id instead of workspace_id
- Added shared_users list to Project for collaboration
- Subscription/quota moved from Workspace to User level
Changes:
- packages/domain/entities.py: Removed Workspace entities, updated Project
- packages/adapters/sqlalchemy_impl/models.py: Updated models
- packages/application/: Removed workspace use cases, updated other use cases
- packages/ports/: Removed workspace repository interfaces
- apps/api/: Updated routes, schemas, dependencies, router
- alembic/versions/007_remove_workspace_concept.py: Database migration
New APIs:
- POST /projects/{id}/share: Share project with user
- DELETE /projects/{id}/share/{user_id}: Unshare project
2026-06-26 19:16:54 +08:00
xiaoxia
ec76490135
P3-1: database.py 统一使用 config.py 中的 Settings,消除配置重复定义
2026-06-26 18:37:58 +08:00
xiaoxia
af19642f57
P2-4: dependencies.py 添加返回类型注解
2026-06-26 18:37:11 +08:00
xiaoxia
0b3cb8487c
P2-1 & P2-5: 移除 upload.py 中重复的 _require_workspace_member,添加服务端 MIME type 验证
2026-06-26 18:35:21 +08:00
xiaoxia
6204d2fa45
P2-1: 移除 projects.py 中重复的 _require_workspace_member 函数,使用 permissions.py 中的共享函数
2026-06-26 18:34:41 +08:00
xiaoxia
f42e5618ba
Merge pull request 'fix(p1): 修复 4 个 P1 技术债务问题' ( #11 ) from fix/p1-technical-debt into main
2026-06-26 18:13:41 +08:00
Coze Agent
07b5589253
fix(p1): resolve 4 P1 technical debt issues
...
- P1-1: CORS configuration security - use DEBUG mode to differentiate
production vs development CORS settings
- P1-2: Implement token refresh logic in RefreshTokenUseCase
- Add get_session_by_refresh_token to SessionStore
- Verify session validity and expiry
- Generate new access token on refresh
- P1-3: Fix database connection leak in worker ingest task
- Add proper try-except-finally block
- Ensure db.close() is always called
- P1-4: Implement real media metadata extraction
- Use ffprobe for video metadata
- Use Pillow for image metadata
- Return empty dict on failure (no mock data)
2026-06-26 18:11:07 +08:00
xiaoxia
a2fc3a0e2a
fix: resolve CI check failures - format code and fix line length issues
2026-06-26 18:00:53 +08:00
xiaoxia
b966d24ecf
fix: resolve CI check failures - format code and add nosec comment
2026-06-26 18:00:11 +08:00
xiaoxia
394637d1eb
fix: P2-4 add complete type annotations to dependencies
2026-06-26 17:58:25 +08:00
xiaoxia
7651a5f3f2
fix: P3-1 unify database config with app.config
2026-06-26 17:56:33 +08:00
xiaoxia
7ef99afa4c
fix(P2-5): add server-side file type validation with magic
2026-06-26 17:54:03 +08:00
xiaoxia
73043ed72b
fix(P1-1): resolve CORS configuration security issue
2026-06-26 17:48:57 +08:00
xiaoxia
0e4a07f0c1
fix(security): P0 - 日志过滤敏感参数(token/password/secret等)
2026-06-26 17:43:35 +08:00
xiaoxia
c04b57a1f8
fix(security): P0 - JWT密钥强制环境变量,拒绝默认值
2026-06-26 17:43:35 +08:00
Xiaoxia AI
0ed3cb7ef5
fix(ci): run unit tests with API path
2026-06-24 20:18:08 +08:00
Xiaoxia AI
6e8394d749
style: sort Python imports for CI
2026-06-24 19:57:19 +08:00
Xiaoxia AI
f85e389ced
style: format Python files for CI
2026-06-24 19:54:36 +08:00
Xiaoxia AI
0f59b412bc
feat(plans): add edit plan preview workflow
2026-06-24 10:10:25 +08:00
Xiaoxia AI
ea3a4c4111
feat(tasks): retry failed project tasks
2026-06-24 09:19:23 +08:00
Xiaoxia AI
ee6b4a663a
feat(tasks): add project task center
2026-06-24 08:39:32 +08:00
Xiaoxia AI
8acbd6c8a7
feat(results): add generated video management
2026-06-24 06:28:06 +08:00
Xiaoxia AI
17021c351f
feat(titles): complete title selection workflow
2026-06-24 00:55:00 +08:00