diff --git a/README.ja-JP.md b/README.ja-JP.md index 75b3ef0e..813cefea 100644 --- a/README.ja-JP.md +++ b/README.ja-JP.md @@ -1,31 +1,33 @@ # 🐳 CodeWhale -> **このターミナルネイティブのコーディングエージェントは、DeepSeek V4 の 100 万トークンのコンテキストウィンドウとプレフィックスキャッシュ機能を中心に構築されています。単一のバイナリとして配布され、Node.js や Python のランタイムは不要です。MCP クライアント、サンドボックス、永続的なタスクキューも標準で同梱されています。** +> **このターミナルネイティブのコーディングエージェントは、DeepSeek V4 の 100 万トークンのコンテキストウィンドウとプレフィックスキャッシュ機能を中心に構築されています。`codewhale` ディスパッチャーと `codewhale-tui` ランタイムの Rust バイナリペアとして配布され、Node.js や Python のランタイムは不要です。MCP クライアント、サンドボックス、永続的なタスクキューも標準で同梱されています。** [English README](README.md) [简体中文 README](README.zh-CN.md) ## インストール -`codewhale` は自己完結型の Rust バイナリとして提供されており、**実行に Node.js や Python のランタイムは必要ありません。** すでにマシンにインストールされているものを選んでください。いずれの方法でも同じバイナリが `PATH` に配置されます。 +`codewhale` は自己完結型の Rust リリースバイナリのペアとしてインストールされます。`codewhale` はディスパッチャーで、同じ場所にある `codewhale-tui` ランタイムを起動して対話セッションを実行します。npm、Homebrew、Docker は両方を自動でインストールします。Cargo や手動インストールでは、両方を同じディレクトリ(通常は `PATH` 上のディレクトリ)に置いてください。実行に Node.js や Python のランタイムは不要です。 ```bash # 1. npm — すでに Node を使っているなら最も簡単。npm パッケージは -# GitHub Releases から対応するビルド済みバイナリをダウンロードする +# GitHub Releases から対応するビルド済みバイナリペアをダウンロードする # 薄いインストーラーであり、codewhale 本体に Node ランタイム依存を加えるものではありません。 npm install -g codewhale -# 2. Cargo — Node 不要。 +# 2. Cargo — Node 不要。2 つの crate を両方インストールします。 cargo install codewhale-cli --locked # `codewhale` (エントリーポイント) cargo install codewhale-tui --locked # `codewhale-tui` (TUI バイナリ) # 3. Homebrew — macOS パッケージマネージャ。 +# tap/formula 名は旧名のままですが、codewhale と codewhale-tui をインストールします。 brew tap Hmbown/deepseek-tui brew install deepseek-tui -# 4. 直接ダウンロード — Node もツールチェーンも不要。 +# 4. 直接ダウンロード — GitHub Releases のプラットフォームアーカイブ。 # https://github.com/Hmbown/CodeWhale/releases -# Linux x64/ARM64、macOS x64/ARM64、Windows x64 向けのビルド済みバイナリがあります。 +# アーカイブには codewhale と codewhale-tui とインストールスクリプトが含まれます。 +# 個別バイナリもスクリプト用に添付されています。手動ではペアを同じ場所に置いてください。 # 5. Docker — ビルド済みリリースイメージ。 docker volume create codewhale-home @@ -72,73 +74,9 @@ CodeWhale はそのハーネスであり、DeepSeek V4 を中心に構築され | **明確な管轄権** | 9階層の権威を持つ成文憲法。ユーザーの意図が古い指示より優先。検証が自信より優先。 | | **再帰的改善** | V4 がハーネスの一部を書いた。ハーネスが改善されると V4 はより効果的になり、さらにハーネスを改善する。毎ターンがより強くなる。 | -オープンソース、単一バイナリ完結、ターミナルのために構築。 +オープンソース、ターミナルネイティブ、`codewhale` / `codewhale-tui` の Rust バイナリペアとして提供されています。 - -## インストール - -`codewhale` は自己完結型の Rust バイナリとして提供されており、**実行に Node.js や Python のランタイムは必要ありません。** すでにマシンにインストールされているものを選んでください。いずれの方法でも同じバイナリが `PATH` に配置されます。 - -```bash -# 1. npm — すでに Node を使っているなら最も簡単。npm パッケージは -# GitHub Releases から対応するビルド済みバイナリをダウンロードする -# 薄いインストーラーであり、codewhale 本体に Node ランタイム依存を加えるものではありません。 -npm install -g codewhale - -# 2. Cargo — Node 不要。 -cargo install codewhale-cli --locked # `codewhale` (エントリーポイント) -cargo install codewhale-tui --locked # `codewhale-tui` (TUI バイナリ) - -# 3. Homebrew — macOS パッケージマネージャ。 -brew tap Hmbown/deepseek-tui -brew install deepseek-tui - -# 4. 直接ダウンロード — Node もツールチェーンも不要。 -# https://github.com/Hmbown/CodeWhale/releases -# Linux x64/ARM64、macOS x64/ARM64、Windows x64 向けのビルド済みバイナリがあります。 - -# 5. Docker — ビルド済みリリースイメージ。 -docker volume create codewhale-home -docker run --rm -it \ - -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \ - -v codewhale-home:/home/codewhale/.deepseek \ - -v "$PWD:/workspace" \ - -w /workspace \ - ghcr.io/hmbown/codewhale:latest -``` - -> 中国本土では、`--registry=https://registry.npmmirror.com` を指定して npm 経由のダウンロードを高速化するか、下記の[Cargo ミラー](#中国--ミラーフレンドリーなインストール)を利用してください。 - -既にインストール済みの場合は、インストール方法に合わせて更新してください: - -```bash -codewhale update -npm install -g codewhale@latest -brew update && brew upgrade deepseek-tui -cargo install codewhale-cli --locked --force -cargo install codewhale-tui --locked --force -``` - -[![CI](https://github.com/Hmbown/CodeWhale/actions/workflows/ci.yml/badge.svg)](https://github.com/Hmbown/CodeWhale/actions/workflows/ci.yml) -[![npm](https://img.shields.io/npm/v/codewhale)](https://www.npmjs.com/package/codewhale) -[![crates.io](https://img.shields.io/crates/v/codewhale-cli?label=crates.io)](https://crates.io/crates/codewhale-cli) -[![DeepWiki](https://img.shields.io/badge/DeepWiki-Ask_AI-_.svg?style=flat&color=0052D9&labelColor=000000&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/Hmbown/CodeWhale) - -Buy me a coffee - -![codewhale スクリーンショット](assets/screenshot.png) - ---- - -## codewhale とは? - -モデルは質問に答えます。エージェントはタスクを完了します。その差がハーネス——モデルを取り巻くルール、ツール、証拠、フィードバックループという動作環境です。 - -CodeWhale はそのハーネスであり、DeepSeek V4 Pro と Flash のために構築されました。メンテナがモデルがタスクの途中で方向を見失ったり、ユーザーの現在の要求より古い指示に従ったり、コマンドが失敗すると諦めたりすることにうんざりしたことから、個人ツールとして始まりました。そこから生まれたのが、モデルの方向性を保つシステムです:憲法的なプロンプト階層、構造化された信頼境界、並列サブエージェント、プレフィックスキャッシュ対応のコンテキスト管理、そしてモデルが自己修正するための十分なシグナルを提供する検証の鼓動。 - -DeepSeek V4 はこのハーネスの一部を書くのを手伝いました。これは重要です——CodeWhale がすでに V4 を使う最も効果的な方法であり、V4 が改善するにつれてハーネスも改善することを意味します。各ターンがより良いプロンプト、より良いルール、より良いハンドオフを残します。次のターンはより強い位置から始まります。 - -### ハーネスの仕組み +## ハーネスの仕組み エージェントモデルは大規模な相反する情報を扱います:ユーザーの意図、プロジェクトルール、システムデフォルト、ツール出力、古いメモリが単一ターンで権威を競い合います。LLM が裁判官として機能するには管轄権が必要です——衝突したとき、どの情報源が勝つのか? @@ -178,7 +116,7 @@ codewhale --version codewhale --model auto ``` -ビルド済みバイナリは **Linux x64**、**Linux ARM64**(v0.8.8 以降)、**macOS x64**、**macOS ARM64**、**Windows x64** 向けに公開されています。その他のターゲット(musl、riscv64、FreeBSD など)は [ソースからのインストール](#install-from-source) または [docs/INSTALL.md](docs/INSTALL.md) を参照してください。 +ビルド済みバイナリペアとプラットフォームアーカイブは **Linux x64**、**Linux ARM64**(v0.8.8 以降)、**macOS x64**、**macOS ARM64**、**Windows x64** 向けに公開されています。その他のターゲット(musl、riscv64、FreeBSD など)は [ソースからのインストール](#install-from-source) または [docs/INSTALL.md](docs/INSTALL.md) を参照してください。 初回起動時に [DeepSeek API キー](https://platform.deepseek.com/api_keys) の入力を求められます。キーは `~/.deepseek/config.toml` に保存されるため、OS のクレデンシャルプロンプトなしに任意のディレクトリから利用できます。 @@ -224,10 +162,15 @@ codewhale --version ### Windows(Scoop) -[Scoop](https://scoop.sh) は Windows のパッケージマネージャです。インストール後、次を実行してください: +[Scoop](https://scoop.sh) は Windows のパッケージマネージャです。`codewhale` +パッケージは Scoop main bucket にありますが、manifest は GitHub/npm/Cargo +リリースより遅れることがあります。先に更新し、インストール後に +`codewhale --version` で確認してください: ```bash -scoop install deepseek-tui +scoop update +scoop install codewhale +codewhale --version ``` diff --git a/README.md b/README.md index f8c9c5c4..334ae74f 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,12 @@ ## Install -`codewhale` is distributed as Rust binaries: the dispatcher command -(`codewhale`) and the companion TUI runtime (`codewhale-tui`). Pick whichever -install path you already use; they all put the same commands on your `PATH`. -The npm package is an installer/wrapper for the release binaries, not the -agent runtime itself. +`codewhale` installs as a matched pair of self-contained Rust release binaries: +the `codewhale` dispatcher command and the sibling `codewhale-tui` runtime it +launches for interactive sessions. npm, Homebrew, and Docker install both for +you; Cargo and manual installs must put both binaries in the same directory +(normally a directory on your `PATH`). The npm package is only an +installer/wrapper for those release binaries; the agent does not run on Node. ```bash # 1. npm — easiest if you already use Node. The package downloads the @@ -25,12 +26,14 @@ cargo install codewhale-cli --locked # `codewhale` (entry point) cargo install codewhale-tui --locked # `codewhale-tui` (TUI binary) # 3. Homebrew — macOS package manager. +# The tap/formula name is legacy; it installs codewhale and codewhale-tui. brew tap Hmbown/deepseek-tui brew install deepseek-tui -# 4. Direct download — no package manager or toolchain. +# 4. Direct download — platform archive from GitHub Releases. # https://github.com/Hmbown/CodeWhale/releases -# Prebuilt for Linux x64/ARM64, macOS x64/ARM64, Windows x64. +# Archives include both codewhale and codewhale-tui plus an install script. +# Individual binaries are also attached for scripts; keep the pair together. # 5. Docker — prebuilt release image. docker volume create codewhale-home @@ -84,83 +87,10 @@ CodeWhale is that harness, built around DeepSeek V4 and guided by three ideas: | **Clear jurisdiction** | A written Constitution with nine tiers of authority. User intent outranks stale instructions. Verification outranks confidence. | | **Recursive improvement** | V4 helped write the harness. As the harness improves, V4 becomes more effective — and helps improve the harness further. Each turn starts stronger. | -It's open source, self-contained in a single binary, and built for the terminal. +It's open source, terminal-native, and packaged as a matched `codewhale` / +`codewhale-tui` Rust binary pair. - -## Install - -`codewhale` is distributed as Rust binaries: the dispatcher command -(`codewhale`) and the companion TUI runtime (`codewhale-tui`). Pick whichever -install path you already use; they all put the same commands on your `PATH`. -The npm package is an installer/wrapper for the release binaries, not the -agent runtime itself. - -```bash -# 1. npm — easiest if you already use Node. The package downloads the -# matching prebuilt Rust binaries from GitHub Releases. -npm install -g codewhale - -# 2. Cargo — no Node needed. Requires Rust 1.88+ (the crates use the -# 2024 edition; older toolchains fail with "feature `edition2024` is -# required"). Run `rustup update` first, or use a non-Cargo path below. -cargo install codewhale-cli --locked # `codewhale` (entry point) -cargo install codewhale-tui --locked # `codewhale-tui` (TUI binary) - -# 3. Homebrew — macOS package manager. -brew tap Hmbown/deepseek-tui -brew install deepseek-tui - -# 4. Direct download — no package manager or toolchain. -# https://github.com/Hmbown/CodeWhale/releases -# Prebuilt for Linux x64/ARM64, macOS x64/ARM64, Windows x64. - -# 5. Docker — prebuilt release image. -docker volume create codewhale-home -docker run --rm -it \ - -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \ - -v codewhale-home:/home/codewhale/.deepseek \ - -v "$PWD:/workspace" \ - -w /workspace \ - ghcr.io/hmbown/codewhale:latest -``` - -> In mainland China, speed up the npm path with -> `--registry=https://registry.npmmirror.com`, or use the -> [Cargo mirror](#china--mirror-friendly-installation) below. -> -> Download safety: official release binaries live under -> `https://github.com/Hmbown/CodeWhale/releases`. For manual downloads, -> verify the SHA-256 manifest and avoid look-alike repositories or search-result -> mirrors. See [download safety and checksums](docs/INSTALL.md#2-download-safety-and-checksums). - -Already installed? Use the updater that matches the install path: - -```bash -codewhale update # release-binary updater -npm install -g codewhale@latest # npm wrapper -brew update && brew upgrade deepseek-tui -cargo install codewhale-cli --locked --force -cargo install codewhale-tui --locked --force -``` - -[![CI](https://github.com/Hmbown/CodeWhale/actions/workflows/ci.yml/badge.svg)](https://github.com/Hmbown/CodeWhale/actions/workflows/ci.yml) -[![npm](https://img.shields.io/npm/v/codewhale)](https://www.npmjs.com/package/codewhale) -[![crates.io](https://img.shields.io/crates/v/codewhale-cli?label=crates.io)](https://crates.io/crates/codewhale-cli) -[DeepWiki project index](https://deepwiki.com/Hmbown/CodeWhale) - -![codewhale screenshot](assets/screenshot.png) - ---- - -## What Is It? - -A model answers a question. An agent finishes a task. The difference is the harness — the operating environment that surrounds the model with rules, tools, evidence, and feedback loops. - -CodeWhale is that harness, built around DeepSeek V4 Pro and Flash. It started as a personal tool because the maintainer got tired of models losing track mid-task, obeying stale instructions over the user's current request, or giving up when a command failed. What emerged was a system that keeps the model oriented: a constitutional prompt hierarchy, structured trust boundaries, parallel sub-agents, prefix-cache-aware context management, and verification beats that give the model enough signal to self-correct. - -DeepSeek V4 helped write parts of this harness. That matters because it means CodeWhale is already the most effective way to use V4 — and as V4 improves, the harness improves with it. Each turn leaves behind better prompts, better rules, and better handoffs. The next turn starts from a stronger position. - -### How the harness works +## How the Harness Works Agentic models deal with conflicting information at scale: user intent, project rules, system defaults, tool output, and stale memory all compete @@ -244,7 +174,7 @@ codewhale --version codewhale --model auto ``` -Prebuilt binaries are published for **Linux x64**, **Linux ARM64** (v0.8.8+), **macOS x64**, **macOS ARM64**, and **Windows x64**. For other targets (musl, riscv64, FreeBSD, etc.), see [Install from source](#install-from-source) or [docs/INSTALL.md](docs/INSTALL.md). +Prebuilt binary pairs and platform archives are published for **Linux x64**, **Linux ARM64** (v0.8.8+), **macOS x64**, **macOS ARM64**, and **Windows x64**. For other targets (musl, riscv64, FreeBSD, etc.), see [Install from source](#install-from-source) or [docs/INSTALL.md](docs/INSTALL.md). On first launch you'll be prompted for your [DeepSeek API key](https://platform.deepseek.com/api_keys). The key is saved to `~/.deepseek/config.toml` so it works from any directory without OS credential prompts. @@ -330,7 +260,7 @@ version with `codewhale --version`: ```bash scoop update -scoop install deepseek-tui +scoop install codewhale codewhale --version ``` diff --git a/README.zh-CN.md b/README.zh-CN.md index 080c529e..314b5955 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,32 +1,36 @@ # CodeWhale -> **面向 [DeepSeek V4](https://platform.deepseek.com) 的终端原生编程智能体:100 万 token 上下文、思考模式流式推理、前缀缓存感知。自包含 Rust 二进制发布——开箱即带 MCP 客户端、沙箱和持久化任务队列。** +> **面向 [DeepSeek V4](https://platform.deepseek.com) 的终端原生编程智能体:100 万 token 上下文、思考模式流式推理、前缀缓存感知。以 `codewhale` 调度器和 `codewhale-tui` 运行时这一组自包含 Rust 二进制发布——开箱即带 MCP 客户端、沙箱和持久化任务队列。** [English README](README.md) [日本語 README](README.ja-JP.md) ## 安装 -`codewhale` 是自包含 Rust 二进制——**运行时不依赖 Node.js 或 Python**。 -下面几种方式装出来的是同一套二进制,按你已有的工具链选一个即可: +`codewhale` 以一组自包含 Rust 发布二进制安装:`codewhale` 调度器命令, +以及它在交互会话中启动的同级 `codewhale-tui` 运行时。npm、Homebrew 和 +Docker 会自动安装这两个二进制;Cargo 或手动下载时必须把两者放在同一目录 +(通常是 `PATH` 上的某个目录)。运行时不依赖 Node.js 或 Python。 ```bash # 1. npm —— 已装 Node 的最方便方式。npm 包只是一个下载器, -# 会从 GitHub Releases 拉取对应平台的预编译二进制, +# 会从 GitHub Releases 拉取对应平台的预编译二进制对, # 并不会让 codewhale 本身依赖 Node 运行时。 npm install -g codewhale -# 2. Cargo —— 无需 Node。 +# 2. Cargo —— 无需 Node,两个 crate 都要安装。 cargo install codewhale-cli --locked # `codewhale` 入口 cargo install codewhale-tui --locked # `codewhale-tui` TUI 二进制 # 3. Homebrew —— macOS 包管理器。 +# tap/formula 名称仍是旧名;实际安装 codewhale 和 codewhale-tui。 brew tap Hmbown/deepseek-tui brew install deepseek-tui -# 4. 直接下载 —— 无需任何工具链。 +# 4. 直接下载 —— GitHub Releases 的平台压缩包。 # https://github.com/Hmbown/CodeWhale/releases -# 覆盖 Linux x64/ARM64、macOS x64/ARM64、Windows x64 +# 压缩包包含 codewhale 和 codewhale-tui 以及安装脚本; +# 也提供单独二进制给脚本使用,手动安装时请把这一对放在一起。 # 5. Docker —— 预构建发布镜像。 docker volume create codewhale-home @@ -77,78 +81,9 @@ CodeWhale 就是这套框架,围绕 DeepSeek V4 构建,基于三个理念: | **清晰的管辖权** | 成文宪法,九层权威。用户意图优先于陈旧指令。验证优先于自信。 | | **递归改进** | V4 参与了框架的编写。框架改进 → V4 更高效 → 进一步改进框架。每轮从更强的位置开始。 | -开源、单二进制自包含、为终端构建。 +开源、终端原生,并以 `codewhale` / `codewhale-tui` 这一组 Rust 二进制发布。 - -## 安装 - -`codewhale` 是自包含 Rust 二进制——**运行时不依赖 Node.js 或 Python**。 -下面几种方式装出来的是同一套二进制,按你已有的工具链选一个即可: - -```bash -# 1. npm —— 已装 Node 的最方便方式。npm 包只是一个下载器, -# 会从 GitHub Releases 拉取对应平台的预编译二进制, -# 并不会让 codewhale 本身依赖 Node 运行时。 -npm install -g codewhale - -# 2. Cargo —— 无需 Node。 -cargo install codewhale-cli --locked # `codewhale` 入口 -cargo install codewhale-tui --locked # `codewhale-tui` TUI 二进制 - -# 3. Homebrew —— macOS 包管理器。 -brew tap Hmbown/deepseek-tui -brew install deepseek-tui - -# 4. 直接下载 —— 无需任何工具链。 -# https://github.com/Hmbown/CodeWhale/releases -# 覆盖 Linux x64/ARM64、macOS x64/ARM64、Windows x64 - -# 5. Docker —— 预构建发布镜像。 -docker volume create codewhale-home -docker run --rm -it \ - -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \ - -v codewhale-home:/home/codewhale/.deepseek \ - -v "$PWD:/workspace" \ - -w /workspace \ - ghcr.io/hmbown/codewhale:latest -``` - -> 中国大陆访问较慢时,npm 可加 `--registry=https://registry.npmmirror.com`, -> 或使用下方的 [Cargo 镜像](#中国大陆--镜像友好安装)。 -> -> 下载安全:官方二进制只发布在 -> `https://github.com/Hmbown/CodeWhale/releases`。手动下载时请校验 -> SHA-256 manifest,并避免相似仓库名或搜索结果里的镜像站。详见 -> [下载安全与校验](docs/INSTALL.md#2-download-safety-and-checksums)。 - -已经安装过?按你的安装方式更新: - -```bash -codewhale update # release 二进制更新器 -npm install -g codewhale@latest # npm 包装器 -brew update && brew upgrade deepseek-tui -cargo install codewhale-cli --locked --force -cargo install codewhale-tui --locked --force -``` - -[![CI](https://github.com/Hmbown/CodeWhale/actions/workflows/ci.yml/badge.svg)](https://github.com/Hmbown/CodeWhale/actions/workflows/ci.yml) -[![npm](https://img.shields.io/npm/v/codewhale)](https://www.npmjs.com/package/codewhale) -[![crates.io](https://img.shields.io/crates/v/codewhale-cli?label=crates.io)](https://crates.io/crates/codewhale-cli) -[DeepWiki project index](https://deepwiki.com/Hmbown/CodeWhale) - -![codewhale 截图](assets/screenshot.png) - ---- - -## 这是什么? - -模型回答问题。智能体完成任务。区别在于运行框架——包围模型的规则、工具、证据和反馈循环。 - -CodeWhale 就是这套框架,围绕 DeepSeek V4 Pro 和 Flash 构建。它最初是一个个人工具,因为维护者受够了模型在任务中途迷失方向、服从过时指令而非用户当前请求、或者命令失败就放弃。结果诞生了一个让模型保持方向的系统:宪政提示层级、结构化信任边界、并行子智能体、前缀缓存感知的上下文管理、以及让模型有足够信号来自我校正的验证节拍。 - -DeepSeek V4 参与了这套框架的部分编写。这很重要——它意味着 CodeWhale 已经是使用 V4 最有效的方式,并且随着 V4 的改进,框架也会随之改进。每一轮都留下更好的提示、更好的规则、更好的交接。下一轮从一个更强的位置开始。 - -### 框架如何工作 +## 框架如何工作 智能体模型面临大规模的冲突信息:用户意图、项目规则、系统默认值、工具输出和陈旧记忆在单轮对话中争夺权威。LLM 作为裁判需要管辖权——当它们冲突时,哪个来源胜出? @@ -199,7 +134,7 @@ codewhale --version codewhale --model auto ``` -预构建二进制覆盖 **Linux x64**、**Linux ARM64**(v0.8.8 起)、**macOS x64**、**macOS ARM64** 和 **Windows x64**。其他目标平台(musl、riscv64、FreeBSD 等)请见下方的[从源码安装](#从源码安装)或 [docs/INSTALL.md](docs/INSTALL.md)。 +预构建二进制对和平台压缩包覆盖 **Linux x64**、**Linux ARM64**(v0.8.8 起)、**macOS x64**、**macOS ARM64** 和 **Windows x64**。其他目标平台(musl、riscv64、FreeBSD 等)请见下方的[从源码安装](#从源码安装)或 [docs/INSTALL.md](docs/INSTALL.md)。 首次启动时会提示输入 [DeepSeek API key](https://platform.deepseek.com/api_keys)。密钥保存到 `~/.deepseek/config.toml`,在任意目录、IDE 终端和脚本中都能使用,不会触发系统密钥环弹窗。 @@ -277,7 +212,7 @@ release。先运行 `scoop update`,安装后用 `codewhale --version` 核对 ```bash scoop update -scoop install deepseek-tui +scoop install codewhale codewhale --version ``` diff --git a/docs/INSTALL.md b/docs/INSTALL.md index ab4ef018..473618b5 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -12,8 +12,8 @@ If you just want the short version, see the ## 1. Supported platforms -`codewhale-tui` ships prebuilt binaries for these -platform/architecture combinations from v0.8.8 onward: +CodeWhale ships matched `codewhale` and `codewhale-tui` prebuilt binaries for +these platform/architecture combinations from v0.8.8 onward: | Platform | Architecture | npm install | `cargo install` | GitHub release asset | | ------------ | ------------ | :---------: | :-------------: | ----------------------------------------------------- | @@ -49,7 +49,7 @@ systems such as Alpine should use [Build from source](#7-build-from-source). Official release binaries are published only from `https://github.com/Hmbown/CodeWhale/releases` and the npm package named -`codewhale-tui`. Do not install release assets from look-alike repositories, +`codewhale`. Do not install release assets from look-alike repositories, archives, or search-result mirrors unless you deliberately trust that mirror. Every GitHub release includes `codewhale-artifacts-sha256.txt`. If you download diff --git a/web/lib/facts.generated.ts b/web/lib/facts.generated.ts index 642acbfe..d7cbe216 100644 --- a/web/lib/facts.generated.ts +++ b/web/lib/facts.generated.ts @@ -18,8 +18,8 @@ export interface RepoFacts { } export const FACTS: RepoFacts = { - "generatedAt": "2026-05-26T15:45:43.239Z", - "version": "0.8.45", + "generatedAt": "2026-05-26T17:03:21.939Z", + "version": "0.8.46", "crates": [ "agent", "app-server", diff --git a/web/redirect/src/index.ts b/web/redirect/src/index.ts new file mode 100644 index 00000000..07f803ab --- /dev/null +++ b/web/redirect/src/index.ts @@ -0,0 +1,7 @@ +export default { + fetch(request: Request): Response { + const url = new URL(request.url); + url.host = "codewhale.net"; + return Response.redirect(url.toString(), 301); + }, +}; diff --git a/web/redirect/wrangler.jsonc b/web/redirect/wrangler.jsonc new file mode 100644 index 00000000..6d910310 --- /dev/null +++ b/web/redirect/wrangler.jsonc @@ -0,0 +1,11 @@ +{ + "$schema": "../node_modules/wrangler/config-schema.json", + "name": "deepseek-tui-web", + "main": "src/index.ts", + "compatibility_date": "2025-04-01", + "observability": { "enabled": true }, + "routes": [ + { "pattern": "deepseek-tui.com", "custom_domain": true }, + { "pattern": "www.deepseek-tui.com", "custom_domain": true } + ] +} diff --git a/web/wrangler.jsonc b/web/wrangler.jsonc index 6014a3a8..a4073b9d 100644 --- a/web/wrangler.jsonc +++ b/web/wrangler.jsonc @@ -1,6 +1,6 @@ { "$schema": "node_modules/wrangler/config-schema.json", - "name": "deepseek-tui-web", + "name": "codewhale-web", "main": "worker.ts", "compatibility_date": "2025-04-01", "compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"], @@ -9,6 +9,10 @@ "binding": "ASSETS" }, "observability": { "enabled": true }, + "routes": [ + { "pattern": "codewhale.net", "custom_domain": true }, + { "pattern": "www.codewhale.net", "custom_domain": true } + ], "kv_namespaces": [ { "binding": "CURATED_KV", @@ -22,7 +26,7 @@ "vars": { "GITHUB_REPO": "Hmbown/CodeWhale", "DEEPSEEK_MODEL": "deepseek-v4-flash", - "DEEPSEEK_BASE_URL": "https://gateway.ai.cloudflare.com/v1/cf50f793171d7cb3b2ce23368b69cdcb/deepseek-tui-web/deepseek" + "DEEPSEEK_BASE_URL": "https://gateway.ai.cloudflare.com/v1/cf50f793171d7cb3b2ce23368b69cdcb/codewhale-web/deepseek" }, "triggers": { "crons": [