aptly 0.1.20 → 0.1.22
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 +3 -10
- package/README.ja.md +3 -10
- package/README.md +3 -10
- package/README.zh-CN.md +3 -10
- package/dist/bin/aptly.js +32 -8
- package/dist/src/automatic-hook.js +4 -4
- package/dist/src/cli-help.js +4 -2
- package/dist/src/context-retry.js +1 -1
- package/dist/src/core.d.ts +2 -2
- package/dist/src/core.js +39 -9
- package/dist/src/doctor.d.ts +1 -0
- package/dist/src/doctor.js +1 -1
- package/dist/src/provider.js +9 -3
- package/dist/src/server.js +16 -2
- package/dist/src/setup.d.ts +2 -1
- package/dist/src/setup.js +64 -27
- package/dist/src/stable-runtime.d.ts +4 -0
- package/dist/src/stable-runtime.js +119 -18
- package/dist/src/update.d.ts +19 -0
- package/dist/src/update.js +84 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/docs/guide/en/configuration.md +16 -1
- package/docs/guide/en/installation.md +40 -3
- package/docs/guide/ja/configuration.md +16 -1
- package/docs/guide/ja/installation.md +40 -3
- package/docs/guide/ko/configuration.md +16 -1
- package/docs/guide/ko/installation.md +40 -3
- package/docs/guide/zh-CN/configuration.md +16 -1
- package/docs/guide/zh-CN/installation.md +40 -3
- package/package.json +1 -1
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
## Contents
|
|
8
8
|
|
|
9
9
|
- [Installation](#guide-installation)
|
|
10
|
+
- [Verify setup](#guide-verify-setup)
|
|
11
|
+
- [Windows PowerShell](#guide-windows-powershell)
|
|
10
12
|
- [Allow npm install scripts](#guide-npm-install-scripts)
|
|
11
13
|
- [Package updates](#guide-package-updates)
|
|
12
14
|
- [New-version notifications](#guide-version-notifications)
|
|
@@ -32,6 +34,40 @@ The install script registers MCP and Hooks in host directories that already exis
|
|
|
32
34
|
|
|
33
35
|
If you use `CODEX_HOME` or `CLAUDE_CONFIG_DIR`, set the same value for installation and setup. Aptly keeps your existing settings and launcher wrappers. See [account homes and keys](configuration.md).
|
|
34
36
|
|
|
37
|
+
<a id="guide-verify-setup"></a>
|
|
38
|
+
|
|
39
|
+
## Verify setup
|
|
40
|
+
|
|
41
|
+
Check the setup plan and key registration readiness for the selected host. Replace `codex` with `claude` for Claude Code. On Windows PowerShell, use `aptly.cmd`.
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
aptly setup --check --client codex
|
|
45
|
+
aptly set env OPENAI_API_KEY --client codex --check
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Both commands leave files unchanged. `setup --check` checks the setup plan at the time you run it. The key check reports registration and Linux store readiness without reading or storing a key or testing API authentication. Use the running host to verify its behavior separately. Exit code `0` means the check found no error. Exit code `1` indicates a partial failure or command error. Inspect each host’s `status` and `codes` in the JSON output.
|
|
49
|
+
|
|
50
|
+
After setup, restart the host and MCP; in Codex, review and trust the Hook in `/hooks`. [Recommendation and Hook argument updates](routing.md#guide-automatic-routing) are distinct observations; neither proves that a child ran or completed. Check execution and completion separately in the host. See [troubleshooting](troubleshooting.md).
|
|
51
|
+
|
|
52
|
+
<a id="guide-windows-powershell"></a>
|
|
53
|
+
|
|
54
|
+
## Windows PowerShell
|
|
55
|
+
|
|
56
|
+
Open PowerShell on your signed-in Windows desktop and run the following commands. This example uses `npm.cmd` and `aptly.cmd` directly. `--ignore-scripts` skips automatic registration during installation, so run `set default` to register Aptly.
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
npm.cmd install -g aptly@latest --ignore-scripts
|
|
60
|
+
aptly.cmd --version
|
|
61
|
+
aptly.cmd set default --client codex
|
|
62
|
+
aptly.cmd set env OPENAI_API_KEY --client codex
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
For Claude Code, replace `codex` with `claude` in both setup commands. Restart the host. In Codex, open `/hooks` and approve the new Aptly Hook.
|
|
66
|
+
|
|
67
|
+
If you chose an install location with `--prefix`, use the same location when updating. If PowerShell cannot find `aptly.cmd`, run it using its full path at that location.
|
|
68
|
+
|
|
69
|
+
Aptly stores the API key in Windows Credential Manager. If the store is unavailable over SSH, register the key from your signed-in desktop. Seeing Aptly in the host’s MCP list confirms registration. Key loading and Decisions API responses need separate checks. See [credential troubleshooting](troubleshooting.md#guide-launcher-recovery) if key registration fails.
|
|
70
|
+
|
|
35
71
|
<a id="guide-npm-install-scripts"></a>
|
|
36
72
|
|
|
37
73
|
## Allow npm install scripts
|
|
@@ -55,13 +91,14 @@ Stop the relevant hosts, MCP servers, and CLI processes, then run from a verifie
|
|
|
55
91
|
|
|
56
92
|
```sh
|
|
57
93
|
aptly update
|
|
58
|
-
aptly setup --client all
|
|
59
94
|
aptly --version
|
|
60
95
|
```
|
|
61
96
|
|
|
62
|
-
`update`
|
|
97
|
+
`update` updates the package in the same npm prefix without running install scripts. On macOS and Linux, the new CLI then attempts to migrate unchanged Aptly-owned Codex and Claude Code registrations in the configuration homes selected by the current environment to managed npx. Direct and stable registrations are eligible; custom or unmanaged registrations and absent registrations are left alone. Check package and per-host migration results separately: one host can succeed while another fails. On Windows, the command updates only the package.
|
|
98
|
+
|
|
99
|
+
The existing 0.1.21 updater only updates the package on its first run. Run `aptly update` again with the newly installed CLI to attempt migration of existing registrations; setup is not required for them. Use `aptly setup` for a new registration if needed. Hooks, credentials, and transmission choices are preserved subject to ownership checks. Trust changed Codex Hooks again in `/hooks` and restart the host. Review the [transmission scope](transmission.md) and explicitly choose it if needed.
|
|
63
100
|
|
|
64
|
-
|
|
101
|
+
On npm errors or local/source installations, use the manual installation command above. npm configuration with `dry-run=true` is rejected. If the old Node path has disappeared, follow [launcher recovery](troubleshooting.md#guide-launcher-recovery).
|
|
65
102
|
|
|
66
103
|
<details>
|
|
67
104
|
<summary>Upgrade from a pre-0.1.2 ledger</summary>
|
|
@@ -74,7 +74,7 @@ aptly setup --client codex --migrate-launcher --launcher stable --dry-run
|
|
|
74
74
|
aptly setup --client codex --migrate-launcher --launcher stable
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
stable を使い続ける場合は、グローバル Aptly の更新後に同じコマンドで保存コピーを更新してください。通常の `setup` はコピーを置き換えず、古いコピーは `stable_snapshot_outdated` で通知します。移行時は所有する MCP・統計オブザーバーを併せて更新します。変更されたランチャー・Hook は引き継ぎません。保持された標準登録が対象なら確認後に `--include-existing` を追加してください。Codex の変更された Hook は `/hooks` で再承認します。
|
|
78
78
|
|
|
79
79
|
<details>
|
|
80
80
|
<summary>ランチャーの制限と復旧</summary>
|
|
@@ -87,6 +87,21 @@ aptly setup --client codex --migrate-launcher --launcher stable
|
|
|
87
87
|
|
|
88
88
|
</details>
|
|
89
89
|
|
|
90
|
+
### 管理型 npx ランチャー
|
|
91
|
+
|
|
92
|
+
macOS・Linux では引数なしの `aptly update` がパッケージを更新した後、現在の環境で選択された設定ホームにある、変更されていない Aptly 所有の Codex・Claude Code 登録を管理型 npx に移行を試みます。direct・stable 登録が対象で、カスタム・非管理の登録や存在しない登録はそのままです。失敗はホスト別に報告され、一方が成功しても他方は失敗する場合があります。0.1.21 からの初回 `aptly update` はパッケージのみ更新するため、新しい CLI で再実行してください。Windows では引数なしの更新はパッケージのみ更新します。
|
|
93
|
+
|
|
94
|
+
npm を同梱する Node.js 24 以上が必要です。インストール済みパッケージと依存関係の固定スナップショットを保存し、分離された作業ディレクトリとクリーンな npm 設定で `npx` をオフライン実行します。MCP 起動時にレジストリへアクセスしたり `latest` を選択したりしません。
|
|
95
|
+
|
|
96
|
+
単一ホストを明示的に移行するには dry run を確認してから実行してください。Claude Code では `codex` を `claude` に置き換えます。
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
aptly setup --client codex --migrate-launcher --launcher npx --dry-run
|
|
100
|
+
aptly setup --client codex --migrate-launcher --launcher npx
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`aptly update --client codex --launcher npx` も単一ホストが対象です。Windows での明示的な管理型移行には対応しません。パッケージと移行の結果を個別に確認してください。Hook と資格情報は所有権確認を条件に保持します。変更された Codex Hook を `/hooks` で再承認し、ホストを再起動してください。
|
|
104
|
+
|
|
90
105
|
<a id="guide-models-and-environment"></a>
|
|
91
106
|
|
|
92
107
|
## モデルと環境変数
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
## この文書の目次
|
|
8
8
|
|
|
9
9
|
- [インストール](#guide-installation)
|
|
10
|
+
- [設定の確認](#guide-verify-setup)
|
|
11
|
+
- [Windows PowerShell](#guide-windows-powershell)
|
|
10
12
|
- [npm インストールスクリプトの許可](#guide-npm-install-scripts)
|
|
11
13
|
- [パッケージの更新](#guide-package-updates)
|
|
12
14
|
- [新しいバージョンの通知](#guide-version-notifications)
|
|
@@ -32,6 +34,40 @@ aptly --version
|
|
|
32
34
|
|
|
33
35
|
`CODEX_HOME` や `CLAUDE_CONFIG_DIR` を使う場合は、インストールと設定の両方で同じ値を指定してください。Aptly は既存の設定と実行ラッパーを維持します。詳しくは[アカウントホーム・キー設定](configuration.md)を参照してください。
|
|
34
36
|
|
|
37
|
+
<a id="guide-verify-setup"></a>
|
|
38
|
+
|
|
39
|
+
## 設定の確認
|
|
40
|
+
|
|
41
|
+
次のコマンドで、選択したホストの設定計画とキー登録の準備状態を確認してください。Claude Code の場合は `codex` を `claude` に変更してください。Windows PowerShell では `aptly.cmd` を使用してください。
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
aptly setup --check --client codex
|
|
45
|
+
aptly set env OPENAI_API_KEY --client codex --check
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
どちらのコマンドもファイルを変更しません。`setup --check` は通常の設定計画をその時点で確認するもので、実行中のホストは検証しません。キーの `--check` は登録と Linux の保存先の準備状態を確認しますが、キーの読み取り・保存や API 認証の検証は行いません。終了コード `0` は確認でエラーがなかったことを示し、`1` は部分的な失敗またはコマンドエラーを示します。JSON 出力のホストごとの `status` と `codes` を確認してください。
|
|
49
|
+
|
|
50
|
+
設定後はホストと MCP を再起動し、Codex では `/hooks` で Hook を確認・信頼してください。[推薦と Hook の引数変更](routing.md#guide-automatic-routing)は別の観測であり、どちらも子エージェントの実行や完了を証明しません。実行と完了はホストで別途確認してください。[トラブルシューティング](troubleshooting.md)も参照してください。
|
|
51
|
+
|
|
52
|
+
<a id="guide-windows-powershell"></a>
|
|
53
|
+
|
|
54
|
+
## Windows PowerShell
|
|
55
|
+
|
|
56
|
+
サインイン済みの Windows デスクトップで PowerShell を開き、次のコマンドを実行してください。この例では `npm.cmd` と `aptly.cmd` を直接実行します。`--ignore-scripts` でインストール中の自動登録を省くため、`set default` で登録してください。
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
npm.cmd install -g aptly@latest --ignore-scripts
|
|
60
|
+
aptly.cmd --version
|
|
61
|
+
aptly.cmd set default --client codex
|
|
62
|
+
aptly.cmd set env OPENAI_API_KEY --client codex
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Claude Code を設定する場合は、二つの設定コマンドの `codex` を `claude` に置き換えてください。ホストを再起動してください。Codex では `/hooks` を開き、新しい Aptly Hook を承認してください。
|
|
66
|
+
|
|
67
|
+
`--prefix` でインストール先を指定した場合は、更新時も同じ場所を指定してください。PowerShell で `aptly.cmd` が見つからない場合は、その場所にある `aptly.cmd` をフルパスで実行してください。
|
|
68
|
+
|
|
69
|
+
API キーは Windows の資格情報マネージャーに保存されます。SSH で資格情報ストアを利用できない場合は、サインイン済みのデスクトップでキーを登録してください。ホストに MCP が表示されても、キーを読み込めたことや Decisions API が応答したことを意味するわけではありません。キーの登録に失敗した場合は[資格情報のトラブルシューティング](troubleshooting.md#guide-launcher-recovery)を参照してください。
|
|
70
|
+
|
|
35
71
|
<a id="guide-npm-install-scripts"></a>
|
|
36
72
|
|
|
37
73
|
## npm インストールスクリプトの許可
|
|
@@ -55,13 +91,14 @@ aptly setup --client all
|
|
|
55
91
|
|
|
56
92
|
```sh
|
|
57
93
|
aptly update
|
|
58
|
-
aptly setup --client all
|
|
59
94
|
aptly --version
|
|
60
95
|
```
|
|
61
96
|
|
|
62
|
-
`update`
|
|
97
|
+
`update` はインストールスクリプトを実行せず、同じ npm prefix のパッケージを更新します。macOS・Linux では、新しい CLI が現在の環境で選択された設定ホームにある、変更されていない Aptly 所有の Codex・Claude Code 登録を管理型 npx に移行を試みます。direct・stable 登録が対象で、カスタム・非管理の登録や存在しない登録はそのままです。パッケージとホスト別の移行結果を個別に確認してください。一方が成功しても他方は失敗する場合があります。Windows ではパッケージのみ更新します。
|
|
98
|
+
|
|
99
|
+
0.1.21 のアップデータ は初回にパッケージのみ更新します。新しい CLI で `aptly update` を再実行すると既存登録の移行を試みます。既存登録に setup は不要です。新規登録には必要に応じて `aptly setup` を使えます。Hook・資格情報・送信範囲の選択は所有権確認を条件に保持します。変更された Codex Hook を `/hooks` で再承認し、ホストを再起動してください。[送信範囲](transmission.md)を確認し、必要に応じて明示的に選択してください。
|
|
63
100
|
|
|
64
|
-
|
|
101
|
+
npm エラーやローカル・ソースインストールでは上記の手動インストールコマンドを使ってください。`dry-run=true` の npm 設定は拒否します。以前の Node パスがなくなった場合は[実行パスの復旧](troubleshooting.md#guide-launcher-recovery)を参照してください。
|
|
65
102
|
|
|
66
103
|
<details>
|
|
67
104
|
<summary>0.1.2 より前の台帳からのアップグレード</summary>
|
|
@@ -74,7 +74,7 @@ aptly setup --client codex --migrate-launcher --launcher stable --dry-run
|
|
|
74
74
|
aptly setup --client codex --migrate-launcher --launcher stable
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
전역 Aptly 업데이트
|
|
77
|
+
stable을 계속 사용하는 경우 전역 Aptly 업데이트 후 같은 명령으로 보존 사본을 갱신하십시오. 일반 `setup`은 사본을 교체하지 않으며 오래된 사본은 `stable_snapshot_outdated`로 알립니다. 전환은 소유한 MCP·통계 관찰자를 함께 갱신합니다. 수정된 실행기·Hook은 인수하지 않습니다. 보존된 표준 등록이 대상이면 검토 후 `--include-existing`을 추가하십시오. Codex의 변경된 Hook은 `/hooks`에서 다시 승인합니다.
|
|
78
78
|
|
|
79
79
|
<details>
|
|
80
80
|
<summary>실행기 제한과 복구</summary>
|
|
@@ -87,6 +87,21 @@ aptly setup --client codex --migrate-launcher --launcher stable
|
|
|
87
87
|
|
|
88
88
|
</details>
|
|
89
89
|
|
|
90
|
+
### 관리형 npx 실행기
|
|
91
|
+
|
|
92
|
+
macOS·Linux에서 인자 없이 실행한 `aptly update`는 패키지 업데이트 후 현재 환경에서 선택된 설정 홈의 변경되지 않은 Aptly 소유 Codex·Claude Code 등록을 관리형 npx로 전환을 시도합니다. direct와 stable 등록이 대상이며 사용자 지정·비관리 등록과 미등록 호스트는 그대로 둡니다. 호스트별 실패를 따로 보고하며 한 호스트가 성공해도 다른 호스트는 실패할 수 있습니다. 0.1.21에서는 첫 `aptly update`가 패키지만 갱신하므로 새 CLI로 다시 실행하십시오. Windows의 기본 업데이트는 패키지만 갱신합니다.
|
|
93
|
+
|
|
94
|
+
번들 npm이 포함된 Node.js 24 이상이 필요합니다. 설치된 패키지와 의존성의 고정 사본을 보존하고 전용 작업 디렉터리와 정리된 npm 설정에서 `npx`를 오프라인으로 실행합니다. MCP 시작 시 레지스트리에 접근하거나 `latest`를 선택하지 않습니다.
|
|
95
|
+
|
|
96
|
+
한 호스트를 명시적으로 전환하려면 dry run을 검토한 후 실행하십시오. Claude Code는 `codex`를 `claude`로 바꾸십시오.
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
aptly setup --client codex --migrate-launcher --launcher npx --dry-run
|
|
100
|
+
aptly setup --client codex --migrate-launcher --launcher npx
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`aptly update --client codex --launcher npx`도 단일 호스트를 대상으로 합니다. 명시적 관리형 전환은 Windows에서 지원하지 않습니다. 패키지와 전환 결과를 각각 확인하십시오. Hook·자격 정보는 소유권 확인 범위에서 보존합니다. 변경된 Codex Hook은 `/hooks`에서 다시 승인하고 호스트를 재시작하십시오.
|
|
104
|
+
|
|
90
105
|
<a id="guide-models-and-environment"></a>
|
|
91
106
|
|
|
92
107
|
## 모델과 환경변수
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
## 이 문서의 목차
|
|
8
8
|
|
|
9
9
|
- [설치](#guide-installation)
|
|
10
|
+
- [설정 확인](#guide-verify-setup)
|
|
11
|
+
- [Windows PowerShell](#guide-windows-powershell)
|
|
10
12
|
- [npm 설치 스크립트 허용](#guide-npm-install-scripts)
|
|
11
13
|
- [패키지 업데이트](#guide-package-updates)
|
|
12
14
|
- [새 버전 알림](#guide-version-notifications)
|
|
@@ -32,6 +34,40 @@ aptly --version
|
|
|
32
34
|
|
|
33
35
|
`CODEX_HOME`이나 `CLAUDE_CONFIG_DIR`을 사용한다면 설치와 설정 명령을 실행할 때 같은 값을 지정하십시오. Aptly는 기존 설정과 실행 래퍼를 그대로 둡니다. [계정 홈·키 설정](configuration.md)을 참고하십시오.
|
|
34
36
|
|
|
37
|
+
<a id="guide-verify-setup"></a>
|
|
38
|
+
|
|
39
|
+
## 설정 확인
|
|
40
|
+
|
|
41
|
+
다음 명령으로 선택한 호스트의 설정 계획과 키 등록 준비 상태를 점검하십시오. Claude Code는 `codex`를 `claude`로 바꾸십시오. Windows PowerShell에서는 `aptly.cmd`를 사용하십시오.
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
aptly setup --check --client codex
|
|
45
|
+
aptly set env OPENAI_API_KEY --client codex --check
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
두 명령은 파일을 변경하지 않습니다. `setup --check`는 일반 설정 계획을 실행 시점에 점검하는 명령이며 실행 중인 호스트를 확인하지 않습니다. 키의 `--check`는 등록과 Linux 저장소 준비 상태를 점검하지만 키를 읽거나 저장하지 않고 API 인증도 검증하지 않습니다. 종료 코드 `0`은 점검에 오류가 없다는 뜻이고 `1`은 부분 실패 또는 명령 오류입니다. JSON 출력에서 호스트별 `status`와 `codes`를 확인하십시오.
|
|
49
|
+
|
|
50
|
+
설정 후 호스트와 MCP를 재시작하고 Codex에서는 `/hooks`에서 Hook을 검토·신뢰하십시오. [추천과 Hook 인자 변경 관찰](routing.md#guide-automatic-routing)은 구분되며, 어느 쪽도 자식 실행이나 완료를 증명하지 않습니다. 실제 실행과 완료는 호스트에서 별도로 확인하십시오. [문제 해결](troubleshooting.md)을 참고하십시오.
|
|
51
|
+
|
|
52
|
+
<a id="guide-windows-powershell"></a>
|
|
53
|
+
|
|
54
|
+
## Windows PowerShell
|
|
55
|
+
|
|
56
|
+
로그인한 Windows 데스크톱에서 PowerShell을 열고 다음 명령을 실행하십시오. 예제에서는 `npm.cmd`와 `aptly.cmd`를 직접 실행합니다. `--ignore-scripts`를 쓰면 설치 중 자동 등록을 건너뛰므로 `set default`로 등록하십시오.
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
npm.cmd install -g aptly@latest --ignore-scripts
|
|
60
|
+
aptly.cmd --version
|
|
61
|
+
aptly.cmd set default --client codex
|
|
62
|
+
aptly.cmd set env OPENAI_API_KEY --client codex
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Claude Code를 설정하려면 두 설정 명령의 `codex`를 `claude`로 바꾸십시오. 호스트를 재시작한 뒤 Codex에서는 `/hooks`를 열어 새 Aptly Hook을 승인하십시오.
|
|
66
|
+
|
|
67
|
+
`--prefix`로 설치 위치를 지정했다면 업데이트할 때도 같은 위치를 지정하십시오. PowerShell에서 `aptly.cmd`를 찾지 못하면 그 위치에 있는 `aptly.cmd`의 전체 경로로 실행하십시오.
|
|
68
|
+
|
|
69
|
+
API 키는 Windows 자격 증명 관리자에 저장됩니다. SSH에서 저장소를 사용할 수 없다는 오류가 나오면 로그인한 데스크톱에서 키를 등록하십시오. 호스트에 MCP가 표시돼도 키를 읽었거나 Decisions API가 응답했다는 뜻은 아닙니다. 키 등록에 실패하면 [자격 증명 오류 안내](troubleshooting.md#guide-launcher-recovery)를 참고하십시오.
|
|
70
|
+
|
|
35
71
|
<a id="guide-npm-install-scripts"></a>
|
|
36
72
|
|
|
37
73
|
## npm 설치 스크립트 허용
|
|
@@ -55,13 +91,14 @@ aptly setup --client all
|
|
|
55
91
|
|
|
56
92
|
```sh
|
|
57
93
|
aptly update
|
|
58
|
-
aptly setup --client all
|
|
59
94
|
aptly --version
|
|
60
95
|
```
|
|
61
96
|
|
|
62
|
-
`update`는 같은 npm prefix
|
|
97
|
+
`update`는 설치 스크립트 없이 같은 npm prefix의 패키지를 업데이트합니다. macOS·Linux에서는 새 CLI가 현재 환경에서 선택된 설정 홈의 변경되지 않은 Aptly 소유 Codex·Claude Code 등록을 관리형 npx로 전환을 시도합니다. direct와 stable 등록이 대상이며 사용자 지정·비관리 등록과 미등록 호스트는 그대로 둡니다. 패키지 업데이트와 호스트별 전환 결과를 각각 확인하십시오. 한 호스트가 성공해도 다른 호스트는 실패할 수 있습니다. Windows에서는 패키지만 업데이트합니다.
|
|
98
|
+
|
|
99
|
+
0.1.21에서는 첫 실행에서 패키지만 업데이트합니다. 설치된 새 CLI로 `aptly update`를 다시 실행하면 기존 등록의 전환을 시도합니다. 기존 등록에 `setup`은 필요하지 않습니다. 새 등록에는 `aptly setup`을 사용할 수 있습니다. 소유권 확인 범위에서 Hook·자격 정보와 전송 범위를 보존합니다. 변경된 Codex Hook은 `/hooks`에서 다시 승인하고 호스트를 재시작하십시오. 전송 범위는 [전송 안내](transmission.md)에서 확인하고 필요하면 명시적으로 선택하십시오.
|
|
63
100
|
|
|
64
|
-
|
|
101
|
+
npm 오류나 로컬·소스 설치에서는 위 수동 설치 명령을 사용하십시오. `dry-run=true`인 npm 설정은 거절합니다. 기존 Node 경로가 사라졌다면 [실행 경로 복구](troubleshooting.md#guide-launcher-recovery)를 따르십시오.
|
|
65
102
|
|
|
66
103
|
<details>
|
|
67
104
|
<summary>0.1.2 이전 원장에서 업그레이드</summary>
|
|
@@ -74,7 +74,7 @@ aptly setup --client codex --migrate-launcher --launcher stable --dry-run
|
|
|
74
74
|
aptly setup --client codex --migrate-launcher --launcher stable
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
如果继续使用 stable,请在全局 Aptly 更新后用相同命令更新保留副本。普通 `setup` 不替换副本,过期副本会以 `stable_snapshot_outdated` 提示。迁移会一并更新其拥有的 MCP 和统计观察器,不会接管修改过的启动器或 Hook。如果目标是保留的标准注册,请审核后添加 `--include-existing`。Codex 中更改过的 Hook 须在 `/hooks` 中重新批准。
|
|
78
78
|
|
|
79
79
|
<details>
|
|
80
80
|
<summary>启动器限制与恢复</summary>
|
|
@@ -87,6 +87,21 @@ aptly setup --client codex --migrate-launcher --launcher stable
|
|
|
87
87
|
|
|
88
88
|
</details>
|
|
89
89
|
|
|
90
|
+
### 托管 npx 启动器
|
|
91
|
+
|
|
92
|
+
在 macOS 和 Linux 上,不带参数的 `aptly update` 更新软件包后,会尝试将当前环境所选配置主目录中未修改且由 Aptly 管理的 Codex 和 Claude Code 注册迁移到托管 npx。direct 和 stable 注册均可迁移;自定义或非托管注册以及不存在的注册保持不变。失败按宿主分别报告,一个宿主成功时另一个仍可能失败。从 0.1.21 首次运行 `aptly update` 时只更新软件包,请使用新 CLI 再运行一次。在 Windows 上,不带参数的更新只更新软件包。
|
|
93
|
+
|
|
94
|
+
这需要自带 npm 的 Node.js 24 或更高版本。Aptly 保存已安装的软件包及其依赖的固定快照,并在隔离的工作目录和干净的 npm 配置中离线运行 `npx`。MCP 启动时不会访问注册表或选择 `latest`。
|
|
95
|
+
|
|
96
|
+
如需显式迁移单个宿主,请先检查 dry run,再执行迁移。使用 Claude Code 时,请将 `codex` 替换为 `claude`。
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
aptly setup --client codex --migrate-launcher --launcher npx --dry-run
|
|
100
|
+
aptly setup --client codex --migrate-launcher --launcher npx
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`aptly update --client codex --launcher npx` 也只针对单个宿主。Windows 不支持显式托管迁移。请分别检查软件包和迁移结果。Hook 和凭据在通过所有权检查的条件下保留;请在 `/hooks` 中重新信任更改后的 Codex Hook,然后重启宿主。
|
|
104
|
+
|
|
90
105
|
<a id="guide-models-and-environment"></a>
|
|
91
106
|
|
|
92
107
|
## 模型与环境变量
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
## 本文目录
|
|
8
8
|
|
|
9
9
|
- [安装](#guide-installation)
|
|
10
|
+
- [验证设置](#guide-verify-setup)
|
|
11
|
+
- [Windows PowerShell](#guide-windows-powershell)
|
|
10
12
|
- [npm 安装脚本许可](#guide-npm-install-scripts)
|
|
11
13
|
- [软件包更新](#guide-package-updates)
|
|
12
14
|
- [新版本通知](#guide-version-notifications)
|
|
@@ -32,6 +34,40 @@ aptly --version
|
|
|
32
34
|
|
|
33
35
|
如果使用 `CODEX_HOME` 或 `CLAUDE_CONFIG_DIR`,请在安装和设置时使用相同的值。Aptly 会保留已有设置和启动脚本。请参阅[账户主目录与密钥设置](configuration.md)。
|
|
34
36
|
|
|
37
|
+
<a id="guide-verify-setup"></a>
|
|
38
|
+
|
|
39
|
+
## 验证设置
|
|
40
|
+
|
|
41
|
+
请使用以下命令检查所选宿主的设置计划和密钥注册准备状态。使用 Claude Code 时,请将 `codex` 改为 `claude`。Windows PowerShell 中请使用 `aptly.cmd`。
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
aptly setup --check --client codex
|
|
45
|
+
aptly set env OPENAI_API_KEY --client codex --check
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
这两条命令都不会修改文件。`setup --check` 是对常规设置计划在当前时点的检查,不验证正在运行的宿主。密钥的 `--check` 检查注册和 Linux 存储准备状态,不读取或保存密钥,也不验证 API 认证。退出码 `0` 表示检查未发现错误,`1` 表示部分失败或命令错误。请检查 JSON 输出中各宿主的 `status` 和 `codes`。
|
|
49
|
+
|
|
50
|
+
设置后请重启宿主和 MCP;在 Codex 中,请通过 `/hooks` 审核并信任 Hook。[推荐和 Hook 参数更新](routing.md#guide-automatic-routing)是不同的观测结果,两者都不能证明子代理已执行或完成。请在宿主中另行确认执行和完成情况。另请参阅[问题排查](troubleshooting.md)。
|
|
51
|
+
|
|
52
|
+
<a id="guide-windows-powershell"></a>
|
|
53
|
+
|
|
54
|
+
## Windows PowerShell
|
|
55
|
+
|
|
56
|
+
在已登录的 Windows 桌面上打开 PowerShell 并运行以下命令。示例直接运行 `npm.cmd` 和 `aptly.cmd`。`--ignore-scripts` 会跳过安装时的自动注册,因此请运行 `set default` 注册 Aptly。
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
npm.cmd install -g aptly@latest --ignore-scripts
|
|
60
|
+
aptly.cmd --version
|
|
61
|
+
aptly.cmd set default --client codex
|
|
62
|
+
aptly.cmd set env OPENAI_API_KEY --client codex
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
如果要设置 Claude Code,请将两条设置命令中的 `codex` 改为 `claude`。请重启宿主。如果使用 Codex,请打开 `/hooks` 并批准新的 Aptly Hook。
|
|
66
|
+
|
|
67
|
+
如果安装时用 `--prefix` 指定了位置,更新时也请使用同一位置。如果 PowerShell 找不到 `aptly.cmd`,请使用该目录下 `aptly.cmd` 的完整路径运行。
|
|
68
|
+
|
|
69
|
+
API 密钥保存在 Windows 凭据管理器中。如果 SSH 中出现无法使用凭据存储的错误,请在已登录的桌面上注册密钥。宿主显示 MCP 并不表示已经读取密钥或收到 Decisions API 的响应。如果密钥注册失败,请参阅[凭据问题排查](troubleshooting.md#guide-launcher-recovery)。
|
|
70
|
+
|
|
35
71
|
<a id="guide-npm-install-scripts"></a>
|
|
36
72
|
|
|
37
73
|
## npm 安装脚本许可
|
|
@@ -55,13 +91,14 @@ aptly setup --client all
|
|
|
55
91
|
|
|
56
92
|
```sh
|
|
57
93
|
aptly update
|
|
58
|
-
aptly setup --client all
|
|
59
94
|
aptly --version
|
|
60
95
|
```
|
|
61
96
|
|
|
62
|
-
`update` 在同一 npm prefix
|
|
97
|
+
`update` 在同一 npm prefix 中更新软件包,不运行安装脚本。在 macOS 和 Linux 上,新 CLI 随后会尝试将当前环境所选配置主目录中未修改且由 Aptly 管理的 Codex 和 Claude Code 注册迁移到托管 npx。direct 和 stable 注册均可迁移;自定义或非托管注册以及不存在的注册保持不变。请分别检查软件包和各宿主的迁移结果:一个宿主成功时另一个仍可能失败。在 Windows 上,该命令只更新软件包。
|
|
98
|
+
|
|
99
|
+
0.1.21 的现有更新程序首次运行时只更新软件包。请使用新安装的 CLI 再次运行 `aptly update`,以尝试迁移现有注册;现有注册不需要 setup。需要新注册时可以使用 `aptly setup`。通过所有权检查后,Hook、凭据和传输范围选择会保留。请在 `/hooks` 中重新信任更改后的 Codex Hook 并重启宿主。请查看[传输范围](transmission.md),并在需要时显式选择。
|
|
63
100
|
|
|
64
|
-
|
|
101
|
+
遇到 npm 错误或使用本地/源码安装时,请使用上面的手动安装命令。npm 配置中的 `dry-run=true` 会被拒绝。如果旧 Node 路径已不存在,请参阅[启动路径恢复](troubleshooting.md#guide-launcher-recovery)。
|
|
65
102
|
|
|
66
103
|
<details>
|
|
67
104
|
<summary>从 0.1.2 之前的账本升级</summary>
|