Skip to content

Commit b688f6c

Browse files
author
pavelhov
authored
Merge pull request #9 from pavelhov/codex/fix-effort-dashboard-refresh
Codex/fix effort dashboard refresh
2 parents 3191ac0 + b0ebfd1 commit b688f6c

50 files changed

Lines changed: 858 additions & 115 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs-site/src/content/docs/guides/claude-code.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,9 @@ Claude Code's `/effort` setting is preserved across the adapter:
364364
| `thinking.type: "enabled"` + `budget_tokens` | ≤4096→`low`, ≤16384→`medium`, above→`high` |
365365
| `thinking.type: "disabled"` | Reasoning parameters omitted entirely |
366366

367-
The resolved value appears in the request log's **Reasoning effort** column.
367+
The request log shows the parsed request and, when the routed adapter exposes an outbound
368+
diagnostic, the exact serialized value under **Requested → sent**. “Sent” confirms what
369+
CodexCommander put on the wire, not that the upstream provider applied it.
368370

369371
## Inbound translation (Messages → Responses)
370372

‎docs-site/src/content/docs/guides/macos-menu-bar.md‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,17 @@ the token in a browser URL.
179179

180180
When the companion opens the dashboard, it asks that verified local proxy for a short-lived,
181181
single-use launch ticket. The ticket appears only in the URL fragment and is removed during its
182-
one-time exchange; the durable admin token never enters the URL or web storage. The resulting
183-
full-featured session is process-memory-only, lasts up to eight hours, and is never renewed. Expiry
184-
or proxy restart makes the next API request return `401`, and the page tells the user to reopen
185-
through the companion or `ccx gui`. A manually opened loopback dashboard receives no API session and
186-
never prompts for or sends the durable admin token.
182+
one-time exchange. The server keeps the resulting full-featured session in process memory for up to
183+
eight hours. The browser mirrors only its session token, CSRF token, origin, and absolute expiry in
184+
`sessionStorage`, so a refresh works while that server session remains valid. It is never
185+
renewed. Expiry, proxy restart, or a rejecting `401` clears the browser record and tells the user to
186+
reopen through the companion or `ccx gui`. Neither the durable admin token nor the launch ticket enters
187+
browser storage, and authentication never uses `localStorage`. Same-origin script can read
188+
`sessionStorage`, so this reload convenience is not OS-user isolation. Browsers may copy the record
189+
into duplicated or opener-created tabs, or restore it with a restored tab; every copy remains bound
190+
to the exact origin and CSRF token and is usable only until the fixed server expiry, a proxy restart,
191+
or a rejecting `401`. A manually opened loopback
192+
dashboard receives no API session and never prompts for or sends the durable admin token.
187193

188194
Provider credentials remain owned by CodexCommander. The companion never reads ChatGPT, Kimi, Grok,
189195
Anthropic, or other provider tokens and never calls provider login endpoints directly.

‎docs-site/src/content/docs/guides/web-dashboard.md‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,18 @@ session; loopback is not an authentication bypass.
3232

3333
For the full dashboard, open it with `ccx gui` or the macOS menu app. The launcher uses admin authority
3434
to mint a short-lived, single-use ticket, puts only that ticket in the URL fragment, and the dashboard
35-
removes it immediately as it exchanges it for a confirmed session. A confirmed session lives only in
36-
the proxy and browser process for up to eight hours and is never renewed. Expiry or a proxy restart
37-
makes the next API request return `401`, and the loopback page requires a new launcher handoff. The
38-
durable admin token never enters the URL or browser storage.
35+
removes it immediately as it exchanges it for a confirmed session. The server keeps that session in
36+
process memory for up to eight hours. The browser mirrors only its session token, CSRF token, origin,
37+
and absolute expiry in `sessionStorage`, so refreshing keeps working while
38+
the server session remains valid. The session is never renewed. Expiry, a proxy restart, or a rejecting
39+
`401` clears the browser record and requires a new launcher handoff. Neither the durable admin token
40+
nor the launch ticket enters browser storage, and authentication never uses `localStorage`.
41+
42+
Same-origin script can read `sessionStorage`. This small reload convenience is therefore not OS-user
43+
isolation; it does not replace the launcher's listener check or the server's origin and CSRF checks.
44+
Browsers may copy the record into duplicated or opener-created tabs, or restore it with a restored
45+
tab; every copy remains bound to the exact origin and CSRF token and is usable only until the fixed
46+
server expiry, a proxy restart, or a rejecting `401`.
3947

