Skip to content

feat(tui): 添加 M0A.5b TUI 登录(重提 #84)#4

Draft
wangjk9527 wants to merge 5 commits into
cursor/m0a5a-formal-auth-foundation-f252from
cursor/m0a5b-tui-login-f252
Draft

feat(tui): 添加 M0A.5b TUI 登录(重提 #84)#4
wangjk9527 wants to merge 5 commits into
cursor/m0a5a-formal-auth-foundation-f252from
cursor/m0a5b-tui-login-f252

Conversation

@wangjk9527

Copy link
Copy Markdown
Owner

Summary

基于 main reset 后重提原 #84:为 TUI 增加正式账号登录、Session 持久化、交互注册引导、账号切换与 /logout

叠在:

  1. cursor/native-one-click-deployment-v2-f252(DataLink 外置一键部署)
  2. cursor/m0a5a-formal-auth-foundation-f252(M0A.5a,重提 feat(auth): add formal password authentication foundation (M0A.5a) datagallery-lab/datafoundry#83
  • REST、AG-UI 与启动 preflight(含 run-defaults)共用 AuthenticatedTransport;身份探测走 GET /api/v1/me
  • 删除离线 Demo 模式;文档同步去掉残留 Demo 表述
  • 增加 Web/TUI 会话共享 smoke(smoke:tui-auth-sharing
  • 复审加固:redirect:manual 安全跳转、AbortController 覆盖 body 读取、session 锁与 CSRF 重试等

Depends on M0A.5a 分支(以及其下的 deploy v2)。请先合部署与 5a,再审/合本 PR。

Test plan

  • npm --workspace @datafoundry/tui test(96 pass)
  • npm run typecheck
  • npm run test:auth-foundation(24 pass)
  • npm run smoke:auth
  • npm run smoke:tui-auth-sharing
  • npm run test:deploy(叠层后仍 87 pass)
  • CI green

Notes

  • 向主仓开 PR 时 head:wangjk9527:cursor/m0a5b-tui-login-f252
  • base:先用 cursor/m0a5a-formal-auth-foundation-f252;底层合入 main 后再改 base / rebase
Open in Web Open in Cursor 

wangjk9527 and others added 5 commits July 26, 2026 15:15
提供 deploy.sh 原生部署链路(configure/install/build/start/stop/doctor/tui),
仅托管 Web + API;补齐无内置 DataLink 的 npm start / stack-runner。
语义 Data Link 改为外置 MCP 对接,deploy 不安装、不启动、不作健康门槛。

基于 main reset 后重提原 datagallery-lab#82
仅在 verified running state 时标记 managed ports;redeploy 默认以磁盘密钥为准;launchId 校验失败时清除 stale 状态且不向错误进程发信号。附带端口精确匹配、postgres URL 脱敏与 .env 权限提示。
实现 password 模式会话/CSRF/注册策略,并修复 HITL 事件桥、cookie Path
与缺失注册策略静默 open 等确定性缺陷。脚本侧统一正式认证客户端,并为
FORMAL_HTTP_AUTH_TARGETS 增加 node --check 语法门禁。

基于 main reset 后重提原 datagallery-lab#83,叠在 DataLink 外置的一键部署分支之上。

Co-authored-by: wing <wangjk9527@users.noreply.github.com>
接入正式认证登录/会话恢复,并按复审加固:
- 认证请求 redirect:manual,逐跳拒绝 HTTPS→HTTP 与跨 origin
- AbortController 覆盖完整 body 读取;session 隔离/重置与保存同锁,锁支持过期回收
- CSRF 403 若 jar token 已更新则直接重试;session-invalid 去重先于清理副作用

基于 main reset 后重提原 datagallery-lab#84,rebase 到 DataLink 外置 deploy + M0A.5a 栈上;
同步清理 TUI 指南中残留的离线 Demo 模式表述。

Co-authored-by: wing <wangjk9527@users.noreply.github.com>
Max-Age=0/过期 Expires 的 Set-Cookie 现在会删除 jar 条目;session-invalid
清理失败仍通知 auth-required;logout/auth-required 后强制交互登录,避免
磁盘残留会话被静默恢复。
@wangjk9527
wangjk9527 force-pushed the cursor/m0a5a-formal-auth-foundation-f252 branch from 851d690 to 5442fab Compare July 26, 2026 08:10
@wangjk9527
wangjk9527 force-pushed the cursor/m0a5b-tui-login-f252 branch from 1ba3c88 to 62167a5 Compare July 26, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant