Commit Graph

51 Commits

Author SHA1 Message Date
qzl 4afc67b7a8 feat: extend init_data to load and sync user_agent_catalog
- Add UserAgentCatalogSeed and UserAgentCatalogYaml Pydantic models
- Add load_user_agent_catalog function to load from YAML
- Add _upsert_user_agent_catalog helper for upsert logic
- Add initialize_user_agent_catalog function for initialization
- Refactor initialize_data to call initialize_llm_catalog and initialize_user_agent_catalog
- Fix UserAgentCatalog.llm_id type from str to uuid.UUID
2026-03-02 15:58:13 +08:00
qzl fb8f4fdeeb fix(migration): allow multiple agents per user (one per agent_type)
- Drop single-column UNIQUE constraint on user_agents.user_id
- Add composite UNIQUE constraint on (user_id, agent_type)
- Enables trigger to insert 3 agents per user (INTENT_RECOGNITION, TASK_EXECUTION, RESULT_REPORTING)
- Maintain reversible downgrade path
2026-03-02 15:51:04 +08:00
qzl 27b09ce9c0 feat(migration): add user_agent_catalog table and update trigger 2026-03-02 15:36:25 +08:00
qzl 97626ec2c4 feat(models): add UserAgentCatalog model 2026-03-02 15:31:20 +08:00
qzl 06e9a25f57 feat(config): add user_agent_catalog.yaml with default agent configs 2026-03-02 15:27:24 +08:00
qzl e161ca22c4 refactor(chat): 重构聊天模块并集成历史消息加载功能
- 删除冗余的 chat_history_repository 和 home_mock_data
- 简化 ag_ui_event fromJson 使用工厂映射表
- 提取 ChatBloc 事件处理方法,添加 loadHistory/loadMoreHistory
- HomeScreen 集成 ChatBloc 实现历史消息加载和下拉刷新
- 更新 AGENTS.md 文档约束
2026-03-02 15:05:10 +08:00
qzl 6b32990986 refactor: 重构 config 目录结构,按领域分类静态配置 2026-03-02 14:40:45 +08:00
qzl 99d540a18d refactor: 重命名 agent_chat 模块为 agent 2026-03-02 11:13:20 +08:00
qzl 2ac56e5084 docs: 整理 runtime 系列文档,修正 API 端点名称 2026-03-02 10:55:46 +08:00
qzl b417bc800a Merge branch 'feature-calendar-sharing' into dev 2026-02-28 13:28:49 +08:00
qzl 62500160ae fix: add type annotations to PermissionBits 2026-02-28 13:26:20 +08:00
qzl c22692ed1d refactor: simplify code - extract constants, reduce complexity 2026-02-28 12:48:01 +08:00
qzl ce8cd1d31f fix: address CRITICAL security issues - permission escalation and encoding inconsistency 2026-02-28 12:40:40 +08:00
qzl 173d91086f test: add calendar sharing tests and update API docs 2026-02-28 12:28:45 +08:00
qzl 330589f702 Merge remote-tracking branch 'origin/feature/friendship' into dev 2026-02-28 12:22:18 +08:00
qzl e0cd20f16e test: add integration tests for friendship routes 2026-02-28 12:16:06 +08:00
qzl 7a49783156 feat: add share calendar API 2026-02-28 12:15:59 +08:00
qzl 4c4f253c11 feat(friendships): implement dependencies and router with CRUD endpoints 2026-02-28 12:10:03 +08:00
qzl 709ae5ab73 feat: add inbox messages module for calendar invitations 2026-02-28 12:09:34 +08:00
qzl ea4a50d79c feat(friendships): add structured logging to FriendshipService 2026-02-28 12:08:01 +08:00
qzl b66a8499ed fix: change friendship status values from accepted/pending to active in tests 2026-02-28 12:04:26 +08:00
qzl 17551d662b feat(friendships): implement FriendshipService with TDD
- Add send_request(), accept_request(), decline_request(), cancel_request()
- Add get_inbox(), get_outgoing_requests(), get_friends_list(), remove_friend()
- Add unit tests for all service methods (14 tests)
- Update FriendRequestResponse schema to include 'canceled' status
- Follow async SQLAlchemy patterns and BaseService conventions
2026-02-28 12:01:57 +08:00
qzl 0dfc52cbf7 fix: improve friendships schemas type safety and consistency 2026-02-28 11:35:13 +08:00
qzl 9b48939de8 fix: address code review issues and improve code quality
- Add owner_id check in repository delete operation
- Fix time range validation for partial updates
- Wrap pre-query in try/except for consistent error handling
- Use default_factory instead of mutable defaults
- Add max_length constraint for timezone field
- Remove unused dependencies and empty validators
- Extract magic numbers to constants
- Simplify update logic with model_dump
2026-02-28 11:34:49 +08:00
qzl 50b38de488 feat: add schedule items CRUD API
- Add ScheduleItem Pydantic schemas with metadata support
- Add repository layer with CRUD operations
- Add service layer with authorization
- Add FastAPI router with all endpoints
- Add unit and integration tests
- Update API documentation
2026-02-28 11:34:49 +08:00
qzl 598c6c2ec5 feat(friendships): create module structure and schemas 2026-02-28 11:30:18 +08:00
qzl dbd3f68dd4 test: add invite code validation tests and fix migration rollback
- Add TestInviteCodeSignup integration tests for valid/invalid invite codes
- Fix migration downgrade: avoid dropping trigger dependency
- Add DB CHECK constraint for invite_codes.code format
- Update runtime-route.md with invite_code documentation
- Update runtime-runbook.md with change log
2026-02-28 10:56:09 +08:00
qzl 80d04688fc feat: add invite code feature (create, validate, referrer tracking) 2026-02-27 17:27:55 +08:00
qzl e4e995854d feat: 实现密码重置功能与用户搜索API,优化注册登录流程
- 新增忘记密码页面与重置密码确认流程(前端+后端)
- 修复注册验证码页登录跳转路由
- 新增用户搜索API(按邮箱查询)
- 简化infra脚本,统一为app.sh
- 补充密码重置与用户API测试覆盖
- 更新runtime文档与AGENTS配置
2026-02-27 15:22:42 +08:00
qzl 76853452f6 chore: commit remaining workspace updates
include AGENTS guidance updates, plan doc replacements, and utility script changes left in working tree
2026-02-26 17:59:30 +08:00
qzl f3d08a7fcf refactor: remove legacy migration revisions
drop obsolete alembic history replaced by the new split social schema migration chain
2026-02-26 17:58:49 +08:00
qzl 6641eba9df feat: split initial social schema migration chain
replace monolithic migration with ordered scripts, include profiles/sessions in migration, and verify full downgrade/upgrade cycle for clean Supabase bootstrap
2026-02-26 17:58:37 +08:00
qzl 2994cc708c fix: update E2E tests for RESTful endpoints 2026-02-26 14:43:52 +08:00
qzl 8e493ae7fd docs: add runtime route documentation and AGENTS.md rule 2026-02-26 14:37:51 +08:00
qzl 5b8b584013 test: verify signup_start response only contains email 2026-02-26 14:12:39 +08:00
qzl 2709d88c68 test: update integration tests for RESTful routes 2026-02-26 14:08:10 +08:00
qzl 3cab7b03f7 refactor: Phase 2 - rename routes to RESTful style 2026-02-26 13:41:32 +08:00
qzl 4b707c7da1 fix: add missing get_user_repository function 2026-02-26 13:36:34 +08:00
qzl 04726b42cb refactor: Phase 1 - rename and simplify backend schemas 2026-02-26 13:33:02 +08:00
qzl 11666e6492 fix(auth): validation toast and rate limit adjustment 2026-02-26 12:07:40 +08:00
qzl 443977be9b fix(security): enforce defensive RLS for agent chat tables
Close Supabase advisor findings by enabling RLS and deny-by-default policies on new public agent-chat tables. Clarify backend RLS governance and incident runbook steps to prevent config-drift regressions.
2026-02-25 18:04:05 +08:00
qzl 890de969cc merge: combine local dev updates into dev 2026-02-25 17:05:04 +08:00
qzl ce6388595b chore: snapshot local dev updates before merge 2026-02-25 17:04:17 +08:00
qzl cd40b2b4f4 feat(agent-chat): complete core workflow and strengthen auth rate limiting 2026-02-25 16:51:12 +08:00
qzl 1cc8fa1abf feat(auth): switch signup to OTP verification flow
Replace legacy signup with start/verify/resend endpoints, add OTP-focused mail templates and auth rate limits, and align compose/env/runbook for local self-hosted Supabase OTP behavior.
2026-02-25 13:34:02 +08:00
qzl a6b5d087f8 fix: scope log filenames by service under root logs dir 2026-02-25 10:39:47 +08:00
qzl d16e66807d chore: lock runtime log output paths and ignore local logs 2026-02-25 10:32:19 +08:00
qzl 7d6dda57c1 feat: complete auth/profile username migration and runtime safeguards 2026-02-25 10:20:43 +08:00
qzl 08571cfc95 chore: sync current workspace to dev 2026-02-24 18:18:42 +08:00
qzl 105cf82d21 fix: 恢复Celery配置 + 修复测试文件
- 恢复 CelerySettings 和相关计算属性
- 修复 celery/app.py 调用 configure_celery_app 参数
- 创建 core/initialization/init_data.py stub
- 删除不完整的 test_auth_supabase_gateway.py
2026-02-24 16:38:30 +08:00