Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ explore/
# Private local visual-acceptance artifacts (screenshots, logs, and capture helpers)
/.local-artifacts/

# Local WorkBlock state remains available to project skills but is never committed.
/.workblock/
# Local WorkBlock runtime state remains available to project skills but is never committed.
/.workblock/runtime/

# Local planning state
/.planning/
/.workblock/
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## Unreleased

## 1.3.1 - 2026-09-01

- 完成独立 Windows x86_64 Tauri Dashboard V0:Overview、Tasks、AI Leadership、Usage、Inference、Projects、Skills 和 Settings 八个 Web surface 统一接入本地数据管线。
- Windows app-server 子进程启动使用 `CREATE_NO_WINDOW`,首次打开或点击 Refresh 时不再弹出 CMD/命令行窗口,同时保留额度读取、loopback 请求和子进程清理行为。
- Windows 版本继续保持本地优先和隐私边界,只读取本机 Codex transcript、SQLite 与 automation 元数据;不上传 usage、线程、路径、日志或账户数据。
- 推理性能聚合补齐本地统计时区、DST 边界、有界流式读取、指纹缓存和共享刷新索引;缺失或非法事件不伪造成有效样本。
- 固化 Windows glass surface、Playwright 合同/fixture、native exact-HWND 采集边界、shell lifecycle 检查和 MSI/NSIS 发布脚本校验。

## 1.3.0 - 2026-08-04

- 新增本机推理性能监测:从最近 28 天 Codex rollout 识别完整模型调用,按模型与推理强度展示平均耗时、P50、P90、有效吞吐和 reasoning token 占比,并支持今日、7 日均和 28 日均视图。
Expand Down
4 changes: 2 additions & 2 deletions DISTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ This creates the DMG and a `SHA-256` checksum file next to it.
The Windows package uses Tauri's MSI and NSIS targets. Run this on a Windows machine or Windows CI runner with Rust, rustup, Node.js, and npm installed:

```powershell
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\build-windows-release.ps1 -Version 1.3.0
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\build-windows-release.ps1 -Version 1.3.1
```

The script pins the MSVC Rust toolchain, runs the Windows workspace tests and frontend build, builds both installers, and writes these files under `dist/windows/`:
Expand All @@ -88,7 +88,7 @@ The current Tauri configuration uses the WebView2 download bootstrapper. The Win
The repository target is also available as:

```sh
make release-windows VERSION=1.3.0
make release-windows VERSION=1.3.1
```

## Deterministic release verification
Expand Down
18 changes: 9 additions & 9 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## A First-of-Its-Kind AI Leadership Assessment Model

codexU v1.3.0 adds on-device inference performance monitoring to its AI leadership model. It groups complete Codex model calls from the latest 28 days by model and reasoning effort, exposing average duration, P50/P90, effective throughput, and reasoning-token share. All processing remains local and independent from the existing quota, usage, trend, and task data paths.
codexU v1.3.1 adds on-device inference performance monitoring to its AI leadership model and completes the independent Windows x86_64 Tauri Dashboard. All processing remains local and independent from the existing quota, usage, trend, and task data paths.

- **See the AI organization at a glance:** score, 28-day led agents, AI hours, and peak concurrency sit beside a live command-radius orbit driven by today's agents.
- **No token-based score inflation:** only locally verifiable or derived worker lifecycles, parent-child relationships, concurrency, and autonomous runs count. Unreliable cost, delivery, and estimated intervals stay outside the score.
Expand All @@ -13,16 +13,16 @@ codexU v1.3.0 adds on-device inference performance monitoring to its AI leadersh
- **Local and private:** evaluation stays on your Mac and does not upload usage, threads, paths, logs, or account data.

> [!IMPORTANT]
> **Upgrade to v1.3.0 or later.** v1.3.0 adds on-device inference performance monitoring with model × reasoning-effort duration, P50/P90, and effective-throughput views. [Download the latest release](https://github.com/shanggqm/codexU/releases/latest).
> **Upgrade to v1.3.1 or later.** v1.3.1 completes the Windows x86_64 Dashboard and includes the on-device inference-performance and aggregation-boundary updates. [Download the latest release](https://github.com/shanggqm/codexU/releases/latest).

codexU is a macOS menu bar and desktop app for tracking OpenAI Codex / ChatGPT Codex and Claude Code quota, token usage, today's tasks, and local AI leadership. It keeps the information you check most in the menu bar and main window, so you can quickly see remaining quota, reset times, daily progress, and how much AI labor one person is directing.

## Windows Release

Starting with v1.3.0, codexU also ships a Windows x86_64 desktop version. The Windows installers are available in the [GitHub v1.3.0 Release](https://github.com/shanggqm/codexU/releases/tag/v1.3.0) in both MSI and NSIS formats:
The current Windows x86_64 desktop version is available in the [GitHub v1.3.1 Release](https://github.com/shanggqm/codexU/releases/tag/v1.3.1) as an independent Tauri Dashboard in both MSI and NSIS formats:

- `codexU-1.3.0-windows-x86_64.msi`: Windows Installer package.
- `codexU-1.3.0-windows-x86_64-setup.exe`: NSIS setup wizard.
- `codexU-1.3.1-windows-x86_64.msi`: Windows Installer package.
- `codexU-1.3.1-windows-x86_64-setup.exe`: NSIS setup wizard.
- Windows 10/11 x86_64 is supported; Windows ARM64 is not packaged yet.
- Verification note: this Windows V0 native visual matrix and shell-lifecycle evidence was collected on a host classified as Windows 11 by build `26200`; Windows 10 remains a supported target but was not observed in this run.
- The Windows version reads local data under `%USERPROFILE%\.codex\` and preserves the local-first privacy boundary. It does not upload usage, threads, paths, logs, or account data.
Expand Down Expand Up @@ -181,10 +181,10 @@ make release-all
Release artifacts are written to `dist/`, for example:

```text
dist/codexU-1.3.0-mac-arm64.dmg
dist/codexU-1.3.0-mac-arm64.dmg.sha256
dist/codexU-1.3.0-mac-x86_64.dmg
dist/codexU-1.3.0-mac-x86_64.dmg.sha256
dist/codexU-1.3.1-mac-arm64.dmg
dist/codexU-1.3.1-mac-arm64.dmg.sha256
dist/codexU-1.3.1-mac-x86_64.dmg
dist/codexU-1.3.1-mac-x86_64.dmg.sha256
```

For Developer ID signing and notarization, see [DISTRIBUTION.md](DISTRIBUTION.md).
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 全网首推:AI 领导力评估模型

codexU v1.3.0 在 AI 领导力模型之外新增本机推理性能监测:从最近 28 天 Codex rollout 中按模型与推理强度聚合完整调用耗时、P50/P90、有效吞吐和 reasoning token 占比。所有数据仍在本机处理,并与既有额度、用量和任务口径保持独立。
codexU v1.3.1 在 AI 领导力模型之外提供本机推理性能监测,并补齐独立 Windows x86_64 Tauri Dashboard。所有数据仍在本机处理,并与既有额度、用量和任务口径保持独立。

- **一眼看懂 AI 组织规模**:主视觉同时展示领导力得分、28 天领导 Agent 数、AI 工时和峰值并发;轨道节点随今日 Agent 动态运行。
- **不是靠 token 刷分**:只使用本机可验证或可推导的 Agent 生命周期、父子关系、并发与自主运行证据;不可靠的成本、交付和估算区间不进入得分。
Expand All @@ -13,18 +13,18 @@ codexU v1.3.0 在 AI 领导力模型之外新增本机推理性能监测:从
- **本地优先、隐私优先**:评分全程在 Mac 本机完成,不上传 usage、线程、路径、日志或账户数据。

> [!IMPORTANT]
> **建议升级到 v1.3.0 或更高版本。** v1.3.0 新增本机推理性能监测,可查看模型 × 推理强度的平均耗时、P50、P90 和有效吞吐。[下载最新版本](https://github.com/shanggqm/codexU/releases/latest)。
> **建议升级到 v1.3.1 或更高版本。** v1.3.1 补齐 Windows x86_64 Dashboard,并包含本机推理性能监测和聚合边界修复。[下载最新版本](https://github.com/shanggqm/codexU/releases/latest)。

[产品官网](https://shanggqm.github.io/codexU-site/) · [下载最新版本](https://github.com/shanggqm/codexU/releases/latest) · [English](README.en.md)

codexU 是一个 macOS 菜单栏与桌面应用,用来查看 OpenAI Codex / ChatGPT Codex 和 Claude Code 的额度窗口、token 用量、今日任务和本机 AI 领导力。它把常用信息放在菜单栏和主窗口里,帮助你快速判断剩余额度、重置时间、当天工作进展,以及一个人正在调动多少 AI 劳动力。

## Windows 版本已发布

从 v1.3.0 开始,codexU 同时提供 Windows x86_64 桌面版本。Windows 安装包已经随 [GitHub v1.3.0 Release](https://github.com/shanggqm/codexU/releases/tag/v1.3.0) 发布,并提供 MSI 与 NSIS 两种安装方式:
当前 Windows x86_64 桌面版本随 [GitHub v1.3.1 Release](https://github.com/shanggqm/codexU/releases/tag/v1.3.1) 提供,并包含完整的独立 Tauri Dashboard;安装包提供 MSI 与 NSIS 两种方式:

- `codexU-1.3.0-windows-x86_64.msi`:适合通过 Windows Installer 安装。
- `codexU-1.3.0-windows-x86_64-setup.exe`:适合通过 NSIS 安装向导安装。
- `codexU-1.3.1-windows-x86_64.msi`:适合通过 Windows Installer 安装。
- `codexU-1.3.1-windows-x86_64-setup.exe`:适合通过 NSIS 安装向导安装。
- 支持 Windows 10/11 x86_64;Windows ARM64 当前尚未打包。
- 验证环境说明:本轮 Windows V0 的原生视觉矩阵与 shell lifecycle 验收在按 build `26200` 归类的 Windows 11 环境完成;Windows 10 仍是支持目标,但未在本轮实机观测。
- Windows 版本读取 `%USERPROFILE%\.codex\` 等本机数据,保持本地优先和隐私边界,不上传 usage、线程、路径、日志或账户数据。
Expand Down Expand Up @@ -205,10 +205,10 @@ make release-all
产物会写入 `dist/`,例如:

```text
dist/codexU-1.3.0-mac-arm64.dmg
dist/codexU-1.3.0-mac-arm64.dmg.sha256
dist/codexU-1.3.0-mac-x86_64.dmg
dist/codexU-1.3.0-mac-x86_64.dmg.sha256
dist/codexU-1.3.1-mac-arm64.dmg
dist/codexU-1.3.1-mac-arm64.dmg.sha256
dist/codexU-1.3.1-mac-x86_64.dmg
dist/codexU-1.3.1-mac-x86_64.dmg.sha256
```

Developer ID 签名和 Apple notarization 流程见 [DISTRIBUTION.md](DISTRIBUTION.md)。
Expand Down
4 changes: 2 additions & 2 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.0</string>
<string>1.3.1</string>
<key>CFBundleVersion</key>
<string>27</string>
<string>28</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSMinimumSystemVersion</key>
Expand Down
37 changes: 37 additions & 0 deletions docs/release-notes-v1.3.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# codexU v1.3.1

codexU v1.3.1 补齐独立 Windows x86_64 Tauri Dashboard,并收敛推理性能聚合、原生视觉采集与双平台发布验证边界。

## 主要更新

- 完成 Windows Dashboard V0 的 Overview、Tasks、AI Leadership、Usage、Inference、Projects、Skills 和 Settings 八个 Web surface。
- Windows app-server 子进程启动改用 `CREATE_NO_WINDOW`,首次打开或刷新读取额度时不弹出 CMD/命令行窗口,并保留 loopback 请求、读取错误处理和子进程清理。
- Windows reader 只读取本机 Codex transcript、SQLite 和 automation 元数据,保持本地优先;不上传 usage、线程、路径、日志或账户数据。
- 推理性能聚合支持本地统计时区和 DST 边界,使用有界流式读取、指纹缓存与共享刷新索引;缺失或非法事件不会被伪造成有效样本。
- 固化 Windows glass surface 与语义 token、Playwright 合同/fixture、native exact-HWND 采集边界和 shell lifecycle 检查。
- 发布流程补齐 Windows x86_64 MSI/NSIS 构建脚本与跨平台资产校验;公开安装包默认未代码签名,未执行 Apple notarization。

## 验证

- 全局内存风险门禁:PASS;完整风险清单已复核。
- PR #44 合并后的 Windows CI:macOS、Windows Rust format、Windows web 均通过。
- Windows MSI/NSIS 已在本机按 release 脚本构建并复核;macOS 双架构 DMG 与跨平台汇总由 release workflow 的 macOS/Ubuntu runner 生成并复核。

## 安装包

- 内部构建号:28。
- Apple Silicon:`codexU-1.3.1-mac-arm64.dmg`
- Intel:`codexU-1.3.1-mac-x86_64.dmg`
- Windows MSI:`codexU-1.3.1-windows-x86_64.msi`
- Windows NSIS:`codexU-1.3.1-windows-x86_64-setup.exe`

## SHA-256

```text
SHA256_PLACEHOLDER codexU-1.3.1-mac-arm64.dmg
SHA256_PLACEHOLDER codexU-1.3.1-mac-x86_64.dmg
d511898277bdc20d77d321ce34d3c381cf7336b0440077c08da68eea2a79ea7d codexU-1.3.1-windows-x86_64.msi
9f5d2673faa091247233c60e7cde247ca5fe3b484bc8721960b53c24ae731415 codexU-1.3.1-windows-x86_64-setup.exe
```

本版本的 macOS 签名、notarization 和 Windows 代码签名状态必须以实际构建结果为准;在正式发布前不得把未执行的签名或 notarization 描述为已完成。
13 changes: 13 additions & 0 deletions windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ Playwright viewport `1440×900`。画面只展示聚合指标和领导力界面
- 标题优先使用 `title`,为空时回退到 `preview`,展示前归一化并截断到 48 个字符
- 工作区只展示路径尾名,automation 优先使用配置中的 `name`

## 安装(推荐)

Windows 用户可以直接打开[最新 GitHub Release](https://github.com/shanggqm/codexU/releases/latest),在
Assets 中下载带有 `-setup.exe` 后缀的 NSIS 安装包:

1. 下载 `codexU-<version>-windows-x86_64-setup.exe`。
2. 双击安装包并按向导完成安装;它使用当前用户安装,不需要管理员权限。
3. 从开始菜单或安装目录启动 `codexU`。

Release 页面同时提供 MSI 安装包和对应的 `.sha256` 文件。需要通过 Windows Installer 管理安装时选择 MSI;
需要快速完成当前用户安装时,优先选择 NSIS 安装包。仓库默认发布包尚未进行代码签名,Windows 首次运行时
可能显示安全提示。

## 快速开始

Windows 工作区使用 Node.js 22.12 或更新版本和 MSVC ABI。首次在当前检出目录开发时,
Expand Down
63 changes: 61 additions & 2 deletions windows/crates/codexu-core/src/readers/codex_app_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const MONTHLY_MAX_DURATION_MINS: i64 = 31 * 24 * 60;
const APP_SERVER_CONNECT_TIMEOUT: Duration = Duration::from_secs(5);
const APP_SERVER_REQUEST_TIMEOUT: Duration = Duration::from_secs(12);

#[cfg(windows)]
const CREATE_NO_WINDOW: u32 = 0x08000000;

/// Official rate-limit data read from the local Codex app-server.
#[derive(Debug, Clone, PartialEq)]
pub struct CodexAppServerQuotaSnapshot {
Expand Down Expand Up @@ -270,16 +273,27 @@ fn selected_rate_limits(response: &Value) -> Option<&Value> {
fn launch_app_server(port: u16) -> anyhow::Result<Child> {
let executable = resolve_codex_executable()
.ok_or_else(|| anyhow::anyhow!("Could not locate the installed Codex CLI executable"))?;
Command::new(executable)
let mut command = Command::new(executable);
command
.args(["app-server", "--listen", &format!("ws://127.0.0.1:{port}")])
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::null())
.kill_on_drop(true)
.kill_on_drop(true);
configure_no_console(&mut command);
command
.spawn()
.map_err(|_| anyhow::anyhow!("Could not launch the installed Codex CLI"))
}

#[cfg(windows)]
fn configure_no_console(command: &mut Command) {
command.creation_flags(CREATE_NO_WINDOW);
}

#[cfg(not(windows))]
fn configure_no_console(_command: &mut Command) {}

fn resolve_codex_executable() -> Option<PathBuf> {
let app_data = env::var_os("APPDATA")?;
let (package, triple) = if cfg!(target_arch = "aarch64") {
Expand Down Expand Up @@ -332,6 +346,51 @@ async fn stop_child(child: &mut Child) {
}
}

#[cfg(all(test, windows))]
mod tests {
use super::*;

#[tokio::test]
async fn app_server_child_creation_disables_a_console() {
let script = r#"
$signature = @'
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
public static extern System.IntPtr GetConsoleWindow();
'@
Add-Type -MemberDefinition $signature -Name NativeMethods -Namespace CodexU.ConsoleProbe
[CodexU.ConsoleProbe.NativeMethods]::GetConsoleWindow().ToInt64()
"#;
let mut command = Command::new("powershell.exe");
command
.args([
"-NoLogo",
"-NoProfile",
"-NonInteractive",
"-Command",
script,
])
.stdin(Stdio::null())
.stdout(Stdio::piped())
.stderr(Stdio::piped());
configure_no_console(&mut command);

let output = command
.output()
.await
.expect("PowerShell console probe should start");
assert!(
output.status.success(),
"PowerShell console probe failed: {}",
String::from_utf8_lossy(&output.stderr)
);
assert_eq!(
String::from_utf8_lossy(&output.stdout).trim(),
"0",
"CREATE_NO_WINDOW must leave the child without a console"
);
}
}

fn parse_rate_window(value: &Value) -> Option<RateWindow> {
let used_percent = value.get("usedPercent")?.as_f64()?;
let resets_at = value
Expand Down
Loading