fix: remove all hardcoded user paths — dynamic OC SDK resolution #333
Reference in New Issue
Block a user
Delete Branch "fix/macp-dynamic-sdk-resolution"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Zero hardcoded
/home/paths in any plugin source file.Approach:
plugins/macp/src/index.ts: usescreateRequire+ dynamicimport()to resolve the OC plugin SDK at runtime from whereveropenclawis globally installedplugins/macp/src/acp-runtime-types.ts: local TypeScript interface definitions mirroring the OC ACP runtime contract — compiles without the SDK presentplugins/macp/src/macp-runtime.ts:DEFAULT_REPO_ROOTandPI_RUNNER_PATHuseos.homedir()+path.join()instead of literal pathsplugins/mosaic-framework/src/index.ts: SDK type import replaced with local typeThis plugin will now compile and run on any machine with
openclawinstalled globally via npm.