Skip to content

Releases

v1.4.1 — Activity-Aware Stall Watchdog, Per-Turn Effort Tracking & Sidecar UX Polish

Choose a tag to compare

@cxgit12138 cxgit12138 released this 27 Nov 16:09

中文更新说明

新增特性

  • 活跃度感知卡死检测(watchdog-core.mjs、bridge-daemon.mjs、codex-ctl.mjs)
    • 用双阈值活跃度看门狗替代固定间隔盲目心跳:默认 10 分钟(600s)静默卡死阈值 + 30 分钟(1800s)硬上限保底。
    • 基于三正交单调时钟(performance.now():turnRunningSince / lastProgress / lastDeliveredContact)追踪 Codex 真实执行进展(item/started、item/completed、流式输出增量、schema 级有界 plan/updated 与 patchUpdated 摘要、阻塞审批/提问),每次确认唤醒后自动刷新计时。
    • codex-ctl.mjs wait 新增 --stall-timeout <sec>(0..1800,0 禁用静默检测),通过 /health 严格协商 capabilities.stallWatchdog === true 并保持与旧版 v1.4.0 守护进程双向兼容。
    • 超时唤醒与 /status 摘要附带脱敏诊断字段(timeoutReason: "stall" | "max_wait"、silentSec、lastActivityKind、lastActivityAt、白名单 activeItems 与非重试错误码枚举)。
  • 未 wait 模式的后台 Hook / Inbox 看门狗
    • 当活跃回合未挂载前台 wait 时,后台独立看门狗(CODEX_BRIDGE_BG_STALL_SEC=600、CODEX_BRIDGE_BG_MAX_RUN_SEC=1800)会在卡死或触及硬上限时通过既有 PreInvocation / Stop 钩子与 codex-ctl.mjs inbox 投递去重后的 inboxOnly turn_watchdog 告警(保持高权限固定模板隔离不变)。
    • 单回合采用单写告警槽与 fg_timeout_receipt 租约确认(auto 5s / manual 30s),前台 CLI 遭遇 EPIPE 时无缝降级到后台 Inbox,避免漏报或重复刷屏。
  • 可移植 11 组卡死检测自动化测试(tests/verify-watchdog.mjs)
    • 覆盖纯调度单元测试、持续流式输出防误报、静默卡死唤醒、EPIPE 降级、多 waiter 槽位竞争、满队自驱逐、回合隔离与 0.169.1 精确取消载荷、Hook 后台注入与混合版本兼容矩阵。

