Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsurePluginInstalled ¶
EnsurePluginInstalled makes sure the npm plugin package is available globally. It installs both the source package (CLI wrapper) and the actual runtime plugin.
func GetNpmChecksum ¶
GetNpmChecksum fetches the integrity hash of an npm package from the registry.
func ResolveGlobalNodeModules ¶
func ResolveGlobalNodeModules() string
ResolveGlobalNodeModules finds the global npm node_modules directory.
func ResolveNodeRunner ¶
func ResolveNodeRunner() string
ResolveNodeRunner returns "tsx" if available globally, otherwise "node". tsx is needed because OpenClaw plugins are ESM + TypeScript. If tsx is not found, it prompts the user for consent before installing globally.
func ResolvePluginPackage ¶
ResolvePluginPackage derives the actual plugin package name from the source. CLI wrapper packages like "@tencent-weixin/openclaw-weixin-cli" need the runtime package "@tencent-weixin/openclaw-weixin" to be installed instead.
func VerifyChecksum ¶
VerifyChecksum compares the installed package's npm integrity hash against the expected checksum from the manifest. Returns nil if match or if no checksum was recorded (graceful degradation).
Types ¶
This section is empty.