Skip to content

feat(acp): add consented Windows terminal authentication - #190

Draft
YoungSx wants to merge 16 commits into
mainfrom
feat/acp-terminal-authentication
Draft

feat(acp): add consented Windows terminal authentication#190
YoungSx wants to merge 16 commits into
mainfrom
feat/acp-terminal-authentication

Conversation

@YoungSx

@YoungSx YoungSx commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Agent 提供 terminal 鉴权方式时,SalmonEgg 现在先征得用户同意,再使用当前 stdio 连接实际启动的命令、参数、环境和工作目录打开独立 PTY。正常退出 0 后通过现有连接 owner 强制重连并在新连接上重试;取消、关闭对话框或退出应用会回收整个登录进程树。terminal 方法不会发到 authenticate。

登录身份包含会话、profile、服务实例与连接 ID。切换意图后旧登录结果不能恢复旧连接;普通会话与新会话 draft 都复用原来的重试链。终端视图使用原生 ContentDialog,ViewModel 负责状态,启动快照和 PTY 输出不落日志。

当前只在交互式 Windows 宿主广告 auth.terminal。Porta.Pty 在其他平台的异常退出语义尚未通过等价验证,继续关闭该能力。新增 Windows 专属测试工程与 hosted workflow,真实 ConPTY 的 4 个用例必须实际运行且零跳过。

验证:

  • 整合 fix(acp): preserve cancellation and scope transport failures #186 后 SDK 777/777,零跳过;真实 stdio、WebSocket、HTTP/2 与 SSE 传输 6/6,零跳过。
  • 功能阶段鉴权协调、重试、实际启动快照、new-session draft、状态反序与进程清理定向测试 137 项通过;SDK 760/760。
  • 功能产物 Release Desktop 构建零警告、零错误;WASM 构建零错误,仅 3 条既有 Uno 模板警告。Windows 专属工程在本机交叉编译零警告、零错误。
  • 功能阶段包针对 1.0.0 兼容验证及真实外部 consumer 通过,38 个 draft 类型的编译限制及两种文档化抑制方法均通过;当前整合提交的完整 CI 继续执行。

本 PR 包含 #184#187 协议前置及 #186 取消前置,基于 main 4a4e3c5;Refs #144#147。保持 draft,等待当前 SHA 的 Windows 真进程结果。Windows 登录对话框的真机 GUI 和真实第三方 Agent 仍待验收,不以本地编译或模拟对端替代;不关闭总单。

Default only an absent v1 type to agent, reject non-string discriminators, and preserve unsupported strings and payload fields. Share version-aware authentication serialization across DTO, collection, and initialize roots so unknown fields cannot override the negotiated method identity.

Add raw initialize transport regressions, presentation selection coverage, and schema round-trip properties. Validation: 593 SDK tests, 26 presentation authentication tests, analyzer and package validation, external nupkg consumer, and a 9-case failing whitelist mutation.

Refs #147
Apply negotiated identifiers and required message identities across direct, collection, and parent contracts. Preserve unknown command and resource metadata, honor explicit schema recovery rules, and keep v1-only state off draft wire.

Keep live v2 disabled and preserve the published serialization surface. Validate 680 SDK tests, package compatibility against 1.0.0, and 38 draft consumer diagnostics; version-rule mutations fail 45 targeted cases.
Use the running agent invocation for independent ConPTY sign-in, reconnect through the authoritative connection owner and retry with the fresh service. Gate capability advertisement on a Windows process host and interactive surface; Porta.Pty 1.0.7 cannot distinguish Unix signal termination from a normal zero exit. Remove that restriction only after upstream exposes a trustworthy exit result and the native gate covers it.
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
salmonegg Ready Ready Preview Sep 9, 2026 10:18am UTC

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