@openagents-org/agent-launcher 0.2.85 → 0.2.87
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/cli.js +5 -0
- package/src/tui.js +19 -9
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -125,6 +125,9 @@ async function cmdCreate(connector, flags, positional) {
|
|
|
125
125
|
connector.addAgent({ name, type, role, path: flags.path || process.cwd() });
|
|
126
126
|
print(`Agent '${name}' created (type: ${type})`);
|
|
127
127
|
|
|
128
|
+
// Signal daemon to pick up the new agent
|
|
129
|
+
try { connector.sendDaemonCommand('reload'); } catch {}
|
|
130
|
+
|
|
128
131
|
// Auto-install if not installed
|
|
129
132
|
if (!connector.isInstalled(type)) {
|
|
130
133
|
print(`Installing ${type}...`);
|
|
@@ -145,6 +148,7 @@ async function cmdRemove(connector, _flags, positional) {
|
|
|
145
148
|
const name = positional[0];
|
|
146
149
|
if (!name) { print('Usage: agn remove <name>'); return; }
|
|
147
150
|
connector.removeAgent(name);
|
|
151
|
+
try { connector.sendDaemonCommand('reload'); } catch {}
|
|
148
152
|
print(`Agent '${name}' removed`);
|
|
149
153
|
}
|
|
150
154
|
|
|
@@ -404,6 +408,7 @@ async function cmdEnv(connector, flags, positional) {
|
|
|
404
408
|
const key = setVal.slice(0, eq);
|
|
405
409
|
const val = setVal.slice(eq + 1);
|
|
406
410
|
connector.saveAgentEnv(type, { [key]: val });
|
|
411
|
+
try { connector.sendDaemonCommand('reload'); } catch {}
|
|
407
412
|
print(`Saved ${key} for ${type}`);
|
|
408
413
|
return;
|
|
409
414
|
}
|
package/src/tui.js
CHANGED
|
@@ -251,7 +251,7 @@ function createTUI() {
|
|
|
251
251
|
const agentList = blessed.list({
|
|
252
252
|
parent: agentPanel,
|
|
253
253
|
top: 1, left: 0, width: '100%-2', height: '100%-3',
|
|
254
|
-
keys:
|
|
254
|
+
keys: false, vi: false, mouse: true,
|
|
255
255
|
tags: true,
|
|
256
256
|
style: {
|
|
257
257
|
bg: 'black',
|
|
@@ -414,21 +414,29 @@ function createTUI() {
|
|
|
414
414
|
return agentRows[Math.floor((agentList.selected || 0) / 2)];
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
//
|
|
418
|
-
agentList.
|
|
419
|
-
// Snap to even rows (main rows)
|
|
417
|
+
// Override up/down to skip detail rows (move by 2)
|
|
418
|
+
agentList.key(['down', 'j'], () => {
|
|
420
419
|
const idx = agentList.selected || 0;
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
const next = idx + 2;
|
|
421
|
+
if (next < agentList.items.length) {
|
|
422
|
+
agentList.select(next);
|
|
423
423
|
screen.render();
|
|
424
424
|
}
|
|
425
|
-
updateFooter();
|
|
426
425
|
});
|
|
426
|
+
agentList.key(['up', 'k'], () => {
|
|
427
|
+
const idx = agentList.selected || 0;
|
|
428
|
+
const prev = idx - 2;
|
|
429
|
+
if (prev >= 0) {
|
|
430
|
+
agentList.select(prev);
|
|
431
|
+
screen.render();
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
agentList.on('select item', () => updateFooter());
|
|
427
435
|
|
|
428
436
|
// ── Enter key → Context menu ──
|
|
429
|
-
agentList.
|
|
437
|
+
agentList.key('enter', () => {
|
|
430
438
|
if (currentView !== 'main') return;
|
|
431
|
-
const agent =
|
|
439
|
+
const agent = selectedAgent();
|
|
432
440
|
if (!agent || !agent.configured) return;
|
|
433
441
|
showAgentActionMenu(agent);
|
|
434
442
|
});
|
|
@@ -963,6 +971,7 @@ function createTUI() {
|
|
|
963
971
|
function doSave() {
|
|
964
972
|
const env = gatherEnv();
|
|
965
973
|
connector.saveAgentEnv(agent.type, env);
|
|
974
|
+
signalDaemonReload();
|
|
966
975
|
log(`{green-fg}\u2713{/green-fg} Configuration saved for ${agent.type}`);
|
|
967
976
|
closeConfig();
|
|
968
977
|
}
|
|
@@ -1251,6 +1260,7 @@ function createTUI() {
|
|
|
1251
1260
|
// Remove from config
|
|
1252
1261
|
try {
|
|
1253
1262
|
connector.removeAgent(agentName);
|
|
1263
|
+
signalDaemonReload();
|
|
1254
1264
|
log(`{green-fg}\u2713{/green-fg} Removed {cyan-fg}${agentName}{/cyan-fg}`);
|
|
1255
1265
|
} catch (e) {
|
|
1256
1266
|
log(`{red-fg}\u2717{/red-fg} ${e.message}`);
|