Skip to content

fix(plugins): preserve bundled Cloudflare distribution ownership - #174287

Merged
steipete merged 1 commit into
mainfrom
fix/cloudflare-bundled-distribution-fix1
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/cloudflare-bundled-distribution-fix1

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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 bundledDist metadata; 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

  • Current main c3798aeb0892 reproduces cloudflare: expected false to be true in the original packaging test. The new bundled repair-hint case also fails before the production fix.
  • Five focused files pass: 40 tests, including the original package assertion, catalog cases, and standalone omission/install offers. The final origin-aware repair suite passes 11/11, including separately installed Cloudflare (41 distinct cases across these files).
  • Targeted TypeScript, type-aware core/root-test lint, formatting and whitespace checks pass. Independent P2 review, including complete loader and repair callers, is scoped-clean with no actionable findings.
  • Local timings: initial five-file run 47.43 s wrapper; final repair file 2.89 s Vitest / 6.17 s wrapper. No assertions or deadlines were loosened, and no workflow was dispatched or rerun. PR CI is the broad proof.

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.
@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 16, 2026 14:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T14:13:06.050631Z 9930545 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: S labels Oct 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@steipete
steipete enabled auto-merge (squash) October 16, 2026 14:21
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 16, 2026
@steipete
steipete merged commit 5f09f0e into main Oct 16, 2026
215 of 218 checks passed
@steipete
steipete deleted the fix/cloudflare-bundled-distribution-fix1 branch October 16, 2026 14:23
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…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.
vincentkoc pushed a commit that referenced this pull request Nov 27, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. docs Improvements or additions to documentation scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant