fix: remove all hardcoded user paths from plugins — dynamic SDK resolution
- plugins/macp/src/index.ts: use createRequire + dynamic import() for OC SDK - plugins/macp/src/acp-runtime-types.ts: local ACP runtime type definitions - plugins/macp/src/macp-runtime.ts: DEFAULT_REPO_ROOT and PI_RUNNER_PATH use os.homedir() instead of hardcoded /home/user/ - plugins/mosaic-framework/src/index.ts: removed hardcoded SDK import - No hardcoded /home/ paths remain in any plugin source file - Plugin works on any machine with openclaw installed globally
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
||||
import type { OpenClawPluginApi } from '/home/woltjejason/.npm-global/lib/node_modules/openclaw/dist/plugin-sdk/index.js';
|
||||
// OpenClawPluginApi type — the OC plugin loader provides the actual api object at runtime
|
||||
type OpenClawPluginApi = any;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Config types
|
||||
|
||||
Reference in New Issue
Block a user