@mearl/setup 3.0.0-beta.0 → 3.0.0-beta.10
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.md +174 -156
- package/README.zh-CN.md +260 -0
- package/dist/browserExtension.js +24 -8
- package/dist/browserPreset.d.ts +20 -0
- package/dist/browserPreset.js +82 -0
- package/dist/cli.d.ts +4 -3
- package/dist/cli.js +43 -12
- package/dist/lifecycle.d.ts +10 -2
- package/dist/lifecycle.js +70 -13
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +52 -14
- package/dist/preset.d.ts +16 -5
- package/dist/preset.js +51 -14
- package/dist/presetStore.d.ts +2 -48
- package/dist/presetStore.js +1 -252
- package/dist/setupPreset.d.ts +9 -0
- package/dist/setupPreset.js +14 -0
- package/dist/setupVersion.js +1 -1
- package/dist/skillSourceReceipts.d.ts +25 -0
- package/dist/skillSourceReceipts.js +94 -0
- package/dist/skillSources.d.ts +10 -22
- package/dist/skillSources.js +73 -97
- package/dist/skills.js +8 -6
- package/package.json +20 -10
- package/dist/presetUpgrade.d.ts +0 -13
- package/dist/presetUpgrade.js +0 -42
package/README.md
CHANGED
|
@@ -1,78 +1,91 @@
|
|
|
1
1
|
# @mearl/setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](README.md) | [简体中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Version 3.0 is currently in beta. Use `@beta` to install matching setup, runtime packages, and extension versions; stable releases use `latest`.
|
|
6
|
+
|
|
7
|
+
One-time installation, updates, removal, and configuration for Mearl environments. No global setup installation is needed:
|
|
8
|
+
|
|
9
|
+
Requires Node.js >= 20.18.0. Check `node --version` before installation and explicitly use `@beta` for 3.0 beta
|
|
10
|
+
so npm does not select a historical installer based on compatibility with an older Node version.
|
|
6
11
|
|
|
7
12
|
```bash
|
|
8
|
-
npx @mearl/setup@beta [install] [--local] [--cloud
|
|
9
|
-
npx @mearl/setup@beta update [--local] [--cloud
|
|
10
|
-
npx @mearl/setup@beta uninstall [--local] [--cloud
|
|
13
|
+
npx @mearl/setup@beta [install] [--local] [--cloud] [--cloud-mode <id>] [--mcp]
|
|
14
|
+
npx @mearl/setup@beta update [--local] [--cloud] [--cloud-mode <id>] [--mcp]
|
|
15
|
+
npx @mearl/setup@beta uninstall [--local] [--cloud] [--cloud-mode <id>] [--mcp] [--full]
|
|
11
16
|
npx @mearl/setup@beta extension [--full] [--force]
|
|
12
17
|
npx @mearl/setup@beta plugin [name] <path>
|
|
13
|
-
npx @mearl/setup@beta plugin install <skills add
|
|
18
|
+
npx @mearl/setup@beta plugin install <skills add arguments...>
|
|
14
19
|
npx @mearl/setup@beta plugin uninstall <name>
|
|
15
20
|
npx @mearl/setup@beta provider <install|update|uninstall> <package|id>
|
|
21
|
+
npx @mearl/setup@beta preset repair [--replace-skill <name> ...]
|
|
16
22
|
```
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
Browser Providers install and evolve independently. After installation, run `mearl <providerId>` to inspect that version's capabilities,
|
|
25
|
+
configuration, and launch arguments.
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
配对模式。它与 `--cloud` 安装同一套 cloud-server、client 和 Skill,只把 cloud-server
|
|
23
|
-
模式记录为 Qoder;`mearl-cloud-server` 的命令交互保持不变,`start` 和 `restart` 输出新的
|
|
24
|
-
配对指令后退出,不监听端口或保留守护进程。配对 URL 不包含 Qoder PAT。
|
|
27
|
+
Install optional cloud protocols through a preset before selecting `--cloud-mode <id>`. See [`@mearl/plugin-qoder`](../plugin-qoder/README.md) for Qoder pairing; setup does not include or install it by default.
|
|
25
28
|
|
|
26
|
-
##
|
|
29
|
+
## Install and register Skill plugins
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
Install a Skill and register its CLI, SDK, and MCP capabilities with one command:
|
|
29
32
|
|
|
30
33
|
```bash
|
|
31
|
-
npx @mearl/setup@beta plugin install https://github.com/
|
|
34
|
+
npx @mearl/setup@beta plugin install https://github.com/mearlhq/mearl --skill browser-tab-manager --yes
|
|
32
35
|
mearl tabs summary
|
|
33
36
|
```
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
Installation arguments pass to a pinned public Skills CLI (currently skills@1.5.0, compatible with the project's minimum Node version) using the global shared directory. Both default symlink and copy modes support registration. Copy mode uses list --global --json to confirm the canonical path for this successful install, without guessing directories or scanning other Skills. Set MEARL_SKILLS_PATH for a custom CLI. Arguments reject the -- separator, which would truncate trailing options.
|
|
39
|
+
|
|
40
|
+
The installation host's local plugin catalog determines preset-managed capabilities. install/update maintains managed registrations and preserves user registrations. Removing the last dependent environment removes managed plugins and the Mearl Skill; other dependent environments retain them. Configuration preparation, host synchronization, and actual status share the [installation contract](../../docs/preset-installation.md).
|
|
36
41
|
|
|
37
|
-
|
|
42
|
+
New registrations created by Native preset batches are setup-managed and retain that ownership through Agent updates. Existing user registrations in the same directory and custom user aliases retain their ownership. Managed removal encountering user aliases sharing a Skill removes only managed registrations and keeps Skill files.
|
|
38
43
|
|
|
39
|
-
|
|
44
|
+
GUI and CLI share the preset installer and override rules. If a saved installation is incomplete, `preset repair` retries accepted local resources without redownloading the preset or implicitly replacing conflicting sources. Explicit repeated `--replace-skill` authorizes replacing those Skills' sources or same-name plugin registrations for this invocation:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx @mearl/setup@beta preset repair --replace-skill example-skill --replace-skill another-skill
|
|
48
|
+
```
|
|
40
49
|
|
|
41
|
-
|
|
42
|
-
重装会刷新同名绑定。JavaScript 入口必须默认导出 `register(app)`,Python 入口必须导出 `register(app)` 函数;完整协议见
|
|
43
|
-
[插件运行时合同](../../docs/plugin-runtime.md)。
|
|
50
|
+
Already installed Skills receive registration repair only; source conflicts reinstall. Unlisted conflicts still block installation, and undeclared tool names or changed installation identities are rejected. Replacement authorization does not persist into later repairs or automatic updates. Missing browser permissions still require extension authorization. Output uses preset JSON: ready exits `0`, pending components `3`, installation failure `1`, and invalid arguments `2`.
|
|
44
51
|
|
|
45
|
-
|
|
52
|
+
Automatic registration defaults to the installation directory name; an entry can declare `name` for a shorter command.
|
|
53
|
+
Reinstallation refreshes same-name bindings. JavaScript entries must default-export `register(app)`; Python entries must export a `register(app)` function. See the
|
|
54
|
+
[plugin runtime contract](../../docs/plugin-runtime.md).
|
|
55
|
+
|
|
56
|
+
Register a Skill distributed elsewhere or a custom entry directly by path:
|
|
46
57
|
|
|
47
58
|
```bash
|
|
48
59
|
npx @mearl/setup@beta plugin /absolute/path/to/browser-tab-manager
|
|
49
60
|
npx @mearl/setup@beta plugin custom ./skills/custom/entry.mjs
|
|
50
61
|
```
|
|
51
62
|
|
|
52
|
-
path
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
native-host
|
|
57
|
-
|
|
63
|
+
path accepts a directory or file. Directories default to `scripts/main.mjs` or `scripts/main.py`; relative paths resolve against the calling working directory. Plugin names prefer explicit name, then entry `name` metadata, then the Skill directory name. Normal registration needs only path; explicit name is for overrides or older entries. Python requires `python3 >= 3.9`; `MEARL_PYTHON` selects an interpreter. setup validates loading but does not install Python or run `pip install`.
|
|
64
|
+
Registration checks the entry's register function and saves its absolute path. Same-name registration updates the binding.
|
|
65
|
+
Both flows check local `@mearl/client` and `@mearl/native-host`. If absent or older than setup,
|
|
66
|
+
the existing package manager installs setup's matching versions and revalidates. Newer versions remain untouched.
|
|
67
|
+
native-host idempotently initializes Skills mode. If environment completion or initialization fails, the installed Skill remains and registration stops.
|
|
68
|
+
JavaScript plugins may export `setup({ runCommand })` to prepare Skill-owned dependencies before registration. Both installation paths await it, and registration stops on failure. Skills implement their own first-use dependency checks; see the [client contract](../client/README.md#skill-plugins).
|
|
69
|
+
|
|
70
|
+
After registration, run `mearl <name> --help` anywhere, use SDK `invokePlugin`, or MCP `plugin_invoke`. Ordinary calls do not update Skill sources; missing plugins in the selected catalog trigger one on-demand installation. Skill-owned dependencies are prepared by their installation hooks and first-use checks.
|
|
58
71
|
|
|
59
|
-
|
|
72
|
+
To remove a plugin:
|
|
60
73
|
|
|
61
74
|
```bash
|
|
62
75
|
npx @mearl/setup@beta plugin uninstall tabs
|
|
63
76
|
```
|
|
64
77
|
|
|
65
|
-
|
|
66
|
-
`skills remove <skill> --global --yes
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
78
|
+
For entries under `~/.agents/skills/<skill>/`, setup first runs
|
|
79
|
+
`skills remove <skill> --global --yes`, then clears all registrations for that Skill on success.
|
|
80
|
+
If the entry directory was manually deleted, Skills can still identify the removal and clean its tracking records.
|
|
81
|
+
Removal failures preserve registrations for retry. Other manually registered paths only unregister from Mearl without deleting source.
|
|
82
|
+
Repeated removal of an unregistered name succeeds without changes.
|
|
70
83
|
|
|
71
|
-
##
|
|
84
|
+
## Manage browser Providers
|
|
72
85
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
86
|
+
Providers ship as npm packages without requiring their own CLI or install scripts. setup uses the current npm package manager
|
|
87
|
+
for global package lifecycle and reads `package.json#mearl.provider` to register the protocol entry,
|
|
88
|
+
browser type name, and form arguments:
|
|
76
89
|
|
|
77
90
|
```bash
|
|
78
91
|
npx @mearl/setup@beta provider install @example/mearl-provider-device
|
|
@@ -80,163 +93,168 @@ npx @mearl/setup@beta provider update example-device
|
|
|
80
93
|
npx @mearl/setup@beta provider uninstall example-device
|
|
81
94
|
```
|
|
82
95
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
- Mearl
|
|
91
|
-
- `install`
|
|
92
|
-
|
|
93
|
-
- `install`
|
|
94
|
-
- `-h` / `--help`
|
|
95
|
-
- `update`
|
|
96
|
-
`mearl-native-host
|
|
97
|
-
|
|
98
|
-
- `--local
|
|
99
|
-
`--
|
|
100
|
-
-
|
|
101
|
-
- `uninstall`
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
## 安装或更新浏览器扩展
|
|
96
|
+
Install accepts package names, versions, and dist-tags; update/remove accept providerId or full package name. Core @mearl packages always use public npm; other scopes follow caller package-manager settings. Installation uses the package manager launching setup;
|
|
97
|
+
updates and removal reuse the Provider's original manager. Records contain only
|
|
98
|
+
validated package names, installation directories, and package-local entries. Packages cannot inject launch commands, arguments, working directories, or environment variables.
|
|
99
|
+
Registration clears only after successful package removal, allowing retries.
|
|
100
|
+
|
|
101
|
+
## Behavior
|
|
102
|
+
|
|
103
|
+
- Mearl-owned npm packages install and update from `https://registry.npmjs.org/`, matching version queries. Third-party packages use current manager registry settings.
|
|
104
|
+
- `install` is optional: `npx @mearl/setup@beta` equals `npx @mearl/setup@beta install`.
|
|
105
|
+
An initial option also implies installation, such as `npx @mearl/setup@beta --cloud --yes`.
|
|
106
|
+
- `install` defaults to `--local` when no environment is specified.
|
|
107
|
+
- `-h` / `--help` shows help; `-v` / `--version` shows setup's version.
|
|
108
|
+
- Without environment flags, `update` and `uninstall` detect
|
|
109
|
+
`mearl-native-host`, `mearl-cloud-server`, and `mearl-mcp-server` in the current `PATH` and may process
|
|
110
|
+
multiple installed environments.
|
|
111
|
+
- Combine `--local`, `--cloud`, and `--mcp` to process only selected environments.
|
|
112
|
+
`--cloud-mode <id>` also selects cloud and requires an installed mode capability.
|
|
113
|
+
- Existing environments keep their original package manager and global prefix; first installation uses the manager launching setup.
|
|
114
|
+
- `uninstall` recognizes development symlinks installed through `npm link` or `dev:link` into npm global directories,
|
|
115
|
+
removing packages and command links through the original npm prefix while preserving repository source. Install/update autodetection handles normal global installations only.
|
|
116
|
+
- Cloud manages `@mearl/cloud-server` and `@mearl/client` together. WebSocket mode starts the server after first installation
|
|
117
|
+
and restarts after updates only if it was running. Other modes use installed `cloud.server.<id>`; all call `stop` before removal.
|
|
118
|
+
- local/cloud share `@mearl/client`. Combined installation processes it once; removing one environment retains it if the other needs it.
|
|
119
|
+
- Updating a 2.5.x cloud environment first removes `@mearl/cloud-client` to avoid its `mearl` bin conflicting with the unified client.
|
|
120
|
+
- local/cloud share the global mearl Skill, located through the Skills JSON inventory and processed once.
|
|
121
|
+
- Install/update reinstalls the global mearl Skill from the public repository through `skills add`, associating detected Agents. Updates must confirm this installation and check the global JSON inventory, not rely only on a third-party updater's exit code.
|
|
122
|
+
Skip with `--skip-skill`.
|
|
123
|
+
- Removing one environment retains the global mearl Skill if another depends on it.
|
|
124
|
+
- Automatic maintenance of selected presets preserves user registrations. Managed removal keeps shared Skill files when user aliases use the same directory.
|
|
125
|
+
- `uninstall --full` also removes every registered CLI plugin and browser Provider.
|
|
126
|
+
Skills-installed plugins remove their Skills; manually registered external plugins only unregister, retaining source. Provider
|
|
127
|
+
registrations clear only after successful npm removal. Individual failures do not block other cleanup, but the final exit is nonzero.
|
|
128
|
+
This does not remove the Chrome extension. `extension --full` still means installing the extension and complete local environment.
|
|
129
|
+
- After all environments, plugins, and Providers are successfully removed, `uninstall --full` stops the plugin service,
|
|
130
|
+
confirms no active or uncertain-exit tasks remain, and removes task history, source snapshots, service logs, and page-session files of ended hosts. Partial removal, individual failures, or a restarted service retain shared caches.
|
|
131
|
+
Rerun to finish cache cleanup even after packages and registrations are gone. Custom `MEARL_PLUGIN_DIR` limits cleanup to that registry's execution cache.
|
|
132
|
+
Notes, iteration records, settings, identities, plugin persistent state, Provider-private data, browser profiles, and exported designs remain;
|
|
133
|
+
CDP tab-ID counters also remain so stale requests cannot target new tabs.
|
|
134
|
+
- `@mearl/mcp-server` commands handle `--mcp` client configuration and cleanup.
|
|
135
|
+
- Default `install` / `update` do not manage the browser extension. The separate `extension` command reads
|
|
136
|
+
matching beta extension metadata from `https://github.com/mearlhq/mearl/releases/download/v<version>/` (stable setup uses `releases/latest/download/`) and downloads `mearl-chrome-v*.zip`, atomically extracting it into
|
|
137
|
+
`~/.mearl/chrome-extension`. First installation uses browser-level CDP `Extensions.loadUnpacked`;
|
|
138
|
+
later updates use `mearl check --local --json` to confirm the running extension comes from the setup-managed directory, replace
|
|
139
|
+
files, and reload through Native Host. The fixed directory and manifest `key` keep the extension ID
|
|
140
|
+
and browser storage stable.
|
|
141
|
+
- `extension --full` first installs or updates the extension, then uses the local profile to install
|
|
142
|
+
`@mearl/client`, install and initialize `@mearl/native-host`, and install the global Mearl Skill.
|
|
143
|
+
Both parts are attempted; any failure returns nonzero while retaining installed components. It does not install
|
|
144
|
+
cloud or MCP environments.
|
|
145
|
+
- Before downloading, CDP checks the source of an extension with the same ID. Installation proceeds if absent or `UNPACKED`
|
|
146
|
+
from the fixed directory. Chrome Web Store, enterprise-policy, and other local-directory installations remain by default. Only explicit
|
|
147
|
+
`--force` takes over and replaces them.
|
|
148
|
+
|
|
149
|
+
## Install or update the browser extension
|
|
138
150
|
|
|
139
151
|
```bash
|
|
140
152
|
npx @mearl/setup@beta extension
|
|
141
153
|
```
|
|
142
154
|
|
|
143
|
-
|
|
155
|
+
For first use, install the complete local browser environment at once:
|
|
144
156
|
|
|
145
157
|
```bash
|
|
146
158
|
npx @mearl/setup@beta extension --full
|
|
147
159
|
```
|
|
148
160
|
|
|
149
|
-
|
|
150
|
-
Chrome
|
|
151
|
-
`chrome://inspect/#remote-debugging
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
CDP
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
DevTools
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
##
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
`@mearl/client`
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
##
|
|
185
|
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
`--non-interactive
|
|
189
|
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
192
|
-
|
|
193
|
-
##
|
|
161
|
+
CDP is needed only for first installation, initial migration of older setup extensions, or unavailable Native Host reload. If
|
|
162
|
+
Chrome has not enabled CDP, interactive setup prompts you to open
|
|
163
|
+
`chrome://inspect/#remote-debugging`, enable remote debugging, and allow the connection, then waits for installation. Human-facing
|
|
164
|
+
instructions should omit `--yes`. Without a TTY, use `npx @mearl/setup@beta extension --yes`: it tries
|
|
165
|
+
once and stops immediately if CDP is unavailable. If setup ownership cannot be confirmed and CDP is unavailable, it does not download or modify
|
|
166
|
+
the extension directory. Enable CDP and rerun the same command. If Chrome lacks required extension-installation CDP methods,
|
|
167
|
+
the command stops and asks for a Chrome upgrade.
|
|
168
|
+
|
|
169
|
+
Each invocation reads the newest extension version from the download page, without requiring it to match setup, CLI, or Native Host.
|
|
170
|
+
CDP source checks and `Extensions.loadUnpacked` reuse one connection to avoid repeated authorization.
|
|
171
|
+
A successful installation saves a setup-management marker. `mearl check --local --json` reads the marker from the running extension too;
|
|
172
|
+
CDP-free updates require matching paths on both sides. If the user later installs the Store version, that running extension
|
|
173
|
+
does not return the marker. setup checks through CDP again and preserves the Store installation
|
|
174
|
+
unless `--force` is supplied.
|
|
175
|
+
|
|
176
|
+
Setup-managed extensions check remote `config.json` for updates without silently updating. A newer version adds
|
|
177
|
+
a red dot to the DevTools settings button and **Update now** and **Release notes** entries to quick settings.
|
|
178
|
+
Only clicking **Update now** makes Native Host revalidate the remote version, ownership marker, download URL,
|
|
179
|
+
optional SHA256, and ZIP manifest, then atomically replace the directory and reload. This path never falls back to CDP; Store,
|
|
180
|
+
enterprise-policy, and other-directory installations do not use setup updates. For updates downloaded by Chrome,
|
|
181
|
+
the extension passively listens to `runtime.onUpdateAvailable` and shows the same user-triggered reload notification, without
|
|
182
|
+
actively calling `runtime.requestUpdateCheck()`.
|
|
183
|
+
|
|
184
|
+
## Automatic updates following the extension
|
|
185
|
+
|
|
186
|
+
The extension and Native Host exchange versions on first connection. Each extension background startup checks once. When the extension
|
|
187
|
+
moves to a higher `major.minor` release line, the older Host keeps its connection available while invoking
|
|
188
|
+
the newest `@mearl/setup` in that `major.minor.x` range to update both `@mearl/native-host` and
|
|
189
|
+
`@mearl/client` to the newest versions in that range. On success, Host exits and the extension's existing reconnect mechanism
|
|
190
|
+
starts the new version. Success requires both local CLI versions to match and belong to the extension's release line.
|
|
191
|
+
|
|
192
|
+
Automatic updates never downgrade a newer Host or modify cloud, MCP, or independently installed Mearl Skills.
|
|
193
|
+
If the npm version is unpublished, the network unavailable, or updating fails, the old Host keeps running. The next extension background
|
|
194
|
+
lifecycle may retry; manual updates use `npx @mearl/setup@beta update --local`.
|
|
195
|
+
|
|
196
|
+
## Human and Agent use
|
|
197
|
+
|
|
198
|
+
- Humans running interactively should omit `--yes`; setup prompts for Skill targets or MCP clients when needed.
|
|
199
|
+
- Agents, CI, and other non-TTY environments should pass `--yes` or
|
|
200
|
+
`--non-interactive`. First installation selects detected Agent / MCP clients; removal clears
|
|
201
|
+
all detected relevant configuration.
|
|
202
|
+
- Non-TTY `install` / `uninstall` without these flags exits before changes and prints the correct command.
|
|
203
|
+
- Exit `0` means complete success, `1` incomplete execution, and `2` invalid arguments or interaction mode.
|
|
204
|
+
|
|
205
|
+
## Examples
|
|
194
206
|
|
|
195
207
|
```bash
|
|
196
|
-
#
|
|
208
|
+
# Default local browser environment installation
|
|
197
209
|
npx @mearl/setup
|
|
198
210
|
|
|
199
|
-
#
|
|
211
|
+
# Equivalent to the previous command
|
|
200
212
|
npx @mearl/setup@beta install
|
|
201
213
|
|
|
202
|
-
# Agent / CI
|
|
214
|
+
# Noninteractive Agent / CI installation
|
|
203
215
|
npx @mearl/setup@beta --yes
|
|
204
216
|
|
|
205
|
-
#
|
|
217
|
+
# Install the cloud Agent environment
|
|
206
218
|
npx @mearl/setup@beta --cloud
|
|
207
219
|
|
|
208
|
-
#
|
|
220
|
+
# Use one machine as both a local browser host and cloud Agent
|
|
209
221
|
npx @mearl/setup@beta --local --cloud
|
|
210
222
|
|
|
211
|
-
#
|
|
223
|
+
# Update all detected Mearl environments in the current PATH
|
|
212
224
|
npx @mearl/setup@beta update
|
|
213
225
|
|
|
214
|
-
#
|
|
226
|
+
# Independently install or update the latest browser extension
|
|
215
227
|
npx @mearl/setup@beta extension
|
|
216
228
|
|
|
217
|
-
#
|
|
229
|
+
# Complete local environment: client, Native Host, Skill, and extension
|
|
218
230
|
npx @mearl/setup@beta extension --full
|
|
219
231
|
|
|
220
|
-
#
|
|
232
|
+
# Remove only the local environment
|
|
221
233
|
npx @mearl/setup@beta uninstall --local
|
|
222
234
|
|
|
223
|
-
#
|
|
235
|
+
# Detect and uninstall without interaction
|
|
224
236
|
npx @mearl/setup@beta uninstall --yes
|
|
225
237
|
|
|
226
|
-
#
|
|
238
|
+
# Uninstall environments and all CLI plugins and Providers
|
|
227
239
|
npx @mearl/setup@beta uninstall --full
|
|
228
240
|
|
|
229
|
-
#
|
|
241
|
+
# Install an optional browser Provider
|
|
230
242
|
npx @mearl/setup@beta provider install @example/mearl-provider-device
|
|
231
243
|
npx @mearl/setup@beta provider install @example/mearl-provider-cloud
|
|
232
244
|
```
|
|
233
245
|
|
|
234
|
-
|
|
246
|
+
Existing npm/npx installation methods and CLIs for Mearl environment packages remain available; setup is the unified convenience entry.
|
|
247
|
+
|
|
248
|
+
## Preset installation
|
|
249
|
+
|
|
250
|
+
`mearl-setup preset apply <source-url-or-path>` prepares exact resources, activates local Node selections, and synchronizes the same browser resources to compatible extensions. `preset update` preserves user overrides; `preset status` reads actual readiness. Exit `3` means pending synchronization/installation. The extension, defaults, Skills/Providers, and web installation use the same actual-state checks; see the [local installation contract](../../docs/preset-installation.md).
|
|
251
|
+
|
|
252
|
+
Before replacing packages, install/update saves exact resources and expected selections for the selected Preset, then synchronizes hosts and installs Skills after runtime initialization. `extension --full` prepares the same resources before replacing the extension. Existing local selections take priority; explicit `--preset` updates or repairs resources. Unavailable configuration or resources stop package changes; retries after partial upgrades use saved records. Removal never prepares or installs Presets.
|
|
235
253
|
|
|
236
|
-
|
|
254
|
+
The default directory is the public site's `installation.json`; override with HTTPS `MEARL_INSTALLATION_CONFIG_URL` (loopback HTTP allowed for local validation). It uses the web installation validation contract and reports pending until both local and browser sides confirm.
|
|
237
255
|
|
|
238
|
-
|
|
256
|
+
## Browser presets and distribution entry points
|
|
239
257
|
|
|
240
|
-
|
|
258
|
+
Explicit setup first reuses the local preset. Without one, after runtime initialization and before Skill installation, it adopts the connected browser's trusted preset. Explicit `--preset <source>` wins. Differing browser selections, untrusted sources, or failed state reads require an explicit choice. First connection waits about one minute; closed browsers receive only the base environment and retry guidance. Ordinary connections and background core updates do not install an initial local preset.
|
|
241
259
|
|
|
242
|
-
|
|
260
|
+
Distributions can set local-process `MEARL_SETUP_DEFAULT_PRESET` to a default manifest source. It applies only when neither side has a selection. Plugin, Provider, removal, and other subcommands keep their behavior. The public installer still owns installation and status verification.
|