Skip to content

fix(openclaw): use sync plugin registration#498

Open
kesslerio wants to merge 1 commit intoEveryInc:mainfrom
kesslerio:fix/openclaw-sync-register
Open

fix(openclaw): use sync plugin registration#498
kesslerio wants to merge 1 commit intoEveryInc:mainfrom
kesslerio:fix/openclaw-sync-register

Conversation

@kesslerio
Copy link
Copy Markdown

@kesslerio kesslerio commented Apr 3, 2026

What

  • make the generated OpenClaw plugin entrypoint export a synchronous register(api) function
  • inline converted command bodies into the generated command handlers
  • remove async skill preloading from the generated OpenClaw entrypoint

Why

  • OpenClaw ignores plugin registrations that return a promise
  • the generated async entrypoint causes the runtime to report: plugin register returned a promise; async registration is ignored
  • switching to fire-and-forget skill loading fixes the warning but introduces a startup race where commands can return not found before skill files finish loading
  • inlining the converted command body removes both issues and keeps registration synchronous

Tests

  • bun test tests/openclaw-converter.test.ts

AI Assistance

  • Used: yes
  • Testing: targeted automated test (bun test tests/openclaw-converter.test.ts) plus local OpenClaw plugin inspection after reinstall

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.

2 participants