Skip to content

fix(plugin-sdk): narrow discord and matrix core seam imports#59557

Merged
vincentkoc merged 2 commits into
openclaw:mainfrom
vincentkoc:fix/browser-seam-split
Apr 2, 2026
Merged

fix(plugin-sdk): narrow discord and matrix core seam imports#59557
vincentkoc merged 2 commits into
openclaw:mainfrom
vincentkoc:fix/browser-seam-split

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • switch core Discord/Matrix callers from broad plugin-sdk barrels to the narrower seam-specific facades
  • keep runtime, contract, and session-key paths aligned with the guarded surfaces already on main
  • narrow the internal runtime type map to the same seam-specific imports

Testing

  • pnpm check
  • pnpm build
  • pnpm test -- src/config/sessions/explicit-session-key-normalization.test.ts
  • OPENCLAW_TEST_PROFILE=serial OPENCLAW_TEST_SERIAL_GATEWAY=1 pnpm test -- src/channels/plugins/contracts/registry-backed.contract.test.ts
  • OPENCLAW_TEST_PROFILE=serial OPENCLAW_TEST_SERIAL_GATEWAY=1 pnpm test -- src/gateway/server.sessions.gateway-server-sessions-a.test.ts

Notes

  • AI-assisted
  • no changelog: internal boundary cleanup only

@vincentkoc vincentkoc self-assigned this Apr 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Apr 2, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review April 2, 2026 08:35
@greptile-apps

greptile-apps Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR narrows internal Discord and Matrix import paths away from broad barrel files (discord.js, matrix.js) toward seam-specific facade modules (discord-runtime-surface.js, discord-thread-bindings.js, discord-surface.js, discord-session-key.js, matrix-surface.js, matrix-runtime-surface.js, matrix-thread-bindings.js). It also refactors the types-channel.ts type map to use named module-level type aliases instead of repetitive inline typeof import(...) expressions. No behavioral changes are introduced.

  • All narrowed import targets were verified to export the required symbols — no missing exports detected.
  • runtime-discord-ops.runtime.ts correctly consolidates two previously duplicated import blocks (both pulling from the same discord.js barrel) into a single block pointing to discord-runtime-surface.js.
  • registry.ts correctly splits the former matrix.js import into matrix-runtime-surface.js (runtime-activation path for setMatrixRuntime) and matrix-surface.js (bundled-public path for createMatrixThreadBindingManager / resetMatrixThreadBindingsForTests), which reflects the different loader semantics each surface uses.
  • The type alias pattern introduced in types-channel.ts (DiscordRuntimeSurface, DiscordThreadBindings, MatrixThreadBindings) improves readability and will reduce churn when the underlying surface modules evolve.

Confidence Score: 5/5

  • Safe to merge — purely a mechanical import-path narrowing with no logic changes and all target exports verified.
  • Every symbol imported from the new narrow facades was confirmed to be exported by those modules. The consolidation in runtime-discord-ops.runtime.ts and the type-alias cleanup in types-channel.ts are correct and non-breaking. No behavioral code was altered.
  • No files require special attention.

Reviews (1): Last reviewed commit: "Merge branch 'main' into fix/browser-sea..." | Re-trigger Greptile

@vincentkoc
vincentkoc merged commit d90c8db into openclaw:main Apr 2, 2026
8 checks passed
steipete pushed a commit to duncanita/openclaw that referenced this pull request Apr 4, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
Nachx639 pushed a commit to Nachx639/clawdbot that referenced this pull request Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant