diff --git a/CHANGELOG.md b/CHANGELOG.md index e7864baa..6c4b979a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.3.0] - 2026-07-29 + +### Added + +- Added the `claude-opus-5` model, and wired `--effort` end to end (the + interactive `/effort` path on Anthropic was also fixed) (#722, #746). +- Added bounded persistent memory with a background self-improvement review + fork (#731). +- Added a VS Code extension (`vscode-extension/clawcodex-vscode`) driving the + agent-server over stdio, with interrupt/suggestion/chosen-updates contracts + (#727). +- Added image-paste input: paste an image at the prompt and it attaches as a + content block, shown as an `[Image #N]` chip that un-attaches on demand + (#761, #762). +- Added a Harbor eval harness (`eval/harbor/`) with clawcodex, openclaude, and + latest-Claude-Code subscription adapters for terminal-bench 2.0/2.1 three-way + comparisons, ATIF trajectory emission, and per-step token/cost accounting + (#720, #724, #725, #736–#738). + +### Changed + +- Renamed the project context file `CLAUDE.md` → `CLAWCODEX.md` (clean break, + no fallback) (#732). +- Tuned the agent prompt and headless harness for reliability and parity with + the reference: restored dropped task-tool skip conditions, parallel-tool + guidance, and dropped instruction qualifiers; deferred nonessential initial + tools; and recovered trials lost to empty turns and transport drops + (#743–#745, #747–#754). +- Reworked the TUI header box to the reference's element allocation (#764). +- Honor runtime 1M-context model limits end to end (#730). +- Activated `--allowedTools`/`--disallowedTools`, which were a silent no-op + (#739). + +### Fixed + +- Ping-aware stream watchdog to stop spurious `NonZeroAgentExitCodeError` on + large-context agentic runs (#734). +- Recover trials lost to empty turns, transport drops, and a headless-only + tool; preserve thinking and reduce headless overhead (#735, #742). +- Enable interactive TaskV2 and harden Bash execution (#741). +- Retry transient transport failures instead of aborting the run, and stop + `Read` from leaking image base64 into context (#757, #760). +- Cap `mcp` below 2.0 (2.0.0 removed `mcp.client.websocket`) (#763). +- Correct the DeepSeek V4 `max_output_tokens` to the documented 384K (#758). +- Nudge off a stalled background task instead of polling forever (#759). + ## [1.2.1] - 2026-07-16 ### Changed diff --git a/README.md b/README.md index 8c1a3563..f46ed117 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ The `session`, `settings`, and `env` blocks are optional — sensible defaults a ## 📰 News +- **2026-07-29 (v1.3.0):** **ClawCodex scores 80.9% on Terminal-Bench 2.1 — a top-tier open-source result on Opus 5 (#720–#725, #747–#754)** — running headless on `claude-opus-5` at `effort=xhigh`, ClawCodex solved **72 of 89** Terminal-Bench 2.1 tasks: **80.9% pass@1** on a single run. On the [public 2.1 leaderboard](https://www.tbench.ai/leaderboard/terminal-bench/2.1) (k=5 averages) that would slot **around third** — behind Claude Code / Fable 5 (83.8%) and Codex / GPT-5.5 (83.1%), statistically level with the 79–80% cluster, and **ahead of Claude Code on Opus 4.8 (78.9%) and Sonnet 5 (74.6%)**. Getting there was open, unglamorous parity work: a Harbor eval adapter (`eval/harbor/`) for three-way ClawCodex-vs-openclaude-vs-Claude-Code runs (#720, #724, #725), then a run of prompt- and reliability-parity fixes — restored task-tool skip conditions and parallel-tool guidance, deferred nonessential initial tools, and recovery of trials lost to empty turns and transport drops (#747–#754). **Also in v1.3.0:** `claude-opus-5` support with an interactive `/effort` fix (#746), bounded persistent memory with a background self-improvement review (#731), a VS Code extension driving the agent-server over stdio (#727), image-paste input with an `[Image #N]` un-attach chip (#761, #762), the `CLAUDE.md → CLAWCODEX.md` context-file rebrand (#732), and transport-retry hardening (#757, #760). Stated plainly: this is a single k=1 pass (binomial 1σ ±4.2pp) against the board's k=5 ± ~1.2pp averages, benchmarked on `main` at #756 (before the v1.3.0 tag), so read it as directional rather than a ranked submission. - **2026-07-13:** **`/eco` token compression — -80% Bash-output tokens, measured, now a headline (#708, #712)** — a new session toggle compresses the model-bound rendering of every Bash result with deterministic filters ported from [RTK](https://github.com/rtk-ai/rtk)'s method set: failure-focused test summaries (kept error lines are never rewritten), `git`/`pip`/`npm` ceremony stripping, log dedup with `[×N]` counts, and a recoverable head-cap — all behind a **never-worse** guard, with every lossy compression teeing the full output to disk behind a runnable recovery hint (#708). A reproducible benchmark (`eval/eco/`) replays 27 real command outputs through the exact production pipeline and counts real tokenizer tokens: **92,989 → 17,767 (-80%)** corpus-wide, -88% on filter hits, plus an honestly conservative recompute of RTK's own 30-minute-session model (-19% under their averaged assumptions — real sessions are fat-tailed) (#712). Full tables: the [`/eco` section](#eco-benchmark) and [`eval/eco/results/`](eval/eco/results/results.md). - **2026-07-12 (v1.1.0):** **ClawCodex v1.1.0 — run OpenAI *and* Claude models on your subscription, not metered API billing** — the headline of 1.1.0 is **subscription auth for the two biggest model families**, so you can point ClawCodex at a plan you already pay for. **Sign in with ChatGPT (#698):** `clawcodex login → openai → subscription` (browser, device-code, or import from an existing Codex CLI login) routes requests through the ChatGPT Codex backend's Responses API — `gpt-5.5`, `gpt-5.4`, `gpt-5.4-mini`, and `gpt-5.3-codex-spark` on your Plus/Pro allowance, with encrypted-reasoning replay across turns and **$0** metered cost. **Claude Pro/Max (#697):** `clawcodex login → anthropic → subscription` connects a Claude subscription via OAuth (PKCE) with automatic token refresh and the same $0 accounting; follow-ups repaired the login after Anthropic moved its OAuth endpoints to `platform.claude.com` (#702) and stopped sending adaptive thinking to models that don't support it (#699). A configured API key always wins, and subscription usage reports `billing_mode: subscription`. **More models:** a Meta (`api.meta.ai`) provider with the 1M-context `muse-spark-1.1` reasoning model (#692) and refreshed MiniMax parameters (#696). **Workflow & TUI:** `/plan` mode with implicit plan-mode entry/exit (#676), `--worktree/-w` session isolation for parallel runs in separate git worktrees (#672), the `/memory` picker + `$EDITOR` spawn (#693), config/state directories rebranded `.claude → .clawcodex` with a one-time migration (#678), `/logo` startup color schemes (#677), plus TUI polish — Tab accepts the suggested placeholder (#690), past inputs get the Claude-Code highlight band (#691), clickable agent URLs (#694), and a per-terminal link-open affordance (#701). **Quality:** semantic tool-input coercion with parity validation errors (#700) and looser, Claude-Code-faithful permission granting (#673). - **2026-07-07:** **`/loop` scheduled tasks now actually fire — full port of Claude Code's session-scoped scheduler (#680)** — the bundled `/loop` skill finally has a real engine behind it: a new `src/scheduled_tasks` module parses standard 5-field cron expressions and fires due prompts **between turns** from the agent-server's idle poll. `CronCreate`/`CronList`/`CronDelete` register real firing jobs (8-char IDs, 50-job cap, deterministic jitter, 7-day recurring expiry with one final fire), and the new **`ScheduleWakeup`** tool drives self-paced `/loop` mode — the model picks each next delay (1 min–1 hr), `stop: true` ends the loop, and a ~20-minute fallback wakeup catches iterations that forget to reschedule. Typed skill slash commands now reach the backend (new `skill_command` control), so `/loop 5m check ci` works from the composer with completion + argument hint; the TUI shows a live countdown indicator (`⟳ loop wakeup in 2m 14s · ⏰ 1 scheduled`) and **Esc while idle stops a waiting loop**. `/clear` drops session tasks, `--resume` restores unexpired ones, `CLAWCODEX_DISABLE_CRON=1` disables the scheduler. 117 new tests; verified live over stdio NDJSON and a real PTY TUI drive (typed dispatch → CronCreate → a real wakeup fire between turns → Esc-stop). @@ -128,7 +129,6 @@ The `session`, `settings`, and `env` blocks are optional — sensible defaults a - **2026-06-24 (v0.6.0):** **ClawCodex v0.6.0 — interactive TUI REPL parity** — a batch of input ports brings the Python REPL to parity with the ink reference: a working slash-command menu (execute / complete / filter like the ink REPL), the sparkle spinner with a live token + elapsed busy row, context-aware prompt footer hints (interrupt / bash / grammar), the `?` shortcuts help panel, an `@` file-mention dropdown with in-place splice, double-press Ctrl+C / Ctrl+D to exit, Ctrl+R history search + double-Esc clear-draft, a `[Pasted text #N +K lines]` large-paste placeholder, and the completed command queue (drain queued prompts + dim preview). Login docs now list all 25 providers (#383). - **2026-06-23:** **One-click installer** — `curl -fsSL https://clawcodex.app/install.sh | bash` installs uv (no sudo), provisions Python 3.10+, clones to `~/.clawcodex`, creates a lock-pinned venv, and registers `clawcodex` on PATH; ships status / doctor / verify / update / uninstall subcommands, is safe to re-run, and works on macOS / Linux / WSL. - **2026-06-21:** **18 new LLM providers — the registry grows 7 → 25 (#377)** — a data-driven `ProviderSpec` registry adds 18 OpenAI-compatible backends (nvidia-nim, fireworks, together, moonshot/Kimi, novita, siliconflow, deepinfra, stepfun, arcee, huggingface, volcengine, xiaomi-mimo, atlascloud, wanjie-ark, plus local ollama / vllm / sglang) alongside the hand-written providers; alias-aware config resolution, standard env-var key fallback (e.g. `TOGETHER_API_KEY`), and keyless local servers. -- **2026-06-18:** **DeepSeek prefix-cache exploitation — a HUGE token-cost win (#363)** — ClawCodex now keeps its request prefix **byte-stable** across turns so DeepSeek's automatic prompt-prefix cache covers the entire `system + tools + history` span. Per-request-volatile sections (env, the mutable `MEMORY.md` body, plan-mode, etc.) are relocated to a trailing `` *after* the conversation history, so the cached prefix never breaks even when memory/env change. We also register DeepSeek's **1M-token context window**, map its prompt-cache usage onto the Anthropic `cache_read_input_tokens` convention, and surface a per-model **prompt-cache hit-rate** + cost in `/cost`. **Why this is enormous — the token economics:** Claude Fable 5 runs **$10 / $50** per 1M input/output tokens, while **DeepSeek-V4-Pro is just $0.435 / $0.87** — already **~23× cheaper on input** and **~57× cheaper on output**. And because **cache-hit input is billed at only 10%** of the normal input rate, the long, context-heavy sessions that agentic coding actually produces pay just **~$0.0435 per 1M input tokens** — roughly **230× cheaper than Fable 5 input**. The token efficiency ClawCodex unlocks here is **HUGE**. Everything is gated to the `deepseek` provider — every other provider's request is byte-for-byte unchanged. Follow-up: truncated tool-call argument JSON is now best-effort recovered in the shared OpenAI-compatible layer, so an interrupted DeepSeek stream keeps its partial tool args instead of dropping them to `{}` (#364). 📚 Older items have moved to the full **[News archive](docs/NEWS.md)**. *** diff --git a/docs/NEWS.md b/docs/NEWS.md index d6de1bc8..ecc8ec72 100644 --- a/docs/NEWS.md +++ b/docs/NEWS.md @@ -2,6 +2,7 @@ Full news history for ClawCodex. The [README News section](../README.md#-news) keeps only the 10 most recent items. +- **2026-07-29 (v1.3.0):** **ClawCodex scores 80.9% on Terminal-Bench 2.1 — a top-tier open-source result on Opus 5 (#720–#725, #747–#754)** — running headless on `claude-opus-5` at `effort=xhigh`, ClawCodex solved **72 of 89** Terminal-Bench 2.1 tasks: **80.9% pass@1** on a single run. On the [public 2.1 leaderboard](https://www.tbench.ai/leaderboard/terminal-bench/2.1) (k=5 averages) that would slot **around third** — behind Claude Code / Fable 5 (83.8%) and Codex / GPT-5.5 (83.1%), statistically level with the 79–80% cluster, and **ahead of Claude Code on Opus 4.8 (78.9%) and Sonnet 5 (74.6%)**. Getting there was open, unglamorous parity work: a Harbor eval adapter (`eval/harbor/`) for three-way ClawCodex-vs-openclaude-vs-Claude-Code runs (#720, #724, #725), then a run of prompt- and reliability-parity fixes — restored task-tool skip conditions and parallel-tool guidance, deferred nonessential initial tools, and recovery of trials lost to empty turns and transport drops (#747–#754). **Also in v1.3.0:** `claude-opus-5` support with an interactive `/effort` fix (#746), bounded persistent memory with a background self-improvement review (#731), a VS Code extension driving the agent-server over stdio (#727), image-paste input with an `[Image #N]` un-attach chip (#761, #762), the `CLAUDE.md → CLAWCODEX.md` context-file rebrand (#732), and transport-retry hardening (#757, #760). Stated plainly: this is a single k=1 pass (binomial 1σ ±4.2pp) against the board's k=5 ± ~1.2pp averages, benchmarked on `main` at #756 (before the v1.3.0 tag), so read it as directional rather than a ranked submission. - **2026-07-13:** **`/eco` token compression — -80% Bash-output tokens, measured, now a headline (#708, #712)** — a new session toggle compresses the model-bound rendering of every Bash result with deterministic filters ported from [RTK](https://github.com/rtk-ai/rtk)'s method set: failure-focused test summaries (kept error lines are never rewritten), `git`/`pip`/`npm` ceremony stripping, log dedup with `[×N]` counts, and a recoverable head-cap — all behind a **never-worse** guard, with every lossy compression teeing the full output to disk behind a runnable recovery hint (#708). A reproducible benchmark (`eval/eco/`) replays 27 real command outputs through the exact production pipeline and counts real tokenizer tokens: **92,989 → 17,767 (-80%)** corpus-wide, -88% on filter hits, plus an honestly conservative recompute of RTK's own 30-minute-session model (-19% under their averaged assumptions — real sessions are fat-tailed) (#712). Full tables: the [`/eco` section](../README.md#eco-benchmark) and [`eval/eco/results/`](../eval/eco/results/results.md). - **2026-07-12 (v1.1.0):** **ClawCodex v1.1.0 — run OpenAI *and* Claude models on your subscription, not metered API billing** — the headline of 1.1.0 is **subscription auth for the two biggest model families**, so you can point ClawCodex at a plan you already pay for. **Sign in with ChatGPT (#698):** `clawcodex login → openai → subscription` (browser, device-code, or import from an existing Codex CLI login) routes requests through the ChatGPT Codex backend's Responses API — `gpt-5.5`, `gpt-5.4`, `gpt-5.4-mini`, and `gpt-5.3-codex-spark` on your Plus/Pro allowance, with encrypted-reasoning replay across turns and **$0** metered cost. **Claude Pro/Max (#697):** `clawcodex login → anthropic → subscription` connects a Claude subscription via OAuth (PKCE) with automatic token refresh and the same $0 accounting; follow-ups repaired the login after Anthropic moved its OAuth endpoints to `platform.claude.com` (#702) and stopped sending adaptive thinking to models that don't support it (#699). A configured API key always wins, and subscription usage reports `billing_mode: subscription`. **More models:** a Meta (`api.meta.ai`) provider with the 1M-context `muse-spark-1.1` reasoning model (#692) and refreshed MiniMax parameters (#696). **Workflow & TUI:** `/plan` mode with implicit plan-mode entry/exit (#676), `--worktree/-w` session isolation for parallel runs in separate git worktrees (#672), the `/memory` picker + `$EDITOR` spawn (#693), config/state directories rebranded `.claude → .clawcodex` with a one-time migration (#678), `/logo` startup color schemes (#677), plus TUI polish — Tab accepts the suggested placeholder (#690), past inputs get the Claude-Code highlight band (#691), clickable agent URLs (#694), and a per-terminal link-open affordance (#701). **Quality:** semantic tool-input coercion with parity validation errors (#700) and looser, Claude-Code-faithful permission granting (#673). - **2026-07-07:** **`/loop` scheduled tasks now actually fire — full port of Claude Code's session-scoped scheduler (#680)** — the bundled `/loop` skill finally has a real engine behind it: a new `src/scheduled_tasks` module parses standard 5-field cron expressions and fires due prompts **between turns** from the agent-server's idle poll. `CronCreate`/`CronList`/`CronDelete` register real firing jobs (8-char IDs, 50-job cap, deterministic jitter, 7-day recurring expiry with one final fire), and the new **`ScheduleWakeup`** tool drives self-paced `/loop` mode — the model picks each next delay (1 min–1 hr), `stop: true` ends the loop, and a ~20-minute fallback wakeup catches iterations that forget to reschedule. Typed skill slash commands now reach the backend (new `skill_command` control), so `/loop 5m check ci` works from the composer with completion + argument hint; the TUI shows a live countdown indicator (`⟳ loop wakeup in 2m 14s · ⏰ 1 scheduled`) and **Esc while idle stops a waiting loop**. `/clear` drops session tasks, `--resume` restores unexpired ones, `CLAWCODEX_DISABLE_CRON=1` disables the scheduler. 117 new tests; verified live over stdio NDJSON and a real PTY TUI drive (typed dispatch → CronCreate → a real wakeup fire between turns → Esc-stop). diff --git a/docs/i18n/README_ZH.md b/docs/i18n/README_ZH.md index 50947584..347dbe58 100644 --- a/docs/i18n/README_ZH.md +++ b/docs/i18n/README_ZH.md @@ -64,6 +64,7 @@ clawcodex --dangerously-skip-permissions # 启动 REPL ## 📰 新闻 +- **2026-07-29(v1.3.0):** **ClawCodex 在 Terminal-Bench 2.1 上取得 80.9% —— Opus 5 上的顶尖开源成绩(#720–#725、#747–#754)** —— 在 `claude-opus-5`(`effort=xhigh`)上无头运行,ClawCodex 解决了 **89 个 Terminal-Bench 2.1 任务中的 72 个**:单次运行 **80.9% pass@1**。在[公开的 2.1 排行榜](https://www.tbench.ai/leaderboard/terminal-bench/2.1)(按 k=5 平均)上这大约排在**第 3 左右** —— 落后于 Claude Code / Fable 5(83.8%)与 Codex / GPT-5.5(83.1%),与 79–80% 的一档在统计上难分伯仲,并**领先 Claude Code 搭配 Opus 4.8(78.9%)与 Sonnet 5(74.6%)**。取得这一成绩靠的是公开而不起眼的对齐工作:一个用于 ClawCodex-vs-openclaude-vs-Claude-Code 三方对比的 Harbor 评测适配器(`eval/harbor/`,#720、#724、#725),以及一批提示词与可靠性对齐修复 —— 恢复 task 工具的跳过条件与并行工具指引、延迟加载非必要初始工具、回收因空轮次与瞬时传输中断而丢失的试次(#747–#754)。**v1.3.0 还包含:** `claude-opus-5` 支持及交互式 `/effort` 修复(#746)、带后台自我改进评审的有界持久记忆(#731)、通过 stdio 驱动 agent-server 的 VS Code 扩展(#727)、带 `[Image #N]` 取消附加芯片的图像粘贴输入(#761、#762)、`CLAUDE.md → CLAWCODEX.md` 上下文文件更名(#732),以及传输重试加固(#757、#760)。诚实说明:这是单次 k=1(二项 1σ ±4.2pp),对照的是榜单的 k=5 ± 约 1.2pp 平均值,基准运行在 v1.3.0 打标签之前的 `main`(#756)上 —— 属方向性参考,而非正式排名提交。 - **2026-07-13:** **`/eco` token 压缩 —— Bash 输出 token 实测 -80%,现为(英文版)头条之一(#708、#712)** —— 新的会话开关用一组从 [RTK](https://github.com/rtk-ai/rtk) 方法集移植的确定性过滤器压缩每个 Bash 结果的模型侧渲染:聚焦失败的测试摘要(保留的错误行从不改写)、`git`/`pip`/`npm` 仪式性输出裁剪、带 `[×N]` 计数的日志去重、可恢复的头部截断 —— 全部处于**绝不更差**守卫之下,所有有损压缩都会把完整输出 tee 到磁盘并附一条可直接运行的恢复提示(#708)。可复现的基准测试(`eval/eco/`)将 27 个真实命令输出经由生产管线逐字节重放并统计真实分词器 token:语料整体 **92,989 → 17,767(-80%)**,过滤器命中子集 -88%,另附对 RTK 自身 30 分钟会话模型的保守重算(在其平均化假设下为 -19% —— 真实会话是重尾分布)(#712)。完整表格见下文 `/eco` 章节与 [`eval/eco/results/`](../../eval/eco/results/results.md)。 - **2026-07-12(v1.1.0):** **ClawCodex v1.1.0 —— 用订阅方案运行 OpenAI 和 Claude 模型,而非按 API 计费** —— 1.1.0 的重头戏是**为两大模型家族提供订阅认证**,让你可以把 ClawCodex 接到你已经付费的方案上。**用 ChatGPT 登录(#698):** `clawcodex login → openai → subscription`(浏览器、设备码,或从已有的 Codex CLI 登录导入)通过 ChatGPT Codex 后端的 Responses API 路由请求 —— 在你的 Plus/Pro 额度内使用 `gpt-5.5`、`gpt-5.4`、`gpt-5.4-mini` 与 `gpt-5.3-codex-spark`,跨轮次重放加密推理,计费为 **$0**。**Claude Pro/Max(#697):** `clawcodex login → anthropic → subscription` 通过 OAuth(PKCE)连接 Claude 订阅,自动刷新 token,同样按 $0 计账;后续修复了 Anthropic 将 OAuth 端点迁移到 `platform.claude.com` 后的登录(#702),并停止向不支持自适应思考(adaptive thinking)的模型发送该参数(#699)。已配置的 API key 始终优先,订阅用量报告为 `billing_mode: subscription`。**更多模型:** 新增 Meta(`api.meta.ai`)provider 及 1M 上下文的 `muse-spark-1.1` 推理模型(#692),并刷新 MiniMax 参数(#696)。**工作流与 TUI:** `/plan` 模式及隐式 plan 模式进入/退出(#676)、`--worktree/-w` 会话隔离(在独立 git worktree 中并行运行,#672)、`/memory` 选择器 + `$EDITOR` 打开(#693)、配置/状态目录从 `.claude` 更名为 `.clawcodex` 并一次性迁移(#678)、`/logo` 启动配色(#677),以及 TUI 打磨 —— Tab 接受建议占位符(#690)、历史输入显示 Claude Code 高亮条(#691)、可点击的 agent URL(#694)、按终端适配的链接打开提示(#701)。**质量:** 语义化工具输入强制转换与对齐的校验错误信息(#700),以及更宽松、忠于 Claude Code 的权限授予(#673)。 - **2026-07-07:** **`/loop` 定时任务现在真正触发 —— 完整移植 Claude Code 的会话级调度器(#680)** —— 内置的 `/loop` 技能终于有了真正的引擎:新的 `src/scheduled_tasks` 模块解析标准 5 字段 cron 表达式,并在 agent-server 空闲轮询时**在轮次之间**触发到期的提示。`CronCreate`/`CronList`/`CronDelete` 注册真正触发的任务(8 字符 ID、50 个任务上限、确定性抖动、7 天循环到期并最后触发一次),新的 **`ScheduleWakeup`** 工具驱动自定节奏的 `/loop` 模式 —— 模型自行挑选每次的下一个延迟(1 分钟–1 小时),`stop: true` 结束循环,约 20 分钟的回退唤醒兜底忘记重新调度的迭代。带类型的技能斜杠命令现在可达后端(新的 `skill_command` 控制),因此 `/loop 5m check ci` 可从 composer 键入运行,带补全与参数提示;TUI 显示实时倒计时指示(`⟳ loop wakeup in 2m 14s · ⏰ 1 scheduled`),且**空闲时按 Esc 停止等待中的循环**。`/clear` 丢弃会话任务,`--resume` 恢复未到期的任务,`CLAWCODEX_DISABLE_CRON=1` 禁用调度器。117 个新测试;已在 stdio NDJSON 与真实 PTY TUI 驱动下实测验证。 @@ -73,7 +74,6 @@ clawcodex --dangerously-skip-permissions # 启动 REPL - **2026-06-24(v0.6.0):** **ClawCodex v0.6.0 —— 交互式 TUI REPL 对齐** —— 一批输入侧移植让 Python REPL 与 ink 参考实现对齐:可用的斜杠命令菜单(像 ink REPL 一样执行 / 补全 / 过滤)、带实时 token 数 + 已用时长忙碌行的星光 spinner、上下文感知的提示符底部提示(中断 / bash / 语法)、`?` 快捷键帮助面板、`@` 文件提及下拉框(原位拼接)、双击 Ctrl+C / Ctrl+D 退出、Ctrl+R 历史搜索 + 双击 Esc 清空草稿、`[Pasted text #N +K lines]` 大段粘贴占位符,以及完成的命令队列(排空排队的提示 + 暗色预览)。登录文档现在列出全部 25 个 provider(#383)。 - **2026-06-23:** **一键安装器** —— `curl -fsSL https://clawcodex.app/install.sh | bash` 自动安装 uv(无需 sudo)、准备 Python 3.10+、克隆到 `~/.clawcodex`、创建锁定版本的 venv,并把 `clawcodex` 注册到 PATH;附带 status / doctor / verify / update / uninstall 子命令,可安全重复运行,支持 macOS / Linux / WSL。 - **2026-06-21:** **新增 18 个 LLM provider —— 注册表从 7 增至 25(#377)** —— 数据驱动的 `ProviderSpec` 注册表在手写 provider 之外新增 18 个 OpenAI 兼容后端(nvidia-nim、fireworks、together、moonshot/Kimi、novita、siliconflow、deepinfra、stepfun、arcee、huggingface、volcengine、xiaomi-mimo、atlascloud、wanjie-ark,以及本地 ollama / vllm / sglang);支持别名感知的配置解析、标准环境变量密钥回退(如 `TOGETHER_API_KEY`)与免密钥的本地服务器。 -- **2026-06-18:** **DeepSeek 前缀缓存利用 —— 巨大的 token 成本优势(#363)** —— ClawCodex 现在让请求前缀在多轮之间保持**字节级稳定**,使 DeepSeek 的自动 prompt 前缀缓存覆盖整个 `system + tools + history` 区段。每请求可变的部分(env、可变的 `MEMORY.md` 正文、plan 模式等)被移到对话历史*之后*的尾部 ``,即使 memory/env 变化也不会击穿缓存前缀。同时注册 DeepSeek 的 **1M token 上下文窗口**,把其 prompt 缓存用量映射到 Anthropic 的 `cache_read_input_tokens` 约定,并在 `/cost` 中展示每模型的**缓存命中率**与成本。**为什么意义重大 —— token 经济学:** Claude Fable 5 每 1M 输入/输出 token 收费 **$10 / $50**,而 **DeepSeek-V4-Pro 仅为 $0.435 / $0.87** —— 输入已**便宜约 23×**、输出**便宜约 57×**。由于**缓存命中的输入仅按正常输入价的 10% 计费**,agentic 编码实际产生的长上下文会话每 1M 输入 token 只需**约 $0.0435** —— 比 Fable 5 的输入**便宜约 230×**。ClawCodex 在这里解锁的 token 效率是**巨大的**。全部逻辑仅对 `deepseek` provider 生效 —— 其他 provider 的请求逐字节不变。后续修复:被截断的工具调用参数 JSON 现在会在共享的 OpenAI 兼容层尽力恢复,DeepSeek 流中断时保留部分工具参数而不是丢弃为 `{}`(#364)。 📚 更早的条目已移至完整的 **[News 归档](../NEWS.md)**。 diff --git a/install.sh b/install.sh index 2ea343b3..e4e322aa 100755 --- a/install.sh +++ b/install.sh @@ -48,7 +48,7 @@ trap 'log_err "Installer crash at line $LINENO: $BASH_COMMAND"' ERR # ============================================================================ # Config (read-only defaults) # ============================================================================ -readonly INSTALLER_VERSION="1.1.0" +readonly INSTALLER_VERSION="1.3.0" # REPO_REF is intentionally NOT readonly — it gets reassigned when the user # passes --ref. We have no version tags, so the default is the main branch; # --ref is the escape hatch for installing a specific commit/tag/branch. diff --git a/pyproject.toml b/pyproject.toml index 25e28875..f22e1aa0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "clawcodex-cli" -version = "1.2.1" +version = "1.3.0" description = "A production-oriented Python rebuild of Claude Code — real architecture, reliable CLI agent" readme = "README.md" license = "MIT" diff --git a/src/__init__.py b/src/__init__.py index e85e2ffe..5894ffdb 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -5,7 +5,7 @@ try: __version__ = version("clawcodex-cli") except PackageNotFoundError: # Running directly from an unpackaged checkout. - __version__ = "1.2.1" + __version__ = "1.3.0" __author__ = "Claw Codex Team" from .config import load_config, get_provider_config diff --git a/ui-tui/src/gatewayClient.ts b/ui-tui/src/gatewayClient.ts index 40db445f..15797c70 100644 --- a/ui-tui/src/gatewayClient.ts +++ b/ui-tui/src/gatewayClient.ts @@ -52,7 +52,7 @@ const WORKTREE_RPC_TIMEOUT_MS = 600_000 const IMAGE_RPC_TIMEOUT_MS = 30_000 // clawcodex app version shown in the banner ("clawcodex v{version}"). Keep in // sync with the installer (install.sh INSTALLER_VERSION). -const CLAWCODEX_VERSION = '1.1.0' +const CLAWCODEX_VERSION = '1.3.0' /** Command that launches the clawcodex agent-server (set by the Python launcher). */ function resolveAgentCmd(): string[] { diff --git a/uv.lock b/uv.lock index d46df90b..57253fce 100644 --- a/uv.lock +++ b/uv.lock @@ -298,7 +298,7 @@ wheels = [ [[package]] name = "clawcodex-cli" -version = "1.2.1" +version = "1.3.0" source = { editable = "." } dependencies = [ { name = "anthropic" }, @@ -336,7 +336,7 @@ requires-dist = [ { name = "build", marker = "extra == 'dev'", specifier = ">=1.0.0" }, { name = "httpx-sse", specifier = ">=0.4" }, { name = "markdownify", specifier = ">=0.11" }, - { name = "mcp", specifier = ">=1.27.0" }, + { name = "mcp", specifier = ">=1.27.0,<2" }, { name = "openai", specifier = ">=1.109.1" }, { name = "pathspec", specifier = ">=0.11" }, { name = "pillow", specifier = ">=10.0" },