mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-10-04 00:03:59 +00:00
fix(clawhubadapter): manager CLI improvements, pysimulator updates, sidecar fixes
This commit is contained in:
22
internal/plugins/clawhubadapter/manager/openclaw_cli.js
Normal file
22
internal/plugins/clawhubadapter/manager/openclaw_cli.js
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env node
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const { fork } = require('child_process');
|
||||
|
||||
const binDir = __dirname;
|
||||
const skillsdirPath = path.join(binDir, '..', '.skillsdir');
|
||||
|
||||
if (!fs.existsSync(skillsdirPath)) {
|
||||
process.stderr.write('Error: OpenClaw manager not running (no .skillsdir found)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const skillsDir = fs.readFileSync(skillsdirPath, 'utf8').trim();
|
||||
const managerPath = path.join(binDir, '..', 'manager.js');
|
||||
|
||||
const proc = fork(managerPath, [skillsDir, ...process.argv.slice(2)], {
|
||||
stdio: 'inherit',
|
||||
env: { ...process.env, OPENCLAW_CLI: '1' },
|
||||
});
|
||||
|
||||
proc.on('exit', (code) => process.exit(code));
|
||||
Reference in New Issue
Block a user