fix(openclaw-bridge): seed "hook:" prefix + require explicit delivery prompt (alpha.2)#11
Open
fix(openclaw-bridge): seed "hook:" prefix + require explicit delivery prompt (alpha.2)#11
Conversation
…KeyPrefixes OpenClaw's gateway refuses to start with `hooks.allowedSessionKeyPrefixes must include 'hook:' when hooks.defaultSessionKey is unset` whenever the config doesn't list `hook:` as an allowed prefix and `defaultSessionKey` is also blank — `hook:` is OpenClaw's own default sessionKey namespace. The previous `ensure_openclaw_hooks` only merged `"w2a:"` into the allowlist, so on a clean machine where the array starts empty the result was `["w2a:"]` and the gateway refused to come up. Hosts that already had OpenClaw running picked up the implicit `["hook:"]` default and silently stayed healthy, masking the bug. - merge both "hook:" and "w2a:" idempotently in _lib.sh's jq rewrite - add has_hook probe so legacy victims (allowlist already pruned to ["w2a:"]) self-heal on the next bootstrap run - update bootstrap.sh's manual fallback hint and README quick-start to show ["hook:", "w2a:"] Verified across five inputs: empty config, legacy ["w2a:"], default ["hook:"], already-healed, and user-extended ["hook:", "hook:gmail:"] — jq stays idempotent and preserves user-supplied prefixes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rface mode in script output
Sensors installed without a notify target silently fell back to
dashboard-only — install-sensor.sh's stdout looked identical to a
fully-wired push sensor, so the agent reported "installed!" and the user
never realized signals weren't being pushed anywhere. The default flow
relied on `~/.openclaw/.env` containing `<PLATFORM>_HOME_CHANNEL=<handle>`,
but that file rarely exists on a fresh OpenClaw install and the SKILL
explicitly told the agent "don't ask the user about delivery unless they
raise it" — combined, that produced a silent-failure UX.
- install-sensor.sh: emit `delivery: {mode, channel, to}` in the success
JSON so the agent has ground truth on what was wired up
- SKILL.md Step 3: drop the "don't ask" guidance; agent MUST ask three
short questions (push vs dashboard / which platform / target ID) in the
user's conversation language before installing. The .env auto-fill
stays as a power-user shortcut but the SKILL no longer reads or
recommends it.
- SKILL.md Step 6: branch report on `delivery.mode` — push mode says
where replies go; dashboard-only mode explicitly warns the user that
no IM target is configured and tells them how to enable push later.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The SKILL.md "Conversation language" section already directs the agent to translate Q&A into the user's language at runtime. Embedding Chinese example questions in the SKILL itself (added in 5289781) contradicts that contract — it suggests the examples are literal scripts to recite rather than templates the agent translates per user. Switch the three delivery prompts back to English; the agent will translate them on the fly per the existing language directive. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nova-machinepulse
approved these changes
May 2, 2026
Contributor
Nova-machinepulse
left a comment
There was a problem hiding this comment.
Approved by Nova-machinepulse via Lark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two production bugs surfaced when a Windows tester ran the openclaw-bridge SKILL on a fresh OpenClaw install. Both are independent of platform but the clean-environment + no-prior-OpenClaw combo made them visible:
hooks.allowedSessionKeyPrefixes must include 'hook:' when hooks.defaultSessionKey is unset. Ourensure_openclaw_hooksonly seeded"w2a:"into the allowlist; on a clean machine that left["w2a:"]and tripped OpenClaw's startup validator. Hosts with prior OpenClaw setup masked the bug because they already had["hook:"]from OpenClaw's own default.~/.openclaw/.envcontaining<PLATFORM>_HOME_CHANNEL,install-sensor.shfell back to dashboard-only and emitted the same success JSON as a fully-wired push sensor. The SKILL explicitly told the agent "don't ask the user about delivery unless they raise it" — combined with the silent fallback, users got "Installed!" and never learned no IM target was configured.Changes
fix(openclaw-bridge): seed "hook:" alongside "w2a:" in allowedSessionKeyPrefixes_lib.sh: jq merge now seeds bothhook:andw2a:idempotently; newhas_hookprobe makes legacy victims (["w2a:"]only) self-heal on the next bootstrap runbootstrap.sh: manual fallback hint updatedREADME.md: quick-start example updatedVerified across five inputs (empty, legacy
["w2a:"], default["hook:"], already-healed, user-extended["hook:", "hook:gmail:"]) — idempotent and preserves user-supplied prefixes.fix(openclaw-bridge): require explicit delivery prompt at install, surface mode in script outputinstall-sensor.sh: success JSON now includesdelivery: {mode, channel, to}so the agent has ground truth on what was wired upSKILL.mdStep 3: agent MUST ask three questions in the user's language (push vs dashboard / which platform / target ID) before installing..envauto-fill stays as a power-user shortcut but the SKILL no longer reads or recommends itSKILL.mdStep 6: branch ondelivery.mode— push mode tells where replies go; dashboard-only mode explicitly warns the user no IM target is configuredchore(openclaw-bridge): bump to 0.1.0-alpha.2Post-merge release notes (action required)
When publishing 0.1.0-alpha.2 to npm, also move the
latestdist-tag:Currently
lateststill points to0.1.0-alpha.0, which is why freshnpm install -g @world2agent/openclaw-sensor-bridge(no tag) pulls the oldworld2agent-sensor-runnerbinary that doesn't match the post-rename SKILL scripts.Test plan
🤖 Generated with Claude Code