aptly 0.1.15 → 0.1.16

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 CHANGED
@@ -10,61 +10,36 @@
10
10
 
11
11
  [한국어](README.md) · **English** · [简体中文](README.zh-CN.md) · [日本語](README.ja.md)
12
12
 
13
- **A local MCP server that selects Claude Code and Codex subagent models and reasoning effort to suit the task.**
14
-
15
13
  </div>
16
14
 
17
- Aptly classifies a minimal task summary with the OpenAI Decisions API and recommends an allowlisted execution profile. Its installed Hook can automatically select defaults for fresh, general-purpose subagents without explicit choices. The host retains control of execution and permissions.
18
-
19
- Our own tests showed **about 52–58% lower API-equivalent costs**. See the [test conditions and detailed results](docs/guide/en/benchmarks.md#guide-cost-benchmarks).
15
+ Aptly recommends models and reasoning effort for Claude Code and Codex subagents. It sends a task summary to the OpenAI Decisions API and preserves explicitly selected models, reasoning effort, and execution permissions.
20
16
 
21
17
  ## Quick start
22
18
 
23
- Requires Node.js **24 or later** and Claude Code or Codex. For first-time installation, install and configure the latest stable version globally with these commands.
19
+ You need Node.js **24 or later**, Claude Code or Codex, and an OpenAI API key.
24
20
 
25
21
  ```sh
26
22
  npm install -g aptly@latest --allow-scripts=aptly
27
23
  aptly set default
28
24
  aptly set env OPENAI_API_KEY
29
- aptly --version
30
25
  ```
31
26
 
32
- Check the installed version with `aptly --version`. On supported npm versions, `--allow-scripts=aptly` allows Aptly’s installation script. If your npm does not support this option, follow the explicit installation and setup steps in the [installation guide](docs/guide/en/installation.md#guide-installation). From Aptly 0.1.7, new registrations make no automatic transmission until you select an OpenAI Decisions API transmission scope with `aptly set default`.
33
-
34
- During installation, `postinstall` registers the MCP server and a `PreToolUse` Hook in existing host configuration directories. Run `setup` explicitly if automatic registration was skipped or a host has no configuration directory yet. Other settings and Hooks, and any existing Aptly launch command and environment, are preserved.
35
-
36
- Store the classification key, `OPENAI_API_KEY`, in the OS credential store using the hidden prompt in `aptly set env OPENAI_API_KEY`, or pass it to the MCP process through a secure execution environment. Do not put it in command arguments, requests, configuration JSON, or the repository. Restart the host or MCP server, then **review and trust the new Hook through `/hooks` in Codex**. See [installation, keys, and registration](docs/guide/en/installation.md#guide-installation).
27
+ Choose the transmission scope in `set default` and enter your API key through the hidden prompt. Restart the host, then **review and approve the new Hook in `/hooks` for Codex**. See [installation and key setup](docs/guide/en/installation.md) for npm compatibility and account-specific configuration.
37
28
 
38
29
  ## Update
39
30
 
40
- To update an existing global npm installation running Aptly 0.1.3 or later, stop all related host, MCP, and CLI writers and review ledger migration and the manual fallback in the [installation and upgrade guide](docs/guide/en/installation.md#guide-installation). Existing key settings are preserved, so there is no need to re-enter the key. Restart afterward.
31
+ Stop the relevant hosts, MCP servers, and CLI processes before running these commands.
41
32
 
42
33
  ```sh
43
34
  aptly update
44
35
  aptly setup --client all
45
36
  ```
46
37
 
47
- ## Usage modes
48
-
49
- | Mode | Behavior |
50
- |---|---|
51
- | Automatic Hook | Checks constraints and recommends unspecified defaults for new calls |
52
- | Direct recommendation | Returns a profile through `recommend_agent` or `aptly recommend`; review it and decide separately whether to run it in the host |
53
- | fixture | Tests recommendations generated by local rules without a key or network access; these are not actual Decisions results |
54
-
55
- From Aptly 0.1.4, inherited calls also reach recommendation. Application still requires explicit `fork_turns: "none"` in Codex or a general-purpose Claude Code call without history constraints; specified fields are preserved. Recommendation, Hook argument updates and child execution are separate facts. See the [guide](docs/guide/en/routing.md#guide-automatic-routing) for application conditions.
38
+ Restart the host. You do not need to re-enter the key. If migrating a stable launcher or an older version, see [updates](docs/guide/en/installation.md#guide-package-updates).
56
39
 
57
40
  ## Documentation
58
41
 
59
- - [User guide](docs/guide/en.md): installation and removal, keys, Hooks, direct recommendations, and error recovery
60
- - [Installation and removal](docs/guide/en/installation.md#guide-installation) and [CLI configuration](docs/guide/en/configuration.md#guide-cli-configuration): global npm installation, host registration, restarting, and trust review
61
- - [Models and environment variables](docs/guide/en/configuration.md#guide-models-and-environment): six default profiles and candidate configuration
62
- - [Providing context](docs/guide/en/advanced.md#guide-context-delivery): encrypted messages and repository URL limitations
63
- - [Cost benchmark](docs/guide/en/benchmarks.md#guide-cost-benchmarks): tokens, converted costs, and measurement scope for a README translation review
64
- - [Diagnostics and development](docs/guide/en/advanced.md#guide-diagnostics-and-development): local reports and checks without paid API calls
65
-
66
- Korean is the canonical documentation. The English, Simplified Chinese, and Japanese documents cover the same usage scope. Choosing a documentation language does not change the language of CLI or MCP output.
67
-
68
- ## License
69
-
70
- [MIT](LICENSE).
42
+ - [User guide](docs/guide/en.md): configuration, automatic recommendations, budgets, statistics, and troubleshooting
43
+ - [Model candidates](docs/guide/en/configuration.md#guide-models-and-environment)
44
+ - [Transmission scope](docs/guide/en/transmission.md): information sent to the Decisions API
45
+ - [Measured costs](docs/guide/en/benchmarks.md): approximately 52–58% lower API-equivalent child review and classification costs in a small README review test. This is not a reduction in total task costs or subscription charges.
package/README.ja.md CHANGED
@@ -10,61 +10,36 @@
10
10
 
11
11
  [한국어](README.md) · [English](README.en.md) · [简体中文](README.zh-CN.md) · **日本語**
12
12
 
13
- **タスクに適した Claude Code・Codex のサブエージェント用モデルと effort を選ぶローカル MCP です。**
14
-
15
13
  </div>
16
14
 
17
- Aptly は必要最小限のタスク要約を OpenAI Decisions API で分類し、あらかじめ許可された実行プロファイルを推薦します。インストールした Hook は、明示的な指定のない新しい汎用サブエージェントのデフォルト値を自動で選択できます。サブエージェントの実行と権限に関する判断は、既存のホストが行います。
18
-
19
- 独自テストでは、**API 換算コストが約 52~58% 減少しました**。[測定条件と詳細結果](docs/guide/ja/benchmarks.md#guide-cost-benchmarks)をご覧ください。
15
+ Claude Code・Codex のサブエージェントにモデルと推論強度を推薦します。タスクの要約を OpenAI Decisions API に送信し、明示されたモデル・推論強度・実行権限は保持します。
20
16
 
21
17
  ## クイックスタート
22
18
 
23
- Node.js **24 以上**と Claude Code または Codex が必要です。初めてインストールする場合は、以下のコマンドで最新の安定版をグローバルにインストールして設定してください。
19
+ Node.js **24 以上**、Claude Code または Codex、OpenAI API キーが必要です。
24
20
 
25
21
  ```sh
26
22
  npm install -g aptly@latest --allow-scripts=aptly
27
23
  aptly set default
28
24
  aptly set env OPENAI_API_KEY
29
- aptly --version
30
25
  ```
31
26
 
32
- `aptly --version` でインストール済みのバージョンを確認してください。対応する npm では、`--allow-scripts=aptly` で Aptly のインストールスクリプトを許可します。このオプションに対応していない npm では、[インストール案内](docs/guide/ja/installation.md#guide-installation)の明示的なインストール・設定手順に従ってください。 Aptly 0.1.7 以降、新規登録は自動送信せず、`aptly set default` で OpenAI Decisions API への送信範囲を選択します。
33
-
34
- インストール時の `postinstall` は、既存のホスト設定ディレクトリに MCP と `PreToolUse` Hook を登録します。自動登録をスキップした場合や、ホストに設定ディレクトリがまだない場合も、`setup` を明示的に実行して登録できます。他の既存設定・Hook と、既存の Aptly の実行コマンド・環境は保持します。
35
-
36
- 分類用の `OPENAI_API_KEY` は、`aptly set env OPENAI_API_KEY` の非表示入力で OS の資格情報ストアに保存するか、安全な実行環境から MCP プロセスに渡してください。キーをコマンドライン・リクエスト・設定 JSON・リポジトリに記載しないでください。ホストまたは MCP を再起動した後、**Codex では `/hooks` で新しい Hook を確認し、信頼を承認**してください。[インストール・キー・登録の詳細](docs/guide/ja/installation.md#guide-installation)を確認してください。
27
+ `set default` で送信範囲を選び、API キーは非表示入力で登録します。ホストを再起動した後、**Codex では `/hooks` で新しい Hook を確認・承認**してください。[インストール・キー設定](docs/guide/ja/installation.md)で npm の互換オプションとアカウント別の設定を確認できます。
37
28
 
38
29
  ## 更新
39
30
 
40
- npm でグローバルインストール済みの Aptly 0.1.3 以降を更新するには、関連するホスト・MCP・CLI の書き込みプロセスをすべて停止し、[インストールとアップグレードの案内](docs/guide/ja/installation.md#guide-installation)で台帳の移行と手動での代替手順を確認してください。既存のキー設定は保持されるため、キーの再入力は不要です。コマンド実行後に再起動してください。
31
+ 実行前に、関連するホスト・MCP サーバー・CLI プロセスを停止してください。
41
32
 
42
33
  ```sh
43
34
  aptly update
44
35
  aptly setup --client all
45
36
  ```
46
37
 
47
- ## 使用方法
48
-
49
- | 方法 | 動作 |
50
- |---|---|
51
- | 自動 Hook | 新しい呼び出しの制約を確認し、未指定のデフォルト値を推薦します |
52
- | 直接推薦 | `recommend_agent` または `aptly recommend` でプロファイルを受け取り、実行するかどうかをホストで明示的に判断します |
53
- | fixture | キーやネットワークを使わず、ローカルで生成した試験用の推薦を確認できます。実際の Decisions の結果ではありません |
54
-
55
- Aptly 0.1.4 以降では継承呼び出しも推薦を評価します。適用には Codex の明示的な `fork_turns: "none"`、または履歴制約のない Claude Code の汎用呼び出しが必要で、指定済みフィールドは保持します。推薦・Hook 引数更新・実際の子の実行は別です。適用条件は[ガイド](docs/guide/ja/routing.md#guide-automatic-routing)を参照してください。
38
+ ホストを再起動してください。キーの再入力は不要です。stable ランチャーや以前のバージョンから移行する場合は、[更新案内](docs/guide/ja/installation.md#guide-package-updates)を確認してください。
56
39
 
57
40
  ## ドキュメント
58
41
 
59
- - [使用ガイド](docs/guide/ja.md): インストール・削除、キー、Hook、直接推薦、エラー復旧
60
- - [インストール・削除](docs/guide/ja/installation.md#guide-installation)と [CLI 設定](docs/guide/ja/configuration.md#guide-cli-configuration): npm のグローバルインストール、ホスト登録、再起動と信頼の承認
61
- - [モデルと環境変数](docs/guide/ja/configuration.md#guide-models-and-environment): 6 つのデフォルトプロファイルと候補の設定
62
- - [コンテキストの提供](docs/guide/ja/advanced.md#guide-context-delivery): 暗号化されたメッセージとリポジトリ URL の制約
63
- - [費用実測](docs/guide/ja/benchmarks.md#guide-cost-benchmarks): README 翻訳レビューのトークン・換算費用と測定範囲
64
- - [診断・開発](docs/guide/ja/advanced.md#guide-diagnostics-and-development): ローカル report と無料の検証コマンド
65
-
66
- 韓国語版が正本です。英語・簡体字中国語・日本語のドキュメントは同じ使用範囲を説明しており、ドキュメントの言語を選んでも CLI・MCP の出力言語は変わりません。
67
-
68
- ## ライセンス
69
-
70
- [MIT](LICENSE)。
42
+ - [使用ガイド](docs/guide/ja.md): 設定・自動推薦・予算・統計・トラブルシューティング
43
+ - [候補モデルの設定](docs/guide/ja/configuration.md#guide-models-and-environment)
44
+ - [送信範囲](docs/guide/ja/transmission.md): Decisions API に送る情報
45
+ - [費用実測](docs/guide/ja/benchmarks.md): 小規模な README レビュー試験で子レビュー・分類費の API 換算額が約 52~58% 減少。タスク全体の費用やサブスクリプションの実請求額の削減率ではありません。
package/README.md CHANGED
@@ -10,61 +10,36 @@
10
10
 
11
11
  **한국어** · [English](README.en.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja.md)
12
12
 
13
- **작업에 맞는 Claude Code·Codex 서브에이전트 모델과 effort를 선택하는 로컬 MCP입니다.**
14
-
15
13
  </div>
16
14
 
17
- Aptly는 최소한의 작업 요약을 OpenAI Decisions API로 분류하고 허용된 실행 프로필을 추천합니다. 설치한 Hook은 명시 선택이 없는 새 일반 서브에이전트의 기본값을 자동으로 선택할 수 있습니다. 실제 실행과 권한 결정은 기존 호스트가 담당합니다.
18
-
19
- 자체 테스트에서 **API 환산 비용이 약 52~58% 감소했습니다**. [측정 조건과 상세 결과](docs/guide/ko/benchmarks.md#guide-cost-benchmarks)를 확인하세요.
15
+ Claude Code·Codex 서브에이전트의 모델과 추론 강도를 추천합니다. 작업 요약을 OpenAI Decisions API로 보내며, 명시한 모델·추론 강도·실행 권한은 보존합니다.
20
16
 
21
17
  ## 빠른 시작
22
18
 
23
- Node.js **24 이상**과 Claude Code 또는 Codex가 필요합니다. 처음 설치할 때는 다음 명령으로 최신 안정 버전을 전역 설치하고 설정하십시오.
19
+ Node.js **24 이상**, Claude Code 또는 Codex, OpenAI API 키가 필요합니다.
24
20
 
25
21
  ```sh
26
22
  npm install -g aptly@latest --allow-scripts=aptly
27
23
  aptly set default
28
24
  aptly set env OPENAI_API_KEY
29
- aptly --version
30
25
  ```
31
26
 
32
- `aptly --version`으로 설치된 버전을 확인하십시오. `--allow-scripts=aptly`는 지원하는 npm에서 Aptly의 설치 스크립트를 허용합니다. 이 옵션을 지원하지 않는 npm은 [설치 안내](docs/guide/ko/installation.md#guide-installation)의 명시적 설치·설정 절차를 따르십시오. Aptly 0.1.7부터 신규 등록의 자동 전송을 보류하며 `aptly set default`에서 OpenAI Decisions API 전송 범위를 선택합니다.
33
-
34
- 설치 시 `postinstall`은 기존 호스트 설정 디렉터리에 MCP와 `PreToolUse` Hook을 등록합니다. 명시적인 `setup`은 자동 등록을 건너뛰었거나 아직 설정 디렉터리가 없는 호스트에도 사용할 수 있습니다. 기존 다른 설정·Hook과 기존 Aptly 실행 명령·환경은 보존합니다.
35
-
36
- 분류용 `OPENAI_API_KEY`는 `aptly set env OPENAI_API_KEY`의 숨김 입력으로 OS 자격 저장소에 보관하거나 안전한 실행 환경에서 MCP 프로세스에 전달하십시오. 키를 명령행·요청·설정 JSON·저장소에 기록하지 마십시오. 호스트 또는 MCP를 재시작한 뒤, **Codex에서는 `/hooks`에서 새 Hook을 검토하고 신뢰를 승인하십시오.** [설치·키·등록 상세](docs/guide/ko/installation.md#guide-installation)를 참고하십시오.
27
+ `set default`에서 전송 범위를 선택하고 API 키는 숨김 입력으로 등록합니다. 호스트를 재시작한 뒤 **Codex는 `/hooks`에서 새 Hook을 검토·승인**하십시오. [설치·키 설정](docs/guide/ko/installation.md)에서 npm 호환 옵션과 계정별 설정을 확인할 수 있습니다.
37
28
 
38
29
  ## 업데이트
39
30
 
40
- 기존 전역 npm 설치의 Aptly 0.1.3 이상을 업데이트하려면 관련 호스트·MCP·CLI 쓰기 프로세스를 모두 중지하고 [설치·업그레이드 안내](docs/guide/ko/installation.md#guide-installation)의 원장 전환 및 수동 대체 절차를 확인하십시오. 기존 키 설정은 유지하므로 다시 입력할 필요가 없습니다. 명령 실행 후 재시작하십시오.
31
+ 관련 호스트·MCP 서버·CLI 프로세스를 중지한 뒤 실행하십시오.
41
32
 
42
33
  ```sh
43
34
  aptly update
44
35
  aptly setup --client all
45
36
  ```
46
37
 
47
- ## 사용 방식
48
-
49
- | 방식 | 동작 |
50
- |---|---|
51
- | 자동 Hook | 새 호출의 제약을 검사하고 미지정 기본값을 추천합니다 |
52
- | 직접 추천 | `recommend_agent` 또는 `aptly recommend`로 프로필을 받고 호스트에서 명시적으로 실행합니다 |
53
- | fixture | 키·네트워크 없이 시험용 추천을 확인합니다. 실제 Decisions 결과가 아닙니다 |
54
-
55
- Aptly 0.1.4부터 상속 호출도 추천을 평가합니다. Codex의 적용은 명시적인 `fork_turns: "none"`, Claude Code는 이력 제약 없는 일반 호출로 제한하며 명시한 필드는 보존합니다. 추천·Hook 인자 변경·실제 자식 실행은 별개입니다. 적용 조건은 [가이드](docs/guide/ko/routing.md#guide-automatic-routing)에서 확인하십시오.
38
+ 호스트를 재시작하십시오. 키를 다시 입력할 필요는 없습니다. stable 실행기나 이전 버전에서 전환하는 경우 [업데이트 안내](docs/guide/ko/installation.md#guide-package-updates)를 확인하십시오.
56
39
 
57
40
  ## 문서
58
41
 
59
- - [사용 가이드](docs/guide/ko.md): 설치·제거, 키, Hook, 직접 추천, 오류 복구
60
- - [설치·제거](docs/guide/ko/installation.md#guide-installation) 및 [CLI 설정](docs/guide/ko/configuration.md#guide-cli-configuration): npm 전역 설치, 호스트 등록, 재시작과 신뢰 승인
61
- - [모델과 환경변수](docs/guide/ko/configuration.md#guide-models-and-environment): 여섯 기본 프로필과 후보 설정
62
- - [맥락 전달](docs/guide/ko/advanced.md#guide-context-delivery): 암호화된 메시지와 저장소 URL의 한계
63
- - [비용 실측](docs/guide/ko/benchmarks.md#guide-cost-benchmarks): README 번역 검토의 토큰·환산 비용과 측정 범위
64
- - [진단·개발](docs/guide/ko/advanced.md#guide-diagnostics-and-development): 로컬 진단 보고서와 무료 검증 명령
65
-
66
- 한국어가 정본입니다. 영어·중국어 간체·일본어 문서는 같은 사용 범위를 설명하며, 문서 언어가 CLI·MCP 출력 언어를 바꾸지는 않습니다.
67
-
68
- ## 라이선스
69
-
70
- [MIT](LICENSE).
42
+ - [사용 가이드](docs/guide/ko.md): 설정·자동 추천·예산·통계·문제 해결
43
+ - [모델 후보 설정](docs/guide/ko/configuration.md#guide-models-and-environment)
44
+ - [전송 범위](docs/guide/ko/transmission.md): Decisions API에 보내는 정보
45
+ - [비용 실측](docs/guide/ko/benchmarks.md): 소규모 README 검토 시험에서 자식 검토·분류비의 API 환산액 약 52~58% 감소. 전체 작업 비용이나 구독 실청구 절감률은 아닙니다.
package/README.zh-CN.md CHANGED
@@ -10,61 +10,36 @@
10
10
 
11
11
  [한국어](README.md) · [English](README.en.md) · **简体中文** · [日本語](README.ja.md)
12
12
 
13
- **用于为 Claude Code 和 Codex 子代理选择合适模型与推理强度(effort)的本地 MCP 服务器。**
14
-
15
13
  </div>
16
14
 
17
- Aptly 使用 OpenAI Decisions API 对简要任务摘要进行分类,并推荐允许使用的执行配置。安装 Hook 后,可为未明确指定配置的新建通用子代理自动选择默认值。实际执行与权限决策仍由宿主(Claude Code 或 Codex)负责。
18
-
19
- 在我们的测试中,**API 折算成本降低了约 52%~58%**。详见[测试条件与详细结果](docs/guide/zh-CN/benchmarks.md#guide-cost-benchmarks)。
15
+ 为 Claude Code 和 Codex 子代理推荐模型与推理强度。Aptly 将任务摘要发送给 OpenAI Decisions API,并保留明确指定的模型、推理强度和执行权限。
20
16
 
21
17
  ## 快速开始
22
18
 
23
- 需要 Node.js **24 或更高版本**以及 Claude Code 或 Codex。首次安装时,请使用以下命令全局安装并配置最新稳定版。
19
+ 需要 Node.js **24 或更高版本**、Claude Code 或 Codex 以及 OpenAI API 密钥。
24
20
 
25
21
  ```sh
26
22
  npm install -g aptly@latest --allow-scripts=aptly
27
23
  aptly set default
28
24
  aptly set env OPENAI_API_KEY
29
- aptly --version
30
25
  ```
31
26
 
32
- 请使用 `aptly --version` 确认已安装的版本。在支持此选项的 npm 中,`--allow-scripts=aptly` 允许执行 Aptly 的安装脚本。如果 npm 不支持此选项,请按照[安装指南](docs/guide/zh-CN/installation.md#guide-installation)中的显式安装与配置步骤操作。 从 Aptly 0.1.7 起,新注册不会自动传输;请通过 `aptly set default` 选择向 OpenAI Decisions API 传输的范围。
33
-
34
- 安装时的 `postinstall` 会在现有宿主配置目录中注册 MCP 和 `PreToolUse` Hook。如果跳过了自动注册,或宿主尚无配置目录,也可以显式运行 `setup`。其他现有配置与 Hook,以及 Aptly 原有的启动命令和环境均会保留。
35
-
36
- 请通过 `aptly set env OPENAI_API_KEY` 的隐藏输入,将分类用的 `OPENAI_API_KEY` 存入系统凭据存储,或通过安全的运行环境传递给 MCP 进程。不要将密钥写入命令行、请求、配置 JSON 或代码仓库。重启宿主或 MCP 后,**请在 Codex 的 `/hooks` 中审核新 Hook 并批准信任**。详见[安装、密钥与注册](docs/guide/zh-CN/installation.md#guide-installation)。
27
+ 请在 `set default` 中选择传输范围,并通过隐藏输入注册 API 密钥。重启宿主后,**请在 Codex 的 `/hooks` 中审核并批准新 Hook**。有关 npm 兼容选项和各账户设置,请参阅[安装与密钥设置](docs/guide/zh-CN/installation.md)。
37
28
 
38
29
  ## 更新
39
30
 
40
- 如需更新通过 npm 全局安装的 Aptly 0.1.3 或更高版本,请先停止所有相关宿主、MCP 和 CLI 写入进程,并查阅[安装与升级指南](docs/guide/zh-CN/installation.md#guide-installation)中的账本迁移和手动备用步骤。现有密钥设置会保留,无需重新输入密钥。执行命令后请重启。
31
+ 执行前,请停止相关宿主、MCP 服务器和 CLI 进程。
41
32
 
42
33
  ```sh
43
34
  aptly update
44
35
  aptly setup --client all
45
36
  ```
46
37
 
47
- ## 使用方式
48
-
49
- | 方式 | 行为 |
50
- |---|---|
51
- | 自动 Hook | 检查新调用的约束,并推荐未指定的默认值 |
52
- | 直接推荐 | 通过 `recommend_agent` 或 `aptly recommend` 获取执行配置,再在宿主中明确选择并执行 |
53
- | fixture | 无需密钥或网络即可测试本地模拟推荐;结果并非实际 Decisions 判断 |
54
-
55
- Aptly 0.1.4 起也会为继承调用评估推荐。应用仍要求 Codex 显式指定 `fork_turns: "none"`,或 Claude Code 使用无历史约束的通用调用;已指定字段会保留。推荐、Hook 参数更新与实际子代理执行是不同事实。应用条件详见[指南](docs/guide/zh-CN/routing.md#guide-automatic-routing)。
38
+ 请重启宿主,无需重新输入密钥。如果从 stable 启动器或旧版本迁移,请参阅[更新指南](docs/guide/zh-CN/installation.md#guide-package-updates)。
56
39
 
57
40
  ## 文档
58
41
 
59
- - [使用指南](docs/guide/zh-CN.md):安装与移除、密钥、Hook、直接推荐、错误恢复
60
- - [安装与移除](docs/guide/zh-CN/installation.md#guide-installation)及 [CLI 配置](docs/guide/zh-CN/configuration.md#guide-cli-configuration):npm 全局安装、宿主注册、重启与信任批准
61
- - [模型与环境变量](docs/guide/zh-CN/configuration.md#guide-models-and-environment):六个默认配置与候选设置
62
- - [提供上下文](docs/guide/zh-CN/advanced.md#guide-context-delivery):加密消息与仓库 URL 的限制
63
- - [成本实测](docs/guide/zh-CN/benchmarks.md#guide-cost-benchmarks):README 翻译审阅的 token、换算成本与测量范围
64
- - [诊断与开发](docs/guide/zh-CN/advanced.md#guide-diagnostics-and-development):本地诊断报告与免费验证命令
65
-
66
- 韩语文档为正本,英语、简体中文和日语文档与其保持相同的使用范围。选择文档语言不会改变 CLI 或 MCP 的输出语言。
67
-
68
- ## 许可证
69
-
70
- [MIT](LICENSE)。
42
+ - [使用指南](docs/guide/zh-CN.md):设置、自动推荐、预算、统计与问题排查
43
+ - [候选模型设置](docs/guide/zh-CN/configuration.md#guide-models-and-environment)
44
+ - [传输范围](docs/guide/zh-CN/transmission.md):发送给 Decisions API 的信息
45
+ - [成本实测](docs/guide/zh-CN/benchmarks.md):在小规模 README 审阅测试中,子代理审阅与分类费用的 API 折算额降低约 52%~58%;这不是整体任务成本或订阅实际账单的降幅。
@@ -247,8 +247,9 @@ export class ContextRetries {
247
247
  return reject(changed);
248
248
  return { status: 'prepared', reason: 'caller_declared_independent', application: 'advisory_only', source_retry_id: retry_id, preparation_id,
249
249
  profile_id: profile.id, profile: structuredClone(profile), intent_provenance: 'caller_declared_not_verified', original_invocation: 'deny_returned_execution_not_observed', execution: 'not_observed',
250
+ spawn_application: { status: 'caller_review_required', reason: 'explicit_profile_arguments_required', required_fields: ['model', 'reasoning_effort'], on_unavailable: 'stop_and_report' },
250
251
  next_call: { tool: 'spawn_agent', arguments: { task_name, message: standalone_task, fork_turns: 'none', model: profile.model, reasoning_effort: profile.reasoning_effort } },
251
- next_step: 'Review and submit this separate native invocation only after a host-reported blocked outcome, under existing delegation authorization and unchanged host permissions. Original arguments were not rewritten; host execution is not observed by this server. Do not add history/role/resume overrides or reuse this preparation for another task. Preparation does not prove interception, permission approval, single execution or child execution.' };
252
+ next_step: 'Caller review means checking the arguments, not requesting new user approval. Only after a host-reported blocked outcome, review and submit the separate next_call.arguments under existing delegation authorization and unchanged host permissions. Include every returned argument, especially the explicit model and reasoning_effort; do not omit them or submit a model/effort-omitted replacement, which may trigger context recovery again. If explicit user choices or higher-priority host instructions require parent-model inheritance or forbid either profile field, stop and report that the prepared profile cannot be applied. Do not use another recovery ticket to bypass that restriction. If it is unclear whether a user or host constraint permits applying either field, stop and report the uncertainty rather than guessing or dropping fields. Task prose is not permission to override those constraints. Original arguments were not rewritten; host execution is not observed by this server. Do not add history/role/resume overrides or reuse this preparation for another task. Preparation does not prove interception, permission approval, single execution or child execution.' };
252
253
  }
253
254
  catch {
254
255
  return reject('fresh_delegation_unavailable');
@@ -124,7 +124,7 @@ export function createServer({ env: inputEnv = process.env } = {}) {
124
124
  return content(result);
125
125
  });
126
126
  server.registerTool('prepare_fresh_delegation', {
127
- description: 'Prepare a SEPARATE intentional Codex fresh-child call from a completed inherited recommendation. No classification or spawn. Use the original Hook retry_id on this process within five minutes. Only when the caller can declare independent work, no user-required inherited history, and complete standalone instructions. Never use for required/unknown history or to bypass permissions. Explicit choices and the original blocked invocation remain intact. Same task is idempotent; changed task conflicts.',
127
+ description: 'Prepare a SEPARATE intentional Codex fresh-child call from a completed inherited recommendation. No classification or spawn. Use the original Hook retry_id on this process within five minutes. Only when the caller can declare independent work, no user-required inherited history, and complete standalone instructions. Submit all returned next_call.arguments, including model and reasoning_effort, after caller review. Caller review checks arguments, not new user approval. If explicit user choices or higher-priority host instructions forbid either field, require parent-model inheritance, or their applicability is unclear, stop and report; do not submit a profile-omitted call or create another recovery ticket to bypass it. Never use for required/unknown history or to bypass permissions. Explicit choices and the original blocked invocation remain intact. Same task is idempotent; changed task conflicts.',
128
128
  annotations: { ...annotations, openWorldHint: false }, inputSchema: { retry_id: z.string().regex(/^[a-f0-9]{64}$/), task_name: z.string().min(1).max(128), standalone_task: z.string().min(1).max(12000),
129
129
  declaration: z.object({ independent_task: z.boolean(), same_task: z.boolean(), original_call_outcome: z.enum(['blocked', 'executed', 'unknown']), history_requirement: z.enum(['not_required', 'required', 'unknown']), standalone_context_complete: z.boolean() }).strict() }
130
130
  }, async ({ retry_id, task_name, standalone_task, declaration }, extra) => {
@@ -1 +1 @@
1
- export declare const VERSION = "0.1.15";
1
+ export declare const VERSION = "0.1.16";
@@ -1 +1 @@
1
- export const VERSION = '0.1.15';
1
+ export const VERSION = '0.1.16';
@@ -365,6 +365,20 @@ new native call under unchanged host permissions and existing delegation
365
365
  authorization. Neither preparation nor argument output proves dispatch/execution.
366
366
  The process does not own native spawn or guarantee caller compliance.
367
367
 
368
+ Starting with 0.1.16, `spawn_application.required_fields` identifies the explicit `model` and
369
+ `reasoning_effort` that must accompany the separate call. Copy all returned
370
+ `next_call.arguments`; omitting the profile can trigger a new context-recovery
371
+ attempt when the native body is opaque. `caller_review_required` means argument
372
+ review, not a new user approval. If user choices or higher-priority host rules
373
+ forbid either field (including required parent-model inheritance), stop and
374
+ report that the profile cannot be applied. Do not use another recovery ticket
375
+ to bypass the restriction. If applicability of a user/host constraint is unclear,
376
+ stop and report the uncertainty instead of guessing or dropping fields. The Hook
377
+ preserves explicit fields; it does not verify that a new call matches a preparation.
378
+ Strict whole-response consumers must allow this additive object.
379
+ This metadata is caller guidance, not enforcement,
380
+ permission or native execution evidence; task prose grants no override authority.
381
+
368
382
  The original five-minute lifetime and process/capacity boundaries apply. One
369
383
  immutable preparation digest binds task, declaration, profile and original
370
384
  reference; text/history are not persisted. Duplicate identical preparation is
@@ -153,6 +153,8 @@ After a defaults Hook blocks inherited application, the caller may use `prepare_
153
153
 
154
154
  The original inherited invocation stays blocked. Review the separate `next_call.arguments` and submit it under existing delegation authorization and normal host permission checks. It includes `fork_turns: "none"` and preserves model/effort choices. This is caller-declared intent, not verified user intent or execution evidence. Do not use it for required/unknown history, fixed roles, resume or unverified additional execution arguments. A reference binds one task; five-minute expiry, cancellation, policy/catalog changes and changes to the original invocation block preparation. It is not offered for nonblocking advisory paths. See the [contract and limits](../../SPAWN_CONTEXT.md#intentional-fresh-delegation).
155
155
 
156
+ The required-argument guidance below is available starting with 0.1.16. Pass every returned `next_call.arguments` field, including `model` and `reasoning_effort`; omitting them can send an opaque new call back into context recovery. `spawn_application.required_fields` guides caller checks and grants no permission. If user choices or higher-priority host rules require parent-model inheritance or prohibit either field, stop and report that the profile cannot be applied. Do not bypass the restriction with a new recovery ID. If a constraint’s applicability is unclear, stop and report the uncertainty. The Hook preserves explicit fields but does not verify that a new call matches a preparation.
157
+
156
158
  Use this only after the host reports the original call blocked. `original_call_outcome` values `executed` and `unknown` reject preparation. This is caller-declared, not server execution observation. Repeated identical preparation does not guarantee single child execution. The profile was selected from the original classification summary and must not be reused for a different task.
157
159
 
158
160
  <a id="guide-model-info-cache"></a>
@@ -1,43 +1,33 @@
1
1
  # Configuration and model candidates
2
2
 
3
- [한국어](../ko/configuration.md) · [English](../en/configuration.md) · [简体中文](../zh-CN/configuration.md) · [日本語](../ja/configuration.md)
3
+ [한국어](../ko/configuration.md) · **English** · [简体中文](../zh-CN/configuration.md) · [日本語](../ja/configuration.md)
4
4
 
5
- [Guide home](../en.md)
5
+ [Guide contents](../en.md)
6
6
 
7
- Before configuring, identify `CODEX_HOME` in the environment that launches Codex, or `CLAUDE_CONFIG_DIR` for Claude Code. Pass the same environment to installation, setup and statistics commands to select that account home.
8
-
9
- The default home may differ from the account home used by the host. Do not copy policies, ledgers, keys or trust records across homes. Preserve conflicting registrations and `existing_hook_not_owned` cases for review; see [Troubleshooting](troubleshooting.md).
10
-
11
- For manual MCP configuration, see [Advanced integration](advanced.md#guide-manual-mcp-setup).
12
-
13
- ## On this page
7
+ ## Contents
14
8
 
15
9
  - [Configuration file locations](#guide-host-config-locations)
16
- - [Configure with the CLI](#guide-cli-configuration)
10
+ - [CLI configuration](#guide-cli-configuration)
17
11
  - [Keys and restarting](#guide-keys-and-restart)
18
- - [Models and environment variables](#guide-models-and-environment)
19
- - [Node-version-independent launcher](#guide-stable-launcher)
12
+ - [Stable launcher](#guide-stable-launcher)
13
+ - [Model candidates](#guide-models-and-environment)
20
14
 
21
15
  <a id="guide-host-config-locations"></a>
22
16
 
23
17
  ## Configuration file locations
24
18
 
25
- | Host | User registration used by Aptly |
26
- |---|---|
27
- | Codex | `$CODEX_HOME/config.toml`; `~/.codex/config.toml` when `CODEX_HOME` is unset |
28
- | Claude Code | `mcpServers.aptly` in `~/.claude.json`; `.claude.json` inside `CLAUDE_CONFIG_DIR` when that directory is configured |
19
+ | Host | Default location | Alternate account home |
20
+ |---|---|---|
21
+ | Codex | `~/.codex/config.toml` | `$CODEX_HOME/config.toml` |
22
+ | Claude Code | `mcpServers.aptly` in `~/.claude.json` | `$CLAUDE_CONFIG_DIR/.claude.json` |
29
23
 
30
- Starting with 0.1.15, the fix lets MCP using the `@codex-home` policy select `~/.codex` under the OS user home when `CODEX_HOME` is absent. An explicit absolute path takes precedence; explicitly empty, relative or control-character-containing values remain rejected. Published 0.1.14 still requires the variable to be forwarded even for the default home. Custom account homes are not discovered automatically, so account managers must forward the correct `CODEX_HOME`. If a custom host omits this value, the default home’s policy and transmission scope apply; forward it to preserve account-specific policy.
24
+ Claude Hooks are in `~/.claude/settings.json` by default, or `$CLAUDE_CONFIG_DIR/settings.json` for another account. Pass the host's account environment to installation, setup, and statistics commands too. Do not copy policies, ledgers, keys, or trust records from another home.
31
25
 
32
- Claude Code stores Hooks in `~/.claude/settings.json` by default, or `$CLAUDE_CONFIG_DIR/settings.json` when `CLAUDE_CONFIG_DIR` is set. This is separate from MCP registration. If project `.mcp.json`, managed settings, or account-specific directories are in use, check the active entry in `/mcp` before editing or adding a registration.
26
+ Since 0.1.15, the Codex MCP `@codex-home` policy selects `~/.codex` when `CODEX_HOME` is absent. An explicit absolute path takes precedence; empty or relative paths and control characters are rejected. Custom homes are not discovered, so the default home's policy and transmission scope apply unless the administrator passes the value. See [advanced setup](advanced.md#guide-manual-mcp-setup) for manual, project, and managed registrations.
33
27
 
34
28
  <a id="guide-cli-configuration"></a>
35
29
 
36
- ## Configure with the CLI
37
-
38
- From 0.1.11, the first normal interactive `aptly set default` groups pending transmission reviews by client home. The recommendation is `excerpt`; Enter preserves an existing scope or selects `none` if unselected. See [transmission review](transmission.md#guide-transmission-scope). This review flow is not supported in 0.1.10, so update first.
39
-
40
- The `set` commands require 0.1.1 or later. Commands do not automatically switch existing launch paths. API-key setup accepts only the current package’s standard Node/server registration with a verified OS-source-compatible runtime. Custom wrappers, older versions, and other installation prefixes are rejected with `credential_launcher_unverified`; explicitly switch the registration or upgrade it before trying again.
30
+ ## CLI configuration
41
31
 
42
32
  ```sh
43
33
  aptly set default
@@ -45,72 +35,71 @@ aptly set env APTLY_CODEX_MODELS
45
35
  aptly set env OPENAI_API_KEY
46
36
  ```
47
37
 
48
- The first command registers Claude Code and Codex and adds missing default environment settings. It preserves existing launch commands, environment whitelists, providers, custom candidates, and advisory policies. The second prompts for a value with hidden input and changes only the named variable. The third stores the API key in the OS credential store and connects it to the selected host at startup. Do not pass values as command arguments.
49
-
50
- Both hosts are selected by default. Use `--client codex`, `--client claude`, or `--client all` to select targets. For example, enter a JSON string such as `["haiku","sonnet","opus"]` for Claude candidates.
38
+ `set default` adds missing registrations and defaults and reviews the [transmission scope](transmission.md). It preserves existing commands, environment, provider, candidates, and advisory policy. `set env` accepts hidden input and changes only the named variable. Both hosts are targeted by default; select with `--client codex|claude|all`.
51
39
 
52
40
  ```sh
53
41
  aptly set env APTLY_CLAUDE_MODELS --client claude
54
42
  ```
55
43
 
56
- Use explicit `--stdin` for automation. This is a public-variable example; never put a real key in a `printf` command or shell history.
44
+ Enter candidates as a JSON array string such as `["haiku","sonnet","opus"]`. For automation use `--stdin`. Do not put real keys in `printf` or shell history.
57
45
 
58
46
  ```sh
59
47
  printf '%s\n' '["gpt-6.1-terra"]' | aptly set env APTLY_CODEX_MODELS --stdin
60
48
  ```
61
49
 
62
- Allowed public keys are `ROUTER_PROVIDER` (`fixture` or `decisions`), `APTLY_CLAUDE_MODELS`, `APTLY_CODEX_MODELS`, `CLAUDE_MODELS`, `CODEX_MODELS`, and `APTLY_MODEL_INFO_PATH`. Candidates must be JSON array strings of supported models. Invalid values, duplicates, and primary-name/alias conflicts are rejected. `[]` disables that host; a model-cache path must be absolute and inside a private directory. Managed ledger and Hook-policy paths cannot be changed through this command.
50
+ Generally allowed keys are `ROUTER_PROVIDER` (`fixture`/`decisions`), `APTLY_CLAUDE_MODELS`, `APTLY_CODEX_MODELS`, aliases `CLAUDE_MODELS` and `CODEX_MODELS`, and `APTLY_MODEL_INFO_PATH`. The model cache path must be absolute and inside a private directory. This command does not change administrative ledger or policy paths.
51
+
52
+ <a id="guide-keys-and-restart"></a>
53
+
54
+ ## Keys and restarting
63
55
 
64
- API keys are stored through macOS Keychain, an installed Linux `secret-tool`, or Windows Credential Manager. The Windows backend uses PowerShell and Win32 Generic credentials in the current-user scope, with a limit of 2,560 UTF-8 bytes. Windows CI verified synthetic key storage, lookup, update and deletion, Unicode paths, isolated host configuration, key references, and ACL preservation. It did not run actual Claude Code or Codex sessions on Windows. Unavailable credential stores return an error; there is no plaintext-file fallback. Keys use separate host accounts, while MCP files contain only `APTLY_SECRET_BACKEND=os` and `APTLY_SECRET_CLIENT` references. Once the OS source is selected, a missing or unreadable key does not silently fall back to another environment key. `set default` preserves existing wrapper/environment authentication; running `set env OPENAI_API_KEY` explicitly selects OS-store authentication.
56
+ `aptly set env OPENAI_API_KEY` stores each host's key in macOS Keychain, Linux `secret-tool`, or Windows Credential Manager and registers only a store reference with MCP. An unavailable or locked store produces an error; Aptly does not fall back to a plaintext file or another environment key. See [credential store errors](troubleshooting.md).
65
57
 
66
- Results contain host statuses and fixed error codes, never key values. Inspect each host when the result is `partial`. `credential_store_failed` requires checking store access/support; `credential_rollback_failed` requires checking whether the previous key was restored. A failed host restores its old key where possible. Do not interpret success on another host as an atomic success across all hosts.
58
+ Host subscription login and the API key are separate. Do not record keys in command arguments, configuration JSON, requests, or repositories. For direct delivery through a secure MCP execution environment, see [manual setup](advanced.md#guide-key-environment).
67
59
 
68
- A store timeout or malformed acknowledgement may occur after the OS has written the new value. On failure, Aptly attempts to restore the previous value (or remove the new entry if none existed), then reads it back. `credential_rollback_failed` is added to the original failure codes when recovery cannot be confirmed; do not assume either key is active. Check the OS credential store before retrying. This is best-effort recovery, not an atomic transaction across processes or hosts.
60
+ Key storage is allowed only for standard launchers verified as compatible. Custom wrappers are preserved but may be rejected with `credential_launcher_unverified`. For `partial`, check each host's error. On a storage failure Aptly attempts to restore the previous key; if `credential_rollback_failed` occurs, check the active key in the OS store before retrying. Changes across multiple hosts are not atomic.
69
61
 
70
- Restart MCP, then inspect `provider`, candidates, and `credential_status` with `get_routing_capabilities`. `os_store` means a key was loaded, not that the API authenticated it. Default and public-variable setup continue to preserve custom wrappers. API-key setup does not change host settings for an unverified launch path and restores that host's previous key where possible if storage was already attempted. Do not assume a new key automatically takes effect through an existing wrapper. These commands do not bypass Codex `/hooks` trust or host permissions.
62
+ Restart MCP after changes and check candidates, provider, and `credential_status` with `get_routing_capabilities`. `os_store` means the key was read, not that its API validity was verified. Codex `/hooks` approval is also required.
71
63
 
72
64
  <a id="guide-stable-launcher"></a>
73
65
 
74
- ## Node-version-independent launcher
66
+ ## Launcher resilient to Node version changes
75
67
 
76
- This option is available starting with 0.1.14. Explicit `--launcher stable` on POSIX (macOS/Linux) preserves an executable and Aptly runtime dependencies in private storage outside versioned Node directories. It does not copy Node: an installed supported Node.js 24+ is still required. After the original Node and npm package directory disappear, the preserved launcher can locate another supported installation. Bare `node` cannot offer that guarantee when a GUI host lacks it in PATH.
68
+ Default registrations use an absolute Node path. On macOS and Linux, `stable` is available for frequent Node version changes (since 0.1.14). It preserves Aptly and dependencies outside the Node directory and searches for another supported Node.js 24+. It does not include Node and does not support Windows.
77
69
 
78
- Default/automatic and existing registrations keep direct Node paths. Use `aptly setup --client all --launcher stable` only for new registrations. For existing ones, inspect then migrate explicitly as below. Use `--client claude` for Claude and select the intended `CODEX_HOME` for each Codex account.
70
+ For a new registration, use `aptly setup --client all --launcher stable`. For an existing one, review the dry run before migration. Pass the appropriate home environment for other accounts and use `--client claude` for Claude.
79
71
 
80
72
  ```sh
81
73
  aptly setup --client codex --migrate-launcher --launcher stable --dry-run
82
74
  aptly setup --client codex --migrate-launcher --launcher stable
83
75
  ```
84
76
 
85
- Add `--include-existing` only after reviewing an eligible preserved standard launcher. Modified/custom launchers and statistics Hooks are never adopted automatically. Migration updates owned MCP and observer targets together, preserving collection state, native metadata consent, keys, policies, ledgers and statistics history. Review new Codex Hooks with `/hooks`; trust is never approved automatically.
86
-
87
- Resolution tries the installer Node, standard locations, numeric release directories in the default `~/.nvm/versions/node`, then safe absolute PATH entries. It does not promise the newest Node; symlink/shim-based managers may be rejected even with PATH; only qualified real executable paths are supported. No shell profile, npm or network download runs at startup. Stable mode deliberately removes `NODE_OPTIONS`, `NODE_PATH` and `NODE_REPL_EXTERNAL_MODULE` to avoid inheriting common Node startup overrides; use separate certificate settings such as `NODE_EXTRA_CA_CERTS` when needed. Runtime closures requiring native addons are refused. Missing runtime or failed integrity stops MCP with a fixed error; observers stay silent and best-effort.
88
-
89
- Normal global npm installations are the primary supported source. Redirected/writable ancestors and dependencies hoisted outside a local package cannot be verified and are refused. Windows retains direct mode and rejects the stable option. Stable mode remains sticky across later setup/migration without the flag. Run `aptly update` from the actual global npm CLI; explicitly migrate to select a new Aptly snapshot. Remove retains old/shared snapshots because other homes or running processes may still use them. Doctor observes snapshot metadata, not full execution, authentication or reload readiness.
77
+ After updating global Aptly, run the same command to update the preserved copy. Ordinary `setup` does not replace it; an old copy reports `stable_snapshot_outdated`. Migration updates owned MCP and statistics observers together. Modified launchers and Hooks are not adopted. To target a preserved standard registration, review it and add `--include-existing`. Approve changed Codex Hooks again in `/hooks`.
90
78
 
91
- Plain setup does not silently replace an existing snapshot. Older selected versions report `stable_snapshot_outdated` and explicit migration guidance. An exact-owned stable reference can explicitly migrate from a missing, damaged or older-format snapshot to verified source from the current CLI. A corrupt same-generation directory or incomplete lock is never overwritten/deleted automatically: inspect only that state after checking writers and other homes. Modified/custom registration is not adopted as product-owned.
79
+ <details>
80
+ <summary>Launcher limits and recovery</summary>
92
81
 
93
- Stable migration updates owned observers together; legacy direct-to-direct migration may still need separate observer refresh (`statistics_observer_migration_required`). Full snapshot checks during setup and startup add I/O overhead. Bounded runtime probes do not provide a hard wall-clock bound for all filesystem operations. This is not a sandbox against same-user programs or worker threads.
82
+ The search order is installation Node, standard paths, default `~/.nvm/versions/node`, then safe absolute PATH entries. Selection of the newest version and support for custom NVM_DIR, shims, or symlink-based managers are not guaranteed. Shell profiles, npm, and downloads are not executed. `NODE_OPTIONS`, `NODE_PATH`, and `NODE_REPL_EXTERNAL_MODULE` are removed; review `NODE_EXTRA_CA_CERTS` and similar settings for additional CAs.
94
83
 
95
- <a id="guide-keys-and-restart"></a>
84
+ Unverifiable sources such as writable ancestor paths, externally hoisted dependencies, and native add-ons are rejected. Integrity checks add I/O cost, and the search budget is not a hard timeout for all file I/O. This is not sandboxing or publisher signature verification. On failure MCP stops with an error and the statistics observer exits quietly.
96
85
 
97
- ## Keys and restarting
86
+ If ownership matches, a missing, damaged, or older-format copy can be explicitly migrated from a new CLI source. Damaged same-generation copies and incomplete locks are not automatically overwritten or deleted. Old copies are not automatically deleted because other homes or processes may reference them. Check writers and references before reviewing the state. Migration between direct Node launchers may require a separate statistics update (`statistics_observer_migration_required`).
98
87
 
99
- Pass the classification key, `OPENAI_API_KEY`, through a secure environment or credential launcher to the MCP process. It is separate from host subscription login. Never write key values into command arguments, requests, configuration files, source, logs, or temporary files.
88
+ </details>
100
89
 
101
90
  <a id="guide-models-and-environment"></a>
102
91
 
103
92
  ## Models and environment variables
104
93
 
105
- There are six default profiles. Tiers are Aptly operational presets, not statements that the two providers' models have equivalent capabilities.
94
+ Tiers are task presets and do not imply equivalent model performance across providers.
106
95
 
107
- | Tier | Claude Code | Codex | Typical tasks |
96
+ | Tier | Claude Code | Codex | Example tasks |
108
97
  |---|---|---|---|
109
- | simple | `haiku` | `gpt-6-luna` / `max` | Extraction, format conversion, or small mechanical edits |
110
- | routine | `sonnet` | `gpt-6.1-terra` / `high` | Context-aware writing or translation, or clearly scoped implementation |
111
- | deep | `opus` | `gpt-6.1-sol` / `medium` | Cross-component debugging, architectural judgment, or in-depth review |
98
+ | simple | `haiku` | `gpt-6-luna` / `max` | Extraction, format conversion, small mechanical edits |
99
+ | routine | `sonnet` | `gpt-6.1-terra` / `high` | Context-aware writing, translation, scoped implementation |
100
+ | deep | `opus` | `gpt-6.1-sol` / `medium` | Complex debugging, design decisions, deep review |
112
101
 
113
- MCP `env` values are strings, so candidate arrays must also be passed as JSON strings.
102
+ MCP `env` values are strings, so pass candidate arrays as JSON strings.
114
103
 
115
104
  ```json
116
105
  {
@@ -121,12 +110,8 @@ MCP `env` values are strings, so candidate arrays must also be passed as JSON st
121
110
  }
122
111
  ```
123
112
 
124
- When unset, the defaults above apply; `[]` disables recommendations for that client. Empty strings, duplicates, unsupported models, and malformed JSON are errors. `CLAUDE_MODELS` and `CODEX_MODELS` are supported aliases, but setting both the primary name and its alias for the same provider is an error. Candidate configuration does not override existing choices or certify model access for an account.
125
-
126
- `aptly set default` preserves candidates and aliases already in MCP `env`, Codex `env_vars` declarations, and inherited candidates visible to the current CLI for Claude. It adds default candidates only for a model family with neither name configured. A Codex passthrough is preserved even when its value is unavailable in the current terminal; inherited values are not copied into configuration files. The CLI gives a static `env` value precedence over an inherited value with the same name when validating effective settings. Catalog validation remains in place, so conflicting aliases or malformed values reject the configuration change. Check the final candidates in the restarted MCP separately.
127
-
128
- ## Related topics
113
+ When omitted, the defaults above apply; `[]` disables recommendations for that host. Empty strings, duplicates, unsupported models, and invalid JSON are errors. `CLAUDE_MODELS` and `CODEX_MODELS` are aliases, but setting both the primary name and alias for one provider is an error. Candidate settings do not overwrite existing selections or verify account access to models.
129
114
 
130
- [Installation and updates](installation.md) · [Automatic recommendations](routing.md) · [Decisions API transmission](transmission.md) · [Advanced MCP integration and development](advanced.md) · [Troubleshooting](troubleshooting.md)
115
+ `set default` preserves existing candidates, aliases, and pass-through declarations and adds defaults only for missing model families. It does not overwrite inherited Codex candidates even if the current CLI cannot see them. Check final candidates after restarting MCP.
131
116
 
132
- [Guide home](../en.md)
117
+ [Installation](installation.md) · [Troubleshooting](troubleshooting.md) · [Guide contents](../en.md)