侧边栏体验与协议优化

  • 自定义会话下拉菜单与弹性动效(sidecars/codex_panel/*、bridge-daemon.mjs)
    • 用自定义美化无障碍下拉面板替代原生 <select>:内置实时状态圆点、动态相对时间、工作区/模型/条数双行信息、完整键盘导航与矮视口限高,轮询期不关闭菜单且保留焦点与滚动位置。
    • 改为 O(1) 增量 DOM 追加(隐藏工具写日志不影响可见列表时直接跳过 DOM 重建,消除渐隐行闪动),新增 GPU 合成方向性弹性弹入动画、吸底时同步 easeOutQuart 平滑上推(查看历史时绝不打扰,滚轮/点击/键盘即刻接管)与平滑可逆高度展开/收起过渡,并尊重 prefers-reduced-motion。
    • 通过精确 itemId 关联(inFlightDraftItemIds / completedMessageItemIds)与 activeTurnFinalized 追踪,实现流式草稿原地无缝定型(不二次弹出),并消除 final_answer 落盘到 turn/completed 短暂窗口中的幽灵「执行中」气泡。
  • 长消息气泡自动折叠
    • 对非工具类超长气泡限制 260px 显示高度(含 56px 防尴尬滞后余量),配合按气泡底色自适应的渐隐遮罩与极简 显示更多 / 收起 按钮(无气泡内滚动条、记忆展开态与键盘焦点、收起防跳屏锚定)。
  • Codex 0.169.1 App-Server 协议加固
    • 严格 threadId + turnId 隔离防过期/被取代回合复活;强制服务端请求单回复权与精确 0.169.1 取消载荷,区分非阻塞 item/tool/requestUserInput;POST /wait 采用严格非隐式转换 JSON 整数校验与两阶段多线断连清理。

问题修复

  • 多轮会话推理强度(effort)跟踪与侧边栏显示修复
    • 分离线程级 (model, effort) 与活跃回合快照(activeTurnModel / activeTurnEffort),从 thread/start|resume|fork 提取 reasoningEffort,跨模型切换清零旧 effort,防止同回合追加输入或被拒 turn/start 覆写进行中回合标签。
    • 侧边栏日志解析升级为两遍扫描按回合索引(解决乱序到达与历史日志后续轮次丢失 effort 显示问题),live 气泡按作用域原子解析并将 effort / lastModelSub 纳入 ETag。

升级注意

  • 若升级前已有旧版 bridge-daemon.mjs 在运行,待当前任务完成后执行一次 codex-ctl.mjs stop(并按需重启一次 Antigravity 加载新版 Sidecar 面板)即可切换至 v1.4.1。

English Release Notes

Added

  • Activity-Aware Stall Watchdog (watchdog-core.mjs, bridge-daemon.mjs, codex-ctl.mjs):
    • Replaces blind fixed-interval heartbeat polling with dual-threshold activity-aware stall detection: 10 min (600s) silence stall threshold + 30 min (1800s) hard ceiling by default.
    • Tracks real Codex progress (item/started, item/completed, streaming text/reasoning/command/file deltas, plan/updated & patchUpdated schema-bounded digests, and blocking approvals/questions) using three orthogonal monotonic (performance.now()) clocks (turnRunningSince, lastProgress, lastDeliveredContact) that refresh cleanly after every confirmed supervisor wakeup.
    • Added --stall-timeout <sec> (0..1800, 0 disables silence detection) to codex-ctl.mjs wait, with strict /health capabilities.stallWatchdog === true negotiation and bidirectional compatibility with older v1.4.0 daemons.
    • Includes sanitized diagnostic metadata (timeoutReason: "stall" | "max_wait", silentSec, lastActivityKind, lastActivityAt, allowlisted activeItems, and sanitized lastNonRetryableError.code) in timeout wakeups and status summaries.
  • Unwaited Hook / Inbox Background Watchdog:
    • Runs an independent background watchdog (CODEX_BRIDGE_BG_STALL_SEC=600, CODEX_BRIDGE_BG_MAX_RUN_SEC=1800) for active turns with no attached foreground wait, delivering deduplicated inboxOnly turn_watchdog notifications via existing PreInvocation / Stop hooks and codex-ctl.mjs inbox (keeping the fixed security-isolated hook templates untouched).
    • Enforces a single-writer alert slot per turn with fg_timeout_receipt lease confirmation (auto 5s / manual 30s), seamlessly handing off failed foreground EPIPE deliveries to the background inbox without duplicate storms.
  • Portable 11-Group Watchdog Verification Suite (tests/verify-watchdog.mjs):
    • Covers unit scheduling/sanitization, active streaming suppression, silent stall detection, EPIPE handoff, multi-waiter slot contention, full-queue self-eviction, turn isolation & 0.169.1 cancel payloads, unwaited Hook/Inbox delivery, --force rescheduling, and mixed-version compatibility.

Changed

  • Sidecar Panel UX Polish: Custom Session Picker, Spring Animations & Seamless Streaming (sidecars/codex_panel/*, bridge-daemon.mjs):
    • Replaced native OS <select> with a custom accessible session dropdown featuring live status dots, dynamic relative timestamps, two-line workspace/model/count metadata, full keyboard navigation, viewport height clamping, and poll-stable menu focus/scroll.
    • Added O(1) incremental DOM bubble appends (skipping redundant DOM rebuilds when hidden tool writes don't affect visible messages), GPU-composited directional spring pop-in animations, synchronized easeOutQuart bottom push-up scrolling (untouched while reading history; immediately cancellable by wheel/touch/pointer/keyboard), smooth reversible max-height expand/collapse transitions, and prefers-reduced-motion support.
    • Added exact itemId correlation (inFlightDraftItemIds / completedMessageItemIds) and activeTurnFinalized tracking so streaming drafts settle in-place without replaying entrance animations or flashing brief post-final_answer ghost "running" bubbles.
  • Sidecar Panel Collapsible Long Bubbles (sidecars/codex_panel/app.js, styles.css, index.html):
    • Caps tall non-tool chat bubbles at 260px (with a 56px hysteresis buffer so short overflows stay natural) using a theme-aware bottom fade mask and a minimalist 显示更多 / 收起 toggle with zero inner scrollbars.
    • Preserves expanded bubble state and keyboard focus across poll re-renders, anchors scroll cleanly on collapse (keeping the toggle visible in short viewports), links buttons via aria-controls, and adapts smoothly to panel width/height resizes.
  • Codex 0.169.1 App-Server Protocol Hardening:
    • Strict threadId + turnId scoping prevents late notifications or superseded turns from resurrecting completed turns or poisoning active stall timers.
    • Enforces single-reply authority on server requests with exact 0.169.1 retirement/cancel payloads ({ permissions: {}, scope: "turn" } for permissions, { decision: "abort" } for legacy approvals, { decision: "cancel" } for v2 approvals, -32602 on malformed requests) and distinguishes non-blocking item/tool/requestUserInput (isBlocking: false).
    • Upgraded POST /wait validation to strict non-coercing JSON integers and two-phase disconnect cleanup across multi-thread teardown.

Fixed

  • Per-Turn Reasoning Effort Tracking & Sidecar Display (bridge-daemon.mjs, sidecars/codex_panel/main.mjs, sidecars/codex_panel/app.js):
    • Tracks thread-level (model, effort) separately from active-turn snapshots (activeTurnModel, activeTurnEffort), reading reasoningEffort from thread/start|resume|fork, clearing stale effort on cross-model switches, and preventing same-turn appends or rejected turn/start responses from relabeling an already-running turn.
    • Upgraded sidecar log parsing to a two-pass per-turn index with explicit effortExplicit/committed/turnConfigApplied handling, atomic live-bubble scope resolution, and ETag inclusion of effort / lastModelSub so follow-up turns and legacy logs consistently display their true reasoning effort.

Upgrade Notes

  • Finish active tasks and run codex-ctl.mjs stop (and restart Antigravity once to reload the updated Sidecar panel) so the bridge restarts on the v1.4.1 daemon advertising capabilities.stallWatchdog: true.

v1.4.0 — Between-Turn Hook Notifications & Reliable Inbox Protocol

Choose a tag to compare

@cxgit12138 cxgit12138 released this 26 Nov 14:17

中文更新说明

新增特性

  • 工具轮次间隙自动通知(hooks.json + hooks/codex-hook.mjs)
    • 新增插件级 PreInvocation 与条件启用的 Stop 生命周期钩子:即使 Antigravity 未挂 wait、正在忙其他任务,也能在下一轮工具间隙自动收到 [Codex Supervisor] 提醒;准备停机而 Codex 仍在运行且未挂 wait 时自动兜底提醒一次。
    • 高权限系统提示仅使用插件固定模板与计数(零 Codex 原文,防止 Prompt Injection 提权),实际正文由 codex-ctl.mjs inbox 按普通工具输出读取。
    • 采用按 instanceId 隔离的标记文件快路径(无未读时 0 HTTP 开销)、PID 存活探测(规避 Windows 死端口重试延迟)、最小权限 hook-daemon.json 与全链路 Fail-Open。
  • 可靠 Inbox 与租约确认协议(codex-ctl.mjs inbox / inbox ack)
    • 新增 /inbox、/inbox/ack、/hook/poll 接口及 inbox [threadId] [--limit N] [--no-ack]、inbox ack <batchId> 子命令。
    • 非阻塞/终态关键事件无条件入独立有界队列,配备单调缺口水位与 30s 统一租约(/inbox 与 /wait 共用签批,CLI 完整写出 stdout 后自动确认,支持 --no-ack 手动确认),单页严格 ≤16 KiB 且防多线饿死。
  • 严格自动通知路由与显式接管(resume --claim)
    • 按 ANTIGRAVITY_CONVERSATION_ID 自动路由通知,跨线程 idle 驱逐持久化归属;wait/send/steer 不隐式抢占归属,跨会话接管需对干净线程显式执行 resume <threadId> --claim。
  • 可移植 26 组 E2E 自动化测试(tests/verify-hooks-e2e.mjs)
    • 一键运行 node tests/verify-hooks-e2e.mjs 回归并发、租约、16 KiB 分页、Prompt Injection 隔离与 Windows ACL 边界。

改进与加固

  • Windows 状态目录权限加固升级为纯 .NET SID 校验 + 静态脚本环境变量传参 + 全深度祖先/后代 ReparsePoint 校验;Windows 单实例互斥升级为基于物理目录身份的独占命名管道内核锁。
  • 调整 SUPERVISOR_DEV_INSTRUCTIONS,允许在监工 prompt 明确要求时响应调用 message_supervisor(日常操作仍保持静默克制)。
  • codex-ctl.mjs 不再预建状态目录,并即时透传 daemon 早期启动报错。

升级注意

  1. 更新后请重启一次 Antigravity 客户端,确保宿主重新注册根目录 hooks.json 与 Sidecar。
  2. 若升级前已有旧版 bridge-daemon.mjs 在运行,待当前任务完成后执行一次 codex-ctl.mjs stop 即可切换至 v1.4.0 守护进程。

English Release Notes

Added

  • Between-Turn Automatic Hook Notifications (hooks.json, hooks/codex-hook.mjs): Bundles PreInvocation and conditional Stop hooks so Antigravity receives fixed-template [Codex Supervisor] reminders between tool turns even without an active wait (zero Codex free text in high-privilege system messages, zero-HTTP fast path via per-instance flag files, isolated hook-daemon.json with hookToken, strict fail-open).
  • Reliable Inbox & Lease/ACK Protocol (codex-ctl.mjs inbox, inbox ack): Unconditionally buffers target non-blocking/terminal events with monotonic overflow watermarks, unified 30s batch leases across /inbox and /wait, strict 16 KiB / 10-thread pagination, and stdout-complete auto-ACK (optional --no-ack for manual confirmation).
  • Strict Auto-Notification Routing & Explicit Ownership Transfer (resume --claim): Routes notifications by ANTIGRAVITY_CONVERSATION_ID, preserves ownership across idle thread eviction, and prevents implicit hijacking on wait/send/steer.
  • Portable 26-Scenario E2E Suite (tests/verify-hooks-e2e.mjs): Run node tests/verify-hooks-e2e.mjs with zero external dependencies.

Changed

  • Hardened Windows ACL verification via pure .NET SecurityIdentifier APIs with static PowerShell env-var data passing, full ancestor/descendant ReparsePoint checks, and a physical-identity exclusive named-pipe kernel mutex.
  • Updated SUPERVISOR_DEV_INSTRUCTIONS so explicit supervisor requests to call message_supervisor are honored while keeping routine narration quiet.
  • Added CHANGELOG.md and release/upgrade instructions in README.md.

Upgrade Notes

  • Restart Antigravity once after upgrading so hooks.json and the Sidecar panel register cleanly.
  • If an older bridge daemon is running, run codex-ctl.mjs stop after current tasks finish to switch to the v1.4.0 daemon.