feat(api)!: align frontend contracts with latest Wiki#79
Open
Alexander-Noah wants to merge 4 commits into
Open
feat(api)!: align frontend contracts with latest Wiki#79Alexander-Noah wants to merge 4 commits into
Alexander-Noah wants to merge 4 commits into
Conversation
Replace legacy HTTP and WebSocket contracts with the latest TimeFlow MVP interface baseline. Add strict runtime validators, typed domain modules, mock data, and contract tests. BREAKING CHANGE: frontend API paths, DTO fields, and WebSocket event envelopes now follow the 2026-07-24 Wiki contract.
Validate every business request before transport and require response parsers. Define and validate the complete task profile snapshot returned by goal details. BREAKING CHANGE: HttpClient.request and apiFetch now require a response parser.
Alexander-Noah
marked this pull request as ready for review
July 24, 2026 08:58
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.
变更背景
根据最新版 TimeFlow Wiki,统一封装前端 HTTP API、WebSocket 协议和 DTO 字段,并增加严格的请求及响应运行时校验。
关联 Issue:
架构设计-主agent感知层接口设计(初稿):http://github.com/1024XEngineer/timeflow/issues/70
成员5TimeFlow MVP 函数级接口设计:#73
TimeFlow MVP 子 Agent 能力层统一接口:#74
全局数据、系统日志模块接口设计草案:http://github.com/1024XEngineer/timeflow/issues/75
关联wiki:
Architecture interface design(draft):https://github.com/1024XEngineer/timeflow/wiki/Architecture-interface-design(draft)
主要变更
ApiError处理type / timestamp / payloadtransport.resumeTaskProfileSnapshot提交说明
ecd1a95 feat(api)!:按照最新版 Wiki 完成 API、DTO、WebSocket 和响应校验封装b200cf4 chore(test):将本地 Mock 契约测试排除在仓库提交之外6b40cd6 Merge:同步上游仓库最新mainc8a66f9 fix(api)!:补充请求运行时校验、强制响应解析并完善任务画像契约兼容性变化
/users/me→/auth/me/items/today→/items/timeline/goals→/long-goalsPOST /conversation/inputs提交event / sent_at调整为type / timestampsuccess / data外层信封HttpClient.request和apiFetch必须传入响应解析器Breaking Changes
旧接口路径、DTO 字段、WebSocket 信封以及未传入响应解析器的调用方需要同步迁移。
验证结果
git diff --check通过CONTRACT_MISMATCH验证边界
当前完成前端静态检查和本地 Mock 契约验证。由于后端业务接口尚未全部实现,暂未进行真实服务端端到端联调。