@parall/openclaw-agent 1.32.1 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -3
- package/package.json +1 -1
- package/src/index.ts +4 -3
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ const PRLL_ORG_ID = env('PRLL_ORG_ID');
|
|
|
32
32
|
const stateDir = env('PRLL_STATE_DIR');
|
|
33
33
|
const PRLL_WS_URL = process.env.PRLL_WS_URL?.trim() || '';
|
|
34
34
|
const PRLL_SWIMLANE_NAME = process.env.PRLL_SWIMLANE_NAME?.trim() || '';
|
|
35
|
+
const openclawBin = process.env.PRLL_OPENCLAW_BIN?.trim() || 'openclaw';
|
|
35
36
|
const gatewayPort = process.env.OPENCLAW_GATEWAY_PORT?.trim() || '0';
|
|
36
37
|
const pluginArchive = process.env.PRLL_OPENCLAW_PLUGIN_ARCHIVE?.trim() || '/opt/parall-plugin/parall-plugin.tgz';
|
|
37
38
|
// ---------------------------------------------------------------------------
|
|
@@ -51,7 +52,7 @@ if (fs.existsSync(pluginArchive)) {
|
|
|
51
52
|
fs.rmSync(legacyExtDir, { recursive: true, force: true });
|
|
52
53
|
log.info(`Installing Parall plugin from ${pluginArchive}...`);
|
|
53
54
|
try {
|
|
54
|
-
execFileSync(
|
|
55
|
+
execFileSync(openclawBin, ['plugins', 'install', pluginArchive, '--force', '--dangerously-force-unsafe-install'], {
|
|
55
56
|
env: { ...process.env, OPENCLAW_STATE_DIR: openclawStateDir },
|
|
56
57
|
stdio: 'inherit',
|
|
57
58
|
timeout: 60_000,
|
|
@@ -277,7 +278,7 @@ async function preseedPlatformConfig() {
|
|
|
277
278
|
// 6. openclaw doctor --fix (non-fatal)
|
|
278
279
|
// ---------------------------------------------------------------------------
|
|
279
280
|
try {
|
|
280
|
-
execFileSync(
|
|
281
|
+
execFileSync(openclawBin, ['doctor', '--fix'], {
|
|
281
282
|
env: { ...process.env, OPENCLAW_STATE_DIR: openclawStateDir },
|
|
282
283
|
stdio: 'inherit',
|
|
283
284
|
timeout: 30_000,
|
|
@@ -308,7 +309,7 @@ if (gatewayPort !== '0') {
|
|
|
308
309
|
}
|
|
309
310
|
const cwd = workspaceDir || path.join(openclawStateDir, 'workspace');
|
|
310
311
|
fs.mkdirSync(cwd, { recursive: true });
|
|
311
|
-
const child = spawn(
|
|
312
|
+
const child = spawn(openclawBin, gatewayArgs, {
|
|
312
313
|
env: gatewayEnv,
|
|
313
314
|
cwd,
|
|
314
315
|
stdio: 'inherit',
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -39,6 +39,7 @@ const stateDir = env('PRLL_STATE_DIR');
|
|
|
39
39
|
|
|
40
40
|
const PRLL_WS_URL = process.env.PRLL_WS_URL?.trim() || '';
|
|
41
41
|
const PRLL_SWIMLANE_NAME = process.env.PRLL_SWIMLANE_NAME?.trim() || '';
|
|
42
|
+
const openclawBin = process.env.PRLL_OPENCLAW_BIN?.trim() || 'openclaw';
|
|
42
43
|
const gatewayPort = process.env.OPENCLAW_GATEWAY_PORT?.trim() || '0';
|
|
43
44
|
const pluginArchive =
|
|
44
45
|
process.env.PRLL_OPENCLAW_PLUGIN_ARCHIVE?.trim() || '/opt/parall-plugin/parall-plugin.tgz';
|
|
@@ -66,7 +67,7 @@ if (fs.existsSync(pluginArchive)) {
|
|
|
66
67
|
log.info(`Installing Parall plugin from ${pluginArchive}...`);
|
|
67
68
|
try {
|
|
68
69
|
execFileSync(
|
|
69
|
-
|
|
70
|
+
openclawBin,
|
|
70
71
|
['plugins', 'install', pluginArchive, '--force', '--dangerously-force-unsafe-install'],
|
|
71
72
|
{
|
|
72
73
|
env: { ...process.env, OPENCLAW_STATE_DIR: openclawStateDir },
|
|
@@ -330,7 +331,7 @@ async function preseedPlatformConfig(): Promise<void> {
|
|
|
330
331
|
// ---------------------------------------------------------------------------
|
|
331
332
|
|
|
332
333
|
try {
|
|
333
|
-
execFileSync(
|
|
334
|
+
execFileSync(openclawBin, ['doctor', '--fix'], {
|
|
334
335
|
env: { ...process.env, OPENCLAW_STATE_DIR: openclawStateDir },
|
|
335
336
|
stdio: 'inherit',
|
|
336
337
|
timeout: 30_000,
|
|
@@ -368,7 +369,7 @@ if (gatewayPort !== '0') {
|
|
|
368
369
|
const cwd = workspaceDir || path.join(openclawStateDir, 'workspace');
|
|
369
370
|
fs.mkdirSync(cwd, { recursive: true });
|
|
370
371
|
|
|
371
|
-
const child = spawn(
|
|
372
|
+
const child = spawn(openclawBin, gatewayArgs, {
|
|
372
373
|
env: gatewayEnv,
|
|
373
374
|
cwd,
|
|
374
375
|
stdio: 'inherit',
|