Skip to content

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

Choose a tag to compare

@cxgit12138 cxgit12138 released this 26 Nov 14:17
· 5 commits to main since this release

中文更新说明

新增特性

  • 工具轮次间隙自动通知(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.