Summary
PR #46301 ("Fix configure startup stalls from outbound send-deps imports") extracted resolveOutboundSendDep from src/infra/outbound/deliver.ts into a new file src/infra/outbound/send-deps.ts, and updated extension imports accordingly. This breaks all affected extensions (Discord, Telegram, WhatsApp, Slack, Signal, iMessage, Matrix, MSTeams) when running in Docker.
Root Cause
Extensions use relative imports like:
import { resolveOutboundSendDep } from "../../../src/infra/outbound/send-deps.js";
This resolves to /app/src/infra/outbound/send-deps.js at runtime. In the Docker image, /app/src/ does not exist — it is stripped during the multi-stage build. Only /app/dist/ is copied into the final image.
The old import path (../../../src/infra/outbound/deliver.js) worked because deliver.ts was already part of the plugin-sdk build output. The new send-deps.ts was never registered as a plugin-sdk subpath entry, so the bundler does not emit it to the expected location.
The bundled version exists as a hashed file (e.g. /app/dist/outbound-send-deps-BFSj2ZTz.js), but nothing maps it to the path extensions expect.
Reproduction
docker build --build-arg OPENCLAW_INSTALL_BROWSER=1 -t openclaw:local .
docker run -d --name oc-local openclaw:local
docker exec oc-local ls /app/src/infra/outbound/
# -> directory does not exist
docker exec oc-local ls /app/dist/plugin-sdk/src/infra/outbound/
# -> empty directory
Discord extension fails to load with:
Error: Cannot find module '/app/src/infra/outbound/send-deps.js'
Affected Files (from #46301)
extensions/discord/src/outbound-adapter.ts
extensions/telegram/src/outbound-adapter.ts
extensions/telegram/src/channel.ts
extensions/whatsapp/src/outbound-adapter.ts
extensions/discord/src/channel.ts
extensions/imessage/src/channel.ts
extensions/matrix/src/outbound.ts
extensions/msteams/src/outbound.ts
extensions/signal/src/channel.ts
extensions/slack/src/channel.ts
Suggested Fix
Same pattern as other plugin-sdk subpaths:
- Create
src/plugin-sdk/outbound-send-deps.ts that re-exports from ../infra/outbound/send-deps.js
- Add
"outbound-send-deps" to pluginSdkEntrypoints in tsdown.config.ts
- Update extension imports to use the plugin-sdk subpath instead of relative
../../../src/ paths
Related
This is the same class of bug as #33266 (Matrix plugin fails in Docker due to missing keyed-async-queue subpath).
Environment
- Commit: d9c285e (latest main as of 2026-03-14)
- Platform: Docker on macOS (Apple Silicon)
- Build:
docker build --build-arg OPENCLAW_INSTALL_BROWSER=1 -t openclaw:local .
Workaround
Check out a commit prior to #46301 (e.g. d4ab73174 from 2026-03-07) and rebuild the Docker image.
Summary
PR #46301 ("Fix configure startup stalls from outbound send-deps imports") extracted
resolveOutboundSendDepfromsrc/infra/outbound/deliver.tsinto a new filesrc/infra/outbound/send-deps.ts, and updated extension imports accordingly. This breaks all affected extensions (Discord, Telegram, WhatsApp, Slack, Signal, iMessage, Matrix, MSTeams) when running in Docker.Root Cause
Extensions use relative imports like:
This resolves to
/app/src/infra/outbound/send-deps.jsat runtime. In the Docker image,/app/src/does not exist — it is stripped during the multi-stage build. Only/app/dist/is copied into the final image.The old import path (
../../../src/infra/outbound/deliver.js) worked becausedeliver.tswas already part of the plugin-sdk build output. The newsend-deps.tswas never registered as a plugin-sdk subpath entry, so the bundler does not emit it to the expected location.The bundled version exists as a hashed file (e.g.
/app/dist/outbound-send-deps-BFSj2ZTz.js), but nothing maps it to the path extensions expect.Reproduction
Discord extension fails to load with:
Affected Files (from #46301)
extensions/discord/src/outbound-adapter.tsextensions/telegram/src/outbound-adapter.tsextensions/telegram/src/channel.tsextensions/whatsapp/src/outbound-adapter.tsextensions/discord/src/channel.tsextensions/imessage/src/channel.tsextensions/matrix/src/outbound.tsextensions/msteams/src/outbound.tsextensions/signal/src/channel.tsextensions/slack/src/channel.tsSuggested Fix
Same pattern as other plugin-sdk subpaths:
src/plugin-sdk/outbound-send-deps.tsthat re-exports from../infra/outbound/send-deps.js"outbound-send-deps"topluginSdkEntrypointsintsdown.config.ts../../../src/pathsRelated
This is the same class of bug as #33266 (Matrix plugin fails in Docker due to missing keyed-async-queue subpath).
Environment
docker build --build-arg OPENCLAW_INSTALL_BROWSER=1 -t openclaw:local .Workaround
Check out a commit prior to #46301 (e.g.
d4ab73174from 2026-03-07) and rebuild the Docker image.