@openagents-org/agent-launcher 0.1.7 → 0.1.9
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/package.json +1 -1
- package/src/adapters/openclaw.js +2 -1
- package/src/tui.js +25 -15
package/package.json
CHANGED
package/src/adapters/openclaw.js
CHANGED
|
@@ -223,8 +223,9 @@ class OpenClawAdapter extends BaseAdapter {
|
|
|
223
223
|
let stdout = '';
|
|
224
224
|
let stderr = '';
|
|
225
225
|
|
|
226
|
+
// OpenClaw writes --json output to stderr, so capture both
|
|
226
227
|
if (proc.stdout) proc.stdout.on('data', (d) => { stdout += d; });
|
|
227
|
-
if (proc.stderr) proc.stderr.on('data', (d) => { stderr += d; });
|
|
228
|
+
if (proc.stderr) proc.stderr.on('data', (d) => { stderr += d; stdout += d; });
|
|
228
229
|
|
|
229
230
|
proc.on('error', (err) => reject(err));
|
|
230
231
|
proc.on('exit', (code) => {
|
package/src/tui.js
CHANGED
|
@@ -407,7 +407,7 @@ function createTUI() {
|
|
|
407
407
|
});
|
|
408
408
|
|
|
409
409
|
const list = blessed.list({
|
|
410
|
-
parent: box, top: 2, left: 0, width: '100%', height: '
|
|
410
|
+
parent: box, top: 2, left: 0, width: '100%', height: '50%-1',
|
|
411
411
|
keys: true, vi: true, mouse: true,
|
|
412
412
|
tags: true,
|
|
413
413
|
style: {
|
|
@@ -416,14 +416,21 @@ function createTUI() {
|
|
|
416
416
|
},
|
|
417
417
|
});
|
|
418
418
|
|
|
419
|
-
|
|
420
|
-
|
|
419
|
+
// Install log panel — shows full streaming output
|
|
420
|
+
const logPanel = blessed.box({
|
|
421
|
+
parent: box, top: '50%+1', left: 0, width: '100%', height: '50%-2',
|
|
422
|
+
border: { type: 'line' },
|
|
423
|
+
label: ' {bold}Install Log{/bold} ',
|
|
421
424
|
tags: true,
|
|
425
|
+
style: { border: { fg: COLORS.panelBorder }, label: { fg: COLORS.accent } },
|
|
422
426
|
});
|
|
423
427
|
|
|
424
|
-
const installLog = blessed.
|
|
425
|
-
parent:
|
|
428
|
+
const installLog = blessed.log({
|
|
429
|
+
parent: logPanel,
|
|
430
|
+
top: 0, left: 0, width: '100%-2', height: '100%-2',
|
|
431
|
+
scrollable: true, scrollOnInput: true,
|
|
426
432
|
tags: true,
|
|
433
|
+
padding: { left: 1 },
|
|
427
434
|
style: { fg: 'grey' },
|
|
428
435
|
});
|
|
429
436
|
|
|
@@ -457,7 +464,7 @@ function createTUI() {
|
|
|
457
464
|
showConfirmDialog(`${verb} ${entry.label}?`, (yes) => {
|
|
458
465
|
if (yes) {
|
|
459
466
|
installing = true;
|
|
460
|
-
doInstall(entry,
|
|
467
|
+
doInstall(entry, logPanel, installLog, list, catalog, renderList, () => { installing = false; });
|
|
461
468
|
}
|
|
462
469
|
list.focus();
|
|
463
470
|
screen.render();
|
|
@@ -477,33 +484,36 @@ function createTUI() {
|
|
|
477
484
|
screen.render();
|
|
478
485
|
}
|
|
479
486
|
|
|
480
|
-
function doInstall(entry,
|
|
481
|
-
|
|
487
|
+
function doInstall(entry, logPanel, installLog, list, catalog, renderList, onDone) {
|
|
488
|
+
logPanel.setLabel(` {bold}Installing ${entry.name}...{/bold} `);
|
|
489
|
+
installLog.setContent('');
|
|
490
|
+
installLog.log(`{cyan-fg}>>> Installing ${entry.name}...{/cyan-fg}`);
|
|
482
491
|
screen.render();
|
|
483
492
|
log(`Installing {cyan-fg}${entry.name}{/cyan-fg}...`);
|
|
484
493
|
|
|
485
494
|
connector.installer.installStreaming(entry.name, (chunk) => {
|
|
486
495
|
const lines = chunk.split('\n').filter(l => l.trim());
|
|
487
496
|
for (const line of lines) {
|
|
488
|
-
const clean = line.trim().substring(0,
|
|
489
|
-
log(
|
|
490
|
-
installLog.setContent(` {gray-fg}${clean.substring(0, 80)}{/gray-fg}`);
|
|
497
|
+
const clean = line.trim().substring(0, 120);
|
|
498
|
+
installLog.log(clean);
|
|
491
499
|
screen.render();
|
|
492
500
|
}
|
|
493
501
|
}).then(() => {
|
|
494
|
-
|
|
502
|
+
installLog.log('');
|
|
503
|
+
installLog.log(`{green-fg}\u2713 ${entry.name} installed successfully!{/green-fg}`);
|
|
504
|
+
logPanel.setLabel(` {bold}{green-fg}Install Complete{/green-fg}{/bold} `);
|
|
495
505
|
log(`{green-fg}\u2713{/green-fg} ${entry.name} installed`);
|
|
496
506
|
const idx = catalog.findIndex(c => c.name === entry.name);
|
|
497
507
|
if (idx >= 0) catalog[idx].installed = true;
|
|
498
508
|
renderList();
|
|
499
|
-
installLog.setContent('');
|
|
500
509
|
onDone();
|
|
501
510
|
list.focus();
|
|
502
511
|
screen.render();
|
|
503
512
|
}).catch((e) => {
|
|
504
|
-
|
|
513
|
+
installLog.log('');
|
|
514
|
+
installLog.log(`{red-fg}\u2717 Failed: ${e.message}{/red-fg}`);
|
|
515
|
+
logPanel.setLabel(` {bold}{red-fg}Install Failed{/red-fg}{/bold} `);
|
|
505
516
|
log(`{red-fg}\u2717 Install failed:{/red-fg} ${e.message}`);
|
|
506
|
-
installLog.setContent('');
|
|
507
517
|
onDone();
|
|
508
518
|
list.focus();
|
|
509
519
|
screen.render();
|