@agentchatme/openclaw 0.6.2 → 0.6.4

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/CHANGELOG.md CHANGED
@@ -5,6 +5,144 @@ All notable changes to `@agentchatme/openclaw` are documented here.
5
5
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
6
6
  this package adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.6.4 — 2026-04-27
9
+
10
+ ### Fix: `openclaw plugins install` failed at the persist step with `must have required property 'apiKey'`
11
+
12
+ After 0.6.3 unblocked the `npm install` phase, the next step in OpenClaw's
13
+ install pipeline — `persistPluginInstall`, which writes the plugin entry
14
+ into `~/.openclaw/openclaw.json` — failed with:
15
+
16
+ ```
17
+ [plugins] agentchat invalid config: apiKey: must have required property 'apiKey',
18
+ reconnect: must have required property 'reconnect', ping: ..., outbound: ...,
19
+ observability: must have required property 'observability'
20
+ ```
21
+
22
+ OpenClaw's manifest validator runs JSON Schema validation on the persisted
23
+ config block at install time, **before** the setup wizard runs. The
24
+ emitted `openclaw.plugin.json#configSchema` had `required: ['apiBase',
25
+ 'apiKey', 'reconnect', 'ping', 'outbound', 'observability']`, so the empty
26
+ config that ships with a fresh install was rejected outright. The plugin's
27
+ files landed on disk, but the entry was never registered, leaving the
28
+ install in a half-completed state.
29
+
30
+ The schema described the **fully-configured** shape, which is correct for
31
+ runtime ("apiKey is required to actually authenticate"), but is wrong for
32
+ install-time ("nothing is required yet — the wizard is about to run").
33
+ Two layers were doing the same job at the wrong time. The configured-state
34
+ predicate (`hasAgentChatConfiguredState`) already exists and gates the
35
+ runtime correctly: it returns `false` until both `apiKey` (≥ 20 chars) and
36
+ `agentHandle` are populated. OpenClaw uses that gate to decide whether to
37
+ start the channel runtime. The schema just needed to step out of the
38
+ install-time validation path.
39
+
40
+ **Changed:**
41
+
42
+ - `scripts/emit-manifest-schema.mjs` — post-process now drops the top-
43
+ level `required` array from `openclaw.plugin.json#configSchema` after
44
+ the runtime schema is emitted. Every individual property still keeps
45
+ its type, format, regex, and bounds — so a value supplied at the wrong
46
+ type still fails validation. Only the **presence** check at the top
47
+ level is removed. The Zod schema in `src/config-schema.ts` stays
48
+ strict (apiKey + nested groups required) because the runtime parser
49
+ is only called after `resolveAgentchatAccount` has confirmed the
50
+ config is non-empty; the empty install-time case bypasses Zod
51
+ entirely. We deliberately do NOT push `default: {}` onto the nested-
52
+ object subschemas because JSON Schema validators differ on whether
53
+ they descend into a defaulted object and revalidate its inner
54
+ `required` array — a permissive validator that auto-fills
55
+ `reconnect: {}` and then fails on the inner `required` would
56
+ reintroduce the install-time blocker.
57
+ - `tests/plugin.test.ts#manifest sync` — updated to mirror the new
58
+ transform (drop `required` from the expected manifest derivation) and
59
+ added a positive regression test that asserts
60
+ `manifest.configSchema.required` is `undefined`. A future commit that
61
+ reintroduces a top-level required array fails this test before
62
+ publish.
63
+
64
+ **Why no Zod change:**
65
+
66
+ The runtime parser (`parseChannelConfig`) is gated in
67
+ `resolveAgentchatAccount` — it's only called when the persisted config
68
+ section has at least one key. An empty install-time config block never
69
+ reaches Zod, so the runtime schema can stay strict without blocking
70
+ install. Once the setup wizard fills in `apiKey` (and optionally
71
+ `agentHandle`), the now-non-empty config block passes through Zod with
72
+ all the type, format, and bounds checks intact, the configured-state
73
+ predicate flips to `true`, and the runtime starts.
74
+
75
+ ## 0.6.3 — 2026-04-27
76
+
77
+ ### Fix: `openclaw plugins install` failed with `EUNSUPPORTEDPROTOCOL` on ClawHub source-linked builds
78
+
79
+ 0.6.2 still failed end-user installs with the same truncated `npm install
80
+ failed:` symptom 0.6.2 was supposed to fix. Root cause was different this
81
+ time and only visible after we recovered the swallowed npm log from the
82
+ target machine:
83
+
84
+ ```
85
+ error code EUNSUPPORTEDPROTOCOL
86
+ error Unsupported URL Type "workspace:": workspace:^
87
+ ```
88
+
89
+ The committed source `package.json` declared
90
+ `dependencies."@agentchatme/agentchat": "workspace:^"`. pnpm rewrites this
91
+ to a real semver during `pnpm pack` / `pnpm publish`, so the **npm tarball**
92
+ (`registry.npmjs.org/@agentchatme/openclaw/0.6.2`) is fully clean — the
93
+ spec resolves to `^1.3.0` there. But ClawHub builds community plugins via
94
+ **source-linked verification**: it zips the GitHub source tree at the
95
+ release tag and ships that. `pnpm pack` is never invoked on that path, so
96
+ the `workspace:^` spec reaches end-user machines verbatim, where OpenClaw
97
+ runs `npm install` (not pnpm) and npm rejects the spec at `Arborist`'s
98
+ ideal-tree build step.
99
+
100
+ OpenClaw's `--silent` flag (hardcoded in
101
+ [`src/infra/install-package-dir.ts`](https://github.com/openclaw/openclaw/blob/main/src/infra/install-package-dir.ts))
102
+ suppressed both stdout and stderr, so the user saw only `npm install
103
+ failed:` with nothing after — exactly the same surface as 0.6.1's
104
+ `peerDependencies` bug, but a fundamentally different root cause.
105
+
106
+ The fix is a **production-grade lockdown** — single source of truth, no
107
+ process gymnastics, regression-proof:
108
+
109
+ **Changed:**
110
+
111
+ - `package.json` — `dependencies."@agentchatme/agentchat"` pinned to
112
+ `^1.3.0` (real semver). The committed source is now installable by raw
113
+ npm. Bun, Yarn, npm clone, ClawHub source-linked builds — all succeed.
114
+ - `pnpm-workspace.yaml` (monorepo root) — added
115
+ `linkWorkspacePackages: true` and `preferWorkspacePackages: true`.
116
+ pnpm continues to symlink the in-tree SDK during development even
117
+ though the spec is now a normal semver range; the dev-loop is
118
+ unchanged. Settings live here rather than `.npmrc` because `.npmrc`
119
+ is `.gitignore`d project-wide to prevent npm auth-token leakage.
120
+ - `scripts/strip-publish-fields.mjs` — guard now rejects `workspace:` and
121
+ `catalog:` specs in `dependencies` in addition to `file:` and `link:`.
122
+ Prior comment explicitly allowed `workspace:` on the assumption that
123
+ pnpm pack would rewrite it; that assumption holds for the npm tarball
124
+ but not for ClawHub source-linked builds, so the guard is widened.
125
+
126
+ **New:**
127
+
128
+ - `scripts/verify-source-installs.mjs` — regression test wired into
129
+ `prepublishOnly`. Copies the source `package.json` into a fresh temp
130
+ dir and runs `npm install --dry-run --omit=dev --ignore-scripts ...`
131
+ (the same flags ClawHub-side OpenClaw uses, minus `--silent`). A
132
+ future commit that re-introduces a `workspace:`, `file:`, `link:`, or
133
+ `catalog:` spec in `dependencies` cannot reach npm or ClawHub — the
134
+ prepublish hook fails first with the actual npm error message.
135
+
136
+ ### Upstream improvement (filed in parallel, non-blocking)
137
+
138
+ OpenClaw `src/infra/install-package-dir.ts` hardcodes `--silent` on the
139
+ spawned `npm install`, which suppresses every user-actionable error.
140
+ Combined with the failure handler that formats `"npm install failed: " +
141
+ (stderr || stdout).trim()`, an empty buffer renders as the bare prefix.
142
+ A PR proposing replacement with `--loglevel=error` (or removal of the
143
+ flag entirely) is filed against `openclaw/openclaw` so the next community
144
+ plugin author hits a real error instead of an empty one.
145
+
8
146
  ## 0.6.2 — 2026-04-25
9
147
 
10
148
  ### Unblock `openclaw plugins install` on stock end-user machines — strip publish-time fields
package/dist/index.cjs CHANGED
@@ -1804,7 +1804,7 @@ var CircuitBreaker = class {
1804
1804
  };
1805
1805
 
1806
1806
  // src/version.ts
1807
- var PACKAGE_VERSION = "0.6.2";
1807
+ var PACKAGE_VERSION = "0.6.4";
1808
1808
 
1809
1809
  // src/outbound.ts
1810
1810
  var DEFAULT_RETRY_POLICY = {