@bman654/clodex 2.17.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -7
- package/dist/{chunk-5TG736TX.js → chunk-YGEPQOPA.js} +3 -3
- package/dist/chunk-YGEPQOPA.js.map +1 -0
- package/dist/claude-wrapper.js +1 -1
- package/dist/cli.js +372 -124
- package/dist/cli.js.map +1 -1
- package/docs/background-agents.md +3 -1
- package/docs/windows-setup.md +27 -4
- package/package.json +1 -1
- package/dist/chunk-5TG736TX.js.map +0 -1
package/README.md
CHANGED
|
@@ -124,8 +124,8 @@ Launch Claude Code bridged to configured model providers. Unrecognized flags (an
|
|
|
124
124
|
| `--dry-run` | Run the wizard but print a launch preview instead of launching (never persists anything) |
|
|
125
125
|
| `--trace` | Write debug logs to `~/.clodex/logs/` and show errors on exit |
|
|
126
126
|
| `--fast` | Request Codex fast mode (`service_tier=priority`) for ChatGPT/Codex OAuth routes; equivalent to `CLODEX_SERVICE_TIER=fast` |
|
|
127
|
-
| `--provider <id>` |
|
|
128
|
-
| `--model <id>` |
|
|
127
|
+
| `--provider <id>` | Endpoint mode only: boot provider id (`openai`, `openai-oauth`, or `opencode-go`); with `--model`, skips the wizard |
|
|
128
|
+
| `--model <id>` | Endpoint mode only: boot model id; with `--provider`, skips the wizard |
|
|
129
129
|
| `--context <model=stop>` | Use a different share of a model's context window for this launch only; never saved. Reaches Claude Code through the exported catalog, so a binary patched by `clodex patch` keeps its baked window until the stop is saved and the patch re-run |
|
|
130
130
|
| `--help`, `--version` | Help / version |
|
|
131
131
|
|
|
@@ -203,6 +203,8 @@ On Windows, when Claude Code was installed with `npm install -g`, the `claude` o
|
|
|
203
203
|
|
|
204
204
|
The patch map is built from your favorites and aliases; context windows come from provider metadata. A pristine per-version backup is kept — recorded against the install it was made for, so a machine with two installs of one Claude Code version restores each from its own bytes — and a manifest (`~/.clodex/patch-state.json`) makes re-runs no-ops until your config or Claude Code version changes — then the binary is restored first and re-patched fresh. `clodex claude` checks patch freshness at launch and offers to re-patch (a non-blocking notice when not interactive). Re-run `clodex patch` after every `claude` update.
|
|
205
205
|
|
|
206
|
+
If an editor has the Claude Code extension installed at a different version from the Claude Code `clodex patch` just patched — the extension and the CLI update independently, so they can end up on different versions — `clodex patch` warns and prints the commands that align them (for example `npm install -g @anthropic-ai/claude-code@2.1.276` then `clodex patch` for a global npm install, or `claude install 2.1.276` for a native install; any other install, such as Claude Code's own `~/.claude/local` install or a project's `node_modules`, is named with its path so you can update it with the tool that installed it). An editor launching Claude Code through `clodex-claude` runs the patched install only when the two builds match, so until then its model picker drops the clodex models. The editors checked are VS Code, VS Code Insiders, the VS Code remote server (`~/.vscode-server`), VSCodium, Cursor and Windsurf, each in its default extensions directory under your home; nothing is printed when none of them has the extension. The check compares version numbers only, so no warning does not prove the builds match, and it never modifies the extension directory.
|
|
207
|
+
|
|
206
208
|
#### Local patches (trusted code)
|
|
207
209
|
|
|
208
210
|
Local patches are an explicitly enabled extension layer for private transforms that do not belong in clodex itself. Put one self-contained ES module at `~/.clodex/local-patches.mjs` (or `$CLODEX_HOME/local-patches.mjs`) and opt in with `clodex patch --enable-local-patches`. It must be a regular UTF-8 file no larger than 1 MiB. File presence alone never loads it.
|
|
@@ -251,9 +253,13 @@ A context window is a cost dial as much as a capacity number. OpenAI prices GPT-
|
|
|
251
253
|
and later prompts above **272,000 input tokens at 2x input and 1.5x output for the
|
|
252
254
|
full request**, which is why the Codex catalog reports a 272,000 window rather than
|
|
253
255
|
the model's ceiling. Newer families inherit the same boundary, so a model released
|
|
254
|
-
after this was written is covered without a clodex update.
|
|
255
|
-
|
|
256
|
-
ask for.
|
|
256
|
+
after this was written is covered without a clodex update. For ChatGPT/Codex-plan
|
|
257
|
+
models whose catalog reports that window, the default `standard` stop stays at the
|
|
258
|
+
line and a larger window is something you ask for. **OpenAI API-key models retain
|
|
259
|
+
their full API context window by default**, so their `standard` stop can already
|
|
260
|
+
exceed the pricing boundary. Choose a smaller numeric stop if you want to limit
|
|
261
|
+
exposure to the higher rate, for example
|
|
262
|
+
`clodex models --context clodex:openai:gpt-6-sol=250k --save`.
|
|
257
263
|
|
|
258
264
|
```sh
|
|
259
265
|
clodex models --context sol=max --save # this model's default, with a cost warning
|
|
@@ -266,7 +272,9 @@ window a client should fill, and the account ceiling a larger stop can reach. A
|
|
|
266
272
|
above the ceiling is clamped and says so. When a request's own reported token count
|
|
267
273
|
crosses the boundary, clodex warns once per model for the life of the process,
|
|
268
274
|
because the client's token count and the provider's differ after translation and only
|
|
269
|
-
the provider's settles it.
|
|
275
|
+
the provider's settles it. This warning covers both OpenAI API keys and ChatGPT/Codex
|
|
276
|
+
plans, including model lists saved before pricing warnings were supported; no manual
|
|
277
|
+
model refresh is needed.
|
|
270
278
|
|
|
271
279
|
Two things worth knowing about the numbers:
|
|
272
280
|
|
|
@@ -302,13 +310,24 @@ Two things worth knowing about the numbers:
|
|
|
302
310
|
| `remove <id>` | Remove a provider by id |
|
|
303
311
|
| `refresh-models [id]` | Update cached model lists |
|
|
304
312
|
|
|
313
|
+
For ChatGPT-plan models using Responses-Lite (the catalog's `use_responses_lite` flag),
|
|
314
|
+
refresh warns when the catalog requires a newer Codex client version than clodex sends.
|
|
315
|
+
Those models stay cached but are hidden from clodex's selectable catalog to avoid version
|
|
316
|
+
rejections. Update clodex to a release supporting the required version to make them
|
|
317
|
+
available again. Saved favorites and aliases are preserved but unavailable while their
|
|
318
|
+
models are hidden. Older caches without this metadata need a refresh for newly discovered
|
|
319
|
+
models. Known built-in models use their seeded minimums when absent from the cache and
|
|
320
|
+
their seeded flags when discovery omits them. Models not using Responses-Lite do not send
|
|
321
|
+
this version header and are not hidden by this check. This check does not establish your
|
|
322
|
+
account's model entitlement.
|
|
323
|
+
|
|
305
324
|
Providers supported: `openai` (API key, platform.openai.com), `openai-oauth` (ChatGPT/Codex plan), and `opencode-go` (OpenCode Go API key). OpenCode Go exposes its Anthropic Messages, Chat Completions, and Responses models; entries whose transport has not been verified against the live endpoint are left out. See [OpenCode Go provider](docs/opencode-go.md).
|
|
306
325
|
|
|
307
326
|
A **custom OpenAI-compatible server** is any OpenAI-style API, given by its base URL (the part before `/chat/completions`), such as `https://openrouter.ai/api/v1`. `providers add` asks for a name, the base URL and an API key (leave it empty for a local server without auth), lists the server's models to check the connection, and saves the provider as `custom-<name>`. Its models then appear in `clodex models`; once saved as favorites they are addressed as `clodex:custom-<name>:<model>` and can be given a short alias with `clodex models --alias`. The base URL is checked before anything is saved: plain `http://` is accepted only after you confirm it, and only for loopback or private-network addresses, and an `https://` URL whose host is, or resolves to, a loopback (`127.0.0.0/8`, `::1`), private, link-local, unique-local, carrier-grade-NAT or well-known cloud-metadata address is refused. A model's id and name are stored with surrounding whitespace trimmed, and a model whose trimmed id or name still contains a control character is skipped, whether the list is fetched by `providers add` or by `providers refresh-models`, and error text from the server is shown with control characters replaced by spaces. Only the OpenAI-compatible kind is offered in the menu.
|
|
308
327
|
|
|
309
328
|
### `clodex install-vscode-launcher`
|
|
310
329
|
|
|
311
|
-
Windows only. Builds `%USERPROFILE%\.clodex\bin\clodex-claude.exe`, the executable the Claude Code VS Code extension can use as its `claudeCode.claudeProcessWrapper`, so chats in the editor launch Claude Code through `clodex-claude` (on Windows npm installs that wrapper as three script shims — extensionless, `.cmd`, `.ps1` — and no executable the extension can spawn). It compiles a short C# source shipped in the package with the compiler already inside the .NET Framework — nothing is downloaded — and prints the setting to paste; it never edits VS Code or Claude settings. The paths to `node.exe` and the clodex install are compiled in, so re-run it after switching Node versions or moving clodex. Setup guide: [docs/windows-setup.md](docs/windows-setup.md).
|
|
330
|
+
Windows only. Builds `%USERPROFILE%\.clodex\bin\clodex-claude.exe`, the executable the Claude Code VS Code extension can use as its `claudeCode.claudeProcessWrapper`, so chats in the editor launch Claude Code through `clodex-claude` (on Windows npm installs that wrapper as three script shims — extensionless, `.cmd`, `.ps1` — and no executable the extension can spawn). It compiles a short C# source shipped in the package with the compiler already inside the .NET Framework — nothing is downloaded — and prints the setting to paste; it never edits VS Code or Claude settings. The paths to `node.exe` and the clodex install are compiled in, so re-run it after switching Node versions or moving clodex. Like `clodex patch`, it warns when an installed Claude Code extension is a different version from the Claude Code clodex last patched (on any platform). Setup guide: [docs/windows-setup.md](docs/windows-setup.md).
|
|
312
331
|
|
|
313
332
|
### Root
|
|
314
333
|
|
|
@@ -1752,8 +1752,8 @@ function computeWrapperEnv(baseEnv, state) {
|
|
|
1752
1752
|
// src/patch-manifest.ts
|
|
1753
1753
|
import { readFileSync as readFileSync5 } from "fs";
|
|
1754
1754
|
import { join as join5 } from "path";
|
|
1755
|
-
function getPatchManifestPath() {
|
|
1756
|
-
return join5(getAppHome(), "patch-state.json");
|
|
1755
|
+
function getPatchManifestPath(env = process.env) {
|
|
1756
|
+
return join5(getAppHome(env), "patch-state.json");
|
|
1757
1757
|
}
|
|
1758
1758
|
function readPatchManifest(path = getPatchManifestPath()) {
|
|
1759
1759
|
try {
|
|
@@ -2206,4 +2206,4 @@ export {
|
|
|
2206
2206
|
planRestoreOnly,
|
|
2207
2207
|
collectPristineFacts
|
|
2208
2208
|
};
|
|
2209
|
-
//# sourceMappingURL=chunk-
|
|
2209
|
+
//# sourceMappingURL=chunk-YGEPQOPA.js.map
|