4048
A dashboard bound to a non-loopback hostname may use the admin token
4149
(`CODEXCOMMANDER_ADMIN_AUTH_TOKEN`, or the auto-generated `~/.codexcommander/admin-api-token` file),
@@ -45,8 +53,8 @@ as loopback, then open it through `ccx gui`. Raw admin remains available to head
4553
clients, but catalog Apply is deliberately restricted to a confirmed local dashboard launch.
4654

4755
On trusted HTTPS, a remote dashboard presents a standard password form so a browser password manager
48-
can offer to save and autofill the credential. The dashboard itself still keeps the token only in
49-
memory and does not write it to `localStorage` or `sessionStorage`; whether it is saved is entirely
56+
can offer to save and autofill the credential. The dashboard itself still keeps that raw admin token
57+
only in memory and does not write it to `localStorage` or `sessionStorage`; whether it is saved is entirely
5058
the browser or password manager's decision.
5159

5260
## What you can do
@@ -67,7 +75,7 @@ the browser or password manager's decision.
6775
| **Models** | Toggle native GPT and routed models, set provider allowlists and context caps, choose **Reliable v1**, **Codex native**, or **Concurrent v2**, and configure the v2 thread limit. The Current behavior card reports context as **Uncapped**, **Limited**, or **Mixed limits**. Configured providers stay visible as zero-model groups when discovery is off or returns no rows. Each routed-provider row reports **Auto-discovery on** or **Static catalog only** and links to the owning Provider setting. |
6876
| **Client Apps** | Inspect configured and available local clients, apply or remove managed config where supported, review backups, and reach Codex, Claude Code/Desktop, Grok Build, OpenCode and the file-managed clients without treating providers as clients. |
6977
| **API Access** | Issue and manage keys that authenticate other apps to the CodexCommander proxy. Provider credentials remain under Providers. |
70-
| **Logs** | Auto-refresh recent requests with tokens, requested effort and (when available) effective outbound effort, resolved model, provider, status, request id, duration, and error details. The detail view includes the exact reasoning wire field when the adapter emits one. Filter by opaque conversation/session id (when the client sends one) to total tokens and estimated list-price cost for the currently loaded Logs ring. |
78+
| **Logs** | Auto-refresh recent requests with tokens, requested → sent outbound effort, resolved model, provider, status, request id, duration, and error details. The detail view includes the exact sent reasoning wire field when the adapter emits one. “Sent” is what CodexCommander serialized; it does not prove that the provider accepted, honored, or applied that effort. Filter by opaque conversation/session id (when the client sends one) to total tokens and estimated list-price cost for the currently loaded Logs ring. |
7179
| **Usage / Debug** | Inspect token-usage coverage and trends, or enable opt-in provider transport and usage-extraction diagnostics. |
7280
| **Storage** | Read-only CODEX_HOME disk breakdown (sessions, archives, DBs, attachments). Optional archived cleanup: preview the oldest N%, then quarantine to `CODEX_HOME/.trash` (default) or permanently delete behind an explicit checkbox. **Auto-cleanup policy** is opt-in and **default OFF** (`storageCleanupPolicy.enabled`); configure threshold/target/schedule/mode on the Storage page, or trigger **Run now**. Quarantined entries can be restored from the Storage page (JSONL + threads). Active sessions stay read-only. Cleanup and restore are refused while Codex holds the newest/active `state_*.sqlite` locked. |
7381
| **Stop** | Persist integration OFF, restore and verify native Codex, then stop an unsupervised proxy (`POST /api/stop`). If an installed supervisor owns it, the raw API refuses; use tray or CLI Stop so that flow stops the manager first. |

‎docs-site/src/content/docs/ja/guides/claude-code.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ Claude Code の `/effort` 設定はアダプターでも維持されます。
243243
| `thinking.type: "enabled"` + `budget_tokens` | ≤4096→`low`、≤16384→`medium`、それより大→`high` |
244244
| `thinking.type: "disabled"` | 推論パラメータをすべて省略します |
245245

246-
解釈された値はリクエストログの **Reasoning effort** 列に表示されます。
246+
リクエストログでは、解釈した要求値と、ルーティング先 adapter が outbound 診断を提供する場合は
247+
実際にシリアライズした値を **要求 → 送信** として表示します。「送信」は CodexCommander が wire に
248+
載せた値を示すだけで、上流 provider が適用したことの確認ではありません。
247249

248250
## 入力変換(Messages → Responses)
249251

‎docs-site/src/content/docs/ja/guides/macos-menu-bar.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ ccx sync --restart-codex
149149
ループバックの CodexCommander プロセスにのみ送信します。トークンを表示、ログ記録、コピー、保存したり、
150150
ブラウザー URL に入れたりすることはありません。
151151

