Add OpenClaw plugin system for tools, memory, channels, and providers#103
Closed
buremba wants to merge 2 commits into
Closed
Add OpenClaw plugin system for tools, memory, channels, and providers#103buremba wants to merge 2 commits into
buremba wants to merge 2 commits into
Conversation
…ider) Implements full OpenClaw plugin lifecycle integration into Lobu: - Plugin types and interfaces in packages/core (PluginManifest, LoadedPlugin, etc.) - Plugin loader service in gateway with shim OpenClawPluginApi for discovery/registration - Plugin bridge in worker converting tool/memory/provider plugins to pi-coding-agent format - Channel adapter wrapping OpenClaw channel plugins as Lobu PlatformAdapters - Plugin config wired through agent settings, API routes, and all message handlers https://claude.ai/code/session_01TnnWVhe45TgmLSSbKBzYx3
… only OpenClaw channel plugins can't support streaming, interactions, or file handling — Lobu's native platform adapters (Slack/Telegram/WhatsApp) are far richer. Provider plugins require deep pi-coding-agent integration that isn't needed yet. Removed: - channel-adapter.ts (entire file) - Channel/provider types (OpenClawChannelDef, OpenClawProviderDef, etc.) - Channel plugin loading from gateway startup - Provider bridge from plugin-bridge.ts - Channel/provider registration from both gateway and worker shim APIs Kept: tool + memory plugin slots with build-time npm installation. https://claude.ai/code/session_01TnnWVhe45TgmLSSbKBzYx3
Member
Author
|
Closing: superseded by PR #106 which is now merged to main. PR #106 implements a cleaner plugin architecture (single worker-side loader, raw ToolDefinition passthrough, provider support via ModelRegistry). The memory plugin support from this PR can be added as a focused follow-up PR on top of #106's architecture when needed. |
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.
Description
Implements a comprehensive plugin system for OpenClaw that enables dynamic loading and integration of:
The system includes:
packages/gateway/src/plugins/plugin-loader.ts): Discovers plugins from npm (@openclaw/, @/openclaw-*) and local directories, validates manifests, and loads them via dynamic import with a shim API that captures registrationspackages/worker/src/openclaw/plugin-bridge.ts): Adapts loaded plugins into worker-consumable components (ToolDefinition[], MemoryHooks, provider metadata)packages/gateway/src/plugins/channel-adapter.ts): Wraps channel plugins as Lobu PlatformAdapters for message routingpackages/core/src/plugin-types.ts): Shared TypeScript interfaces for plugin manifests, configurations, and registrationsPlugins are discovered from:
node_modules/@openclaw/*(official namespace)node_modules/@*/openclaw-*(community namespace)Memory plugins integrate with agent lifecycle (recall before prompt, save after response). Tool plugins are merged with custom tools. Channel plugins participate in message routing as first-class platform adapters.
Type of Change
Testing
Checklist
Related Issues
Implements OpenClaw plugin architecture for extensibility.
Additional Notes
The plugin system uses a shim API pattern to capture registrations without requiring plugins to have direct dependencies on Lobu internals. This allows third-party plugins to be developed independently. The exclusive slot constraint (e.g., only one memory plugin active) is enforced during loading based on
pluginsConfig.slotsconfiguration.https://claude.ai/code/session_01TnnWVhe45TgmLSSbKBzYx3