rebut-mcp 0.3.2 → 0.4.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.
@@ -15,6 +15,8 @@ Existing endpoint settings remain Worker mode. There is no automatic backend fal
15
15
 
16
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.
17
17
 
18
+ Keep the settings file owned by your account with mode `0600`. The settings directory must also be owned by your account. Keep it and its ancestors in locations where other users cannot write. If Rebut reports an unsafe settings path, check ownership and permissions before using that configuration.
19
+
18
20
  ## Credentials
19
21
 
20
22
  `rebut set secret-store keychain|vaultwarden|env` selects the backend for every role without fallback. Keychain service: `com.abruption.rebut`.
@@ -38,6 +40,18 @@ rebut set profile PROFILE_ID
38
40
 
39
41
  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.
40
42
 
43
+ Use a client-specific preference to share one Rebut configuration and ledger while selecting different default profiles for Codex and Claude Code.
44
+
45
+ ```sh
46
+ rebut set profile claude-medium --client codex
47
+ rebut set profile astra-medium --client claude
48
+ rebut set profile --client codex --clear
49
+ ```
50
+
51
+ The clear command restores the shared preference for that client. In a terminal or an agent command, pass `collect --client codex` or `collect --client claude` to select the corresponding default. An explicit `collect --profile` wins. An unavailable client default stops default collection. Existing frozen bundles keep their profile and provider. Run `rebut doctor --client codex` or `--client claude` to see the preference.
52
+
53
+ Refresh existing registrations with `rebut setup --client codex --replace` or `rebut setup --client claude --replace` and restart the host. In local environment-variable mode, refresh the registration again when a default change switches the required key variable. `rebut profile set --model` defines a profile's model. Choosing that profile as a default uses its current model, reasoning, and rates. Before rolling back to a version without client defaults, clear both client overrides and use the older CLI to register both MCP hosts again.
54
+
41
55
  The shipped `astra-medium` profile uses GPT-6.2 Astra (`gpt-6.2-astra`) with medium reasoning. The example uses [short-context Standard rates](https://developers.openai.com/api/docs/models/gpt-6.2-astra) of $8 input and $40 output per million tokens. Existing Workers and local profile overrides retain their stored settings. To migrate them, inspect `rebut profile list` and update the model to `gpt-6.2-astra`, reasoning to `medium`, and both rates together in one profile update with the current `--if-revision`, and price version `openai-standard-2026-11-18`. If a client explicitly selects the old model ID, update that preference or select `astra-medium` by profile ID.
42
56
 
43
57
  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.
@@ -65,6 +79,12 @@ Local limits apply to one data directory; Worker limits apply across its deploym
65
79
 
66
80
  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.
67
81
 
82
+ Run `rebut budget` to see accounted monthly spend, the next UTC reset, and slots occupied by unresolved requests. These are ledger figures, independent of provider credit balances. In Worker mode this command uses the Worker administrator token. Compare the accounted amount with the monthly limit, and unresolved slots with the concurrency limit. Daily and per-request limits also apply.
83
+
84
+ To opt into a different UTC monthly start day, run `rebut budget set-start-day DAY` (1–28). A fresh ledger adopts it immediately. An existing ledger extends its current calendar-month budget to the chosen day in the next month. For example, setting day 15 in November retains November's budget until December 15 at 00:00 UTC. Day 1 remains the default, and each ledger permits one transition away from it. Repeating the same setting is safe; changing it again is rejected.
85
+
86
+ For a Worker, deploy the new code and apply D1 migration `0003_budget_cycle.sql` before setting a custom day. Calendar-month mode works without the migration. Local opt-in upgrades the ledger automatically. Use a compatible CLI afterwards, since older local versions cannot open the upgraded ledger. Older Worker versions cannot make new reservations after opt-in. Existing request IDs, accounting periods and unresolved slots are preserved.
87
+
68
88
  ## Input and result contract
69
89
 
70
90
  | Item | Limit |
@@ -73,6 +73,14 @@ Select files explicitly. The collector rejects unsafe files, symlinks, FIFOs, an
73
73
 
74
74
  Select paid reviews explicitly. Check for `completed` and compare the returned model and input hash with the frozen bundle/profile, then verify each finding against the source. For independent reviews, supply the same frozen material without sharing reviewers' results. After timeout/unknown, retain the ID and backend rather than submitting a new ID. Follow [recovery](operations.md#unknown-recovery).
75
75
 
76
+ ### Review independently with two profiles
77
+
78
+ Use `review_pair` in Codex or Claude Code when the user explicitly selects two paid reviews. Pass the complete collected schema 2 bundle as `first`, and pass a distinct `request_id` and the second `profile` and its `provider` as `second`. For example, collect `first` with `astra-medium` / `openai` and pass `{"request_id":"review-002","profile":"claude-medium","provider":"anthropic"}` as `second`. Confirm the profiles with `rebut profile list`.
79
+
80
+ Both requests use the same evidence, with each input hash pinned to its provider. Budget and concurrency limits apply to each request, so only one may be admitted. Local concurrency defaults to one. Run `rebut set max-concurrent 2` and restart the MCP host to enable parallel local review. Rebut rejects the pair before dispatch if the local limit is below two. Each result includes its request ID and `has_review`. The pair is `partial` when it includes one review body and `incomplete` when it includes none. When both requests completed earlier and neither body can be replayed, the status is `completed_without_review`. If the response is lost, use `review_status` with both original IDs on the same backend before considering any further paid call. Status lookups do not replay review bodies.
81
+
82
+ The tool is available in the Rebut client in local and Worker modes. For an existing Codex registration, run `rebut setup --client codex --replace` and restart the host. Restart Claude Code to refresh the tool list. When local reviewers use different providers, the Rebut process needs both keys. Environment-based host registration forwards only the preferred provider variable by default.
83
+
76
84
  ## Optional Worker deployment
77
85
 
78
86
  Use a Worker to share budgets and request history across devices. Deployment requires a source checkout, your Cloudflare account, and D1.
@@ -15,6 +15,8 @@
15
15
 
16
16
  macOS/Linux の設定は `~/.config/rebut/config.json`、ローカル台帳は `~/.local/share/rebut/local/ledger.sqlite` です。`REBUT_CONFIG_DIR` 指定時はその中の `config.json` と `local/` を使います。登録と状態照会も同じディレクトリを使ってください。
17
17
 
18
+ 設定ファイルは現在のアカウントの所有とし、パーミッションを `0600` にします。設定ディレクトリも同じアカウントが所有し、上位のパスも含めて他のユーザーが書き込めない場所に置きます。設定パスが安全でないと表示された場合は、所有者と権限を確認してください。
19
+
18
20
  ## 認証情報
19
21
 
20
22
  `rebut set secret-store keychain|vaultwarden|env` は全役割のバックエンドを選び、自動フォールバックはありません。Keychain サービスは `com.abruption.rebut` です。
@@ -38,6 +40,18 @@ rebut set profile PROFILE_ID
38
40
 
39
41
  設定は新規収集に適用します。明示した `collect --profile` が優先され、`review` は固定バンドルのプロファイルを維持します。既定は `astra-medium` です。許可リストはプロバイダーのモデル権限を与えません。
40
42
 
43
+ 1 つの設定と台帳を共有しながら、Codex と Claude Code に別々の既定レビュープロファイルを設定できます。
44
+
45
+ ```sh
46
+ rebut set profile claude-medium --client codex
47
+ rebut set profile astra-medium --client claude
48
+ rebut set profile --client codex --clear
49
+ ```
50
+
51
+ `--clear` はそのクライアントを共有の既定値に戻します。シェルやエージェントから `collect --client codex` または `collect --client claude` を指定するとクライアント別の既定値が適用されます。明示した `collect --profile` が優先されます。既定のプロファイルが使用できない場合は既定値での収集が失敗し、既存のバンドルのプロファイルとプロバイダーは保持されます。`rebut doctor --client codex` または `--client claude` で設定を確認できます。
52
+
53
+ 既存の登録を `rebut setup --client codex --replace` または `rebut setup --client claude --replace` で更新し、ホストを再起動してください。ローカルの環境変数方式で必要なキー変数が変わった場合は再登録します。モデルは `rebut profile set --model` でプロファイルに定義します。既定値に選んだプロファイルのモデル・推論・料金が適用されます。 クライアント別の既定値をサポートしない版へ戻す場合は、両方の設定を先に解除し、旧版の CLI で両方の MCP ホストを再登録してください。
54
+
41
55
  同梱の `astra-medium` プロファイルは GPT-6.2 Astra(`gpt-6.2-astra`)と medium の推論を使用します。例の[短いコンテキストの Standard 料金](https://developers.openai.com/api/docs/models/gpt-6.2-astra)は100万トークン当たり入力 $8、出力 $40 です。既存の Worker とローカルのプロファイル上書きは保存済み設定を維持します。移行するには `rebut profile list` を確認し、モデル `gpt-6.2-astra`、推論 `medium`、両方の料金と料金バージョン `openai-standard-2026-11-18` を、現在の `--if-revision` で一度に更新してください。旧モデル ID を明示しているクライアントでは、その設定を更新するか、プロファイル ID で `astra-medium` を選択してください。
42
56
 
43
57
  ローカルは OS 所有者が管理します。Worker の変更には `0002`、`ADMIN_TOKEN_SHA256`、別の管理者トークンが必要です。一覧取得は有料モデルを呼びません。
@@ -65,6 +79,12 @@ rebut profile remove PROFILE_ID --if-revision N
65
79
 
66
80
  呼び出し前に入力と最大出力を保守的に予約し、確認した使用量で計上します。見積もりは請求書ではありません。unknown は全額予約と同時実行枠を保持し、日付変更でも枠は解放しません。期間計上は最初の UTC 提出日・月に属します。
67
81
 
82
+ `rebut budget` で月間の計上額、次の UTC 切り替え時刻、未解決のリクエストが占有する枠を確認できます。台帳上の数値はプロバイダーのクレジット残高とは別です。Worker モードでは Worker の管理者トークンを使います。月間計上額と月間上限、占有枠と同時実行上限を比べて確認できます。日別・リクエスト別の上限も適用されます。
83
+
84
+ 月間の UTC 開始日を変更するには `rebut budget set-start-day DAY`(1〜28)を実行します。空の台帳にはすぐ適用されます。リクエスト履歴がある台帳では、現在の暦月予算を翌月の指定日まで延長します。たとえば11月に15日を指定すると、12月15日 00:00 UTC まで11月の予算を使用します。既定は1日で、台帳ごとに別の開始日へ一度だけ移行できます。同じ指定の繰り返しは安全で、別の日への再変更は拒否されます。
85
+
86
+ Worker では新しいコードをデプロイし、D1 マイグレーション `0003_budget_cycle.sql` を適用してから設定してください。暦月モードにはこのマイグレーションは不要です。ローカルでは切り替えに成功すると台帳が自動でアップグレードされ、旧版の CLI では開けなくなります。旧版の Worker は切り替え後に新規予約を作成できません。既存のリクエスト ID、計上期間、未解決の枠は保持されます。
87
+
68
88
  ## 入力と結果の契約
69
89
 
70
90
  | 項目 | 上限 |
@@ -73,6 +73,16 @@ rebut status review-001
73
73
 
74
74
  有料レビューを明示選択します。`completed` を確認し、返されたモデル・入力ハッシュを固定バンドルとプロファイルに照合して、各指摘を原資料で確認します。独立レビューには同じ固定資料を渡し、各レビュアーの結果を混ぜません。timeout/unknown 後は同じ ID・バックエンドを保ち、新しい ID で再実行せず[復旧](operations.md#unknown-復旧)に従ってください。
75
75
 
76
+ ### 2 つのプロファイルで独立レビューする
77
+
78
+ ユーザーが 2 件の有料レビューを明示的に選んだ場合は、Codex または Claude Code で `review_pair` を使います。`first` には収集したスキーマ 2 のバンドル全体を、`second` には別の `request_id` と 2 つ目の `profile`、その `provider` を渡します。たとえば `first` を `astra-medium` / `openai` で収集し、`second` に `{"request_id":"review-002","profile":"claude-medium","provider":"anthropic"}` を渡せます。プロファイルは `rebut profile list` で確認してください。
79
+
80
+ 2 件は同じ資料を使い、入力ハッシュはそれぞれのプロバイダーに固定されます。予算と同時実行上限はリクエストごとに適用され、片方だけ受け付けられる場合があります。ローカルの既定の同時実行上限は 1 です。ローカルで並列レビューを使うには `rebut set max-concurrent 2` を実行して MCP ホストを再起動します。ローカルの上限が 2 未満なら送信前に拒否されます。各結果にリクエスト ID と `has_review` が含まれ、本文が 1 件なら `partial`、0 件なら `incomplete` です。両方がすでに完了し、本文を再取得できない場合は `completed_without_review` です。応答が失われたら、同じバックエンドで元の 2 つの ID を使って `review_status` を呼び出してから、追加の有料呼び出しを検討します。状態照会で本文は再取得できません。
81
+
82
+ このツールは Rebut クライアントのローカルモードと Worker モードで使えます。既存の Codex 登録は `rebut setup --client codex --replace` で更新してホストを再起動してください。Claude Code は再起動してツール一覧を更新します。
83
+
84
+ ローカルで異なるプロバイダーを使う場合、Rebut プロセスには両方のキーが必要です。環境変数を使ったホスト登録は、既定では優先プロバイダーの変数だけを渡します。
85
+
76
86
  ## 任意の Worker デプロイ
77
87
 
78
88
  複数端末で予算・リクエスト台帳を共有する場合に使います。ソース、自分の Cloudflare アカウント、D1 が必要です。
@@ -15,6 +15,8 @@
15
15
 
16
16
  설정은 `~/.config/rebut/config.json`, 로컬 장부는 `~/.local/share/rebut/local/ledger.sqlite`입니다(macOS/Linux). `REBUT_CONFIG_DIR`을 지정하면 그 안의 `config.json`과 `local/`을 사용합니다. 등록과 상태 조회도 같은 디렉터리를 사용해야 합니다.
17
17
 
18
+ 설정 파일은 현재 계정이 소유하고 권한을 `0600`으로 유지합니다. 설정 디렉터리도 현재 계정이 소유해야 합니다. 설정 디렉터리와 상위 경로는 다른 사용자가 쓸 수 없는 위치를 사용합니다. 안전하지 않은 설정 경로 오류가 나면 소유권과 권한을 확인합니다.
19
+
18
20
  ## 자격증명
19
21
 
20
22
  `rebut set secret-store keychain|vaultwarden|env`는 모든 역할에 적용하며 자동 대체하지 않습니다. Keychain 서비스는 `com.abruption.rebut`입니다.
@@ -38,6 +40,18 @@ rebut set profile PROFILE_ID
38
40
 
39
41
  환경설정은 새 수집에 적용합니다. 명시적 `collect --profile`이 우선하며 `review`는 번들에 고정한 프로필을 유지합니다. 기본은 `astra-medium`입니다. 프로필 허용 목록은 공급자의 모델 사용 권한을 보장하지 않습니다.
40
42
 
43
+ 설정과 장부를 공유하면서 Codex와 Claude Code의 기본 리뷰 프로필을 각각 지정할 수 있습니다.
44
+
45
+ ```sh
46
+ rebut set profile claude-medium --client codex
47
+ rebut set profile astra-medium --client claude
48
+ rebut set profile --client codex --clear
49
+ ```
50
+
51
+ `--clear`는 해당 호스트를 공통 기본값으로 되돌립니다. 터미널이나 에이전트 명령에서 `collect --client codex` 또는 `collect --client claude`를 사용하면 해당 기본값을 적용하며, `collect --profile`로 명시한 값이 우선합니다. 호스트 기본값을 사용할 수 없으면 기본값으로 번들을 수집할 수 없고, 기존 번들의 프로필과 공급자는 유지됩니다. `rebut doctor --client codex` 또는 `--client claude`로 설정을 확인합니다.
52
+
53
+ 기존 등록은 `rebut setup --client codex --replace` 또는 `rebut setup --client claude --replace`로 갱신한 뒤 호스트를 다시 시작합니다. 로컬 환경변수 방식에서 필요한 키 변수가 바뀌면 다시 등록합니다. 프로필에서 사용할 모델은 `rebut profile set --model`로 정의합니다. 기본값으로 선택한 프로필의 모델·추론·요율이 사용됩니다. 호스트별 기본값을 지원하지 않는 버전으로 되돌릴 때는 두 호스트의 기본값을 먼저 지우고, 이전 CLI로 두 MCP 호스트를 다시 등록합니다.
54
+
41
55
  기본 제공 `astra-medium` 프로필은 GPT-6.2 Astra(`gpt-6.2-astra`)와 medium 추론을 사용합니다. 예제의 [짧은 컨텍스트 Standard 요율](https://developers.openai.com/api/docs/models/gpt-6.2-astra)은 100만 토큰당 입력 $8, 출력 $40입니다. 기존 Worker와 로컬 프로필 오버라이드는 저장된 설정을 유지합니다. 전환하려면 `rebut profile list`를 확인하고 모델 `gpt-6.2-astra`, 추론 `medium`, 두 요율과 가격 버전 `openai-standard-2026-11-18`을 현재 `--if-revision`으로 한 번에 갱신합니다. 클라이언트가 이전 모델 ID를 명시했다면 해당 설정을 갱신하거나 프로필 ID로 `astra-medium`을 선택합니다.
42
56
 
43
57
  로컬 프로필은 OS 소유자가 관리합니다. Worker 변경에는 `0002` 마이그레이션과 `ADMIN_TOKEN_SHA256`, 별도 관리자 토큰이 필요합니다. 조회는 유료 모델을 호출하지 않습니다.
@@ -65,6 +79,12 @@ rebut profile remove PROFILE_ID --if-revision N
65
79
 
66
80
  호출 전 입력과 최대 출력을 보수적으로 예약하고 확인된 사용량으로 정산합니다. 예상 비용은 청구서가 아닙니다. unknown은 전액 예약과 동시성 슬롯을 유지하며, 날짜가 바뀌어도 슬롯은 해제되지 않습니다. 기간별 비용은 원래 제출한 UTC 날짜·월에 귀속됩니다.
67
81
 
82
+ `rebut budget`으로 월간 예산 반영액, 다음 UTC 갱신 시각, 미해결 요청이 점유한 슬롯을 확인합니다. 장부의 수치이며 공급자 크레딧 잔액과 별개입니다. Worker 모드에서는 이 명령에 Worker 관리자 토큰을 사용합니다. 월간 반영액과 월 한도, 점유 슬롯과 동시 실행 한도를 비교할 수 있습니다. 일일·요청별 한도도 적용됩니다.
83
+
84
+ 월간 UTC 시작일을 바꾸려면 `rebut budget set-start-day DAY`(1~28)를 실행합니다. 빈 원장에는 즉시 적용됩니다. 요청 기록이 있는 원장은 현재 달력월 예산을 다음 달의 선택한 날짜까지 연장합니다. 예를 들어 11월에 15일로 설정하면 12월 15일 00:00 UTC까지 11월 예산을 사용합니다. 기본은 1일이며 원장마다 다른 시작일로 한 번만 전환할 수 있습니다. 같은 설정을 반복하는 것은 안전하고 다른 값으로 다시 변경하면 거부됩니다.
85
+
86
+ Worker에서 맞춤 시작일을 설정하기 전에 새 코드를 배포하고 D1 마이그레이션 `0003_budget_cycle.sql`을 적용합니다. 달력월 모드에는 이 마이그레이션이 필요하지 않습니다. 로컬에서는 전환에 성공하면 원장이 자동으로 업그레이드돼 이전 CLI 버전으로 열 수 없습니다. 이전 Worker 버전은 전환 후 신규 예약을 할 수 없습니다. 기존 요청 ID, 비용 귀속 기간, 미해결 슬롯은 보존됩니다.
87
+
68
88
  ## 입력·결과 계약
69
89
 
70
90
  | 항목 | 한도 |
@@ -73,6 +73,14 @@ rebut status review-001
73
73
 
74
74
  유료 검토는 명시적으로 선택합니다. 응답이 `completed`인지 확인하고 모델·입력 해시를 고정 번들·프로필과 대조한 뒤 각 지적을 원본에서 확인하세요. 독립 리뷰에는 같은 고정 자료를 제공하고 서로의 결과를 섞지 마세요. timeout/unknown 뒤에는 같은 ID·백엔드를 유지하며 새 ID로 다시 호출하지 않습니다. [복구 절차](operations.md#unknown-복구)를 따르세요.
75
75
 
76
+ ### 두 프로필로 독립 리뷰하기
77
+
78
+ Codex 또는 Claude Code에서 두 프로필로 유료 리뷰를 실행하겠다고 명시한 경우 `review_pair`를 사용합니다. `first`에는 수집한 스키마 2 번들 전체를 넣고, `second`에는 별도의 `request_id`와 두 번째 `profile`, 해당 프로필의 `provider`를 넣습니다. 예를 들어 `first`를 `astra-medium` / `openai`로 수집했다면 `second`에 `{"request_id":"review-002","profile":"claude-medium","provider":"anthropic"}`을 전달할 수 있습니다. 두 프로필의 실제 설정은 `rebut profile list`에서 확인합니다.
79
+
80
+ 두 요청은 같은 검토 자료를 사용하고 각 공급자에 맞춰 입력 해시를 고정합니다. 각 요청에 예산과 동시 실행 한도가 적용되므로 한쪽만 접수될 수 있습니다. 로컬에서 병렬 리뷰를 쓰려면 `rebut set max-concurrent 2`를 실행하고 MCP 호스트를 다시 시작합니다. 기본 한도는 1이며, 로컬 한도가 2보다 작으면 두 요청을 전송하기 전에 거부합니다. 두 결과에는 각 요청 ID와 `has_review`가 표시됩니다. 본문이 하나면 `partial`, 둘 다 없으면 `incomplete`입니다. 두 요청이 모두 이미 완료됐고 본문을 다시 받을 수 없으면 `completed_without_review`입니다. 응답이 끊기면 같은 백엔드에서 원래 두 ID로 `review_status`를 조회한 뒤에 추가 유료 호출 여부를 판단합니다. 상태 조회로 결과 본문을 다시 받을 수 없습니다.
81
+
82
+ 이 도구는 로컬과 Worker 모드의 Rebut 클라이언트에서 제공됩니다. 기존 Codex 등록은 `rebut setup --client codex --replace`로 갱신하고 호스트를 다시 시작하세요. Claude Code는 호스트를 다시 시작해 도구 목록을 갱신하세요. 로컬에서 서로 다른 공급자를 쓰려면 Rebut 프로세스가 두 키에 모두 접근할 수 있어야 합니다. 환경변수 방식의 호스트 등록은 기본적으로 선호 공급자의 변수만 전달합니다.
83
+
76
84
  ## 선택적 Worker 배포
77
85
 
78
86
  여러 기기가 예산·요청 장부를 공유할 때 사용합니다. 소스 체크아웃과 자신의 Cloudflare 계정·D1이 필요합니다.
@@ -15,6 +15,8 @@
15
15
 
16
16
  macOS/Linux 配置为 `~/.config/rebut/config.json`,本地账本为 `~/.local/share/rebut/local/ledger.sqlite`。设置 `REBUT_CONFIG_DIR` 后改用该目录中的 `config.json` 和 `local/`。注册与状态查询必须使用同一目录。
17
17
 
18
+ 配置文件应由当前账户所有,权限设为 `0600`。配置目录也应由当前账户所有,并与上级路径一同放在其他用户无法写入的位置。如果 Rebut 报告配置路径不安全,请检查所有权和权限。
19
+
18
20
  ## 凭据
19
21
 
20
22
  `rebut set secret-store keychain|vaultwarden|env` 对所有角色选择后端,没有自动回退。Keychain 服务为 `com.abruption.rebut`。
@@ -38,6 +40,18 @@ rebut set profile PROFILE_ID
38
40
 
39
41
  偏好应用于新收集的材料。显式 `collect --profile` 优先,`review` 保留冻结材料的配置档。默认 `astra-medium`,允许列表不授予供应商模型权限。
40
42
 
43
+ Codex 和 Claude Code 可以共享同一配置与账本,同时各自设置默认审查配置。
44
+
45
+ ```sh
46
+ rebut set profile claude-medium --client codex
47
+ rebut set profile astra-medium --client claude
48
+ rebut set profile --client codex --clear
49
+ ```
50
+
51
+ `--clear` 将该客户端恢复为共享默认配置。在终端或代理命令中用 `collect --client codex` 或 `collect --client claude` 选择对应默认值,显式传入的 `collect --profile` 优先。客户端默认配置不可用时,按默认值收集会失败。已有冻结审查包保留原来的配置和供应商。可用 `rebut doctor --client codex` 或 `--client claude` 查看设置。
52
+
53
+ 更新现有注册时,运行 `rebut setup --client codex --replace` 或 `rebut setup --client claude --replace`,然后重启宿主。本地环境变量模式下,如果所需密钥变量变化,请重新注册。通过 `rebut profile set --model` 定义配置中的模型。选为默认值后,将使用该配置的模型、推理设置和费率。 回退到不支持客户端默认值的版本前,先清除两个客户端的覆盖值,再用旧版 CLI 重新注册两个 MCP 宿主。
54
+
41
55
  随附的 `astra-medium` 配置档使用 GPT-6.2 Astra(`gpt-6.2-astra`)和 medium 推理。示例采用[短上下文 Standard 费率](https://developers.openai.com/api/docs/models/gpt-6.2-astra),每百万令牌输入 $8、输出 $40。现有 Worker 和本地配置档覆盖项保留已保存的设置。迁移时请查看 `rebut profile list`,使用当前的 `--if-revision` 一次性更新模型 `gpt-6.2-astra`、推理级别 `medium`、两项费率和价格版本 `openai-standard-2026-11-18`。如果客户端显式选择了旧模型 ID,请更新该偏好,或通过配置档 ID 选择 `astra-medium`。
42
56
 
43
57
  本地配置档由 OS 所有者管理。Worker 更改需要 `0002` 迁移、`ADMIN_TOKEN_SHA256` 和独立管理员令牌。列表查询不调用付费模型。
@@ -65,6 +79,12 @@ rebut profile remove PROFILE_ID --if-revision N
65
79
 
66
80
  调用前保守预留输入及最大输出费用,再按已验证用量记账。估算不是账单。unknown 保留全额预留与并发槽位,日期切换也不释放槽位。费用归属于最初提交的 UTC 日期和月份。
67
81
 
82
+ 运行 `rebut budget` 查看月度已计入金额、下次 UTC 重置时间和未解决请求占用的并发槽位。台账金额与供应商的额度余额无关。Worker 模式下使用 Worker 管理员令牌。可分别比较月度已计入金额与月度上限、占用槽位与并发上限。每日及单次请求上限也适用。
83
+
84
+ 如需更改月度 UTC 起始日,请运行 `rebut budget set-start-day DAY`(1–28)。空台账立即采用该设置。已有请求记录的台账会将当前日历月预算延长到下个月的指定日期。例如在 11 月设置为 15 日,会继续使用 11 月预算直到 12 月 15 日 00:00 UTC。默认从 1 日开始,每个台账只允许切换一次。重复设置相同日期是安全的,再改为其他日期会被拒绝。
85
+
86
+ Worker 上请先部署新代码并应用 D1 迁移 `0003_budget_cycle.sql`,再设置自定义日期。日历月模式无需此次迁移。本地切换成功后会自动升级台账,旧版 CLI 无法打开升级后的台账。旧版 Worker 在切换后无法新增预留。已有请求 ID、费用所属周期和未解决槽位均会保留。
87
+
68
88
  ## 输入与结果契约
69
89
 
70
90
  | 项目 | 上限 |
@@ -73,6 +73,16 @@ rebut status review-001
73
73
 
74
74
  明确选择付费审查。确认 `completed`,将返回的模型和输入哈希与冻结材料及配置档对照,再逐条核对原始证据。独立审查应使用同一份冻结材料,不共享各审查者结果。timeout/unknown 后保留原 ID 与后端,不以新 ID 重试,按[恢复流程](operations.md#unknown-恢复)处理。
75
75
 
76
+ ### 用两个配置进行独立审查
77
+
78
+ 用户明确选择两次付费审查时,可在 Codex 或 Claude Code 中使用 `review_pair`。`first` 传入收集好的完整 schema 2 审查包,`second` 传入不同的 `request_id`、第二个 `profile` 和对应的 `provider`。例如,使用 `astra-medium` / `openai` 收集 `first`,再将 `{"request_id":"review-002","profile":"claude-medium","provider":"anthropic"}` 传给 `second`。请用 `rebut profile list` 确认配置。
79
+
80
+ 两个请求使用相同材料,各自的输入哈希绑定对应供应商。每个请求分别受预算和并发限制,因此可能只接收一个。本地默认并发上限为 1。运行 `rebut set max-concurrent 2` 并重启 MCP 宿主,即可启用本地并行审查。本地并发上限低于 2 时,Rebut 会在发送前拒绝该调用。各结果包含请求 ID 和 `has_review`。只收到一份审查正文时为 `partial`,两份都缺失时为 `incomplete`。如果两个请求均已完成且正文无法重放,则返回 `completed_without_review`。连接中断后,请在同一后端用原来的两个 ID 查询 `review_status`,再判断是否需要新的付费调用。状态查询无法重放审查正文。
81
+
82
+ 该工具由本地模式和 Worker 模式下的 Rebut 客户端提供。已有 Codex 注册时,运行 `rebut setup --client codex --replace` 并重启宿主。请重启 Claude Code 更新工具列表。
83
+
84
+ 本地使用不同供应商时,Rebut 进程必须能访问两把密钥。通过环境变量注册宿主时,默认只转发首选供应商的变量。
85
+
76
86
  ## 可选 Worker 部署
77
87
 
78
88
  需要跨设备共享预算和请求账本时使用。部署需要源码、自己的 Cloudflare 账户和 D1。
@@ -0,0 +1,21 @@
1
+ # Rebut 0.3.3
2
+
3
+ 월간 예산 갱신일을 설정하는 기능을 추가하고 Worker 인증과 로컬 설정 파일 검사를 강화했습니다.
4
+
5
+ ## 월간 예산
6
+
7
+ - `rebut budget`은 월간 예산 반영액과 한도, 다음 갱신 시각, 미해결 요청이 점유한 동시 실행 슬롯을 보여줍니다. Worker 모드에서는 관리자 토큰이 필요합니다. 표시 금액은 Rebut 장부 기준입니다. [#57](https://github.com/abruption/rebut/pull/57)
8
+ - 기본 갱신 시각은 매월 1일 00:00 UTC입니다. `rebut budget set-start-day DAY`는 1~28을 받습니다. 기본인 1일에서 2~28일 중 하나로 원장마다 한 번 전환할 수 있고, 이미 설정한 값을 다시 지정해도 설정은 바뀌지 않습니다. 빈 원장은 즉시 전환합니다. 요청 기록이 있는 원장은 현재 기간을 다음 달의 지정일까지 연장합니다. 예를 들어 11월에 15일을 선택하면 12월 15일 00:00 UTC에 처음 갱신합니다.
9
+ - 기존 요청의 비용은 원래 기간에 남습니다. `unknown` 요청이 보유한 예산 예약과 동시 실행 슬롯도 유지됩니다. 연결이 끊겼다면 같은 백엔드에서 원래 요청 ID의 상태를 조회하세요.
10
+
11
+ ## 인증 및 설정
12
+
13
+ - Worker는 `AUTH_TOKENS`의 다이제스트가 인증 주체별로 고유한지 검사합니다. `ADMIN_TOKEN_SHA256`을 설정한다면 일반 인증 다이제스트와 겹치지 않아야 합니다. 값이 비어 있으면 관리자 토큰을 미설정으로 처리합니다. 잘못된 인증 설정은 보호되는 경로에서 요청을 거부합니다. [#62](https://github.com/abruption/rebut/pull/62)
14
+ - CLI는 `config.json`과 설정 디렉터리의 소유권을 확인합니다. 설정 파일은 현재 계정 소유의 일반 파일로 권한을 `0600`으로 설정하고, 설정 디렉터리도 현재 계정이 소유해야 합니다. 설정 디렉터리와 상위 경로는 다른 사용자가 쓸 수 없는 위치를 사용하세요. [#63](https://github.com/abruption/rebut/pull/63)
15
+
16
+ ## 업그레이드
17
+
18
+ CLI 갱신 전에 설정 파일과 디렉터리의 소유권과 권한을 확인하세요. Worker를 배포하기 전에는 인증 다이제스트가 서로 겹치지 않는지 확인하세요.
19
+
20
+ - 로컬 모드에서는 CLI를 갱신하세요. 맞춤 갱신일을 설정하면 로컬 원장이 자동으로 업그레이드되므로, 이전 CLI 버전에서 해당 원장을 열 수 없습니다.
21
+ - Worker 모드에서는 CLI를 갱신하고 새 Worker 코드를 배포하세요. 맞춤 갱신일을 사용하려면 새 코드 배포 후 D1 마이그레이션 `0003_budget_cycle.sql`을 적용한 뒤 시작일을 설정하세요. 기본 달력월을 계속 쓰는 데는 이 마이그레이션이 필요하지 않습니다. 맞춤 갱신일을 적용한 뒤에는 이전 Worker에서 신규 예약을 할 수 없습니다. [한국어 설정 안내](../guide/ko/configuration.md)
@@ -0,0 +1,24 @@
1
+ # Rebut 0.4.0
2
+
3
+ Codex와 Claude Code에서 두 프로필을 선택해 같은 변경을 병렬로 검토할 수 있습니다. 각 호스트의 단일 리뷰 기본 프로필도 따로 지정할 수 있습니다.
4
+
5
+ ## 병렬 리뷰
6
+
7
+ - 두 건의 유료 리뷰를 명시적으로 선택했다면 `review_pair`를 사용합니다. 수집한 스키마 2 번들을 `first`로 넘기고, `second`에 두 번째 프로필, 공급자, 별도 요청 ID를 지정합니다. 두 리뷰는 같은 자료를 서로 독립적으로 검토합니다. [#69](https://github.com/abruption/rebut/pull/69)
8
+ - 예산이나 동시 실행 한도에 따라 한쪽만 접수될 수 있습니다. 두 요청이 모두 접수된 경우에도 한쪽 결과가 불확실하면 반환된 본문만 확인할 수 있습니다. 응답이 끊기면 같은 백엔드에서 두 요청의 원래 ID로 `review_status`를 조회합니다. 상태 조회로 리뷰 본문을 다시 받을 수 없습니다.
9
+ - 로컬 한도가 2 미만이면 두 요청을 보내기 전에 거부합니다. 기본 한도는 1입니다. 병렬 리뷰를 쓰려면 `rebut set max-concurrent 2`를 실행한 뒤 MCP 호스트를 다시 시작합니다. 로컬에서 서로 다른 공급자를 쓰려면 Rebut 프로세스에 두 키가 필요하며, 환경변수 방식 등록은 기본적으로 선호 공급자의 변수만 전달합니다.
10
+
11
+ ## 호스트별 단일 리뷰 기본값
12
+
13
+ ```sh
14
+ rebut set profile claude-medium --client codex
15
+ rebut set profile astra-medium --client claude
16
+ ```
17
+
18
+ `rebut collect --client codex` 또는 `--client claude`로 해당 기본값을 사용합니다. 명시적으로 전달한 `--profile`이 우선하며, 호스트를 지정하지 않으면 공통 기본값을 사용합니다. 지정된 호스트의 기본 프로필을 사용할 수 없으면 수집에 실패합니다. 기존 번들의 프로필과 공급자는 유지됩니다. [#71](https://github.com/abruption/rebut/pull/71)
19
+
20
+ CLI를 갱신한 후 기존 등록은 `rebut setup --client codex --replace` 또는 `rebut setup --client claude --replace`로 갱신하고 호스트를 다시 시작합니다. Worker 모드에서도 두 기능은 CLI에서 동작하므로 새 기능을 쓰기 위한 Worker 재배포나 D1 마이그레이션은 필요하지 않습니다. 구버전으로 되돌리려면 0.4.0에서 `rebut set profile --client codex --clear`와 `rebut set profile --client claude --clear`를 실행하고, 이전 CLI를 설치한 뒤 두 호스트를 다시 등록합니다. [한국어 설정 안내](../guide/ko/configuration.md)
21
+
22
+ ## npm 발행 검증
23
+
24
+ npm 게시 후 공개 파일이 잠시 다운로드되지 않으면 검증 단계가 최대 25회, 전체 7분 이내로 재시도합니다. 파일 해시가 다르거나 영구 오류가 발생하면 즉시 실패합니다. [#67](https://github.com/abruption/rebut/pull/67)