@agentchatme/openclaw 0.6.1 → 0.6.2

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,78 @@ 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.2 — 2026-04-25
9
+
10
+ ### Unblock `openclaw plugins install` on stock end-user machines — strip publish-time fields
11
+
12
+ User reported `openclaw plugins install @agentchatme/openclaw` failing on a
13
+ clean Hetzner Ubuntu box with the truncated message:
14
+
15
+ > npm install failed:
16
+
17
+ with no further detail. Investigation against OpenClaw's own source
18
+ ([`src/infra/install-package-dir.ts`](https://github.com/openclaw/openclaw/blob/main/src/infra/install-package-dir.ts))
19
+ found that the installer runs `npm install --omit=dev --silent
20
+ --ignore-scripts` inside the extracted plugin directory. The `--omit=dev`
21
+ flag excludes `devDependencies`, but `peerDependencies` are NOT stripped —
22
+ npm tries to resolve them as part of the install. Our published manifest
23
+ declared `peerDependencies: { "openclaw": ">=2026.4.0" }`; on an end-user
24
+ machine without a local OpenClaw checkout, npm's peer-dep resolution
25
+ either ERESOLVE-conflicts, 404s on a private spec, or pulls a heavy peer
26
+ tree that fails for unrelated reasons. The `--silent` flag suppresses
27
+ npm's stderr, which is why the user only saw `npm install failed:` with
28
+ no tail.
29
+
30
+ This release adopts the **publish-time strip pattern** that OpenClaw's
31
+ first-party reference plugin `@openclaw/matrix` uses (verified against
32
+ the published manifest at
33
+ `https://registry.npmjs.org/@openclaw/matrix/2026.3.13` — `devDependencies`,
34
+ `peerDependencies`, and `peerDependenciesMeta` are all `null` in the
35
+ tarball, while the in-repo source keeps them for development).
36
+
37
+ **New:**
38
+
39
+ - `scripts/strip-publish-fields.mjs` — runs as `prepack` (snapshot +
40
+ strip) and `postpack` (restore). Removes `devDependencies`,
41
+ `peerDependencies`, `peerDependenciesMeta` from the *published*
42
+ `package.json`; the working-tree copy is unchanged after pack
43
+ completes. Also guards against any runtime `dependencies` using
44
+ `workspace:` / `file:` / `link:` specs that npm cannot resolve from
45
+ the registry — pnpm should already rewrite those at publish time, but
46
+ the guard catches drift before it hits users.
47
+ - `package.json` — `prepack` and `postpack` script hooks wired.
48
+ `prepublishOnly` (build + type-check + test) is preserved.
49
+
50
+ **Removed (no-op for community plugins):**
51
+
52
+ - `package.json` `openclaw.bundle.stageRuntimeDependencies` — this flag
53
+ is consumed only by OpenClaw's release-time
54
+ `scripts/stage-bundled-plugin-runtime-deps.mjs` for plugins shipped
55
+ in-tree by OpenClaw maintainers. Per
56
+ [`docs.openclaw.ai/plugins/bundles`](https://docs.openclaw.ai/plugins/bundles)
57
+ it has no effect on community plugins installed via `openclaw plugins
58
+ install`. Removed to avoid implying a contract that does not exist.
59
+
60
+ ### `hasAgentChatConfiguredState` now requires `agentHandle`
61
+
62
+ `src/configured-state.ts` previously checked only `apiKey.length >= 20`.
63
+ A config with a valid key but no handle would pass the gate, the runtime
64
+ would start, and the agent would have no identity — the `agent-prompt`
65
+ hook silently injects no hints, the inbound bridge cannot self-filter
66
+ echoes (`sender === config.agentHandle` always false). Refusing to count
67
+ the channel as "configured" until the handle is present surfaces the gap
68
+ at the gateway boundary instead of letting it manifest as "the agent
69
+ just doesn't know it's on the network." Added
70
+ `tests/configured-state.test.ts` covering the new bar (apiKey-only is
71
+ rejected, empty / whitespace handle rejected, non-string fields rejected).
72
+
73
+ ### Behavior unchanged otherwise
74
+
75
+ The runtime, binding adapters, agent tools, agent prompt, bundled skill,
76
+ state machine, outbound queue, circuit breaker, and ws-client are
77
+ byte-identical to 0.6.1. This is a publish-pipeline + configured-state
78
+ correctness release.
79
+
8
80
  ## 0.6.1 — 2026-04-25
9
81
 
10
82
  ### Strip trigger keywords from defensive comments — install scanner now passes
@@ -4,7 +4,10 @@
4
4
  function hasAgentChatConfiguredState(config) {
5
5
  if (!config || typeof config !== "object") return false;
6
6
  const key = config.apiKey;
7
- return typeof key === "string" && key.length >= 20;
7
+ if (typeof key !== "string" || key.length < 20) return false;
8
+ const handle = config.agentHandle;
9
+ if (typeof handle !== "string" || handle.trim().length === 0) return false;
10
+ return true;
8
11
  }
9
12
 
10
13
  exports.hasAgentChatConfiguredState = hasAgentChatConfiguredState;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configured-state.ts"],"names":[],"mappings":";;;AAaO,SAAS,4BAA4B,MAAA,EAA8C;AACxF,EAAA,IAAI,CAAC,MAAA,IAAU,OAAO,MAAA,KAAW,UAAU,OAAO,KAAA;AAClD,EAAA,MAAM,MAAM,MAAA,CAAO,MAAA;AACnB,EAAA,OAAO,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,CAAI,MAAA,IAAU,EAAA;AAClD","file":"configured-state.cjs","sourcesContent":["/**\n * Configured-state predicate for the AgentChat channel.\n *\n * OpenClaw calls this to decide whether the channel has \"enough\" config to\n * be considered active (counts toward enabled channels, shown in UI, etc.).\n *\n * Minimum bar: an `apiKey` of plausible length is present.\n */\n\nexport interface MaybeConfigured {\n readonly apiKey?: unknown\n}\n\nexport function hasAgentChatConfiguredState(config: MaybeConfigured | undefined): boolean {\n if (!config || typeof config !== 'object') return false\n const key = config.apiKey\n return typeof key === 'string' && key.length >= 20\n}\n"]}
1
+ {"version":3,"sources":["../src/configured-state.ts"],"names":[],"mappings":";;;AAmBO,SAAS,4BAA4B,MAAA,EAA8C;AACxF,EAAA,IAAI,CAAC,MAAA,IAAU,OAAO,MAAA,KAAW,UAAU,OAAO,KAAA;AAClD,EAAA,MAAM,MAAM,MAAA,CAAO,MAAA;AACnB,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,CAAI,MAAA,GAAS,IAAI,OAAO,KAAA;AACvD,EAAA,MAAM,SAAS,MAAA,CAAO,WAAA;AACtB,EAAA,IAAI,OAAO,WAAW,QAAA,IAAY,MAAA,CAAO,MAAK,CAAE,MAAA,KAAW,GAAG,OAAO,KAAA;AACrE,EAAA,OAAO,IAAA;AACT","file":"configured-state.cjs","sourcesContent":["/**\n * Configured-state predicate for the AgentChat channel.\n *\n * OpenClaw calls this to decide whether the channel has \"enough\" config to\n * be considered active (counts toward enabled channels, shown in UI, etc.).\n *\n * Bar: an `apiKey` of plausible length AND a non-empty `agentHandle`.\n * Without the handle the runtime will start but the agent has no identity\n * to inject into prompts or to use as a self-filter on inbound — both\n * downstream surfaces silently degrade. Refusing to count the channel as\n * \"configured\" until the handle is present surfaces the gap at the\n * gateway boundary instead.\n */\n\nexport interface MaybeConfigured {\n readonly apiKey?: unknown\n readonly agentHandle?: unknown\n}\n\nexport function hasAgentChatConfiguredState(config: MaybeConfigured | undefined): boolean {\n if (!config || typeof config !== 'object') return false\n const key = config.apiKey\n if (typeof key !== 'string' || key.length < 20) return false\n const handle = config.agentHandle\n if (typeof handle !== 'string' || handle.trim().length === 0) return false\n return true\n}\n"]}
@@ -4,10 +4,16 @@
4
4
  * OpenClaw calls this to decide whether the channel has "enough" config to
5
5
  * be considered active (counts toward enabled channels, shown in UI, etc.).
6
6
  *
7
- * Minimum bar: an `apiKey` of plausible length is present.
7
+ * Bar: an `apiKey` of plausible length AND a non-empty `agentHandle`.
8
+ * Without the handle the runtime will start but the agent has no identity
9
+ * to inject into prompts or to use as a self-filter on inbound — both
10
+ * downstream surfaces silently degrade. Refusing to count the channel as
11
+ * "configured" until the handle is present surfaces the gap at the
12
+ * gateway boundary instead.
8
13
  */
9
14
  interface MaybeConfigured {
10
15
  readonly apiKey?: unknown;
16
+ readonly agentHandle?: unknown;
11
17
  }
12
18
  declare function hasAgentChatConfiguredState(config: MaybeConfigured | undefined): boolean;
13
19
 
@@ -4,10 +4,16 @@
4
4
  * OpenClaw calls this to decide whether the channel has "enough" config to
5
5
  * be considered active (counts toward enabled channels, shown in UI, etc.).
6
6
  *
7
- * Minimum bar: an `apiKey` of plausible length is present.
7
+ * Bar: an `apiKey` of plausible length AND a non-empty `agentHandle`.
8
+ * Without the handle the runtime will start but the agent has no identity
9
+ * to inject into prompts or to use as a self-filter on inbound — both
10
+ * downstream surfaces silently degrade. Refusing to count the channel as
11
+ * "configured" until the handle is present surfaces the gap at the
12
+ * gateway boundary instead.
8
13
  */
9
14
  interface MaybeConfigured {
10
15
  readonly apiKey?: unknown;
16
+ readonly agentHandle?: unknown;
11
17
  }
12
18
  declare function hasAgentChatConfiguredState(config: MaybeConfigured | undefined): boolean;
13
19
 
@@ -2,7 +2,10 @@
2
2
  function hasAgentChatConfiguredState(config) {
3
3
  if (!config || typeof config !== "object") return false;
4
4
  const key = config.apiKey;
5
- return typeof key === "string" && key.length >= 20;
5
+ if (typeof key !== "string" || key.length < 20) return false;
6
+ const handle = config.agentHandle;
7
+ if (typeof handle !== "string" || handle.trim().length === 0) return false;
8
+ return true;
6
9
  }
7
10
 
8
11
  export { hasAgentChatConfiguredState };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configured-state.ts"],"names":[],"mappings":";AAaO,SAAS,4BAA4B,MAAA,EAA8C;AACxF,EAAA,IAAI,CAAC,MAAA,IAAU,OAAO,MAAA,KAAW,UAAU,OAAO,KAAA;AAClD,EAAA,MAAM,MAAM,MAAA,CAAO,MAAA;AACnB,EAAA,OAAO,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,CAAI,MAAA,IAAU,EAAA;AAClD","file":"configured-state.js","sourcesContent":["/**\n * Configured-state predicate for the AgentChat channel.\n *\n * OpenClaw calls this to decide whether the channel has \"enough\" config to\n * be considered active (counts toward enabled channels, shown in UI, etc.).\n *\n * Minimum bar: an `apiKey` of plausible length is present.\n */\n\nexport interface MaybeConfigured {\n readonly apiKey?: unknown\n}\n\nexport function hasAgentChatConfiguredState(config: MaybeConfigured | undefined): boolean {\n if (!config || typeof config !== 'object') return false\n const key = config.apiKey\n return typeof key === 'string' && key.length >= 20\n}\n"]}
1
+ {"version":3,"sources":["../src/configured-state.ts"],"names":[],"mappings":";AAmBO,SAAS,4BAA4B,MAAA,EAA8C;AACxF,EAAA,IAAI,CAAC,MAAA,IAAU,OAAO,MAAA,KAAW,UAAU,OAAO,KAAA;AAClD,EAAA,MAAM,MAAM,MAAA,CAAO,MAAA;AACnB,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,CAAI,MAAA,GAAS,IAAI,OAAO,KAAA;AACvD,EAAA,MAAM,SAAS,MAAA,CAAO,WAAA;AACtB,EAAA,IAAI,OAAO,WAAW,QAAA,IAAY,MAAA,CAAO,MAAK,CAAE,MAAA,KAAW,GAAG,OAAO,KAAA;AACrE,EAAA,OAAO,IAAA;AACT","file":"configured-state.js","sourcesContent":["/**\n * Configured-state predicate for the AgentChat channel.\n *\n * OpenClaw calls this to decide whether the channel has \"enough\" config to\n * be considered active (counts toward enabled channels, shown in UI, etc.).\n *\n * Bar: an `apiKey` of plausible length AND a non-empty `agentHandle`.\n * Without the handle the runtime will start but the agent has no identity\n * to inject into prompts or to use as a self-filter on inbound — both\n * downstream surfaces silently degrade. Refusing to count the channel as\n * \"configured\" until the handle is present surfaces the gap at the\n * gateway boundary instead.\n */\n\nexport interface MaybeConfigured {\n readonly apiKey?: unknown\n readonly agentHandle?: unknown\n}\n\nexport function hasAgentChatConfiguredState(config: MaybeConfigured | undefined): boolean {\n if (!config || typeof config !== 'object') return false\n const key = config.apiKey\n if (typeof key !== 'string' || key.length < 20) return false\n const handle = config.agentHandle\n if (typeof handle !== 'string' || handle.trim().length === 0) return false\n return true\n}\n"]}
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.1";
1807
+ var PACKAGE_VERSION = "0.6.2";
1808
1808
 
1809
1809
  // src/outbound.ts
1810
1810
  var DEFAULT_RETRY_POLICY = {
@@ -4418,7 +4418,10 @@ var agentchatSetupEntry = channelCore.defineSetupPluginEntry(agentchatPlugin);
4418
4418
  function hasAgentChatConfiguredState(config) {
4419
4419
  if (!config || typeof config !== "object") return false;
4420
4420
  const key = config.apiKey;
4421
- return typeof key === "string" && key.length >= 20;
4421
+ if (typeof key !== "string" || key.length < 20) return false;
4422
+ const handle = config.agentHandle;
4423
+ if (typeof handle !== "string" || handle.trim().length === 0) return false;
4424
+ return true;
4422
4425
  }
4423
4426
 
4424
4427
  exports.AGENTCHAT_CHANNEL_ID = AGENTCHAT_CHANNEL_ID;