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 +9 -34
- package/README.ja.md +9 -34
- package/README.md +9 -34
- package/README.zh-CN.md +9 -34
- package/dist/src/context-retry.js +2 -1
- package/dist/src/server.js +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/docs/SPAWN_CONTEXT.md +14 -0
- package/docs/guide/en/advanced.md +2 -0
- package/docs/guide/en/configuration.md +43 -58
- package/docs/guide/en/installation.md +30 -42
- package/docs/guide/en/transmission.md +31 -36
- package/docs/guide/en.md +17 -20
- package/docs/guide/ja/advanced.md +2 -0
- package/docs/guide/ja/configuration.md +41 -56
- package/docs/guide/ja/installation.md +25 -37
- package/docs/guide/ja/transmission.md +28 -33
- package/docs/guide/ja.md +17 -20
- package/docs/guide/ko/advanced.md +2 -0
- package/docs/guide/ko/configuration.md +34 -49
- package/docs/guide/ko/installation.md +23 -35
- package/docs/guide/ko/transmission.md +24 -29
- package/docs/guide/ko.md +17 -20
- package/docs/guide/zh-CN/advanced.md +2 -0
- package/docs/guide/zh-CN/configuration.md +41 -56
- package/docs/guide/zh-CN/installation.md +24 -36
- package/docs/guide/zh-CN/transmission.md +28 -33
- package/docs/guide/zh-CN.md +17 -20
- package/package.json +1 -1
|
@@ -1,66 +1,55 @@
|
|
|
1
1
|
# Installation and updates
|
|
2
2
|
|
|
3
|
-
[한국어](../ko/installation.md) ·
|
|
3
|
+
[한국어](../ko/installation.md) · **English** · [简体中文](../zh-CN/installation.md) · [日本語](../ja/installation.md)
|
|
4
4
|
|
|
5
|
-
[Guide
|
|
5
|
+
[Guide contents](../en.md)
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Contents
|
|
8
8
|
|
|
9
9
|
- [Installation](#guide-installation)
|
|
10
|
-
- [npm install
|
|
10
|
+
- [Allow npm install scripts](#guide-npm-install-scripts)
|
|
11
11
|
- [Package updates](#guide-package-updates)
|
|
12
12
|
- [New-version notifications](#guide-version-notifications)
|
|
13
13
|
- [Command help (0.1.8+)](#guide-command-help)
|
|
14
|
-
- [
|
|
14
|
+
- [Skip registration or remove](#guide-skip-and-remove)
|
|
15
15
|
|
|
16
16
|
<a id="guide-installation"></a>
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
**Before upgrading an existing persistent ledger to 0.1.2 or later**, stop every host, MCP server, standalone CLI, and older process that can access it. The persistent gate cannot coexist with older writers. Fresh installations need no legacy-lock quarantine. If an old empty lock remains, follow the [ledger transition procedure](troubleshooting.md#guide-ledger-lock-recovery): quarantine only a confirmed legacy lock while offline and preserve the JSON ledger, `unknown` records, costs, and completed cache.
|
|
20
|
+
You need Node.js 24 or later, Claude Code or Codex, and an OpenAI API key.
|
|
23
21
|
|
|
24
22
|
```sh
|
|
25
23
|
npm install -g aptly@latest --allow-scripts=aptly
|
|
26
24
|
aptly set default
|
|
25
|
+
aptly set env OPENAI_API_KEY
|
|
27
26
|
aptly --version
|
|
28
27
|
```
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
`postinstall` registers the MCP server and a `PreToolUse` Hook in the current user's existing host configuration directories. If you use `CODEX_HOME` or `CLAUDE_CONFIG_DIR`, pass the same environment to installation. Automatic registration skips host directories that do not exist; explicit `setup` can create them. To register only one host, use `--client codex` or `--client claude`.
|
|
29
|
+
`set default` registers hosts and asks what information to send to the Decisions API. Enter the key through the hidden prompt; it is stored in the OS credential store. Restart the host and approve the new Hook in Codex `/hooks`.
|
|
33
30
|
|
|
34
|
-
|
|
31
|
+
The install script registers MCP and Hooks in existing host directories. If a directory does not exist, register with `aptly setup --client all`. Accounts using `CODEX_HOME` or `CLAUDE_CONFIG_DIR` must pass the same environment during installation and setup. Existing settings and launcher wrappers are preserved. See [account homes and keys](configuration.md).
|
|
35
32
|
|
|
36
33
|
<a id="guide-npm-install-scripts"></a>
|
|
37
34
|
|
|
38
|
-
## npm install
|
|
39
|
-
|
|
40
|
-
The installation command above uses `--allow-scripts=aptly` to explicitly allow Aptly's `postinstall` for that installation. Support was checked with npm 11.19.1; the command does not change user-wide npm approval settings. See the [official npm guidance](https://docs.npmjs.com/cli/v11/commands/npm-rebuild/#allow-scripts).
|
|
41
|
-
|
|
42
|
-
`npm warn install-scripts ... not yet covered by allowScripts` reports an unreviewed policy entry. In npm 11.19.1, this warning alone does not mean scripts were blocked. Behavior depends on npm version, strict policy, and `ignore-scripts`; installation success alone does not verify MCP or Hook registration. npm may hide postinstall output.
|
|
35
|
+
## Allow npm install scripts
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
`--allow-scripts=aptly` allows only this installation's `postinstall` and does not change npm's global configuration (verified with npm 11.19.1). If the option is unsupported or you do not want automatic registration, run:
|
|
45
38
|
|
|
46
39
|
```sh
|
|
47
40
|
npm install -g aptly@latest --ignore-scripts
|
|
48
41
|
aptly setup --client all
|
|
49
42
|
```
|
|
50
43
|
|
|
51
|
-
|
|
44
|
+
Do not infer Hook registration from installation success or `npm warn install-scripts` alone. npm versions or policies may skip the install script. See [npm documentation](https://docs.npmjs.com/cli/v11/commands/npm-rebuild/#allow-scripts).
|
|
52
45
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
The 0.1.11 or later installer writes only a stderr instruction to run `aptly set transmission --review` when setup completes successfully and registered clients have reviews pending; it does not ask a question or record a choice.
|
|
46
|
+
The install script does not obtain transmission consent. Choose the [transmission scope](transmission.md) later in interactive `aptly setup`, `aptly set default`, or `aptly set transmission --review`.
|
|
56
47
|
|
|
57
48
|
<a id="guide-package-updates"></a>
|
|
58
49
|
|
|
59
50
|
## Package updates
|
|
60
51
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Stop other host, MCP, and CLI processes using the ledger before updating, following the transition steps above. The command skips lifecycle scripts; explicitly configure afterward and restart hosts:
|
|
52
|
+
Stop the relevant hosts, MCP servers, and CLI processes, then run from a verified global npm installation:
|
|
64
53
|
|
|
65
54
|
```sh
|
|
66
55
|
aptly update
|
|
@@ -68,36 +57,39 @@ aptly setup --client all
|
|
|
68
57
|
aptly --version
|
|
69
58
|
```
|
|
70
59
|
|
|
71
|
-
|
|
60
|
+
`update` installs the latest version in the same npm prefix and preserves settings and keys. It does not run install scripts. Restart the host after setup. On npm errors or local/source installations, use the manual installation command above. npm configuration with `dry-run=true` is rejected.
|
|
61
|
+
|
|
62
|
+
A stable launcher's preserved copy is separate from the global package. Update it with an [explicit migration](configuration.md#guide-stable-launcher). If the old Node path has disappeared, follow [launcher recovery](troubleshooting.md#guide-launcher-recovery).
|
|
63
|
+
|
|
64
|
+
<details>
|
|
65
|
+
<summary>Upgrade from a pre-0.1.2 ledger</summary>
|
|
66
|
+
|
|
67
|
+
Stop all older host, MCP, and CLI writers using the same ledger. The new persistent lock cannot be used with older writers. Quarantine old empty locks offline as described in [ledger lock migration](troubleshooting.md#guide-ledger-lock-recovery), and preserve the JSON ledger, unknown entries, costs, and completion cache.
|
|
68
|
+
|
|
69
|
+
</details>
|
|
72
70
|
|
|
73
71
|
<a id="guide-version-notifications"></a>
|
|
74
72
|
|
|
75
73
|
## New-version notifications
|
|
76
74
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
Only public Aptly version metadata is requested from the npm registry; no key, task summary, or host configuration is sent. Network and body reads are limited to 800ms and 16KiB. Results are cached at `~/.cache/aptly/update-check.json` for 24 hours, with a one-hour cooldown after failure. Network/cache errors cannot fail the requested command. Set `APTLY_NO_UPDATE_NOTIFIER=1` in the CLI environment to disable checks; it is not a supported key for `aptly set env`. Notifications never install updates.
|
|
75
|
+
The interactive CLI checks for the latest version and reports it on stderr; it does not update automatically. MCP, Hooks, pipes, and CI do not check. Only public npm version information is queried; tasks, keys, and settings are not sent. Results are cached for 24 hours and errors do not fail the original command. To disable this, set `APTLY_NO_UPDATE_NOTIFIER=1` in the execution environment (not through `set env`).
|
|
80
76
|
|
|
81
77
|
<a id="guide-command-help"></a>
|
|
82
78
|
|
|
83
|
-
## Command help
|
|
84
|
-
|
|
85
|
-
Consistent per-command and nested help is supported from Aptly 0.1.8. Use these forms:
|
|
79
|
+
## Command help
|
|
86
80
|
|
|
87
81
|
```sh
|
|
88
82
|
aptly --help
|
|
89
83
|
aptly setup -h
|
|
90
|
-
aptly set default --help
|
|
91
84
|
aptly set env OPENAI_API_KEY --help
|
|
92
|
-
aptly budget status --help
|
|
93
85
|
aptly help catalog refresh
|
|
94
86
|
```
|
|
95
87
|
|
|
96
|
-
`--help`, `-h
|
|
88
|
+
`--help`, `-h`, and `aptly help <command path>` display usage without reading settings or keys or calling the API. Invalid options and missing option values are errors.
|
|
97
89
|
|
|
98
90
|
<a id="guide-skip-and-remove"></a>
|
|
99
91
|
|
|
100
|
-
##
|
|
92
|
+
## Skip registration or remove
|
|
101
93
|
|
|
102
94
|
```sh
|
|
103
95
|
APTLY_SKIP_SETUP=1 npm install -g aptly@latest
|
|
@@ -105,10 +97,6 @@ aptly setup --client codex --mode defaults
|
|
|
105
97
|
aptly remove --client all
|
|
106
98
|
```
|
|
107
99
|
|
|
108
|
-
`CI`
|
|
109
|
-
|
|
110
|
-
## Related topics
|
|
111
|
-
|
|
112
|
-
[Configuration and model candidates](configuration.md) · [Troubleshooting](troubleshooting.md)
|
|
100
|
+
`CI` and `--ignore-scripts` also skip automatic registration. `remove` removes only unchanged Aptly-owned entries and preserves user changes. If the result is `partial`, check each host's error. To change modes, remove the registration and register with the desired `--mode`. `advisory` also sends task information when the transmission scope permits it.
|
|
113
101
|
|
|
114
|
-
[Guide
|
|
102
|
+
[Configuration](configuration.md) · [Troubleshooting](troubleshooting.md) · [Guide contents](../en.md)
|
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
# Decisions API transmission
|
|
1
|
+
# Decisions API transmission scope
|
|
2
2
|
|
|
3
|
-
[한국어](../ko/transmission.md) ·
|
|
3
|
+
[한국어](../ko/transmission.md) · **English** · [简体中文](../zh-CN/transmission.md) · [日本語](../ja/transmission.md)
|
|
4
4
|
|
|
5
|
-
[Guide
|
|
5
|
+
[Guide contents](../en.md)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Contents
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- [Decisions API transmission scope](#guide-transmission-scope)
|
|
12
|
-
- [Outbound content and filtering limits](#guide-transmission-limits)
|
|
9
|
+
- [Choose a transmission scope](#guide-transmission-scope)
|
|
10
|
+
- [Content and limits](#guide-transmission-limits)
|
|
13
11
|
|
|
14
12
|
<a id="guide-transmission-scope"></a>
|
|
15
13
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
The transmission commands in this section are supported from Aptly 0.1.7.
|
|
14
|
+
## Choose a transmission scope
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
The recipient is the **OpenAI Decisions API**, not the Aptly developer. New registrations start `unselected` and do not transmit automatically.
|
|
21
17
|
|
|
22
|
-
|
|
18
|
+
| Scope | Information available for automatic recommendations |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `none` | No automatic transmission; preserve the original call |
|
|
21
|
+
| `description` | Send only the caller-provided description; request more context if absent |
|
|
22
|
+
| `excerpt` | Allow explicit descriptions and supported native task excerpts |
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
The first interactive `setup` or `set default` asks for the scope of homes awaiting review. The recommended option is `excerpt`; Enter preserves an existing choice or selects `none` if unselected. Automatic installation, CI, and nonterminal execution are not treated as consent. Cancellation leaves the transmission choice unchanged, though earlier default registration may have completed.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
To review again, run (since 0.1.11):
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
29
|
aptly set transmission --review
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
The 0.1.10 update process cannot immediately load the updated CLI’s new question. After updating to 0.1.11 or later, run interactive `aptly setup`, `aptly set default`, or `aptly set transmission --review` with the same account environment. `aptly update` in 0.1.11 or later also prints the next setup command without spawning a new process.
|
|
32
|
+
You can also show the current value or select a scope directly. Run only one of the change commands below. Choose targets with `--client codex|claude|all`.
|
|
35
33
|
|
|
36
34
|
```sh
|
|
37
35
|
aptly set transmission --show
|
|
@@ -40,34 +38,31 @@ aptly set transmission description
|
|
|
40
38
|
aptly set transmission excerpt
|
|
41
39
|
```
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
Restart MCP after changes. Existing v1 policies remain legacy `excerpt` until changed. Operator changes and other wrappers are not automatically adopted. In-flight transmissions cannot be recalled, and results, retries, or fresh delegations from before the change are not applied to the new policy. Do not bypass conflicts with a new paid ID.
|
|
44
42
|
|
|
45
|
-
|
|
43
|
+
`--show` returning `complete`/exit code 0 means the query completed, including when the value is unset or `none`. Damaged, missing, or conflicting expected settings yield `partial`/exit code 1. This command does not verify host readiness or consent.
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
`advisory` limits application; it does not prohibit transmission. If a `description` is insufficient, `defaults` blocks the spawn and `advisory` reports guidance. `recommend_agent` and `aptly recommend` are separate explicit requests and are not prohibited by the automatic transmission setting.
|
|
48
46
|
|
|
49
|
-
|
|
47
|
+
<details>
|
|
48
|
+
<summary>Emergency stop by editing the policy</summary>
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
Changing only `enabled` to `false` in the existing private policy at `APTLY_HOOK_POLICY_PATH` preserves the original call before automatic classification and binding. Do not edit other fields or ownership records. Use the CLI above for ordinary changes because ownership conflicts can result. Do not clear the policy path as a stop method: it may switch to the strict path. Already started transmissions and explicit direct recommendations cannot be canceled this way.
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
</details>
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
A valid `prepare_spawn_context` description and fixed prefix replace the native excerpt for classification; registration itself makes no API call. After a needs-context response, `retry_spawn_recommendation` can classify one new supplement with a fixed prefix, without appending the earlier body. Both paths limit the raw description to `min(3800, max_summary_bytes - 96)` bytes and the prefixed summary to `min(4000, max_summary_bytes)` bytes. `prepare_fresh_delegation` itself reuses completed advice without another classification and returns standalone instructions as local next-call arguments. A Codex call submitted with the returned explicit model and effort is currently preserved by the Hook as `explicit_model`, without classification. Checking a later call does not imply another classification. None of these paths establishes that descriptions are non-sensitive or automatically anonymized.
|
|
58
|
-
|
|
59
|
-
Decisions receives `client`, `task.summary`, `task.operation`, `task.context_sufficient`, candidate profile IDs, model/effort descriptions, and configured model facts. The classification API key is sent in `Authorization`; the request ID is sent in `X-Client-Request-Id`. Automatic IDs are hashes; direct recommendation IDs are caller-supplied. Do not put secrets in IDs or candidate descriptions.
|
|
54
|
+
<a id="guide-transmission-limits"></a>
|
|
60
55
|
|
|
61
|
-
|
|
56
|
+
## Content and limits
|
|
62
57
|
|
|
63
|
-
|
|
58
|
+
In `excerpt` scope, when no description was registered in advance, the automatic classification `summary` consists of an allowed task label and a **truncated excerpt of the first paragraph** of the body. It is not newly summarized or anonymized. Its UTF-8 size is at most `min(4000, max_summary_bytes)`; this is not a limit on the entire HTTP request. The Codex opaque-message fallback uses only a sufficiently specific `task_name`, without decrypting or sending the body. Labels can also contain sensitive information.
|
|
64
59
|
|
|
65
|
-
|
|
60
|
+
When a valid description is registered with `prepare_spawn_context`, a fixed prefix and that description replace the native excerpt for classification. Registration itself does not call the API. After an insufficient-context response, `retry_spawn_recommendation` retries once with a fixed prefix and a new supplemental description, without appending the previous body. In both paths, the raw description is limited to `min(3800, max_summary_bytes - 96)` bytes and the prefixed description to `min(4000, max_summary_bytes)` bytes. `prepare_fresh_delegation` itself reuses a completed recommendation without another classification call and returns independent instructions as local arguments for the next call. A Codex call explicitly specifying the returned model and effort is preserved by the current Hook as `explicit_model` without classification. A routing check on a subsequent call does not itself imply another classification. Neither path guarantees descriptions are non-sensitive or automatically anonymized.
|
|
66
61
|
|
|
67
|
-
|
|
62
|
+
Decisions receives `client`, `task.summary`, `task.operation`, `task.context_sufficient`, candidate profile IDs, model and effort descriptions, and configured model characteristics. The classification API key is sent in the `Authorization` header and the request ID in `X-Client-Request-Id`. Automatic-path IDs are hashes; direct recommendation IDs are caller-specified. Do not put secrets in IDs or candidate descriptions.
|
|
68
63
|
|
|
69
|
-
|
|
64
|
+
To choose a summary yourself, turn off automatic sharing and write only the information needed for a direct recommendation. Aptly does not automatically read and attach documents or source files at URLs in a summary. Checks for known key and Bearer patterns are not complete secret detection or a guarantee of transmission safety.
|
|
70
65
|
|
|
71
|
-
|
|
66
|
+
The ledger and Hook bindings store request metadata, hashes, and cached results, not task excerpts. Aptly diagnostics also omit the original text. However, the Hook's `updatedInput` retains the original task so the local host can continue execution. Aptly does not control the host's own conversation or log storage.
|
|
72
67
|
|
|
73
|
-
[Guide
|
|
68
|
+
[Automatic recommendations](routing.md) · [Budget](budget.md) · [Guide contents](../en.md)
|
package/docs/guide/en.md
CHANGED
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
# Aptly user guide
|
|
2
2
|
|
|
3
|
-
This guide targets Aptly 0.1.13. Each topic preserves feature-specific minimum versions and recovery instructions for older releases.
|
|
4
|
-
|
|
5
3
|
[한국어](ko.md) · **English** · [简体中文](zh-CN.md) · [日本語](ja.md)
|
|
6
4
|
|
|
7
|
-
[
|
|
8
|
-
|
|
9
|
-
Korean is the canonical documentation. This guide covers general Aptly installation and usage. Package availability does not establish model access for every account. Claude Code or Codex controls native subagent execution, approvals, sandboxing, and MCP permissions.
|
|
10
|
-
|
|
11
|
-
For a first setup, read **Installation → Configuration → Automatic recommendations**.
|
|
5
|
+
[README](../../README.en.md)
|
|
12
6
|
|
|
13
|
-
|
|
7
|
+
Korean is the canonical documentation. For your first setup, read Installation → Configuration → Automatic recommendations.
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
| Task | Guide |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Install, update, or remove | [Installation](en/installation.md) |
|
|
12
|
+
| API keys, account homes, models, stable launcher | [Configuration](en/configuration.md) |
|
|
13
|
+
| Hook behavior, abstention, and application conditions | [Automatic recommendations](en/routing.md) |
|
|
14
|
+
| Choose what to send to the OpenAI Decisions API | [Transmission scope](en/transmission.md) |
|
|
15
|
+
| Call and cost limits | [Budget](en/budget.md) |
|
|
16
|
+
| Compare recommendations with actual execution | [Statistics](en/statistics.md) |
|
|
17
|
+
| Registration, credential store, and ledger errors | [Troubleshooting](en/troubleshooting.md) |
|
|
18
|
+
| Manual MCP setup, direct recommendations, and development | [Advanced integration](en/advanced.md) |
|
|
19
|
+
| Measurement and cost conversion | [Measured costs](en/benchmarks.md) |
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Existing bookmark anchors remain available. Select an entry to open its section in the new topic page. This documentation move does not require setup or key re-entry.
|
|
21
|
+
<details>
|
|
22
|
+
<summary>Previous links</summary>
|
|
28
23
|
|
|
29
24
|
<a id="installation"></a>
|
|
30
25
|
- [Installation](en/installation.md#guide-installation)
|
|
@@ -88,3 +83,5 @@ Existing bookmark anchors remain available. Select an entry to open its section
|
|
|
88
83
|
- [Interrupted processes and ledger locks](en/troubleshooting.md#guide-ledger-lock-recovery)
|
|
89
84
|
<a id="diagnostics-and-development"></a>
|
|
90
85
|
- [Diagnostics and development](en/advanced.md#guide-diagnostics-and-development)
|
|
86
|
+
|
|
87
|
+
</details>
|
|
@@ -153,6 +153,8 @@ defaults Hook が継承呼び出しへの適用を拒否した後、呼び出し
|
|
|
153
153
|
|
|
154
154
|
元の継承呼び出しは拒否されたままです。別の `next_call.arguments` を確認し、既存の委任権限と通常のホスト権限確認の下で新しい呼び出しを送ってください。`fork_turns: "none"` と、元の選択を保つモデル・effort を含みます。呼び出し元の宣言であり、ユーザー意図や実行を検証するものではありません。履歴が必要・不明、固定役割、resume、未検証の追加実行引数がある場合は使わないでください。参照は一つのタスクだけに結び付き、5分の期限・取消・ポリシー/候補/元の呼び出しの変更で準備を止めます。元の実行を許す advisory 経路には提供しません。[契約と制限](../../SPAWN_CONTEXT.md#intentional-fresh-delegation)を確認してください。
|
|
155
155
|
|
|
156
|
+
次の必須引数の案内は 0.1.16 以降で利用できます。`model`・`reasoning_effort` を含む `next_call.arguments` の全引数を渡してください。省略すると、不透明な新規呼び出しが再び文脈補足に進む場合があります。`spawn_application.required_fields` は呼び出し元の確認用で、権限の承認ではありません。ユーザーの選択や上位のホスト指示が親モデルの継承を要求する、またはいずれかのフィールドを禁止する場合は、適用できない旨を報告して停止してください。新しい復旧 ID で制限を回避しないでください。 制約の適用が不明な場合も停止し、不確実性を報告してください。Hook による明示フィールドの保持は、新しい呼び出しと準備結果の一致を検証するものではありません。
|
|
157
|
+
|
|
156
158
|
ホストが元の呼び出しの拒否を報告した後だけ使ってください。`original_call_outcome` が `executed` または `unknown` なら準備を拒否します。これは呼び出し元の宣言で、サーバーの実行観測ではありません。同じ準備の反復は子の一回実行を保証しません。プロファイルは元の分類要約に基づくため別タスクに再利用しないでください。
|
|
157
159
|
|
|
158
160
|
<a id="guide-model-info-cache"></a>
|
|
@@ -1,43 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 初期設定・候補モデル
|
|
2
2
|
|
|
3
3
|
[한국어](../ko/configuration.md) · [English](../en/configuration.md) · [简体中文](../zh-CN/configuration.md) · [日本語](../ja/configuration.md)
|
|
4
4
|
|
|
5
5
|
[ガイド目次](../ja.md)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
既定のホームとホストが使用するアカウントのホームが異なる場合があります。ホーム間でポリシー・台帳・キー・信頼記録をコピーしないでください。パスの競合や `existing_hook_not_owned` は登録を保持して確認し、[トラブルシューティング](troubleshooting.md)を参照してください。
|
|
10
|
-
|
|
11
|
-
MCP の手動設定は[高度な連携](advanced.md#guide-manual-mcp-setup)を参照してください。
|
|
12
|
-
|
|
13
|
-
## このページの目次
|
|
7
|
+
## 目次
|
|
14
8
|
|
|
15
9
|
- [設定ファイルの場所](#guide-host-config-locations)
|
|
16
|
-
- [CLI
|
|
10
|
+
- [CLI 設定](#guide-cli-configuration)
|
|
17
11
|
- [キーと再起動](#guide-keys-and-restart)
|
|
18
|
-
- [
|
|
19
|
-
- [
|
|
12
|
+
- [stable ランチャー](#guide-stable-launcher)
|
|
13
|
+
- [候補モデル](#guide-models-and-environment)
|
|
20
14
|
|
|
21
15
|
<a id="guide-host-config-locations"></a>
|
|
22
16
|
|
|
23
17
|
## 設定ファイルの場所
|
|
24
18
|
|
|
25
|
-
| ホスト |
|
|
26
|
-
|
|
27
|
-
| Codex |
|
|
28
|
-
| Claude Code | `~/.claude.json` の `mcpServers.aptly
|
|
19
|
+
| ホスト | 既定の場所 | 別のアカウントホーム |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Codex | `~/.codex/config.toml` | `$CODEX_HOME/config.toml` |
|
|
22
|
+
| Claude Code | `~/.claude.json` の `mcpServers.aptly` | `$CLAUDE_CONFIG_DIR/.claude.json` |
|
|
29
23
|
|
|
30
|
-
|
|
24
|
+
Claude Hook は既定では `~/.claude/settings.json`、別のアカウントでは `$CLAUDE_CONFIG_DIR/settings.json` にあります。インストール・設定・統計コマンドにもホストと同じアカウント環境を渡してください。別のホームのポリシー・台帳・キー・信頼記録をコピーしないでください。
|
|
31
25
|
|
|
32
|
-
|
|
26
|
+
Codex MCP の `@codex-home` ポリシーは 0.1.15 以降、`CODEX_HOME` がなければ `~/.codex` を選びます。明示された絶対パスが優先され、空値・相対パス・制御文字は拒否します。カスタムホームを探索しないため、管理者が値を渡さなければ既定ホームのポリシー・送信範囲が適用されます。手動・プロジェクト・管理登録は[高度な設定](advanced.md#guide-manual-mcp-setup)を参照してください。
|
|
33
27
|
|
|
34
28
|
<a id="guide-cli-configuration"></a>
|
|
35
29
|
|
|
36
|
-
## CLI
|
|
37
|
-
|
|
38
|
-
0.1.11 以降、最初の通常の対話形式 `aptly set default` がクライアントホームごとのレビュー待ち項目をまとめて質問します。`excerpt` を推奨し、Enter は既存の範囲を保持するか、未選択なら `none` を選びます。[送信レビュー](transmission.md#guide-transmission-scope)を参照してください。この再レビューの流れは 0.1.10 ではサポートされないため、先に更新してください。
|
|
39
|
-
|
|
40
|
-
`set` コマンドは 0.1.1 以降で利用できます。既存の起動パスは自動で切り替えません。API キー設定は、現在のパッケージの標準 Node/サーバー登録で、OS 資格情報の参照に対応する実行環境だと確認できた場合にのみ使用できます。独自ラッパー、旧バージョン、別のインストール先は `credential_launcher_unverified` で拒否します。登録を明示的に切り替えるかアップグレードしてから、再度実行してください。
|
|
30
|
+
## CLI 設定
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
既定では両ホストを選択します。`--client codex`、`--client claude`、`--client all` で対象を指定できます。Claude 候補には `["haiku","sonnet","opus"]` のような JSON 文字列を入力してください。
|
|
38
|
+
`set default` は不足する登録・既定値を追加し、[送信範囲](transmission.md)を確認します。既存の実行コマンド・環境・provider・候補・advisory ポリシーは保持します。`set env` は非表示入力を受け、指定した変数のみを変更します。既定の対象は両ホストで、`--client codex|claude|all` で選択します。
|
|
51
39
|
|
|
52
40
|
```sh
|
|
53
41
|
aptly set env APTLY_CLAUDE_MODELS --client claude
|
|
54
42
|
```
|
|
55
43
|
|
|
56
|
-
|
|
44
|
+
候補の入力は `["haiku","sonnet","opus"]` のような JSON 配列文字列です。自動化には `--stdin` を使ってください。実際のキーを `printf` やシェル履歴に入れないでください。
|
|
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
|
-
|
|
50
|
+
一般に許可されるキーは `ROUTER_PROVIDER`(`fixture`/`decisions`)、`APTLY_CLAUDE_MODELS`、`APTLY_CODEX_MODELS`、別名 `CLAUDE_MODELS`・`CODEX_MODELS`、`APTLY_MODEL_INFO_PATH` です。モデルキャッシュのパスは非公開ディレクトリ内の絶対パスである必要があります。管理用の台帳・ポリシーパスはこのコマンドでは変更しません。
|
|
51
|
+
|
|
52
|
+
<a id="guide-keys-and-restart"></a>
|
|
63
53
|
|
|
64
|
-
|
|
54
|
+
## キーと再起動
|
|
65
55
|
|
|
66
|
-
|
|
56
|
+
`aptly set env OPENAI_API_KEY` はホスト別のキーを macOS Keychain・Linux `secret-tool`・Windows Credential Manager に保存し、MCP にはストア参照のみを登録します。ストアがないかロックされている場合はエラーとし、平文ファイルや別の環境変数のキーに代替しません。[資格情報ストアのエラー](troubleshooting.md)を確認してください。
|
|
67
57
|
|
|
68
|
-
|
|
58
|
+
ホストのサブスクリプションログインと API キーは別です。キーをコマンド引数・設定 JSON・リクエスト・リポジトリに記録しないでください。安全な MCP 実行環境から直接渡す方法は[手動設定](advanced.md#guide-key-environment)にあります。
|
|
69
59
|
|
|
70
|
-
|
|
60
|
+
キーの保存は互換性を確認した標準ランチャーでのみ許可します。カスタムラッパーは保持しますが、`credential_launcher_unverified` で拒否する場合があります。`partial` の場合はホスト別のエラーを確認してください。保存失敗時は以前のキーの復元を試みます。`credential_rollback_failed` の場合は OS ストアで有効なキーを確認してから再試行してください。複数ホストの変更は一つの原子的な操作ではありません。
|
|
61
|
+
|
|
62
|
+
変更後、MCP を再起動し、`get_routing_capabilities` の候補・provider・`credential_status` を確認してください。`os_store` はキーを読み取ったことを示し、API の有効性検証ではありません。Codex の `/hooks` 承認も別途必要です。
|
|
71
63
|
|
|
72
64
|
<a id="guide-stable-launcher"></a>
|
|
73
65
|
|
|
74
|
-
## Node
|
|
66
|
+
## Node バージョン変更に強いランチャー
|
|
75
67
|
|
|
76
|
-
|
|
68
|
+
既定の登録は Node の絶対パスを使います。Node のバージョンを頻繁に切り替える macOS・Linux では `stable` を選べます(0.1.14 以降)。Node フォルダーの外に Aptly と依存関係を保存し、別の対応 Node.js 24 以上を探索します。Node 自体は含まず、Windows には対応しません。
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
新規登録には `aptly setup --client all --launcher stable` を使います。既存登録は dry run を確認してから移行してください。別のアカウントではそのホーム環境を渡し、Claude では `--client 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
|
-
|
|
86
|
-
|
|
87
|
-
インストール時 Node、標準パス、既定の `~/.nvm/versions/node` 内の正式版、安全な絶対 PATHを順に試します。最新 Node の選択は保証せず、シンボリックリンクや shim を使う管理方式は PATH 内でも拒否される場合があり、検証できる実際の実行ファイルパスのみ対応します。起動時にシェル設定・npm・ネットワークダウンロードは実行しません。stable モードは一般的な Node 起動設定の継承を抑えるため `NODE_OPTIONS`・`NODE_PATH`・`NODE_REPL_EXTERNAL_MODULE` を継承しません。追加 CA が必要な場合は `NODE_EXTRA_CA_CERTS` など別の証明書設定を利用してください。ネイティブアドオンが必要な依存は拒否します。対応ランタイム不在・整合性エラー時の MCP は固定エラーで停止し、観測器は既存の静かな best-effort 動作を維持します。
|
|
77
|
+
グローバル Aptly の更新後も同じコマンドで保存コピーを更新する必要があります。通常の `setup` はコピーを置き換えず、古いコピーは `stable_snapshot_outdated` で通知します。移行時は所有する MCP・統計オブザーバーを併せて更新します。変更されたランチャー・Hook は引き継ぎません。保持された標準登録が対象なら確認後に `--include-existing` を追加してください。Codex の変更された Hook は `/hooks` で再承認します。
|
|
88
78
|
|
|
89
|
-
|
|
79
|
+
<details>
|
|
80
|
+
<summary>ランチャーの制限と復旧</summary>
|
|
90
81
|
|
|
91
|
-
|
|
82
|
+
インストール時の Node → 標準パス → 既定の `~/.nvm/versions/node` → 安全な絶対 PATH の順に探索します。最新版の選択やカスタム NVM_DIR・shim・シンボリックリンクに基づくマネージャーへの対応は保証しません。シェルプロファイル・npm・ダウンロードは実行しません。`NODE_OPTIONS`・`NODE_PATH`・`NODE_REPL_EXTERNAL_MODULE` は除去するため、追加 CA には `NODE_EXTRA_CA_CERTS` などを確認してください。
|
|
92
83
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<a id="guide-keys-and-restart"></a>
|
|
84
|
+
書き込み可能な祖先パス・外部に hoist された依存関係・ネイティブアドオンなど、検証できないソースは拒否します。整合性確認には I/O コストが加わり、探索予算は全ファイル I/O の hard timeout ではありません。サンドボックスや配布者の署名認証ではありません。MCP は失敗時にエラーで停止し、統計オブザーバーは静かに終了します。
|
|
96
85
|
|
|
97
|
-
|
|
86
|
+
所有権が一致すれば、紛失・破損・旧形式のコピーから新しい CLI ソースへ明示的に移行できます。破損した同世代・未完了の lock は自動で上書き・削除しません。別のホーム・プロセスが参照する可能性があるため、以前のコピーも自動削除しません。書き込みプロセスと参照を確認してから状態を確認してください。直接 Node ランチャー同士の移行には別途統計の更新(`statistics_observer_migration_required`)が必要な場合があります。
|
|
98
87
|
|
|
99
|
-
|
|
88
|
+
</details>
|
|
100
89
|
|
|
101
90
|
<a id="guide-models-and-environment"></a>
|
|
102
91
|
|
|
103
92
|
## モデルと環境変数
|
|
104
93
|
|
|
105
|
-
|
|
94
|
+
等級はタスクのプリセットであり、提供元間のモデル性能が同等であることを意味しません。
|
|
106
95
|
|
|
107
|
-
|
|
|
96
|
+
| 等級 | Claude Code | Codex | 代表的なタスク |
|
|
108
97
|
|---|---|---|---|
|
|
109
98
|
| simple | `haiku` | `gpt-6-luna` / `max` | 抽出・形式変換・小さな機械的修正 |
|
|
110
|
-
| routine | `sonnet` | `gpt-6.1-terra` / `high` |
|
|
111
|
-
| deep | `opus` | `gpt-6.1-sol` / `medium` |
|
|
99
|
+
| routine | `sonnet` | `gpt-6.1-terra` / `high` | 文脈を考慮した作成・翻訳・範囲が明確な実装 |
|
|
100
|
+
| deep | `opus` | `gpt-6.1-sol` / `medium` | 複合的なデバッグ・設計判断・詳細レビュー |
|
|
112
101
|
|
|
113
|
-
MCP の `env`
|
|
102
|
+
MCP の `env` 値は文字列のため、候補配列も JSON 文字列で渡します。
|
|
114
103
|
|
|
115
104
|
```json
|
|
116
105
|
{
|
|
@@ -121,12 +110,8 @@ MCP の `env` の値は文字列なので、候補配列も JSON 文字列とし
|
|
|
121
110
|
}
|
|
122
111
|
```
|
|
123
112
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
`aptly set default` は、MCP `env` の既存候補と別名、Codex `env_vars` の転送宣言、および現在の CLI で確認できる Claude の継承候補を保持します。同じモデル系列の両方の変数名が未設定の場合だけ既定候補を追加します。Codex の転送変数は現在の端末で値を確認できなくても既定値に置き換えず、継承値を設定ファイルにコピーしません。CLI は同名の静的な `env` 値を優先して有効な設定を検証します。カタログの検証は維持されるため、別名の競合や不正な値があれば設定変更を拒否します。再起動した MCP の最終候補は別途確認してください。
|
|
113
|
+
未指定なら上記の既定値、`[]` ならそのホストの推薦を無効にします。空文字列・重複・非対応モデル・不正な JSON はエラーです。`CLAUDE_MODELS`・`CODEX_MODELS` も別名として対応しますが、同じ提供元の基本名と別名を同時に設定するとエラーです。候補設定は既存の選択を上書きせず、アカウントのモデルアクセス権限を認証しません。
|
|
127
114
|
|
|
128
|
-
|
|
115
|
+
`set default` は既存の候補・別名・受け渡し宣言を保持し、不足するモデル群にのみ既定値を追加します。Codex の継承候補が現在の CLI に見えなくても上書きしません。最終候補は MCP の再起動後に確認してください。
|
|
129
116
|
|
|
130
|
-
[
|
|
131
|
-
|
|
132
|
-
[ガイド目次](../ja.md)
|
|
117
|
+
[インストール](installation.md) · [トラブルシューティング](troubleshooting.md) · [ガイド目次](../ja.md)
|