|
1 | 1 | # Codex Helper |
2 | 2 |
|
3 | | -[简体中文](README.zh-CN.md) · [How it works](docs/how-it-works.md) · [Releasing](docs/releasing.md) · [MIT License](LICENSE) |
| 3 | +[English](README.en.md) · [工作原理](docs/how-it-works.zh-CN.md) · [MIT License](LICENSE) |
4 | 4 |
|
5 | 5 | <p align="center"> |
6 | | - <img src="assets/app-icon-source.png" width="180" alt="Codex Helper icon"> |
| 6 | + <img src="assets/app-icon-source.png" width="150" alt="Codex Helper 图标"> |
7 | 7 | </p> |
8 | 8 |
|
9 | | -An unofficial, open-source macOS companion for Codex: a quiet horizontal Status Rail for remaining quota, guarded Auto Retry, official updates and documentation, and signed in-app updates. |
| 9 | +一个开源的 macOS Codex 辅助工具。直接查看剩余额度,并在模型满载时安全续跑原任务。 |
10 | 10 |
|
11 | | -> Not affiliated with or endorsed by OpenAI. |
| 11 | +> 非 OpenAI 官方项目。 |
12 | 12 |
|
13 | | -## Download |
| 13 | +## 功能 |
14 | 14 |
|
15 | | -Download the signed and Apple-notarized DMG from [GitHub Releases](https://github.com/makerjackie/codex-helper/releases), drag **Codex Helper** into Applications, and open it once. |
16 | | - |
17 | | -Requirements: macOS 13+ and the Codex desktop app. |
18 | | - |
19 | | -On first launch, allow **Codex Helper** in **System Settings → Privacy & Security → Accessibility**. Codex Helper needs its own permission because it is a separate app that focuses the Codex composer and submits the continuation message. If you used the earlier Codex Auto Retry prototype, this rename changes the app name, executable, bundle ID, and signing identity, so macOS treats Codex Helper as a new app and asks once more. Developer ID-signed updates with the same identity should not normally require permission again. |
20 | | - |
21 | | -## Menu bar and dashboard |
22 | | - |
23 | | -Click the Codex Helper menu bar icon to: |
24 | | - |
25 | | -- turn Auto Retry on or off; |
26 | | -- see the primary Codex remaining quota percentage directly beside the menu bar icon; |
27 | | -- show or hide an always-on-top Codex Status Rail with reset countdowns; |
28 | | -- see every quota window, reset time, and reset-credit count in the first-level menu; |
29 | | -- choose Automatic, English, or Simplified Chinese; |
30 | | -- enable or disable Launch at Login; |
31 | | -- automatically check and download signed Codex Helper updates; |
32 | | -- run a safe end-to-end Auto Retry test against a task you choose; |
33 | | -- read the latest official Codex changelog and Codex-related OpenAI news; |
34 | | -- open Codex documentation, troubleshooting, commands, and Tibo's X profile; |
35 | | -- open the dashboard, Accessibility Settings, or logs; |
36 | | -- quit Codex Helper completely. |
37 | | - |
38 | | -You can also search for **Codex Helper** in Spotlight. Opening it again brings up the redesigned dashboard, led by one spacious quota overview and a flat two-column control area instead of a stack of settings cards. Auto Retry, updates, news, documentation, and preferences remain available on one page. |
39 | | - |
40 | | -<p align="center"> |
41 | | - <img src="assets/status-rail-v0.6.0.webp" width="520" alt="Codex Helper horizontal Status Rail"> |
42 | | -</p> |
| 15 | +- 原生 macOS 小组件、菜单栏额度和可选悬浮状态轨道 |
| 16 | +- 显示剩余额度、重置倒计时与额度颜色提醒 |
| 17 | +- 模型满载后自动定位并重试原 Codex 任务 |
| 18 | +- 中英文、自动更新、Codex 官方动态与文档入口 |
43 | 19 |
|
44 | 20 | <p align="center"> |
45 | | - <img src="assets/dashboard-v0.6.0.webp" width="760" alt="Codex Helper dashboard"> |
| 21 | + <img src="assets/status-rail-v0.6.0.webp" width="520" alt="Codex Helper 悬浮状态轨道"> |
46 | 22 | </p> |
47 | 23 |
|
48 | | -## Auto Retry |
49 | | - |
50 | | -When Codex reports: |
51 | | - |
52 | | -```text |
53 | | -Selected model is at capacity. Please try a different model. |
54 | | -``` |
55 | | - |
56 | | -Codex Helper: |
57 | | - |
58 | | -1. Watches `~/.codex/log/codex-tui.log` and extracts the affected task ID. |
59 | | -2. Handles only visible root tasks and ignores hidden subagents. |
60 | | -3. Retries after `8 / 20 / 45 / 90 / 180 / 300` seconds, up to six times. |
61 | | -4. Cancels if you already sent a message or a new turn started. |
62 | | -5. Opens the original Codex task, submits a localized continuation prompt inside Codex, and restores the app you were using. |
| 24 | +## 安装 |
63 | 25 |
|
64 | | -It does not modify Codex, proxy network traffic, read project files, or store conversation content. It retries the same task; it does not automatically switch models. |
| 26 | +从 [GitHub Releases](https://github.com/makerjackie/codex-helper/releases) 下载已经签名和 Apple 公证的 DMG,拖入“应用程序”即可。要求 macOS 13+ 和 Codex 桌面版。 |
65 | 27 |
|
66 | | -## Usage |
| 28 | +原生小组件:在桌面空白处右键 → **编辑小组件** → 搜索 **Codex Helper**。 |
67 | 29 |
|
68 | | -The menu bar percentage, dashboard, and Status Rail read `account/rateLimits/read` from the official local Codex App Server. The API reports `usedPercent`; Codex Helper displays the remaining quota as `100 - usedPercent`, matching the direction used by Codex itself. The interface stays neutral while the circular gauge and small status accents change from teal at 50–100%, to amber at 10–50%, to pink-red below 10%. The Status Rail also shows reset countdowns, reset credits, refresh, dashboard, and hide controls. Codex Helper uses the authentication already managed by Codex and never reads tokens directly from `~/.codex/auth.json`. |
| 30 | +额度和小组件不需要辅助功能权限。只有开启“自动重试”并让 App 代为提交续跑消息时才需要授权;Codex Helper 不会在启动或测试时自动弹出授权请求。 |
69 | 31 |
|
70 | | -## Automatic updates |
71 | | - |
72 | | -Automatic updates are enabled by default. Codex Helper checks the latest GitHub Release at most once per day and downloads a newer DMG in the background. Installation remains a visible **Install and Restart** action so an update never interrupts work unexpectedly. |
73 | | - |
74 | | -Before replacement, Codex Helper verifies the published SHA-256 checksum, Developer ID bundle identifier and Team ID, and Gatekeeper acceptance. If the app location is not writable, it leaves the current version untouched and reports that automatic installation is unavailable. |
75 | | - |
76 | | -## Verify Auto Retry without waiting for an outage |
77 | | - |
78 | | -Choose **Test Auto Retry…** from the menu bar, select an idle recent Codex task with no draft in its composer, and confirm. Codex Helper creates a synthetic capacity event containing that task ID, runs it through the production matcher and visible-task check, waits three seconds, checks for newer activity, then opens the task and submits one clearly marked test message. A reply containing **Codex Helper test passed** verifies the complete routing and GUI-control chain on your installed Codex version. |
79 | | - |
80 | | -During a real failure, the Codex log line contains `thread_id=<UUID>` beside the exact capacity error. Codex Helper verifies that UUID against `~/.codex/session_index.jsonl`, waits with backoff, re-checks the task for newer activity, then opens `codex://threads/<UUID>`. It submits only when Accessibility reports that Codex is frontmost and the focused composer is an empty text area; it also checks the target session afterward for the submitted prompt. |
81 | | - |
82 | | -## What’s New and Learn Codex |
83 | | - |
84 | | -The menu reads the public [Codex changelog RSS](https://learn.chatgpt.com/docs/changelog/rss.xml) and [OpenAI News RSS](https://openai.com/news/rss.xml), keeping only Codex-related OpenAI News items. Results are cached locally; successful feeds refresh every six hours, while failures back off for at least 15 minutes. The Tibo entry is a normal browser link; Codex Helper does not scrape X. |
85 | | - |
86 | | -## Build from source |
| 32 | +## 开发 |
87 | 33 |
|
88 | 34 | ```bash |
89 | 35 | git clone https://github.com/makerjackie/codex-helper.git |
90 | 36 | cd codex-helper |
| 37 | +./test.sh |
91 | 38 | ./install.sh |
92 | 39 | ``` |
93 | 40 |
|
94 | | -Source builds use local ad-hoc signing and can require Accessibility permission again after rebuilding. For normal use, prefer the Developer ID-signed Release build. |
95 | | - |
96 | | -## Test |
97 | | - |
98 | | -```bash |
99 | | -./test.sh |
100 | | -``` |
| 41 | +更详细的识别、重试和隐私边界见[工作原理](docs/how-it-works.zh-CN.md)。 |
101 | 42 |
|
102 | 43 | ## License |
103 | 44 |
|
|
0 commit comments