Skip to content

[Bug] Matrix plugin fails to load in v2026.3.2: missing keyed-async-queue.js in plugin-sdk exports #32772

@KundKMC

Description

@KundKMC

Bug Description

The Matrix plugin fails to load in v2026.3.2 because extensions/matrix/src/matrix/send-queue.ts imports KeyedAsyncQueue from the subpath openclaw/plugin-sdk/keyed-async-queue, but the corresponding JS file is missing from the build output. Only a .d.ts file exists at dist/plugin-sdk/plugin-sdk/keyed-async-queue.d.ts.

This is a build/packaging regression introduced in v2026.3.2 — the Matrix plugin loaded successfully in v2026.3.1.

Error

[plugins] matrix failed to load from .../extensions/matrix/index.ts:
Error: Cannot find module '.../dist/plugin-sdk/index.js/keyed-async-queue'
Require stack:
- .../extensions/matrix/src/matrix/send-queue.ts

Root Cause

  1. package.json exports map declares ./plugin-sdk/keyed-async-queue./dist/plugin-sdk/keyed-async-queue.js
  2. The .js file was not generated during the v2026.3.2 build (only .d.ts exists)
  3. The tsx/ts-node loader used for extensions resolves the import incorrectly: instead of using the exports map, it resolves openclaw/plugin-sdk to dist/plugin-sdk/index.js and then appends /keyed-async-queue, resulting in dist/plugin-sdk/index.js/keyed-async-queue (treating index.js as a directory)

Note: KeyedAsyncQueue IS exported from the main plugin-sdk/index.js (as Ut in the rolldown bundle), so the class itself is available — just not at the subpath the extension expects.

Workaround

Patch the import in send-queue.ts to use the main module:

sed -i 's|from "openclaw/plugin-sdk/keyed-async-queue"|from "openclaw/plugin-sdk"|' \
  extensions/matrix/src/matrix/send-queue.ts

This works because KeyedAsyncQueue is re-exported from the main plugin-sdk/index.js.

Environment

  • OpenClaw: 2026.3.2 (regression from 2026.3.1)
  • Node: 22.13.1
  • OS: macOS (LaunchAgent)
  • Matrix plugin: bundled (extensions/matrix/)
  • matrix-bot-sdk: 0.8.0-element.3 (manually installed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions