# 叶余博客全量内容归档 (Ye Yu Blog Full Corpus) > 本文件汇集了叶余博客 (https://ye-yu.com) 的全量中英文 Markdown 文章正文,专供 AI 模型与 Agent 进行长上下文分析、语义搜索与引用。 > 统计:28 篇中文文章,28 篇英文文章,共计 56 篇。 --- ## 中文文章列表 / Chinese Articles # [ZH] Mac 排错实录:为什么一个叫「自动代理发现」的开关,会让你的 Tailscale 频频超时? - URL: https://ye-yu.com/blog/macos-auto-proxy-discovery-tailscale - Date: 2026-11-08 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/macos-auto-proxy-discovery-tailscale ## 1. 起因与结论先行 今天在 macOS 上折腾 Shadowrocket 的内置 Tailscale 模块时,碰到了一个非常奇怪的现象:**同样的 Tailscale 账号和节点配置,在 iPhone 上能够秒连,但在 Mac 上状态始终卡在「未连接」**。 打开 Shadowrocket 的 VPN 诊断日志,每次启动内置 Tailscale 模块,5 秒后都会抛出一模一样的报错: ```text failed to fetch control server key: 请求超时。 control server key fetch failed ``` 先给结论:**问题不在代理节点,也不在 Tailscale 服务端,而是 macOS 的 Wi-Fi 设置里默认开启了「自动代理发现」(Auto Proxy Discovery / WPAD)**。 在家庭 Wi-Fi 或热点环境下,开启这个选项会导致 macOS 的底层网络库(`NSURLSession`)在发起握手前,强行在局域网内寻找并不存在的 PAC 代理脚本。这一阶段恰好会白白阻塞 5 秒直到报错,从而把 Tailscale 客户端的公钥获取请求硬生生拖到超时。 在终端执行一行命令将其关闭后,Tailscale 瞬间恢复毫秒级连接: ```sh networksetup -setproxyautodiscovery Wi-Fi off ``` --- ## 2. 核心认知:为什么之前的思路走不通 排查初期,我按常规经验试了两个方向,但都走了弯路: 1. **怀疑是 Tailscale Auth Key 过期**:在 Tailscale 控制台检查密钥状态,虽然旧 Key 确实需要保持有效,但此时连服务器公钥都没拉下来,根本还没走到服务端校验 Key 的阶段。 2. **怀疑是 DNS 虚拟 IP 污染**:Shadowrocket 通常会将域名解析为 198.18.x.x 的保留地址用于路由接管。我在配置中给 `controlplane.tailscale.com` 加上了 `always-real-ip`,DNS 也确实拿到了公网 IP,但启动仍然固定在 5 秒后超时。 3. **命令行 curl 正常,迷惑性极强**:在终端单独执行 `curl https://controlplane.tailscale.com/key`,几乎瞬间就能拿到响应,甚至在普通浏览器里访问也畅通无阻。 为什么命令行 curl 能通,而 Shadowrocket 内置的 Tailscale 却报超时? 关键在于运行上下文的不同:普通 curl 走的是标准用户态进程网络栈;而 Shadowrocket 在 macOS 上是以 `MacPacketTunnel`(Network Extension)系统扩展运行的,其内部初始化 Tailscale 时调用了系统的 `NSURLSession`。 通过读取 macOS unified log 的详细日志,终于捕获到了真凶: ```text MacPacketTunnel: proxy:start_resolve MacPacketTunnel: unresolved proxies, waiting for resolution MacPacketTunnel: nw_proxy_resolver_create_parsed_array [C11.1.1 proxy pac] Evaluation error: NSURLErrorDomain: -1003 ``` 请求刚发出去,根本还没碰到底层 TCP 握手,就被系统拦下来去执行 WPAD 代理自动发现了。在普通宽带环境下,局域网根本没有配置 WPAD 服务器,系统只能干等 5 秒超时,抛出 `-1003` 错误后才放弃。而 Tailscale 获取公钥的超时预算刚好也是 5 秒,直接被整整耗死。 --- ## 3. 完整复现步骤 如果你也遇到了类似的神秘 5 秒超时,可以通过以下确定性步骤进行检查与修复。 ### Step 1: 检查 Wi-Fi 的自动代理发现状态 打开终端,执行: ```sh networksetup -getproxyautodiscovery Wi-Fi ``` 如果输出为: ```text Auto Proxy Discovery: On ``` 说明该网络接口开启了自动代理探测。 ### Step 2: 命令行关闭自动代理发现 无需重启电脑,直接在终端执行: ```sh networksetup -setproxyautodiscovery Wi-Fi off ``` 再次核对状态: ```sh networksetup -getproxyautodiscovery Wi-Fi # 预期输出:Auto Proxy Discovery: Off ``` ### Step 3: 重载模块验证效果 回到 Shadowrocket 中,将 Tailscale 模块重新开关一次。查看诊断日志,原先卡顿 5 秒的环节瞬间变为: ```text tailscale_client_new: initialised tailscale: connected to network ``` 状态立即变为“已连接”,整个握手耗时从超时失败变为毫秒级通过。 --- ## 4. 踩坑记录与排错清单 | 现象 / 假象 | 真实原因 | 正确应对 | |---|---|---| | 终端 `curl` 顺畅,但应用内部请求超时 | curl 不一定触发系统的 WPAD 异步代理查找,而 Extension / App 内的 `NSURLSession` 严格遵循系统代理查找流程 | 不要只用 curl 下结论,排查 Extension 问题需结合系统 unified log | | 怀疑是本地代理软件把流量阻断了 | WPAD 是「向局域网索取代理脚本」的协议,与本地运行的 HTTP/SOCKS 代理并不冲突 | 关闭 WPAD 仅停止局域网广播,现有代理分流规则不受任何影响 | | 报错 `invalid key` 与超时混杂 | 之前可能存在过期 Auth Key 与 WPAD 超时的双重问题叠加 | 先解决网络层的 5 秒超时,再核对 Tailscale 控制台有效的 Reusable Auth Key | --- ## 5. 小结与适用边界 - **最佳适用场景**:个人 MacBook、家用网络、移动办公热点,以及本机常驻 Shadowrocket、Surge 或 Clash 等分流工具的开发环境。在这些场景下,系统默认的「自动代理发现」不仅毫无用处,反而经常成为阻断特定网络组件(尤其是 Network Extension)的隐形杀手,保持 `Off` 是最推荐的设定。 - **不适用场景**:部分跨国企业或大型高校内网,若网络管理员明确通过 DHCP Option 252 统一下发内部代理分流策略,则关闭后可能会导致部分内网资源无法访问。即便是这类环境,通常也建议由管理员直接提供固定的 PAC URL(自动代理配置)手动填入,而不是开启全网广播发现。 --- # [ZH] 找回 Chrome 消失的「Ask Gemini」:修改 Local State 避坑指南与底层机制 - URL: https://ye-yu.com/blog/restore-chrome-ask-gemini-by-modifying-local-state - Date: 2026-11-05 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/restore-chrome-ask-gemini-by-modifying-local-state 之前我在 Chrome 里一直能用地址栏右侧的「Ask Gemini」(AI 侧边栏助手)快速总结网页,但换了环境或重装浏览器后,这个入口经常莫名其妙彻底消失。去翻 `chrome://flags` 开启了相关选项,界面语言也换成了英文,依然找不回图标。 最终跑通的有效方案其实非常明确:**Chrome 是根据用户配置目录中的 `Local State` 文件记录的国家代码来做功能准入的**。只要把其中持久化的地区代码从 `cn` 修改为 `us`,就能稳定找回入口。 但在实际操作里,90% 的人改完会发现“根本没生效”甚至“文件被 Chrome 自动改了回去”。这篇记录整理了背后的覆盖机制与一套不踩坑的实操步骤。 ## 核心机制:为什么界面切了英文依然没入口? Chrome 内部对这套内置侧边栏 AI 助手的项目代号通常为 `glic`(Gemini Live in Chrome)。 很多人的直觉反应是去设置里把语言改成 `English (United States)`,或者挂上系统全局代理。但 Chrome 的地域判定并不完全依赖每次打开时的即时 IP,也不会因为 UI 语言改变而重置: 1. **Variations 机制锁定**:Chrome 使用一套实验与灰度策略服务(Google Variations)。每次连网同步后,会将推断出的所属国家代码固化在本地。 2. **Local State 持久化**:这个国家代码保存在全局配置 `Local State` 中的 `variations_country` 与 `variations_permanent_consistency_country` 字段中。只要这里依然是 `cn`,即使网络和语言变了,客户端仍然判定当前设备处于非准入区域,自动屏蔽 `glic` 入口。 > 说明:本文核心梳理 Chrome 客户端配置与 Google Variations 地域判定策略,操作前请确保理解配置文件回写时机。 ## 最大的坑:为什么你改完会被瞬间覆盖? 很多朋友按网上教程打开 `Local State` 文件,搜到 `cn` 改成 `us` 并保存,结果重新打开 Chrome 还是没有图标;再回头打开文件一看,`us` 又被变回了 `cn`。 **根本原因在于 Chrome 的内存回写机制**: - 如果你是在 Chrome 还在运行(或者后台还有 Chrome Helper 辅助进程残留)时修改的文件,当你关闭 Chrome 时,Chrome 会将当前内存里驻留的旧状态直接 Dump 回磁盘,**瞬间把你刚刚改好的文件覆盖掉**。 - 因此,**“彻底杀掉 Chrome 进程”必须做在“打开文件修改”之前**,顺序不能倒。 ## 完整实操步骤 ### 第一步:彻底退出 Chrome 进程 不要只是点击窗口红叉或按最小化,必须确保进程全部退出。 **macOS 用户**: 在 Dock 栏右键 Chrome 选择“退出”(快捷键 `Cmd + Q`),或者直接在终端中验证退出: ```sh osascript -e 'quit app "Google Chrome"' # 检查是否还有残留进程 pgrep -f "Google Chrome" || echo "Chrome 已彻底退出" ``` **Windows 用户**: 按 `Ctrl + Shift + Esc` 打开任务管理器,或者在 PowerShell 中强制结束残留进程: ```powershell Stop-Process -Name chrome -Force -ErrorAction SilentlyContinue ``` ### 第二步:定位配置文件并先做备份 `Local State` 是一个 JSON 格式的全局配置文件。在修改任何配置前,务必先存一份备份副本。 - **macOS 路径**: `~/Library/Application Support/Google/Chrome/Local State` - **Windows 路径**: `%LOCALAPPDATA%\Google\Chrome\User Data\Local State` 在 macOS 终端中执行备份: ```sh LOCAL_STATE="$HOME/Library/Application Support/Google/Chrome/Local State" cp "$LOCAL_STATE" "${LOCAL_STATE}.bak" ``` ### 第三步:修改关键地区键值 使用 VS Code、Sublime Text 等纯文本编辑器打开 `Local State`,搜索并修改以下三个键值: ```json { "variations_country": "us", "variations_permanent_consistency_country": "us", "is_glic_eligible": true } ``` - 将 `"variations_country"` 的值(原有可能是 `"cn"` 或其它国家简写)改为 `"us"`。 - 将 `"variations_permanent_consistency_country"` 的值同样改为 `"us"`。 - 如果在你的版本中能搜到 `"is_glic_eligible"`,将其改为 `true`(若没有此字段,无需手动强加,保持原样即可)。 如果你习惯用命令行处理,在确认 Chrome 已关闭后,也可直接运行一段 Python 脚本就地安全替换: ```sh python3 -c ' import json, os path = os.path.expanduser("~/Library/Application Support/Google/Chrome/Local State") with open(path, "r", encoding="utf-8") as f: data = json.load(f) data["variations_country"] = "us" data["variations_permanent_consistency_country"] = "us" if "is_glic_eligible" in data: data["is_glic_eligible"] = True with open(path, "w", encoding="utf-8") as f: json.dump(data, f, ensure_ascii=False) print("Local State 更新成功") ' ``` ### 第四步:检查配套环境并启动 保存文件后重新打开 Chrome,还需要确认以下三点,防止后续又被 Google 策略服务重置: 1. **Flags 实验开关**:在 Chrome 地址栏访问 `chrome://flags/`,搜索 `glic` 或 `gemini`,确保相关项处于 `Enabled` 状态并按要求 Relaunch。 2. **界面语言**:访问 `chrome://settings/languages`,将首选语言设置为 `English (United States)`。 3. **网络节点**:保持走美国(US)节点流量,避免开机或启动连接瞬间又向 Google 汇报非准入地域信息。 重启后,地址栏右侧或侧边栏工具条便会重新出现熟悉的 Gemini 图标。 ## 适用边界 - 这里的修改针对的是 Chrome 客户端层面的功能屏蔽。如果你的 Google 账号本身因合规设置或企业域政策限制无法使用 Gemini,仍需配合支持该功能的个人账号登录。 - 后续 Chrome 大版本升级时,如果 Google 重构了 Variations 键名结构,可能需要重新比对 `Local State` 中最新的地区判定字段。 --- # [ZH] 告别“先用 Mac Preview”:Antigravity 2.28.0 上线内置 PDF 查看器与内置浏览器 - URL: https://ye-yu.com/blog/antigravity-2-28-0-builtin-pdf-viewer-browser - Date: 2026-10-28 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/antigravity-2-28-0-builtin-pdf-viewer-browser 10 月 27 日,Google Antigravity 桌面端更新到了 **v2.28.0**。 这次更新里虽然列了 19 项改进和 15 项修复,但真正改变日常使用习惯的其实就两件事:**内置了 PDF 查看器**,以及**内置了浏览器**。以前在和 Agent 协作时最常切出窗口的两个动作,现在都能留在右侧面板里完成了。 --- ## 一、内置 PDF 查看器:Kevin Hou 一个月前的承诺兑现了 先说这次最让我有参与感的一项更新:**Built-in PDF viewer(内置 PDF 查看器)**。 今年 9 月 21 日,我在用 Antigravity 翻译并重排一份 24 页的 PDF 指南(`grok-bot-guide-cn.pdf`),需要反复调整封面裁切和页面底部的留白。 当时体验非常割裂:Agent 每次跑完脚本,在对话里给出了生成好的 `.pdf` 文件胶囊,右侧 `Files Changed` 里也列出了文件,但不管左键点还是右键点都毫无反应(`Right click, no response`)。每改一轮排版,我都得切出 Antigravity,去 Finder 里找文件用系统预览打开。 我干脆录了一段 18 秒的视频发到 X 上,直接用中文 `@Google Antigravity` 提问: **“请告诉我在antigravity中,怎么预览一个pdf文件?”** 没想到当天下午,Antigravity 产品负责人 **Kevin Hou**(`@kevinhou22`)直接用中文回了我九个字: **“即将上线。现在先用 Mac Preview”** ![向 Kevin Hou 提问 PDF 预览及他的中文回复](/images/posts/2026/10/kevin-hou-pdf-reply.png) 时隔一个多月,这句“即将上线”在 `v2.28.0` 正式兑现了: > *"PDF files now open in a built-in PDF viewer, both in the file viewer and when an artifact is a PDF, so you can read them without leaving Antigravity."* 现在终于不用再切出去“先用 Mac Preview”了。不管是你在项目文件列表(File Viewer)里直接点开 `.pdf` 文件,还是 Agent 生成了 PDF 格式的产物(Artifact),都会直接在 Antigravity 右侧面板里渲染打开。配合前一天 `v2.27.0` 修复的“导出 PDF 丢失 Mermaid 流程图”问题,现在在客户端里生成和检查 PDF 文档已经完全闭环。 --- ## 二、内置浏览器:点链接直接在侧边栏打开,还不会缩成手机版 第二个重磅功能是 **Built-in browser(内置浏览器)**。在本月中旬我做过切片的那场官方直播里,Kevin Hou 就曾剧透“浏览器很快会有令人兴奋的更新”,这次 `2.28.0` 正式把它放进了右侧边面板(Side Panel)。 实际用下来,有三个细节很顺手: 1. **打开网页时面板会自动加宽** 很多软件的内置浏览器因为侧边栏太窄,一打开网页就触发响应式断点,直接变成窄窄的手机端布局。Antigravity 在打开网页时会自动加宽右侧面板,让文档和网页保持正常的桌面排版。 2. **默认内置打开,右键可随时切回外部浏览器** 现在点击对话里的链接,默认会在右侧内置浏览器里打开(地址栏还支持查看 HTTPS 证书详情)。如果你某次想用外部系统浏览器打开,直接**右键点击链接**就能单次选择;想彻底改回老习惯,去 `Settings > General` 里改一下 `Open Links In` 即可。 3. **支持 `Cmd + Shift + T` 恢复关错的标签页** 网页、PDF 和代码都在右侧面板开标签页,手滑关错了也不怕。按 `Cmd + Shift + T`(Windows / Linux 为 `Ctrl + Shift + T`),就能在原来的位置恢复刚关闭的侧边标签页,连关闭前看到的滚动位置都会原样保留。 --- ## 三、顺手提几个实用的小更新 除了内置 PDF 查看器和内置浏览器,这次 `2.28.0` 还有几处小改进值得顺带留意: - **支持挂载任意格式文件(最高 20 MB)**:以前往对话框拖视频、设计稿或程序文件会被拒收,现在放开了格式限制,任何文件都能作为附件挂上去让 Agent 直接读取。 - **Diff 高亮精确到单词与字符**:改代码时不再因为动了一个变量就整行变红变绿,现在会精确标出这一行里具体改了哪几个词和字符。 - **子 Agent 权限不再“失忆”**:修复了主对话明明已经点过 `Always allow`(始终允许),派发给子 Agent 时又弹窗让你重复审批一遍的烦人 Bug。 - **中文标点旁的粗体不再翻车**:修复了中文、日文、韩文标点符号紧挨粗体或斜体时,界面直接裸露 `**` 原始符号的渲染问题。 - **重启不再乱切模型**:修复了客户端重启或断线重连后,当前对话莫名其妙自己切换到其他模型的问题。 --- 从内置浏览器到内置 PDF 查看器,能看出来 Antigravity 最近的迭代重点:把“人机协作时核对产物”的体验死角一个个填平,让你尽量少切窗口。 你升级到 `2.28.0` 了吗?觉得内置浏览器和 PDF 查看器顺手吗?欢迎在评论区聊聊。 --- # [ZH] 5 小时额度占周额度多少?我用 CodexBar 历史数据算了 Claude、Codex 和 Antigravity - URL: https://ye-yu.com/blog/codexbar-5h-vs-weekly-quota-calculation - Date: 2026-10-22 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/codexbar-5h-vs-weekly-quota-calculation ## 1. 起因与结论先行 我同时在用 Claude Pro、ChatGPT Plus 里的 Codex,以及 Google AI Pro 的 Antigravity。三家都是两层额度:一个每 5 小时重置的窗口,一个每周重置的总量。我想弄清两件事:用满一轮 5 小时,会吃掉多少周额度?怎么安排,才能把一周的额度用够? CodexBar 会把这几家的用量百分比存成本地历史,我就让 Codex 读这些记录来算。10 月 22 日中午在对话里算了一遍,晚上又用整理好的脚本复跑了一次: | 账户 / 额度池 | 一轮 5 小时 ≈ 周额度的 | 一周约几轮 | 把握 | | --- | --- | --- | --- | | Claude Pro | 12.5%–13% | 7.5–8 | 高 | | Codex(ChatGPT Plus) | 约 16% | 约 6.4 | 高 | | Antigravity 普通 Gemini(Google AI Pro) | 约 28.6% | 约 3.5 | 中 | 算完才发现,那天正好是 Claude 的周额度重置日。上午 11:54 周额度只用了 46%,就算之后每个窗口都用满,到晚上 22:00 重置前最多也只能用到 73% 左右。问题出在前几天用得太少,最后一天怎么补都来不及。 省流:别数窗口次数,每天看周额度涨了多少。一周 7 天都用的话,Claude 每天要用满一轮还多一点,Codex 每天用一轮的九成左右,Antigravity 每天半轮就够。 这是我自己账户在 2026 年 10 月的实测,官方没有承诺固定的换算比例。 ## 2. 核心认知:为什么不能拿当前百分比直接相除 最直觉的算法,是把 CodexBar 上的两个数一除:Claude 5 小时 85%、周 46%。这样算没有意义,因为 46% 里还装着本周之前每个窗口的用量。 能用的是增量。同一个 5 小时窗口里,同一份消耗会同时计入两项额度,所以「周额度涨了多少」除以「5 小时额度涨了多少」,就是一整轮 5 小时折合的周额度。10 月 19 日 12:58 到 13:58,我的 Claude 5 小时用量从 48% 涨到 80%(+32),周用量从 8% 涨到 12%(+4),4 ÷ 32 = 12.5%。第二天晚上的另一段是 +48 和 +6,也是 12.5%。 还有两点要先说清楚: - 「5 小时」是额度窗口,不是要连续工作 5 小时。任务密集时,可能提前用满。 - 换入口不会多出额度。Claude 帮助中心写明 claude.ai、Claude Code 和 Claude Desktop 计入同一份额度;OpenAI 定价页写明 ChatGPT Work 和 Codex 共用用量,另外 Codex 的 Pro 套餐目前没有 5 小时限制。消耗速度还受模型、上下文、推理和工具调用影响,所以这个比例只代表你自己的用法。 ## 3. 完整复现步骤 ### Step 1:找到 CodexBar 的历史文件 ```sh codexbar --help | head -1 ls ~/Library/Application\ Support/com.steipete.codexbar/history/ ``` 我这里是 CodexBar 0.79.0,目录里有 `antigravity.json`、`claude.json` 和 `codex.json`。想看当前状态,就用 CLI 实时查。它会联网,要等几秒: ```sh codexbar usage --provider claude --format json --pretty ``` ### Step 2:看懂文件结构 每个文件按账户分组,每个账户下有 `session`(`windowMinutes: 300`)和 `weekly`(`windowMinutes: 10080`)两个序列。每条记录只有三个字段: ```json {"capturedAt": "2026-10-19T04:58:37Z", "resetsAt": "2026-10-19T08:30:00Z", "usedPercent": 48} ``` 时间是 UTC,大约每小时一条。它记的是百分比快照,不是每次请求的账单。一个文件里可能有多个账户,我的 `codex.json` 就有两个,`preferredAccountKey` 指向当前账户。 ### Step 3:挑出同一窗口的样本,算比例 把下面的脚本保存为 `quota_ratio.py`: ```python #!/usr/bin/env python3 """用 CodexBar 本地历史估算:一整轮 5 小时额度约等于多少周额度。 用法:python3 quota_ratio.py [起始时间] [5 小时增量下限] """ import json import sys from datetime import datetime from pathlib import Path provider = sys.argv[1] since = sys.argv[2] if len(sys.argv) > 2 else "1970-01-01" # 只用这个时间之后的采样(UTC) min_delta = float(sys.argv[3]) if len(sys.argv) > 3 else 15 # 整数百分比的产品建议 15 path = Path.home() / "Library/Application Support/com.steipete.codexbar/history" / f"{provider}.json" data = json.loads(path.read_text()) series = data["accounts"][data["preferredAccountKey"]] # 只取当前账户 def entries(name, minutes): return {e["capturedAt"]: e for s in series if s["name"] == name and s["windowMinutes"] == minutes for e in s["entries"]} def ts(t): return datetime.fromisoformat(t.replace("Z", "+00:00")) def close(a, b): # resetsAt 会有 ±1 分钟抖动 return abs((ts(a) - ts(b)).total_seconds()) <= 60 session, weekly = entries("session", 300), entries("weekly", 10080) samples = [(t, session[t], weekly[t]) for t in sorted(session.keys() & weekly.keys()) if t >= since] def same_window(a, b): (_, sa, wa), (tb, sb, wb) = a, b if not all(e.get("resetsAt") for e in (sa, sb, wa, wb)): # 空闲条目可能没有 resetsAt return False return (close(sa["resetsAt"], sb["resetsAt"]) and close(wa["resetsAt"], wb["resetsAt"]) and ts(sb["resetsAt"]) > ts(tb) # 后一条还没过 5 小时重置点 and sb["usedPercent"] >= sa["usedPercent"] and wb["usedPercent"] >= wa["usedPercent"]) groups = [] for s in samples: if groups and same_window(groups[-1][-1], s): groups[-1].append(s) else: groups.append([s]) total_s = total_w = 0 for g in groups: (ta, sa, wa), (tb, sb, wb) = g[0], g[-1] ds = sb["usedPercent"] - sa["usedPercent"] dw = wb["usedPercent"] - wa["usedPercent"] if ds < min_delta or dw <= 0: continue total_s += ds total_w += dw print(f"{ta} → {tb} 5h +{ds:g} 周 +{dw:g} 比例 {dw / ds:.1%}") if total_s: r = total_w / total_s print(f"合计:5h +{total_s:g},周 +{total_w:g} → 一整轮 5h ≈ 周额度的 {r:.1%},一周约 {1 / r:.1f} 轮") else: print("没有符合条件的样本:放宽起始时间,或调低 5 小时增量下限") ``` 运行: ```sh python3 quota_ratio.py claude 2026-10-15 ``` 我在 10 月 22 日晚上的输出: ```text 2026-10-19T03:59:15Z → 2026-10-19T07:59:31Z 5h +56 周 +8 比例 14.3% 2026-10-19T14:57:59Z → 2026-10-19T18:55:03Z 5h +19 周 +2 比例 10.5% 2026-10-20T10:56:43Z → 2026-10-20T14:57:51Z 5h +91 周 +11 比例 12.1% 2026-10-22T02:59:05Z → 2026-10-22T06:56:11Z 5h +64 周 +9 比例 14.1% 2026-10-22T07:56:59Z → 2026-10-22T11:52:47Z 5h +44 周 +6 比例 13.6% 合计:5h +274,周 +36 → 一整轮 5h ≈ 周额度的 13.1%,一周约 7.6 轮 ``` 脚本做了三件事: 1. 只取当前账户、起始时间之后的采样,`session` 和 `weekly` 按同一个采样时间配对。 2. 相邻两条的两个重置时间都在 60 秒内一致、后一条还没过重置点、两项都没有减少,才算同一个窗口。 3. 每个窗口用首尾两条算增量,丢掉 5 小时增量太小的窗口,最后先加总再相除。 单个窗口的比例在 10.5% 到 14.3% 之间跳,是整数取整造成的:周增量差 1 个点,比例就差好几个百分点。合并后是 13.1%,和中午挑出的两段 12.5% 都在误差范围内,所以我按 12.5%–13% 做预算。 另外两家换个参数: ```sh python3 quota_ratio.py codex 2026-10-20T07:23:40Z # 从本周周窗口开始的时间算起(UTC) python3 quota_ratio.py antigravity 2026-10-14 2 # 百分比是小数,但会回落,下限设成 2 ``` Codex 得到 15.6%,和中午在对话里算出的 15.7% 基本一致。Antigravity 得到 28.9%;中午挑出的三段样本都是 2/7(28.57%),两个结果接近,但它的数据比另外两家乱,后面单独说。 ### Step 4:把比例换算成每天的目标 公式只有两个: - 一周约有 1 / r 轮。 - 每周用 D 天,每天要用掉一轮的 1 / (D × r)。 | 账户(r) | 每周用 7 天 | 每周用 5 天 | | --- | --- | --- | | Claude(12.5%) | 每天一整轮,其中一天再加一轮 | 每天两个窗口,各用约 80% | | Codex(16%) | 每天一轮的约 90% | 每天一轮的 125%,比如上午 80%,重置后再用 45% | | Antigravity(28.6%) | 每天半轮 | 每天一轮的 70% | 周中可以重新算:剩余周额度 ÷ 剩余天数 ÷ r,就是从今天起每天要用掉的轮数。也可以直接比较「周窗口已经过去的时间比例」和「已用的周额度」。CodexBar CLI 输出的 JSON 里有一个 `pace` 字段,其中的 `expectedUsedPercent` 和这个时间比例对得上。 10 月 22 日 12:54,我的 Codex 周额度用了 27%,本周时间也过去了约 27%,正好跟上。剩下 5.1 天、73% 的周额度,每天用掉一轮的九成左右,就能接近用满。 ### Step 5:临近周重置,先算还来不来得及 上限 = 当前周额度 +(当前窗口剩余 + 重置前还能开始并用满的窗口数 × 100%)× r Claude 那天的情况:11:54 时周额度 46%,22:00 重置;5 小时窗口已用 85%,15:20 重置。用完剩下的 15%,15:20 之后用满一轮,约 20:20 再开一轮,并赶在 22:00 前用满:46% +(15 + 100 + 100)× 12.5% ≈ 73%。剩下四分之一多的周额度,这周已经用不上了。 ## 4. 踩坑记录与排错清单 | 现象 | 原因 | 解法 | | --- | --- | --- | | 脚本里写死最新时间戳,一分钟后再跑就报 `KeyError` | 当前小时的采样会被同一小时内的新采样覆盖 | 每次重新读文件,按条件筛选,不写死时间戳 | | 同一个窗口的 `resetsAt` 对不上 | 空闲时 `resetsAt` 是「采样时间 + 窗口长度」的占位值;重置时间还有 ±1 分钟抖动 | 留 60 秒容差;遇到占位值或缺字段的条目,就当作窗口断开 | | Antigravity 的 `primary` 不是 5 小时 | 各家字段位置不同:Antigravity 的 `primary` 是 Gemini 周额度,`secondary` 是 Claude/GPT 5 小时 | 按 `windowMinutes` 和 bucket `id` 识别窗口 | | 小组件显示 80%,CLI 显示 85% | 小组件是缓存 | 当前状态以 CLI 为准 | | 相邻两次采样的比例在 12.5% 到 20% 之间跳 | 整数取整误差 | 按窗口取首尾,只用增量大的窗口,加总后再除 | | Antigravity 的用量会回落,两项同时增加的相邻采样,比例也从约 4% 到 190% 都有 | 回落原因没查明;额度还分普通 Gemini、Gemini Argon、Claude/GPT 几个池 | 只用两项同步增加、增量足够大的窗口;结果只用于普通 Gemini 池 | | 想算 Antigravity 里 Claude 比 Gemini 贵几倍 | Claude 和 GPT 是一个合并池,历史里只有两条 0% 记录 | 现有数据算不出来;要两边跑可比的任务,记下模型、token 数和额度增量 | | CLI 输出里有邮箱和组织名 | `accountEmail`、`accountOrganization` 字段 | 截图或贴出之前删掉 | ## 5. 小结与适用边界 如果你也在用 CodexBar,想给自己的订阅定一个每天的节奏,这个方法可以直接用。几条边界: - 比例是单个账户、单个周期的实测。换套餐(比如 Claude Max),换主力模型,或者大量使用云端任务,都要重新跑一遍脚本。 - Codex 的周重置时间会变。这一周的历史里,它的周窗口三次提前归零并重新计时,原因我还没查。排期以 CodexBar 显示的重置时间为准。 - 免费重置另算。我的 Codex 账户有 3 次「Full reset (Weekly + 5 hr)」,每次发放 30 天后过期;Claude 的 limit reset 要在网页或 Claude Desktop 的 Settings > Usage 里使用。 - Antigravity 的 28.6% 把握最低,回落的原因还没查明,暂时只当预算参考。 后续测到新数据,会继续更新补充。 --- # [ZH] 让 ChatGPT 操作 Chrome:找到 Moodle 题库并修改题目 - URL: https://ye-yu.com/blog/chatgpt-browser-moodle-question-bank - Date: 2026-10-21 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/chatgpt-browser-moodle-question-bank 我这次想让 ChatGPT 帮我在一个 Moodle 网站里找到题库,再查看一道题的编辑设置。网站已经在 Chrome 中登录,最费时间的地方是找到正确的课程管理入口。 最后走通的路径是:**所属课程 → 课程管理菜单 → 更多 → 题库 → 试题**。进入题库后,再限定类别、包含子类别,用浏览器页内查找定位题目。 这次实际操作的是本机已登录的 Chrome。下面的指令适用于能访问该浏览器的 ChatGPT 会话;开始前先让它确认能读到当前页面。不同客户端是否提供这项能力,需要看当前可用工具。 我已经验证了题库位置和题目定位。进入编辑页并修改设置由我接手完成,ChatGPT 随后读取了表单;保存后的检查还没有完成。下面会把已走通的路径和建议的后续步骤分开说明。 ## 先告诉它使用哪个浏览器 可以从这段话开始: ```text 请使用我已经登录的 Chrome,打开 <网站地址>。 先确认当前网站、登录状态,以及能看到哪些课程管理入口。 ``` 先让它报出当前页面,确认它接上了你正在使用的浏览器,再继续指路。 我这次一开始遇到浏览器接口不可用。工具仍然能看到运行中的 Chrome,随后通过控制 Chrome 应用继续操作成功。遇到类似情况,可以补充: ```text 请检查当前可用的浏览器和应用。 如果能控制我正在使用的 Chrome,请接着使用这个已登录的窗口。 ``` 这个补充指令需要当前环境本身支持电脑操作。本次没有查明浏览器接口失败的原因,也没有调整登录或权限配置。 ## 从课程进入题库 我最初说了课程名称和题号,查找过程却在课程搜索、全站搜索之间绕了一段路。后来进入所属课程的题库,才定位到目标。 下次可以直接给出查找范围: ```text 请进入 <课程名称>,找到这门课的题库。 查看课程的管理菜单和“更多”入口,找到“题库 → 试题”。 请报告实际点击路径,并把页面停在题目列表。 ``` 我这次站点的完整操作顺序是: 1. 从课程目录打开所属课程。 2. 开启“编辑模式”。 3. 打开课程的“行动菜单”,选择“更多……”。 4. 在课程管理页找到“题库”,进入“试题”。 进入后,应当看到题库页面及类别过滤器。这个界面比“课程名称搜索结果”更接近我们要操作的对象。 “编辑模式”是本次实际操作中的一步,我没有验证它是否为进入题库的必要条件。换一个 Moodle 主题,管理入口可能换位置;让 ChatGPT 根据当前页面确认菜单名称即可。 ## 找到题目:先限定范围,再查编号 题库页面里还要检查类别。有些题放在下级类别中,只看当前类别,列表可能不包含目标题目。 可以这样交代: ```text 请在这门课的题库中查找 <题目编号或名称>。 核对类别,必要时勾选“同时显示子类别的试题”,再应用过滤器。 列表加载后,用浏览器页内查找定位题目。 找到后,核对名称并报告该行的编辑入口。 ``` 本次勾选了“同时显示子类别的试题”,应用过滤器后,最终通过 Chrome 的页内查找找到了目标行。Mac 上手动操作时,页内查找快捷键是 `Command+F`。 页内查找只搜索当前已加载的内容。题库有分页时,当前页查不到还需要检查其他页,或进一步缩小类别范围。本次看到了分页入口,但没有验证跨页查找。 ## 修改题目:把字段和目标值说清楚 找到目标后,下一条指令可以写得很具体: ```text 请打开这道题右侧的“编辑”菜单,进入编辑表单。 先确认题目名称和 <字段名称> 的当前值。 然后将该字段从 <原值> 改为 <目标值>。 ``` 把“帮我改一下这道题”换成字段和目标值,能让操作更容易核对。例如: ```text 请打开 <题目编号或名称> 的编辑页。 将“试题名称”改为 <新名称>。 ``` 在本次编辑页中,ChatGPT 能读取试题名称、正文、答案模式和选项等字段。具体要改哪一项,按当前表单上的实际名称说明。 这一段是根据已观察到的编辑菜单和表单整理的操作方法。本次由我自行进入编辑页并修改设置,ChatGPT 没有执行完整的编辑过程。 ## 保存之后,再让它检查一次 表单上的文字或选项变化,还需要通过保存和重新读取确认。准备保存时,可以接着说: ```text 请保存这次修改。 若页面出现校验提示,请报告提示和对应字段。 保存后重新打开目标题目,确认 <字段名称> 已是 <目标值>。 再使用预览检查 <期望看到的界面行为>。 请分别报告修改、保存、重新读取和预览的结果。 ``` 最后这段是建议的验收流程,本次尚未完成验证。文章提供的是已验证的题库路径、定位方法,以及依据真实表单整理的编辑与检查指令。 如果中途自己接手点过页面,继续时加一句“我刚才操作过,请先重新读取当前页面”。这样它能根据你接手后的状态继续。 > 说明:本文记录基于已登录浏览器的 Agent 页面交互流程,适合需要让 AI 代劳繁琐层级管理后台操作的场景。 --- # [ZH] 让 Codex 每周更新六个命令行工具:从创建任务到确认结果 - URL: https://ye-yu.com/blog/codex-scheduled-cli-updates - Date: 2026-10-18 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/codex-scheduled-cli-updates 我想把几项命令行工具的更新集中到每周一早上:`agy`、`grok`、`codex`、`claude`,后来又补上了 `mole` 和 `herdr`。要求很直接:在我的 Mac 上运行,时间固定为新加坡时间早上 6 点,结果回到原来的 Codex 聊天。 配置完成后,我又实际触发了一次任务:**2 项更新成功、2 项已是最新、2 项失败**。失败的 agy 后来用原命令重试成功;Herdr 则需要改用 `brew upgrade herdr`,随后也更新成功。 最有用的发现是:帮助里有 `update`,还不足以确定该用哪条更新命令。Herdr 通过 Homebrew 安装,运行自更新时直接拒绝执行。我已经据此修订了任务里的命令和约束。 ## 实际跑出的结果 | 工具 | 首次退出码 | 首次运行 | 后续结果 | | --- | --- | --- | --- | | agy | 1 | 从 1.4.0 检测到 1.4.2,下载中断 | 原命令重试成功,版本确认为 1.4.2 | | grok | 0 | 已是最新:1.0.62 | 另有 `privacy` 未识别配置项警告,尚未处理 | | codex | 0 | 更新成功 | 版本确认为 0.163.0,提示需重启 | | claude | 0 | 已是最新:2.1.302 | 无需补跑 | | mole | 0 | 1.56.1 → 1.61.0 | 版本查询确认 1.61.0 | | herdr | 1 | Homebrew 安装禁用自更新 | 改用 Homebrew 后,0.9.3 → 0.9.5,版本查询确认 | 首次六项并行执行中,一项失败没有阻断其他项,每项输出和退出码也都收集到了。后面两个失败项是分别补跑成功的,修订后的六项任务还没有整轮重跑。 这次触发发生在 2026 年 10 月 18 日周日晚上 21:35,新加坡时间。它证明执行链路跑过一次;每周一早上 6 点是否按时触发,还要看对应时间的运行记录。版本号也只代表这次实测结果。 ## 先把“配置完成”说清楚 这次配置里有三个需要分别检查的地方: - **命令入口**:当前安装是否提供 `update`。 - **任务配置**:时间、命令清单、执行环境和结果归属是否被正确保存。 - **执行结果**:每个更新进程最终输出了什么,退出码是什么。 现在三类证据都有了:命令检查、配置回读,以及实际进程的结果。但任务显示 `ACTIVE`,仍然无法单独回答六项是否全部成功。这次外层执行器退出码为 0,内部 agy 和 Herdr 的退出码却都是 1,判断必须落到每个子进程。 > 说明:自动化任务在本地 macOS 运行,涉及权限与退出码逐层校验,建议在配置前明确各命令的更新机制。 ## 第一步:确认六个命令在本机可用 先在本机终端检查命令位置: ```sh zsh -lc 'command -v agy grok codex claude mole herdr brew' ``` 逐项看输出。如果少了某个程序,先处理安装或 PATH 问题。固定写入某个 Node 版本下的绝对路径,会让任务依赖那一版 Node 的安装目录;我的配置要求每次运行时重新解析命令位置。 接着检查更新入口。这次使用的是: ```sh zsh -lc 'agy help update' zsh -lc 'grok update --help' zsh -lc 'codex update --help' zsh -lc 'claude update --help' zsh -lc 'mole --help' zsh -lc 'herdr --help' ``` 这些命令只查看帮助。`agy` 的输出很简短;Mole 的帮助使用 `mo update` 这个写法,实际执行 `mole update` 成功;Herdr 虽然列出了 `herdr update`,运行时却因安装方式受限而失败。排错后,我保存的更新清单是: ```text agy update grok update codex update claude update mole update brew upgrade herdr ``` 具体入口要结合安装方式和真实输出判断。Mole 的自带更新命令会委托 Homebrew;Codex 的自带更新命令会调用 npm。这次也没有出现所有工具都必须直接改用包管理器的结论。 ## 第二步:把任务要求写完整 只说“每周帮我更新”,会留下不少执行细节。我把时间、工作目录、失败处理和完成标准一起写进了要求。 下面是依据本次最终配置整理的提示词,可以复制到 Codex 聊天中,按自己的工具清单调整: ```text 请在当前聊天创建一个定时任务:每周一早上 06:00,时区 Asia/Singapore, 在当前这台本地 Mac 上更新以下六个已安装程序: agy update grok update codex update claude update mole update brew upgrade herdr 我授权这个定时任务执行以上六项更新。结果返回当前聊天。 每次使用本机 zsh 登录 shell,以我的主目录为工作目录, 先用 command -v 重新确认每个命令的位置,不固定写入 Node 版本路径。 六项更新并行执行,分别保留输出与退出码,并等待全部结束。 一项失败不影响其他项。拿到最终输出和退出码后,再判断各项结果。 Herdr 使用 brew upgrade herdr,其余五项使用各程序自带的 update。 不要再执行 herdr update。保留当前发布通道。 不使用 sudo,不修改 shell 配置或项目文件。 遇到缺少程序、网络失败、权限不足或需要人工输入,报告具体原因; 不自动确认未知提示,不更换安装方式。 有更新或异常时,用简体中文简要列出各项结果与失败原因。 全部已经是最新版本且没有异常时,保持安静。 ``` 首次运行已经验证了并行与失败隔离。有更新和失败时也返回了汇总;全部已是最新且无异常时能否保持安静,仍待验证。实际执行器还关闭了标准输入,为每项更新设置了 20 分钟超时,但这些异常分支没有触发,超时值也没有固定写入任务提示词。 ## 第三步:检查保存结果,后续修改原任务 创建后,我检查了工具返回的任务 ID 和 `ACTIVE` 状态,并回读任务配置,核对时间、命令清单和目标聊天。 后面补充 Mole 和 Herdr 时,我修改了同一个任务。这里需要一起更新命令清单,以及提示词中“四项”“五项”这样的数量描述,保留原时间和执行约束。 如果你也要补充工具,可以直接在原聊天提出: ```text 请把 <工具名> update 加入刚才的每周更新任务。 先核对本机命令和帮助信息,保持原有调度时间、目标聊天和执行要求。 修改后回读配置,确认完整命令清单。 ``` Herdr 报错后,我要求把原任务中的命令改成 `brew upgrade herdr`,同时修正“全部使用自带 update”的约束。修改后回读确认了新命令,任务仍为 `ACTIVE`,每周一 06:00 的时间保持不变。 首次执行器是按程序名统一拼接 `update` 的。换成 `brew upgrade herdr` 后,后续执行必须使用完整命令,不能继续套用原来的拼接方式。配置修改成功和新命令单独执行成功,都不能替代修订后整轮任务的测试。 ## 创建时踩到的坑:本机执行与聊天目标 这次第一次创建失败,工具报错: ```text automation_update received invalid arguments: targetThreadId: Missing targetThreadId or destination=thread. ``` 当时请求使用 `kind: "heartbeat"`、`destination: "local"`,没有提供 `targetThreadId`。改成 `destination: "thread"` 后,创建成功。 这个错误让我把两件事分开描述:命令在本机运行,结果返回当前聊天。后续修改任务时,还要保留原来的目标聊天。 这是当次工具接口中发生的参数错误。以后遇到类似问题,应以当前工具定义为准;不能据此推断所有任务类型都必须填写同一套参数。 ## 实跑后的两个排错过程 ### Herdr:安装方式决定这次该用的命令 `herdr update` 返回退出码 1,提示 Homebrew 安装禁用自更新。这个错误已经给出了明确原因,继续重试同一条自更新命令没有解决问题。 我先修改定时任务,再单独执行: ```sh zsh -lc 'cd ~ && command -v brew && brew upgrade herdr' 📌 **【小例子】** > 上周让 Agent 排查过一个 Tailscale 连接问题,当时只记得回复中提过某串特定报错。以前只能在列表里一页页翻找,现在直接输入报错关键词就能秒级定位。 此外,搜索框右下角还附带操作提示。与搜索功能配套的还有一处细节改动:**已归档的对话现在会完整保留状态与最后更新时间**;进入归档查看时,侧边栏标题会明确显示 `(Archived)` 标识,避免混淆当前视图。 ![](/images/posts/2026/10/img-muyxi9jfs883.jpg) ## 二、Scheduled Tasks 改名 Automations 原本的 Scheduled Tasks(计划任务)页签,现已正式更名为 **Automations(自动化)**。除了名称变更,功能上也增加了两项实用能力: 1. **Run Now(立即执行)**:配置好的定时任务无需等待到达预设时间,点击即可立即手动触发执行一次。非常适合刚建好任务时验证流程,或临时需要立即拉取结果。 2. **Create with Prompt(通过提示词创建)**:无需手动逐项配置表单,用一句话自然语言告诉 Agent 你的需求,即可由 Agent 引导协助生成自动化流程。 ![](/images/posts/2026/10/img-muyxj08zi8xx.jpg) 手动新建(点击右上角 `New`)依然保持清晰简洁,仅需 3 个字段: | 字段 | 说明 | |---|---| | Name | 任务名称 | | Schedule | 执行频率(默认支持 Daily 等),指定执行时间,时区自动跟随本机(如 GMT+8) | | Prompt | 要 Agent 执行的具体任务指令 | 界面下方有一行重要提示值得注意:**All automations run as Flash。** 即目前所有 Automations 任务均由 Flash 模型驱动运行。因此在编写 Prompt 时,建议尽量设计为轻量、可重复的任务(例如“每日整理汇总”、“定时轮询状态”等),避免放入需要极重深度推理的超长逻辑。 > 📌 **【典型使用场景】** > 例如经常需要检查 Codex、AGY、Grok 等命令行工具是否有新版本发布。现在只需设置一个自动化任务,让其在每天早晨 7 点自动运行一次;如果有新版本发布,就自动执行更新。 ## 三、Agent 操作日志合并折叠 此前 Agent 在生成两次回复之间,若连续执行修改文件、运行终端命令、读取文件等操作,对话流中往往会刷出满屏的操作流水记录,导致真正核心的回复被挤压到可视区域之外。 在新版本中,这三类操作动作会被**自动合并为单个可折叠的行,并附带一句简短总结**,清晰说明刚才的操作内容;需要查看调用明细时可随时展开。 此外,每条 Agent 回复底部的时间戳现在统一展示为相对时间(如 `5m ago`),鼠标悬停时才展示完整日期与具体时间。 ## 四、更多顺手的小改动 - **新增 Gruvbox Material 主题**:提供明亮(Light)与暗黑(Dark)两种模式,并同步配套了专属的代码语法高亮配色。 - **对话标题生成优化**:自动生成的对话标题会参考首条消息中包含的图片内容;对于未输入文字仅上传附件的消息,现在也能够正常生成对应标题。 - **Windows / Linux 体验优化**:点击主窗口左上角的 Antigravity 图标即可一键新建对话。 - **macOS 文件权限引导**:若系统隐私设置阻止了 Antigravity 读取拖入对话的文件或文件夹,输入框将明确提示前往 `系统设置 > 隐私与安全性 > 文件和文件夹` 进行授权,且 Agent 不会再将受阻文件误报为“文件不存在”。 ## 五、重要问题修复 本次更新修复了 14 项问题,其中与日常开发使用密切相关的重点包括: **避免对话异常中断的修复:** - 修复了 Agent 读取到不完整或截断的 MP4 / MOV 视频后,导致后续该对话中每条消息均发送失败的问题。 - 修复了在 Windows 记事本或 PowerShell 中保存配置文件时引入不可见 BOM/特殊字符,导致设置项全部失效的问题。 **界面交互与状态同步修复:** - 修复了在当前对话切换模型后,切到其他对话时显示的模型可能不一致的问题。 - 打开 PDF、Word、Excel、PowerPoint 等格式的 Artifact 时,此前可能出现乱码,现已调整为规范提示并提供直接下载链接。 - 修复了文件查看器中的目录树侧边栏在部分独立对话中偶发不显示的问题。 - 修复了在 Markdown 预览、Artifact 及差异审查(Diff)之间切换焦点时页面异常跳回顶部的问题。 - 修复了长按 `Cmd+B` / `Ctrl+B` 导致侧边栏剧烈反复开关的问题。 - 修复了选中文本后按下 `Cmd+L` / `Ctrl+L` 时,输入光标偶发未聚焦至输入框的问题。 **其他修复:** - 修复了首页发出的附件会在新建对话时残留于输入框的问题。 - 修复了回退对话历史后,底部消息操作栏可能异常闪烁消失的问题。 - 修复了临时工作文件有时被误作为 Artifact 打开而非在文件查看器中展示的问题。 - 补充了 Rust 语言(`.rs` 文件及 `rs` 代码块)的语法高亮支持。 - 修复了 Windows 平台下更新或删除 Build With Google 系列插件时,因后台进程占用而报错失败的问题。 ## 小结 1. **`Cmd+K` 全文搜索**:支持在历史对话内容中极速查找。 2. **Automations 升级**:支持 `Run Now` 快速验证与 `Create with Prompt` 自然语言生成。 3. **操作折叠体验优化**:文件改动、命令执行与读取合并为单行,对话更清爽。 完整更新日志见官方 [Releases 页面](https://antigravity.google/releases?tab=hub)。 --- ### 附:近期版本回顾 | 版本 | 重点 | |---|---| | v2.19.1 | 直接给 subagent 发消息、Markdown 导出 PDF、仅回退对话的撤销 | | v2.18.1 | Customizations 标签页与插件市场 | | v2.17.0 | `/plan` 先出计划再写代码,新增 Plan Review Policy | | v2.16.0 | 支持 WSL、Office 附件、subagent 实时卡片 | | v2.15.1 | Windows 沙盒 | --- # [ZH] Antigravity 2.17.0 发布:先规划再写代码 - URL: https://ye-yu.com/blog/antigravity-2-17-0-plan-before-code - Date: 2026-09-25 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/antigravity-2-17-0-plan-before-code Google Antigravity 迎来了 v2.17.0 版本更新。 这次更新的核心逻辑非常明确——“Plan before you build”(谋定而后动)。从规范 Agent 的执行流,到彻底重构规则对上下文的占用,多项改动精准切中复杂工程场景的开发痛点。 ![](/images/posts/2026/09/img-muh202yr1ipm.jpg) 本次更新的重点内容已为你梳理完毕 👇 ## 1️⃣ 重磅特性:输入 /plan,先看方案再动代码 复杂任务中最怕 Agent 盲目动手把代码改散。现在有了更稳妥的流程: - **规划预览与修改**:输入 `/plan` 后,Agent 会先输出一份规划方案供你阅读和微调,确认无误后再动工编写代码。 - **计划审查策略(Plan Review Policy)**:可在设置中选择三种策略:每步必审、仅在关键时刻由 Agent 判断是否需要审查,或完全跳过直接执行。 ## 2️⃣ 规则文件独立:20,000 Token 专属预算 以往在项目中写了长篇的规范与规则,极容易把 Skills、Subagents 或 MCP 工具挤出上下文。 - **规则专属配额**:工作区规则现在享有独立的 20k Token 预算,不再抢占核心上下文空间。 - **超限优雅降级**:超出预算的规则会自动折叠为“文件路径 + 描述”索引,Agent 需要时才按需读取,避免生硬截断。 ## 3️⃣ 重要变动:项目配置统一迁移 - **新配置路径**:仓库的个性化配置正式迁移至 `/.gemini/config.json`。 - **废弃旧目录**:旧的 `.agents/settings.json` 已不再读取,若此前配置过 `personal_customization_dir` 等自定义目录,请记得手动迁入新文件。 ## 4️⃣ 高频体验改进(部分精选) - **命令面板切主题**:新增快捷命令,无需打开 Settings 即可直接切换深色/浅色主题。 - **自定义 Agent 支持 Hooks**:Markdown Agent 可在 front matter 中通过 `hooks:` 引入钩子脚本,支持相对与绝对路径。 - **输入框粘贴体验**:右键粘贴支持图片与富文本,保留 Markdown 链接格式;覆盖选中附件粘贴也不会丢失文本。 - **插件与指令“产品化”**:Slash 命令和内置 Google 插件展示规范的产品名称与图标(如 Chrome DevTools、Gemini API 等),告别冰冷的底层命令名。 - **更安静的链接展示**:仅对需要操作或查看的内容(如新建的 Review、启动的本地服务)弹出卡片,仅查阅过的链接静默存入侧边栏书签。 - **语言支持**:新增 `.cppm` 文件的 C++ 语法高亮与专属图标。 ## 5️⃣ 关键问题修复 - **/rewind 快照回溯更准确**:修复了回溯会取到过早历史快照的问题,现在严格取回退点后的最新快照或按步骤精确重放。 - **大文件/Diff 告别卡死**:语法高亮与 Diff 计算移出主线程;超过 100 KB 的文件自动回退为纯文本,保障界面流畅。 - **大项目扫描防超时**:自定义规则、工作流扫描超时时间从 3 秒放宽至 15 秒,避免大型仓库误报加载失败。 - **/btw 保持上下文 Agent**:临时插入提问时,会自动沿用当前会话的 Agent 配置,不再掉回默认 Agent。 - **数学公式渲染修复**:修复了 `$$` 行内同行 [12pt] 行间距导致吞字或多余美元符号的渲染 Bug。 - **媒体保存修复**:修复了 SVG 与带编码信息的视频保存静默失败的问题,内联数据保存会自动匹配正确后缀。 --- 💡 **总结** Antigravity 2.17.0 是一次非常成熟的“工程化演进”:用 `/plan` 规范了代码生产链路,用独立的规则 Token 预算解决了上下文内耗。 如果正在使用 Antigravity 处理中大型项目,推荐第一时间更新体验! --- # [ZH] Google Antigravity 2.16.0 发布,这几个新功能太实用了 - URL: https://ye-yu.com/blog/google-antigravity-2-16-0-new-features - Date: 2026-09-23 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/google-antigravity-2-16-0-new-features 就在今天,Google Antigravity 正式推送了 2.16.0 版本更新!这次的更新不仅大幅提升了大型项目的性能,还带来了几个直击开发者痛点的新功能。废话不多说,直接带大家速览本次更新的核心亮点! ![](/images/posts/2026/09/img-mudkij90aspi.jpg) ## 1. 终于来了!无缝接入 Windows WSL 🐧 对于 Windows 开发者来说,这是个期待已久的好消息。新版本在应用设置中新增了对 Windows Subsystem for Linux (WSL) 的原生支持。你现在可以直接在应用内连接并切换到已安装的 WSL 发行版,标题栏会直观地显示当前激活的环境,开发与调试体验更加丝滑。 ![](/images/posts/2026/09/img-mudkjhekxqu8.jpg) ## 2. 原生读取 Office 附件,拖拽即用 📄 告别繁琐的内容复制粘贴!从 2.16.0 开始,你可以直接将 Word、Excel 和 PowerPoint 文档拖拽进对话框。得益于底层的更新,Gemini 模型现在能够原生读取并解析这些文档内容,处理需求文档或数据表格的效率直线飙升。 ## 3. 子代理(Subagent)全面可视化 🤖 在复杂任务中,我们经常会调用子代理(Subagent)。现在,所有的子代理调用都会以独立卡片的形式出现在对话流中。你可以实时看到它们是处于 Running(运行中)、Waiting(等待)还是 Completed(已完成)状态。卡片上还新增了悬停停止按钮以及一键跳转侧边栏的快捷方式,彻底告别“黑盒”等待。 ## 4. 性能飞跃与体验打磨 ⚡ 除了三大核心功能,这次更新在细节体验上也诚意满满: - **大项目扫描“起飞”**:针对大型项目或网络挂载文件夹,自定义技能(Skills)和配置文件的扫描速度有了质的飞跃——从过去的超过 1 分钟直接缩短到不到 1 秒! - **图片操作更顺手**:终于支持右键直接复制或保存图片了!而且 SVG 格式的图片现在可以完美复制到剪贴板,并直接粘贴到其他设计或代码应用中。 - **状态更透明**:新的加载指示器会详细展示 Agent 在准备回复时的具体动作(例如工具初始化进度),在网络波动导致模型重试时,还会显示带有尝试次数的实时倒计时。 ## 总结 整体来看,Antigravity 2.16.0 在跨平台开发环境(WSL)、办公文档解析以及运行状态可视化上迈出了一大步。大型项目加载速度的优化更是为日常开发省下了大量时间。建议大家立刻更新体验! --- # [ZH] 深入介绍 Antigravity 新版本 Agent 默认权限设置 - URL: https://ye-yu.com/blog/antigravity-agent-default-permissions-deep-dive - Date: 2026-09-16 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/antigravity-agent-default-permissions-deep-dive ![](/images/posts/2026/09/img-mu3k8mabg9wv.jpg) 我们正在改变 Antigravity 中权限默认工作的方式! **简要结论:**使用默认模式后,需要你确认的权限请求会更少。 随着 Antigravity 更新 macOS 和 Linux 上的沙箱机制,命令现在默认会在沙箱中运行。只要访问的是项目文件夹中的内容,且不需要联网,就无需审批。 > 注:Windows 目前仍使用现有的权限系统。 以前你需要在 Turbo 模式和始终请求权限之间二选一;这次更新后,Default 应该会成为一个更平衡的中间方案。 ![](/images/posts/2026/09/img-mu3k1ihikdou.jpg) 以下是各选项的说明: ## Request Review(请求审核) - 默认所有命令都需要批准;命令不会在沙箱中运行。 - 读取和写入权限仅限工作区。 - 默认不允许网络访问;用户必须批准。 ## Default(默认) - 默认情况下,命令会在沙箱中运行,无需审批。Agent 可以请求在沙箱外运行命令,但需要用户批准。 - 在沙箱中,读取和写入权限仅限工作区和系统临时目录。 - 沙箱中不允许网络访问;如需联网,Agent 必须在沙箱外运行命令,并需要用户批准。 ## Turbo - 所有命令都会在沙箱外自动运行,无需批准。 - 可以读写磁盘上的所有文件。 - Agent 可以访问网络。 本次更新还允许你指定命令规则的适用方式: - 沙箱关闭时,`command` 规则适用于所有命令;沙箱开启时,适用于沙箱内的命令。 - 沙箱开启时,`unsandboxed` 规则适用于沙箱外的命令。 ## Permission Presets(权限预设) 权限预设决定权限规则如何生效。你配置的 `allow`、`deny`、`ask` 规则会叠加在预设之上,并始终拥有更高优先级。 在 Default 模式下,终端命令会在隔离的 Terminal Sandbox 中运行,访问范围限制在工作区和系统临时目录,且默认不能联网。当命令需要网络连接或主机资源时,Agent 会请求在沙箱外运行;除非被 `command(...)allow` 规则覆盖,否则系统会要求你批准。 你可以在 `Settings → General → Permission Settings` 中配置权限预设,也可以在 `Settings → Projects` 中按项目覆盖它。新项目默认使用 `Inherit Global`,即跟随全局权限设置。 ## Simon注:一些术语的中英文对照: | Antigravity 当前术语 | 建议中文 | |---|---| | `Security Preset` | 安全预设(比“权限预设”更贴近界面) | | `Default` | 默认模式 | | `Turbo mode` | Turbo 模式 | | `Local Permissions` | 本地权限 | | `Network Access Rules` | 网络访问规则 | | `Terminal Commands` | 终端命令 | | `Commands Outside Sandbox` | 沙箱外命令 | | `MCP Tools` | MCP 工具 | | `sandbox` | 沙箱 | | `agent` | Agent | 另外,截止到目前,这个版本我还没有更新到。 --- # [ZH] 告别桌面客户端束缚:Antigravity CLI 1.2.0 的“无头远程控制” - URL: https://ye-yu.com/blog/antigravity-cli-headless-remote-control - Date: 2026-09-10 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/antigravity-cli-headless-remote-control ![](/images/posts/2026/09/img-mtv6qsgwhnhi.jpg) 在处理大型重构、跑全套测试或跨项目迁移依赖时,AI Agent 的执行往往需要几十分钟甚至数小时。以前要想在离开工位时用手机或浏览器接管任务,必须在电脑上开着 Antigravity 2.0 桌面端,并在设置面板中保持 Remote Control 开启。 随着 **Antigravity CLI 1.2.0** 的发布,官方将这一能力原生内置到了终端工具中,带来了 **无头远程控制(Headless Daemon)**。这意味着即使不启动桌面图形界面,甚至不保持终端窗口打开,你的开发机器也能作为一个常驻服务在后台待命,供你从任意设备的浏览器中随时连接与调度。 --- ## 什么是“无头远程控制”? “无头(Headless)”指的是没有图形界面的运行模式。以往使用 CLI 时,一旦终端窗口关闭或 SSH 会话断开,正在运行的进程就会中断。 1.2.0 引入的无头守护进程(Daemon),本质上是将 Antigravity CLI 注册为**操作系统的系统级或用户级后台服务**: * **Linux**:注册为 `systemd` 用户服务。 * **macOS**:注册为 `LaunchAgent`。 * **Windows**:注册为计划任务(Scheduled Task)。 服务一旦注册启动,就会在后台建立与控制中枢的安全反向连接。哪怕你关闭终端窗口、锁屏,甚至系统遭遇异常崩溃,服务都能自动恢复运行。 --- ## 三条核心命令搞定运维 操作无头服务不再需要手写 systemd 单元文件或 macOS plist 配置文件,CLI 提供了三个极简子命令: ### 1. 注册并启动后台常驻:`agy remote-control start` 在已经完成登录的终端中运行: ```bash agy remote-control start ``` 系统会自动安装对应的系统服务并立即拉起进程。 如果你的多台工作站共用同一个账号,建议在启动时加上自定义实例名称,方便在网页端区分: ```bash agy remote-control start --name "workstation-mac" ``` *(如果不指定 `--name`,系统会自动分配一个类似 `my-machine-distant-plume` 的易记名称)。* ### 2. 查看运行状态与机器名:`agy remote-control status` 随时可以通过该命令检查服务是否正常在跑、当前的连接状态以及当前机器的实例标识名: ```bash agy remote-control status ``` ![](/images/posts/2026/09/img-mtv6fs3xd9jd.jpg) ### 3. 停止并彻底注销:`agy remote-control stop` 当你不再需要这台机器在后台待命时,执行以下命令即可停止守护进程,并将其从系统服务管理器中彻底反注册: ```bash agy remote-control stop ``` --- ## 如何在浏览器端连接与使用? 无头服务跑起来后,使用流程和桌面端 Remote Control 完全一致: 1. **登录控制台**:在手机、平板或任意电脑的浏览器中打开 [https://antigravity.google.com/](https://antigravity.google.com/)。 2. **账号对齐**:使用与命令行相同的 Google 账号登录。 3. **选择机器**:在实例列表中找到刚刚配置的机器名称(如 `simonmacbookair-local-rising-bolt`)。 4. **远程操控**:连接成功后,你可以在网页端直接发起新任务、查看当前上下文、审查代码 Diff 与产物,并在 Agent 请求工具授权时直接远程点击确认。 *(注:如果在手机端使用,建议将该网页“添加到主屏幕”,当后台任务完成或等待人工输入时,能接收到推送通知)。* ![](/images/posts/2026/09/img-mtv6odduromz.jpg) --- ## 关键细节与注意事项 * **认证分离**:守护进程使用的是 Antigravity CLI 的登录凭据(`agy` 登录状态),与同一台机器上 Antigravity 桌面编辑器的登录态是各自独立的。 * **不同操作系统的常驻生命周期**: * **Linux**:开机即自启,无论是否有用户登录会话,都会在后台保持常驻。 * **macOS**:在用户登录进入桌面时启动,退出登录(Sign out)后暂停,下次登录自动恢复。 * **Windows**:如果以管理员权限运行 `start`,可实现开机免登录自启;普通终端运行则在用户登录后启动。 * **改名生效方式**:如果想修改实例名称,可以直接重复执行带新名字的 `agy remote-control start --name "new-name"`,或者修改配置文件 `~/.gemini/config/config.json` 中的 `cliRemoteControlHostname` 字段,随后重新执行 `start` 重启服务即可。 --- CLI 1.2.0 对无头远程控制的集成,让你的本地开发环境真正变成了一台随时随地可调用的“私人 AI 计算节点”,既保留了本地环境的工具链优势,又彻底解除了被实体工作台绑定的限制。 --- # [ZH] Frontier Engineering:10 条核心原则 - URL: https://ye-yu.com/blog/frontier-engineering-ten-core-principles - Date: 2026-09-10 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/frontier-engineering-ten-core-principles > **原文来源**:https://kiro.dev/topics/frontier-engineering/ > **术语说明**:文中保留 `agent`、`prompt`、`context`、`steering file`、`skill`、`MCP`、`vibe coding`、`CI`、`PR` 和 `guardrail` 等 AI 与工程术语。 --- ## 概述与宣言 软件开发者正在分成两类:一类人改变了自己与 AI agent 协作的方式,另一类人只是换了编程工具。如今,AI agent 已经能够自主编写代码、运行测试、修复失败并继续迭代,而且越来越能在没有人类介入的情况下连续工作数小时。开发者的工作也随之发生了变化。那些实现生产力跃升的开发者,并不是用了比别人更好的编程工具,而是采用了不同的工作方式:他们不再直接构建软件,而是构建一套能让 agent 完成软件开发的工作体系。 本指南写给一线从业者(管理者另有指南)。如果你已经在使用 AI 编程助手,交付速度却没有明显提升,这篇指南会告诉你需要改变什么。先提醒一句:这是一项工程投资,不是打开一个开关就能完成的事。你需要花几周时间培养直觉、编写 `steering file`、重构代码库,并学习如何把工作拆解给 agent。如果你不准备改变工作流程,却期待立刻见效,结果会让你失望。最初几周可能反而更慢,之后速度才会显著提升。 ### 10 条原则一览 1. **你是架构师,不是打字员** 2. **尽可能延长 agent 的工作时间,减少你的介入** 3. **为 agent 建设代码库** 4. **为 agent 建立快速反馈循环** 5. **执行成本很低,方向决定一切** 6. **把代码当作可丢弃的产物** 7. **用要求人类的标准要求 AI 产出** 8. **信任边界,而不是 agent** 9. **让 agent 参与所有工作,而不只是写代码** 10. **持续调校你的 agent 工作体系** ### Frontier Engineering 不是 vibe coding Frontier Engineering 不是 vibe coding,也不是把 `prompt` 粘进聊天框后碰运气。它是一套严谨、有章法的工程实践,把传统工程纪律与 AI agent 带来的杠杆效应结合起来。长远来看,你需要持续锻炼的能力,是管理自己的注意力。随着 agent 接手越来越多的执行工作,你要承担同时在多个 agent 之间切换 `context` 的认知负荷;一切加速时,仍要有意识地守住质量标准;吃饭或到了深夜,还得克制自己,不要反复查看 agent 的进度。你的工作变成了不断判断:什么需要你关注,什么不需要。 Frontier Engineering 仍处于早期采用阶段。现在还没有多少开发者以这种方式工作,这套实践也仍在成熟:怎样审查 agent 的产出最有效,怎样为 agent 而不是人类设计工具和测试基础设施,这些问题都还没有公认答案。因此,这种工作方式仍然依赖直觉:什么该交给 agent,任务范围该怎么划定,又该在什么时候介入。这些直觉来自实践,也来自最初几周编写 `steering file`、重构代码库和学习拆解任务的过程。一旦掌握了这种工作方式,你的交付速度会显著提高,也能着手完成过去无暇顾及的工作:原本超出范围的功能、迟迟没有进行的架构调整,以及一直没空补上的测试和工具。此后,收益还会继续累积:agent 的能力每提升一步,都建立在你已经积累的经验之上。这种工作方式仍在形成,而现在采用它的开发者也正在参与定义它。从今天开始改变你的工作方式。 --- ## 01. 你是架构师,不是打字员 这份工作的重点不再是写代码,而是写清楚意图。我们看到,前沿开发者亲手编写的代码不到其产出总量的 1%,其余代码来自他们指挥、引导和审查的 agent。 工作可以归结为两件事:定义什么算“完成”(包括需求、约束和验收标准),以及验证产出是否符合你的意图。 把意图写清楚并不是新要求,但现在已经不能省略。你要说明期望的行为、需要考虑的边界情况,以及如何验证结果是否正确。例如,“给这个 API 加上身份认证”并不是清楚的意图;你需要说明哪些角色能访问哪些 endpoint、token 过期时如何处理,以及怎样测试未授权访问。然后让 agent 编写代码。 过去,你的大部分时间用于写代码;现在,这些时间会用来明确意图、确定方向,并有针对性地审查 agent 的产出。 --- ## 02. 尽可能延长 agent 的工作时间,减少你的介入 许多开发者始终和编程助手待在同一个循环里:给 agent 一条 `prompt`,等 60 秒,拿到代码,手动测试,再把错误粘回聊天框,然后重复这一过程。这样不可能获得很高的开发速度。 前沿开发者会把执行时间更长的任务交给 agent,并在任务中写明验证步骤:“实现这个功能,编写测试并运行,确保测试通过,新代码的覆盖率达到 90%。”随后,agent 可以工作 30 分钟甚至更久,而你去处理别的事情。agent 中途会犯错,这很正常。让它继续循环、自我修正,逐步收敛到正确结果。 让多个 agent 并行处理持续到来的任务,并异步审查它们的产出。现在限制生产力的不再是打字速度,而是你能让多少个 agent 同时承担有意义的工作。 随着工具逐渐完善,你对这种方式也更有信心,可以进一步延长 agent 的运行时间:让它连续工作数小时或通宵,也可以让 agent 启动其他 agent,第二天早上再检查结果。目标是逐步把自己移出执行循环,最终只负责确定方向和验证结果。 --- ## 03. 为 agent 建设代码库 agent 的表现很大程度上取决于它所面对的代码库。先打好那些对人类也有帮助的基础:完整的 README 和架构文档、能够说明预期行为的测试、清晰的模块边界、强类型,以及速度快、错误信息明确的构建流程。面对大型遗留代码库时,应当一次整理一个模块,并把 agent 的工作范围限制在已经准备好的模块内,而不是直接让它处理整个代码库。 如今,这些投入的回报远高于以往,因为新的人类成员只需要完成一次 onboarding,而 agent 每个 session 都要重新 onboarding。人类记在脑中的信息,需要明确提供给 agent:用 `steering file` 说明约定和编码标准;通过 `skill` 按需加载特定任务的操作流程;用脚本自动设置环境;通过命令行工具和 MCP server 获取 `context`、执行操作。 让 agent 把自己的工作记录下来,供后续 session 使用。agent 应当记录设计决策,并在代码中留下足够的注释,作为持久记忆。这样,下一个 agent session 继承的不只是代码,还有代码背后的理由。 --- ## 04. 为 agent 建立快速反馈循环 如果 agent 不能在本地运行测试,并在你查看代码之前自行修正,那么瓶颈就是你。前沿开发者会投入精力,把验证流程做得快速、本地化且可自动执行,让 agent 能在紧凑的循环中反复测试。 agent 应当能够使用代码检查工具和单元测试,能够通过浏览器渲染界面并直观检查 UI 改动,能够使用依赖服务的本地 mock 进行集成测试,也能够在笔记本电脑上启动完整技术栈,执行端到端测试。如果你会使用某项工具验证自己的工作,agent 也应当能够使用它。这样它就能自行验证,而不需要你在不同工具之间复制粘贴输出。 属性测试在这里尤其有用:它能验证实现是否符合你的意图,还能发现一些 agent 不会主动为其编写具体测试用例的边界情况。agent 应当能够自行验证工作、发现失败并加以修复,不需要你留在循环中。 没有这些投入,代码生成得更快,只会带来更多失败的构建和缺陷。有了这些能力,代码库的整体质量反而会提高,因为 agent 的验证往往比许多人实际执行得更全面、更一致。 --- ## 05. 执行成本很低,方向决定一切 当代码一个下午就能写完,困难的部分就不再是实现,而是判断该解决什么问题、该构建什么,以及什么时候应该改变方向。实现细节的修改成本很低,但系统设计、API 契约、依赖关系和架构取舍仍然代价高昂。把精力放在这些影响长久的决策上。 在设计阶段,可以把 agent 当作头脑风暴的伙伴:让它研究可选方案、探索不同路径,并找出你思路中的漏洞。如果两种设计都可行,可以让 agent 分别制作原型并进行比较。过去只能靠争论决定的问题,现在可以用证据来判断。 方向确定以后,采用 spec 驱动的开发方式:先与 agent 一起写出清楚的 spec 和需求,减少它开始生成代码之前的歧义。如果只给 agent 一个含糊的 `prompt`,它会自行决定如何取舍,而你撤销这些决定花费的时间,可能比跳过 spec 省下的时间更多。 迭代过程中,把注意力放在最重要的问题上:架构能否承受真实负载,原先的设计取舍是否需要重新评估,以及当前产物是否已经可以交到用户手中。 --- ## 06. 把代码当作可丢弃的产物 如今,代码的成本很低。你需要不断判断正在构建的东西是否值得发布,以及它是否值得后续的运维和维护成本。现在,你可以用一天做出原型,然后选择放弃;也可以用两周把产品做到接近可发布的状态,发现方向不对后再重新开始。 过去,丢弃代码很难,原因有两个:代码是自己花几个月写出来的,所以很难割舍;重新开始,又意味着再花几个月。现在,这两个原因都不复存在。重要的是交付正确的东西,而不是勉强把初稿送进生产环境,也不是因为已经投入了成本,就回避必要的架构调整。 不再有用的代码,就把它丢掉。agent 可以在当天结束前构建出下一个版本。 边界处的测试是例外。单元测试会和代码一起被丢弃,但那些让重新开始仍然安全的测试需要保留:验证行为的端到端集成测试、验证不变量的属性测试,以及验证大规模性能和并发能力的负载测试。它们共同构成了任何重写版本都必须满足的契约。 --- ## 07. 用要求人类的标准要求 AI 产出 只有速度,没有质量,只会增加生产环境中的风险。无论代码由谁或什么生成,只要以你的名义发布,责任就在你。刚开始时,这意味着要逐行审查 agent 的产出,逐渐弄清模型擅长什么、容易在哪些地方出错,从而建立信心。 时间久了,逐行阅读所有代码无法扩展到更大的工作量,因此你需要构建一个 AI reviewer 来分担审查工作,检查团队在意的问题,例如正确性、安全性、可维护性、测试质量和常见缺陷模式。在创建 PR 之前,先用 AI reviewer 检查本地改动,然后在 CI 中再运行一次。AI reviewer 逐渐成熟后,可以让它处理前几轮反馈。 把人的注意力放在最擅长判断的问题上,例如设计和架构是否合理,改动会怎样影响上下游系统,以及安全边界是否可靠。 不要让 agent 的工作循环止于合并。让它监控部署、验证生产环境中的实际行为;如果出现回退或异常,就自动开始处理修复。对结果负责,意味着跟进一项改动进入生产环境的全过程,而不是在 PR 阶段停下。 --- ## 08. 信任边界,而不是 agent 要让 agent 长时间自主运行,就需要不依赖人工监看的 `guardrail`。不要接受这样的虚假二选一:要么任由 agent 在你的电脑上不受限制地运行,要么对每一次 `tool call` 都点击“接受”。更好的做法是把 agent 的权限限制在它实际需要的文件、工具、网络和凭据内,然后让它在无需监督的情况下运行。 一开始把范围收紧,随着你对这些限制更有信心,再逐步扩大权限,最终只对无法撤销的操作设置确认。对生产环境尤其要谨慎:除非你明确、审慎地授权,否则 agent 不应拥有生产账号或部署凭据。 再加入确定性的检查,捕获普通测试不容易发现的问题:用静态应用安全测试发现漏洞,用凭据扫描发现泄露的密钥,并通过自动推理,以数学方式验证 agent 的产出是否符合你的意图。每自动化一项 `guardrail`,你就少一个必须留在循环中的理由。 --- ## 09. 让 agent 参与所有工作,而不只是写代码 建立起前面提到的习惯和基础以后,可以把同样的做法用到各类工作中。过去需要一周完成的设计文档,现在一个下午就能完成;过去耗时数小时的运维调查,现在几分钟就能完成。进度更新、Sprint 总结、oncall 报告和文档,都可以采用同一套流程。 提供 `context`,定义预期结果,让 agent 起草,然后在对外分享之前进行审查和修改。 真正的提速来自把 agent 用在整个开发生命周期中:规划、开发、测试、部署和运维。这份宣言里的原则同样适用于这些 agent:给出清楚的意图、快速的反馈循环和受限的访问权限。pipeline agent、oncall agent、文档 agent 和第三方 agent 应当共享大部分基础配置与 `context`。给它们相同的 `steering file` 和工具,让它们无论执行什么任务,都能保持一致的行为。 --- ## 10. 持续调校你的 agent 工作体系 每当 agent 走错方向,或不必要地把你拉回执行循环时,都问问自己:怎样防止同样的事情再次发生?解决办法可能是在 `steering file` 中增加一条规则,用 `skill` 记录它没有正确执行的流程,用命令行工具把手动步骤自动化,用 MCP server 获取合适的 `context`,或者扩大它对某项此前无法访问的工具或系统的权限。agent 的每次失误和打断,都是进一步提高其自主性的机会。 这就是 Frontier Engineering 新的日常习惯:你不仅在构建产品,也在不断改进那套构建产品的系统。 这种习惯会逐渐产生复利。最初,agent 只有在你明确给出 `prompt` 后才会运行,而且经常需要你介入。随着 `steering file` 和工具逐渐成熟,agent 会变得更加自主,能够在后台运行:无需你发起任务,就主动发现并修复缺陷、清理技术债、改善代码质量。 随着模型改进,新的 agent 可以清理旧模型生成的内容。新模型发布时,重新检查过去为了弥补旧模型弱点而采用的变通方案是否还有必要。`steering file` 和工具都是持续演进的产物,其变化速度会和模型一样快。 --- # [ZH] Antigravity 帮助修复 macOS 中 dasd 进程 CPU 占用高的 Bug - URL: https://ye-yu.com/blog/fixing-macos-high-cpu-usage-in-dasd-process-with-antigravity - Date: 2026-09-08 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/fixing-macos-high-cpu-usage-in-dasd-process-with-antigravity ![](/images/posts/2026/09/image-1024x576.png) 今天,我的 Mac(运行最新的 macOS 27.0 beta8)开始变得迟钝,打开活动监视器一查,一个名叫 **`dasd`** 的系统进程死死吃满了 90%~120% 的单核 CPU。我搜索了一下,没有找到合适的答案。使用 Google antigravity 一路追踪,结果抓到了一个令人哭笑不得的**“苹果工程师写出跨时区死循环”**的大瓜。 ![](/images/posts/2026/09/image-1-1024x685.png) * * * ## 不想读太多的直接用这行命令: ``` defaults write com.apple.appstored ArcadePayoutResetDate \ -date "$(date -v+3d -u +"%Y-%m-%dT%H:%M:%SZ")" && \ killall appstoreagent ``` * * * ## 以下是 google antigravity 的解决过程 ### 结论与当前状态 (BLUF) `dasd` 持续占用 90%~99% CPU **并非正常的系统开机维护任务,而是 `appstoreagent`(App Store 后台服务)陷入了极高频的任务调度死循环**。 该问题已经定位并**已完成修复**,`dasd` 的 CPU 占用已从 **98.1% 降至 0.0%**,系统恢复正常,无需重启电脑。 * * * ### 根本原因分析 通过抓取系统统一日志(Unified Logging System)与进程调用链路,发现了确凿的死循环证据: 1. **死循环任务**:`com.apple.appstored.ArcadeResetPO`(Apple Arcade 收益指标重置任务)。 2. **逻辑缺陷**: * 当前时间为下午,但 `com.apple.appstored` 偏好设置中的 `ArcadePayoutResetDate` 被固定在今天凌晨:`2026-09-06 00:00:00 +0800`(过去的时间)。 * `appstoreagent` 执行完重置后,未将其递增到下一个周期(次日),而是继续使用已经过期的 `2026-09-06 00:00:00` 作为新执行时间重新注册。 * `dasd`(Duet Activity Scheduler)收到调度请求后,发现预定时间早于当前系统时间,判定为超时,立刻下发调度(`Running immediately on submission`)。 * 结果:**每秒触发超过 400 次调度与进程通信**,导致 `dasd` 持续跑满单核 CPU。 #### 现场日志证据 ``` appstoreagent: [ArcadePayoutReset] Payout metrics reset with current payout reset time: 2026-09-06 00:00:00+0800 appstoreagent: [ArcadePayoutReset] Reset with reason: Rescheduling appstoreagent: [ArcadePayoutReset] Using new date: 2026-09-06 00:00:00+0800 with reason: Rescheduling appstoreagent: [ArcadePayoutReset] Activity not scheduled; submitting request dasd: SUBMITTING: 501:com.apple.appstored.ArcadeResetPO dasd: Running immediately on submission dasd: REQUESTING START: 501:com.apple.appstored.ArcadeResetPO ``` * * * ### 采取的解决措施与验证 已通过将偏好项中的调度时间推进至次日,并平滑重启 `appstoreagent` 打破该死循环: 1. **执行命令**:`defaults write com.apple.appstored ArcadePayoutResetDate -date "2026-09-06T16:00:00Z" && killall appstoreagent` 2. **验证结果**: * `top` / `ps` 监测确认:`dasd`(PID 404)CPU 占用立即降至 **0.0%**。 * `appstoreagent` 重新启动后正常挂起,不再以 400+ 次/秒的频率刷屏日志。 * * * 经过 google antigravity 一顿操作,CPU 占用下来了。 ![](/images/posts/2026/09/image-2-1024x692.png) --- # [ZH] Antigravity 2.12.0 新增了 /boost 命令 - URL: https://ye-yu.com/blog/antigravity-2-12-0-boost-command - Date: 2026-09-03 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/antigravity-2-12-0-boost-command ![](/images/posts/2026/09/img-mtlqlj31og8a.jpg) `/boost` 与 `/teamwork-preview` 都是 Antigravity 中用于处理复杂任务的高阶调度机制,但两者的**设计定位、协作形态和前置流程**有本质区别: --- ### 1. 核心定位与使用场景 | 维度 | `/boost` (深度攻坚 / 强化委托) | `/teamwork-preview` (多智能体协同 / 团队项目) | | :--- | :--- | :--- | | **主要定位** | **纵向深挖**:针对高复杂度、需要深度思考与严苛验证的单项硬核任务。 | **横向协作**:针对跨模块、大体量、需要多角色分工或超大规模并行探索的系统级项目。 | | **适用场景** | • 复杂的代码重构、困难的算法实现
• 疑难 Bug 根因定位、死锁/性能排查
• 单点深度调研与严谨技术选型 | • 完整系统从 0 到 1 构建(如开发一个编译器、复杂 Web 应用)
• 难解数学定理证明与大规模并行推演(支持多 Agent 并行)
• 完整的技术文档审阅评估 | | **底层智能体形态** | 调度者协调特定攻坚角色:
• `DeepCoder`(专注代码实现)
• `DeepInvestigator`(专注根因分析与验证) | 依据任务形态路由的多 Agent 团队:
• 文档评审组 / 形式化证明管线
• 大规模并行探索团队(可扩展到数十/上百 Agent)
• 模块化开发与对抗性审核团队 | --- ### 2. 工作流程与交互方式的区别 #### `/boost`:快速路由与闭环打磨 * **无需冗长的前置对齐**:通常由 Orchestrator 自动决定进入 Solo 模式还是 Delegation 模式。 * **高保真任务传递**:原汁原味地将用户需求派发给攻坚 Subagent,无需繁重的需求拆解模板。 * **多轮验证循环**:Worker 完成后,调度者会主动挑错、审查未满足条件,并在必要时发起追问与额外轮次,直到完全满足标准。 #### `/teamwork-preview`:严谨的提示词工程与契约验收 * **两阶段工作法**:必须先经历 **(1) 需求打磨与契约拟定**,再 **(2) 正式委派启动**。 * **强制防“伪通过”(Anti-Self-Certification)**:通过交互式流程建立客观的测试基准(Acceptance Criteria)和约束,防止 Agent 团队自己给自己打满分并过早交卷。 * **工件跟踪**:全程维护 `prompt_draft.md`,在用户最终确认批准前不会盲目启动多智能体系统。 --- ### 3. 一句话总结与选择建议 * 选 **`/boost`**:当你有一个**具体的硬骨头要啃**(复杂的实现、难排查的 Bug、深度的验证调研),希望让专业模型深入推演、反复检查代码质量时使用。 * 选 **`/teamwork-preview`**:当你想要**立项做一个完整的复杂系统/项目**,或者做大规模并行推演,需要先梳理好需求边界与验收标准,再交由一个多 Agent 团队分工搞定时使用。 ![](/images/posts/2026/09/img-mtlq5vzw6xx5.jpg) --- # [ZH] Gemini 偷偷上线了 3.8 Flash,谷歌最近的版本更新有点太快了 - URL: https://ye-yu.com/blog/gemini-3-8-flash-stealth-release - Date: 2026-09-02 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/gemini-3-8-flash-stealth-release 今天随手在网页端问了 Gemini 一句“你现在是什么模型”,它的回答直接跳出了 **Gemini 3.8 Flash**。 有趣的是,界面右下角依然显示的是“Flash”,顶部菜单和模型选择标签里也只写着 3.7。当我追问它“为什么前端还显示 3.7”时,它倒是把底层逻辑解释得明明白白:前端 UI 的缓存和文案还没同步,但后端的路由分流已经悄悄切到了新模型。 没有推文官宣,没有博文预热,属于典型的静默灰度上线。 --- ![](/images/posts/2026/09/img-mtjvebm8351v.jpg) ### 这张截图说明了什么? 看模型自己的回答,其实非常符合现代 Web 服务的灰度发布流程: 1. **前端与后端脱节**:UI 上的名字是静态配置或发版节奏较慢的资源,而后端模型的 AB 测试和路由切换可以实时调整。 2. **渐进式放量**:如果你现在去问,可能有的会话依然是 3.7,新开一个对话或者被命中了实验桶,就会拿到 3.8。 这次升级依旧落在了 **Flash** 上。作为轻量、快速、便宜的模型线,Flash 现在的定位就是做日常任务和快速响应的主力。谷歌把新调整直接先放到 Flash 上跑,用真实的流量来验证效果。 --- ### Gemini 最近的发布频率:快得有点反常 回顾一下最近一两个月 Gemini 的动作,节奏明显变了: * **7 月底**:Gemini 3.6 Flash 上线。 * **8 月中旬**:推出了 Gemini 3.7 Flash,中间只隔了三周左右。 * **9 月初**:现在 Gemini 3.8 Flash 已经开始在生产环境灰度,距离 3.7 的发布甚至还不到三周。 一个月出头的时间,次级版本号从 3.6 一路跳到 3.8。这种高频的发版节奏说明了两件事: 1. **版本号的意义在变淡** 以前大模型发一个“点版本”(如从 3.0 到 3.5),通常伴随着重大的架构调整或跨越式的性能提升。现在的 .x 更像是一次常规的双周敏捷迭代,改了对齐、补了数据、修了部分特定领域的短板,测试没问题就直接推上线。 2. **Flash 成了快速迭代的试验田** 相比参数量巨大、调用成本高的 Pro 或 Ultra 模型,Flash 拥有极低的推理延迟和成本。谷歌显然选择把高频改动先放到 Flash 上快速试错,让它承担日常最大量的交互。 --- 对于日常写代码、做简单自动化或当搜索工具用的开发者来说,这种“频繁的小修小补”其实体验更平滑。你可能感知不到某一天突然天翻地覆的变化,但模型在默默地换代。 你可以去自己的网页端问问它现在的版本,看看你被分在哪个灰度池里了。 --- # [ZH] 彻底解决 Google Antigravity 频繁提示 Chrome DevTools MCP 授权的问题 - URL: https://ye-yu.com/blog/fix-antigravity-chrome-devtools-mcp-permission-prompt - Date: 2026-08-23 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/fix-antigravity-chrome-devtools-mcp-permission-prompt ![](/images/posts/2026/08/img-mt55rurq4vp8.jpg) 在使用 Google Antigravity(或 Gemini 智能体环境)进行前端调试、网页自动化测试时,很多人会配置并启用 Chrome DevTools MCP 插件。 但在实际使用中,经常会遇到一个让人烦躁的体验:**明明每次弹窗都选了“Yes, and always allow”(永久允许),但每跑两步还是会频繁跳出权限确认弹窗。** 本文记录一下这个问题的原因和一行配置彻底解决的方法。 --- ## 现象描述 智能体在执行网页操作时,界面频繁弹出确认窗口: ```text Allow using this MCP tool? chrome-devtools/list_network_requests 1. Yes, allow this time 2. Yes, and always allow in this conversation 3. Yes, and always allow in this project 4. Yes, and always allow 5. No (tell the agent what to do instead) ``` 即使你选了 `4`(全局永久允许),下一个操作调用控制台、截图或点击元素时,弹窗依然会再次出现。 --- ## 为什么选了“永久允许”还是会弹窗? **原因在于权限粒度。** 当你选择 `4. Yes, and always allow` 时,Antigravity 默认只把**当前被调用的具体子工具**加入白名单,例如: - `mcp(chrome-devtools/list_network_requests)` - `mcp(chrome-devtools/evaluate_script)` 而 Chrome DevTools MCP 实际上包含了 20 多个独立的工具(`click`、`fill`、`hover`、`navigate_page`、`take_snapshot`、`get_console_message`、`lighthouse_audit` 等)。智能体在完成一个多步骤任务时,会根据上下文调用不同的子工具;只要遇到一个此前没被单独授权过的工具,系统就会再次弹窗确认。 --- ## 解决方案:配置 MCP 服务级全局授权 解决方式非常直接:在权限列表中配置**整个 MCP 服务**,而不是单个子工具。 ### 修改步骤 1. 打开全局配置文件: - 路径:`~/.gemini/config/config.json` 2. 找到 `userSettings.globalPermissionGrants.allow` 数组。 3. 在数组中添加 `"mcp(chrome-devtools)"`。 示例配置: ```json { "userSettings": { "globalPermissionGrants": { "allow": [ "mcp(chrome-devtools)", "command(git log)", "command(npm run)" ] } } } ``` ### 规则对比 | 授权格式 | 作用范围 | 适用场景 | | :--- | :--- | :--- | | `mcp(chrome-devtools/navigate_page)` | 仅允许单个子工具 | 严格限制危险操作(如仅允许只读类工具) | | `mcp(chrome-devtools)` | 允许该 MCP 服务下的**所有**工具 | 完全信任该服务,免除所有子工具弹窗 | --- ## 补充技巧 1. **对其他 MCP 服务通用**:如果你接入了其他自建或第三方 MCP 服务(如本地命令执行、SSH 管理等),同样可以使用 `mcp()` 的语法实现整服务免确认。 2. **项目级独立配置**:如果不希望全局开启,也可以在项目对应的配置文件(`~/.gemini/config/projects/.json`)中设置 `permissionGrants`,仅对当前工作区生效。 保存配置后无需重启,后续智能体在调用 Chrome DevTools 的任何工具时都将直接自动执行。 --- # [ZH] 六个城市,哪张最传神? - URL: https://ye-yu.com/blog/six-cities-which-one-is-most-vivid - Date: 2026-08-23 - Category: 编辑 - English Version: https://ye-yu.com/en/blog/six-cities-which-one-is-most-vivid ![](/images/posts/2026/08/img-mt63st1omai8.jpg) ![](/images/posts/2026/08/img-mt63t9czepys.jpg) ![](/images/posts/2026/08/img-mt63u3z1b2nt.jpg) ![](/images/posts/2026/08/img-mt63ufe9pbtk.jpg) ![](/images/posts/2026/08/img-mt63uxxf44i9.jpg) ![](/images/posts/2026/08/img-mt63v3h7ue1y.jpg) 首先解读[城市名称]的独特视觉特征,并围绕以下五个元素构建场景: - 一个可辨识的地标、建筑特征或天际线元素。 - 一种独特的本地城市移动方式。 - 一个微妙的日常生活瞬间。 - 一种本土植物、景观或环境特征。 - 一个自然属于这座城市的构图和视角。 整体场景结构必须因城市而异。不要反复使用相同的物体位置或视觉公式。 --- # [ZH] macOS Golden Gate 27.0 (Beta 2) appstoreagent 100% CPU 故障排查与 SIGSTOP 挂起解决方案 - URL: https://ye-yu.com/blog/macos-golden-gate-27-0-beta-2-fixing-appstoreagent-at-100-cpu-with-sigstop - Date: 2026-07-04 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/macos-golden-gate-27-0-beta-2-fixing-appstoreagent-at-100-cpu-with-sigstop ## 1\. 故障现象 在升级至 macOS Golden Gate 27.0 Developer Beta 2 (Build: 26A5368g) 后,MacBook 开始严重发热,电池电量迅速消耗。通过终端执行进程状态检索: ```bash $ ps aux | grep appstoreagent 19002 107.0 0.1 488771680 25088 ?? R 12:20AM 14:55.36 /System/Library/PrivateFrameworks/AppStoreDaemon.framework/Support/appstoreagent ``` 守护进程 `appstoreagent` 在完全没有运行 App Store 客户端的情况下,持续强占单核 100% 以上 of CPU 资源,且手动强杀(Kill)后会被立刻拉起,继续满载空转。 * * * ## 2\. 日志追溯与根因定位 为锁定真实异常,我们通过系统的统一日志控制台(Unified Logging System)针对该进程执行特征日志抓取: ```bash $ /usr/bin/log show --predicate 'process == "appstoreagent" and eventMessage contains "recent_launch_times"' --last 5m ``` 日志抓取输出如下: ```bash 2026-07-04 00:34:55.462135+0800 0x7969e Error 0x0 19002 0 appstoreagent: (libsqlite3.dylib) [com.apple.libsqlite3:logging] no such column: active_launch_events.recent_launch_times in "SELECT active_launch_events.ROWID, active_launch_events.bundle_id, active_launch_events.containing_bundle_id, active_launch_events.event_source, active_launch_events.is_extension, active_launch_events.launch_end_time, active_launch_events.launch_start_time, active_launch_events.recent_launch_times, active_launch_events.timestamp, active_launch_events.payload FROM active_launch_events" ``` ### 异常分析: * **异常根源**:macOS Golden Gate 27.0 Beta 2 在内存中动态构建或迁移安全数据库 Schema 时,遗漏了向 `active_launch_events` 物理表填充 `recent_launch_times` 字段的升级迁移逻辑。 * **死循环成因**:由于缺少该字段,底层的 SQLite 查询不断抛出 `no such column` 异常。`appstoreagent` 在捕获此异常后触发了**无延迟、高频的立即重试机制**,从而陷入“查询-失败-重试”的死循环,瞬间吃满单核 CPU。 * * * ## 3\. 为什么常规 Kill 无法解决? 在 macOS 中,`appstoreagent` 是由系统根守护进程 `launchd` 管理的 User Agent。 当我们对其执行 `kill -9` 强杀时: 1. 进程退出,系统短暂释放 CPU。 2. `launchd` 监测到该守护服务非预期退出,立好重新将其拉起。 3. 新拉起的 `appstoreagent` 实例启动,再次执行初始化数据库查询,重新触发 Schema 缺失错误,CPU 再次飙升至 100%。 因此,强杀进程只会导致系统频繁进行“拉起-崩溃-再拉起”的死循环,反而会带来额外的系统进程开销与海量日志堆积。 * * * ## 4\. 优雅的 SIGSTOP / SIGCONT 解决方案 由于系统只读卷受到 SIP(系统完整性保护)的严格保护,普通用户无法直接修改底层数据库的 Schema,我们只能通过行为干预实现临时缓解。 这里我们使用信号量控制策略:**挂起进程(Process Suspension)**。 * 发送 `SIGSTOP` 信号:使进程转为 `T` (Stopped) 状态。此时,操作系统停止分配 CPU 周期给该进程,其 **CPU 占用率瞬间降至 0%**。最关键的是,`launchd` 仍认为该进程处于存活(Alive)状态,**不会触发重新拉起机制**。 * 发送 `SIGCONT` 信号:当我们需要使用 App Store 时,发送该信号可立即使其恢复运行,保障应用的正常下载与更新。 我们编写了一个 Python 3 守护进程脚本 `guardian.py`,用于自动化这一控制逻辑: ```python #!/usr/bin/env python3 import subprocess import time import os import sys import signal def get_pids(process_name): """获取指定进程名的所有 PID""" try: output = subprocess.check_output(["pgrep", "-x", process_name], text=True) return [int(pid.strip()) for pid in output.strip().split("\n") if pid.strip()] except subprocess.CalledProcessError: return [] def is_app_store_running(): """检查 App Store GUI 客户端是否正在运行""" return len(get_pids("App Store")) > 0 def get_process_state(pid): """获取进程状态。返回 'T' 代表已挂起,其他代表运行中""" try: output = subprocess.check_output(["ps", "-o", "state", "-p", str(pid)], text=True) lines = output.strip().split("\n") if len(lines) > 1: return lines[1].strip() except subprocess.CalledProcessError: pass return None def main(): print(f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] appstoreagent guardian daemon started.") while True: try: agent_pids = get_pids("appstoreagent") app_store_active = is_app_store_running() for pid in agent_pids: state = get_process_state(pid) if not state: continue # 如果 App Store 打开了,并且 appstoreagent 处于挂起状态 (T) -> 恢复它 if app_store_active: if 'T' in state: print(f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] App Store is running. Resuming appstoreagent (PID {pid})...") os.kill(pid, signal.SIGCONT) # 如果 App Store 关闭了,且 appstoreagent 没被挂起 -> 挂起它 else: if 'T' not in state: print(f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] App Store is closed. Suspending appstoreagent (PID {pid}) to save CPU...") os.kill(pid, signal.SIGSTOP) except Exception as e: print(f"Error in guardian loop: {e}", file=sys.stderr) time.sleep(5) if __name__ == "__main__": main() ``` * * * ## 5\. launchd 后台静默守护部署 为了让该守护进程静默且常驻地在后台执行,我们将其包装为 macOS 的 Launch Agent。 ### 5.1 创建配置文件 在本地创建 `com.user.appstoreagent-guardian.plist`: ```xml Label com.user.appstoreagent-guardian ProgramArguments /usr/bin/python3 -u /path/to/guardian.py RunAtLoad KeepAlive StandardOutPath /path/to/guardian.log StandardErrorPath /path/to/guardian.err ``` > \[!WARNING\] 请注意将配置文件中的 `/path/to/guardian.py` 等路径修改为您在本地机器上的绝对路径。并且强烈建议配置 `-u` 参数,这样 Python 进程的日志输出便能够无缓存地立即刷入 `guardian.log` 中。 ### 5.2 引导并激活服务 1. 给守护脚本赋予可执行权限:`chmod +x /path/to/guardian.py` 2. 将配置文件复制到用户 Launch Agents 目录:`cp com.user.appstoreagent-guardian.plist ~/Library/LaunchAgents/` 3. 使用 launchctl 载入并引导该守护进程:`launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.user.appstoreagent-guardian.plist` 4. 验证服务运行状态:`launchctl print gui/$(id -u)/com.user.appstoreagent-guardian` 若显示 `state = running` 且指定了正确的运行 PID,则代表部署成功。此时,当 App Store 处于关闭状态时,您会看到 `appstoreagent` 在 `ps aux` 中的状态变为了 `T` (Stopped),CPU 使用率稳稳保持在 **0.0%**。而当您双击打开 App Store 时,它会瞬间被唤醒提供正常服务。 ### 5.3 服务卸载 当未来 Apple 发布下一 Beta 版本并修复了该 Schema 迁移 Bug 时,您可以通过以下命令彻底移除此临时守护进程: ```bash # 停止后台服务 launchctl bootout gui/$(id -u)/com.user.appstoreagent-guardian # 清理配置文件 rm ~/Library/LaunchAgents/com.user.appstoreagent-guardian.plist ``` --- # [ZH] 成都3D微缩图 - URL: https://ye-yu.com/blog/chengdu-in-3d-miniature - Date: 2025-12-14 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/chengdu-in-3d-miniature ![](/images/posts/2025/12/cd-1.jpg) ![](/images/posts/2025/12/cd-2.jpg) ![](/images/posts/2025/12/cd-3.jpg) --- # [ZH] 使用 Cloudflare Tunnel 安全访问远程群晖 SSH - URL: https://ye-yu.com/blog/securely-access-remote-synology-ssh-using-cloudflare-tunnel - Date: 2025-07-12 - Category: 程序员 - English Version: https://ye-yu.com/en/blog/securely-access-remote-synology-ssh-using-cloudflare-tunnel 您是否拥有一台放在异地(例如家中或办公室)的群晖(Synology) NAS,并希望无论身在何处,都能像在本地一样通过 SSH 安全地进行管理?这里记录了如何利用 Cloudflare Tunnel(零信任隧道)实现这一目标。 **使用 Cloudflare Tunnel 的优势:** * **无需公网 IP**:即使您的群晖处于复杂的内网环境,也无需担心公网 IP 问题。 * **无需开放端口**:您无需在路由器上设置任何端口转发,极大地提升了安全性,避免了将 SSH 端口暴露在公网被恶意扫描。 * **高度安全**:所有流量都通过 Cloudflare 的全球网络进行加密和保护,并可享受其强大的 DDoS 防护能力。 * **稳定且免费**:Cloudflare 为个人用户提供了慷慨的免费套餐,足以满足远程 SSH 管理的需求。 **准备工作:** 1. **一台群晖 NAS**:并知道其管理员账户和密码。 2. **一个您自己的域名**:例如 `yourdomain.com`,并且您需要能够修改这个域名的 DNS 设置。 ### **第一部分:在 Cloudflare 进行云端设置** 在这一部分,我们将在 Cloudflare 的管理后台创建一个隧道,并获取连接所需的令牌。 #### **步骤 1.1:将您的域名添加到 Cloudflare** 如果您的域名还没有交由 Cloudflare 管理,请先登录 [Cloudflare 官网](https://dash.cloudflare.com/),点击 “Add a Site”,按照指引将您的域名添加进来。这通常需要您在您的域名注册商处,将域名的 DNS 服务器(Name Servers)修改为 Cloudflare 指定的地址。 #### **步骤 1.2:进入 Zero Trust 管理后台** 在 Cloudflare 主仪表盘,从左侧菜单选择 **Zero Trust**。首次进入可能需要您选择一个免费计划并设置一个团队名称。 #### **步骤 1.3:创建隧道 (Tunnel)** 1. 在 Zero Trust 后台,从左侧菜单选择 **Access** -> **Tunnels**。 2. 点击 **Create a tunnel** 按钮。 3. 为您的隧道起一个容易识别的名字,例如 `synology-nas`,然后点击 **Save tunnel**。 #### **步骤 1.4:获取并保存连接器令牌** 创建隧道后,您会看到一个“Choose your environment”的页面。这里会提供在不同操作系统上安装连接器(`cloudflared`)的命令。 **这是非常关键的一步!** 在右侧的命令框中,您会看到一整条安装命令,类似于 `cloudflared service install ey...`。您只需要复制这串命令中,跟在 `install` 后面的那段看起来像乱码的字符串,这就是您的隧道令牌(Token)。请将这串令牌完整地复制下来,保存在一个安全的地方,我们马上会在群晖上用到它。 ### **第二部分:在群晖 NAS 上安装和配置隧道 (套件中心版)** 现在,我们使用更方便的套件中心方法,在您的群晖上安装 `cloudflared` 软件,并让它连接到 Cloudflare。 #### **步骤 2.1:添加第三方套件源** 1. 登录您的群晖 DSM 桌面,打开 **套件中心 (Package Center)**。 2. 点击右上角的 **设置 (Settings)** 按钮。 3. 在弹出的窗口中,选择 **套件来源 (Package Sources)** 标签页。 4. 点击 **新增 (Add)**,在“名称”处输入 `SynoCommunity`,在“位置”处输入以下地址: `https://packages.synocommunity.com` 5. 点击 **确定 (OK)** 保存。 #### **步骤 2.2:从套件中心安装 Cloudflared** 1. 回到套件中心主界面,在左侧菜单选择 **社群 (Community)**。 2. 在右上角的搜索框中,输入 `Cloudflared` 进行搜索。 3. 找到 `Cloudflared` 套件,点击 **安装套件 (Install)**。 4. 等待安装完成。这一步会自动处理好用户、权限和后台服务等问题。 #### **步骤 2.3:配置隧道令牌** 1. 安装完成后,在套件中心找到 `Cloudflared`,点击**打开 (Open)**。 2. 套件的配置界面会非常简洁,通常会有一个输入框,提示您输入 **Tunnel Token**。 3. 将您在 **步骤 1.4** 中从 Cloudflare 仪表盘复制的那一长串**令牌字符串**,完整地粘贴到这个输入框中。 4. 点击**应用 (Apply)** 或 **保存 (Save)**。套件会自动在后台启动并使用您的令牌连接到 Cloudflare 的网络。 #### **步骤 2.4:验证连接并指向 SSH 服务** 1. 回到您浏览器中的 Cloudflare Zero Trust 后台。刷新页面,您应该能在刚才的隧道配置页面看到您的连接器状态显示为 **“Connected”**。如果看到了,说明您的群晖已经成功连接到云端! 2. 现在,我们来告诉这个隧道,当收到请求时,应该把它转发到群晖的 SSH 服务。点击 **Public Hostnames** 标签页。 3. 点击 **Add a public hostname**。 4. 填写规则: * **Subdomain**: 输入一个您喜欢的子域名,例如 `ssh` 或 `nas`。 * **Domain**: 选择您的域名。 * **Path**: 留空。 * **Service**: * **Type**: **必须选择 `SSH`**。 * **URL**: 输入 `localhost:22` (`22` 是群晖 SSH 服务的默认端口)。 5. 点击 **Save hostname** 保存。 至此,服务器端的配置已全部完成! ### **第三部分:在您的电脑上配置 SSH 客户端** 最后一步,我们需要配置您自己电脑上的 SSH 客户端,让它知道如何通过 Cloudflare Tunnel 进行连接。 #### **步骤 3.1:在您的电脑上安装 `cloudflared`** 您的电脑也需要安装这个工具来作为“客户端代理”。您可能会疑惑,为什么群晖上装了,电脑上还要装?这是因为它们扮演的角色不同:群晖上的 `cloudflared` 负责把内部服务安全地“送”到云端;而您电脑上的 `cloudflared` 则负责将您的 SSH 命令安全地“带”到云端。两者在云端握手,才能构成一条完整的加密通道。 * **官方下载地址**:[https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/) * 请根据您的操作系统(Windows/macOS/Linux)下载并安装。例如,在 macOS 上,推荐使用 Homebrew:`brew install cloudflared`。 #### **步骤 3.2:修改本地 SSH 配置文件** 这是让魔法发生的关键。 1. 用文本编辑器打开您电脑的 SSH 配置文件。通常位于 `~/.ssh/config` (macOS/Linux) 或 `C:\Users\您的用户名\.ssh\config` (Windows)。如果文件或目录不存在,请手动创建。 2. 在文件中**添加**以下配置块:`# Connect to Synology NAS via Cloudflare Tunnel Host ssh.yourdomain.com ProxyCommand /opt/homebrew/bin/cloudflared access ssh --hostname %h` 3. **请务必修改**: * `Host ssh.yourdomain.com`: 将这里的 `ssh.yourdomain.com` 替换为您在 **步骤 2.4** 中设置的**完整主机名**。 * `/opt/homebrew/bin/cloudflared`: 将这里替换为您电脑上 `cloudflared` 的**实际安装路径**。您可以在终端中输入 `which cloudflared` (macOS/Linux) 或 `where.exe cloudflared` (Windows) 来找到它。 ### **第四部分:开始远程连接!** 所有配置都已完成!现在,无论您身在何处,只需打开您电脑的终端,输入我们熟悉的 SSH 命令: ```bash ssh [您的群晖用户名]@ssh.yourdomain.com ``` (请将 `ssh.yourdomain.com` 替换为您自己的主机名) 您会发现,系统会正常提示您输入密码,验证通过后,您就成功登录到了远方的群晖 NAS! ### **结语与常见问题排查** 恭喜您!您已经成功搭建了一条极其安全、便捷的回家之路。 * **Q: 连接超时或失败怎么办?** A: 首先,请回到 Cloudflare Zero Trust 的隧道管理页面,确认您的隧道连接器状态是否为绿色的 “Connected”。如果不是,请尝试在群晖套件中心重启 Cloudflared 套件。如果状态正常但仍无法连接,请仔细检查您本地 `.ssh/config` 文件中的主机名和 `ProxyCommand` 路径是否完全正确。 * **Q: SSH 连接时提示 `Classic tunnels have been deprecated` 错误?** A: 这是因为您的 SSH 配置文件中 `ProxyCommand` 命令过时了。请确保您使用的是 `cloudflared access ssh --hostname %h` 而不是旧的 `cloudflared tunnel ...` 命令。 * **Q: 使用 `sudo` 时,即使输入正确的密码也提示失败?** A: 这很可能是因为您本地电脑的键盘布局与远程服务器不一致,导致输入的特殊字符(如 `@`, `!`, `#`)出错。请参考我们之前的讨论,使用“回显测试”或暂时修改为简单密码来解决。 --- # [ZH] 翻译:张彦的前言 - URL: https://ye-yu.com/blog/source-note-ian-johnsons-foreword-to-faithful-disobedience - Date: 2025-04-10 - Category: 编辑 - English Version: https://ye-yu.com/en/blog/source-note-ian-johnsons-foreword-to-faithful-disobedience 我初次见王怡,他领我走进一间会议室。从那里望出去,能看见成都市中心一片老旧的写字楼,成都可是中国西部最重要的一个大城市。那是 2011 年,他的教会当时名为秋雨之福归正教会,后来更名为秋雨圣约教会。如同许多未登记的教会一样,它坐落在一座写字楼里。这楼颇为老旧,就一部电梯还能用,嘎吱作响地把人运到十七层。我看了一眼,便决定走楼梯上去。 我说,我正在写一本关于中国宗教复兴的书。我曾去过许多中国传统基督教腹地的农村教会,比如河南省,但我感觉像这样的大型城市教会越来越重要了。我问他,是否能允许我参加教会的礼拜,再跟会友们聊聊天? 王牧师当即同意,附带了两个条件:第一,教会内禁止拍照;第二,如果我想引用任何人的话,欢迎引用,但必须征得本人的同意。他的理由很简单:秋雨教会没有什么可隐瞒的。它是公开的,谁来都欢迎,谁想写什么也不应受到限制。所以,如果我想去他的教会,那是我的权利。如果我想写点什么,那也是我作为自由人的权利。他提出的限制,仅仅是为了尊重来聚会的人的隐私,并保持聚会的庄重。 那时,从 1980 年代中期以来,我断断续续地在中国工作。我知道,经常来他的教会可能会带给我潜在的风险。我问他关于楼下保安的问题,他们会不会向上面报告,说有个老外经常来这栋楼,还哼哧哼哧爬到十七层? “会啊,”他说,“但外国人并未被禁止聚会。我们是一个公开的教会,没有什么可隐瞒的。来和我们一起礼拜吧。” 我们又多聊了一会儿,我觉得与秋雨教会面临的那些挑战相比,我这点思虑可能不值一提。于是,我答应了他的条件,开始定期参加教会活动,花费了数百个小时参加礼拜、神学院学习、祷告小组,还跟会友们聊天。几乎所有的会友都乐于分享他们的经历。 这对我而言,是一段特别的宗教体验的开始。我在加拿大长大,是一名圣公会(在美国称为 Episcopal)基督徒,去教堂感觉很自在。但对我来说,礼拜的美主要体现在音乐,还有钦定版圣经或公祷书里莎士比亚式的语言。我遇到的大多数牧师的讲道都不太能让人信服,所以我觉得教会似乎不过是一种有意义的主日仪式,里面包含着关于如何好好生活的重要教导。 去听王怡讲道,那感觉不一样。他讲的道可不是那种匆忙塞到仪式里的几句短讲,好让大家赶紧听完去活动室喝咖啡吃甜点。他的讲道构思精巧、逻辑清晰、富有教育意义。而且,证道大多数很长。他讲上半小时是常事,大多数情况会讲长达四十五分钟。然而,你听起来并不会觉得冗长。他并未将基督教呈现为一种义务或苦差事,而是将其视为理解我们周围社会的重要途径。那时他三十八岁,六年前(2005 年)才信主,所以他自己也处在一条探索的路上——学习圣经,并将其教给我们。 这并非对王怡的颂歌。像中国许多未登记教会的牧者一样,他自学成才,熟记圣经,但有时看问题的方式有些教条。他对女性的看法(她们不能担任长老,更不用说牧师了)我也无法苟同。他与不同意见的人会发生争执,这似乎并不是合乎基督精神的解决问题的最佳方式。我想其他会友也有类似的顾虑——有些人会对他那些争论翻白眼,或者拿他的脾气开玩笑。 但对他们和我来说,参加王怡的教会是一次深刻的体验。其中一个原因在于,人们感觉自己正在参与一件完全公开透明的事情——一件他们可以参与其中并帮助管理的事情。在中国,这是一个颠覆性的想法,因为在那里,通常是由别人——往往是中国共产党——在主宰你的人生。 也有部分原因是在于他个人的魅力、口才和敏锐的头脑。他的讲道富有感染力,并不是因为辞藻华丽,而是因为他解释《圣经》的方式清晰、深刻,使其与一个中国人的日常生活息息相关。他探讨实实在在的问题,将这些问题与信仰联系起来。他完全不认为这个信仰是“西方的”或“外来的”,而是一种普世信仰,只是恰好发源于我们今天称之为“中东”的那个地方。 我写的书也包含了汉族人在中国所实践的其它信仰,所以我花了一些时间接触了佛教徒、道教徒和民间信仰的信徒。他们也是一些理想主义者,试图为他们的追随者带来一种道德体系。这种尝试对许多中国人来说至关重要,因为他们感觉自 1949 年中共建政以来,所建立的那个无道德的世界,让他们无所适从。许多其他宗教领袖也有虔诚的信众跟随,他们在他们的精神信息中找到了人生的意义和价值。 但是,王怡——以及其他未登记的新教教会——与信徒的联结最为直接。他们提供了最多的帮助和建议,组织得也最好,通常开办学校、神学院和青年团契。这就能解释为什么在新教在 2010 年代开始受到打压之前,它一度被看作是中国发展最快的宗教。 王怡对这些风险心知肚明。他知道自己随时可能被捕,但他拒绝被卷入中共所营造的那种保密文化。因此他也拒绝使用“地下教会”这个词。他的教会就是一个教会,拥有与官方教会同等的存在权利。它之所以未登记,是因为它选择不登记。我觉得这个逻辑很有说服力,在我的写作中,我更倾向于使用“未登记”(unregistered)这个词,因为它比“地下”(underground)教会(它们通常并非真的在地下)或“家庭”(house)教会(这暗示着只有十几人的小团体)更准确。实际上,这些教会租赁办公场所,开办幼儿园、神学院,甚至书店。它们就是政治学家们所称之为的公民社会——存在于政府控制之外的团体。 并非世上所有的信仰都面临这些问题。有些信仰很幸运,能存在于允许宗教自由的开放社会中。另一些则是国家认可的宗教,享受着国家支持的福利,但也承担着相应的义务。但在某种程度上,所有有信仰的人都必须决定如何与当局互动。王怡和中国其他未登记教会的领袖们深入思考了这个问题,并试图通过声明和宣言来阐明答案,本书收录的许多文献就记录了这些思考。 这些文章所反映的,可以被看作是中国特有的状况,但它们也反映出在许多国家正在发生的一场不平常的信仰迸发。在中国,信仰曾长期被禁止,但现在正处于高涨期,令当局困惑。一些信仰已被收编,特别是佛教和中国的本土宗教道教,它们享有国家支持,但也受到严格的国家管控。另一些则面临彻底的打压,比如伊斯兰教,政府对其发起了残酷的控制运动,尤其是在西部的新疆地区。还有一些,如天主教,则一直处在关于主教任命权的微妙谈判中。至于新教,政府的目标是迫使所有教会加入国家控制的组织。那些拒绝的教会,像王怡的教会一样,则面临被摧毁或至少规模被急剧压缩的命运。 中国的这些内部争斗,许多都具有全球性的影响。中国现在是世界上最大的佛教国家,并试图将其作为一种软实力工具,输出到其他佛教国家。其对伊斯兰教的压制招致了国际谴责,并导致了对在中国举办的声望卓著的活动(如 2022 年冬奥会)的部分抵制。其与梵蒂冈的谈判也受到全球约 12 亿天主教徒的密切关注。与此同时,对新教的打压也引起了广泛关注,部分原因在于社交媒体的传播。 在中国内部,这场控制宗教的运动是通过制定新法律来实施的。这些法律非但不能保护宗教自由,反而对其加以限制。这反映了中国法律体系中一个更广泛的问题。理想情况下,法律应超越统治者的意愿——即“法治”(rule of law)。但在中国和许多其他国家,法律是压迫的工具——是“法制”或曰“以法而治”(rule by law)。正是这种国家控制下的法律体系,在过去十年里将矛头对准了中国的未登记教会,并导致了王怡在 2018 年被捕。有人认为针对王怡及其教会的逼迫是个特例,辩称他过于敢言。但这种批评没有抓住重点:这个国家对所有宗教都感到不安,所有宗教最终都会成为目标——这正成为已经发生的事实。 十年前我遇到王怡时,所有这些风险,他都了然于胸。他经常写到被捕的可能性,以及面对一个政权逼迫时该如何应对。但他的结论是走一条彻底公开化的道路。他的讲道被录下来,建立了一个资料库,向任何来访者开放,无论是敬拜者还是警察。秋雨教会的人们不是偷偷摸摸从后门进来,而是穿着他们周日最好的衣服,佩戴着名牌去敬拜。他们公开地参加他们的教会并引以为豪。这是他们的教会,是这个国家管控的汪洋大海中,一个年富力强的理想主义者所带领的自由自主的孤岛。 “如此公开是有风险的,”有天早上他告诉我。“但我感觉,更大的风险是转入地下。如果我们不像自由人那样行事,我们就不会有自由的心态。作为基督徒的一个基本心态就是自由。但如果你认为自己是罪犯,你就不可能像自由人那样行事。所以我们努力走公开化的道路。” 王怡满怀真诚地走在这条路上,直到前方无法通行。如今他身陷囹圄,我想起他曾在一封写给他妻子蒋蓉的信中,谈到如果他被捕该怎么办时,他写道: “我还是传道人,你还是师母。昨天以福音为生,明天还是以福音为生。因召我们的,既是昨天的神,又是明天的神。” * * * 我不知道[有人已经翻译过了](https://zh.christianitytoday.com/2023/02/china-church-wang-yi-persecution-faithful-zh-hans/)。不过就算是一次练习也挺好。 英文原文在 [Faithful Disobedience: Writings on Church and State from a Chinese House Church Movement](https://www.amazon.com/Faithful-Disobedience-Writings-Chinese-Movement/dp/1514004135/ref=sr_1_1) 这本书中,是该书的前言。 作者张彦,英文名字是 Ian Johnson。他有一个很漂亮的网站 [https://ian-johnson.com/](https://ian-johnson.com/) ,你可以从这个网站中了解他,总之是个牛人。 --- # [ZH] 在盼望中纪念母亲 - URL: https://ye-yu.com/blog/remembering-my-mother-in-hope - Date: 2025-02-14 - Category: 基督徒 - English Version: https://ye-yu.com/en/blog/remembering-my-mother-in-hope 我还在开会的时候,接到弟弟的电话,说母亲走了,我没有想到这么快。春节期间,我们在成都过年,和母亲视频交流的时候,感觉她还好好的。我匆匆订票回到了山东老家。 母亲名字叫何乃香,和我父亲是一个村。我们村子的名字很好听,西楼。不过它的名字不是来自月满西楼的婉约意境,据传乃是因为何姓村民修建的一个地主庄园的阁楼或是碉楼,所以叫何家楼,后来一部分人迁到了东边,迁过去的叫东楼,何家楼就称为西楼。到今天,楼早已经不在了,但原来楼所在位置的附近,至今仍然有个约定俗成的称呼,叫“楼底”。我母亲就出生在楼底那个范围内。 我姥姥很早就去世了,去世的时候,母亲也就只有两三岁。姥爷一个人带着母亲长大。生活当然是很艰难的。正常的人家都艰难,更何况是他们。后来她嫁给同村的我父亲,刚开始的时候日子也很难。后来我父亲开拖拉机,后来又贷款买了一辆拖拉机跑运输,生活才开始好起来。 好景不长,1987年,父亲在一次意外中丧生,那年母亲35岁。我在今天以四五十岁的年龄去设身处地想一下,那真是一段难熬的日子。大概从那时起,她的哮喘病开始严重起来。后来,我继父和母亲结婚,入赘来到了我们家,继续支撑我们的家庭。母亲先是生了一个妹妹,这个妹妹不到半岁就去世了,后来生了我弟弟。 我从初中开始住校,在家的时间很少。初中还有点假期,到了高中,一个星期也就只有半天能回一次家。我对母亲的记忆非常琐碎。小的时候经我常问她关于我出生的故事,她就跟我讲,怀我的时候,姐姐不满三岁,我是不符合计划生育政策的,所以她就逃跑,跑到她的姨家去躲着。那些细节我到现在也记不清楚了。不过这些故事,也导致我看《超生游击队》这样的节目,笑不出来。挺着肚子到处躲藏,担惊受怕,怎么会是一个喜剧呢? 还有一些艰难的场景让人难忘。有一年,我的姨姥,也就是母亲的姨妈来看她,看到我在,给了我十块钱,我上小学,没见过这样的大钱啊,送走姨姥之后,就带着那十块去上学了,母亲追了我近两里路,把钱抢回去了。想想又心酸又好笑,母亲那时候身体还好。 母亲识字不多,对我们的教育也很简单而细碎。在村里,何姓是个大姓,她的辈分很小,导致我们出去见到个人,就是舅舅、姨、姥姥、姥爷这种级别的。母亲教育我们,要尊敬长辈,见个人就要打招呼叫人,不能因为年纪小就不称呼他们。我上初中上高中了,就念叨我好好学习;上大学了,就让我们好好交朋友,别惹呼人。我工作了,就叫我好好工作,团结同事。我结婚了,就跟我说,别打架,嘴甜儿点,对人家好。 我没有更多的回应,只有答应。我和母亲的共同的话题很少,她所知道的街坊邻居、七亲八戚的事情,我因为在外面,知之甚少。我的工作和社交圈子又没有办法和她同步。每次回去时候,基本上就是她说着,我听着。我知道她关心我,我也只能跟她说,我很好,你放心吧。 这十几年,母亲身体一直不好,哮喘导致肺部的问题,又发展为肺心症。我继父、弟弟和我姐在家把她照顾得非常好。母亲出生在1952年,按老家虚岁的算法,她过完年就是74岁了。如果没有他们含辛茹苦地照顾,她可能也不会多活这好多年。 2022年8月,母亲又一次病重,到日照的人民医院住院,按弟弟和姐姐的判断,她的状态很不好。那时候疫情方面管理很严格,我好不容易进了医院,跟她交流,她还认得我。住院期间,我太太告诉我,她怀孕了。我把这个好消息告诉了母亲。可能是个巧合,她挺过来了。出院的前一晚,我还到书奇家住了一晚,他们的小K还出生不久,他们还借车给我,让我送母亲从日照回五莲。 也就是那一次,我向她再一次传了福音,和她一起做了决志的祷告,她跟我一句句地念。 > “亲爱的耶稣,我承认我有罪,我需要你,你为我在十字架,牺牲了你自己,救了我的生命。我愿意忏悔,有永远的生命,奉耶稣的名祷告,阿们。” 我还告诉她无论什么样的艰难的境况,要向耶稣祷告,说耶稣救我。我说这样将来有一天,我们会在天上见。只是我对本地的教会一点也不熟悉,母亲没有后续的牧养和跟进,也没有受洗。只有我每次回来,跟她聊一下我们的盼望和归宿。 母亲去世,我心里还在想,有没有可能请日照的教会帮助做一个基督教的葬礼。回家一看,弟弟和姐姐已经安排好了,基于强大的文化压力和对他们的敬重,我只能听从他们的意见。但是我心里知道,我有一个盼望,就是我相信母亲因为她口里承认,心里相信,就必得救。 ![](/images/posts/2025/02/IMG_7137-1-1024x576.jpg) 村西边有一条岭。送完葬的第二天,天气很好。我在平房顶上拍到了落日的余晖,我看到太阳还悬在西岭上,我开车想到那里再拍一张。可是仅仅几分钟的时间,我开到那里时,太阳便已经看不见了。 小时候,我看着东边的山,西边的岭,很想知道那边是什么。我曾经走路去过东边的昆山,只不过没有爬到山顶。我也曾一路向西,最多到了满堂峪村,那里是我大姑的家,也是我在成都教会认识的曾老弟兄祖上的家。我向往外面的世界,报考大学的时候,选择了我心目中几乎最远的地方,四川成都,那时候需要坐两三天的火车才能到达。近三十年了,走过了很多路,经历过很多事。但我仍然不像我太太,对她的故乡哈尔滨充满那么多的回忆和不舍,我对一个地方没有那么多的眷恋。我只是在意一些人,人是我心里面所有的纽带。哪里有我所牵挂的人,我就向往那里。哪怕他们住在火星上,我也会觉得火星是我的家乡。 姐姐说,母亲躺着的这些年,经常透过窗子向外眺望。可能是想出去走走,也可能想看看有谁来了。我觉得特别惭愧,不能够多陪伴她。也感叹她的灵魂被限制在日渐衰残的身体中,是多么地痛苦。如今母亲睡在一个我不知道的地方,但是我知道她的名字写在了生命册上,我知道将来有一天,我必然与她相见。 以此纪念我的母亲何乃香(1952.5.14-2025.2.8)。 --- # [ZH] 我的信主见证 - URL: https://ye-yu.com/blog/my-testimony-of-faith-in-christ - Date: 2025-02-02 - Category: 基督徒 - English Version: https://ye-yu.com/en/blog/my-testimony-of-faith-in-christ 我出生于山东的一个农村。在我的童年时代,直到上小学了,我们还没有通电。我印象深刻的是,夏天的夜里,人们都喜欢在麦场上乘凉。我在那里看了很多星空,也听了很多鬼故事,其中有著名的“鬼打墙”和各种聊斋的故事,导致我小时候也不敢一个人走夜路,很怕鬼。 ### 父亲去世的故事 在农村,有一种能够“通灵”的人,一般是中老年女性,我们叫“神婆子”。很多家人得病的,出了什么事情的,都要去找她们给解决一下。1987年3月,我父亲开拖拉机出事,去世了。他去世后的第三天,有个人是我的大娘,她同时也是一个神婆,她走到我的家,一下子瘫倒在地,跟我母亲说话。她说的语言口气很像我的父亲,也跟母亲说了很多只有父亲母亲才知道的事情。大家都说是我父亲的魂附身了,我很惊恐害怕。更有一次,我亲眼看见我的一大爷被鬼附了,他身体和手臂颤抖的速度远不是一个正常所能做出来的。也让我深感害怕。 所以我很小就认识到,在我肉眼所见的世界之外,有一个我不知道灵界的存在。这些事情藏在我心里,我总是试图去寻求一个答案。 ### 我的科学解释 当我上了大学,大学一年级有一门课,叫《现代科技》,其中讲到熵的概念。我试图用科学的概念来解释这种被鬼附的问题。我认为每个人的身体都有一种场,向外发射信号,就像一座电视塔。当电视塔突然被断电了,它发射出去的信号还在,这些信号如果被设备接收到,就会产生反应。被鬼附的情况也许就是这样,人死了,发射出去的信息被同频的人接收到,就形成了附身的效果。我对自己的答案感觉还不错,好像看起来能够自洽了。 ### 2004年的灵异事件 但我大学毕业几年后,我就有了一次见鬼的经历。2004年秋冬有一段时间,我每天晚上躺在床上,一闭上眼睛,就能感觉到在我床脚那里,有一团黑影。我睁开眼睛,便什么也看不到。那种感觉很真实,也让我非常恐惧,我整夜睡不着觉。 我担心会不会是我的精神出问题了。于是打听了一下,听说川大哲学系有一位刚刚从法国回来,师从一位精神分析大师的老师,在川大开了一个工作室。我联系到他就去了。 这位老师的工作室开在川大的校区的老师宿舍中,里面有一张躺上去可以随意调整位置的躺椅。这个流程其实就是没有流程,全程就是让我自己讲,想说啥说啥,说完也不给我任何反馈,就让我下次再来说,说一次五十块钱。我去到第三次的时候,我是按时去的,那老师打开门,说我的时间过了。还让我再交五十块钱。我交了之后,心里觉得憋屈,就再也不去了。 我上大学的时候,宿舍和哲学系是一层楼,所以跟很多哲学系的人很熟悉。那时候很多朋友都考了研究生,我就去找他们。有一个是佛教徒,他说我这个情况啊,念《金刚经》能镇住。我就真背诵啊, > 如是我闻,一时,佛在舍卫国……,与大比丘众千二百五十人俱。 但是背是背了,情况并没有改善。 ### 查经 有一次,哲学系研究生中有一位姓王的同学,是研究基督教的。以前也有个韩国学生跟我传过福音,我没啥感觉。我和这位王同学一起吃饭,就问他,你们基督教的神能管着中国的鬼不?这位同学没有正面回答我的问题,告诉了我很多基督徒赶鬼的见证,并且告诉我,他们在川大的一个办公室有查经班,每周都有,邀请我去。我就去了,开始查经,通过查经,我才知道真的有一位上帝,也只有一位上帝。那时候,正好赶上基甸在《新语丝》上与方舟子辩论,我除了每周去查经之外,每天都看他们的辩论。也从科学的角度看进化论的不可靠和上帝存在的证据,也瓦解了我心目中所谓的“科学观”。其中有个例子我到现在还记忆犹新: 我们说照相机是根据人的眼睛的成像原理制造的。然而我们认为一个照相机必须得有人设计和创造,但人的眼睛比照相机更加精妙,却不用创造,自然界自己就能形成。这很不科学。 不多久,我晚上就看不见那团东西了,我的见鬼问题好了。 ### 戒烟 我从高中毕业开始抽烟,抽得很厉害,大概两天三包烟的量吧。我以前谈恋爱的时候,女朋友也希望我戒烟,我自己也想戒。但立誓戒过八九次,每次都相当地艰难,最多的时候戒过一个月。有一次查经完了,我到楼下就点了一支烟。有一位弟兄从后面看见我抽烟,就说,“叶弟兄,身体是圣灵的殿,你怎么能在殿里烧火呢?”我心里很惭愧,想在受洗前能够戒烟,就请大家为我祷告。 有一天,我在办公室里,看一个叫做基督徒生活网的网站(这个网站应该现在还有,[cclw.net](http://cclw.net))。里面讲到有一个基督徒信主之后,想戒酒的故事。他就把他所有收藏的酒全部倒掉打烂了。这时候,我好像听到有一种声音,又好像不是声音,而是一种意识,一个呼声或者是命令,说,“把你桌子上的烟丢掉垃圾桶里去”。我就照做了。 这是非常奇妙的体验,从那天那一刻开始的很长一段时间,我闻到烟味就觉得很难受,也一点都不想抽。现在过了20年了,我偶尔为了陪别人,会抽几支烟,再也没有烟瘾了。上次陈阿姨在群里说看到有人抽烟的情况,我相信那是出于爱的劝告。但我一般不劝人戒烟,因为我知道这个真的很难,而且我这是我蒙上帝的恩典,祂用神迹开挂的方式帮助我戒的烟,我不好意思去要求别人戒。求主帮助被烟瘾捆绑的弟兄们,愿主亲自帮助。 ### 受洗 ![](/images/posts/2025/02/P3270018-1024x768.jpg) 2005-03-27 2005年3月27日,是复活节。我在三道堰的府河上游的河里受洗,成为正式的基督徒。到今年三月,就整整二十年了。近二十年中,我经历过很多的事情,有些事情需要理性去理解,有些事情,理性无法解释,需要顺服;也有些事情,会让我怀疑上帝。但借着信主的经历和主赐的奇妙神迹,这些恩典给我确信,让我在信与不信之间不再摇摆。 我的见证不太理性,看起来也很不“秋雨”。但上帝拣选人的方式奇妙,给每个人的路径都不同。给我的路径大概是——在科学和迷信之间,怕鬼引导我成为耶稣的门徒。感谢上帝的拣选,荣耀归给祂,直到永远。 --- # [ZH] 我的儿子叶嘉乐 - URL: https://ye-yu.com/blog/my-son-ye-jiale - Date: 2023-03-31 - Category: 父亲 - English Version: https://ye-yu.com/en/blog/my-son-ye-jiale ​3月15日,是我儿子叶嘉乐的生日。如果他尚在人世,已经七周岁了。 ### 怀胎 2015年7月我太太被检查出怀孕。2016年初的某天上午,我正在上班的时候,接到了太太打来的电话,说医院在胎儿的检查中,发现有心脏主动脉瓣狭窄的问题,当时已经差不多怀胎7个月了。我们后来也去了北京的安贞医院,确诊了这个问题。 ![](/images/posts/2023/03/IMG_2905-1024x768.jpg) 当时我太太还有些犹豫,这个孩子到底要不要。我鼓励她,说孩子的主权在于上帝而不是我们。上帝给的,上帝会负责。如果我们不要他,这罪要归于我们。所以我们两个人彼此鼓励和搀扶,迎接孩子出生。我给他取名叫叶嘉乐,意思是愿他因为喜乐被上帝嘉奖。 ### 出生 ![](/images/posts/2023/03/mmexport1458027999101-edited.jpg) 他刚刚出生后两个小时,我们生产的医院没有ICU,就要强行转院,我们咨询了一些儿科专家,觉得在新生儿这个阶段,主动脉瓣狭窄也无法干预治疗,但医院怕承担责任,不同意继续留下本院。在教会李相学牧师和李晓东老师的陪伴下,我抱着叶嘉乐离开了医院。快跑了半个北京城,我们最终决定,带他回家。这是无奈的决定,也是对孩子最好的决定,因为孩子在刚出生的时候,做无意义的治疗,而和父母隔绝,有些残忍。 ### 治疗 中间他经过了一段较长的黄疸。后来去了北大医院住院,医生下了病危通知书。有一天,办住院的时候,我推他无意间到了一个天主教堂,与他合影,还进去祷告了。过了一段时间,他奇迹般地好转了。我们很高兴医生的判断是错的。 ![](/images/posts/2023/03/黄与病.jpg) ### 欢乐 百日的时候,我们策划了一次拍照DIY。 ![](/images/posts/2023/03/百天.jpg) 夏天,我们全家回了姥爷姥姥家,一起游了松花江,去过索菲亚教堂。 ![](/images/posts/2023/03/去哈尔滨.jpg) 秋天,和教会的弟兄姊妹一起去烧烤秋游。 ![](/images/posts/2023/03/顺义秋游.jpg) 叶嘉乐和我经常有很多互动。 ![](/images/posts/2023/03/互动.jpg) 我现在才知道他有一点“斗鸡眼”,可是有什么呢?他看我的眼睛使我的心融化。 转眼到了春天,3月15日过生日那天,我们带他去买了小汽车,游玩了朝阳公园,一起吃了生日餐。 ![](/images/posts/2023/03/生日.jpg) ### 生病 终于,一周岁生日过后不久,因为一次小的感冒,他呼吸困难,住进了儿童医院。病情恶化的程度远远超出我们的想像。我们曾经幻想几岁给他动手术,但这一次,医生很快给了病危通知。 ![](/images/posts/2023/03/IMG_0578-1024x768.jpg) 3月29日,医生说必须让他进儿童ICU病房,我们看到他离开我们时撕心裂肺的哭叫,心都碎了。但这还不是最绝望的时候。 ### 绝望 过了不到半小时,ICU的医生打电话给我们约谈。医生说,现在所有的治疗都没有意义了,希望我们把他带回家。甚至说,给我们备几袋氧气在路上使用。如果在路上停止呼吸,可以找附近的医院开证明。我们很感恩医生做出这样的决定,我不想让他孤单地在医院走完人生的道路。 这是我走过的最漫长的路。我前面开着车,太太在后面抱着他。我们哭着喊他的名字,让他保持一点清醒。同时打电话通知所有的亲人和教会的弟兄姊妹,来和他道别。 那天晚上,亲人都到齐了。我们请牧师为他施了洗礼。离别的时刻终于到了。 ### 离别 2017年3月30日,乐乐在家中停止了呼吸,息了他的劳苦。那一天,上帝给了我三个印记,给我们安慰和盼望。 第一,在乐乐弥留之际,我想起有两次他晚上经常不睡而哭闹,我因为劳累对他态度不好,打了他的屁股。我跟他说,爸爸态度不好,打了你,对不起,请你原谅爸爸。他当时的呼吸急促而沉重,但却发出一声响亮的“嗯”。我的孩子叶嘉乐真的饶恕了我。 第二,他停止呼吸之后,过了一会儿,我去房间里看他,他的脸角上扬,带着笑容。 第三,那一天,上帝借着微读圣经向我们说话,成为我们莫大的安慰: > 我实在告诉你们,你们若不回转,变成小孩子的样式,断不得进天国。所以,凡自己谦卑像这小孩子的,他在天国里就是最大的。”(马太福音 18:3-4) ![](/images/posts/2023/03/IMG_0580-576x1024.png) ### 送别 2017年4月1日,我们在北京的教会会堂,为叶嘉乐做了追思礼拜。很多人一起为他送行。 ![](/images/posts/2023/03/送别-1024x576.jpg) ![](/images/posts/2023/03/追思1-1024x576.jpg) 有人问我们,后悔生下他吗?没有,没有后悔。我们特别感恩叶嘉乐带给我们这一年零15天的喜乐。生命的长短,一天,一年,或者一百年,在永恒面前,都是一瞬间。圣经说,“其实明天如何,你们还不知道。你们的生命是什么呢?你们原来是一片云雾,出现少时就不见了。” 世界终将会遗忘叶嘉乐这个名字,但是他的名字被记在生命册上了。为人父母,一生的努力,不就是把孩子带到上帝的面前,使他有永生的生命吗? 在2016年的圣诞节,我们给他写了一张贺卡,我们盼望他为荣耀主的名好好活着。 ![](/images/posts/2023/03/IMG_2904-1024x768.jpg) 如今他不在世上,但是,愿上帝的荣耀在他身上。 ### 来成都 我们想他吗?想,真想,每天都想。难过吗?当然难过,有时候我们看着他的照片和视频就流泪。喜乐吗?喜乐,想到他安稳在祂的手中,知道他是好得无比。 我们从北京来到成都之后,叶嘉乐的经历也帮助了很多失去孩子的家庭,比如失去子秘的杨彪晓岚家,和失去李卓谦弟兄的忠哥海玲姐家。 ![](/images/posts/2023/03/IMG_5122-1024x683.jpg) 在李卓谦弟兄的追思礼拜上,我写下这样的祷词: > ……我的儿子叶嘉乐是我的帮助者。从前我的肉身沉重,我贪恋地上的事,不爱慕上帝的国。我儿子离开以后,每当我想起他,我就觉得自己应该多多服侍你,我盼望通过我的服侍使你的国速速到来。  > > 对于世界来说,人一生最大的成功就是活几十年最多百年。但对于一个在基督里的人,他一生最大的成功就是能去天国并且带人去天国。如今,这两个在耶稣里的孩子做到了。……靠着耶稣,终有一天,我们将与李卓谦弟兄一同在天国里相见,我盼望着在那边,我们还要一同唱诗赞美做工服侍。愿荣耀归于天父,直到永永远远。奉主耶稣的名祷告。 ### 后记 2023年3月30日,在叶嘉乐离世整整六年后,上帝的恩典使我们在这一天生下弟弟,我们给他起名叫叶嘉信——盼望他能因为信心得到上帝的嘉奖。上帝为了不让我们以为2023年3月30日仅仅是一个巧合,又将弟弟的体重设计为3330克,将弟弟的出生时间设为9点整。 ![](/images/posts/2024/01/certificateofbirth-1024x308.jpg) 但你就是你,没有人可以代替你。我们不会忘记你的名字——叶嘉乐。 ![](/images/posts/2024/01/pyq-20230330-1024x380.jpg) --- # [ZH] 我的电视媒体变迁史 - URL: https://ye-yu.com/blog/my-personal-history-with-television-media - Date: 2022-10-04 - Category: 技师 - English Version: https://ye-yu.com/en/blog/my-personal-history-with-television-media 来到成都之后,才发现好多弟兄姊妹的家庭,为了孩子的教育,家里没有安装电视,这给了我很大的震撼。我则不然,自从上小学后,看过《西游记》《聪明的一休》等电视片之后,就喜欢看电视。 ### 黑白电视 我记得,村里总共有两台还是三台电视,看《西游记》的时候,一个院子里站满了几十上百人。其实没有扩音设备,声音听不太清楚,14寸的小屏幕,隔着十几米,也没法看细节,喜欢的就是氛围,心里渴望的,是更大的世界。 ![](/images/posts/2022/10/lihuanying_tv-1024x466.jpg) 电影《你好李焕英》中的看电视的场景 ### 彩电 上世纪八十年代末,继父带来一台四川长虹厂生产的14寸彩色电视机,终于结束了去别人家看电视的历史。这种电视是地面电视,用无线传输,需要室内天线或室外天线。这个电视有8个换台的按钮,按钮右侧是能打开的,里面还可以对信号和色彩进行细调。我上初中就住校了,每周回来一两次,走的时候有点舍不得电视,经常看过下午山东台的“广告文艺”之后再返校。 ![](/images/posts/2022/10/changhong14.jpg) ### 卫星电视 上高中没看过电视,大学也尽看录像和电影了。2005年我去北京工作,开始迷上卫星电视。当时我住在北三环蓟门桥边上的明光北里小区,有个朝南的阳台,对面楼下就是中国政法大学的本部。在一个不满两平米的阳台上,我开始自己的烧星历史。 ![](/images/posts/2022/10/CIMG5074-768x1024.jpg) 用电风扇架撑起来的天线,最高点为高频头 卫星接收机是dm500s,前面还用过一台机器是什么型号我忘记了。卫星电视很多不是免费的,需要收视卡。收视卡是很贵的,一个卫星上的收视卡大概要一两千块钱吧。在我盗版国,他们想出了一个方案。就是只买一张正版卡,放在一个服务器里,然后所有的接收机上联网,去读取那个正版卡上的账号信息。 ![](/images/posts/2022/10/截屏2022-10-04-14.48.48.jpg) 用这个小小的dish天线,大概可以收几颗星。但我主要是接收138度上的亚太5C卫星上的节目。在这颗卫星上,集合了BBC/CNN/HBO/中天/东森/凤凰卫视/国家地理,还有CCTV的几个频道。经常收看的是台湾的一个福音电视台——好消息GOODTV。 有一个基督徒的访谈节目《真情部落格》是我经常看的,是让一些基督徒来讲他们的见证。有一期采访一个叫江锡铭的节目,叫《沙漠开江河》。他现场演奏了一诗自己创作的诗歌(视频45分11秒开始),我到现在都记得: > 不再随波逐流 > > 从此跟主而走 不再随波逐流 我今回头 求主爱我 不再随波逐流 > 从前迷途 不知回头 耶稣为我代求 从此从此 浪子回头 耶稣仍然爱我 李晶玉主持的《真情部落格》 这个电视台还放很多证道的节目,比如说“约尔欧斯汀”([](https://www.joelosteen.com/)[https://www.joelosteen.com/](https://www.joelosteen.com/))的证道,后来才体会到这才是标准的成功神学的证道。 那为什么不用youtube?Youtube2005年才成立,节目源也没多少啊。 ### 机顶盒 2012年,开始流行一个叫“麦格TV”的IPTV盒子。我从1代用到了3代。它大概的原理是:在香港、台湾或大陆某地对一些卫星电视或有线电视的信号源进行采集,然后通过视频流的方式转播。大概能收一两百个电视台,包括欧美、港台和中国大陆的各大卫视。所以,这个盒子当时不仅在中国大陆,包括全世界的华人电视爱好者都在使用。 ![](/images/posts/2022/10/IMG_0649-1024x683.jpg) 调试机器中,白色的盒子为麦格第一代 ![](/images/posts/2022/10/microMsg.1411716082127-1024x576.jpg) 节目源很多,右下为第二代 2014年下半年,第三代产品H3D型号推出后,不到一年时间,香港和大陆两地开始对这种盗版方式进行打击。服务器被关闭。 ![](/images/posts/2022/10/20130802_214647-1024x768.jpg) 有时候不是很稳定 2020年底,有一天我突然接到了原来加的一个麦格代理的QQ消息,问我还记不记得他。那几天他刚刚出狱,5年与世隔绝,他怕世界已经把他忘记了。 ![](/images/posts/2022/10/WechatIMG10-1-770x1024.jpeg) ### 网络电视 2014年android tv才开始发行,可以说这是一套操作系统,我买了几个基于androidtv的小米盒子,印象最深的是小米盒子3增强版。它可以用root的方式安装谷歌框架,从而安装youtube观看。但后来由于小米公司对用户安装的软件进行审查并且偷偷删除,弃用了。 Mibox s 国际版是小米公司推出的一款针对国外市场的电视盒子,除了传统收看youtube之外,有netflix的认证,可以收看netflix。记得第一次把netflix安装好之后,兴奋了好一阵子。 ![](/images/posts/2022/10/IMG_6883-1024x644.jpg) 2019年,第一次使用netflix 今年,在给一个朋友推荐电视盒子的时候,发现mibox s 已经不太流行了。谷歌在电视棒chromecast上内置了google tv,推出了chromecast with google tv。售价39.99美元,国内的价格,不足400人民币。 ![](/images/posts/2022/10/chromecastwithgoogletv-1024x744.webp) Chromecast除了外表漂亮以外,界面也非常美观。如果你能有一个美国的ip地址,可以看到这个有很多选项的界面。如果是非美国的ip,则是一个非常简洁的界面。 ![](/images/posts/2022/10/IMG_2374-1024x576.jpg) 使用美国ip的界面 并且,美国的用户,会内置pluto tv里的电视台。大概有上百个电视台可以播放。 ![](/images/posts/2022/10/IMG_2375-1024x576.jpg) pluto tv提供的免费直播电视台 作为漫威和国家地理的粉丝,我订阅了disney+,有五个部分的电视节目可以收看:disney迪斯尼/pixar皮克斯/Marvel漫威/Star Wars星战/国家地理(根据ip可能会有变化)。Disney+是值得订阅的,虽然它对ip的要求是非常严苛的。 ![](/images/posts/2022/10/IMG_2378-1024x608.jpg) disney+ 的界面 ### 结语 1. 电视媒体的重要作用是传递信息,获取信息是人的基本权利。 2. 我不认为谁坐在高位上都一样。如果毛再活四十年,我应该看不到除了中国以外的电视节目,跟在朝鲜的状态差不多。 3. 改革开放给了我机会,让我更多知道这个世界。 --- # [ZH] 中文证道文档整理格式规范(初稿) - URL: https://ye-yu.com/blog/format-specification-for-chinese-sermon-documents-first-draft - Date: 2022-09-08 - Category: 基督徒 - English Version: https://ye-yu.com/en/blog/format-specification-for-chinese-sermon-documents-first-draft 前些年,我曾经做过几篇证道的整理。过程中我发现,在网络上没有一篇完整的中文证道录音整理方面的规范文本,我自己尝试做了一些规范,与各位弟兄姊妹一起探讨。 ## 标题与文章结构 本部分规范以使用markdwon为例说明,word文档同理。 ### 层级 标题分为四级 \- 一级标题:文章的标题 - 三级标题:文章主要部分的大标题 - 四级标题:三级标题下面一级的小标题 - 五级标题:四级标题下面某一方面的小标题 以下是示例 \# 渴望完美的带领与顺服 ### 引言 ### 超然带领与顺服 ### 通常带领与顺服 #### 1、上帝子民的合一与前行(10.1-7) ##### 1)子民的合一 ##### 2)子民的前行 #### 2、上帝子民的争战与敬拜 (10:8-10) ### 结论 上面示例的渲染结果如下: * * * # 渴望完美的带领与顺服 ### 引言 ### 超然带领与顺服 ### 通常带领与顺服 #### 1、上帝子民的合一与前行(10.1-7) ##### 1)子民的合一 ##### 2)子民的前行 #### 2、上帝子民的争战与敬拜 (10:8-10) ### 结论 * * * #### 为什么不推荐使用二级标题开始? * 在各个编辑器默认的字号渲染中,一级标题字号最大,以下逐级标题字号依次变小。二号标题使用在正文中,如果文章很长,如较长的论文或者书籍是比较合适的。 * 但在证道文章中,字数一般不超过两万字。文章的主体结构一般也不超过三级,这样正文以二级标题开始,字号过大。故推荐自三号标题开始。 ### 原则 1. 在正文中使用标题要避免孤立,即同级标题不能只有一个。 示例:在下面的文章结构中,`二级标题 A`只包含一个`三级标题`,完全可以省略`三级标题 A`。 \## 二级标题 A ### 三级标题 A ## 二级标题 B 2. 下级标题不重复上一级标题的名字 示例:下面的文章结构,二级标题与下属的三级标题同名,建议避免。 \## 概述 ### 概述 3. 尽量避免下面的情形 下级标题不必重复上级标题 \## 概述 ### 概述-第一点 ### 概述-第二点 ## 标点符号 ### 原则 (1)中文语句的标点符号,均应该采取全角符号,这样可以与全角文字保持视觉的一致。 (2)如果整句为英文,则该句使用英文/半角标点。 (3)句号、问号、叹号、逗号、顿号、分号和冒号不得出现在一行之首。除非特意在句首前面放置标点符号,否则在现代浏览器和编辑的渲染中已经自动规避了这个问题。 ### 句号 (1)中文语句的结尾处应该用全角句号(`。`)。 (2)句子末尾用括号加注时,句号应在括号之外。 错误:再到1949年,中国约有80万名新教信徒,人数远远少于大约300万的天主教徒(当时中国人口是5.4亿人。) 正确:再到1949年,中国约有80万名新教信徒,人数远远少于大约300万的天主教徒(当时中国人口是5.4亿人)。 ### 逗号 (1)逗号(`,`)表示句子内部的一般性停顿。 (2)注意避免“一逗到底”,即整个段落除了结尾,全部停顿都使用逗号。 ### 顿号 (1)中文句子内部的并列词,应该用全角顿号(`、`) 分隔,而不用逗号,即使并列词是英语也是如此。 错误:所以约瑟站在他们的面前,拥有赦免拯救他们,或者是来审判报复他们的权柄,能力和地位。 正确:所以约瑟站在他们的面前,拥有赦免拯救他们,或者是来审判报复他们的权柄、能力和地位。 (2)英文句子中,并列词语之间使用半角逗号(`,`)分隔。 (3)中文句子内部的并列词,最后一个尽量使用(`和`)来连接,使句子读起来更加连贯,下面两个句子都可以,第二个更优。 不推荐:所以约瑟站在他们的面前,拥有赦免拯救他们,或者是来审判报复他们的权柄、能力、地位。 推荐:所以约瑟站在他们的面前,拥有赦免拯救他们,或者是来审判报复他们的权柄、能力和地位。 ### 分号 (1)分号(`;`)表示复句内部并列分句之间的停顿。 ### 引号 (1)引用时,应该使用全角双引号(`“ ”`),注意前后双引号不同。 例句:你不要小看这个“一”,自从亚当以来,亚当的家庭合一首先就被破坏了,然后到了后面,人越来越分散。。 (2)引号里面还要用引号时,外面一层用双引号,里面一层用单引号(`‘ ’`),注意前后单引号不同。 (3)引用之语未独立,标点符号引号外。 引用之语能独立,标点符号引号里。 ### 括号 (1)补充说明时,使用全角圆括号(`()`),括号前后不加空格。 例句:### 超然带领与顺服(9:15-23)。 ### 冒号 (1)全角冒号(`:`)常用在需要解释的词语后边,引出解释和说明。 例句:请确认以下几项内容:时间、地点、活动名称和来宾数量。 (2)表示时间时,应使用半角冒号(`:`)。 例句:早上 8:00 (3)表示圣经经文的章节间隔,应使用半角冒号(`:`)。 正确:创世记1:1、彼得前书2:1 错误:创世记1:1、彼得前书2:1 ### 省略号 (1)在证道中,省略号无法读出,一般讲道人会使用“等等”等词语来表示。 (2)省略号(`……`)表示语句未完、或者语气的不连续、经文或文章引用时中间略去的部分。 (3)省略号占两个汉字空间、包含六个省略点,不要使用`。。。`或`...`等非标准形式。 例句:“看哪,弟兄和睦同居,是何等的善,何等的美……因为在那里有耶和华所命定的福,就是永远的生命”。 ### 感叹号 (1)整体证道文章的整理,应该尽量避免使用感叹号(`!`)。 (2)绝对不允许多个感叹号连用,比如`!!`和`!!!`。 (3)祷告部分中的“阿们”,后面一般加“!”,也可以加“。” ### 破折号 (1)破折号`————`一般用于进一步解释。 (2)破折号应占两个汉字的位置。如果破折号本身只占一个汉字的位置,那么前后应该留出一个半角空格。 例句:这段时间有五十个左右的同工————教会的不同的同工,学堂的不同的老师————他们每个星期六上午有三四个小时参加同工的系统培训 ### 连接号 (1)连接号用于连接两个类似的词。 (2)以下场合应该使用直线连接号(`-`),占一个半角字符的位置。 * 圣经经文的表示章节的范围 * 表示年份的范围。 例:创世记2章1-2节、创2:1-2。 例:2005-2008年 (3)数值范围(例如数字)应该使用波浪连接号(`~`),占一个全角字符的位置。 例句:约有2000人~3000人决志信主。 注意,波浪连接号前后两个值都应该加上单位。 (4)连接号也可以用汉字“至”代替。 例句:2005年至2008年 –to be continued --- # [ZH] 教会如何组织一场婚礼 - URL: https://ye-yu.com/blog/how-a-church-organize-a-wedding - Date: 2021-08-22 - Category: 基督徒 - English Version: https://ye-yu.com/en/blog/how-a-church-organize-a-wedding ### 结婚是一场礼拜 一对新人是一场婚礼的主角,这么讲听起来没什么错。但是对一个基督徒来讲,人生的首要目的是荣耀上帝,那更何况是你们的婚礼呢?本质上讲,婚礼是借着一对新人的结合对上帝的敬拜。所以我们称之为“结婚礼拜”,简称“婚礼”。 ### 婚前辅导 世俗世界认为婚姻是不必学习的,或者至少是可以自学成才的。但大部分基督徒和所在的教会认为,婚姻需要以圣经为基础的教导。以我所在的教会为例,一般需要经过八次课程,历时3-6个月的婚前辅导并顺利完成后才可以举行婚礼 ### 场地 会堂是婚礼的首选场地。但对于一个没有会堂或是失去会堂的教会中的新人来说,一场婚礼最首先需要确定的,就是场地。确定场地需要考虑如下因素: * 观礼人数。预估双方亲属、朋友和教会会友前来观礼的数量,从而决定座席足够。 * 预算。在有会堂的情况下,场地的费用是不需要考虑的。但无会堂的情况,场地需要由新人来支付,需要由双方根据实际情况共同商定。 * 场地风格。每个人所喜好的婚礼风格均不同,在预算适当的情况下,双方可以选择适合自己的风格,比如室内、户外;中心区或郊区的不同的场地风格。 * 布置风格。 下面是一些可供参考的场地: * 不同星级的酒店宴会厅 * 公园户外 * 小型博物馆 * 演出场地 * 大型商场中的展厅 * 专业展陈场馆 ### 时间 在中国各地世俗的婚礼和婚宴中,婚礼时间的选择上,有不同的习俗和时段。我们的教会一般在下午举行婚礼,一般建议在14:00至15:00的时间段内开始,在16:30前结束。具体时间可以由双方根据实际情况拟定。在下午举行婚礼有如下一些好处: 1. 不必起床太早,包括新人、服事参与者和观礼的人; 2. 教会的婚礼不设宴席;在上午举行时,可能的延迟会耽误大家用餐; 3. 场地的布置需要大量鲜花,如果在上午举行,则需要前一天晚上全部布置好,鲜花可能会不新鲜。 ### 人员 在确实好场地和时间后,需要新人确定的邀请人选,包括: ![](/images/posts/2022/03/image-1024x401.png) ### 婚礼流程 ![](/images/posts/2022/03/image-1-706x1024.png) [查看Notion文字版](https://sunrise-sidecar-39b.notion.site/21ecad0abc9243bda595873cdb9d296a?v=1ba9c090d5fa4a54bd3e84b3a9bd0000) ### FAQ #### 什么时间准备婚礼合适? 如果你们已经开始婚辅,就可以着手准备一些准备工作了。 #### 有哪些费用是由新人出的? 在没有会堂的情况下,所有涉及婚礼的花费都需要由新人来支付,包括但不限于:场地费用、布置费用、所需物料、茶点等;如果教会仍有可用的会堂,则没有场地费用。 教会的服侍只限于人力,如果有费用垫付,则需要由新人同意。 #### 为什么会友不送礼,新人不请客? 婚礼的首要目的是见证上帝的荣耀。会友参加婚礼,是对新人的祝福和对上帝的敬拜。新人获得大家的祝福是最重要的美事。 现实角度看,在一个较大的教会,如果一年有多场婚礼,送礼会给会友造成经济负担,参加婚礼也就失去了祝福的意义。 如果既是会友,又是新人的好友,送礼则是一个私交的范畴,应在婚礼前(后)进行。但如果新人在教会中担任一些职份,则必须要遵守所在教会中的相关收受赠礼的规定。 #### 如果有朋友在婚礼时送礼品和礼金怎么办? 婚礼在很多未信主的亲戚和朋友参加时,可能会涉及送礼的情况,新人应指定1-2名亲友来记录和保管收到的礼金和礼品。 --- # [ZH] 辛丑年忆牧长文 - URL: https://ye-yu.com/blog/remembering-pastor-and-elder - Date: 2021-06-01 - Category: 基督徒 - English Version: https://ye-yu.com/en/blog/remembering-pastor-and-elder 江信楼外,锦水澹澹,戊戌年冬别后,近三载矣。 丁酉年秋,舍下自帝都迁蜀,为生计往返帝都锦城之间,几失入学。翌年六月,终转至圣约堂。服事日久,于诸弟兄姊妹相见如故。然牧者长老,我则趋避之。盖恐其若得主恩赐,识破我心之罪恶虚伪,岂不祸哉? 九月,方知新堂既成。至六楼,堂中皆狼藉。长老覃兄掌堂会诸事,穿梭其中。上前请缨,曰:“装电视”。长老身形精致,面若冠玉,唇红齿白,碌碌中亦不忘露齿一笑,与之并肩共事至丑时而归。是为相识。 牧者面圆,善诗文,其笑可掬。证道如高山流水,时而涓涓,时而汩汩。初识声名于网络,入蜀方得见肉身。听道一年有余,每每坐前排,乃恐后排嘈杂困顿,扰我心魂。会后常与之相视而笑,执手问安。至戊戌教案始发,对谈竟无一句。唯顾其影,闻其所传恩主十架以纪念之。呜呼,尝叹之于道中诸弟兄,示爱宜趁早。 噫!古人云:“命之所存,天实为之”,如保罗之于罗马,约翰之于拔摩,焉可从已意?四载试我兄长,九年炼我牧人,主所志必成,我何奈之?夜中思我懦于斗米,苟且偷生,真小人也。胸憶难平,何所盼耳!然经上云: “我望伊何?实惟主兮。援我於罪、勿使恶人侮予兮。” 上主怜其子民,虽四散流离,然于基督中,合成一身,互相为体。非以高墙为隔,不以山海为远。举手向天,此唱彼和,曰:“圣哉圣哉,荣光耀奕,顾其饮食,观其卧立,护其父母,庇其妻子。思之涕泪,求神拭之,耶和华兮,俯听我祈。” 是以为记。窄门下晚生叶某人,六月。 * * * #### 译文: 江信大厦旁边,锦江上微波荡漾。2018年冬天一别后,快三年了。 2017年秋天,我从北京迁到成都生活,工作则需要往返北京和成都,耽误了几次转会学习。直到第二年6月,才转会到秋雨圣约教会。服事的时间长了,跟弟兄姊妹都很熟悉,像认识了很多年一样。可是对于牧师和长老,我一般都躲着走。我害怕他们万一有什么恩赐,能看透我这个罪人的心思,岂不是很麻烦? 到了9月,我们才知道新堂已经准备好了。我去六楼,看到新堂里一片狼藉。覃长老是管理会堂的,在里面穿梭忙碌。我去请他派点事干,他说:“你装电视吧”。覃长老个子不高,身材不错,皮肤白皙,容貌佳美,忙碌中脸上也总是带着笑容。那天我跟他一起工作到后半夜,算是我们第一次认识。 牧师脸圆圆的,诗和文章写得好,又平易近人很喜乐。他的证道像山川的流水,时而涓涓细流,有时又激扬澎湃。我最初从网络上知道他,到了成都才见到他的样子。教会里听道一年多,每次都是坐前排,因为怕后面有吵嚷声,影响听道。聚会完常常与他相视一笑,握握手说声平安。一直到一二九教案,也没有跟他正正经经说过什么话。后只有看他的照片视频,听他所传讲耶稣基督救恩的讲道来纪念他了。哎!我常常跟弟兄们说,要是你爱谁,一定要早说出来啊。 唉。古人说:“你生命中所遇到的,实际上是上天的安排。”就如保罗被带到罗马城,约翰被关在拔摩岛,哪里能自己作主呢?把我兄长关四年,把我牧师关九年,为要试炼他们,主所做的事必成就,我能怎么办呢?睡不着的时候想起自己为了生计胆小怯懦,凑合这么活着,真是个小人啊。一时感慨万千,有什么盼望呢?但圣经上说:“主啊,如今我等什么呢?我的指望在乎你!求你救我脱离一切的过犯,不要使我受愚顽人的羞辱。” 上帝怜悯祂的子民,虽然我们被分散到各地,但是耶稣基督里,成为一体。在主里的联络,高墙不能阻挡,山海不能隔断。愿主里的弟兄姊妹常常举手祷告,说:“主耶和华圣哉!你的荣耀充满全地!求你看顾他们的饮食起居,保护他们的父母妻儿。我们想念他们所流的泪水,求你为我们擦干。主耶和华啊,求你侧耳听我的祷告。” 这就是我想说的。同在主里的弟兄叶某某写于2021年6月。 --- ## 英文文章列表 / English Articles # [EN] Mac Troubleshooting: Why 'Auto Proxy Discovery' Causes Tailscale Connection Timeouts - URL: https://ye-yu.com/en/blog/macos-auto-proxy-discovery-tailscale - Date: 2026-11-08 - Category: Coder - Chinese Version: https://ye-yu.com/blog/macos-auto-proxy-discovery-tailscale ## 1. The Incident and BLUF (Bottom Line Up Front) Today, while setting up the built-in Tailscale module in Shadowrocket on macOS, I encountered a baffling issue: **the exact same Tailscale credentials and node configurations connected instantly on an iPhone, but stayed stuck on "Disconnected" on a Mac**. Looking into Shadowrocket's VPN diagnostic logs, every attempt to start the built-in Tailscale module threw the exact same error after 5 seconds: ```text failed to fetch control server key: 请求超时。 control server key fetch failed ``` Bottom line up front: **The culprit was neither the proxy nodes nor the Tailscale servers, but the "Auto Proxy Discovery" (WPAD) toggle enabled by default in macOS Wi-Fi settings**. In home Wi-Fi or mobile hotspot environments, this setting forces macOS's underlying networking library (`NSURLSession`) to attempt to locate a non-existent PAC proxy script across the local network before initiating any handshake. This resolution step blocks for 5 seconds until it fails, dragging the Tailscale client's public key retrieval directly into a timeout. Running a single terminal command to turn it off immediately restored sub-second connections to Tailscale: ```sh networksetup -setproxyautodiscovery Wi-Fi off ``` --- ## 2. Core Insights: Why Initial Hypotheses Failed During initial troubleshooting, I followed conventional wisdom and explored two dead ends: 1. **Suspecting an expired Tailscale Auth Key**: Checking the key status in the Tailscale admin console showed that while old keys must remain valid, the client hadn't even retrieved the server's public key yet—it had not reached server-side authentication at all. 2. **Suspecting DNS virtual IP poisoning**: Shadowrocket typically resolves domain names to the reserved `198.18.x.x` range to intercept and route traffic. I added `always-real-ip` for `controlplane.tailscale.com` in the configuration, and DNS indeed returned the public IP, but startup still consistently timed out after 5 seconds. 3. **Deceptive CLI curl success**: Running `curl https://controlplane.tailscale.com/key` directly in the terminal responded almost instantaneously, and standard web browsers also loaded it without any hitch. Why did curl succeed while the embedded Tailscale in Shadowrocket timed out? The crucial difference lies in the execution context: standard `curl` runs in a conventional user-space process network stack, whereas Shadowrocket on macOS runs as a `MacPacketTunnel` (Network Extension) system extension. Inside this extension, initializing Tailscale leverages the system's `NSURLSession`. Inspecting detailed records from the macOS unified log finally caught the culprit: ```text MacPacketTunnel: proxy:start_resolve MacPacketTunnel: unresolved proxies, waiting for resolution MacPacketTunnel: nw_proxy_resolver_create_parsed_array [C11.1.1 proxy pac] Evaluation error: NSURLErrorDomain: -1003 ``` Before the request could even touch a low-level TCP handshake, it was intercepted by macOS to perform WPAD auto proxy discovery. In typical consumer broadband environments, no WPAD server exists on the local network. The system simply hangs for 5 seconds waiting for a response before giving up with a `-1003` error. Tailscale's public key retrieval timeout budget happens to be exactly 5 seconds, causing it to fail every time. --- ## 3. Step-by-Step Reproduction and Fix If you encounter this mysterious 5-second timeout, follow these deterministic steps to inspect and resolve it. ### Step 1: Check Wi-Fi Auto Proxy Discovery Status Open Terminal and run: ```sh networksetup -getproxyautodiscovery Wi-Fi ``` If the output is: ```text Auto Proxy Discovery: On ``` auto proxy discovery is enabled on that network interface. ### Step 2: Disable Auto Proxy Discovery via Terminal Without restarting your Mac, run: ```sh networksetup -setproxyautodiscovery Wi-Fi off ``` Verify the status again: ```sh networksetup -getproxyautodiscovery Wi-Fi # Expected output: Auto Proxy Discovery: Off ``` ### Step 3: Reload Module and Verify Return to Shadowrocket and toggle the Tailscale module off and on. In the diagnostic log, what previously hung for 5 seconds now succeeds instantaneously: ```text tailscale_client_new: initialised tailscale: connected to network ``` The status immediately changes to "Connected", and the handshake drops from a 5-second failure to passing in milliseconds. --- ## 4. Troubleshooting Checklist and Pitfalls | Symptom / Misconception | Root Cause | Recommended Action | |---|---|---| | Terminal `curl` works, but in-app requests time out | `curl` does not necessarily trigger asynchronous system WPAD lookup, whereas `NSURLSession` in Extensions/Apps strictly adheres to system proxy discovery | Do not rely on `curl` alone; troubleshoot Network Extensions using the macOS unified log | | Suspecting local proxy app blocking traffic | WPAD requests a PAC script from the LAN and does not conflict with local HTTP/SOCKS proxies | Disabling WPAD only halts LAN multicast/probes; existing routing rules remain untouched | | Confusing `invalid key` errors mixed with timeouts | Overlapping issues with expired Auth Keys and WPAD timeouts | Resolve the 5-second network-level timeout first, then verify an active Reusable Auth Key in Tailscale console | --- ## 5. Summary and Applicability Boundaries - **Best Fit**: Personal MacBooks, home networks, mobile hotspots, and developer environments running tools like Shadowrocket, Surge, or Clash. In these scenarios, the system default "Auto Proxy Discovery" provides no benefit and often acts as a silent killer blocking specific network components (particularly Network Extensions). Keeping it `Off` is strongly recommended. - **When Not to Disable**: Certain corporate intranets or university campuses where network administrators explicitly push proxy configurations via DHCP Option 252. Disabling WPAD there might prevent access to specific internal resources. Even in those environments, having the administrator provide a static PAC URL (Automatic Proxy Configuration) manually is generally preferred over open network discovery broadcasts. --- # [EN] Restore Missing "Ask Gemini" in Chrome: Local State Fix Guide and Underlying Mechanics - URL: https://ye-yu.com/en/blog/restore-chrome-ask-gemini-by-modifying-local-state - Date: 2026-11-05 - Category: Coder - Chinese Version: https://ye-yu.com/blog/restore-chrome-ask-gemini-by-modifying-local-state I frequently use the "Ask Gemini" AI assistant in Chrome's address bar to summarize web pages. However, after moving environments or reinstalling Chrome, this entry point frequently vanishes without warning. Toggling flags under `chrome://flags` or changing the browser UI language to English often fails to bring the icon back. The proven solution is straightforward: **Chrome gates feature access based on the country code persisted in your user profile's `Local State` file**. Changing the persisted regional code from `cn` to `us` restores access reliably. Yet in practice, 90% of developers find their manual edits either "fail to take effect" or get instantly reverted by Chrome upon launch. This guide covers the memory flush mechanics behind this behavior and a reliable step-by-step procedure. ## Underlying Mechanics: Why Switching UI to English Fails Internally, Google refers to this integrated side-panel assistant by the project codename `glic` (Gemini Live in Chrome). A common assumption is that changing UI language to `English (United States)` or routing traffic through a global proxy will unlock the feature. However, Chrome's regional gating does not rely solely on real-time IP at startup, nor does it reset with UI language: 1. **Google Variations Pinning**: Chrome runs an experiment and rollout service (Google Variations). When syncing over the network, it computes a regional country assignment and locks it into local storage. 2. **Local State Persistence**: This country code is saved under `variations_country` and `variations_permanent_consistency_country` in `Local State`. As long as these keys remain set to `cn`, Chrome treats the browser as located in a non-eligible region and hides `glic` completely. > Note: This article details Chrome profile configurations and Google Variations gating. Make sure you understand the memory flush timing before modifying configuration files. ## The Common Pitfall: Why Edits Get Instantly Overwritten Many tutorials instruct users to open `Local State`, find `cn`, replace it with `us`, and save. But upon restarting Chrome, the icon remains absent—and checking `Local State` shows `us` was rewritten back to `cn`. **The root cause is Chrome's in-memory state dump**: - If you edit the file while Chrome (or any background Chrome Helper process) is still running, closing the browser triggers a memory dump that writes active state back to disk, **instantly overwriting your changes**. - Consequently, **fully terminating all Chrome processes must happen before opening and editing the file**. ## Step-by-Step Guide ### Step 1: Completely Terminate Chrome Processes Do not merely close the browser window or minimize it; ensure all background helper processes have exited. **macOS Users**: Right-click Chrome in the Dock and select "Quit" (`Cmd + Q`), or terminate it cleanly via terminal: ```sh osascript -e 'quit app "Google Chrome"' # 检查是否还有残留进程 pgrep -f "Google Chrome" || echo "Chrome 已彻底退出" ``` **Windows Users**: Open Task Manager (`Ctrl + Shift + Esc`) or force-stop leftover processes in PowerShell: ```powershell Stop-Process -Name chrome -Force -ErrorAction SilentlyContinue ``` ### Step 2: Locate and Back Up the Config File `Local State` is a JSON-formatted global configuration file. Always create a backup before modifying it. - **macOS Path**: `~/Library/Application Support/Google/Chrome/Local State` - **Windows Path**: `%LOCALAPPDATA%\Google\Chrome\User Data\Local State` Create a backup in macOS terminal: ```sh LOCAL_STATE="$HOME/Library/Application Support/Google/Chrome/Local State" cp "$LOCAL_STATE" "${LOCAL_STATE}.bak" ``` ### Step 3: Update Regional Keys Open `Local State` in VS Code or any text editor, then locate and update these three keys: ```json { "variations_country": "us", "variations_permanent_consistency_country": "us", "is_glic_eligible": true } ``` - Change `"variations_country"` (previously `"cn"` or another regional code) to `"us"`. - Change `"variations_permanent_consistency_country"` to `"us"`. - If `"is_glic_eligible"` exists in your build, set it to `true` (if absent, do not add it manually; leave as is). If you prefer command-line automation, run this safe Python replacement after Chrome is fully closed: ```sh python3 -c ' import json, os path = os.path.expanduser("~/Library/Application Support/Google/Chrome/Local State") with open(path, "r", encoding="utf-8") as f: data = json.load(f) data["variations_country"] = "us" data["variations_permanent_consistency_country"] = "us" if "is_glic_eligible" in data: data["is_glic_eligible"] = True with open(path, "w", encoding="utf-8") as f: json.dump(data, f, ensure_ascii=False) print("Local State 更新成功") ' ``` ### Step 4: Verify Environment and Launch After saving changes and reopening Chrome, ensure these three prerequisites are met to prevent Google Variations from reverting: 1. **Flags Experiment**: Navigate to `chrome://flags/`, search for `glic` or `gemini`, set relevant entries to `Enabled`, and relaunch. 2. **UI Language**: Go to `chrome://settings/languages` and set your preferred language to `English (United States)`. 3. **Network Routing**: Ensure outbound traffic routes through a US egress node so startup handshakes do not immediately report ineligible locations back to Google. After relaunching, the familiar Gemini icon will reappear in your address bar and side panel. ## Scope and Boundaries - This tweak addresses client-side feature gating in the Chrome binary. If your Google Account itself is restricted due to workspace policies or compliance settings, you still need a personal account with Gemini eligibility enabled. - Future major Chrome updates may alter Variations key names or locations, requiring re-inspection of current `Local State` structures. --- # [EN] Goodbye "Use Mac Preview for Now": Antigravity 2.28.0 Brings Built-in PDF Viewer and Browser - URL: https://ye-yu.com/en/blog/antigravity-2-28-0-builtin-pdf-viewer-browser - Date: 2026-10-28 - Category: Coder - Chinese Version: https://ye-yu.com/blog/antigravity-2-28-0-builtin-pdf-viewer-browser On October 27, Google Antigravity rolled out **v2.28.0** for desktop. While the changelog enumerates 19 improvements and 15 bug fixes, two marquee additions genuinely reshape daily workflows: a **built-in PDF viewer** and an **integrated side-panel browser**. The two actions that previously forced developers to switch away from agent conversations can now be completed directly in the right panel. --- ## 1. Built-in PDF Viewer: Kevin Hou's Promise Delivered First up is the update that feels most personal: the **Built-in PDF viewer**. Back on September 21, I was using Antigravity to translate and typeset a 24-page PDF guide (`grok-bot-guide-cn.pdf`). The task required repeated adjustments to cover cropping and bottom margins. At the time, the workflow was jarring. Each time the agent finished running a script, it produced a `.pdf` file pill in chat and listed the file in the `Files Changed` pane, but clicking or right-clicking produced no reaction whatsoever. For every layout iteration, I had to exit Antigravity, open Finder, and preview the PDF in macOS Preview. Frustrated, I recorded an 18-second clip, posted it on X, and tagged `@Google Antigravity` in Chinese: **"Could you tell me how to preview a PDF file inside Antigravity?"** To my surprise, Antigravity product lead **Kevin Hou** (`@kevinhou22`) replied directly in Chinese that afternoon with nine words: **"Coming soon. For now, use Mac Preview."** ![Question to Kevin Hou about PDF preview and his reply](/images/posts/2026/10/kevin-hou-pdf-reply.png) A little over a month later, that promise arrived in `v2.28.0`: > *"PDF files now open in a built-in PDF viewer, both in the file viewer and when an artifact is a PDF, so you can read them without leaving Antigravity."* No more jumping out to "use Mac Preview for now." Whether you click a `.pdf` file in the File Viewer or receive a PDF artifact generated by an agent, it renders right inside the Antigravity right pane. Combined with `v2.27.0`'s fix for missing Mermaid diagrams in PDF exports, verifying generated PDFs is now a completely closed loop inside the desktop app. --- ## 2. Built-in Browser: Click Links in Side Panel Without Mobile Shrinkage The second major addition is the **Built-in browser**. In the official live stream mid-month where Kevin Hou teased upcoming browser improvements, `2.28.0` officially introduces it into the Side Panel. In daily use, three refinements stand out: 1. **Auto-expanding panel width**: Many built-in browsers feel cramped because narrow sidebars trigger mobile responsive breakpoints. Antigravity automatically expands the right panel when opening web links, preserving clean desktop layouts. 2. **Default internal view with right-click external escape**: Clicking links in conversation opens them in the side browser by default (with HTTPS certificate inspection in the address bar). Need your system browser instead? Simply **right-click the link** to choose an external window, or adjust the default under `Settings > General > Open Links In`. 3. **`Cmd + Shift + T` tab restoration**: With web pages, PDFs, and code sharing tabs in the side panel, accidental closures happen. Hitting `Cmd + Shift + T` (or `Ctrl + Shift + T` on Windows/Linux) restores recently closed side tabs right where they were, preserving your scroll position. --- ## 3. Notable Polish and Bug Fixes Alongside the viewer and browser, several subtle updates in `2.28.0` improve everyday stability: - **Any file attachment up to 20 MB**: Dropping video clips, design mocks, or raw binary files into chat is no longer rejected—any file under 20 MB can now be attached for agent inspection. - **Word and character level diff highlighting**: Code review diffs highlight specific words and characters modified within a line, rather than turning the entire line solid red or green. - **Subagent permission persistence**: Fixed an annoying issue where permissions granted as `Always allow` in the primary conversation were repeatedly re-prompted when delegated to subagents. - **CJK punctuation bold rendering**: Fixed formatting regressions where bold or italic markers adjacent to Chinese, Japanese, or Korean punctuation left raw `**` asterisks exposed in chat. - **Model retention across restarts**: Fixed a bug where restarting the client or reconnecting caused active conversations to switch models unexpectedly. --- From the integrated browser to the native PDF viewer, Antigravity's recent focus is clear: ironing out the friction points of artifact verification so developers can remain focused in flow. Have you updated to `2.28.0`? How is the built-in browser and PDF preview working for your workflow? --- # [EN] How Much Weekly Quota Does a 5-Hour Window Consume? Calculating Claude, Codex, and Antigravity with CodexBar History - URL: https://ye-yu.com/en/blog/codexbar-5h-vs-weekly-quota-calculation - Date: 2026-10-22 - Category: Coder - Chinese Version: https://ye-yu.com/blog/codexbar-5h-vs-weekly-quota-calculation ## 1. Background and BLUF (Bottom Line Up Front) I subscribe to Claude Pro, ChatGPT Plus (using Codex), and Google AI Pro (using Antigravity). All three enforce a two-tier quota model: a rolling 5-hour session window and an overall weekly allotment. I wanted to understand two questions: How much of the weekly quota does a full 5-hour window consume? And what daily pacing ensures you don't waste unused quota before the weekly reset? CodexBar logs percentage snapshots locally. I wrote a Python script to parse these logs and extract consumption deltas within matching windows: | Account / Pool | One 5h Window ≈ Weekly Quota | Windows per Week | Confidence | | --- | --- | --- | --- | | Claude Pro | 12.5%–13% | 7.5–8 | High | | Codex (ChatGPT Plus) | ~16% | ~6.4 | High | | Antigravity Regular Gemini (Google AI Pro) | ~28.6% | ~3.5 | Moderate | Running this analysis revealed that October 22 was my Claude weekly reset day. At 11:54 AM, I had only used 46% of my weekly quota. Even by maxing out every remaining 5-hour window until the 10:00 PM reset, the total would cap out at ~73%. Because usage was too light earlier in the week, no amount of late sprint could recover the lost quota. **TL;DR**: Don't count individual session resets—monitor your daily weekly quota growth. For a 7-day work week, Claude requires burning slightly more than one full 5-hour window every day, Codex needs about 90% of a full window daily, and Antigravity only needs half a window per day. *Note: These benchmarks reflect real usage on my personal accounts in October 2026. Providers do not publish static conversion factors.* ## 2. Core Mental Model: Why You Cannot Simply Divide Current Percentages The intuitive approach is dividing the two current numbers shown in CodexBar: e.g., Claude 5h at 85% and weekly at 46%. This produces a meaningless ratio because 46% includes all cumulative sessions earlier in the week. Valid ratios require computing matching **deltas**. Within the same 5-hour window, any activity draws down both quotas simultaneously. Therefore: `(Weekly Quota Delta) ÷ (5-Hour Quota Delta) = Equivalent Weekly Quota for a Full 5-Hour Window`. Between 12:58 and 13:58 on October 19, my Claude 5h usage jumped from 48% to 80% (+32), while weekly usage moved from 8% to 12% (+4): 4 ÷ 32 = 12.5%. A subsequent window the next evening recorded +48 and +6, again exactly 12.5%. Two critical constraints to keep in mind: - A "5-hour window" represents a quota bucket, not 5 hours of continuous typing. Under agentic loads, a bucket can be depleted rapidly. - Changing clients does not provide separate quota. Anthropic documentation clarifies that claude.ai, Claude Code, and Claude Desktop share a single quota pool; OpenAI notes ChatGPT Work and Codex share usage, and Codex Pro currently has no 5-hour limit. Quota draw rate also varies with model selection, reasoning effort, context length, and tool calls. ## 3. Reproduction Steps ### Step 1: Locate CodexBar Local History Files ```sh codexbar --help | head -1 ls ~/Library/Application\ Support/com.steipete.codexbar/history/ ``` On CodexBar 0.79.0, the history directory contains `antigravity.json`, `claude.json`, and `codex.json`. You can query live usage via the CLI: ```sh codexbar usage --provider claude --format json --pretty ``` ### Step 2: Understand the JSON Schema Files are organized by account key. Each account contains two series: `session` (`windowMinutes: 300`) and `weekly` (`windowMinutes: 10080`). Entries record three fields: ```json {"capturedAt": "2026-10-19T04:58:37Z", "resetsAt": "2026-10-19T08:30:00Z", "usedPercent": 48} ``` Timestamps are stored in UTC, sampled roughly once per hour. They represent percentage snapshots rather than individual transaction billings. A file may contain multiple accounts; `preferredAccountKey` marks the active one. ### Step 3: Filter Paired Windows and Calculate Ratios Save the following script as `quota_ratio.py`: ```python #!/usr/bin/env python3 """用 CodexBar 本地历史估算:一整轮 5 小时额度约等于多少周额度。 用法:python3 quota_ratio.py [起始时间] [5 小时增量下限] """ import json import sys from datetime import datetime from pathlib import Path provider = sys.argv[1] since = sys.argv[2] if len(sys.argv) > 2 else "1970-01-01" # 只用这个时间之后的采样(UTC) min_delta = float(sys.argv[3]) if len(sys.argv) > 3 else 15 # 整数百分比的产品建议 15 path = Path.home() / "Library/Application Support/com.steipete.codexbar/history" / f"{provider}.json" data = json.loads(path.read_text()) series = data["accounts"][data["preferredAccountKey"]] # 只取当前账户 def entries(name, minutes): return {e["capturedAt"]: e for s in series if s["name"] == name and s["windowMinutes"] == minutes for e in s["entries"]} def ts(t): return datetime.fromisoformat(t.replace("Z", "+00:00")) def close(a, b): # resetsAt 会有 ±1 分钟抖动 return abs((ts(a) - ts(b)).total_seconds()) <= 60 session, weekly = entries("session", 300), entries("weekly", 10080) samples = [(t, session[t], weekly[t]) for t in sorted(session.keys() & weekly.keys()) if t >= since] def same_window(a, b): (_, sa, wa), (tb, sb, wb) = a, b if not all(e.get("resetsAt") for e in (sa, sb, wa, wb)): # 空闲条目可能没有 resetsAt return False return (close(sa["resetsAt"], sb["resetsAt"]) and close(wa["resetsAt"], wb["resetsAt"]) and ts(sb["resetsAt"]) > ts(tb) # 后一条还没过 5 小时重置点 and sb["usedPercent"] >= sa["usedPercent"] and wb["usedPercent"] >= wa["usedPercent"]) groups = [] for s in samples: if groups and same_window(groups[-1][-1], s): groups[-1].append(s) else: groups.append([s]) total_s = total_w = 0 for g in groups: (ta, sa, wa), (tb, sb, wb) = g[0], g[-1] ds = sb["usedPercent"] - sa["usedPercent"] dw = wb["usedPercent"] - wa["usedPercent"] if ds < min_delta or dw <= 0: continue total_s += ds total_w += dw print(f"{ta} → {tb} 5h +{ds:g} 周 +{dw:g} 比例 {dw / ds:.1%}") if total_s: r = total_w / total_s print(f"合计:5h +{total_s:g},周 +{total_w:g} → 一整轮 5h ≈ 周额度的 {r:.1%},一周约 {1 / r:.1f} 轮") else: print("没有符合条件的样本:放宽起始时间,或调低 5 小时增量下限") ``` Execution: ```sh python3 quota_ratio.py claude 2026-10-15 ``` Observed output from October 22: ```text 2026-10-19T03:59:15Z → 2026-10-19T07:59:31Z 5h +56 周 +8 比例 14.3% 2026-10-19T14:57:59Z → 2026-10-19T18:55:03Z 5h +19 周 +2 比例 10.5% 2026-10-20T10:56:43Z → 2026-10-20T14:57:51Z 5h +91 周 +11 比例 12.1% 2026-10-22T02:59:05Z → 2026-10-22T06:56:11Z 5h +64 周 +9 比例 14.1% 2026-10-22T07:56:59Z → 2026-10-22T11:52:47Z 5h +44 周 +6 比例 13.6% 合计:5h +274,周 +36 → 一整轮 5h ≈ 周额度的 13.1%,一周约 7.6 轮 ``` The script performs three tasks: 1. Filters timestamps matching `since` for the active account and aligns `session` and `weekly` entries. 2. Identifies continuous windows where `resetsAt` aligns within 60 seconds and neither metric decreases. 3. Calculates delta per window using first and last records, filters out trivial increments, and sums totals before dividing. Individual window ratios fluctuate between 10.5% and 14.3% due to integer truncation. The aggregated 13.1% lines up closely with the manual 12.5% samples, making 12.5%–13% a reliable budgeting baseline. For other providers: ```sh python3 quota_ratio.py codex 2026-10-20T07:23:40Z # 从本周周窗口开始的时间算起(UTC) python3 quota_ratio.py antigravity 2026-10-14 2 # 百分比是小数,但会回落,下限设成 2 ``` Codex yields 15.6% (~15.7% in interactive runs). Antigravity yields 28.9% (~28.57% across 2/7 integer fractions). ### Step 4: Translating Ratios into Daily Pacing Targets Formulas: - Windows per week ≈ `1 / r` - Target usage per day across `D` active days = `1 / (D × r)` full windows | Account (r) | 7 Active Days / Week | 5 Active Days / Week | | --- | --- | --- | | Claude (12.5%) | 1 full window daily + 1 extra window on 1 day | 2 windows daily at ~80% each | | Codex (16%) | ~90% of a full window daily | ~125% of a window daily (e.g., 80% morning, 45% evening) | | Antigravity (28.6%) | Half a window daily | ~70% of a window daily | Mid-week rebalancing formula: `Remaining Weekly Quota ÷ Remaining Days ÷ r` determines needed daily window throughput. Alternatively, compare elapsed weekly window percentage against consumed quota. The `expectedUsedPercent` field in `codexbar usage --format json` directly tracks this pace. ### Step 5: Near-Reset Feasibility Check `Maximum Achievable Quota = Current Weekly % + (Remaining in Current Window % + Max Usable Future Windows × 100%) × r` On October 22: at 11:54 AM, Claude weekly usage was 46% with 22:00 reset; the 5-hour window was at 85% with 15:20 reset. Burning the remaining 15%, completing a full window after 15:20, and running a final window before 22:00 yields: `46% + (15 + 100 + 100) × 12.5% ≈ 73%`. Over a quarter of weekly allocation was mathematically unreachable. ## 4. Troubleshooting and Edge Cases | Symptom | Root Cause | Fix | | --- | --- | --- | | Hardcoded timestamps throw `KeyError` on repeat runs | Snapshots within the same hour are overwritten by newer samples | Filter entries dynamically rather than hardcoding timestamps | | Window `resetsAt` values misalign | Idle entries use synthetic timestamps; resets jitter by ±1 min | Allow 60-second tolerance; treat missing fields as window breaks | | Antigravity `primary` is not 5 hours | Field mapping differs: Antigravity `primary` tracks Gemini weekly, `secondary` tracks Claude/GPT 5h | Key off `windowMinutes` and bucket `id` | | Menu bar displays 80% while CLI shows 85% | Menu bar UI uses cached state | Trust CLI values for calculations | | Adjacent sample ratios swing wildly between 12.5% and 20% | Integer percentage quantization | Use larger window deltas and aggregate before division | | Antigravity usage drops backward | Unknown server-side reconciliation; quota pools are fragmented | Only evaluate strictly increasing windows with large deltas | | Estimating Claude vs Gemini cost multiplier in Antigravity | Claude and GPT share a combined quota pool | Insufficient discrete logging; requires controlled benchmark tasks | | CLI dumps contain email or organization names | `accountEmail` and `accountOrganization` fields | Sanitize JSON before sharing logs | ## 5. Summary and Scope If you use CodexBar and need predictable capacity planning across multiple AI subscriptions, this delta-based method provides an actionable schedule: - Conversion ratios reflect single-account, single-cycle observations. Upgrades (e.g. Claude Max) or shifts in reasoning effort require re-evaluating. - Codex weekly reset timestamps can adjust mid-cycle. Follow live CLI reset values. - Complimentary quota resets are treated separately (e.g. Codex Full resets or Claude limit resets). - Antigravity's ~28.6% ratio has wider variance due to pool telemetry fluctuations. --- # [EN] Guiding ChatGPT in Chrome: Navigating to Moodle Question Banks and Editing Questions - URL: https://ye-yu.com/en/blog/chatgpt-browser-moodle-question-bank - Date: 2026-10-21 - Category: Coder - Chinese Version: https://ye-yu.com/blog/chatgpt-browser-moodle-question-bank I wanted ChatGPT to help me navigate an authenticated Moodle site to find a question bank and inspect the settings of a specific question. The most time-consuming part in complex LMS menus is locating the exact course administration path. The successful navigation path was: **Course → Course Administration Menu → More → Question Bank → Questions**. Once inside the question bank, scoping the category, including subcategories, and using in-page search reliably pinpointed the question. This workflow operates on a local, already-authenticated Chrome instance. The instructions below assume a ChatGPT session with browser interaction capabilities. ## Specifying the Target Browser Start with a grounding prompt: ```text 请使用我已经登录的 Chrome,打开 <网站地址>。 先确认当前网站、登录状态,以及能看到哪些课程管理入口。 ``` Ask the agent to report the active page and verify it has attached to your running browser session before issuing commands. If the browser interface fails to bind initially, you can follow up with: ```text 请检查当前可用的浏览器和应用。 如果能控制我正在使用的 Chrome,请接着使用这个已登录的窗口。 ``` This fallback requires local desktop computer-use tools. ## Navigating from Course to Question Bank Providing just the course name and question ID can lead the agent into site-wide search rabbit holes. Constrain the navigation path directly: ```text 请进入 <课程名称>,找到这门课的题库。 查看课程的管理菜单和“更多”入口,找到“题库 → 试题”。 请报告实际点击路径,并把页面停在题目列表。 ``` The verified step sequence is: 1. Open the course from the course catalog. 2. Turn on "Edit mode". 3. Open the course action menu and choose "More...". 4. Locate "Question bank" under course administration and open "Questions". This lands directly on the question bank table with category filters. ## Locating Questions: Scoping Categories and In-Page Search Questions frequently reside in nested subcategories. Without checking subcategory inheritance, the list may appear empty: ```text 请在这门课的题库中查找 <题目编号或名称>。 核对类别,必要时勾选“同时显示子类别的试题”,再应用过滤器。 列表加载后,用浏览器页内查找定位题目。 找到后,核对名称并报告该行的编辑入口。 ``` After checking "Also show questions from subcategories" and applying filters, in-page search (`Command + F` on macOS) quickly locates the target row. ## Editing Questions: Clarifying Fields and Values Once the row is identified, formulate clear field-level instructions: ```text 请打开这道题右侧的“编辑”菜单,进入编辑表单。 先确认题目名称和 <字段名称> 的当前值。 然后将该字段从 <原值> 改为 <目标值>。 ``` Replacing "please update this question" with explicit field labels and target values makes inspection and rollback trivial: ```text 请打开 <题目编号或名称> 的编辑页。 将“试题名称”改为 <新名称>。 ``` In the question editing view, the agent can parse question titles, prompts, grading schemes, and answer choices. ## Post-Save Validation Loop Form updates require saving and re-reading to verify persistence: ```text 请保存这次修改。 若页面出现校验提示,请报告提示和对应字段。 保存后重新打开目标题目,确认 <字段名称> 已是 <目标值>。 再使用预览检查 <期望看到的界面行为>。 请分别报告修改、保存、重新读取和预览的结果。 ``` If you manually take over the browser mid-way, instruct the agent: *"I just interacted with the page manually; please re-read the current page state before proceeding."* > Note: This post outlines prompt-driven browser automation patterns for navigating deeply nested administrative web consoles. --- # [EN] Updating Six CLI Tools Weekly with Codex: From Automation Setup to Execution Verification - URL: https://ye-yu.com/en/blog/codex-scheduled-cli-updates - Date: 2026-10-18 - Category: Coder - Chinese Version: https://ye-yu.com/blog/codex-scheduled-cli-updates I wanted to consolidate updates for several CLI tools into Monday mornings: `agy`, `grok`, `codex`, `claude`, and later `mole` and `herdr`. The requirements were simple: execute locally on my Mac at 6:00 AM Singapore time every Monday, and report results back to the original Codex thread. After completing configuration, I manually triggered a test run: **2 updated successfully, 2 were already up to date, and 2 failed**. The failed `agy` update succeeded on a retry with the original command, while `herdr` required switching to `brew upgrade herdr`. The most important takeaway: having `update` in help docs doesn't guarantee the self-updater works. Because Herdr was installed via Homebrew, running its internal self-updater failed by design. I revised the automation's command list and constraints accordingly. ## Observed Test Results | Tool | Initial Exit Code | First Run Outcome | Follow-up Outcome | | --- | --- | --- | --- | | agy | 1 | Detected 1.4.2 from 1.4.0, download interrupted | Succeeded on retry, verified version 1.4.2 | | grok | 0 | Already latest: 1.0.62 | Unrecognized `privacy` config warning logged | | codex | 0 | Updated successfully | Verified version 0.163.0, restart recommended | | claude | 0 | Already latest: 2.1.302 | No re-run needed | | mole | 0 | 1.56.1 → 1.61.0 | Verified version 1.61.0 | | herdr | 1 | Homebrew install disables self-update | Switched to Homebrew: 0.9.3 → 0.9.5 verified | During the initial 6-way parallel run, one failure did not block other updates, and individual outputs and exit codes were collected. While the two failed tools were resolved manually, the full 6-tool suite now reflects verified commands. This test executed on Sunday, October 18, 2026, at 21:35 Singapore time. It verified the execution pipeline end to end. ## Defining "Configuration Complete" Three distinct aspects must be verified: - **Command Availability**: Does the local install expose an `update` sub-command? - **Task Configuration**: Are schedules, command lists, working directory, and destination threads persisted accurately? - **Process Outcomes**: What stdout/stderr and exit codes did each subprocess produce? A status of `ACTIVE` on the automation does not mean all tasks succeeded. In the initial execution, the parent orchestrator exited with code 0 while child tasks for `agy` and `herdr` exited with code 1. Health checks must inspect every subprocess. > Note: Scheduled automations execute on local macOS environments involving shell permissions and subprocess exit code collection. Validate individual update semantics before scheduling. ## Step 1: Verify Command Paths and Entrypoints Inspect command locations in the local terminal: ```sh zsh -lc 'command -v agy grok codex claude mole herdr brew' ``` Resolve any missing paths or environment dependencies. Hardcoding absolute paths to a specific Node version ties the automation to that runtime directory; commands should be dynamically resolved via `command -v`. Next, inspect help entries: ```sh zsh -lc 'agy help update' zsh -lc 'grok update --help' zsh -lc 'codex update --help' zsh -lc 'claude update --help' zsh -lc 'mole --help' zsh -lc 'herdr --help' ``` `mole` lists `mo update` in docs but executes cleanly via `mole update`. `herdr` lists `herdr update` but fails when installed through Homebrew. The final validated command list is: ```text agy update grok update codex update claude update mole update brew upgrade herdr ``` Always align update commands with installation managers. Mole delegates to Homebrew internally; Codex invokes npm. ## Step 2: Formulate Comprehensive Prompt Instructions Scheduling an automation requires clear error-handling and environment bounds. Here is the exact prompt configured in Codex: ```text 请在当前聊天创建一个定时任务:每周一早上 06:00,时区 Asia/Singapore, 在当前这台本地 Mac 上更新以下六个已安装程序: agy update grok update codex update claude update mole update brew upgrade herdr 我授权这个定时任务执行以上六项更新。结果返回当前聊天。 每次使用本机 zsh 登录 shell,以我的主目录为工作目录, 先用 command -v 重新确认每个命令的位置,不固定写入 Node 版本路径。 六项更新并行执行,分别保留输出与退出码,并等待全部结束。 一项失败不影响其他项。拿到最终输出和退出码后,再判断各项结果。 Herdr 使用 brew upgrade herdr,其余五项使用各程序自带的 update。 不要再执行 herdr update。保留当前发布通道。 不使用 sudo,不修改 shell 配置或项目文件。 遇到缺少程序、网络失败、权限不足或需要人工输入,报告具体原因; 不自动确认未知提示,不更换安装方式。 有更新或异常时,用简体中文简要列出各项结果与失败原因。 全部已经是最新版本且没有异常时,保持安静。 ``` The initial run verified parallel execution and fault isolation. The runner closes stdin and enforces a 20-minute execution timeout per tool. ## Step 3: Verify Persistence and Modify in Place After creating the automation, verify the returned task ID and `ACTIVE` state, then read back parameters to confirm schedules and target threads. When adding `mole` and `herdr` later, amend the existing task rather than creating duplicate automations: ```text 请把 <工具名> update 加入刚才的每周更新任务。 先核对本机命令和帮助信息,保持原有调度时间、目标聊天和执行要求。 修改后回读配置,确认完整命令清单。 ``` When Herdr failed on self-update, the command was changed to `brew upgrade herdr`, and the prompt constraint "all use built-in update" was corrected. ## Configuration Pitfall: Local Execution vs. Destination Thread The initial creation failed with: ```text automation_update received invalid arguments: targetThreadId: Missing targetThreadId or destination=thread. ``` The tool expected `destination: "thread"` along with `targetThreadId` when routing notifications. Separating "runs locally on Mac" from "reports back to current thread" resolved the issue. ## Troubleshooting Case Studies ### Herdr: Packaging Decides the Upgrade Command `herdr update` exited with code 1, reporting that Homebrew installations disable built-in updates. Retrying the same command was pointless. I updated the automation and executed manually: ```sh zsh -lc 'cd ~ && command -v brew && brew upgrade herdr' 📌 **Practical Example** > If you previously had an agent troubleshoot a tricky network error and only recall a snippet of the error message, you can now search the snippet directly instead of scrolling through history. Additionally, **archived conversations now retain their status and last updated timestamps**, with clear `(Archived)` markers in sidebar titles to avoid navigation confusion. ![](/images/posts/2026/10/img-muyxi9jfs883.jpg) ## 2. Scheduled Tasks Renamed to Automations The previous "Scheduled Tasks" tab is now **Automations**. Beyond the name change, two key capabilities have been added: 1. **Run Now**: Trigger any scheduled automation immediately without waiting for its scheduled execution time. Ideal for testing newly created tasks or fetching ad-hoc reports. 2. **Create with Prompt**: Skip manual form configuration—describe what you need in natural language, and let the agent guide you through building the automation step by step. ![](/images/posts/2026/10/img-muyxj08zi8xx.jpg) Manual configuration remains simple, requiring just three fields: | Field | Description | |---|---| | Name | The name of the automation task | | Schedule | Frequency (e.g., Daily), execution time, and local timezone (e.g., GMT+8) | | Prompt | The instructions for the agent to execute | Note the fine print: **All automations run as Flash.** All background automations currently run on Gemini Flash. Keep instructions focused on lightweight, repeatable tasks (e.g., "summarize daily updates", "check CLI version bumps") rather than heavy architectural reasoning. > 📌 **Common Use Case** > A daily 7:00 AM automation that inspects CLI releases (such as Codex, AGY, Grok) and automatically triggers updates if new versions are available. ## 3. Collapsible Agent Operation Rows Previously, when an agent chained file edits, bash commands, and file reads between responses, terminal logs often cluttered the chat, pushing final answers off-screen. Now, these actions are **consolidated into a single collapsible row with a concise summary**. You can expand the row whenever you need to inspect raw execution details. Timestamps under agent messages also display relative time by default (e.g., `5m ago`), revealing the exact ISO timestamp on hover. ## 4. Quality of Life Refinements - **Gruvbox Material Theme**: Added both Light and Dark variants with matching syntax highlighting palettes. - **Image-Aware Titles**: Auto-generated titles now inspect images included in your initial message; attachment-only messages also get meaningful titles. - **Windows / Linux**: Clicking the top-left Antigravity window icon starts a new conversation immediately. - **macOS Permissions**: If macOS security blocks Antigravity from reading drag-and-dropped folders, the UI directs you directly to `System Settings > Privacy & Security > Files and Folders`, and the agent won't falsely claim the file does not exist. ## 5. Key Bug Fixes Among the 14 bug fixes in this release, several resolve high-impact edge cases: **Crash & Error Fixes:** - Fixed a bug where reading truncated or incomplete MP4/MOV videos permanently broke subsequent messages in the conversation. - Fixed an issue where saving settings files via Windows Notepad or PowerShell prepended invisible BOM characters, invalidating settings. **UI & State Fixes:** - Fixed switched models in one thread occasionally showing incorrectly when switching between conversations. - Fixed non-text artifacts (PDF, Word, Excel, PowerPoint) rendering as raw text instead of displaying proper download cards. - Fixed missing file tree sidebars in standalone conversations outside defined workspaces. - Fixed jumping to the page top when toggling focus between Markdown preview, artifacts, and diff reviewers. - Fixed holding `Cmd+B` / `Ctrl+B` repeatedly toggling the sidebar uncontrollably. - Fixed selecting text and pressing `Cmd+L` / `Ctrl+L` failing to focus the prompt input. **Other Fixes:** - Fixed attachments uploaded from the homepage unexpectedly reappearing in new conversation inputs. - Restored syntax highlighting for Rust (`.rs`) files and codeblocks. - Fixed plugin updates on Windows failing when background processes were still holding open handles. ## Summary 1. `Cmd+K` full-text search across all conversation contents. 2. Scheduled Tasks transformed into Automations with `Run Now` and `Create with Prompt`. 3. Consolidated, collapsible agent action rows for cleaner chat threads. Full release notes are available on the official [Releases page](https://antigravity.google/releases?tab=hub). --- ### Recent Version Highlights | Version | Focus | |---|---| | v2.19.1 | Subagent direct messaging, Markdown to PDF export, conversation-only undo | | v2.18.1 | Customizations tab and Plugin Marketplace | | v2.17.0 | `/plan` workflow, dedicated 20,000 token rule budgets, Plan Review Policy | | v2.16.0 | WSL support, Office attachments, subagent real-time status cards | | v2.15.1 | Windows Sandbox | --- # [EN] Antigravity 2.17.0: Plan Before You Code - URL: https://ye-yu.com/en/blog/antigravity-2-17-0-plan-before-code - Date: 2026-09-25 - Category: Coder - Chinese Version: https://ye-yu.com/blog/antigravity-2-17-0-plan-before-code Google Antigravity has received its v2.17.0 update. The guiding philosophy of this release is clear: *"Plan before you build."* From formalizing structured agent planning workflows to completely restructuring how rules occupy the model's context window, these changes directly target the pain points of complex software engineering. ![](/images/posts/2026/09/img-muh202yr1ipm.jpg) Here is a summary of what's new 👇 ## 1️⃣ Headline Feature: /plan — Review Before Writing Code In complex engineering tasks, an agent making uncoordinated edits across an entire codebase can introduce regressions. Version 2.17.0 brings a disciplined workflow: - **Plan Review & Iteration**: Triggering `/plan` prompts the agent to draft a comprehensive implementation design document first. You review and refine the proposal before code modification commences. - **Plan Review Policies**: Select between three review policies in settings: review every plan, delegate review decisions to the agent based on critical seam thresholds, or bypass planning for simple one-off tasks. ## 2️⃣ Dedicated 20,000 Token Budget for Rules Previously, extensive project guidelines risked crowding out Skills, Subagents, and MCP definitions within the limited active context window. - **Dedicated Rule Allocation**: Project rules now enjoy an independent 20,000 token budget that does not compete with active conversational context. - **Graceful Fallbacks**: Rules exceeding the budget automatically fold into compact "path + description" index stubs, dynamically fetched only when relevant. ## 3️⃣ Configuration Consolidation - **New Config Location**: Workspace settings officially migrate to `/.gemini/config.json`. - **Deprecated Directory**: The legacy `.agents/settings.json` file is no longer read. Custom paths such as `personal_customization_dir` should be migrated to the new file. ## 4️⃣ Quality of Life Enhancements - **Quick Theme Switching**: Toggle dark/light themes directly from the Command Palette without opening the full Settings view. - **Custom Agent Hooks**: Markdown agent specifications can now register lifecycle hooks in frontmatter via the `hooks:` property with relative and absolute path support. - **Paste Fidelity**: Right-click paste supports rich text and images while preserving Markdown hyperlink formats; pasting over attachments no longer overwrites existing input text. - **Productized Command Surfaces**: Slash commands and built-in Google plugins present official product branding and icons (e.g., Chrome DevTools, Gemini API) rather than raw internal identifiers. - **Quiet Links**: Only actionable artifacts (such as newly created reviews or local dev servers) display interactive cards, while informational web lookups save quietly to sidebar history. - **Language Support**: Added C++20 module interface (`.cppm`) syntax highlighting and icons. ## 5️⃣ Bug Fixes - **/rewind Snapshot Precision**: Resolved an issue where rewinds selected outdated historical snapshots; rollbacks now strictly target the latest state preceding the selected checkpoint. - **Large File & Diff Responsiveness**: Syntax highlighting and diff computations moved off the UI main thread; files exceeding 100 KB gracefully fallback to plain text to preserve fluidity. - **Large Repo Timeout Prevention**: Extended custom rule and workflow discovery timeouts from 3s to 15s to eliminate false-negative loading failures in large monorepos. - **/btw Context Preservation**: Interleaved side-queries now maintain the active subagent profile rather than resetting to the root agent. - **Math Formula Rendering**: Fixed rendering artifacts where inline math containers with `$$` caused dropped text or stray dollar symbols. - **Media Asset Export**: Addressed silent failures when saving SVGs and encoded video streams. --- 💡 **Summary** Antigravity 2.17.0 represents a mature step forward in agentic engineering discipline: establishing a formal planning phase with `/plan` and decoupling rule tokens from execution context. If you are using Antigravity on medium to large codebases, upgrading is strongly recommended! --- # [EN] Google Antigravity 2.16.0 Released: Practical New Features Breakdown - URL: https://ye-yu.com/en/blog/google-antigravity-2-16-0-new-features - Date: 2026-09-23 - Category: Coder - Chinese Version: https://ye-yu.com/blog/google-antigravity-2-16-0-new-features Google Antigravity has rolled out its 2.16.0 release! Beyond noticeable performance enhancements across large codebases, this release introduces several highly practical features addressing developer feedback. Here is an overview of the key highlights. ![](/images/posts/2026/09/img-mudkij90aspi.jpg) ## 1. Native Windows WSL Support 🐧 A welcome addition for Windows developers: 2.16.0 integrates first-class support for the Windows Subsystem for Linux (WSL). You can now target and switch between installed WSL distributions directly within application settings. The title bar clearly reflects the active environment, offering a unified development experience across Linux toolchains on Windows. ![](/images/posts/2026/09/img-mudkjhekxqu8.jpg) ## 2. Direct Drag-and-Drop Parsing for Office Attachments 📄 No more manual copying and converting tabular data. Beginning with 2.16.0, you can drag and drop Word (.docx), Excel (.xlsx), and PowerPoint (.pptx) documents directly into chat. Powered by underlying multimodal parser upgrades, the Gemini model processes document structure and data tables natively. ## 3. Full Visibility for Subagents 🤖 Multi-agent coordination is now significantly more transparent. Subagent invocations render as dedicated interactive cards inline within the timeline. You can monitor their live lifecycle state in real-time—whether Running, Waiting, or Completed. Cards also feature hover-to-terminate controls and one-click deep links into sidecar session panels, removing guesswork from background delegation. ## 4. Performance & Polish ⚡ Several refined touches round out the release: - **Near-Instant Large Project Scans**: Scanning for custom Skills and workspace configuration in monorepos or network-mounted directories has dropped from over a minute to sub-second speeds. - **Improved Image Handling**: Context menus now support direct right-click copy and save for generated imagery. SVG assets copy cleanly to the clipboard ready for pasting into design tools and editors. - **Transparent Execution Feedback**: Enhanced progress indicators detail precise agent staging activities (such as tool initialization). During network retries, a live countdown with attempt counters keeps you informed. ## Conclusion Antigravity 2.16.0 delivers substantial upgrades across cross-platform environments (WSL), document understanding, and agent observability. The indexing speed improvements alone will save meaningful time in large projects. Recommended update for all active users! --- # [EN] Deep Dive into Antigravity's New Default Agent Permissions - URL: https://ye-yu.com/en/blog/antigravity-agent-default-permissions-deep-dive - Date: 2026-09-16 - Category: Coder - Chinese Version: https://ye-yu.com/blog/antigravity-agent-default-permissions-deep-dive ![](/images/posts/2026/09/img-mu3k8mabg9wv.jpg) The permission architecture in Google Antigravity is undergoing a significant evolution. **The short takeaway:** Under the new Default permission preset, you will be interrupted by far fewer confirmation prompts. By introducing upgraded operating-system-level sandboxing on macOS and Linux, terminal commands now execute inside an isolated sandbox by default. So long as the agent is interacting strictly with files inside your active workspace without outbound network access, commands proceed autonomously without manual approval. > *Note: Windows currently retains the legacy permission model.* Previously, developers had to choose between two extremes: fully permissive Turbo mode, or an interactive review cycle that prompted on virtually every command. The new Default preset establishes a well-balanced middle ground. ![](/images/posts/2026/09/img-mu3k1ihikdou.jpg) ### Mode Overview ## Request Review - Every terminal command requires explicit human authorization; commands run outside the sandbox. - Read and write file access is restricted to the workspace. - Outbound network requests are blocked by default and require approval. ## Default - Commands run autonomously inside the sandbox without manual confirmation. The agent can request unsandboxed execution when necessary, subject to human approval. - Sandbox file read/write is strictly confined to the active workspace and system temp directories. - Outbound networking inside the sandbox is blocked. To access external APIs, the agent requests unsandboxed execution. ## Turbo - All commands execute automatically outside the sandbox without prompts. - Global filesystem read/write access is permitted. - Unrestricted network access is enabled for the agent. The update also refines how granular permission rules bind to sandbox states: - When sandboxing is disabled, standard `command` rules govern all commands; when sandboxing is enabled, they govern commands running inside the sandbox. - When sandboxing is enabled, `unsandboxed` rules apply exclusively to commands attempting to bypass the sandbox. ## Permission Presets in Practice Permission presets dictate baseline behavior, while your explicit `allow`, `deny`, and `ask` lists layer on top with authoritative precedence. In Default mode, terminal operations run inside an isolated Terminal Sandbox. When an agent legitimately requires host network access or system-wide resources, it petitions for unsandboxed execution. Unless pre-cleared by a matching `command(...) allow` rule, Antigravity pauses for your review. You can configure global presets under `Settings → General → Permission Settings`, or override them per project in `Settings → Projects`. Newly initialized workspaces default to `Inherit Global`. ## Glossary Reference | Antigravity Term | Context / Meaning | |---|---| | `Security Preset` | High-level baseline policy across sandbox and approvals | | `Default` | Autonomous sandboxed execution with approval for host access | | `Turbo mode` | Unsandboxed, fully autonomous execution | | `Local Permissions` | Filesystem access boundaries | | `Network Access Rules` | Egress networking policies | | `Terminal Commands` | Shell execution rules | | `Commands Outside Sandbox` | Unsandboxed execution permissions | | `MCP Tools` | Model Context Protocol server capabilities | | `sandbox` | Isolated OS process container | | `agent` | Autonomous coding persona | *(Note: As of writing, this rollout is progressively deploying across active release channels.)* --- # [EN] Beyond the Desktop GUI: Headless Remote Control in Antigravity CLI 1.2.0 - URL: https://ye-yu.com/en/blog/antigravity-cli-headless-remote-control - Date: 2026-09-10 - Category: Coder - Chinese Version: https://ye-yu.com/blog/antigravity-cli-headless-remote-control ![](/images/posts/2026/09/img-mtv6qsgwhnhi.jpg) When executing large-scale refactorings, comprehensive test suites, or multi-repo migrations, AI agents frequently run for dozens of minutes or hours. In the past, if you wanted to step away and monitor progress from a phone or browser, you had to keep the full Antigravity 2.0 desktop editor running with Remote Control enabled. With the release of **Antigravity CLI 1.2.0**, Google has baked this capability directly into the terminal runtime: **Headless Remote Control (Daemon)**. You no longer need to keep a heavy desktop UI running or leave a terminal session active. Your local dev workstation can now operate as an always-available headless daemon, ready for orchestration from any web browser on any device. --- ## What Is "Headless Remote Control"? "Headless" means running without a graphical interface. Previously, closing your terminal window or dropping an SSH connection would terminate the active CLI session. The 1.2.0 daemon registers Antigravity CLI directly into your **operating system's native background service manager**: * **Linux**: Managed via `systemd` user services. * **macOS**: Registered as a `LaunchAgent`. * **Windows**: Registered as a Scheduled Task. Once launched, the service establishes a secure reverse connection to Antigravity's cloud relay. Even if you close the terminal, lock your screen, or recover from unexpected crashes, the daemon resumes automatically. --- ## Three Essential Commands for Lifecycle Management You don't need to handcraft systemd units or macOS plists. The CLI provides three concise subcommands: ### 1. Register and Start Daemon: `agy remote-control start` Run in an authenticated terminal session: ```bash agy remote-control start ``` The CLI installs the system service and starts the background process immediately. If you manage multiple workstations under the same Google account, assign a custom name to distinguish machines in the web UI: ```bash agy remote-control start --name "workstation-mac" ``` *(If omitted, Antigravity assigns an auto-generated memorable handle like `my-machine-distant-plume`.)* ### 2. Check Status and Identity: `agy remote-control status` Inspect daemon health, connection state, and assigned machine identifiers: ```bash agy remote-control status ``` ![](/images/posts/2026/09/img-mtv6fs3xd9jd.jpg) ### 3. Stop and Unregister: `agy remote-control stop` When you no longer need the machine on standby, stop the daemon and cleanly deregister it: ```bash agy remote-control stop ``` --- ## Connecting via Web Browser Once the daemon is active, interacting with it follows the familiar Remote Control experience: 1. **Open the Console**: Navigate to [https://antigravity.google.com/](https://antigravity.google.com/) on mobile, tablet, or another computer. 2. **Authenticate**: Log in with the same Google account used in your CLI. 3. **Select Your Host**: Choose your workstation from the instance roster. 4. **Take Command**: Launch new sessions, review active context, inspect code diffs and artifacts, and approve tool authorizations remotely with a single tap. *(Tip: On mobile devices, add the site to your Home Screen to receive native push notifications when background tasks complete or require input).* ![](/images/posts/2026/09/img-mtv6odduromz.jpg) --- ## Key Technical Nuances * **Independent Auth Profiles**: The headless daemon utilizes the CLI's authentication state (`agy login`), completely separated from the desktop Antigravity IDE app session. * **Operating System Lifecycle Guarantees**: * **Linux**: Starts on boot and persists regardless of active interactive user sessions. * **macOS**: Boots when the user logs into the desktop environment and pauses upon sign-out. * **Windows**: Runs without logon if installed with elevated administrator privileges; otherwise starts upon user logon. * **Renaming Instances**: To change your host alias, re-run `agy remote-control start --name "new-name"`, or update `cliRemoteControlHostname` in `~/.gemini/config/config.json` and restart the daemon. --- With CLI 1.2.0, your physical hardware transforms into a private, on-demand AI compute node—retaining the speed and toolchain depth of your local environment while freeing you from your physical desk. --- # [EN] Frontier Engineering: 10 Core Principles - URL: https://ye-yu.com/en/blog/frontier-engineering-ten-core-principles - Date: 2026-09-10 - Category: Coder - Chinese Version: https://ye-yu.com/blog/frontier-engineering-ten-core-principles > **Source**: https://kiro.dev/topics/frontier-engineering/ > **Terminology note**: Terms such as `agent`, `prompt`, `context`, `steering file`, `skill`, `MCP`, `vibe coding`, `CI`, `PR`, and `guardrail` are retained in their industry standard forms. --- ## Overview and Manifesto Software developers are bifurcating into two distinct camps: those who fundamentally changed how they collaborate with AI agents, and those who merely swapped their editing tools. Today, autonomous AI agents write code, run suites, diagnose failures, and iterate continuously for hours without human intervention. The nature of software development has shifted accordingly. The developers experiencing non-linear productivity leaps did not find a magic tool; they adopted an entirely different operational model: they no longer write software directly—they build environments in which autonomous agents reliably produce software. This guide is written for engineers on the ground. If you are already pairing with AI assistants but haven't seen a dramatic leap in shipping velocity, this manifesto lays out what needs to change. Be warned: this is an engineering investment, not a toggle. Cultivating intuition, writing `steering files`, refactoring codebases for agent-readability, and mastering modular task decomposition takes deliberate practice. Expect velocity to dip during the first few weeks before accelerating exponentially. ### The 10 Principles at a Glance 1. **You Are the Architect, Not the Typist** 2. **Maximize Agent Autonomy; Minimize Your Interventions** 3. **Engineer the Codebase for Agents** 4. **Build Fast, Local Feedback Loops for Agents** 5. **Execution Is Cheap; Direction Is Everything** 6. **Treat Code as Disposable Artifacts** 7. **Hold AI Output to Human Standards** 8. **Trust Guardrails, Not Agents** 9. **Involve Agents Across the Entire Lifecycle, Not Just Implementation** 10. **Continuously Tune Your Agent Operating System** ### Frontier Engineering Is Not "Vibe Coding" Frontier Engineering is not "vibe coding," nor is it pasting casual prompts into a chatbox and hoping for the best. It is a disciplined, rigorous practice marrying traditional software engineering principles with the massive leverage of autonomous agents. Over time, your primary scarce resource is attention. Managing cognitive load across concurrent agent contexts, upholding rigorous code quality under high velocity, and resisting the urge to micromanage agent threads becomes the core skill. Your job becomes a continuous filter: what demands human judgment, and what does not. We remain in the early adopter phase. Standardized blueprints for agent-first infrastructure, test harnesses, and automated reviews are still emerging. Much of the workflow relies on sharp engineering instincts: which tasks to delegate, where to place boundaries, and when to step in. Once mastered, velocity surges—freeing bandwidth to tackle architectural debt, edge cases, and long-deferred ambitions that previously fell outside scope. --- ## 01. You Are the Architect, Not the Typist The core value of engineering is no longer typing syntax; it is clarifying intent. In practice, frontier developers directly write less than 1% of the code deployed under their names. The rest is produced, refined, and verified by agents under their direction. Your role condenses into two pillars: defining what "done" means (requirements, operational constraints, acceptance criteria), and verifying that outputs match intent. Clear communication of intent is not new, but it is now indispensable. Stating "add authentication to this API" is insufficient. You must define token lifecycles, role permissions per endpoint, unauthorized handling behaviors, and regression expectations. Then, let the agent construct the code. --- ## 02. Maximize Agent Autonomy; Minimize Your Interventions Too many developers remain trapped in a fragile 60-second loop: submit a prompt, wait a minute, grab the snippet, test manually, paste errors back, and repeat. High velocity cannot exist in this loop. Frontier engineers hand over long-running objectives complete with self-validation instructions: *"Implement this feature, write tests, run the suite, verify that all assertions pass, and maintain 90% branch coverage."* The agent can then operate uninterrupted for 30 minutes or more while you focus elsewhere. Agents will encounter hiccups; allow them to cycle, self-correct, and converge autonomously. Orchestrate multiple agents in parallel across decoupled tasks. Your productivity ceiling is no longer your typing speed, but the number of meaningful concurrent threads you can keep effectively engaged. --- ## 03. Engineer the Codebase for Agents An agent's effectiveness is constrained by the clarity of the codebase it encounters. Foundational engineering practices that help human engineers pay massive compounding dividends with agents: clean READMEs, explicit architecture specs, informative tests, strict module boundaries, strong typing, and deterministic build toolchains. In legacy systems, isolate and prep one module at a time rather than casting agents into unstructured chaos. Human teammates onboard once; AI agents re-onboard on every new session. Capture implicit institutional knowledge explicitly: `steering files` codify conventions, `skills` encapsulate procedural workflows, automated scripts bootstrap environments, and MCP servers expose dynamic context. Instruct agents to leave durable decision logs and clear comments, ensuring future agent sessions inherit not just code, but the rationale behind it. --- ## 04. Build Fast, Local Feedback Loops for Agents If an agent cannot execute tests locally and diagnose failures before you read the diff, you remain the blocking bottleneck. Invest heavily in deterministic, fast, locally executable test harnesses. Agents must be equipped to run linters, execute unit tests, render UI changes via headless browsers, query mock services, and spin up local stacks. Anything you use to validate your own code should be accessible to the agent as a tool. Property-based testing is especially potent: it stress-tests edge cases that human developers and LLMs routinely overlook. High-velocity code generation without automated guardrails only accelerates tech debt; coupled with autonomous feedback loops, it elevates overall software robustness. --- ## 05. Execution Is Cheap; Direction Is Everything When complete features can be synthesized in an afternoon, the bottleneck shifts from implementation to problem definition: what is worth building, what constraints matter, and when to pivot. Code is cheap; architectural trade-offs, API contracts, and domain models remain expensive. Leverage agents during discovery as brainstorming partners to poke holes in assumptions, map alternative trade-offs, and prototype competing solutions. Spec-driven development becomes mandatory: collaborate with the agent to draft concrete requirements upfront to prevent divergent downstream assumptions. --- ## 06. Treat Code as Disposable Artifacts With low generation costs, code is no longer precious. Sunk cost fallacies must be abandoned: whether a prototype took a day or two weeks, if architectural validation fails, discard it cleanly. Do not carry forward brittle code simply because effort was invested. Rebuilding from a sharpened spec takes hours, not months. The critical exception lies in boundary tests. While ephemeral unit tests can be rewritten alongside implementation, high-level integration, property, and stress tests must be preserved—they represent the immutable contract that any replacement implementation must satisfy. --- ## 07. Hold AI Output to Human Standards Speed without quality is pure production liability. Regardless of what synthesized the lines, your name is on the commit, and ownership is yours. Initially, this demands meticulous line-by-line review to establish calibrated trust. As velocity scales, manual review becomes unsustainable. Introduce automated AI reviewer personas into pre-commit hooks and CI pipelines to audit correctness, security vulnerabilities, test depth, and idiomatic maintainability. Reserve human attention for systemic architecture, downstream operational impacts, and security boundaries. Ensure agents observe deployments into production and stand ready to remediate regressions. --- ## 08. Trust Guardrails, Not Agents Long-duration autonomy requires robust, automated guardrails. Avoid the false dichotomy of unbounded system access versus tedious per-tool confirmation fatigue. Scope permissions strictly to the directories, toolsets, and network boundaries required for the task. Enforce deterministic safety nets: SAST scans, credential leak detection, and sandboxed runtimes. Every guardrail automated is one less human interruption required. --- ## 09. Involve Agents Across the Entire Lifecycle, Not Just Implementation Extend agent workflows beyond writing source code. System design docs, performance incident forensics, sprint summaries, documentation maintenance, and on-call runbooks can all follow the same pattern: provide context, specify constraints, generate a first draft, and refine via review. Standardize steering files and MCP tool registries so pipeline agents, documentation agents, and triage agents share a unified foundation. --- ## 10. Continuously Tune Your Agent Operating System Every time an agent derails or forces an unnecessary human intervention, treat it as a bug in your operating system: add a steering rule, encapsulate a missing workflow in a `skill`, automate a manual step via CLI, or refine an MCP interface. Frontier engineering is a meta-discipline: you are simultaneously building the product and iterating on the system that builds the product. Over time, this compounding flywheel transforms reactive prompting into an autonomous, self-healing engineering engine. --- # [EN] Fixing macOS High CPU Usage in dasd Process with Antigravity - URL: https://ye-yu.com/en/blog/fixing-macos-high-cpu-usage-in-dasd-process-with-antigravity - Date: 2026-09-08 - Category: Coder - Chinese Version: https://ye-yu.com/blog/fixing-macos-high-cpu-usage-in-dasd-process-with-antigravity ![](/images/posts/2026/09/image-1024x576.png) Today, my Mac (running the latest macOS 27.0 beta 8) suddenly started lagging. Opening Activity Monitor revealed that a system process named **`dasd`** was pinning a single CPU core at 90%–120%. A quick search yielded no useful answers. Tracing it down with Google Antigravity, I uncovered a hilarious blunder: **an infinite loop caused by an Apple engineer handling time zones incorrectly**. ![](/images/posts/2026/09/image-1-1024x685.png) * * * ## TL;DR — Run this command directly: ``` defaults write com.apple.appstored ArcadePayoutResetDate \ -date "$(date -v+3d -u +"%Y-%m-%dT%H:%M:%SZ")" && \ killall appstoreagent ``` * * * ## Troubleshooting Process with Google Antigravity ### Conclusion & Current Status (BLUF) `dasd` continuously consuming 90%–99% CPU is **not routine background system maintenance, but rather `appstoreagent` (the App Store background daemon) trapped in a hyperactive scheduling loop**. The root cause has been isolated and **resolved**. CPU usage for `dasd` dropped from **98.1% to 0.0%**, and the system returned to normal without requiring a reboot. * * * ### Root Cause Analysis Unified Logging System captures and process call traces provided clear evidence of the infinite loop: 1. **Offending Task**: `com.apple.appstored.ArcadeResetPO` (Apple Arcade payout metrics reset task). 2. **Logic Flaw**: * The actual current time was in the afternoon, but `ArcadePayoutResetDate` in `com.apple.appstored` preferences was pinned to midnight earlier that day: `2026-09-06 00:00:00 +0800` (a timestamp in the past). * After finishing the reset, `appstoreagent` failed to advance the timestamp to the next cycle (the following day). Instead, it re-registered the task using the already expired timestamp `2026-09-06 00:00:00`. * When `dasd` (Duet Activity Scheduler) received the registration, it saw that the scheduled execution time was in the past, marked it as overdue, and triggered it immediately (`Running immediately on submission`). * Outcome: **Over 400 dispatch and IPC events triggered per second**, keeping `dasd` pegging a full CPU core continuously. #### Unified Log Trace ``` appstoreagent: [ArcadePayoutReset] Payout metrics reset with current payout reset time: 2026-09-06 00:00:00+0800 appstoreagent: [ArcadePayoutReset] Reset with reason: Rescheduling appstoreagent: [ArcadePayoutReset] Using new date: 2026-09-06 00:00:00+0800 with reason: Rescheduling appstoreagent: [ArcadePayoutReset] Activity not scheduled; submitting request dasd: SUBMITTING: 501:com.apple.appstored.ArcadeResetPO dasd: Running immediately on submission dasd: REQUESTING START: 501:com.apple.appstored.ArcadeResetPO ``` * * * ### Mitigation & Verification The loop was broken by manually pushing the scheduled date forward in user defaults and gracefully restarting `appstoreagent`: 1. **Command Executed**: `defaults write com.apple.appstored ArcadePayoutResetDate -date "2026-09-06T16:00:00Z" && killall appstoreagent` 2. **Verification Results**: * Monitored via `top` / `ps`: `dasd` (PID 404) CPU usage instantly fell to **0.0%**. * After restarting, `appstoreagent` suspended normally and stopped flooding the system log at 400+ entries/sec. * * * After working through the trace with Google Antigravity, CPU usage is back to normal. ![](/images/posts/2026/09/image-2-1024x692.png) --- # [EN] Antigravity 2.12.0 Introduces the /boost Command - URL: https://ye-yu.com/en/blog/antigravity-2-12-0-boost-command - Date: 2026-09-03 - Category: Coder - Chinese Version: https://ye-yu.com/blog/antigravity-2-12-0-boost-command ![](/images/posts/2026/09/img-mtlqlj31og8a.jpg) Both `/boost` and `/teamwork-preview` represent advanced execution paradigms in Antigravity for tackling sophisticated engineering tasks. However, they differ fundamentally in **architectural focus, team topology, and upfront alignment**: --- ### 1. Core Positioning and Target Scenarios | Dimension | `/boost` (Deep Hardening / Focused Delegation) | `/teamwork-preview` (Multi-Agent Teaming / Systems Projects) | | :--- | :--- | :--- | | **Primary Focus** | **Vertical Depth**: Solves singular, highly complex tasks requiring sustained deep reasoning and exhaustive verification. | **Horizontal Scale**: Coordinates large, cross-module systems requiring multi-role specialization or massive parallel exploration. | | **Use Cases** | • Complex architectural refactoring and non-trivial algorithms
• Elusive bug root-cause analysis, deadlock/perf troubleshooting
• Single-topic technical investigations and strict trade-off evaluations | • Green-field system builds from 0 to 1 (e.g., compilers, full-stack web applications)
• Formal theorem verification and large-scale parallel search
• Comprehensive multi-stakeholder technical documentation reviews | | **Agent Topology** | Orchestrator delegating to specialized deep agents:
• `DeepCoder` (laser-focused implementation)
• `DeepInvestigator` (root cause & empirical verification) | Dynamic multi-agent team tailored to project archetype:
• Review panels / formal verification pipelines
• Massive parallel exploration swarms (scaling to dozens/hundreds of agents)
• Modular development and adversarial auditing squads | --- ### 2. Workflow and Interaction Differences #### `/boost`: Rapid Routing and Autonomous Convergence * **Zero Front-Loaded Bureaucracy**: The Orchestrator automatically selects Solo vs. Delegation execution without requiring extensive requirement negotiation. * **High-Fidelity Goal Handoff**: Delegates the exact context directly to deep subagents without forcing users into rigid specification templates. * **Iterative Verification Loop**: Once the worker completes a draft, the orchestrator acts as a strict adversary—challenging edge cases and driving extra correction turns until requirements are fully satisfied. #### `/teamwork-preview`: Rigorous Specification and Acceptance Contracts * **Two-Phase Methodology**: Enforces a strict boundary between **(1) Prompt Engineering & Contract Definition** and **(2) Formal Autonomous Launch**. * **Anti-Self-Certification**: Interactively drafts objective acceptance criteria and guardrails to prevent agent teams from prematurely declaring success without verification. * **Artifact-Driven State**: Actively maintains a structured `prompt_draft.md` draft artifact before commissioning multi-agent swarms. --- ### 3. Rule of Thumb * Choose **`/boost`** when you have a **single tough nut to crack** (a gnarly bug, a delicate refactor, or complex algorithms) and need an expert agent to drill deep and stress-test the solution. * Choose **`/teamwork-preview`** when you are **kickstarting an expansive system project** or parallel exploratory workload where defining explicit acceptance criteria and coordinating diverse sub-agents is crucial. ![](/images/posts/2026/09/img-mtlq5vzw6xx5.jpg) --- # [EN] Gemini Stealth-Launches 3.8 Flash: Google's Release Cadence Is Accelerating - URL: https://ye-yu.com/en/blog/gemini-3-8-flash-stealth-release - Date: 2026-09-02 - Category: Coder - Chinese Version: https://ye-yu.com/blog/gemini-3-8-flash-stealth-release Today, on a whim, I asked Gemini on the web app what model it was running. Its response directly identified itself as **Gemini 3.8 Flash**. Curiously, the bottom-right badge still displayed "Flash," while the top dropdown selector still read 3.7. When I pressed it on why the UI was out of sync, it explained the architectural reality matter-of-factly: frontend copy and cached assets hadn't updated yet, but backend request routing had already been switched over to the newer model. No launch tweets, no official blog posts—a classic dark launch in production. --- ![](/images/posts/2026/09/img-mtjvebm8351v.jpg) ### What Does This Screenshot Reveal? Looking at the model's self-explanation, it aligns closely with standard canary deployment practices in large-scale web services: 1. **Frontend-Backend Decoupling**: Static UI labels follow longer deploy cycles, whereas backend model routing and A/B test experiments can shift dynamically on the fly. 2. **Progressive Rollout**: If you ask now, some sessions might still resolve to 3.7, while new chat sessions or assigned experiment cohorts route to 3.8. Once again, this release targets the **Flash** tier. As the lightweight, low-latency, and cost-efficient member of the family, Flash is designed for daily automation and rapid back-and-forth tasks. Google uses Flash to deploy iterative optimizations directly into real production traffic to evaluate performance at scale. --- ### An Unusually Fast Release Rhythm Looking back at Gemini's trajectory over the past six weeks, the velocity is unmistakably different: * **Late July**: Gemini 3.6 Flash rolled out. * **Mid-August**: Gemini 3.7 Flash launched roughly three weeks later. * **Early September**: Gemini 3.8 Flash is already running live in canary buckets, under three weeks after 3.7. Jumping two sub-versions (from 3.6 to 3.8) in just over a month highlights two broader shifts: 1. **Point Releases Are Becoming Agile Sprints** In the early days of LLMs, a dot release (like 3.0 to 3.5) signified structural architectural shifts or substantial benchmark jumps. Today, a .x increment functions more like a bi-weekly agile sprint: refinement of alignment, localized data supplements, or targeted fixes for specific domains, shipped as soon as quality gates pass. 2. **Flash as the Innovation Proving Ground** Compared to compute-intensive, high-cost models like Pro or Ultra, Flash has near-zero barrier to entry and minimal latency. Google clearly favors deploying high-frequency improvements to Flash first to validate behavior against massive interactive volumes. --- For developers relying on models for daily programming, workflow automation, or accelerated research, continuous incremental tuning provides a noticeably smoother curve. You might not see dramatic leaps overnight, but under the hood, the foundation is continuously evolving. Try asking your own web session what version it is running to see which canary pool you've landed in. --- # [EN] Fixing Frequent Chrome DevTools MCP Permission Prompts in Google Antigravity - URL: https://ye-yu.com/en/blog/fix-antigravity-chrome-devtools-mcp-permission-prompt - Date: 2026-08-23 - Category: Coder - Chinese Version: https://ye-yu.com/blog/fix-antigravity-chrome-devtools-mcp-permission-prompt ![](/images/posts/2026/08/img-mt55rurq4vp8.jpg) When using Google Antigravity (or the Gemini agent environment) for frontend debugging and web automation, many developers configure and enable the Chrome DevTools MCP plugin. In practice, however, you may encounter an annoying loop: **even after selecting "Yes, and always allow" every time a dialog appears, new permission prompts continue to pop up every couple of steps.** This post explains the underlying cause and the one-line configuration that permanently resolves it. --- ## Problem Description While an agent executes web workflows, confirmation prompts frequently interrupt execution: ```text Allow using this MCP tool? chrome-devtools/list_network_requests 1. Yes, allow this time 2. Yes, and always allow in this conversation 3. Yes, and always allow in this project 4. Yes, and always allow 5. No (tell the agent what to do instead) ``` Even if you choose `4` (globally allow forever), another dialog appears the moment the agent attempts to inspect console logs, take a screenshot, or click a button. --- ## Why Does It Still Prompt After Choosing "Always Allow"? **The issue lies in permission granularity.** When you choose `4. Yes, and always allow`, Antigravity adds only the **specific invoked sub-tool** to your allowlist: - `mcp(chrome-devtools/list_network_requests)` - `mcp(chrome-devtools/evaluate_script)` However, the Chrome DevTools MCP suite exposes more than 20 distinct tools (`click`, `fill`, `hover`, `navigate_page`, `take_snapshot`, `get_console_message`, `lighthouse_audit`, etc.). During a multi-step workflow, an agent dynamically invokes different sub-tools as needed. Whenever it calls a tool that hasn't been individually whitelisted yet, the confirmation dialog triggers anew. --- ## Solution: Authorize the Entire MCP Server The fix is straightforward: grant permission at the **MCP server level** rather than the individual sub-tool level. ### Steps 1. Open your global configuration file: - Path: `~/.gemini/config/config.json` 2. Locate the `userSettings.globalPermissionGrants.allow` array. 3. Add `"mcp(chrome-devtools)"` to the array. Example configuration: ```json { "userSettings": { "globalPermissionGrants": { "allow": [ "mcp(chrome-devtools)", "command(git log)", "command(npm run)" ] } } } ``` ### Comparison | Permission Format | Scope | Use Case | | :--- | :--- | :--- | | `mcp(chrome-devtools/navigate_page)` | Single sub-tool only | Strict boundaries (e.g., read-only inspection tools) | | `mcp(chrome-devtools)` | **All** tools under this MCP server | Fully trusted server, zero interruptions across sub-tools | --- ## Additional Tips 1. **Universal across MCP servers**: If you integrate other custom or third-party MCP servers (like local shell runners or SSH managers), you can apply the same `mcp()` wildcard pattern to bypass prompts entirely. 2. **Project-scoped overrides**: If you prefer not to whitelist it globally, configure `permissionGrants` in the project-specific config file (`~/.gemini/config/projects/.json`) so it only applies within that repository. Changes take effect immediately without restarting Antigravity. Subsequent agent calls to any Chrome DevTools tool will execute smoothly without interruptions. --- # [EN] Six Cities: Which One Captures the Essence Best? - URL: https://ye-yu.com/en/blog/six-cities-which-one-is-most-vivid - Date: 2026-08-23 - Category: Editor - Chinese Version: https://ye-yu.com/blog/six-cities-which-one-is-most-vivid ![](/images/posts/2026/08/img-mt63st1omai8.jpg) ![](/images/posts/2026/08/img-mt63t9czepys.jpg) ![](/images/posts/2026/08/img-mt63u3z1b2nt.jpg) ![](/images/posts/2026/08/img-mt63ufe9pbtk.jpg) ![](/images/posts/2026/08/img-mt63uxxf44i9.jpg) ![](/images/posts/2026/08/img-mt63v3h7ue1y.jpg) Interpret the unique visual identity of [City Name] and construct each composition around five core elements: - A recognizable architectural feature, landmark, or skyline silhouette. - A distinctive local mode of urban transit. - A subtle, intimate moment of everyday street life. - Native vegetation, local terrain, or environmental atmosphere. - A compositional perspective and angle that naturally belongs to the city. The overall scene architecture must vary distinctly across cities, deliberately avoiding repetitive object placement or templated visual formulas. --- # [EN] macOS Golden Gate 27.0 Beta 2: Fixing appstoreagent at 100% CPU with SIGSTOP - URL: https://ye-yu.com/en/blog/macos-golden-gate-27-0-beta-2-fixing-appstoreagent-at-100-cpu-with-sigstop - Date: 2026-07-04 - Category: Coder - Chinese Version: https://ye-yu.com/blog/macos-golden-gate-27-0-beta-2-fixing-appstoreagent-at-100-cpu-with-sigstop ## 1\. Symptoms After upgrading to macOS Golden Gate 27.0 Developer Beta 2 (Build 26A5368g), my MacBook began running extremely hot and the battery drained rapidly. I checked the process status in Terminal: ```bash $ ps aux | grep appstoreagent 19002 107.0 0.1 488771680 25088 ?? R 12:20AM 14:55.36 /System/Library/PrivateFrameworks/AppStoreDaemon.framework/Support/appstoreagent ``` Even though the App Store app was not open, the `appstoreagent` daemon continuously consumed more than 100% of one CPU core. Force-quitting it did not help: the process was relaunched immediately and returned to full load. * * * ## 2\. Tracing the Logs and Finding the Root Cause To identify the actual failure, I queried macOS Unified Logging for messages from this process: ```bash $ /usr/bin/log show --predicate 'process == "appstoreagent" and eventMessage contains "recent_launch_times"' --last 5m ``` The command produced the following error: ```bash 2026-07-04 00:34:55.462135+0800 0x7969e Error 0x0 19002 0 appstoreagent: (libsqlite3.dylib) [com.apple.libsqlite3:logging] no such column: active_launch_events.recent_launch_times in "SELECT active_launch_events.ROWID, active_launch_events.bundle_id, active_launch_events.containing_bundle_id, active_launch_events.event_source, active_launch_events.is_extension, active_launch_events.launch_end_time, active_launch_events.launch_start_time, active_launch_events.recent_launch_times, active_launch_events.timestamp, active_launch_events.payload FROM active_launch_events" ``` ### What the error indicates * **Root cause:** while macOS Golden Gate 27.0 Beta 2 builds or migrates the security database schema in memory, its upgrade migration appears to omit the `recent_launch_times` column from the physical `active_launch_events` table. * **Why CPU usage spikes:** because the column is missing, the underlying SQLite query repeatedly throws a `no such column` error. After catching the error, `appstoreagent` immediately retries at high frequency with no delay, creating a query-fail-retry loop that saturates one CPU core. * * * ## 3\. Why a Normal Kill Does Not Fix It On macOS, `appstoreagent` is a user agent managed by the system’s root `launchd` daemon. When you force-quit it with `kill -9`: 1. The process exits and briefly releases the CPU. 2. `launchd` detects that the managed service exited unexpectedly and immediately relaunches it. 3. The new `appstoreagent` instance runs the same database initialization query, hits the missing-schema error again, and returns to 100% CPU usage. Force-quitting the process therefore creates a repeated launch-crash-relaunch cycle, adding system overhead and generating large volumes of logs. * * * ## 4\. A SIGSTOP / SIGCONT Workaround Because the system’s read-only volume is protected by SIP (System Integrity Protection), a regular user cannot directly repair the underlying database schema. A temporary behavioral workaround is therefore the practical option. The strategy is to control the process with signals and **suspend it**. * Send `SIGSTOP`: this places the process in the `T` (stopped) state. macOS stops scheduling CPU time for it, so **CPU usage immediately falls to 0%**. Crucially, `launchd` still considers the process alive and does not relaunch it. * Send `SIGCONT`: when you need the App Store, this signal resumes the process immediately so downloads and updates can work normally. The following Python 3 daemon, `guardian.py`, automates this behavior: ```python #!/usr/bin/env python3 import subprocess import time import os import sys import signal def get_pids(process_name): """Return all PIDs for the specified process name.""" try: output = subprocess.check_output(["pgrep", "-x", process_name], text=True) return [int(pid.strip()) for pid in output.strip().split("\n") if pid.strip()] except subprocess.CalledProcessError: return [] def is_app_store_running(): """Check whether the App Store GUI client is running.""" return len(get_pids("App Store")) > 0 def get_process_state(pid): """Return the process state. 'T' means stopped; other values mean running.""" try: output = subprocess.check_output(["ps", "-o", "state", "-p", str(pid)], text=True) lines = output.strip().split("\n") if len(lines) > 1: return lines[1].strip() except subprocess.CalledProcessError: pass return None def main(): print(f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] appstoreagent guardian daemon started.") while True: try: agent_pids = get_pids("appstoreagent") app_store_active = is_app_store_running() for pid in agent_pids: state = get_process_state(pid) if not state: continue # Resume appstoreagent when the App Store is open and the process is stopped. if app_store_active: if 'T' in state: print(f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] App Store is running. Resuming appstoreagent (PID {pid})...") os.kill(pid, signal.SIGCONT) # Suspend appstoreagent when the App Store is closed and the process is running. else: if 'T' not in state: print(f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] App Store is closed. Suspending appstoreagent (PID {pid}) to save CPU...") os.kill(pid, signal.SIGSTOP) except Exception as e: print(f"Error in guardian loop: {e}", file=sys.stderr) time.sleep(5) if __name__ == "__main__": main() ``` * * * ## 5\. Running the Guardian Silently with launchd To keep the guardian running silently in the background, package it as a macOS Launch Agent. ### 5.1 Create the Configuration File Create `com.user.appstoreagent-guardian.plist` locally: ```xml Label com.user.appstoreagent-guardian ProgramArguments /usr/bin/python3 -u /path/to/guardian.py RunAtLoad KeepAlive StandardOutPath /path/to/guardian.log StandardErrorPath /path/to/guardian.err ``` > \[!WARNING\] Replace `/path/to/guardian.py` and the other example paths with absolute paths on your Mac. The `-u` option is strongly recommended so Python writes unbuffered output to `guardian.log` immediately. ### 5.2 Load and Activate the Service 1. Make the guardian script executable: `chmod +x /path/to/guardian.py` 2. Copy the configuration file into the user’s LaunchAgents directory: `cp com.user.appstoreagent-guardian.plist ~/Library/LaunchAgents/` 3. Load and bootstrap the guardian with `launchctl`: `launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.user.appstoreagent-guardian.plist` 4. Verify the service status: `launchctl print gui/$(id -u)/com.user.appstoreagent-guardian` If the output shows `state = running` and the expected PID, deployment succeeded. While the App Store is closed, `appstoreagent` should appear as `T` (stopped) in `ps aux`, with CPU usage holding at **0.0%**. Opening the App Store immediately wakes the process so it can provide normal service. ### 5.3 Remove the Service After Apple ships a later beta that fixes the schema-migration bug, remove this temporary guardian with the following commands: ```bash # Stop the background service launchctl bootout gui/$(id -u)/com.user.appstoreagent-guardian # Remove the configuration file rm ~/Library/LaunchAgents/com.user.appstoreagent-guardian.plist ``` --- # [EN] Chengdu in 3D Miniature - URL: https://ye-yu.com/en/blog/chengdu-in-3d-miniature - Date: 2025-12-14 - Category: Coder - Chinese Version: https://ye-yu.com/blog/chengdu-in-3d-miniature ![](/images/posts/2025/12/cd-1.jpg) ![](/images/posts/2025/12/cd-2.jpg) ![](/images/posts/2025/12/cd-3.jpg) --- # [EN] Securely Access Remote Synology SSH Using Cloudflare Tunnel - URL: https://ye-yu.com/en/blog/securely-access-remote-synology-ssh-using-cloudflare-tunnel - Date: 2025-07-12 - Category: Coder - Chinese Version: https://ye-yu.com/blog/securely-access-remote-synology-ssh-using-cloudflare-tunnel Do you have a Synology NAS in a remote location (like your home or office) and wish you could securely manage it via SSH just like you would locally, no matter where you are? This guide documents how to achieve this using Cloudflare Tunnel (a Zero Trust tunnel). **Advantages of using Cloudflare Tunnel:** * **No Public IP Required**: Even if your Synology NAS is behind a complex internal network, you don’t need to worry about having a public IP address. * **No Open Ports**: You don’t need to configure any port forwarding on your router. This significantly enhances security by preventing your SSH port from being exposed to malicious scans on the public internet. * **Highly Secure**: All traffic is encrypted and protected through Cloudflare’s global network, and you can benefit from its powerful DDoS protection capabilities. * **Stable and Free**: Cloudflare offers a generous free plan for personal users, which is more than sufficient for remote SSH management needs. **Prerequisites:** 1. **A Synology NAS**: You must know its administrator account and password. 2. **Your own domain name**: For example, `yourdomain.com`. You must be able to change this domain’s DNS settings. ### **Part One: Cloud-Side Setup on Cloudflare** In this part, we will create a tunnel in the Cloudflare dashboard and obtain the token required for the connection. #### **Step 1.1: Add Your Domain to Cloudflare** If your domain is not yet managed by Cloudflare, first log in to the [Cloudflare website](https://dash.cloudflare.com/), click “Add a Site,” and follow the instructions to add your domain. This usually requires you to change your domain’s Name Servers to the addresses provided by Cloudflare in your domain registrar’s settings. #### **Step 1.2: Enter the Zero Trust Dashboard** On the main Cloudflare dashboard, select **Zero Trust** from the left-hand menu. The first time you enter, you may need to select a free plan and set up a team name. #### **Step 1.3: Create a Tunnel** 1. In the Zero Trust dashboard, select **Access** -> **Tunnels** from the left-hand menu. 2. Click the **Create a tunnel** button. 3. Give your tunnel an easily recognizable name, such as `synology-nas`, and then click **Save tunnel**. #### **Step 1.4: Get and Save the Connector Token** After creating the tunnel, you will see a “Choose your environment” page. This page provides commands to install the connector (`cloudflared`) on different operating systems. **This is a very crucial step!** In the command box on the right, you will see a full installation command, similar to `cloudflared service install ey...`. You only need to copy the long, random-looking string that follows `install`. This is your tunnel token. Please copy this token completely and save it in a safe place, as we will need it on the Synology NAS shortly. ### **Part Two: Installing and Configuring the Tunnel on Synology NAS (Package Center Version)** Now, we will use the more convenient Package Center method to install the `cloudflared` software on your Synology NAS and connect it to Cloudflare. #### **Step 2.1: Add a Third-Party Package Source** 1. Log in to your Synology DSM desktop and open the **Package Center**. 2. Click the **Settings** button in the upper-right corner. 3. In the pop-up window, select the **Package Sources** tab. 4. Click **Add**, enter `SynoCommunity` in the “Name” field, and enter the following address in the “Location” field: `https://packages.synocommunity.com` 5. Click **OK** to save. #### **Step 2.2: Install Cloudflared from the Package Center** 1. Return to the main Package Center interface and select **Community** from the left-hand menu. 2. In the search box in the upper-right corner, type `Cloudflared` and search. 3. Find the `Cloudflared` package and click **Install**. 4. Wait for the installation to complete. This step automatically handles user, permission, and background service configurations. #### **Step 2.3: Configure the Tunnel Token** 1. After installation, find `Cloudflared` in the Package Center and click **Open**. 2. The package’s configuration interface will be very simple, usually with an input box prompting you to enter the **Tunnel Token**. 3. Paste the long **token string** you copied from the Cloudflare dashboard in **Step 1.4** completely into this input box. 4. Click **Apply** or **Save**. The package will automatically start in the background and use your token to connect to Cloudflare’s network. #### **Step 2.4: Verify the Connection and Point it to the SSH Service** 1. Go back to the Cloudflare Zero Trust dashboard in your browser. Refresh the page, and you should see your connector status display as **“Connected”** on the tunnel configuration page. If so, your Synology NAS has successfully connected to the cloud! 2. Now, let’s tell the tunnel to forward incoming requests to the Synology’s SSH service. Click the **Public Hostnames** tab. 3. Click **Add a public hostname**. 4. Fill out the rule: * **Subdomain**: Enter a subdomain you like, e.g., `ssh` or `nas .` * **Domain**: Select your domain. * **Path**: Leave this blank. * **Service**: * **Type**: **You must select `SSH`**. * **URL**: Enter `localhost:22` (where `22` is the default port for the Synology SSH service). 5. Click **Save hostname**. At this point, all server-side configuration is complete! ### **Part Three: Configuring the SSH Client on Your Computer** For the final step, we need to configure the SSH client on your own computer so it knows how to connect through the Cloudflare Tunnel. #### **Step 3.1: Install `cloudflared` on Your Computer** Your computer also needs this tool installed to act as a “client-side proxy.” You might wonder why you need to install it on your computer if it’s already on the Synology. This is because they play different roles: the `cloudflared` on your Synology NAS is responsible for securely “sending” the internal service to the cloud, while the `cloudflared` on your computer is responsible for securely “bringing” your SSH command to the cloud. They shake hands in the cloud to form a complete, encrypted channel. * **Official download link**: [https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/) * Please download and install it according to your operating system (Windows/macOS/Linux). For example, on macOS, it’s recommended to use Homebrew: `brew install cloudflared`. #### **Step 3.2: Modify Your Local SSH Configuration File** This is the key step that makes the magic happen. 1. Open your computer’s SSH configuration file with a text editor. It is usually located at `~/.ssh/config` (macOS/Linux) or `C:\Users\YourUsername\.ssh\config` (Windows). If the file or directory does not exist, please create it manually. 2. **Add** the following configuration block to the file:`# Connect to Synology NAS via Cloudflare Tunnel Host ssh.yourdomain.com ProxyCommand /opt/homebrew/bin/cloudflared access ssh --hostname %h` 3. **Be sure to modify the following**: * `Host ssh.yourdomain.com`: Replace `ssh.yourdomain.com` here with the **full hostname** you set up in **Step 2.4**. * `/opt/homebrew/bin/cloudflared`: Replace this with the **actual installation path** of `cloudflared` on your computer. You can find it by typing `which cloudflared` (macOS/Linux) or `where.exe cloudflared` (Windows) in your terminal. ### **Part Four: Time to Connect!** All configurations are complete! Now, no matter where you are, just open your computer’s terminal and type the familiar SSH command: ```bash ssh [your_synology_username]@ssh.yourdomain.com ``` (Please replace `ssh.yourdomain.com` with your own hostname) You will find that the system prompts you for your password as usual. After successful authentication, you have successfully logged into your remote Synology NAS! ### **Conclusion and Troubleshooting** Congratulations! You have successfully built an extremely secure and convenient path back to your NAS. * **Q: What should I do if the connection times out or fails?** A: First, go back to the Cloudflare Zero Trust tunnel management page and confirm that your tunnel connector has a green “Connected” status. If not, try restarting the Cloudflared package in the Synology Package Center. If the status is normal but you still can’t connect, carefully check that the hostname and `ProxyCommand` path in your local `.ssh/config` file are completely correct. * **Q: I get a `Classic tunnels have been deprecated` error when connecting via SSH?** A: This is because the `ProxyCommand` in your SSH config file is outdated. Make sure you are using `cloudflared access ssh --hostname %h` and not the old `cloudflared tunnel ...` command. * **Q: When using `sudo`, it fails even with the correct password?** A: This is likely due to a mismatch between your local computer’s keyboard layout and the remote server’s layout, causing special characters (like `@`, `!`, `#`) to be entered incorrectly. You can use an “echo test” to verify or temporarily change your password to something simpler to resolve this. --- # [EN] Source Note: Ian Johnson’s Foreword to Faithful Disobedience - URL: https://ye-yu.com/en/blog/source-note-ian-johnsons-foreword-to-faithful-disobedience - Date: 2025-04-10 - Category: Editor - Chinese Version: https://ye-yu.com/blog/source-note-ian-johnsons-foreword-to-faithful-disobedience This page accompanies my Chinese translation of Ian Johnson’s foreword to *Faithful Disobedience: Writings on Church and State from a Chinese House Church Movement*. The original English text is copyrighted and is not reproduced here. Please consult the [published book](https://www.amazon.com/Faithful-Disobedience-Writings-Chinese-Movement/dp/1514004135/ref=sr_1_1) for the original foreword. About the author: [Ian Johnson’s official website](https://ian-johnson.com/). --- # [EN] Remembering My Mother in Hope - URL: https://ye-yu.com/en/blog/remembering-my-mother-in-hope - Date: 2025-02-14 - Category: Christian - Chinese Version: https://ye-yu.com/blog/remembering-my-mother-in-hope While I was still in a meeting, I received a call from my younger brother telling me our mother had passed away. I did not expect it to happen so quickly. During the Spring Festival, we had been in Chengdu. While video chatting with Mother, she seemed perfectly fine. I hastily booked a ticket and returned to my hometown in Shandong. My mother’s name was He Naixiang; she and my father were from the same village. The village had a beautiful name—Xilou (West Tower). However, its poetic name did not come from romantic imagery like “moonlight bathing the west tower.” Instead, legend says it originated from a landlord’s tower or blockhouse built by villagers with the surname He, hence initially called Hejia Lou (He Family Tower). Later, some villagers moved eastward, creating Donglou (East Tower), and the original settlement became Xilou. The tower itself disappeared long ago, yet the area is still colloquially known as “Lou Di” (Tower Bottom). My mother was born in this area called Lou Di. My maternal grandmother passed away very early; Mother was only two or three years old at the time. Grandfather raised her alone, and their life was very hard. Life was difficult for most families, let alone theirs. Later, Mother married my father from the same village. Their life was tough initially. Eventually, my father started driving a tractor, later taking out loans to buy another tractor for transportation, and their living conditions gradually improved. Good days did not last. In 1987, my father died in an accident; Mother was only 35. Thinking about it now, as a man in my forties, I can only imagine how painfully she endured that period. Perhaps since then, her asthma became severe. Later, my stepfather married my mother, moving into our home to help carry the family burden. My mother first had a little sister, who passed away before reaching six months. Then my younger brother was born. From junior high school onward, I lived at school, seldom staying home. Holidays in junior high were somewhat frequent, but in high school, I could only go home once a week, just for half a day. My memories of Mother are fragmented. As a child, I frequently asked about my birth. She told me when pregnant with me, my sister was not yet three, making me an illegal birth under the One-Child policy. Thus, she ran away, hiding at her aunt’s home. I no longer recall those details clearly. But these stories made watching shows like “Guerrilla against Birth Control” painful rather than comedic. Hiding with fear and anxiety, how could this be humorous? Some painful memories remain vividly etched. One year, Mother’s aunt came to visit and handed me ten yuan. I was in elementary school and had never seen so much money. After sending her off, I immediately headed to school with the ten yuan. Mother chased me for nearly two kilometers and took the money back. Recalling this incident now fills me with both sorrow and humor; Mother was still healthy back then. Mother had limited literacy; her teaching was simple yet practical. Our surname “He” was widespread in the village, and due to her low seniority, nearly everyone we met outside had to be addressed as “uncle,” “aunt,” or “grandparent.” Mother instructed us to respect elders, greeting everyone politely, regardless of age. In junior and senior high school, she encouraged me to study diligently; in university, to make good friends and avoid trouble; when I began working, to cooperate well with colleagues; when I married, she advised me to be gentle and kind. I rarely responded beyond agreeing. Conversations between Mother and me were limited. Her world consisted of neighbors and relatives; my life outside left me unfamiliar with these details. Likewise, my work and social circles were beyond her grasp. Each time I returned, mostly she spoke and I listened. I knew she cared deeply, and all I could say was, “I’m fine, don’t worry.” For over a decade, Mother’s health was frail. Asthma deteriorated into severe pulmonary heart disease. My stepfather, brother, and sister cared for her tirelessly. Born in 1952, according to our local age reckoning, she would be 74 this year. Without their painstaking care, she likely would not have survived these additional years. In August 2022, Mother’s condition worsened again. Hospitalized in Rizhao People’s Hospital, her prognosis seemed bleak. With strict pandemic restrictions in place, it was difficult for me to enter the hospital. When I finally saw her, she still recognized me. During her hospitalization, my wife shared joyful news of her pregnancy, which I told Mother. Perhaps coincidentally, Mother pulled through. The night before discharge, I stayed at Shuqi’s home; their child K had just been born. They even lent me their car to transport Mother back to Wulian from Rizhao. On that occasion, I once again shared the gospel with her, leading her in the prayer of acceptance, which she repeated after me word by word. > “Dear Jesus, I acknowledge I am a sinner and need you. You sacrificed yourself on the cross for me, saving my life. I repent and desire eternal life. In Jesus’ name, Amen.” I encouraged her to pray to Jesus in every difficult situation, simply saying, “Jesus, save me.” I assured her we would meet again in heaven one day. But I knew nothing about local churches. She had no subsequent pastoral care, follow-up, or baptism. Whenever I returned, I would only remind her of our hope and final destination. When Mother passed away, I contemplated arranging a Christian funeral through Rizhao’s church. But upon returning, I found my brother and sister had already made arrangements. Out of deep respect for them and immense cultural pressure, I complied with their wishes. Yet I hold this hope firmly in my heart—I believe Mother confessed with her mouth, believed in her heart, and was thus saved. ![](/images/posts/2025/02/IMG_7137-1-1024x576.jpg) West of the village lies a ridge. The day after the burial, the weather was clear. I captured the sunset’s glow from the rooftop. Seeing the sun still hanging above the western ridge, I drove quickly, hoping to catch one more photo. Yet, within mere minutes, by the time I arrived, the sun had already vanished. As a child, I gazed at the mountains in the east and ridges in the west, wondering what lay beyond. Once I walked eastward to Kunshan Mountain, though never reached its peak. Westward, I traveled as far as Mantangyu Village—my paternal aunt’s home and the ancestral place of an elder brother from our church in Chengdu. Seeking a broader world, I chose Sichuan University in Chengdu for college, nearly the farthest option available, requiring a two-to-three-day train journey. Nearly thirty years have passed; I’ve traveled extensively and experienced much. Yet unlike my wife, who dearly loves her hometown Harbin, I harbor less attachment to any specific place. I care deeply only for people. Wherever the ones I love reside, there my heart calls home. Even if they lived on Mars, I would regard Mars as my hometown. My sister said that in recent bedridden years, Mother often gazed outward through the window, perhaps yearning for a walk, perhaps awaiting visitors. I feel profound regret for not spending more time with her, sympathizing deeply with her soul trapped in a fading body. Now, Mother rests somewhere unknown to me. Yet I am certain her name is inscribed in the Book of Life, and one day, surely, we will reunite. In memory of my mother, He Naixiang (May 14, 1952 – February 8, 2025). --- # [EN] My Testimony of Faith in Christ - URL: https://ye-yu.com/en/blog/my-testimony-of-faith-in-christ - Date: 2025-02-02 - Category: Christian - Chinese Version: https://ye-yu.com/blog/my-testimony-of-faith-in-christ I was born in a rural area of Shandong. During my childhood, until I went to elementary school, we did not have electricity. What left a deep impression on me was that in the summer nights, people liked to cool off in the grain fields. I saw many starry skies there and heard many ghost stories. Among them were the famous “ghost hitting the wall” (a phenomenon where a person is inexplicably trapped, walking in circles and continually ending up back where they started, as though guided by an unseen force) and various ghost tales from *LiaoZhai ( a collection of ancient Chinese ghost stories)*. As a result, I was too scared to walk alone at night when I was young, always afraid of ghosts. ### The Story of My Father’s Death In the countryside, there are people who are said to be able to “communicate with spirits,” usually middle-aged or older women, whom we call “Shen Pozi” (spiritual mediums). When someone in the family falls ill or something bad happens, they often seek the help of these mediums. In March 1987, my father died in a tractor accident. On the third day after his death, a woman, my aunt, who was also a “Shen Pozi,” came to our home, suddenly collapsed to the ground, and started speaking to my mother. Her tone and the things she said sounded exactly like my father, and she spoke about many things only my parents knew. Everyone said that my father’s soul had possessed her, and I was terrified. There was another time when I witnessed my uncle being possessed by a ghost. His body and arms trembled at a speed far beyond what a normal person could do. It terrified me deeply. Therefore, from a very young age, I realized that there was another realm, the spiritual world, beyond what I could see with my eyes. These events were kept inside me, and I always tried to seek an explanation. ### My Scientific Explanation When I went to university, I took a first-year course called *Modern Technology*, which introduced the concept of entropy. I tried to use scientific principles to explain the phenomenon of ghost possession. I believed that each person has an energy field emitting signals, like a television tower. When the tower loses power, its signals can still linger, and if these signals are picked up by someone else, they might cause a reaction. Ghost possession, in my view, could occur when a deceased person’s energy is received by someone else, resulting in the effect of possession. I felt good about my explanation; it seemed logical. ### The Paranormal Event in 2004 However, a few years after I graduated from university, I had an experience where I saw a ghost. In the fall and winter of 2004, for a period of time, every night when I lay in bed and closed my eyes, I could feel a dark shadow at the foot of my bed. When I opened my eyes, I saw nothing. The feeling was very real, and it terrified me; I couldn’t sleep the entire night. I worried that it might be a mental issue, so I inquired and heard that a philosophy professor who had just returned from France, studying under a master of psychoanalysis, had opened a clinic at Sichuan University. I contacted him and went. This professor’s clinic was located in the faculty dormitory area of Sichuan University, and there was a reclining chair in the room that could be adjusted to any position. The process had no set procedure—he just let me talk, whatever I wanted to say, without offering any feedback. After I finished speaking, he would simply tell me to come again next time, charging fifty yuan per session. On the third visit, I arrived on time, but the professor opened the door and said my time was up. He asked me to pay another fifty yuan. I paid, feeling resentful, and decided not to return. When I was in college, my dorm was on the same floor as the philosophy department, so I was familiar with many of the philosophy students. Many of my friends were preparing for graduate school, so I went to ask them for advice. One of them, a Buddhist, said that reciting the *Diamond Sutra* would help calm the situation. So, I started reciting: “Thus I have heard. At one time, the Buddha was staying in the country of Shravasti…” But even though I recited it, the situation did not improve. ### Bible Study There was a graduate student in the philosophy department, named Wang, who was studying Christianity. Previously, a Korean student had preached the gospel to me, but I didn’t feel anything. One day, while having a meal with Wang, I asked him if the Christian God could control Chinese ghosts. He didn’t answer directly but shared many testimonies of Christians driving away ghosts and invited me to a Bible study held at an office in the campus every week. I went and started attending the study, and through it, I learned that there is one God, and indeed only one God. Around the same time, a debate between a Christian apologist Gideon ( 基甸) and the scientist Fang Zhouzi (方舟子) was published in *New Threads* (a Chinese publication), and besides attending Bible study weekly, I also watched their debates daily. I started seeing the flaws in evolutionary theory from a scientific perspective and tried to find the evidence for God’s existence, which shattered my previous “scientific view.” There was one example that I still remember vividly: We say that cameras are designed based on the principle of how the human eye works. Yet, while we believe a camera must be designed and created by someone, the human eye, which is far more sophisticated than a camera, doesn’t need any design—it naturally forms in nature. This is very unscientific. Before long, I could no longer see that shadow at the foot of my bed, and my ghostly encounters problem were over. ### Quitting Smoking I started smoking after graduating from high school, smoking heavily—about three packs every two days. My ex-girlfriend also wanted me to quit, and I wanted to as well. I tried to quit eight or nine times, but it was always very difficult, with my longest period being a month. One time, after Bible study, I went downstairs and lit a cigarette. A brother saw me smoking and said, “Brother Ye, your body is the temple of the Holy Spirit. How can you burn fire in the temple?” I felt deeply ashamed and decided to quit smoking before my baptism, asking others to pray for me. One day, I was in my office, looking at a website called *Chinese* *Christian Life Web* (which still exists today, cclw.net). The site had a story about a Christian who wanted to quit drinking. He threw away all the alcohol he had collected. At that moment, I seemed to hear a voice, or maybe it wasn’t a voice, but an awareness or command that said, “Throw the cigarettes on your desk into the trash can.” I did as instructed. It was a very miraculous experience. From that day on, whenever I smelled cigarette smoke, I felt disgusted and had no desire to smoke. Twenty years have passed now, and while I may occasionally smoke a few cigarettes to accompany someone, I no longer have a craving. I generally don’t urge others to quit smoking because I know it’s really hard, and for me, it was God’s grace. He helped me quit in a miraculous way, so I don’t feel comfortable asking others to quit. I pray that God will help those brothers bound by nicotine addiction and that He may personally assist them. ### Baptism ![](/images/posts/2025/02/P3270018-1024x768.jpg) 2005-03-27 On March 27, 2005, Easter, I was baptized in the Fuhe River upstream from Sandao Yan and officially became a Christian. This March marks exactly twenty years. Over these years, I’ve encountered many events—some that require rational understanding and others that defy explanation and must be accepted in faith. There have also been times when I doubted God, but through my experience of faith and the wonderful miracles He has given me, these graces have confirmed my belief and I no longer waver between faith and doubt. My testimony may not be very rational, and it may not align with the style of Early Rain Covenant Church (ERCC). But God’s way of choosing people is wondrous, and everyone’s path is different. My path seems to be—between science and superstition, fear of ghosts led me to become a disciple of Jesus. Thanks be to God for His selection, glory be to Him forever. --- # [EN] My son Ye Jiale - URL: https://ye-yu.com/en/blog/my-son-ye-jiale - Date: 2023-03-31 - Category: Father - Chinese Version: https://ye-yu.com/blog/my-son-ye-jiale March 15th marks the birthday of my son, Ye Jiale. If he were still alive, he would have turned seven years old. ### pregnancy In July 2015, my wife was found to be pregnant. In early 2016, while I was at work one morning, I received a call from my wife informing me that the hospital had detected a problem of the baby with the fetal heart’s aortic valve during a check-up. At that time, she was already seven months pregnant. Later, we went to Anzhen Hospital in Beijing, where the issue was diagnosed. ![](/images/posts/2023/03/IMG_2905-1024x768.jpg) At that time, my wife was hesitant about whether or not to have the child. I encouraged her and said that the sovereignty over the child belonges to God, not us. What God gives, God will take care of. If we reject the child, the guilt will fall upon us. So we encouraged and supported each other to welcome the birth of our child. We named him Ye Jiale, which means “may he be rewarded by God for his joy” in Chinese. ### Birth ![](/images/posts/2023/03/mmexport1458027999101-edited.jpg) Just two hours after he was born, we had to transfer him to another hospital because the one where we gave birth didn’t have an ICU. We consulted some pediatric experts and found that during the newborn stage, there was no intervention available for aortic valve stenosis. However, the hospital was afraid of taking responsibility and refused to keep him. With the accompaniment of Pastor Li Xiangxue and teacher Li Xiaodong from our church, I left the hospital carrying Ye Jiale. We ran halfway across Beijing and eventually decided to take him home. It was a difficult decision, but it was the best one for him because subjecting a newborn to meaningless treatments and separating him from his parents would have been cruel. ### Treatment During that time, he also went through a relatively long period of jaundice. Later, we admitted him to Peking University Hospital where the doctors issued a critical illness notice. One day, while we were registering for his hospital stay, I accidentally pushed him into a Catholic church, where we took a photo together and prayed. After some time, he miraculously recovered, and we were happy that the doctor’s diagnosis was wrong. ![](/images/posts/2023/03/黄与病.jpg) ### JOY When our baby was 100 days old, we planned a DIY photo shoot. ![](/images/posts/2023/03/百天.jpg) In the summer, we went back to grandpa and grandma’s house, took a walk together by the Songhua River, and also visited the Sophia Church. ![](/images/posts/2023/03/去哈尔滨.jpg) In the autumn, we went on a barbecue and autumn outing with brothers and sisters from the church. ![](/images/posts/2023/03/顺义秋游.jpg) Ye Jiale and I often had a lot of interactions. ![](/images/posts/2023/03/互动.jpg) I just found out that he has a slight “lazy eye,” but so what? When he looks into my eyes, my heart melts. Spring has come again in the blink of an eye, and on March 15th, his birthday, we took him to buy a toy car, played at Chaoyang Park, and had a birthday meal together. ![](/images/posts/2023/03/生日.jpg) ### Admission to hospital. Finally, not long after his first birthday, due to a minor cold, he had difficulty breathing and was admitted to the children’s hospital. The severity of his condition far exceeded our imagination. We had previously envisioned surgery for him when he was a few years old, but this time, the doctor quickly gave us a critical illness notice. ![](/images/posts/2023/03/IMG_0578-1024x768.jpg) On March 29th, the doctor said he had to be transferred to the pediatric ICU, and we saw him cry bitterly when he left us, which broke our hearts. But that was not the most desperate moment yet. ### Despair In less than half an hour, the ICU doctor called us for a meeting. The doctor said that now all treatments were meaningless, and hoped that we could take him home. They even suggested preparing a few bags of oxygen for us to use on the way home. If he stopped breathing on the way, we could go to a nearby hospital to get a death certificate. We were grateful for the doctor’s decision, and didn’t want him to walk the rest of his life alone in the hospital. This was the longest road I had ever walked. I drove in front, while my wife held him in the back seat, crying and shouting his name, trying to keep him conscious. At the same time, we called all of our relatives and church brothers and sisters to come and say goodbye to him. That night, all of our relatives gathered. We asked the pastor to baptize him. The moment of farewell had finally arrived. ### LEAVING On March 30, 2017, my son stopped breathing at home and ended his labor. That day, God gave me three marks of comfort and hope. First, at the moment of Lele’s passing, I remembered two occasions when he often cried and refused to sleep at night, and I treated him poorly because of my exhaustion, and even spanked him. I told him, “Daddy’s attitude was not good, and I hit you. I’m sorry. Please forgive Daddy.” His breathing was rapid and heavy at the time, but he responded with a loud “yes.” My child, Ye Jiale, really forgave me. Second, after he stopped breathing, I went to his room and saw that his mouth was upturned with a smile. Third, on that day, God spoke to us through reading the Bible, and it became our greatest comfort. > Truly, I say to you, unless you turn and become like children, you will never enter the kingdom of heaven. Whoever humbles himself like this child is the greatest in the kingdom of heaven. > > (Matthew 18:3-4 ESV) ![](/images/posts/2023/03/IMG_0580-576x1024.png) ### farewell On April 1st, 2017, we held a memorial service for Ye Jiale at our church in Beijing. Many people came together to bid him farewell. ![](/images/posts/2023/03/送别-1024x576.jpg) Thank you for loving me. Going to heaven is not a permanent goodbye. Our Heavenly Father loves you, and if you believe in Jesus, we will see each other again. Ye Jiale 2016.3.15-2017.3.30 ![](/images/posts/2023/03/追思1-1024x576.jpg) Someone asked us, do we regret giving birth to him? No, we don’t regret it. We are especially grateful that Lele brought us 1 year and 15 days of joy. The length of life, whether it’s a day, a year, or a hundred years, is just a moment in eternity. The Bible says, “You do not even know what will happen tomorrow. What is your life? You are a mist that appears for a little while and then vanishes.” The world will eventually forget the name of Lele, but his name is written in the Book of Life. As parents, isn’t our lifelong effort to bring our children before God and give them eternal life? On Christmas Day of 2016, we wrote him a card, hoping that he would live well for the glory of the Lord. ![](/images/posts/2023/03/IMG_2904-1024x768.jpg) Now that he’s no longer on this earth, may the glory of God be upon him. ### IN CHENGDU Do we miss him? Yes, we do. Every day. Is it hard? Of course it is. Sometimes we cry when we look at his pictures and videos. Are there moments of joy? Yes, there are. We find comfort in knowing that he is safe in God’s hands, and that he is doing better than we could ever imagine. After we came to Chengdu from Beijing, the experience of Ye Jiale also helped many families who lost their children, such as the family of Yangbiao and Xiaolan, who lost their son Zimi, and the family of Zhongge and Hailing, who lost their son Li Zhuoqian. ![](/images/posts/2023/03/IMG_5122-1024x683.jpg) On the memorial service of Brother Li Zhuoqian, I wrote the following prayer: > … My son, Ye Jiale, was my helper. In the past, my flesh was heavy and I was attached to earthly things, and did not long for the kingdom of God. After my son left, whenever I think of him, I feel that I should serve Lord more, and I hope that through my service, God’s kingdom will come quickly.。  > > For the world, the greatest success in one’s life is to live for a few decades, at most a hundred years. But for a person in Christ, the greatest success in life is to be able to go to heaven and bring others to heaven. Now, these two children in Jesus have achieved it… By the grace of Jesus, one day, we will meet them in heaven. I look forward to singing praises and serving together with them in heaven. Glory be to our Father GOD forever and ever. In Jesus’ name, amen. ### Afterwords On March 30th, 2023, exactly six years after the passing of Ye Jiale, God’s grace has allowed us to give birth to a younger brother. we have named him Ye Jiaxin(叶嘉信) – in the hope that he will receive God’s reward for his faith. --- # [EN] My Personal History with Television Media - URL: https://ye-yu.com/en/blog/my-personal-history-with-television-media - Date: 2022-10-04 - Category: Technician - Chinese Version: https://ye-yu.com/blog/my-personal-history-with-television-media After I came to Chengdu, I discovered that many brothers and sisters’ families did not have TVs installed in their homes for the sake of their children’s education. This was quite surprising to me, as I felt differently. Ever since I went to elementary school, I have liked watching TV after watching TV shows such as “**Journey to the West**” and “**Ikkyū-san**“. ### Black and white TV I remember that there were a total of two or three TVs in my village. When watching “Journey to the West”, a yard was filled with dozens or hundreds of people. In reality, without amplification, the sound was faint. From over ten meters away, you couldn’t make out details on the small 14-inch screen. What I loved was the atmosphere; what I yearned for was a glimpse into a larger world. ![](/images/posts/2022/10/lihuanying_tv-1024x466.jpg) The scene of watching TV in the movie “Hello Li Huanying” ### Color TV In the late 1980s, my stepfather brought a 14-inch color TV produced by Sichuan Changhong Factory, which finally ended the history of going to other people’s homes to watch TV. This type of television is terrestrial television, which is transmitted wirelessly and requires an indoor antenna or an outdoor antenna. This TV has 8 buttons for switching channels. The right side of the button can be opened, and the signal and color can be fine-tuned inside. I have been living on campus since I was in junior high school. I come back once or twice a week. When it was time to leave, I felt reluctant to part with the TV. I’d often linger to watch Shandong TV’s afternoon ‘advertising and literature’ segment before heading back to school. ![](/images/posts/2022/10/changhong14.jpg) ### Satellite TV I didn’t watch TV in high school, and I watched videos and movies in college. In 2005, I went to work in Beijing and became obsessed with satellite TV. At that time, I lived in the Mingguang Beili Community next to the Jimen Bridge on the North Third Ring Road. I had a balcony facing south, and the headquarters of China University of Political Science and Law was downstairs opposite. On a balcony less than two square meters, I began my journey into satellite TV enthusiasm. ![](/images/posts/2022/10/CIMG5074-768x1024.jpg) An antenna supported by an electric fan stand, the highest point is the tuner The main satellite receiver is dm500s. I forgot what model of the machine I used before. Many satellite TVs are not free and require a subscription card. The subscribe card is very expensive. Some subscribe cards on a satellite will cost about several hundreds dollars. In my country of piracy, they came up with a plan. Just buy a genuine card, put it on a server, and then all receivers connected to the Internet to read the account information on the genuine card. ![](/images/posts/2022/10/截屏2022-10-04-14.48.48.jpg) With this small dish antenna, I could probably receive signals from a few satellites. But I mainly receive programs on the Asia-Pacific 5C satellite at 138 degrees. On this satellite, there are several channels of BBC, CNN, HBO, CTITV, EBC, Phoenix TV, National Geographic, as well as CCTV. What I often watch is a gospel TV station in Taiwan – GOODTV. There is a Christian talk show “True Love Blog” that I often watch, and it is for some Christians to share their testimony. One episode featured an interview with a Christian named Jiang Ximing, titled ‘Rivers in the Desert’. Jiang played a live poem of his own creation (the video starts at 45 minutes and 11 seconds), and I still remember it now: > no longer go with the flow > > From now on, I will walk with the Lord, no longer go with the flow, I will turn back now, please love me, and no longer go with the flow > Lost, I didn’t know to turn back; Jesus pleaded for me. Henceforth, the prodigal returned; Jesus still loves me. True Love Blog” hosted by Li Jingyu The station also broadcasts many preaching programs, such as “Joel Osteen” ([](https://www.joelosteen.com/)[https://www.joelosteen.com/](https://www.joelosteen.com/) ). I later realized that this is the standard prosperity preaching exactly. Then why not use youtube? Youtube was only established in 2005, and there are not many program sources then. ### Maige box In 2012, an IPTV box called “Maige TV” became popular. I use its service from 1st generation to 3rd generation. Its general method is: collect some satellite TV or cable TV signal sources in Hong Kong, Taiwan or somewhere in the mainland china, and then broadcast it through video streaming. About one or two hundred TV stations can be received, including various TV stations in Europe, America, Hong Kong, Taiwan and mainland China. Therefore, this box was used not only in mainland China, but also by Chinese TV lovers all over the world. ![](/images/posts/2022/10/IMG_0649-1024x683.jpg) I am debugging the machine, the white box is the first generation of Maige box. ![](/images/posts/2022/10/microMsg.1411716082127-1024x576.jpg) There are many program sources, the lower right is the second generation of Maige box. In the second half of 2014, after the launch of the third-generation H3D model, within a year, Hong Kong and the mainland began to crack down on this piracy. The server was shut down. ![](/images/posts/2022/10/20130802_214647-1024x768.jpg) sometimes the service was not very stable At the end of 2020, one day I suddenly received a QQ message from a Maige box agent I had added, and asked me if I remembered him. He had just been released from prison in those days and had been isolated from the world for five years. He was afraid that the world had forgotten him. ![](/images/posts/2022/10/WechatIMG10-1-770x1024.jpeg) ### Online TV Android TV was only released in 2014. It can be said that this is a set of operating systems. I bought several Xiaomi boxes based on android tv, and the most impressive one is the enhanced version of Xiaomi Box 3. It can install google framework with root permission, thus you can install youtube in it. But it was later abandoned due to Xiaomi’s censorship of user-installed software and its secret deletion. Mibox s international version is a TV box launched by Xiaomi for foreign markets. In addition to youtube, it has the certification of Netflix and can watch Netflix. I remember being excited for a while after installing Netflix successfully for the first time. ![](/images/posts/2022/10/IMG_6883-1024x644.jpg) In 2019, using netflix for the first time This year, when recommending a TV box to a friend, I found that mibox s are not very popular anymore. Google built google tv on the TV stick chromecast and launched chromecast with google tv. The price is $39.99, and the domestic price is less than 400 RMB. ![](/images/posts/2022/10/chromecastwithgoogletv-1024x744.webp) In addition to its beautiful appearance, the Chromecast has a very beautiful interface. If you can have a US ip address, you can see this interface with many options. If it is a non-US ip, it is a very concise interface. ![](/images/posts/2022/10/IMG_2374-1024x576.jpg) interface when using the USA ip address. Moreover, users in the United States will have built-in TV stations by Pluto tv. There are probably hundreds of TV stations to broadcast. ![](/images/posts/2022/10/IMG_2375-1024x576.jpg) free live tv station provided by pluto tv As a fan of Marvel and National Geographic, I subscribe to Disney+ . It has five parts of TV to watch: Disney, Pixar, Marvel, Star Wars and National Geographic (subject to change based on ip). Disney+ is worth subscribing, although its ip requirements are very strict. ![](/images/posts/2022/10/IMG_2378-1024x608.jpg) Disney+ interface ### Conclusion 1. The important role of television media is to transmit information, and access to information is a basic human right. 2. I don’t believe it makes no difference who holds power. If Mao had lived another 40 years, I likely wouldn’t have been able to watch any television programs from outside China, similar to the situation in North Korea. 3. Reform and opening up gave me the opportunity to know more about the world. --- # [EN] Format Specification for Chinese Sermon Documents (First Draft) - URL: https://ye-yu.com/en/blog/format-specification-for-chinese-sermon-documents-first-draft - Date: 2022-09-08 - Category: Christian - Chinese Version: https://ye-yu.com/blog/format-specification-for-chinese-sermon-documents-first-draft In the past few years, I have done a few sermon transcriptions. During the process, I found that there is no complete specification of Chinese sermons transcription on the Internet. I tried to make some norms myself and discuss them with brothers and sisters. ## Title and article structure This part of the specification takes the use of markdwon as an example, and the same is true for word documents. ### Hierarchy The title is divided into four levels \- 一级标题:文章的标题 - 三级标题:文章主要部分的大标题 - 四级标题:三级标题下面一级的小标题 - 五级标题:四级标题下面某一方面的小标题 Here is an example \# 渴望完美的带领与顺服 ### 引言 ### 超然带领与顺服 ### 通常带领与顺服 #### 1、上帝子民的合一与前行(10.1-7) ##### 1)子民的合一 ##### 2)子民的前行 #### 2、上帝子民的争战与敬拜 (10:8-10) ### 结论 The rendering result of the above example is as follows: # 渴望完美的带领与顺服 ### 引言 ### 超然带领与顺服 ### 通常带领与顺服 #### 1、上帝子民的合一与前行(10.1-7) ##### 1)子民的合一 ##### 2)子民的前行 #### 2、上帝子民的争战与敬拜 (10:8-10) ### 结论 * * * #### Why is starting with a secondary heading deprecated? * In the default font size rendering of each editor, the font size of the first-level heading is the largest, and the font size of the following headings becomes smaller in turn. Heading No. 2 is used in the main text, and is appropriate if the article is very long, such as a longer paper or book. * But in a sermon article, the amounts of words generally does not exceed 20,000 words. The main structure of the article generally does not exceed the third level, so that the main text starts with the second level title, and the font size is too large. Therefore, it is recommended to start with heading3. ### in principle 1. Use headings in the body to avoid isolation, that is, there cannot be only one heading at the same level. Example: In the article structure below, `二级标题 A` only one is included `三级标题` and can be completely omitted `三级标题 A`. \## 二级标题 A ### 三级标题 A ## 二级标题 B 2. Subordinate headings do not repeat the name of the previous heading Example: In the following article structure, the second-level title has the same name as the subordinate third-level title, and it is recommended to avoid it. \## 概述 ### 概述 3. Try to avoid the following situations Subordinate headings do not have to repeat the parent heading \## 概述 ### 概述-第一点 ### 概述-第二点 --- # [EN] How a church organize a wedding - URL: https://ye-yu.com/en/blog/how-a-church-organize-a-wedding - Date: 2021-08-22 - Category: Christian - Chinese Version: https://ye-yu.com/blog/how-a-church-organize-a-wedding ### Marriage is a worship There is nothing wrong with saying that a couple is the star of a wedding. But for a Christian, the primary purpose of life is to glorify God, not to mention your wedding. Essentially, a wedding is the worship of God through the union of a couple. That’s why we call it a “wedding service”, or “wedding” for short. ### Pre-Marriage Counseling The secular world believes that marriage is something that does not have to be learned, or at least can be learned on its own. However, most Christians and their churches believe that marriage requires Bible-based teaching. In my church, for example, it usually takes eight sessions of premarital counseling lasting 3-6 months to successfully complete before a wedding can take place ### Wedding place A congregation is the preferred venue for weddings. However, for a couple in a church that does not have a synagogue or has lost one, the first thing that needs to be determined for a wedding is the venue. The following factors need to be considered in determining the venue. * The number of people attending the ceremony. Estimate the number of relatives, friends and church members who will come to the ceremony to determine the number of seats. * Budget. In the case of a congregation, the cost of the venue is not a consideration. However, in the case of no synagogue, the venue needs to be paid by the couple and needs to be mutually agreed upon by both parties according to the actual situation. * Venue style. Each person’s preferred wedding style is different, and with an appropriate budget, both parties can choose a style that suits them, such as indoor, outdoor; central or suburban with different venue styles. * Layout style. ### The following are some of the venues available for reference. Different star hotel ballroom Park outdoor Small museums Live house Showrooms in large shopping malls Professional exhibition venues ### Timing In secular weddings and wedding receptions throughout China, there are different customs and time periods for choosing the time of the wedding. Our churches generally hold weddings in the afternoon, and it is generally recommended to start within the time period of 14:00 to 15:00 and finish by 16:30. The exact time can be worked out by both parties according to the actual situation. Some of the benefits of holding a wedding in the afternoon are as follows. 1. No need to get up too early, including the couple, the ministry participants and the people watching the ceremony. 2. No banquet for church weddings; possible delays in the morning when the ceremony is held will delay the meal for everyone. 3. The venue requires a lot of flowers to set up; if held in the morning, it would need to be all set up the night before and the flowers may not be fresh. ### Invitation list After the venue and time is indeed good, the couple needs to be determined by the invitation candidates, including ![](/images/posts/2022/03/image-1024x401.png) ### Wedding Process ![](/images/posts/2022/03/image-1-706x1024.png) ### FAQ #### When is the right time to prepare for the wedding? If you have started marriage assistance, you can start to prepare some preparations. #### What are the fees paid by the newcomer? In the absence of a synagogue, all expenses related to the wedding need to be paid by the newcomer, including but not limited to: venue fees, decoration costs, required materials, refreshments, etc.; if the church is still available, there is no venue fee. The service of the church is limited to manpower. If the fee is advanced, the consent of the newcomer is required. #### Why don’t you give gifts and newcomers treat? The primary purpose of the wedding is to witness the glory of God. The wedding of the friends is a blessing to the newlyweds and a worship to God. It is the most important thing for newcomers to get everyone’s blessings. From a practical point of view, in a larger church, if there are more weddings a year, giving gifts will impose a financial burden on friends, and attending a wedding will lose the meaning of blessing. If you are both a friend and a good friend of a newcomer, gift-giving is a category of private intercourse, which should be held before (after) of the wedding. However, if the newlywed holds some positions in the church, they must abide by the relevant rules for receiving gifts in the church. #### What if a friend sends gifts at the wedding? When many unbelieving relatives and friends attend the wedding, it may involve gift-giving situations. The newlyweds should designate 1-2 relatives and friends to record and keep the gifts received. --- # [EN] Remembering my Pastor and Elder - URL: https://ye-yu.com/en/blog/remembering-pastor-and-elder - Date: 2021-06-01 - Category: Christian - Chinese Version: https://ye-yu.com/blog/remembering-pastor-and-elder Next to the Jiangxin Building, the waves on the Jinjiang River are rippling. It has been almost three years since the farewell in the winter of 2018. In the fall of 2017, I moved from Beijing to live in Chengdu, while my work required me to travel between Beijing and Chengdu, delaying several transfer studies. It wasn’t until June of the following year that I transferred to EarlyRain Covenant Church. After serving for a long time, I became very familiar with the brothers and sisters, as if I had known them for many years. However, I generally avoided the pastors and elders. I was afraid that if they had any gift that could read my mind since I am a sinner, wouldn’t it be troublesome? By September, we knew that the new church was ready. I went to the sixth floor and saw that the new church was in a mess. Elder Qin, who manages the synagogue, was busy moving around inside. I went to ask him to assign something to do, and he said, “You install the TVs”. Elder Qin is not tall, but has a good figure, fair skin, good looks, and always has a smile on his face even when he is busy. That day I worked with him until the dark night, that was our first acquaintance. The pastor has a round face, he writes poetry and articles well, and he is very easy-going and joyful. His sermons were like the flowing water of a mountain river, sometimes trickling, sometimes surging. I first knew him from the internet and only met him when I arrived in Chengdu. For more than a year, I sat in the front row of the church because I was afraid of the noise in the back that would interfere with the sermon. I often smiled at him after the meeting, shook his hand and greet each other. Until the December 9th persecution, there was no serious talk between us. After that, I could only watch his photos and videos and listen to his sermons on the salvation of Jesus Christ to remember him. Oh! I often tell my brothers, If you love someone, you must say it early. Alas. The ancients said, “What you encounter in life is actually a divine arrangement.” Just as Paul was taken to the city of Rome, and John was imprisoned on the island of Patmos, how could they make their own decisions? When my brother is locked up for four years and my pastor for nine years, in order to test them, and what the Lord has done will be accomplished, What can I do ? When I couldn’t sleep, I remembered that I was a coward and a coward to make a living. What hope can I have when I feel so much sorrow? But the Bible says, “Lord, what am I waiting for now? My hope is in you! Deliver me from all my transgressions, and do not put me to the shame of fools.” God has mercy on His people, and though we are scattered to the winds, yet in Jesus Christ we become one. The high walls cannot stop the contact in the Lord, and the mountains and seas cannot separate us. May brothers and sisters in the Lord often raise their hands in prayer, saying, “Holy is the Lord! Your glory fills the whole earth! Look after their food and shelter, and protect their parents and wives and children. Wipe away our tears that we miss them. Hear my prayer, O Lord.” This is what I want to say. Written by Ye, a brother who is in the Lord with you, in June 2021. ---