rebut-mcp 0.2.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 +15 -46
- package/README.ja.md +15 -46
- package/README.md +15 -47
- package/README.zh-CN.md +15 -46
- package/config.example.json +9 -0
- package/docs/guide/en/configuration.md +55 -65
- package/docs/guide/en/installation.md +64 -56
- package/docs/guide/en/operations.md +36 -28
- package/docs/guide/en.md +5 -16
- package/docs/guide/ja/configuration.md +55 -65
- package/docs/guide/ja/installation.md +64 -56
- package/docs/guide/ja/operations.md +36 -28
- package/docs/guide/ja.md +5 -16
- package/docs/guide/ko/configuration.md +55 -65
- package/docs/guide/ko/installation.md +64 -56
- package/docs/guide/ko/operations.md +38 -28
- package/docs/guide/ko.md +5 -16
- package/docs/guide/zh-CN/configuration.md +55 -65
- package/docs/guide/zh-CN/installation.md +64 -56
- package/docs/guide/zh-CN/operations.md +36 -28
- package/docs/guide/zh-CN.md +5 -16
- package/docs/releases/release-checklist.ko.md +27 -0
- package/lib/cli.mjs +1366 -754
- package/package.json +2 -1
- package/src/contracts.ts +40 -3
- package/docs/guide/en/architecture.md +0 -29
- package/docs/guide/en/reviewer-integration.md +0 -16
- package/docs/guide/en/validation.md +0 -38
- package/docs/guide/ja/architecture.md +0 -29
- package/docs/guide/ja/reviewer-integration.md +0 -16
- package/docs/guide/ja/validation.md +0 -38
- package/docs/guide/ko/architecture.md +0 -29
- package/docs/guide/ko/reviewer-integration.md +0 -16
- package/docs/guide/ko/validation.md +0 -38
- package/docs/guide/zh-CN/architecture.md +0 -29
- package/docs/guide/zh-CN/reviewer-integration.md +0 -16
- package/docs/guide/zh-CN/validation.md +0 -38
package/README.en.md
CHANGED
|
@@ -2,21 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
# Rebut
|
|
4
4
|
|
|
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)
|
|
8
|
+
|
|
5
9
|
**Local-first independent code review MCP. Cloudflare Worker is optional.**
|
|
6
10
|
|
|
7
11
|
[한국어](README.md) · **English** · [简体中文](README.zh-CN.md) · [日本語](README.ja.md)
|
|
8
12
|
|
|
9
13
|
</div>
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Review material is sent to the OpenAI API; the local ledger stores only request and usage metadata.
|
|
15
|
+
An MCP for reviewing supplied code and diffs through OpenAI or Claude APIs. Review material is sent to the selected provider.
|
|
14
16
|
|
|
15
|
-
|
|
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.
|
|
16
18
|
|
|
17
19
|
## Quick start
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
Requires Node.js 24+. This example uses macOS Keychain.
|
|
20
22
|
|
|
21
23
|
```sh
|
|
22
24
|
npm install -g rebut-mcp
|
|
@@ -25,49 +27,16 @@ rebut setup --client codex
|
|
|
25
27
|
rebut doctor --connect
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## Optional Worker
|
|
31
|
-
|
|
32
|
-
Choose a self-hosted Worker when multiple machines need a shared budget and request ledger. `rebut set endpoint URL` selects Worker mode. On macOS, `rebut set token` stores the separate Worker access token. The OpenAI API key, Worker access token and admin token are different credentials.
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
rebut set endpoint https://YOUR_HOST/mcp
|
|
36
|
-
rebut setup --client codex --replace
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Existing endpoint configurations remain in Worker mode. Switch explicitly with `rebut set mode local`; failures never trigger automatic backend fallback. Switching does not move existing requests or reservations.
|
|
40
|
-
|
|
41
|
-
## What it does
|
|
42
|
-
|
|
43
|
-
- Collect, redact and freeze explicitly supplied files, diffs and requirements, then make one provider call.
|
|
44
|
-
- Use atomic budget reservations and deduplication in local SQLite or Worker D1. Source, reviews and keys are not stored in the ledger.
|
|
45
|
-
- Return structured findings with supplied file/line evidence, model identity, usage and estimated cost.
|
|
46
|
-
- Expose review and metadata-only review_status. Keep the same ID after uncertainty and do not replay an unknown on another backend.
|
|
47
|
-
|
|
48
|
-
Example defaults are $6.66/day and $200/month in UTC, one pending/unknown request, and 100 new requests/day. **Local limits cover only that device’s data directory**: they do not aggregate another Mac, Worker, external API usage or the OpenAI account balance. Worker users share that deployment’s ledger. Estimates are not invoices; uncertain executions keep their reservations and slots.
|
|
30
|
+
Restart Codex after registration. See [installation](docs/guide/en/installation.md) for Linux/env and Vaultwarden.
|
|
49
31
|
|
|
50
|
-
|
|
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
|
-
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
npm ci --ignore-scripts
|
|
56
|
-
npm run typecheck
|
|
57
|
-
npm run build
|
|
58
|
-
npm test
|
|
59
|
-
npm run test:package
|
|
60
|
-
```
|
|
34
|
+
`review` is a paid call; `doctor --connect` checks connectivity without a paid review. Keep the same request ID when the result is uncertain.
|
|
61
35
|
|
|
62
|
-
|
|
36
|
+
## Guides
|
|
63
37
|
|
|
64
|
-
|
|
38
|
+
- [Installation](docs/guide/en/installation.md)
|
|
39
|
+
- [Configuration](docs/guide/en/configuration.md)
|
|
40
|
+
- [Operations](docs/guide/en/operations.md)
|
|
65
41
|
|
|
66
|
-
|
|
67
|
-
- [Installation and input collection](docs/guide/en/installation.md)
|
|
68
|
-
- [Configuration, budgets and MCP contract](docs/guide/en/configuration.md)
|
|
69
|
-
- [Operations and recovery](docs/guide/en/operations.md)
|
|
70
|
-
- [Opt-in reviewer integration](docs/guide/en/reviewer-integration.md)
|
|
71
|
-
- [Architecture](docs/guide/en/architecture.md)
|
|
72
|
-
- [Validation and limits of the results](docs/guide/en/validation.md)
|
|
73
|
-
- [MIT license](LICENSE)
|
|
42
|
+
[Releases](https://github.com/abruption/rebut/releases) · [MIT](LICENSE)
|
package/README.ja.md
CHANGED
|
@@ -2,21 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
# Rebut
|
|
4
4
|
|
|
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)
|
|
8
|
+
|
|
5
9
|
**ローカル実行を標準とする独立コードレビューMCP。Cloudflare Workerは任意です。**
|
|
6
10
|
|
|
7
11
|
[한국어](README.md) · [English](README.en.md) · [简体中文](README.zh-CN.md) · **日本語**
|
|
8
12
|
|
|
9
13
|
</div>
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
レビュー資料はOpenAI APIへ送信し、ローカル台帳には要求・使用量メタデータのみ保存します。
|
|
15
|
+
提供したコードと diff を OpenAI または Claude API でレビューする MCP です。資料は選択したプロバイダーに送信します。
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
0.3.0 以降の Claude 対応は `rebut set provider anthropic` → `rebut set api-key` → `rebut setup --client claude` の順です。ホストとプロバイダーは別々に選びます。
|
|
16
18
|
|
|
17
19
|
## クイックスタート
|
|
18
20
|
|
|
19
|
-
Node.js 24
|
|
21
|
+
Node.js 24 以上が必要です。以下は macOS Keychain の例です。
|
|
20
22
|
|
|
21
23
|
```sh
|
|
22
24
|
npm install -g rebut-mcp
|
|
@@ -25,49 +27,16 @@ rebut setup --client codex
|
|
|
25
27
|
rebut doctor --connect
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## 任意のWorker
|
|
31
|
-
|
|
32
|
-
複数端末で予算と要求台帳を共有する場合はセルフホストのWorkerを選べます。`rebut set endpoint URL` はWorkerモードを選択します。macOSでは `rebut set token` で別のWorker接続トークンを保存します。OpenAI APIキー・Worker接続トークン・管理者トークンは別の資格情報です。
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
rebut set endpoint https://YOUR_HOST/mcp
|
|
36
|
-
rebut setup --client codex --replace
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
既存endpoint設定はWorkerモードを維持します。`rebut set mode local` で明示的に切り替え、障害時の自動切り替えはしません。切り替えても既存の要求や予約は移行されません。
|
|
40
|
-
|
|
41
|
-
## 主な機能
|
|
42
|
-
|
|
43
|
-
- 明示されたファイル・diff・要件だけを収集・秘匿処理・固定し、プロバイダーを1回呼び出します。
|
|
44
|
-
- ローカルSQLiteまたはWorker D1で原子的な予算予約と重複排除を行い、原文・レビュー本文・キーは台帳に保存しません。
|
|
45
|
-
- 指定ファイル・行の根拠、モデル識別、使用量、推定費用を含む構造化された指摘を返します。
|
|
46
|
-
- reviewとメタデータ専用review_statusを提供します。不確かな結果後は同じIDを維持し、unknownを別backendで再実行しません。
|
|
47
|
-
|
|
48
|
-
既定例はUTCで日額$6.66・月額$200、pending/unknown同時1件、日100件の新規要求です。**ローカル制限はその端末のデータディレクトリのみが対象**で、別のMac・Worker・外部API・OpenAIアカウント残高は合算しません。Worker利用者はそのデプロイの台帳を共有します。推定は請求書ではなく、不確かな実行の予約と枠は保持します。
|
|
30
|
+
登録後に Codex を再起動してください。Linux/env・Vaultwarden 設定は[インストール](docs/guide/ja/installation.md)を参照してください。
|
|
49
31
|
|
|
50
|
-
|
|
32
|
+
新規インストールはローカル stdio を使います。端末間で予算・台帳を共有する場合は [Worker モード](docs/guide/ja/installation.md#任意の-worker-デプロイ)を選択します。既存 Worker 設定は維持します。
|
|
51
33
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
npm ci --ignore-scripts
|
|
56
|
-
npm run typecheck
|
|
57
|
-
npm run build
|
|
58
|
-
npm test
|
|
59
|
-
npm run test:package
|
|
60
|
-
```
|
|
34
|
+
`review` は有料呼び出しです。`doctor --connect` は有料レビューなしで接続確認を行います。結果が不明なら同じリクエスト ID を維持してください。
|
|
61
35
|
|
|
62
|
-
|
|
36
|
+
## ガイド
|
|
63
37
|
|
|
64
|
-
|
|
38
|
+
- [インストール](docs/guide/ja/installation.md)
|
|
39
|
+
- [設定](docs/guide/ja/configuration.md)
|
|
40
|
+
- [運用](docs/guide/ja/operations.md)
|
|
65
41
|
|
|
66
|
-
|
|
67
|
-
- [インストールと入力の収集](docs/guide/ja/installation.md)
|
|
68
|
-
- [設定、予算、MCP 仕様](docs/guide/ja/configuration.md)
|
|
69
|
-
- [運用と復旧](docs/guide/ja/operations.md)
|
|
70
|
-
- [明示的に選択するレビュアーの統合](docs/guide/ja/reviewer-integration.md)
|
|
71
|
-
- [アーキテクチャ](docs/guide/ja/architecture.md)
|
|
72
|
-
- [検証と結果の限界](docs/guide/ja/validation.md)
|
|
73
|
-
- [MIT ライセンス](LICENSE)
|
|
42
|
+
[リリース](https://github.com/abruption/rebut/releases) · [MIT](LICENSE)
|
package/README.md
CHANGED
|
@@ -2,21 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
# Rebut
|
|
4
4
|
|
|
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)
|
|
8
|
+
|
|
5
9
|
**로컬에서 바로 실행하는 독립 코드 검토 MCP. Cloudflare Worker는 선택 사항입니다.**
|
|
6
10
|
|
|
7
11
|
**한국어** · [English](README.en.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja.md)
|
|
8
12
|
|
|
9
13
|
</div>
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
검토 자료는 OpenAI API로 전송하며, 로컬 원장에는 요청·사용량 메타데이터만 저장합니다.
|
|
15
|
+
OpenAI 또는 Claude API로 제공한 코드·diff를 검토하는 MCP입니다. 자료는 선택한 공급자로 전송합니다.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
Claude 지원은 0.3.0 이상에서 `rebut set provider anthropic` → `rebut set api-key` → `rebut setup --client claude` 순서로 설정합니다. 호스트와 공급자는 별도 선택입니다.
|
|
16
18
|
|
|
17
19
|
## 빠른 시작
|
|
18
20
|
|
|
19
|
-
Node.js 24 이상이 필요합니다.
|
|
21
|
+
Node.js 24 이상이 필요합니다. macOS Keychain을 사용하는 예입니다.
|
|
20
22
|
|
|
21
23
|
```sh
|
|
22
24
|
npm install -g rebut-mcp
|
|
@@ -25,50 +27,16 @@ rebut setup --client codex
|
|
|
25
27
|
rebut doctor --connect
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## Worker 선택
|
|
31
|
-
|
|
32
|
-
여러 기기가 하나의 예산과 요청 장부를 공유하려면 직접 호스팅한 Worker를 선택할 수 있습니다. `rebut set endpoint URL`은 Worker 모드를 선택합니다. macOS에서는 `rebut set token`으로 별도의 Worker 접속 토큰을 저장합니다. OpenAI API 키와 접속·관리자 토큰은 서로 다른 자격증명입니다.
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
rebut set endpoint https://YOUR_HOST/mcp
|
|
36
|
-
rebut setup --client codex --replace
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
기존 endpoint 설정은 Worker 모드로 유지됩니다. `rebut set mode local`로 명시적으로 전환할 수 있으며 장애 시 다른 backend로 자동 대체하지 않습니다. backend 전환은 기존 기록이나 예약을 이전하지 않습니다.
|
|
40
|
-
|
|
41
|
-
## 주요 기능
|
|
42
|
-
|
|
43
|
-
- 명시한 파일·diff·요구사항만 수집·마스킹·해시 고정하고 공급자를 한 번 호출합니다.
|
|
44
|
-
- 로컬 SQLite 또는 Worker D1에서 원자적 예산 예약과 요청 중복 방지를 적용합니다. 원문·리뷰·키는 장부에 저장하지 않습니다.
|
|
45
|
-
- 파일·행 근거, 모델 식별, 사용량, 예상 비용을 포함한 구조화된 검토 결과를 반환합니다.
|
|
46
|
-
- `review`와 메타데이터 전용 `review_status`를 제공합니다. unknown 이후 같은 ID를 유지하며 다른 backend로 우회 재실행하지 않습니다.
|
|
47
|
-
|
|
48
|
-
기본 예시는 UTC 하루 $6.66·월 $200, 동시 pending/unknown 한 건, 하루 신규 요청 100건입니다. **로컬 한도는 해당 기기의 데이터 디렉터리에만 적용**됩니다. 다른 Mac·Worker·외부 API 사용량이나 OpenAI 계정 잔액을 합산하지 않습니다. Worker는 해당 배포의 장부를 공유합니다. 예상 비용은 청구서가 아니며 불확실한 실행의 예약과 슬롯은 유지합니다.
|
|
30
|
+
등록 후 Codex를 재시작하세요. Linux/env·Vaultwarden 설정은 [설치 안내](docs/guide/ko/installation.md)를 참고하세요.
|
|
49
31
|
|
|
50
|
-
|
|
32
|
+
새 설치는 로컬 stdio를 사용합니다. 여러 기기의 예산·요청 장부를 공유하려면 [Worker 모드](docs/guide/ko/installation.md#선택적-worker-배포)를 선택하세요. 기존 Worker 설정은 유지됩니다.
|
|
51
33
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
npm ci --ignore-scripts
|
|
56
|
-
npm run typecheck
|
|
57
|
-
npm run build
|
|
58
|
-
npm test
|
|
59
|
-
npm run test:package
|
|
60
|
-
```
|
|
34
|
+
`review`는 유료 호출이며 `doctor --connect`는 유료 검토 없이 연결만 확인합니다. 결과가 불확실하면 같은 요청 ID를 유지하세요.
|
|
61
35
|
|
|
62
|
-
|
|
36
|
+
## 사용 안내
|
|
63
37
|
|
|
64
|
-
|
|
38
|
+
- [설치](docs/guide/ko/installation.md)
|
|
39
|
+
- [설정](docs/guide/ko/configuration.md)
|
|
40
|
+
- [운영](docs/guide/ko/operations.md)
|
|
65
41
|
|
|
66
|
-
|
|
67
|
-
- [설치 및 입력 수집](docs/guide/ko/installation.md)
|
|
68
|
-
- [설정, 예산 및 MCP 계약](docs/guide/ko/configuration.md)
|
|
69
|
-
- [운영 및 복구](docs/guide/ko/operations.md)
|
|
70
|
-
- [선택적 검토자 연동](docs/guide/ko/reviewer-integration.md)
|
|
71
|
-
- [아키텍처](docs/guide/ko/architecture.md)
|
|
72
|
-
- [검증 및 결과의 한계](docs/guide/ko/validation.md)
|
|
73
|
-
- [최초 릴리즈 기록](docs/releases/0.1.0.ko.md) · [0.2.0 릴리즈 후보](docs/releases/0.2.0.ko.md)
|
|
74
|
-
- [MIT 라이선스](LICENSE)
|
|
42
|
+
[릴리즈](https://github.com/abruption/rebut/releases) · [MIT](LICENSE)
|
package/README.zh-CN.md
CHANGED
|
@@ -2,21 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
# Rebut
|
|
4
4
|
|
|
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)
|
|
8
|
+
|
|
5
9
|
**默认本地运行的独立代码审查 MCP,可选 Cloudflare Worker。**
|
|
6
10
|
|
|
7
11
|
[한국어](README.md) · [English](README.en.md) · **简体中文** · [日本語](README.ja.md)
|
|
8
12
|
|
|
9
13
|
</div>
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
审查资料会发送至 OpenAI API;本地账本仅存储请求和用量元数据。
|
|
15
|
+
通过 OpenAI 或 Claude API 审查所提供代码和 diff 的 MCP。材料发送至所选供应商。
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
0.3.0+ 的 Claude 支持按 `rebut set provider anthropic` → `rebut set api-key` → `rebut setup --client claude` 设置;宿主与供应商分别选择。
|
|
16
18
|
|
|
17
19
|
## 快速开始
|
|
18
20
|
|
|
19
|
-
需要 Node.js 24
|
|
21
|
+
需要 Node.js 24+。本例使用 macOS Keychain。
|
|
20
22
|
|
|
21
23
|
```sh
|
|
22
24
|
npm install -g rebut-mcp
|
|
@@ -25,49 +27,16 @@ rebut setup --client codex
|
|
|
25
27
|
rebut doctor --connect
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## 可选 Worker
|
|
31
|
-
|
|
32
|
-
多台设备需要共享预算和请求账本时,可选择自托管 Worker。`rebut set endpoint URL` 会选择 Worker 模式。macOS 可通过 `rebut set token` 保存独立的 Worker 访问令牌。OpenAI API 密钥、Worker 访问令牌和管理员令牌是不同凭据。
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
rebut set endpoint https://YOUR_HOST/mcp
|
|
36
|
-
rebut setup --client codex --replace
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
已有 endpoint 配置继续使用 Worker 模式。通过 `rebut set mode local` 明确切换;失败不会自动切换后端。切换不会迁移已有请求或预留。
|
|
40
|
-
|
|
41
|
-
## 功能
|
|
42
|
-
|
|
43
|
-
- 仅收集、脱敏并冻结明确提供的文件、diff 和要求,再调用供应商一次。
|
|
44
|
-
- 在本地 SQLite 或 Worker D1 中进行原子预算预留和去重;账本不存储源码、审查正文或密钥。
|
|
45
|
-
- 返回结构化发现、给定文件及行号证据、模型标识、用量与预估成本。
|
|
46
|
-
- 提供 review 和仅元数据的 review_status。不确定后保留同一 ID,不在另一后端重放 unknown 请求。
|
|
47
|
-
|
|
48
|
-
默认示例为 UTC 每日 $6.66、每月 $200、一个 pending/unknown 请求及每日 100 个新请求。**本地限额仅覆盖该设备的数据目录**,不汇总另一台 Mac、Worker、外部 API 或 OpenAI 账户余额。Worker 用户共享该部署的账本。预估不是账单;不确定的执行继续占用预留和并发槽。
|
|
30
|
+
注册后重启 Codex。Linux/env 与 Vaultwarden 设置见[安装指南](docs/guide/zh-CN/installation.md)。
|
|
49
31
|
|
|
50
|
-
|
|
32
|
+
新安装使用本地 stdio。跨设备共享预算与请求账本时选择 [Worker 模式](docs/guide/zh-CN/installation.md#可选-worker-部署)。已有 Worker 设置保持不变。
|
|
51
33
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
npm ci --ignore-scripts
|
|
56
|
-
npm run typecheck
|
|
57
|
-
npm run build
|
|
58
|
-
npm test
|
|
59
|
-
npm run test:package
|
|
60
|
-
```
|
|
34
|
+
`review` 是付费调用,`doctor --connect` 仅检查连接,不进行付费审查。结果不确定时保留原请求 ID。
|
|
61
35
|
|
|
62
|
-
|
|
36
|
+
## 指南
|
|
63
37
|
|
|
64
|
-
|
|
38
|
+
- [安装](docs/guide/zh-CN/installation.md)
|
|
39
|
+
- [配置](docs/guide/zh-CN/configuration.md)
|
|
40
|
+
- [运维](docs/guide/zh-CN/operations.md)
|
|
65
41
|
|
|
66
|
-
|
|
67
|
-
- [安装与输入收集](docs/guide/zh-CN/installation.md)
|
|
68
|
-
- [配置、预算与 MCP 契约](docs/guide/zh-CN/configuration.md)
|
|
69
|
-
- [运维与恢复](docs/guide/zh-CN/operations.md)
|
|
70
|
-
- [可选审查器集成](docs/guide/zh-CN/reviewer-integration.md)
|
|
71
|
-
- [架构](docs/guide/zh-CN/architecture.md)
|
|
72
|
-
- [验证及结果的局限](docs/guide/zh-CN/validation.md)
|
|
73
|
-
- [MIT 许可证](LICENSE)
|
|
42
|
+
[发行记录](https://github.com/abruption/rebut/releases) · [MIT](LICENSE)
|
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,106 +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
|
+
## Modes and storage
|
|
7
8
|
|
|
8
|
-
|
|
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 |
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
Existing endpoint settings remain Worker mode. There is no automatic backend fallback; switching neither migrates records nor releases reservations.
|
|
11
15
|
|
|
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.
|
|
12
17
|
|
|
13
|
-
##
|
|
18
|
+
## Credentials
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
`rebut set secret-store keychain|vaultwarden|env` selects the backend for every role without fallback. Keychain service: `com.abruption.rebut`.
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
`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.
|
|
24
|
-
|
|
25
|
-
## Owner-managed server profiles
|
|
26
|
-
|
|
27
|
-
Worker mode only: local profile management does not require these admin credentials.
|
|
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` |
|
|
28
27
|
|
|
29
|
-
|
|
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.
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
## Model profiles
|
|
32
31
|
|
|
33
32
|
```sh
|
|
34
33
|
rebut profile list
|
|
35
|
-
rebut set
|
|
34
|
+
rebut set model MODEL_ID
|
|
35
|
+
rebut set reasoning EFFORT
|
|
36
|
+
rebut set profile PROFILE_ID
|
|
36
37
|
```
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
After a one-time Worker upgrade, D1 migration `0002`, and `ADMIN_TOKEN_SHA256` secret setup described in [installation](installation.md), the owner can add/update a profile. This example uses the existing Astra/medium configuration and its dated 2026-11-12 Standard rates; verify the official [model](https://developers.openai.com/api/docs/models/gpt-6-astra) and [pricing](https://developers.openai.com/api/docs/pricing) documents before choosing values. For a new model, substitute the placeholder `MODEL_ID` with a verified Responses-compatible model ID and explicitly supply its supported reasoning setting, output limit, and official rates.
|
|
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.
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
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
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
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.
|
|
47
42
|
|
|
48
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
|
|
49
45
|
rebut profile remove PROFILE_ID --if-revision N
|
|
50
46
|
```
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## 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.
|
|
55
49
|
|
|
56
|
-
|
|
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.
|
|
57
51
|
|
|
58
|
-
|
|
52
|
+
## Budgets
|
|
59
53
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
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 |
|
|
64
61
|
|
|
65
|
-
|
|
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.
|
|
66
63
|
|
|
67
|
-
|
|
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.
|
|
68
65
|
|
|
69
|
-
##
|
|
66
|
+
## Input and result contract
|
|
70
67
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
| 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 |
|
|
78
74
|
|
|
79
|
-
|
|
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).
|
|
80
76
|
|
|
81
|
-
|
|
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.
|
|
82
79
|
|
|
83
|
-
|
|
84
|
-
| --------------------------------------- | ------------------ |
|
|
85
|
-
| Canonically serialized UTF-8 JSON input | 128,000 bytes |
|
|
86
|
-
| Files | 40 |
|
|
87
|
-
| Diff | 100,000 characters |
|
|
88
|
-
| Requirements | 16,000 characters |
|
|
89
|
-
| 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.
|
|
90
81
|
|
|
91
|
-
|
|
82
|
+
## Claude provider — 0.3.0
|
|
92
83
|
|
|
93
|
-
|
|
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.
|
|
94
85
|
|
|
95
|
-
-
|
|
96
|
-
- `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.
|
|
97
87
|
|
|
98
|
-
|
|
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.
|
|
99
89
|
|
|
100
|
-
|
|
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.
|
|
101
91
|
|
|
102
|
-
|
|
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.
|
|
103
93
|
|
|
104
|
-
|
|
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.
|
|
105
95
|
|
|
106
|
-
|
|
96
|
+
Local collection may initialize the profile store. Schema 1 hashes omit provider and retain their original ordering.
|