aptly 0.1.15 → 0.1.17
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 +19 -7
- package/dist/src/recovery-application.d.ts +96 -0
- package/dist/src/recovery-application.js +59 -0
- package/dist/src/server.js +2 -2
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/docs/SPAWN_CONTEXT.md +24 -0
- package/docs/guide/en/advanced.md +4 -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 +4 -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 +4 -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 +4 -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
|
@@ -145,6 +145,8 @@ Cache reuse requires a completed first result. An unknown outcome remains `outco
|
|
|
145
145
|
|
|
146
146
|
`context_retry_allowed: false` ends further context supplementation. For a compatible recommendation, `caller_review_required` means the parent reviews arguments; it does not request new user approval. Existing delegation authorization and host permission checks still apply.
|
|
147
147
|
|
|
148
|
+
The shared output validation below is available starting with 0.1.17. Retry/fresh application metadata uses a shared Zod contract. Retry `required_fields` lists only missing fields and `next_action` is `apply_returned_defaults` (fresh: `submit_prepared_call`). Stop if application is forbidden or unclear; existing-agent reuse is not evidence of applying advice. Internal inconsistency returns `recovery_metadata_invalid` without raw data or repeating a completed classification. Strict consumers must allow additive fields. Validation does not establish caller compliance or permission.
|
|
149
|
+
|
|
148
150
|
<a id="guide-fresh-delegation"></a>
|
|
149
151
|
|
|
150
152
|
## Prepare a separate independent delegation (0.1.6+)
|
|
@@ -153,6 +155,8 @@ After a defaults Hook blocks inherited application, the caller may use `prepare_
|
|
|
153
155
|
|
|
154
156
|
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
157
|
|
|
158
|
+
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.
|
|
159
|
+
|
|
156
160
|
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
161
|
|
|
158
162
|
<a id="guide-model-info-cache"></a>
|
|
@@ -1,43 +1,33 @@
|
|
|
1
1
|
# Configuration and model candidates
|
|
2
2
|
|
|
3
|
-
[한국어](../ko/configuration.md) ·
|
|
3
|
+
[한국어](../ko/configuration.md) · **English** · [简体中文](../zh-CN/configuration.md) · [日本語](../ja/configuration.md)
|
|
4
4
|
|
|
5
|
-
[Guide
|
|
5
|
+
[Guide contents](../en.md)
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
- [
|
|
10
|
+
- [CLI configuration](#guide-cli-configuration)
|
|
17
11
|
- [Keys and restarting](#guide-keys-and-restart)
|
|
18
|
-
- [
|
|
19
|
-
- [
|
|
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 |
|
|
26
|
-
|
|
27
|
-
| Codex |
|
|
28
|
-
| Claude Code | `mcpServers.aptly` in `~/.claude.json
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
66
|
+
## Launcher resilient to Node version changes
|
|
75
67
|
|
|
76
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
79
|
+
<details>
|
|
80
|
+
<summary>Launcher limits and recovery</summary>
|
|
92
81
|
|
|
93
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
88
|
+
</details>
|
|
100
89
|
|
|
101
90
|
<a id="guide-models-and-environment"></a>
|
|
102
91
|
|
|
103
92
|
## Models and environment variables
|
|
104
93
|
|
|
105
|
-
|
|
94
|
+
Tiers are task presets and do not imply equivalent model performance across providers.
|
|
106
95
|
|
|
107
|
-
| Tier | Claude Code | Codex |
|
|
96
|
+
| Tier | Claude Code | Codex | Example tasks |
|
|
108
97
|
|---|---|---|---|
|
|
109
|
-
| simple | `haiku` | `gpt-6-luna` / `max` | Extraction, format conversion,
|
|
110
|
-
| routine | `sonnet` | `gpt-6.1-terra` / `high` | Context-aware writing
|
|
111
|
-
| deep | `opus` | `gpt-6.1-sol` / `medium` |
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
117
|
+
[Installation](installation.md) · [Troubleshooting](troubleshooting.md) · [Guide contents](../en.md)
|
|
@@ -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>
|
|
@@ -145,6 +145,8 @@ fixture は、キー・ネットワーク・子エージェントの実行なし
|
|
|
145
145
|
|
|
146
146
|
`context_retry_allowed: false` は追加の文脈補足を終了する意味です。互換性のある推薦の `caller_review_required` は親が引数を確認する意味であり、新しいユーザー承認の要求ではありません。既存の委任権限とホストの権限確認は引き続き適用されます。
|
|
147
147
|
|
|
148
|
+
次の共通応答検証は 0.1.17 以降で利用できます。retry・fresh の適用メタデータは共通の Zod スキーマで検証します。retry の `required_fields` は未指定フィールドのみで、`next_action` は `apply_returned_defaults`(fresh は `submit_prepared_call`)です。禁止・不明な場合は停止し、既存エージェントの再利用を推薦適用の証拠にしないでください。内部不整合は原文なしで `recovery_metadata_invalid` を返し、完了した分類は再実行しません。厳密な応答検証では追加フィールドを許容してください。呼び出し元の遵守や権限を証明する検証ではありません。
|
|
149
|
+
|
|
148
150
|
<a id="guide-fresh-delegation"></a>
|
|
149
151
|
|
|
150
152
|
## 別の独立した委任を準備する(0.1.6 以降)
|
|
@@ -153,6 +155,8 @@ defaults Hook が継承呼び出しへの適用を拒否した後、呼び出し
|
|
|
153
155
|
|
|
154
156
|
元の継承呼び出しは拒否されたままです。別の `next_call.arguments` を確認し、既存の委任権限と通常のホスト権限確認の下で新しい呼び出しを送ってください。`fork_turns: "none"` と、元の選択を保つモデル・effort を含みます。呼び出し元の宣言であり、ユーザー意図や実行を検証するものではありません。履歴が必要・不明、固定役割、resume、未検証の追加実行引数がある場合は使わないでください。参照は一つのタスクだけに結び付き、5分の期限・取消・ポリシー/候補/元の呼び出しの変更で準備を止めます。元の実行を許す advisory 経路には提供しません。[契約と制限](../../SPAWN_CONTEXT.md#intentional-fresh-delegation)を確認してください。
|
|
155
157
|
|
|
158
|
+
次の必須引数の案内は 0.1.16 以降で利用できます。`model`・`reasoning_effort` を含む `next_call.arguments` の全引数を渡してください。省略すると、不透明な新規呼び出しが再び文脈補足に進む場合があります。`spawn_application.required_fields` は呼び出し元の確認用で、権限の承認ではありません。ユーザーの選択や上位のホスト指示が親モデルの継承を要求する、またはいずれかのフィールドを禁止する場合は、適用できない旨を報告して停止してください。新しい復旧 ID で制限を回避しないでください。 制約の適用が不明な場合も停止し、不確実性を報告してください。Hook による明示フィールドの保持は、新しい呼び出しと準備結果の一致を検証するものではありません。
|
|
159
|
+
|
|
156
160
|
ホストが元の呼び出しの拒否を報告した後だけ使ってください。`original_call_outcome` が `executed` または `unknown` なら準備を拒否します。これは呼び出し元の宣言で、サーバーの実行観測ではありません。同じ準備の反復は子の一回実行を保証しません。プロファイルは元の分類要約に基づくため別タスクに再利用しないでください。
|
|
157
161
|
|
|
158
162
|
<a id="guide-model-info-cache"></a>
|