Repository navigation
fix(plugins): preserve bundled Cloudflare distribution ownership - #174287
Conversation
Cloudflare's standalone install route does not make it external-only. Record its default bundled ownership in the catalog, keep source package publication eligibility intact, and retain repair guidance for actual external installations. The original packaging test reproduces the failure on c3798ae. Five focused suites pass (41 distinct cases), with targeted typechecking, type-aware lint, formatting, and independent P2 review.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9930545665
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| packageBuild?: { bundledDist?: boolean }; | ||
| }): string | undefined { | ||
| if (!isExternallyDistributedPlugin(candidate)) { | ||
| if (!tracksPluginDependencyStatus(candidate)) { |
There was a problem hiding this comment.
Exclude local plugin roots from install repair hints
When a plugin loaded from plugins.load.paths (origin: "config") or a workspace fails with MODULE_NOT_FOUND, tracksPluginDependencyStatus now returns true solely because the origin is not bundled. The loader consequently recommends reinstalling/updating an externally distributed package—and for a local Cloudflare override specifically recommends openclaw plugins install @openclaw/cloudflare—although the config-selected source remains authoritative and that command cannot repair its missing local dependency. Gate this guidance on actual install ownership rather than every non-bundled origin so local plugins retain the documented in-place dependency repair path.
AGENTS.md reference: src/plugins/AGENTS.md:L23-L25
Useful? React with 👍 / 👎.
|
Merged via squash auto-merge.
|
…nclaw#174287) Cloudflare's standalone install route does not make it external-only. Record its default bundled ownership in the catalog, keep source package publication eligibility intact, and retain repair guidance for actual external installations. The original packaging test reproduces the failure on 0ede709. Five focused suites pass (41 distinct cases), with targeted typechecking, type-aware lint, formatting, and independent P2 review.
Llama and llama.cpp now show up in `openclaw onboard` without installing `@openclaw/llama-cpp-provider` first, like LM Studio and Ollama. The plugin moved out of core when it depended on `node-llama-cpp`; since #123105 it manages a `llama-server` and its only runtime dependency is `@openclaw/fs-safe`, which core already ships. Follows the Cloudflare pattern (#174287): dropped from the root package's exclusion list, and its official catalog entry marked `bundledDist: true`, so it stays published to npm and ClawHub for standalone builds that omit it. The doctor and memory install hints are left as they are -- they only show when the plugin isn't loaded.
Llama and llama.cpp now show up in `openclaw onboard` without installing `@openclaw/llama-cpp-provider` first, like LM Studio and Ollama. The plugin moved out of core when it depended on `node-llama-cpp`; since openclaw#123105 it manages a `llama-server` and its only runtime dependency is `@openclaw/fs-safe`, which core already ships. Follows the Cloudflare pattern (openclaw#174287): dropped from the root package's exclusion list, and its official catalog entry marked `bundledDist: true`, so it stays published to npm and ClawHub for standalone builds that omit it. The doctor and memory install hints are left as they are -- they only show when the plugin isn't loaded.
Related: #173794
What Problem This Solves
Fixes Cloudflare being classified as external-only after its install route was added for selected standalone builds. This broke the core-package contract test and gave the bundled R2 plugin external-install repair guidance.
User Impact
Cloudflare stays included in the default OpenClaw package and remains available from npm or ClawHub when a standalone build omits it. A separately installed copy still receives dependency-repair guidance. No package publication or distribution change is requested.
Why This Change Was Made
#173794 says the default still embeds all plugins and adds Cloudflare's existing published install route. Its catalog membership accidentally also transferred distribution ownership. The catalog now explicitly records the existing bundled ownership using the existing
bundledDistmetadata; the shared classifier respects it while keeping explicit loaded-package overrides authoritative. The loader carries installation origin into the existing repair helper, so an actual external install is still treated as one.The root npm exclusion list, source publication flags, and the failing packaging assertion are unchanged. Publication eligibility stays source-package owned.
Evidence
c3798aeb0892reproducescloudflare: expected false to be truein the original packaging test. The new bundled repair-hint case also fails before the production fix.