Skip to content

feat(openclaw-bridge): zero-touch bootstrap + payload alignment (alpha.1)#10

Merged
daibor merged 2 commits intomainfrom
feat/openclaw-bridge-bootstrap-and-defaults
Apr 29, 2026
Merged

feat(openclaw-bridge): zero-touch bootstrap + payload alignment (alpha.1)#10
daibor merged 2 commits intomainfrom
feat/openclaw-bridge-bootstrap-and-defaults

Conversation

@daibor
Copy link
Copy Markdown
Collaborator

@daibor daibor commented Apr 29, 2026

Summary

  • Auto-bootstrap. bootstrap.sh now npm install -gs the bridge package when its binaries aren't on PATH, and idempotently fixes the hooks block in ~/.openclaw/openclaw.json (enables hooks, generates token only if absent, sets allowRequestSessionKey, ensures "w2a:" in allowedSessionKeyPrefixes). A timestamped backup is written next to the file before any mutation; gateway_restart_needed is surfaced in the bootstrap output so the SKILL tells the user to restart their gateway.
  • Default delivery to paired channel. install-sensor.sh now mirrors hermes-sensor-bridge: when --notify-* flags are omitted, it scans ~/.openclaw/.env for the first <PLATFORM>_HOME_CHANNEL=<handle> (priority feishu, imessage, telegram, slack, discord, signal, whatsapp, wecom, dingtalk) and auto-fills the notify target. Paired-channel users get pushes to their actual inbox by default instead of disappearing into a session lane.
  • /hooks/agent payload alignment. Expose thinking, timeout_seconds, fallbacks on the _openclaw_bridge manifest block (with matching --thinking / --timeout-seconds / --fallbacks CLI flags), and auto-attach name: "w2a-<sensor_id>" to every POST so signals are groupable in the OpenClaw job log.
  • Bin rename world2agent-sensor-runnerworld2agent-openclaw-runner to avoid global-bin collision with hermes-sensor-bridge.
  • Drop empty tools/ leftover; bump version to 0.1.0-alpha.1.
  • Marketplace README: add OpenClaw three-step quick-start, catalog table entry, repo-layout tree, and publishing notes.

Test plan

  • pnpm run build clean
  • pnpm run teste2e/test-delivery.mjs + e2e/test-config-watcher.mjs both pass (24 assertions)
  • bash -n syntax check on every modified script
  • Smoke: ensure_openclaw_hooks on empty file writes the managed block with random 64-char token; second invocation is noop
  • Smoke: channel auto-detect with TELEGRAM_HOME_CHANNEL + FEISHU_HOME_CHANNEL set returns feishu first (priority order)
  • After publish: npm install -g @world2agent/openclaw-sensor-bridge@alpha on a fresh machine, run bootstrap.sh, verify auto-install + hooks block written + supervisor up

🤖 Generated with Claude Code

daibo@machinepulse.ai and others added 2 commits April 30, 2026 00:05
… to 0.1.0-alpha.1

Make `bootstrap.sh` self-sufficient instead of asking the user to install
the package and hand-edit `~/.openclaw/openclaw.json`:

- auto-install `@world2agent/openclaw-sensor-bridge` globally via npm when
  the binaries aren't on PATH (so the SKILL alone is enough to bring up
  the runtime)
- idempotently fix the `hooks` block in `openclaw.json`: enable, generate
  `token` if absent (existing tokens preserved), set
  `allowRequestSessionKey`, ensure `"w2a:"` is in
  `allowedSessionKeyPrefixes`. Backup is written next to the file before
  any mutation; `gateway_restart_needed` is surfaced in the bootstrap
  output so the SKILL tells the user to restart their gateway

Default delivery now mirrors hermes-sensor-bridge: `install-sensor.sh`
auto-fills `--notify-channel` / `--notify-to` from the first
`<PLATFORM>_HOME_CHANNEL=<handle>` it finds in `~/.openclaw/.env`
(priority feishu, imessage, telegram, slack, discord, signal, whatsapp,
wecom, dingtalk). Paired channel users now get pushes to their actual
inbox by default instead of having signals sit in a session lane only
the dashboard surfaces.

Other changes:

- rename `world2agent-sensor-runner` → `world2agent-openclaw-runner`
  to avoid global-bin collision with hermes-sensor-bridge
- expose `thinking`, `timeout_seconds`, `fallbacks` on the
  `_openclaw_bridge` manifest block; thread them and an auto
  `name: "w2a-<sensor_id>"` into every `/hooks/agent` payload to align
  with the documented request schema
- delete the empty `tools/` leftover

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three-step onboarding paralleling the Hermes section: install the
runtime, drop the skill into OpenClaw, then drive it from chat. Also
add openclaw-sensor-bridge to the catalog table, repository tree, and
the publishing notes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@daibor daibor changed the title Feat/openclaw bridge bootstrap and defaults feat(openclaw-bridge): zero-touch bootstrap + payload alignment (alpha.1) Apr 29, 2026
@daibor daibor merged commit 26ff7db into main Apr 29, 2026
1 check passed
@daibor daibor deleted the feat/openclaw-bridge-bootstrap-and-defaults branch April 29, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant