Skip to content

Commit 9ccd9b3

Browse files
committed
Merge dev and align desktop MSRV with pinned Tauri crates
2 parents 2ca541e + c618c77 commit 9ccd9b3

1,568 files changed

Lines changed: 111985 additions & 12590 deletions

File tree

Some content is hidden

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

‎.github/workflows/ci.yml‎

Lines changed: 38 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ on:
7777
# Nightly safety net. The Windows shards run on a pull request only when the
7878
# changes job judges it Windows-sensitive, so anything that slips past that
7979
# filter must still be caught within a day: a scheduled run requests the full
80-
# lane=all matrix (nine Windows shards and the macOS control included).
80+
# lane=all matrix (eleven Windows shards and the macOS control included).
8181
#
8282
# GitHub runs schedules from the DEFAULT branch, which is main, so this
8383
# trigger activates only once this file reaches main by promotion, and the
@@ -235,7 +235,7 @@ jobs:
235235
# Push, dispatch and schedule run both regardless; see the docker/keyring filters.
236236
docker: ${{ steps.narrow.outputs.docker }}
237237
keyring: ${{ steps.narrow.outputs.keyring }}
238-
# Whether this pull request needs the nine Windows shards: the windows path
238+
# Whether this pull request needs the Windows shards: the windows path
239239
# filter below OR an added src/tests line naming a Windows marker. Computed
240240
# by scripts/ci/windows-sensitive-diff.sh, which validates its input and
241241
# treats the diff as data.
@@ -428,7 +428,7 @@ jobs:
428428
- 'package.json'
429429
- 'bun.lock'
430430
- '.github/workflows/ci.yml'
431-
# Paths whose change selects the nine Windows suite shards on a pull
431+
# Paths whose change selects the Windows suite shards on a pull
432432
# request. These carry the Windows service, update, shim, intercept,
433433
# ACL and process code, and the harness every Windows shard runs.
434434
# scripts/ci/windows-sensitive-diff.sh adds the content markers.
@@ -696,10 +696,7 @@ jobs:
696696
# gui/package.json. Without this the affected shards die on
697697
# `Cannot find module 'react/jsx-dev-runtime'` while the other shards pass.
698698
- name: Install dependencies
699-
run: |
700-
bun install --frozen-lockfile
701-
cd gui
702-
bun install --frozen-lockfile
699+
run: bash scripts/ci/bun-install-frozen.sh . gui
703700

704701
# Nor is the build. Tests that fetch the served dashboard read the session
705702
# bootstrap meta tags out of `gui/dist/index.html`, so without a build the
@@ -734,7 +731,7 @@ jobs:
734731
with:
735732
role: test-runner # See the Bun roles contract above test.
736733
- name: Install dependencies and build the GUI the tests serve
737-
run: bun install --frozen-lockfile && cd gui && bun install --frozen-lockfile && bun run build
734+
run: bash scripts/ci/bun-install-frozen.sh . gui && cd gui && bun run build
738735
- name: Test the files this pull request reaches
739736
run: bash scripts/ci/run-changed-tests.sh
740737

@@ -760,10 +757,7 @@ jobs:
760757
role: test-runner # See the Bun roles contract above test.
761758

762759
- name: Install dependencies
763-
run: |
764-
bun install --frozen-lockfile
765-
cd gui
766-
bun install --frozen-lockfile
760+
run: bash scripts/ci/bun-install-frozen.sh . gui
767761

768762
- name: Build GUI
769763
run: |
@@ -802,10 +796,7 @@ jobs:
802796
role: test-runner # See the Bun roles contract above test.
803797

804798
- name: Install dependencies
805-
run: |
806-
bun install --frozen-lockfile
807-
cd gui
808-
bun install --frozen-lockfile
799+
run: bash scripts/ci/bun-install-frozen.sh . gui
809800

810801
- name: Build GUI
811802
run: |
@@ -840,10 +831,7 @@ jobs:
840831
role: test-runner # See the Bun roles contract above test.
841832

