You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cea6b54
Browse filesBrowse the repository at this point in the historyBrowse files
fix: capture plugins using deferred SDK requires (#107)
* fix: capture SDK imports through named createRequire handles
* test(sdk): bypass require cache when checking hook cleanup
* fix(analysis): preserve require bindings during Bun type erasure
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
## Unreleased
4
4
5
+
- Discover literal SDK imports through stable handles from named Node.js `createRequire` imports so deferred registration and retained handlers receive their generated mock modules. Namespace/default factory handles are outside the supported static contract; shadowed `require` calls now need proven factory provenance.
6
+
5
7
- Capture plugins that bind asynchronous state stores or inspect optional instance lifecycle capabilities during registration; preserve capture-local singleton factory state and runtime slots across SDK barrels. State operations and singleton lifecycle drains remain explicitly unsupported by capture mocks.
6
8
7
9
- Capture namespace SDK imports and published doctor-contract bundles without missing exports; mock doctor descriptors remain inspectable while actual migration execution fails explicitly.
consttyped='import { createRequire as make } from "node:module"; const load: NodeRequire = make(import.meta.url); type Only = ReturnType<typeof load>; const sdk: object = load("openclaw/plugin-sdk/typed-alias"); sdk.isRecord({});';
'import { createRequire as make } from "node:module"; let load = make(import.meta.url); load = other; load("openclaw/plugin-sdk/no");',
72
+
'import { createRequire as make } from "node:module"; var load = make(import.meta.url); var load = other; load("openclaw/plugin-sdk/no");',
73
+
'import { createRequire as make } from "node:module"; let require = make(import.meta.url); require = other; require("openclaw/plugin-sdk/no");',
74
+
'import { createRequire as make } from "node:module"; const require = make(import.meta.url); function shadow(require) { require("openclaw/plugin-sdk/no"); }',
0 commit comments