152-
コンパニオンがダッシュボードを開くときは、検証済みローカルプロキシに短時間・1 回限りの起動チケットを要求します。チケットは URL フラグメントだけに入り、1 回の交換中に削除されます。永続的な管理トークンが URL や Web Storage に入ることはありません。確認済みの全機能セッションはプロセスメモリ内だけに最大 8 時間存在し、更新されません。期限切れまたはプロキシ再起動後の次の API リクエストは `401` になり、コンパニオンか `ccx gui` から開き直すよう案内されます。手動で開いたループバックダッシュボードには API セッションがなく、永続的な管理トークンを要求も送信もしません。
152+
コンパニオンがダッシュボードを開くときは、検証済みローカルプロキシに短時間・1 回限りの起動チケットを要求します。チケットは URL フラグメントだけに入り、1 回の交換中に削除されます。サーバーは確認済みの全機能セッションをプロセスメモリ内に最大 8 時間保持します。ブラウザーが `sessionStorage` に複製するのはセッショントークン、CSRF トークン、origin、絶対有効期限だけなので、サーバーセッションが有効な間は再読み込みできます。セッションは更新されません。期限切れ、プロキシ再起動、または拒否を示す `401` によりブラウザー側のレコードが消去され、コンパニオンか `ccx gui` から開き直すよう案内されます。永続的な管理トークンも起動チケットもブラウザーストレージには入らず、認証に `localStorage` は使いません。同一 origin のスクリプトは `sessionStorage` を読み取れるため、この再読み込み上の利便性は OS ユーザー分離ではありません。ブラウザーはレコードを複製タブや opener から開いたタブにコピーしたり、タブ復元時に復元したりする場合があります。どのコピーも正確な origin と CSRF トークンに拘束され、固定されたサーバー有効期限、プロキシ再起動、または拒否を示す `401` までしか使用できません。手動で開いたループバックダッシュボードには API セッションがなく、永続的な管理トークンを要求も送信もしません。
153153

154154
プロバイダー認証情報の管理は引き続き CodexCommander が担います。コンパニオンは ChatGPT、Kimi、
155155
Grok、Anthropic、その他のプロバイダートークンを読み取らず、プロバイダーのログイン

‎docs-site/src/content/docs/ja/guides/web-dashboard.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ bun run dev:gui
2525

2626
`localhost`、`*.localhost`、`127.0.0.0/8` 内のアドレス、`::1`、IPv4-mapped の `127/8` アドレスなど、どのループバック形式でも、手動で開いたダッシュボードには API 資格情報がありません。ページの枠は読み込めますが、API リクエストは未認証のままです。`ccx gui` または macOS メニューアプリから開き直してください。別のローカル OS ユーザーが停止中の listener を偽装できるため、ループバックページは永続的な管理トークンを要求も送信もしません。ループバックのブラウザーアクセスには確認済みランチャーセッションが必要で、認証の迂回路にはなりません。
2727

28-
全機能を使うには `ccx gui` または macOS メニューアプリから開きます。ランチャーは管理者権限で短時間・1 回限りのチケットを発行し、そのチケットだけを URL フラグメントに入れます。ダッシュボードは 1 回の交換中にすぐ削除します。交換後の確認済みセッションはプロキシとブラウザープロセスのメモリ内だけに最大 8 時間存在し、更新されません。期限切れまたはプロキシ再起動後の次の API リクエストは `401` になり、ループバックページでは新しいランチャーハンドオフが必要です。永続的な管理トークンが URL やブラウザーストレージに入ることはありません。
28+
全機能を使うには `ccx gui` または macOS メニューアプリから開きます。ランチャーは管理者権限で短時間・1 回限りのチケットを発行し、そのチケットだけを URL フラグメントに入れます。ダッシュボードは 1 回の交換中にすぐ削除します。サーバーは確認済みセッションをプロセスメモリ内に最大 8 時間保持します。ブラウザーが `sessionStorage` に複製するのはセッショントークン、CSRF トークン、origin、絶対有効期限だけなので、サーバーセッションが有効な間は再読み込み後も利用できます。セッションは更新されません。期限切れ、プロキシ再起動、または拒否を示す `401` が発生するとブラウザー側のレコードが消去され、新しいランチャーハンドオフが必要です。永続的な管理トークンも起動チケットもブラウザーストレージには入らず、認証に `localStorage` は使いません。
29+
30+
同一 origin のスクリプトは `sessionStorage` を読み取れます。この再読み込み上の利便性は OS ユーザー分離ではなく、ランチャーによる listener 検証やサーバーの origin/CSRF 検証を置き換えるものではありません。ブラウザーはレコードを複製タブや opener から開いたタブにコピーしたり、タブ復元時に復元したりする場合があります。どのコピーも正確な origin と CSRF トークンに拘束され、固定されたサーバー有効期限、プロキシ再起動、または拒否を示す `401` までしか使用できません。
2931

3032
ループバック以外のホストでは `CODEXCOMMANDER_ADMIN_AUTH_TOKEN` または `~/.codexcommander/admin-api-token` の管理トークンを使用できますが、ブラウザーの入力欄は信頼できる HTTPS origin でだけ有効です。平文のリモートページは bearer を要求も送信もしません。信頼できる HTTPS がない場合は、ダッシュボードをループバックとして提示するローカルまたは SSH tunnel を使い、`ccx gui` から開いてください。生の管理トークンは headless management API client では引き続き使用できますが、カタログ Apply は確認済みのローカルダッシュボード起動だけに制限されます。
3133

32-
信頼できる HTTPS 上のリモートダッシュボードでは標準のパスワードフォームが表示され、ブラウザのパスワードマネージャーで保存・自動入力できます。ダッシュボード自体はトークンをメモリ内だけに保持し、`localStorage` や `sessionStorage` には書き込みません。保存するかどうかはブラウザまたはパスワードマネージャーだけが決定します。
34+
信頼できる HTTPS 上のリモートダッシュボードでは標準のパスワードフォームが表示され、ブラウザのパスワードマネージャーで保存・自動入力できます。ダッシュボード自体はこの生の管理トークンをメモリ内だけに保持し、`localStorage` や `sessionStorage` には書き込みません。保存するかどうかはブラウザまたはパスワードマネージャーだけが決定します。
3335

3436
## できること
3537

@@ -49,7 +51,7 @@ bun run dev:gui
4951
| **モデル** | ネイティブ GPT とルーティングモデルをオン/オフし、プロバイダー許可リストとコンテキスト上限を設定し、**Reliable v1**、**Codex native**、**Concurrent v2** を選択して v2 スレッド数を設定します。「現在の動作」カードではコンテキストを **上限なし**、**制限あり**、**混在** として表示します。各ルーティングプロバイダーには **自動検出オン** または **静的カタログのみ** が表示され、管理元のプロバイダー設定へ移動できます。 |
5052
| **Client Apps** | 設定済み・利用可能なローカルクライアントを確認し、対応する管理設定の適用/削除とバックアップ確認を行い、プロバイダーと混同せずに Codex、Claude Code/Desktop、Grok Build、OpenCode、ファイル管理クライアントへ移動します。 |
5153
| **API Access** | 他のアプリが CodexCommander プロキシへ接続するための認証キーを発行・管理します。上流プロバイダーの認証情報は Providers に残ります。 |
52-
| **ログ** | トークン、要求された強度と(利用可能な場合は)実際に送信された強度、実際のモデル、プロバイダー、状態、リクエスト ID、所要時間、エラー詳細を含む最近のリクエストを自動更新します。アダプターが reasoning パラメーターを送信した場合、詳細表示に正確な wire field も表示されます。 |
54+
| **ログ** | トークン、要求 → 送信した outbound 強度、実際のモデル、プロバイダー、状態、リクエスト ID、所要時間、エラー詳細を含む最近のリクエストを自動更新します。アダプターが reasoning パラメーターを送信した場合、詳細表示に正確な送信 wire field も表示されます。「送信」は CodexCommander がシリアライズした値であり、プロバイダーがその強度を受理、尊重、適用した証拠ではありません。 |
5355
| **使用量 / デバッグ** | トークン使用量の測定範囲と推移を見るか、オプションのプロバイダートランスポート/使用量抽出診断をオンにします。 |
5456
| **ストレージ** | CODEX_HOME のディスク内訳(セッション、アーカイブ、DB、添付)を読み取り専用で表示。任意のアーカイブクリーンアップ: 最古 N% をプレビューし、既定では `CODEX_HOME/.trash` へ隔離、または明示チェックで完全削除。**自動クリーンアップ方針**はオプトインで**既定 OFF**(`storageCleanupPolicy.enabled`)。Storage ページでしきい値/目標/スケジュール/モードを設定するか **今すぐ実行**。隔離エントリは Storage ページから復元可能(JSONL + スレッド)。アクティブセッションは読み取り専用。最新/アクティブな `state_*.sqlite` がロック中はクリーンアップと復元を拒否。 |
5557
| **停止** | 統合を OFF に保存し、ネイティブ Codex を復元・検証してから、supervisor のないプロキシを停止します (`POST /api/stop`)。インストール済み supervisor が所有している場合、raw API は拒否します。manager を先に停止するトレイまたは CLI の Stop を使用してください。 |

0 commit comments

Comments
 (0)