842833
- name: Install dependencies
843-
run: |
844-
bun install --frozen-lockfile
845-
cd gui
846-
bun install --frozen-lockfile
834+
run: bash scripts/ci/bun-install-frozen.sh . gui
847835

848836
- name: GUI lint
849837
if: needs.changes.outputs.gui == 'true'
@@ -897,29 +885,29 @@ jobs:
897885
run: bun run src/cli/index.ts help
898886

899887
platform-macos:
900-
name: macos ${{ matrix.shard }}/3
888+
name: macos ${{ matrix.shard }}/4
901889
needs: changes
902890
# Never on pull requests: macOS legs run after merge, on push to
903891
# main/preview, and on dispatch and the schedule.
904892
if: github.event_name != 'pull_request'
905893
runs-on: macos-latest
906-
# Three shards. Unsharded, this job was the critical path on every green dev
907-
# push (mean 14.9 min against a 4.7 min Linux maximum; devlog
908-
# 260905_test_modularization_and_windows/003), so it was split in two. The
909-
# suite then outgrew two halves: across seventeen dev dispatches from
910-
# 2026-10-04 to 10-12 the slower half's test step went from 867s to 1155s,
911-
# and run 38214884055 cancelled macos 2/2 at this cap with 68 files left
912-
# while every test it had run was passing (#6978). Replaying the duration
913-
# assignment against those runs' measured per-file times puts the slowest of
914-
# three shards at 635-796s of tests, about 14 minutes with setup. The cap
915-
# stays 20: the suite needs another shard, not a longer wait, and a wedged
916-
# shard (#4956) is still cut off as early as before. The full-membership
917-
# control runs the same bounded batches without sharding on explicit dispatch.
894+
# Four shards. Three replaced two after run 38214884055 hit this cap with
895+
# 68 files left and no failing tests (#6978). The suite outgrew three too:
896+
# run 40727740334 took 13.1-16.4m, 40743681086 12.7-13.7m, and
897+
# 40756291846 15.0-17.1m. In dev lane=all run 40766068492 (b16bc0978b),
898+
# macos 1/3 (123090588998) reached batch 73/88 and macos 2/3
899+
# (123090589363) batch 93/93 before this cap cancelled them, with no failing
900+
# tests. The cap stays 20: the suite needs another shard, not a longer wait,
901+
# and a wedged shard (#4956) is still cut off as early as before. Four suite
902+
# shards + control + widget/bundle request six macOS jobs for five runner
903+
# slots: one queues, and each run pays one extra shard's setup overhead.
904+
# The full-membership control runs the same bounded batches without sharding
905+
# on explicit dispatch.
918906
timeout-minutes: 20
919907
strategy:
920908
fail-fast: false
921909
matrix:
922-
shard: [1, 2, 3]
910+
shard: [1, 2, 3, 4]
923911
steps:
924912
- name: Checkout
925913
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
@@ -965,7 +953,7 @@ jobs:
965953
966954
- name: Test in fresh-process batches
967955
env:
968-
TEST_SHARD: ${{ matrix.shard }}/3
956+
TEST_SHARD: ${{ matrix.shard }}/4
969957
BUN_TEST_FILE_SCOPE: all
970958
BUN_TEST_BATCH_SIZE: '12'
971959
BUN_TEST_PARALLEL: '1'
@@ -1077,7 +1065,7 @@ jobs:
10771065
# each landed with green pull-request CI while breaking Windows, which is why
10781066
# that dispatch is part of merging a Windows-sensitive pull request.
10791067
platform-windows:
1080-
name: windows ${{ matrix.shard }}/9
1068+
name: windows ${{ matrix.shard }}/11
10811069
needs: [changes, select-windows-runner]
10821070
if: >-
10831071
github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' && (github.event.inputs.lane == '' || github.event.inputs.lane == 'all')
@@ -1108,21 +1096,18 @@ jobs:
11081096
# test deadline and all six shards, but left the whole batch and cleanup a
11091097
# 30-minute bound.
11101098
#
1111-
# Six shards then grew into the 30-minute ceiling too. Across seven lane=all
1112-
# dispatches the six shard totals were 114.3-133.2 minutes. The worst observed
1113-
# shard imbalance was 1.43x its dispatch's per-shard average. Eight shards leave
1114-
# no margin: 133.2 / 8 * 1.43 * 1.25 = 29.8 minutes after the already-observed
1115-
# 25% run-to-run slowdown. Nine gives 133.2 / 9 * 1.43 * 1.25 = 26.5 minutes.
1116-
# Keep the 30-minute bound and pay for three more concurrent runners plus their
1117-
# repeated checkout/install/build setup so test work, rather than the ceiling,
1118-
# shrinks. The per-batch timeout below is independent: it aborts a stuck Bun
1119-
# process but adds no delay to a healthy one, so calibrating it does not change
1120-
# this total-work projection.
1099+
# Nine shards also reached the ceiling: run 40756291846 cancelled 7/9 at batch
1100+
# 49/60; run 40743681086's successful shards took 22.1-29.5 minutes. Refreshing
1101+
# Windows weights from completed primary batches in both runs puts test work
1102+
# at 24.36/21.92/19.93 minutes with 9/10/11 shards. With the observed 2.4-minute
1103+
# maximum setup, eleven projects ~22.4 minutes; 25% test variance makes ~27.3.
1104+
# Pay for two extra setups (~3.3 runner-minutes at the older run's mean), keep
1105+
# the 30-minute job bound and all tests, and leave batch deadlines independent.
11211106
timeout-minutes: 30
11221107
strategy:
11231108
fail-fast: false
11241109
matrix:
1125-
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9]
1110+
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
11261111
steps:
11271112
- name: Show selected runner
11281113
shell: bash
@@ -1202,7 +1187,7 @@ jobs:
12021187
# and service-manager guard before the lock boundary.
12031188
shell: bash
12041189
env:
1205-
TEST_SHARD: ${{ matrix.shard }}/9
1190+
TEST_SHARD: ${{ matrix.shard }}/11
12061191
BUN_TEST_FILE_SCOPE: all
12071192
BUN_TEST_BATCH_SIZE: "6"
12081193
BUN_TEST_BATCH_TIMEOUT_SECONDS: "480"
@@ -1341,7 +1326,7 @@ jobs:
13411326
# aggregate reported success while nothing had read the change (#5001).
13421327
#
13431328
# Running the gate directly here, rather than adding `structure/**` to `ci`,
1344-
# keeps a prose edit from starting nine Windows shards and two macOS shards for
1329+
# keeps a prose edit from starting the Windows shards and macOS shards for
13451330
# a check that takes seconds. It runs whenever `structure/` changes, including
13461331
# alongside a `src/` change where the suite covers it too; a duplicate of a
13471332
# seconds-long check is not worth a condition that could be wrong.
@@ -1893,7 +1878,7 @@ jobs:
18931878
if [ -z "$LANE" ] || [ "$LANE" = "all" ] || [ "$LANE" = "macos-control" ]; then
18941879
dispatch=requested
18951880
fi
1896-
# Only the default/all lane requests the nine Windows suite shards.
1881+
# Only the default/all lane requests the Windows suite shards.
18971882
if [ -z "$LANE" ] || [ "$LANE" = "all" ]; then
18981883
windows=requested
18991884
fi
@@ -1965,10 +1950,10 @@ jobs:
19651950
# started: five successes and one skipped leg roll up to `success`. No matrix here
19661951
# carries a per-leg `if:`, so a leg can only be skipped when its whole job is, which
19671952
# the expectation table above already catches. What that table cannot catch is a
1968-
# matrix that produced FEWER legs than the nine a dispatch is run to read, so count
1969-
# them by name. The nine Windows legs are the entire output of that dispatch.
1953+
# matrix that produced FEWER legs than the eleven a dispatch is run to read, so count
1954+
# them by name. The eleven Windows legs are the entire output of that dispatch.
19701955
if [ "$windows" = requested ]; then
1971-
shards=9
1956+
shards=11
19721957
# `filter=latest` (the default) is the latest execution of each job in the run,
19731958
# which is what a human reading the run sees. Asking for one ATTEMPT instead would
19741959
# fail every partial re-run: "Re-run failed jobs" puts only the repaired shard in

