Skip to content

Commit 61ac4ec

Browse files
vincentkocsteipete
andauthored
fix(plugins): keep openclaw chunks native in jiti (#88384)
* fix(plugins): keep OpenClaw chunks native in jiti Co-authored-by: Vincent Koc <[email protected]> * docs(changelog): move plugin fix to unreleased --------- Co-authored-by: Peter Steinberger <[email protected]>
1 parent 3f1dea7 commit 61ac4ec

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai
1010

1111
- **WhatsApp restart recovery:** stop automatic restart loops after logged-out or connection-replaced disconnects until the account reconnects. (#78511) Thanks @openperf.
1212
- **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.
13+
- **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.
1314
- **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)
1415
- **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)
1516

src/plugins/sdk-alias.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,6 +2034,7 @@ describe("plugin sdk alias helpers", () => {
20342034
const options = buildPluginLoaderJitiOptions({});
20352035

20362036
expect(options.tryNative).toBe(true);
2037+
expect(options.nativeModules).toEqual(["openclaw"]);
20372038
expect(options.interopDefault).toBe(true);
20382039
expect(options.extensions).toContain(".js");
20392040
expect(options.extensions).toContain(".ts");

src/plugins/sdk-alias.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,6 +2031,9 @@ export function buildPluginLoaderJitiOptions(
20312031
// Prefer Node's native sync ESM loader for built dist/*.js modules so
20322032
// bundled plugins and plugin-sdk subpaths stay on the canonical module graph.
20332033
tryNative: true,
2034+
// When jiti must transform a plugin entry, keep OpenClaw's own package
2035+
// chunks on the native module graph instead of re-evaluating them in jiti.
2036+
nativeModules: ["openclaw"],
20342037
extensions: [".ts", ".tsx", ".mts", ".cts", ".mtsx", ".ctsx", ".js", ".mjs", ".cjs", ".json"],
20352038
...(hasAliases
20362039
? {

0 commit comments

Comments
 (0)