@openclawbrain/cli 0.4.0 → 0.4.1

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 CHANGED
@@ -1,18 +1,31 @@
1
1
  # @openclawbrain/cli
2
2
 
3
- Staged operator split for OpenClawBrain.
3
+ `@openclawbrain/cli@0.4.1` is the published operator CLI package for OpenClawBrain.
4
4
 
5
- - This package carries the `openclawbrain` CLI, daemon controls, import/export helpers, and install/status/operator management code.
6
- - `@openclawbrain/openclaw` is the plugin/runtime payload.
7
- - Public install docs are not switched yet; this package exists in-repo so the split can be verified before release.
5
+ Primary public flow:
6
+
7
+ ```bash
8
+ openclaw plugins install @openclawbrain/openclaw@0.4.0
9
+ npx @openclawbrain/cli@0.4.1 openclawbrain install --openclaw-home ~/.openclaw
10
+ openclaw gateway restart
11
+ npx @openclawbrain/cli@0.4.1 openclawbrain status --openclaw-home ~/.openclaw --detailed
12
+ ```
13
+
14
+ Patch note for `0.4.1`: rerunning `openclawbrain install --shared` against a native package install that is already pinned to the requested activation root is now a successful no-op instead of a false repin failure.
15
+
16
+ Current caveat: some hosts still warn about a plugin id mismatch because the plugin manifest uses `openclawbrain` while the package/entry hint uses `openclaw`. The install still works; treat that warning as currently cosmetic.
17
+
18
+ This package carries the `openclawbrain` CLI, daemon controls, import/export helpers, and install/status/operator management code. `@openclawbrain/openclaw` is the plugin/runtime payload.
8
19
 
9
20
  ## Commands
10
21
 
11
22
  ```bash
12
- openclawbrain install --openclaw-home ~/.openclaw
13
- openclawbrain status --openclaw-home ~/.openclaw --detailed
14
- openclawbrain rollback --activation-root /var/openclawbrain/activation --dry-run
15
- openclawbrain daemon status --activation-root /var/openclawbrain/activation
23
+ npx @openclawbrain/cli@0.4.1 openclawbrain install --openclaw-home ~/.openclaw
24
+ npx @openclawbrain/cli@0.4.1 openclawbrain status --openclaw-home ~/.openclaw --detailed
25
+ npx @openclawbrain/cli@0.4.1 openclawbrain rollback --activation-root /var/openclawbrain/activation --dry-run
26
+ npx @openclawbrain/cli@0.4.1 openclawbrain daemon status --activation-root /var/openclawbrain/activation
16
27
  ```
17
28
 
18
- The old `openclawbrain-ops` alias stays wired to the same entrypoint for staged compatibility.
29
+ If the CLI is already on your `PATH`, `openclawbrain ...` is the same command surface. The docs lead with `npx` because that is the clean-host public-registry lane that already passed on `redogfood`.
30
+
31
+ The old `openclawbrain-ops` alias stays wired to the same entrypoint for compatibility.
@@ -258,11 +258,16 @@ export function resolveOpenClawBrainInstallTarget(openclawHome) {
258
258
  }
259
259
  export function pinInstalledOpenClawBrainPluginActivationRoot(loaderEntryPath, activationRoot) {
260
260
  const loaderSource = readFileSync(loaderEntryPath, "utf8");
261
+ const activationRootPattern = /const\s+ACTIVATION_ROOT\s*=\s*["'`][^"'`]*["'`];/;
261
262
  const pinnedActivationRoot = `const ACTIVATION_ROOT = ${JSON.stringify(activationRoot)};`;
262
- const nextLoaderSource = loaderSource.replace(/const\s+ACTIVATION_ROOT\s*=\s*["'`][^"'`]*["'`];/, pinnedActivationRoot);
263
- if (nextLoaderSource === loaderSource) {
263
+ const matchedActivationRoot = loaderSource.match(activationRootPattern)?.[0] ?? null;
264
+ if (matchedActivationRoot === null) {
264
265
  throw new Error(`Installed loader entry ${loaderEntryPath} does not expose a patchable ACTIVATION_ROOT constant`);
265
266
  }
267
+ if (matchedActivationRoot === pinnedActivationRoot) {
268
+ return;
269
+ }
270
+ const nextLoaderSource = loaderSource.replace(activationRootPattern, pinnedActivationRoot);
266
271
  writeFileSync(loaderEntryPath, nextLoaderSource, "utf8");
267
272
  }
268
273
  export function resolveOpenClawHomeFromExtensionEntryPath(extensionEntryPath) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openclawbrain/cli",
3
- "version": "0.4.0",
4
- "description": "Staged OpenClawBrain operator package with the openclawbrain CLI, daemon, install/status helpers, and import/export tooling.",
3
+ "version": "0.4.1",
4
+ "description": "OpenClawBrain operator CLI package with install/status helpers, daemon controls, and import/export tooling.",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
7
7
  "types": "./dist/src/index.d.ts",