‎.github/workflows/cleanup-orphaned-workflows.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ jobs:
3535
persist-credentials: false
3636

3737
- name: Setup Bun
38-
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
39-
with:
40-
bun-version: 1.4.2
38+
# The repository composite reads package.json dependencies.bun from the
39+
# checkout above, so this job cannot drift from the runtime pin.
40+
uses: ./.github/actions/setup-project-bun
4141

4242
- name: Remove stale workflow histories
4343
env:

‎.github/workflows/deploy-docs.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929
with:
3030
path: ./docs-site
3131
node-version: 22
32-
package-manager: bun@latest
32+
# Must equal package.json dependencies.bun (asserted in ci-workflows.test.ts).
33+
package-manager: [email protected]
3334

3435
deploy:
3536
needs: build

‎AGENTS.md‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ it binds you regardless of which mechanism is within reach.
195195

196196
```bash
197197
bun install
198-
bun run typecheck # bun x tsc --noEmit (strict)
198+
bun run typecheck # bun check --no-script --noEmit (strict)
199199
bun run test:changed # import-graph tests against the resolved `dev` merge base
200200
bun run test # full tests/ suite (default before review)
201201
bun run lint:gui # GUI eslint
@@ -375,6 +375,20 @@ than nudged.
375375
add `ci:full` for changes it cannot see (subprocesses, files read as data, generated output).
376376
- Full cross-platform (macOS/Windows) CI runs **only** via manual
377377
`workflow_dispatch` and on push to `main`/`preview` (release lines).
378+
- A manual `lane=all` dispatch is a **batch check on `dev`**, never a per-PR gate.
379+
One run is about 32 jobs (11 Windows, at least 6 macOS, 15 Linux) and six runner-hours, and the
380+
account has only five macOS slots (a macOS job can queue), so per-PR dispatches starve
381+
every other check. On 2026-10-27, parallel agent lanes dispatched 48 of them in twelve hours (about 13,000
382+
runner-minutes). The queue passed 200 runs, and ordinary PR checks waited hours to start.
383+
- Merge a pull request, including a Windows- or macOS-sensitive one, on its green PR
384+
CI. After a batch of merges, run one `gh workflow run ci.yml --ref dev` as described
385+
under "Batched merges". If it is red, stop merging and fix `dev` from that batch.
386+
- Do not dispatch `lane=all` for a PR branch unless a maintainer explicitly asks for it
387+
on that PR. Even then, run it once, on the exact head about to merge. Never re-dispatch
388+
because the head moved (an `origin/dev` merge or a review fix), and never rerun to
389+
green. Cancel your own superseded dispatches with `gh run cancel`.
390+
- Every description edit or label change starts three event-gate workflows. Batch those
391+
edits, and keep the number of agents working pull requests in parallel small.
378392
- **Never** add a `dev` push trigger, or `pull_request` runs for macOS/Windows
379393
jobs, to any workflow. PRs that change this policy will be closed.
380394

‎README.md‎

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<p align="center">
2-
<img src="assets/banner.png" alt="opencodex — universal provider proxy for Codex, Claude Code, Claude Desktop and Grok Build" width="100%">
2+
<img src="assets/banner.png" alt="opencodex — one local gateway for Codex, Claude Code, Claude Desktop, Grok Build and more" width="100%">
33
</p>
44

5-
<h3 align="center">make codex open!</h3>
6-
<p align="center"><b>Universal provider proxy for OpenAI Codex, Claude Code, Claude Desktop &amp; Grok Build</b><br>
7-
Two commands, and every one of them runs any LLM you point it at.</p>
5+
<h3 align="center">One local gateway for your AI coding tools and models.</h3>
6+
<p align="center"><b>Use the models you choose with Codex, Claude Code, Claude Desktop and Grok Build,<br>
7+
and connect OpenCode, Pi, Qoder, WorkBuddy, Kilo, Cline, T3 Code and more through managed configs.</b><br>
8+
<a href="https://opencodex.me/reference/client-support/">See every supported tool →</a></p>
89

910
<p align="center">
1011
<a href="https://x.com/claudeebum"><img src="https://img.shields.io/badge/%40claudeebum-000000?logo=x&logoColor=white" alt="Follow @claudeebum on X"></a>
@@ -80,10 +81,12 @@ Sol drives the session and calls a Kimi K3 subagent.
8081
<a href="README.md">English</a> · <a href="readme/README.fr.md">Français</a> · <a href="readme/README.ko.md">한국어</a> · <a href="readme/README.zh-CN.md">简体中文</a> · <a href="readme/README.zh-TW.md">繁體中文</a> · <a href="readme/README.ru.md">Русский</a> · <a href="readme/README.ja.md">日本語</a> · <a href="readme/README.tr.md">Türkçe</a> · 📖 <a href="https://opencodex.me/"><b>Full documentation →</b></a>
8182
</p>
8283

83-
opencodex is a lightweight local proxy that translates Codex's Responses API into whatever your
84-
provider speaks — streaming, tool calls, reasoning tokens, images, in both directions. Use Claude,
85-
Gemini, Grok, GLM, DeepSeek, Kimi, Qwen, Ollama, or any other LLM with Codex, Claude Code, Claude
86-
Desktop, and Grok Build. It can also manage a **ChatGPT account pool** for Codex auth: add accounts,
84+
opencodex is a lightweight local gateway between your coding tools and your model providers. It
85+
accepts the Responses, Chat Completions and Anthropic Messages APIs and translates each request into
86+
whatever your provider speaks, carrying streaming, tool calls, reasoning and images where the client,
87+
model and provider support them. Use Claude, Gemini, Grok, GLM, DeepSeek, Kimi, Qwen, Ollama and other
88+
providers with Codex, Claude Code, Claude Desktop, Grok Build and the tools listed on the
89+
[client support page](https://opencodex.me/reference/client-support/). It can also manage a **ChatGPT account pool** for Codex auth: add accounts,
8790
refresh their quotas in the dashboard, and let new sessions auto-route to the lowest-usage healthy
8891
account while existing threads stay pinned to the account that started them.
8992

@@ -102,6 +105,22 @@ Open **http://localhost:10100** and configure everything in the web dashboard
102105
(40+ built-ins, or any OpenAI-compatible endpoint), pick models, manage accounts. `ocx gui`
103106
re-opens the dashboard at any time.
104107

108+
### Connect your tool
109+
110+
Connect the tool you already use:
111+
112+
| Tool | How to connect |
113+
|---|---|
114+
| Codex | Turn on the Codex switch on the dashboard's **Connect** page, then run `codex` as usual. On a local listener this points Codex's built-in provider at the proxy. From the terminal, run `ocx init` before adding providers in the dashboard and accept its Codex prompt. |
115+
| Claude Code | With the `claude` CLI installed, run `ocx claude`. It starts the proxy if needed and launches Claude Code through it. |
116+
| Claude Desktop | Run `ocx claude desktop`. On a new install it sets up the gateway profile for the whole app; an existing first-party setup is kept, and `ocx claude desktop apply --gateway` switches explicitly. See the [Claude Code guide](https://opencodex.me/guides/claude-code/). Fully quit and reopen Claude Desktop after a switch. |
117+
| Grok Build | On a local listener with Grok integration enabled, `ocx start` registers the models when `~/.grok` exists; pick an `ocx-*` model in Grok Build. Remote setups: see the [Grok Build guide](https://opencodex.me/guides/grok-build/). After adding providers, restart the proxy (or run `ocx ensure` when Codex autostart is enabled) to refresh the list. |
118+
| Tools with a managed integration | Use the dashboard **Connect** page, or `ocx integration client enable --client <id>`. |
119+
| Any other tool | Set a custom OpenAI-compatible base URL of `http://localhost:10100/v1`, or an Anthropic base URL of `http://localhost:10100`. |
120+
121+
The [client support page](https://opencodex.me/reference/client-support/) lists which path each tool has
122+
and which protocol it speaks.
123+
105124
<details>
106125
<summary><b>Desktop app (beta)</b></summary>
107126

0 commit comments

Comments
 (0)