From 06ec36cd3bd9c08416fb66bf2da99b5e8293ba31 Mon Sep 17 00:00:00 2001 From: EMRG Evolution Date: Fri, 7 Aug 2026 20:30:12 +0800 Subject: [PATCH] =?UTF-8?q?emrg:=20evolution=5Fprompt=20quick-ref=20?= =?UTF-8?q?=E2=80=94=20add=20#548/#549/#550=20GCM=20Stage=202=20entries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merged feature PRs #548 (PAT auth + setup-git), #549 (device flow), #550 (connect banner) were missing from the implemented-features quick reference — future cycles could re-implement them. Doc-only +3 lines. --- emrg/server/evolution_prompt.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emrg/server/evolution_prompt.md b/emrg/server/evolution_prompt.md index 430aa8d1..8cb8de9e 100644 --- a/emrg/server/evolution_prompt.md +++ b/emrg/server/evolution_prompt.md @@ -339,6 +339,9 @@ When reading rants, follow these rules: > - GUI message display fixes (#543 rant 14:11 宿主实测三缺陷:欢迎屏不隐藏 + 光标残留 + 误标"来自其他客户端";Bug A updateEmptyState 只在切会话调用 → Chat.append()/clear() 同步 App.updateEmptyState?.();Bug B G122 16ms delta 缓冲 vs done 直通竞态 → 残留 delta 晚到建孤儿节点 → main.js flushDeltaBuf 终态(done/error/cancelled)前同步冲刷(webContents.send 保序)+ chat.js doneRids 集合丢弃已 done 流残留 delta(UUID 不复用,500 上限)+ cancelled/流式 error 调 clearTyping 全清在途 typing(daemon cancelled 无 request_id,mid-round 取消无 done 帧);+3 回归测试,npm test 88→91 文档同步) ✅ > - Windows GCM silent-fail (#545 rant 10:17 Windows 干净安装演化 cycle 反复弹 Git Credential Manager:daemon 是非交互后台进程,凭据操作必须静默快速失败——git_utils.no_prompt_env() 三守卫(GIT_TERMINAL_PROMPT=0/GCM_INTERACTIVE=never/GIT_ASKPASS=)应用于 bash_tool 子进程 + scheduler 全部 8 处 git subprocess + git_cmd;新增 github_status daemon 命令(bundled gh auth status 10s 超时 prompt-free 永不抛,parse_gh_auth_user 解析 as/account 双形态);evolution/open_source prompt 平台守卫(Windows 跳过 git credential fill → 指向 GUI 设置页,未认证优雅跳过不重试);+12 测试 508→520) ✅ > - Windows TUI input + /rant visibility (#546 rant 10:38 Windows TUI 无法输入中文 + / 菜单上下键失效:win32.py _RAW_INPUT_MODE 加 ENABLE_VIRTUAL_TERMINAL_INPUT(0x0200) 使 conhost 交付 UTF-8 + ANSI 方向键(SetConsoleMode 失败回退 window-input-only 兼容 Win10 1607 前);events.py 0xE0/0x00 老式扫描码归一化(InputParser 在 _utf8_len 之前拦截且门控在已识别扫描码 0x47-0x53——与 UTF-8 续字节 0xA0-0xBF 值域不相交精确无假拦截;parse_keypress 直映射 KeyName);rant 10:48 /rant 项目列表过滤 evolution 工作区导致 emrg 项目消失(#78 过滤设计过时,#489/#490/#535 自愈后 ~/.emrg/evolution/emrg 是打包机唯一路径)→ _handle_list_projects 去过滤(_touch_project 保留跳过);+12 测试 520→534,含判别力回归(泰文/天城文/Ctrl+@/分片读)) ✅ +> - GitHub PAT auth + setup-git (#548 GCM rant 10:17 Stage 2a:GUI 设置页 GitHub 连接区——github_connect daemon 命令(`gh auth login --with-token`,token 走 stdin 永不进 argv(防 ps 泄露);成功后 `gh auth setup-git` 让 git 用 gh 当 credential helper → push/pull/fetch 永不回退 GCM;复用 _check_github_auth 同解析器重验 user 单一事实源);github_disconnect(`gh auth logout --hostname github.com`);dispatch github_connect_result/disconnect_result 帧;GUI RESPONSE_TYPES/IPC/preload 全链路 + 15 条 zh/en i18n;+8 测试 534→542(含 stdin 送达断言固化"token 不进 argv")) ✅ +> - GitHub device-flow auth (#549 GCM rant 10:17 Stage 2b:首选授权路径不开终端不弹 GCM——github_connect_web daemon 命令 spawn `gh auth login --web`(stdin=DEVNULL prompt-free,探针实证非 TTY 仍输出 code+URL),解析一次性 code + device URL 返 GUI;后台任务保活 gh 至授权完成/300s 超时 kill(proc 存 self,cancel 竞态直 kill 防泄漏——task.cancel() 对未启动 task 不执行 body);GUI 设置页无 token 优先 device flow + 新对话框(大号 code + shell.openExternal 开浏览器 + 3s github_status 轮询直至授权);PAT 仍为受限环境兜底;+6 测试 542→548) ✅ +> - GitHub connect banner (#550 GCM rant 10:17 Stage 2c:演化计数增长(=演化刚产出需推 GitHub)且未认证时横幅提示"启用自进化需连接 GitHub → [去连接]"——挂钩 maybeShowEvolutionToast 增长检测点(每日 gate 前,每次增长都查);maybeShowGithubBanner 查 github_status 未认证则显示,[去连接] 打开设置页 GitHub 区,[关闭] 本会话不再弹;本地聊天不依赖 GitHub 启动不打扰;与 #548/#549 闭环(横幅→设置→device flow→已连接);GUI +1=92(正反两态 + seed hidden 判别 + 源码断言)) ✅ #### 2.2 Latest GitHub code changes