Repository navigation
feat(hub): /v1/files/* + app-mode + version compat (UI-1b) - #4
Merged
Merged
Conversation
…compat (UI-1b) hub contract extension (v0.8.0 prep): - 2 new routes: POST /v1/files/read, PUT /v1/files/write - /v1/status response gains hub.version (from package.json) + hub.appMode - New --app-mode CLI flag + TTS_HUB_APP_MODE env var; errors carry details.userAction when appMode=app - Loopback CORS middleware + OPTIONS preflight (204) - Path safety util src/hub/paths.ts (4-layer guard + symlink realpath) - Optimistic locking via baseSha256 (409 HUB_CONFLICT) - New error codes: HUB_PATH_ESCAPE, HUB_CONFLICT, HUB_FILE_TOO_LARGE - HubClient: filesRead/filesWrite methods + PUT support + HubStatus typed Per red line 15, /v1/files/* NOT exposed as MCP tools. Contract doc §2/§3.2/§3.3/§4.0/§4.1/§4.15/§4.16/§6.1/§7 synced. Tests: 2057 passed / 70 skipped / 0 failed (baseline 2037 + 20 new).
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.
窗口 UI-1b — hub 契约扩展(tts-toolkit 侧)
蓝本
变更(坑 21 四方同步)
新增
src/hub/paths.ts(164 行,四层防护 + symlink realpath)tests/unit/hub-control-files.test.ts(525 行,~16 用例)测试基线
2057 passed / 70 skipped / 0 failed(基线 2037 + 新增 20 全绿)。
端到端探针(已固化 9 条全过)
已知边界
中文用户名路径(GBK 代码页)在 hub 进程内 findPack 失败;ASCII 路径一切正常。不阻塞主交付。
🤖 Generated with CreateWorkflow + GLM-5.3-Flash × 3 (concurrent)