Skip to content

feat: Modernize plugin entry compatibility#18

Merged
lan17 merged 1 commit intomainfrom
codex/modernize-plugin-entry-compat
Mar 30, 2026
Merged

feat: Modernize plugin entry compatibility#18
lan17 merged 1 commit intomainfrom
codex/modernize-plugin-entry-compat

Conversation

@lan17
Copy link
Copy Markdown
Contributor

@lan17 lan17 commented Mar 30, 2026

Summary

This updates the plugin entry wiring to prefer OpenClaw's modern definePluginEntry(...) descriptor when the host SDK exposes it, while preserving compatibility with older gateways that still expect a raw register(api) export.

What changed

  • added a dedicated src/plugin-entry.ts wrapper that probes for definePluginEntry
  • fall back to the legacy register-function export when the helper is unavailable
  • pointed index.ts at the new wrapper entrypoint
  • added a local type shim for openclaw/plugin-sdk/plugin-entry
  • added tests covering modern helper, migration-window fallback, and legacy fallback behavior
  • documented the compatibility behavior in the README

Why

Newer OpenClaw versions surface a compatibility advisory for hook-only plugins that have not adopted the newer plugin entry shape. This change modernizes the package entry without changing plugin behavior or dropping support for older OpenClaw runtimes.

Impact

  • newer gateways can load the package through the modern plugin entry helper when available
  • older gateways continue to load the plugin through the existing raw register export path
  • runtime Agent Control behavior is unchanged

Validation

  • npm run lint
  • npm run typecheck
  • npm test

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/plugin-entry.ts 92.85% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@lan17 lan17 changed the title [codex] Modernize plugin entry compatibility feat: Modernize plugin entry compatibility Mar 30, 2026
@lan17 lan17 marked this pull request as ready for review March 30, 2026 23:11
@lan17 lan17 merged commit 5dba960 into main Mar 30, 2026
3 of 4 checks passed
@lan17 lan17 deleted the codex/modernize-plugin-entry-compat branch March 30, 2026 23:11
lan17 added a commit that referenced this pull request Mar 30, 2026
galileo-automation pushed a commit that referenced this pull request Mar 30, 2026
# [1.6.0](v1.5.0...v1.6.0) (2026-03-30)

### Features

* modernize plugin entry compatibility ([#18](#18)) ([39eeeb4](39eeeb4))
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