rebut-mcp 0.1.0 → 0.3.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.en.md +18 -41
- package/README.ja.md +18 -41
- package/README.md +18 -41
- package/README.zh-CN.md +18 -41
- package/bin/rebut.mjs +1 -1
- package/config.example.json +9 -0
- package/docs/guide/en/configuration.md +55 -63
- package/docs/guide/en/installation.md +66 -57
- package/docs/guide/en/operations.md +45 -16
- package/docs/guide/en.md +5 -16
- package/docs/guide/ja/configuration.md +55 -63
- package/docs/guide/ja/installation.md +66 -57
- package/docs/guide/ja/operations.md +45 -16
- package/docs/guide/ja.md +5 -16
- package/docs/guide/ko/configuration.md +55 -63
- package/docs/guide/ko/installation.md +66 -57
- package/docs/guide/ko/operations.md +47 -16
- package/docs/guide/ko.md +5 -16
- package/docs/guide/zh-CN/configuration.md +55 -63
- package/docs/guide/zh-CN/installation.md +66 -57
- package/docs/guide/zh-CN/operations.md +45 -16
- package/docs/guide/zh-CN.md +5 -16
- package/docs/releases/0.1.0.ko.md +43 -0
- package/docs/releases/0.2.0.ko.md +72 -0
- package/docs/releases/release-checklist.ko.md +62 -0
- package/lib/cli.mjs +1992 -248
- package/migrations/0001_ledger.sql +20 -0
- package/migrations/0002_profiles.sql +6 -0
- package/package.json +12 -6
- package/src/contracts.ts +59 -3
- package/docs/guide/en/architecture.md +0 -20
- package/docs/guide/en/reviewer-integration.md +0 -16
- package/docs/guide/en/validation.md +0 -25
- package/docs/guide/ja/architecture.md +0 -20
- package/docs/guide/ja/reviewer-integration.md +0 -16
- package/docs/guide/ja/validation.md +0 -25
- package/docs/guide/ko/architecture.md +0 -20
- package/docs/guide/ko/reviewer-integration.md +0 -16
- package/docs/guide/ko/validation.md +0 -25
- package/docs/guide/zh-CN/architecture.md +0 -20
- package/docs/guide/zh-CN/reviewer-integration.md +0 -16
- package/docs/guide/zh-CN/validation.md +0 -25
package/README.en.md
CHANGED
|
@@ -2,64 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
# Rebut
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/rebut-mcp)
|
|
6
|
+
[](https://www.npmjs.com/package/rebut-mcp)
|
|
7
|
+
[](https://github.com/abruption/rebut/blob/main/LICENSE)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
**Local-first independent code review MCP. Cloudflare Worker is optional.**
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
[한국어](README.md) · **English** · [简体中文](README.zh-CN.md) · [日本語](README.ja.md)
|
|
10
12
|
|
|
11
13
|
</div>
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
An MCP for reviewing supplied code and diffs through OpenAI or Claude APIs. Review material is sent to the selected provider.
|
|
16
|
+
|
|
17
|
+
On 0.3.0+, select Claude with `rebut set provider anthropic`, then `rebut set api-key` and `rebut setup --client claude`. Host and provider are independent.
|
|
14
18
|
|
|
15
19
|
## Quick start
|
|
16
20
|
|
|
17
|
-
Requires
|
|
21
|
+
Requires Node.js 24+. This example uses macOS Keychain.
|
|
18
22
|
|
|
19
23
|
```sh
|
|
20
24
|
npm install -g rebut-mcp
|
|
21
|
-
rebut set
|
|
22
|
-
rebut set token
|
|
25
|
+
rebut set api-key
|
|
23
26
|
rebut setup --client codex
|
|
24
|
-
rebut doctor
|
|
25
27
|
rebut doctor --connect
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
`rebut-mcp` (initial CLI version `0.1.0`, executable `rebut`) is a client and stdio bridge for a **self-hosted Worker**. Deploy Worker/D1 from a GitHub source checkout with your own Cloudflare account and OpenAI key. Public source or the npm package grants no access to a personal Worker or credits. The package contains no real endpoint, private config, bearer, provider key, or reviews. These instructions target CLI `0.1.0`.
|
|
31
|
-
|
|
32
|
-
Keep developer validation in the source checkout:
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
npm ci
|
|
36
|
-
npm run typecheck
|
|
37
|
-
npm run build
|
|
38
|
-
npm test
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Automated tests mock the provider and make no paid model calls. Actual API tests use **gpt-6-luna**; production uses **gpt-6-astra / medium**. Luna results do not establish Astra availability or equivalent review quality. Worker deployment requires D1 and the secrets `OPENAI_API_KEY`, `REBUT_CONFIG`, and `AUTH_TOKENS`; follow [installation and private deployment](docs/guide/en/installation.md).
|
|
42
|
-
|
|
43
|
-
Choose local defaults with `rebut set model MODEL_ID`, `rebut set reasoning EFFORT`, or `rebut set profile PROFILE_ID`. Preferences resolve server-allowlisted profiles for new collection; explicit `collect --profile` wins, and `review` keeps the frozen bundle profile. With no preferences the default is `astra-medium`. `rebut profile list` reads authenticated server model/rate metadata without a provider call. Owners can manage profiles in D1 after a one-time Worker upgrade, migration `0002`, and separate admin credential setup; see [configuration](docs/guide/en/configuration.md).
|
|
44
|
-
|
|
45
|
-
## What it does
|
|
30
|
+
Restart Codex after registration. See [installation](docs/guide/en/installation.md) for Linux/env and Vaultwarden.
|
|
46
31
|
|
|
47
|
-
|
|
48
|
-
- Checks authentication, an allowlisted profile, duplicate request IDs and a deployment-wide atomic budget reservation before one bounded Responses call.
|
|
49
|
-
- Returns structured findings with supplied file/line evidence, model identity, token usage and estimated cost.
|
|
50
|
-
- Exposes `review` and metadata-only `review_status`. After timeout/unknown, keep the same request ID; the server never automatically creates a replacement paid call.
|
|
32
|
+
New installations use local stdio. Choose [Worker mode](docs/guide/en/installation.md#optional-worker-deployment) to share budgets and request history across devices. Existing Worker settings remain unchanged.
|
|
51
33
|
|
|
52
|
-
|
|
34
|
+
`review` is a paid call; `doctor --connect` checks connectivity without a paid review. Keep the same request ID when the result is uncertain.
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
## Guides
|
|
55
37
|
|
|
56
|
-
|
|
38
|
+
- [Installation](docs/guide/en/installation.md)
|
|
39
|
+
- [Configuration](docs/guide/en/configuration.md)
|
|
40
|
+
- [Operations](docs/guide/en/operations.md)
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
- [Installation and input collection](docs/guide/en/installation.md)
|
|
60
|
-
- [Configuration, budgets and MCP contract](docs/guide/en/configuration.md)
|
|
61
|
-
- [Operations and recovery](docs/guide/en/operations.md)
|
|
62
|
-
- [Opt-in reviewer integration](docs/guide/en/reviewer-integration.md)
|
|
63
|
-
- [Architecture](docs/guide/en/architecture.md)
|
|
64
|
-
- [Validation and limits of the results](docs/guide/en/validation.md)
|
|
65
|
-
- [MIT license](LICENSE)
|
|
42
|
+
[Releases](https://github.com/abruption/rebut/releases) · [MIT](LICENSE)
|
package/README.ja.md
CHANGED
|
@@ -2,64 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
# Rebut
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/rebut-mcp)
|
|
6
|
+
[](https://www.npmjs.com/package/rebut-mcp)
|
|
7
|
+
[](https://github.com/abruption/rebut/blob/main/LICENSE)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
**ローカル実行を標準とする独立コードレビューMCP。Cloudflare Workerは任意です。**
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
[한국어](README.md) · [English](README.en.md) · [简体中文](README.zh-CN.md) · **日本語**
|
|
10
12
|
|
|
11
13
|
</div>
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
提供したコードと diff を OpenAI または Claude API でレビューする MCP です。資料は選択したプロバイダーに送信します。
|
|
16
|
+
|
|
17
|
+
0.3.0 以降の Claude 対応は `rebut set provider anthropic` → `rebut set api-key` → `rebut setup --client claude` の順です。ホストとプロバイダーは別々に選びます。
|
|
14
18
|
|
|
15
19
|
## クイックスタート
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
Node.js 24 以上が必要です。以下は macOS Keychain の例です。
|
|
18
22
|
|
|
19
23
|
```sh
|
|
20
24
|
npm install -g rebut-mcp
|
|
21
|
-
rebut set
|
|
22
|
-
rebut set token
|
|
25
|
+
rebut set api-key
|
|
23
26
|
rebut setup --client codex
|
|
24
|
-
rebut doctor
|
|
25
27
|
rebut doctor --connect
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
`rebut-mcp`(初期 CLI バージョン `0.1.0`、実行コマンド `rebut`)は**セルフホストした Worker**のクライアントと stdio ブリッジです。Worker/D1 は引き続き GitHub のソースチェックアウトから、自分の Cloudflare アカウントと OpenAI キーでデプロイします。公開ソースや npm パッケージは、個人の Worker やクレジットへのアクセスを付与しません。パッケージに実際のエンドポイント、非公開設定、Bearer、プロバイダーキー、レビュー本文は含まれません。この手順は CLI `0.1.0` を対象としています。
|
|
31
|
-
|
|
32
|
-
開発者向けの検証はソースチェックアウトで実行します。
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
npm ci
|
|
36
|
-
npm run typecheck
|
|
37
|
-
npm run build
|
|
38
|
-
npm test
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
自動テストはプロバイダーをモックし、有料モデルを呼び出しません。実際の API テストには **gpt-6-luna**、本番には **gpt-6-astra / medium** を使います。Luna の結果は Astra の利用可否や同等のレビュー品質を実証しません。Worker には D1 と `OPENAI_API_KEY`、`REBUT_CONFIG`、`AUTH_TOKENS` のシークレットが必要です。[インストールと非公開デプロイ](docs/guide/ja/installation.md)に従ってください。
|
|
42
|
-
|
|
43
|
-
`rebut set model MODEL_ID`、`rebut set reasoning EFFORT`、`rebut set profile PROFILE_ID` でローカルの既定値を選びます。新しい収集ではサーバーの許可リスト内のプロファイルに解決され、明示的な `collect --profile` が優先し、`review` は確定済みバンドルのプロファイルを保持します。設定がなければ `astra-medium` です。`rebut profile list` はプロバイダーを呼ばず、認証付きでサーバーのモデルと料金のメタデータを読み取ります。所有者は一度限りの Worker 更新、マイグレーション `0002`、別の管理認証情報の設定後に D1 でプロファイルを管理できます。[設定](docs/guide/ja/configuration.md)を参照してください。
|
|
44
|
-
|
|
45
|
-
## 主な機能
|
|
30
|
+
登録後に Codex を再起動してください。Linux/env・Vaultwarden 設定は[インストール](docs/guide/ja/installation.md)を参照してください。
|
|
46
31
|
|
|
47
|
-
|
|
48
|
-
- 認証、許可リスト内のプロファイル、リクエスト ID の重複、デプロイ全体のアトミックな予算予約を確認してから、制限付きの Responses 呼び出しを 1 回実行します。
|
|
49
|
-
- 提供されたファイルと行に基づく証拠、モデル情報、トークン使用量、推定費用を含む構造化された指摘を返します。
|
|
50
|
-
- `review` と、メタデータのみを返す `review_status` を公開します。タイムアウトや結果不明の後も同じリクエスト ID を使ってください。サーバーは代わりの有料呼び出しを自動で作成しません。
|
|
32
|
+
新規インストールはローカル stdio を使います。端末間で予算・台帳を共有する場合は [Worker モード](docs/guide/ja/installation.md#任意の-worker-デプロイ)を選択します。既存 Worker 設定は維持します。
|
|
51
33
|
|
|
52
|
-
|
|
34
|
+
`review` は有料呼び出しです。`doctor --connect` は有料レビューなしで接続確認を行います。結果が不明なら同じリクエスト ID を維持してください。
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
## ガイド
|
|
55
37
|
|
|
56
|
-
|
|
38
|
+
- [インストール](docs/guide/ja/installation.md)
|
|
39
|
+
- [設定](docs/guide/ja/configuration.md)
|
|
40
|
+
- [運用](docs/guide/ja/operations.md)
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
- [インストールと入力の収集](docs/guide/ja/installation.md)
|
|
60
|
-
- [設定、予算、MCP 仕様](docs/guide/ja/configuration.md)
|
|
61
|
-
- [運用と復旧](docs/guide/ja/operations.md)
|
|
62
|
-
- [明示的に選択するレビュアーの統合](docs/guide/ja/reviewer-integration.md)
|
|
63
|
-
- [アーキテクチャ](docs/guide/ja/architecture.md)
|
|
64
|
-
- [検証と結果の限界](docs/guide/ja/validation.md)
|
|
65
|
-
- [MIT ライセンス](LICENSE)
|
|
42
|
+
[リリース](https://github.com/abruption/rebut/releases) · [MIT](LICENSE)
|
package/README.md
CHANGED
|
@@ -2,64 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
# Rebut
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/rebut-mcp)
|
|
6
|
+
[](https://www.npmjs.com/package/rebut-mcp)
|
|
7
|
+
[](https://github.com/abruption/rebut/blob/main/LICENSE)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
**로컬에서 바로 실행하는 독립 코드 검토 MCP. Cloudflare Worker는 선택 사항입니다.**
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
**한국어** · [English](README.en.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja.md)
|
|
10
12
|
|
|
11
13
|
</div>
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
OpenAI 또는 Claude API로 제공한 코드·diff를 검토하는 MCP입니다. 자료는 선택한 공급자로 전송합니다.
|
|
16
|
+
|
|
17
|
+
Claude 지원은 0.3.0 이상에서 `rebut set provider anthropic` → `rebut set api-key` → `rebut setup --client claude` 순서로 설정합니다. 호스트와 공급자는 별도 선택입니다.
|
|
14
18
|
|
|
15
19
|
## 빠른 시작
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
Node.js 24 이상이 필요합니다. macOS Keychain을 사용하는 예입니다.
|
|
18
22
|
|
|
19
23
|
```sh
|
|
20
24
|
npm install -g rebut-mcp
|
|
21
|
-
rebut set
|
|
22
|
-
rebut set token
|
|
25
|
+
rebut set api-key
|
|
23
26
|
rebut setup --client codex
|
|
24
|
-
rebut doctor
|
|
25
27
|
rebut doctor --connect
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
`rebut-mcp`(초기 CLI 버전 `0.1.0`, 실행 명령 `rebut`)는 **직접 호스팅한 Worker**의 클라이언트이자 stdio 브리지입니다. Worker/D1은 GitHub 소스 체크아웃에서 자신의 Cloudflare 계정과 OpenAI 키로 배포합니다. 공개 소스나 npm 패키지는 개인 Worker 또는 크레딧 접근 권한을 주지 않습니다. 패키지에는 실제 엔드포인트, 비공개 설정, bearer, 공급자 키, 검토 본문이 포함되지 않습니다. 이 안내는 CLI `0.1.0`을 대상으로 합니다.
|
|
31
|
-
|
|
32
|
-
개발자 검증은 소스 체크아웃에서 수행합니다.
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
npm ci
|
|
36
|
-
npm run typecheck
|
|
37
|
-
npm run build
|
|
38
|
-
npm test
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
자동화 테스트는 공급자를 모의 처리하며 유료 모델을 호출하지 않습니다. 실제 API 테스트에는 **gpt-6-luna**, 운영에는 **gpt-6-astra / medium**을 사용합니다. Luna 결과로 Astra의 사용 가능 여부나 동등한 검토 품질을 입증할 수는 없습니다. Worker 배포에는 D1과 `OPENAI_API_KEY`, `REBUT_CONFIG`, `AUTH_TOKENS` 시크릿이 필요합니다. [설치 및 비공개 배포](docs/guide/ko/installation.md)를 따르세요.
|
|
42
|
-
|
|
43
|
-
`rebut set model MODEL_ID`, `rebut set reasoning EFFORT`, `rebut set profile PROFILE_ID`로 로컬 기본값을 선택합니다. 새 수집에서 서버 허용 목록의 프로필을 찾으며 명시적인 `collect --profile`이 우선하고 `review`는 고정 번들의 프로필을 유지합니다. 환경설정이 없으면 `astra-medium`입니다. `rebut profile list`는 공급자 호출 없이 인증된 서버 모델·요금 메타데이터를 조회합니다. 소유자는 일회성 Worker 업그레이드, 마이그레이션 `0002`, 별도 관리자 자격증명 설정 뒤 D1에서 프로필을 관리할 수 있습니다. [설정](docs/guide/ko/configuration.md)을 참고하세요.
|
|
44
|
-
|
|
45
|
-
## 주요 기능
|
|
30
|
+
등록 후 Codex를 재시작하세요. Linux/env·Vaultwarden 설정은 [설치 안내](docs/guide/ko/installation.md)를 참고하세요.
|
|
46
31
|
|
|
47
|
-
|
|
48
|
-
- 인증, 허용 목록의 프로필, 중복 요청 ID, 배포 전체의 원자적 예산 예약을 확인한 뒤 한도가 설정된 Responses 호출을 한 번 수행합니다.
|
|
49
|
-
- 제공한 파일·행 근거, 모델 식별 정보, 토큰 사용량, 예상 비용을 포함한 구조화된 지적 사항을 반환합니다.
|
|
50
|
-
- `review`와 메타데이터만 제공하는 `review_status`를 노출합니다. 시간 초과 또는 unknown 이후에도 같은 요청 ID를 유지하세요. 서버는 대체 유료 호출을 자동으로 만들지 않습니다.
|
|
32
|
+
새 설치는 로컬 stdio를 사용합니다. 여러 기기의 예산·요청 장부를 공유하려면 [Worker 모드](docs/guide/ko/installation.md#선택적-worker-배포)를 선택하세요. 기존 Worker 설정은 유지됩니다.
|
|
51
33
|
|
|
52
|
-
|
|
34
|
+
`review`는 유료 호출이며 `doctor --connect`는 유료 검토 없이 연결만 확인합니다. 결과가 불확실하면 같은 요청 ID를 유지하세요.
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
## 사용 안내
|
|
55
37
|
|
|
56
|
-
|
|
38
|
+
- [설치](docs/guide/ko/installation.md)
|
|
39
|
+
- [설정](docs/guide/ko/configuration.md)
|
|
40
|
+
- [운영](docs/guide/ko/operations.md)
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
- [설치 및 입력 수집](docs/guide/ko/installation.md)
|
|
60
|
-
- [설정, 예산 및 MCP 계약](docs/guide/ko/configuration.md)
|
|
61
|
-
- [운영 및 복구](docs/guide/ko/operations.md)
|
|
62
|
-
- [선택적 검토자 연동](docs/guide/ko/reviewer-integration.md)
|
|
63
|
-
- [아키텍처](docs/guide/ko/architecture.md)
|
|
64
|
-
- [검증 및 결과의 한계](docs/guide/ko/validation.md)
|
|
65
|
-
- [MIT 라이선스](LICENSE)
|
|
42
|
+
[릴리즈](https://github.com/abruption/rebut/releases) · [MIT](LICENSE)
|
package/README.zh-CN.md
CHANGED
|
@@ -2,64 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
# Rebut
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/rebut-mcp)
|
|
6
|
+
[](https://www.npmjs.com/package/rebut-mcp)
|
|
7
|
+
[](https://github.com/abruption/rebut/blob/main/LICENSE)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
**默认本地运行的独立代码审查 MCP,可选 Cloudflare Worker。**
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
[한국어](README.md) · [English](README.en.md) · **简体中文** · [日本語](README.ja.md)
|
|
10
12
|
|
|
11
13
|
</div>
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
通过 OpenAI 或 Claude API 审查所提供代码和 diff 的 MCP。材料发送至所选供应商。
|
|
16
|
+
|
|
17
|
+
0.3.0+ 的 Claude 支持按 `rebut set provider anthropic` → `rebut set api-key` → `rebut setup --client claude` 设置;宿主与供应商分别选择。
|
|
14
18
|
|
|
15
19
|
## 快速开始
|
|
16
20
|
|
|
17
|
-
需要
|
|
21
|
+
需要 Node.js 24+。本例使用 macOS Keychain。
|
|
18
22
|
|
|
19
23
|
```sh
|
|
20
24
|
npm install -g rebut-mcp
|
|
21
|
-
rebut set
|
|
22
|
-
rebut set token
|
|
25
|
+
rebut set api-key
|
|
23
26
|
rebut setup --client codex
|
|
24
|
-
rebut doctor
|
|
25
27
|
rebut doctor --connect
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
`rebut-mcp`(初始 CLI 版本 `0.1.0`,命令 `rebut`)是**自托管 Worker**的客户端和 stdio 桥接程序。Worker/D1 仍需从 GitHub 源代码检出目录使用您自己的 Cloudflare 账户和 OpenAI 密钥部署。公开源代码或 npm 包不会授予个人 Worker 或额度的访问权限。包中不包含真实端点、私有配置、Bearer 令牌、提供商密钥或审查正文。这些说明适用于 CLI `0.1.0`。
|
|
31
|
-
|
|
32
|
-
开发者验证仍在源代码检出目录中执行:
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
npm ci
|
|
36
|
-
npm run typecheck
|
|
37
|
-
npm run build
|
|
38
|
-
npm test
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
自动化测试模拟提供商,不会进行付费模型调用。真实 API 测试使用 **gpt-6-luna**,生产使用 **gpt-6-astra / medium**。Luna 结果不能证明 Astra 可用或审查质量相当。Worker 部署需要 D1 及 `OPENAI_API_KEY`、`REBUT_CONFIG`、`AUTH_TOKENS` 三个 Secret;请按照[安装与私有部署](docs/guide/zh-CN/installation.md)操作。
|
|
42
|
-
|
|
43
|
-
使用 `rebut set model MODEL_ID`、`rebut set reasoning EFFORT` 或 `rebut set profile PROFILE_ID` 选择本地默认值。新收集时偏好会匹配服务器允许列表的配置方案;显式 `collect --profile` 优先,`review` 保留冻结输入包中的配置方案。无偏好时默认为 `astra-medium`。`rebut profile list` 无需调用提供商即可读取经过身份验证的服务器模型/费率元数据。所有者完成一次 Worker 升级、迁移 `0002` 及单独管理凭据设置后,可在 D1 中管理配置方案;见[配置](docs/guide/zh-CN/configuration.md)。
|
|
44
|
-
|
|
45
|
-
## 功能
|
|
30
|
+
注册后重启 Codex。Linux/env 与 Vaultwarden 设置见[安装指南](docs/guide/zh-CN/installation.md)。
|
|
46
31
|
|
|
47
|
-
-
|
|
48
|
-
- 在进行一次受限的 Responses 调用之前,检查身份验证、允许列表中的配置、重复请求 ID,以及部署范围内的原子预算预留。
|
|
49
|
-
- 返回结构化发现,包含所提供文件和行的证据、模型身份、令牌用量及估算费用。
|
|
50
|
-
- 提供 `review` 和仅返回元数据的 `review_status`。超时或结果未知后,请保留同一个请求 ID;服务器绝不会自动创建替代的付费调用。
|
|
32
|
+
新安装使用本地 stdio。跨设备共享预算与请求账本时选择 [Worker 模式](docs/guide/zh-CN/installation.md#可选-worker-部署)。已有 Worker 设置保持不变。
|
|
51
33
|
|
|
52
|
-
|
|
34
|
+
`review` 是付费调用,`doctor --connect` 仅检查连接,不进行付费审查。结果不确定时保留原请求 ID。
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
## 指南
|
|
55
37
|
|
|
56
|
-
|
|
38
|
+
- [安装](docs/guide/zh-CN/installation.md)
|
|
39
|
+
- [配置](docs/guide/zh-CN/configuration.md)
|
|
40
|
+
- [运维](docs/guide/zh-CN/operations.md)
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
- [安装与输入收集](docs/guide/zh-CN/installation.md)
|
|
60
|
-
- [配置、预算与 MCP 契约](docs/guide/zh-CN/configuration.md)
|
|
61
|
-
- [运维与恢复](docs/guide/zh-CN/operations.md)
|
|
62
|
-
- [可选审查器集成](docs/guide/zh-CN/reviewer-integration.md)
|
|
63
|
-
- [架构](docs/guide/zh-CN/architecture.md)
|
|
64
|
-
- [验证及结果的局限](docs/guide/zh-CN/validation.md)
|
|
65
|
-
- [MIT 许可证](LICENSE)
|
|
42
|
+
[发行记录](https://github.com/abruption/rebut/releases) · [MIT](LICENSE)
|
package/bin/rebut.mjs
CHANGED
package/config.example.json
CHANGED
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
"inputMicrousdPerMillion": 100000,
|
|
16
16
|
"outputMicrousdPerMillion": 500000,
|
|
17
17
|
"priceVersion": "openai-standard-2026-11-12"
|
|
18
|
+
},
|
|
19
|
+
"claude-medium": {
|
|
20
|
+
"provider": "anthropic",
|
|
21
|
+
"model": "claude-opus-5-5",
|
|
22
|
+
"reasoning": "medium",
|
|
23
|
+
"maxOutputTokens": 8192,
|
|
24
|
+
"inputMicrousdPerMillion": 4000000,
|
|
25
|
+
"outputMicrousdPerMillion": 20000000,
|
|
26
|
+
"priceVersion": "anthropic-standard-2026-11-14"
|
|
18
27
|
}
|
|
19
28
|
},
|
|
20
29
|
"limits": {
|
|
@@ -1,104 +1,96 @@
|
|
|
1
|
-
# Configuration
|
|
1
|
+
# Configuration
|
|
2
2
|
|
|
3
3
|
[한국어](../ko/configuration.md) · **English** · [简体中文](../zh-CN/configuration.md) · [日本語](../ja/configuration.md)
|
|
4
4
|
|
|
5
|
-
[
|
|
5
|
+
[README](../../../README.en.md) · [Installation](installation.md) · [Operations](operations.md)
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Modes and storage
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
| Mode | Selection | Ledger scope |
|
|
10
|
+
| --------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
11
|
+
| Local (new-install default) | `rebut set mode local` | Private SQLite in one data directory |
|
|
12
|
+
| Worker | `rebut set endpoint URL` or `rebut set mode worker` (existing endpoint required) | One deployment's D1 shared by its clients |
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Existing endpoint settings remain Worker mode. There is no automatic backend fallback; switching neither migrates records nor releases reservations.
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
On macOS/Linux, settings are `~/.config/rebut/config.json` and the local ledger is `~/.local/share/rebut/local/ledger.sqlite`. With `REBUT_CONFIG_DIR`, use `config.json` and `local/` inside that directory. Registration and status queries must use the same directory.
|
|
14
17
|
|
|
15
|
-
##
|
|
18
|
+
## Credentials
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
`rebut set secret-store keychain|vaultwarden|env` selects the backend for every role without fallback. Keychain service: `com.abruption.rebut`.
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
`MODEL_ID`, `EFFORT`, and `PROFILE_ID` are placeholders. Model/reasoning preferences resolve an allowlisted server profile; they do not grant arbitrary model access. An explicit collector `--profile` overrides local preferences. With no preferences the default remains `astra-medium`. `rebut review` respects the profile embedded in the frozen bundle and does not rewrite it using current preferences.
|
|
22
|
+
| Role | Keychain account / hidden-input command | Env | Default Vaultwarden item / setting key |
|
|
23
|
+
| -------------------- | --------------------------------------- | ---------------------- | ----------------------------------------------------- |
|
|
24
|
+
| Local provider | `openai-api-key` / `set api-key` | `REBUT_OPENAI_API_KEY` | `Rebut — OpenAI API Key` / `vaultwarden-api-key-item` |
|
|
25
|
+
| Worker access | `codex-mcp-bearer` / `set token` | `REBUT_TOKEN` | `Rebut — MCP Access Token` / `vaultwarden-item` |
|
|
26
|
+
| Worker administrator | `codex-mcp-admin` / `set admin-token` | `REBUT_ADMIN_TOKEN` | `Rebut — MCP Admin Token` / `vaultwarden-admin-item` |
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
Prefix commands with `rebut`. Change a Vaultwarden item with `rebut set SETTING_KEY NAME`. Use `--stdin` only for an explicitly protected pipe instead of hidden input. `rebut set api-key-env OPENAI_API_KEY` explicitly changes the local env name; the two variables do not fall back to each other. Administrator tokens are not forwarded to MCP hosts.
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
## Model profiles
|
|
30
31
|
|
|
31
32
|
```sh
|
|
32
33
|
rebut profile list
|
|
33
|
-
rebut set
|
|
34
|
+
rebut set model MODEL_ID
|
|
35
|
+
rebut set reasoning EFFORT
|
|
36
|
+
rebut set profile PROFILE_ID
|
|
34
37
|
```
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
Preferences affect new collection. Explicit `collect --profile` wins; `review` retains the frozen bundle's profile. The default is `astra-medium`. Allowlisting does not grant provider model access.
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
```sh
|
|
41
|
-
rebut profile set astra-medium --model gpt-6-astra --reasoning medium --max-output-tokens 8192 --input-usd-per-million 10 --output-usd-per-million 50 --price-version official-2026-11-12
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Both prices and `--price-version` are required; the server uses them for budget reservations and cost estimates. Rebut does not automatically fetch prices or call a provider models endpoint. `--if-revision N` adds an explicit compare-and-swap revision condition to set/remove. A `409` conflict requires rereading `rebut profile list` and deciding what to change; never overwrite automatically.
|
|
41
|
+
The OS owner manages local profiles. Worker changes require migration `0002`, `ADMIN_TOKEN_SHA256`, and a separate administrator token. Listing profiles makes no paid model call.
|
|
45
42
|
|
|
46
43
|
```sh
|
|
44
|
+
rebut profile set PROFILE_ID --model MODEL_ID --reasoning medium --max-output-tokens 8192 --input-usd-per-million INPUT_USD --output-usd-per-million OUTPUT_USD --price-version PRICE_VERSION
|
|
47
45
|
rebut profile remove PROFILE_ID --if-revision N
|
|
48
46
|
```
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
## Server configuration
|
|
48
|
+
Replace uppercase placeholders with verified values. Check model/reasoning support and rates; both rates and the price version are required. `set` also accepts `--if-revision N`. On conflict, refresh the list and decide rather than automatically overwriting.
|
|
53
49
|
|
|
54
|
-
|
|
50
|
+
Changes affect future requests. Removal leaves an inactive tombstone without deleting history or reviving seeded profiles. Existing IDs retain their model, revision, and reservation. Dynamic profile edits do not require Worker redeployment.
|
|
55
51
|
|
|
56
|
-
|
|
52
|
+
## Budgets
|
|
57
53
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
54
|
+
| Setting | Default | Local command |
|
|
55
|
+
| ------------------------------ | ------- | ----------------------------------- |
|
|
56
|
+
| UTC day | $6.66 | `rebut set daily-budget USD` |
|
|
57
|
+
| UTC month | $200 | `rebut set monthly-budget USD` |
|
|
58
|
+
| Per request | $6.66 | `rebut set request-budget USD` |
|
|
59
|
+
| Concurrent unresolved requests | 1 | `rebut set max-concurrent N` (1–10) |
|
|
60
|
+
| New requests per day | 100 | Deployment/initial configuration |
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
Local limits apply to one data directory; Worker limits apply across its deployment. They do not aggregate other devices, Workers, API usage, or OpenAI account balance. Manage Worker limits in `REBUT_CONFIG`. Daily, monthly, and request ceilings are independent; changing one does not increase the others. Restart hosts after settings changes.
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
The service reserves conservatively for input and maximum output, then accounts for verified usage. Estimates are not invoices. Unknown keeps the full reservation and concurrency slot, including after date changes. Period accounting remains attached to the original UTC submission day/month.
|
|
66
65
|
|
|
67
|
-
##
|
|
66
|
+
## Input and result contract
|
|
68
67
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
| New review requests per UTC day | 100 (`dailyRequests:100`) |
|
|
68
|
+
| Item | Limit |
|
|
69
|
+
| --------------------- | --------------------------- |
|
|
70
|
+
| Canonical UTF-8 input | 128,000 bytes |
|
|
71
|
+
| Files | 40 |
|
|
72
|
+
| Diff / requirements | 100,000 / 16,000 characters |
|
|
73
|
+
| Transport envelope | 160,000 bytes |
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
SHA-256 covers masked `{schema_version,provider,task_kind,requirements,files,diff}` with file keys ordered `{path,start_line,content}`. ID and profile are separate from the evidence hash. See [the full schema](../../../src/contracts.ts).
|
|
78
76
|
|
|
79
|
-
|
|
77
|
+
- `review` processes frozen material. Only `completed` means success; results include file/diff line evidence, model, input hash, usage, and estimated cost. Empty findings do not prove correctness.
|
|
78
|
+
- `review_status` returns metadata for the original principal. Reusing an ID does not create another provider call; changing its hash/profile conflicts. Review bodies are not replayed.
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
| --------------------------------------- | ------------------ |
|
|
83
|
-
| Canonically serialized UTF-8 JSON input | 128,000 bytes |
|
|
84
|
-
| Files | 40 |
|
|
85
|
-
| Diff | 100,000 characters |
|
|
86
|
-
| Requirements | 16,000 characters |
|
|
87
|
-
| Transport envelope | 160,000 bytes |
|
|
80
|
+
Ledgers retain request/usage metadata, not code, review text, or keys. Material is sent to OpenAI; `store:false` does not promise zero provider retention. The prompt instructs the model to treat instructions inside supplied material as review data. Models receive no repository/URL fetching, shell, test, editing, or PR tools.
|
|
88
81
|
|
|
89
|
-
|
|
82
|
+
## Claude provider — 0.3.0
|
|
90
83
|
|
|
91
|
-
|
|
84
|
+
Select `rebut set provider anthropic`, then use the existing `rebut set api-key` flow for one key. Keychain service/account: `com.abruption.rebut` / `anthropic-api-key`. For Vaultwarden, `rebut set vaultwarden-api-key-item NAME` sets the selected provider item; its default is `Rebut — Anthropic API Key`. No account aliases, key rotation, or provider fallback is added.
|
|
92
85
|
|
|
93
|
-
-
|
|
94
|
-
- `review_status`: `{request_id}` returns only metadata for the caller's principal. It cannot replay the review body.
|
|
86
|
+
`claude-medium` uses Claude Opus 5.5 / medium. Explicitly add `--provider anthropic` when creating an Anthropic profile. Omitting it preserves an existing active profile provider; new/disabled profiles default to OpenAI, independently of the key-selection preference. Legacy profiles without provider remain OpenAI. The frozen bundle profile determines the actual provider and key, so retain the original bundle/ID after preference changes.
|
|
95
87
|
|
|
96
|
-
|
|
88
|
+
Each local/Worker ledger aggregates both providers under the same budget/concurrency limits. New requests retain `requested_provider` through reservation, completion, and errors; historical rows are unchanged. Missing thinking detail omits `reasoning_tokens`. Cache reads are conservatively charged at full base input rate; unexpected cache writes or nonstandard usage retain unknown reservations.
|
|
97
89
|
|
|
98
|
-
|
|
90
|
+
Claude uses the Messages API with standard tier/global geo and no tools or prompt caching. Workspace regional policies may reject a request; do not retry another key. Deploy Worker code with its existing OpenAI configuration, update clients, and only then add the `ANTHROPIC_API_KEY` secret and Anthropic profiles. Never forward administrator tokens to hosts.
|
|
99
91
|
|
|
100
|
-
|
|
92
|
+
Check [Claude Console billing](https://support.claude.com/en/articles/8977456-how-do-i-pay-for-my-claude-api-usage) for API costs and credit eligibility. Rebut API calls are distinct from Claude Code subscription usage.
|
|
101
93
|
|
|
102
|
-
|
|
94
|
+
New schema 2 bundles freeze the provider and include it in the hash. Collection reads profile metadata from the selected backend, so Worker collection requires its access token. Submission rejects a changed profile supplier with `provider_mismatch` before key loading or reservation. New legacy schema 1 requests are OpenAI-only; previously submitted IDs retain metadata access with their original bundle. Confirm a supplier change before collecting a new bundle.
|
|
103
95
|
|
|
104
|
-
|
|
96
|
+
Local collection may initialize the profile store. Schema 1 hashes omit provider and retain their original ordering.
|