fix(plugins): keep openclaw chunks native in jiti (#88384)

* fix(plugins): keep OpenClaw chunks native in jiti

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>

* docs(changelog): move plugin fix to unreleased

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
Vincent Koc
2026-07-05 07:08:42 -07:00
committed by GitHub
parent 3f1dea7875
commit 61ac4ec8a0
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai
- **WhatsApp restart recovery:** stop automatic restart loops after logged-out or connection-replaced disconnects until the account reconnects. (#78511) Thanks @openperf.
- **Local Gateway CLI auth:** keep loopback CLI token/password calls off durable device scopes so read probes cannot block later write/admin commands behind a stale pairing baseline. (#95997) Thanks @vincentkoc.
- **Plugin module identity:** keep OpenClaw package chunks on Node's native module graph when jiti transforms plugin entries, preventing duplicate evaluation and class identity drift. (#88384) Thanks @vincentkoc.
- **iMessage group warnings:** suppress the false drop-all startup warning when an effective group sender allowlist can admit groups, and point true empty-allowlist configurations at the correct remedy. (#100046)
- **Control UI mobile login:** keep Gateway recovery guidance visible after connection failures, make the disconnected gate scroll safely on constrained screens, and improve mobile keyboard and tap-target behavior. (#100208)
+1
View File
@@ -2034,6 +2034,7 @@ describe("plugin sdk alias helpers", () => {
const options = buildPluginLoaderJitiOptions({});
expect(options.tryNative).toBe(true);
expect(options.nativeModules).toEqual(["openclaw"]);
expect(options.interopDefault).toBe(true);
expect(options.extensions).toContain(".js");
expect(options.extensions).toContain(".ts");
+3
View File
@@ -2031,6 +2031,9 @@ export function buildPluginLoaderJitiOptions(
// Prefer Node's native sync ESM loader for built dist/*.js modules so
// bundled plugins and plugin-sdk subpaths stay on the canonical module graph.
tryNative: true,
// When jiti must transform a plugin entry, keep OpenClaw's own package
// chunks on the native module graph instead of re-evaluating them in jiti.
nativeModules: ["openclaw"],
extensions: [".ts", ".tsx", ".mts", ".cts", ".mtsx", ".ctsx", ".js", ".mjs", ".cjs", ".json"],
...(hasAliases
? {