Skip to content

fix(plugin-sdk): published plugins fail to load after private SDK facade exports were removed - #173777

Merged
RomneyDa merged 2 commits into
mainfrom
fix/plugin-sdk-restore-removed-exports
Oct 16, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
fix/plugin-sdk-restore-removed-exports

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Fixes #173386

What Problem This Solves

Fixes: published plugins fail to load on 2026.10.5 betas when they import a named helper that #164816 dropped from a JavaScript-only openclaw/plugin-sdk/* subpath. The subpath still ships in package.json exports, so subpath-level compatibility checks pass, but ESM linking fails on the missing name and the whole plugin (for example the community Zulip channel) stops loading.

User Impact

Plugins built against 2026.10.4 and earlier that import these names load again. The restored names are deprecated through 2027-01-15 (plugin-sdk-private-runtime-shipped-exports), so plugin authors have a migration window instead of a silent break.

Why This Change Was Made

#164816 ("deslop private runtime exports") removed 222 runtime names from 54 shipped subpaths compared with 2026.10.4 (npm tarball export diff). The typed-subpath removals already have dated compat records and the shipped-surface guard covers them. The rest come from JavaScript-only facades (no types condition), which the repo classes as not a typed third-party contract, so no guard caught them.

Restoring all ~200 would undo deliberate cleanup and bring back deleted internals. Instead, I searched GitHub code for each removed name with its subpath and kept only names that standalone external plugins actually import, plus the reported one. Each restored name is a re-export of a live owner, marked @deprecated and listed in one compat record. Two implementations come back verbatim from 403b0ced4f6^: createRateLimitRetryRunner and the lazy resolveApiKeyForProvider.

Restored (29 names, 14 subpaths), with example external importers:

Subpath Names Example importer
approval-reaction-runtime readApprovalReactionDeliveryMetadata FtlC-ian/openclaw-channel-zulip (reported)
acp-runtime getAcpRuntimeBackend OpenCoven/coven, quareth/Dwemr
fetch-runtime hasEnvHttpProxyConfigured openclaw-zero-token telegram
image-generation-core resolveApiKeyForProvider, resolveAgentModelPrimaryValue lyfuci/openclaw-hf, ValueCell-ai/ClawX
memory-core-host-engine-embeddings fetchRemoteEmbeddingVectors, listMemoryEmbeddingProviders team-telnyx/telnyx-openclaw-embeddings, joshuaswarren/remnic
memory-core-host-engine-storage chunkMarkdown, ensureDir Transmitt0r/openclaw-plugin-paperless-ngx, -trilium
memory-core-host-runtime-files listMemoryFiles, normalizeExtraMemoryPaths splitCoding/openclaw-custom
poll-runtime resolvePollMaxSelections kleinpanic/GSD-OC
provider-stream createOpenRouterSystemCacheWrapper, resolveMoonshotThinkingType openclaw-zero-token openrouter/ollama
provider-web-fetch enablePluginInConfig, jsonResult, withTrustedWebToolsEndpoint, wrapExternalContent, wrapWebContent jal-co/openclaw-webclaw, mmdxiaoxin/openclaw-crawl4ai, -scraper, context-dot-dev/openclaw-context
provider-web-search DEFAULT_TIMEOUT_SECONDS, markdownToText, setScopedCredentialValue, setTopLevelCredentialValue aspalagin/openclaw-yandex-search, WW-AI-Lab/openclaw-web-search, conanwhf/serper-search-openclaw-plugin
retry-runtime createRateLimitRetryRunner Unayung/openclaw-plugin-lineworks
speech readResponseTextLimited, truncateErrorDetail livingghost/openclaw-inworld-tts, -fish-audio-tts
thread-bindings-runtime resolveThreadBindingConversationIdFromBindingId, resolveThreadBindingFarewellText, resolveThreadBindingLifecycle AICP extension forks

Release-note material: still removed in 2026.10.5. I found no standalone external importer for these runtime names, so they stay removed:

  • acp-runtime __testing, requireAcpRuntimeBackend
  • approval-reaction-runtime insertApprovalReactionHintNearIdHeader
  • browser-config defaults and resolvers
  • channel-config-writes, channel-route, channel-targets helpers
  • context-visibility-runtime, directory-config-runtime, global-singleton.createScopedExpiringIdCache
  • the remaining image-generation-core, memory-core-host-*, provider-stream(-family), realtime-voice(-activation), sandbox, speech and session-key-runtime helpers

provider-auth-api-key.upsertAuthProfile (used by zero-token forks) is also intentionally not restored. It is a synchronous credential writer that the SQLite worker ratchet rejects. Use upsertAuthProfileWithLock from the same subpath instead. The typed-subpath removals already have removed compat records. To regenerate the full per-name list, diff the dist/plugin-sdk/*.js export names of npm pack [email protected] against [email protected].

Evidence

  • src/plugin-sdk/private-runtime-shipped-exports.test.ts: checks that every surface in the compat record is a packaged private runtime subpath and still exports the name. It also imports readApprovalReactionDeliveryMetadata from openclaw/plugin-sdk/approval-reaction-runtime and exercises it. With the re-export removed, both tests fail (readApprovalReactionDeliveryMetadata is not a function, plus the missing surface). With the fix they pass. pnpm test src/plugin-sdk/private-runtime-shipped-exports.test.ts --maxWorkers=1: tests take 13 ms; wall time about 25 s, mostly cold transform.

  • Real plugin-loader proof (openclaw plugins doctor, which imports plugin modules). The test plugin is a synthetic external one built from openclaw plugins init, with a plain JS dist/index.js that named-imports all 29 restored exports from their openclaw/plugin-sdk/* package specifiers. It was installed with openclaw plugins install --link into an isolated OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH, and node_modules/openclaw was linked to this branch's built package:

    === control (readApprovalReactionDeliveryMetadata dropped from dist, as on main / 2026.10.5-beta.4)
    - legacy-sdk-probe: plugin failed during load: Plugin legacy-sdk-probe cannot import openclaw/plugin-sdk/approval-reaction-runtime (...) (SyntaxError: The requested module 'openclaw/plugin-sdk/approval-reaction-runtime' does not provide an export named 'readApprovalReactionDeliveryMetadata')
    === this PR
    Plugin discovery, module loading, compatibility, and configuration checks passed.
    
  • Packaged proof against the published affected plugin, using the built dist of this branch (pnpm build). The script reads every named openclaw/plugin-sdk/* runtime import out of the published [email protected] dist with es-module-lexer (no plugin code runs). It then links exactly those names against this build's package.json export targets:

    --- control (readApprovalReactionDeliveryMetadata dropped from dist, as on main / 2026.10.5-beta.4):
    FAIL approval-reaction-runtime The requested module '.../dist/plugin-sdk/approval-reaction-runtime.js' does not provide an export named 'readApprovalReactionDeliveryMetadata'
    21 subpaths, 41 named runtime imports: 1 failing
    --- this PR:
    21 subpaths, 41 named runtime imports: all linked
    
  • The same dist link check covers every surface in the compat record:

    acp-runtime function
    approval-reaction-runtime function
    fetch-runtime function
    image-generation-core function,function
    memory-core-host-engine-embeddings function,function
    memory-core-host-engine-storage function,function
    memory-core-host-runtime-files function,function
    poll-runtime function
    provider-stream function,function
    provider-web-fetch function,function,function,function,function
    provider-web-search number,function,function,function
    retry-runtime function
    speech function,function
    thread-bindings-runtime function,function,function
    all 29 named imports linked from dist
    
  • pnpm check:changed: all lanes this change touches pass: typecheck core/extensions, Plugin SDK package exports, surface budget, deprecated JSDoc/API usage, line-cap, SQLite worker ratchet and lint. Lanes still red are in files this PR does not touch, from origin/main advancing past the merge base: model-request-body.test.ts TS2540, the chat-message.test.tsx max-lines suppression, and unused exports in lazy-view-error.ts/restart-resume.ts.

  • src/plugins/compat/registry.test.ts passes.

…ade exports were removed

Restore the runtime named exports that published external plugins import from JavaScript-only openclaw/plugin-sdk facades, which #164816 removed while the subpaths still ship. Each restored name is deprecated and tracked by the plugin-sdk-private-runtime-shipped-exports compat record (removeAfter 2027-01-15); a contract test keeps every recorded surface exported.

Fixes #173386
@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.

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M labels Oct 16, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Restores 29 deprecated named exports across 14 shipped Plugin SDK runtime subpaths.

Example: Load [email protected] on a 2026.10.5 beta.

  • Before: The missing readApprovalReactionDeliveryMetadata export prevents the entire plugin from loading.
  • After: The named import links successfully, allowing plugin loading to proceed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused compatibility repair with shipped-entry-point proof, useful contract coverage, and no identified blocking defect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Supplied terminal output exercises the built package through openclaw plugins doctor with an isolated external plugin importing all 29 names, showing control failure and successful loading after restoration; published Zulip imports also link against the build.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Previously working installed plugins fail to load after an OpenClaw upgrade because shipped named imports disappeared.
Reason: Concrete external breakage justifies temporary compatibility, and the maintainer-authored PR records the direction and removal window.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR repairs a verified plugin-loading regression that remains on main, with no blocking findings.

Priority: P1
Reviewed head: d0cab321f22b17dd3ea723e64a44423f08a65ddb

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Plugin SDK connects installed plugin imports to core runtime owners; missing named exports fail module linking before plugin registration.

flowchart LR
  A[Installed plugin] --> B[Package subpath exports]
  B --> C[SDK runtime facade]
  C --> D[Existing implementation owner]
  C --> E[Plugin module linking]
  E --> F[Plugin registration]
Loading

Technical review

Best possible solution:

Restore the demonstrated shipped imports through existing owners and retain the documented deprecation window.

Do we have a high-confidence way to reproduce the issue?

Stable source exports the reported name, the reviewed removal deletes it, and current main still omits it; the reporter supplies the corresponding runtime linking error.

Is this the best way to solve the issue?

The focused restoration preserves existing owners and the lazy auth boundary while giving demonstrated external consumers a dated migration window.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7a3cfbf8def9.

Provenance checked

  • Private SDK facade export narrowing changes intended behavior with a stated reason (403b0ce: Remove unused private forwarding surfaces while preserving supported public and known official-plugin contracts.)
  • Generic retry runner and lazy image-generation auth adapter changes intended behavior with a stated reason (403b0ce: The cleanup removed these implementations as unused; the PR restores their previous behavior for identified external consumers.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 32c8015 adds src/plugin-sdk/approval-reaction-runtime.ts:21 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 32c801509836; files: src/plugin-sdk/approval-reaction-runtime.ts)
  • Dallin Romney: Raw commit 4d17409 adds src/plugins/compat/registry-records.ts:56 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4d174097c3d4; files: src/plugins/compat/registry-records.ts)
  • Kevin Lin: Raw commit 7d6b7f4 adds src/plugin-sdk/approval-reaction-runtime.ts:13 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 7d6b7f434c2e; files: src/plugin-sdk/approval-reaction-runtime.ts)

PR surface

Source +180, Tests +65, Docs +14, Other +1. Total +260 across 21 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 18 180 0 +180
Tests 1 65 0 +65
Docs 1 14 0 +14
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 21 260 0 +260

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P1: Affected beta upgrades prevent existing channel plugins from loading and stop their messaging workflows.
  • merge-risk: 🚨 compatibility: The PR restores shipped SDK names and establishes their retirement window; the maintainer-authored direction explicitly accepts this compatibility commitment.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-16T04:14:32.483Z sha 64c63d3 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-16T04:29:14.497Z sha d0cab32 :: needs maintainer review before merge. :: none

Reviewed October 16, 2026, 12:40 AM ET / 04:40 UTC (Revision 3).

@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 16, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 16, 2026
@RomneyDa
RomneyDa merged commit 970fc2f into main Oct 16, 2026
150 checks passed
@RomneyDa
RomneyDa deleted the fix/plugin-sdk-restore-removed-exports branch October 16, 2026 04:43
RomneyDa added a commit that referenced this pull request Oct 16, 2026
…ade exports were removed (#173777)

* fix(plugin-sdk): published plugins fail to load after private SDK facade exports were removed

Restore the runtime named exports that published external plugins import from JavaScript-only openclaw/plugin-sdk facades, which #164816 removed while the subpaths still ship. Each restored name is deprecated and tracked by the plugin-sdk-private-runtime-shipped-exports compat record (removeAfter 2027-01-15); a contract test keeps every recorded surface exported.

Fixes #173386

* fix(plugin-sdk): include private runtime export record in PR wrapper inventory

(cherry picked from commit 970fc2f)
RomneyDa added a commit that referenced this pull request Oct 16, 2026
…ade exports were removed (#173777)

* fix(plugin-sdk): published plugins fail to load after private SDK facade exports were removed

Restore the runtime named exports that published external plugins import from JavaScript-only openclaw/plugin-sdk facades, which #164816 removed while the subpaths still ship. Each restored name is deprecated and tracked by the plugin-sdk-private-runtime-shipped-exports compat record (removeAfter 2027-01-15); a contract test keeps every recorded surface exported.

Fixes #173386

* fix(plugin-sdk): include private runtime export record in PR wrapper inventory

(cherry picked from commit 970fc2f)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…ade exports were removed (openclaw#173777)

* fix(plugin-sdk): published plugins fail to load after private SDK facade exports were removed

Restore the runtime named exports that published external plugins import from JavaScript-only openclaw/plugin-sdk facades, which openclaw#164816 removed while the subpaths still ship. Each restored name is deprecated and tracked by the plugin-sdk-private-runtime-shipped-exports compat record (removeAfter 2027-01-15); a contract test keeps every recorded surface exported.

Fixes openclaw#173386

* fix(plugin-sdk): include private runtime export record in PR wrapper inventory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: plugin-sdk/approval-reaction-runtime no longer exports readApprovalReactionDeliveryMetadata (2026.10.5 betas break external plugins)

1 participant