@openagents-org/agent-launcher 0.2.86 → 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 +2 -0
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
|
@@ -971,6 +971,7 @@ function createTUI() {
|
|
|
971
971
|
function doSave() {
|
|
972
972
|
const env = gatherEnv();
|
|
973
973
|
connector.saveAgentEnv(agent.type, env);
|
|
974
|
+
signalDaemonReload();
|
|
974
975
|
log(`{green-fg}\u2713{/green-fg} Configuration saved for ${agent.type}`);
|
|
975
976
|
closeConfig();
|
|
976
977
|
}
|
|
@@ -1259,6 +1260,7 @@ function createTUI() {
|
|
|
1259
1260
|
// Remove from config
|
|
1260
1261
|
try {
|
|
1261
1262
|
connector.removeAgent(agentName);
|
|
1263
|
+
signalDaemonReload();
|
|
1262
1264
|
log(`{green-fg}\u2713{/green-fg} Removed {cyan-fg}${agentName}{/cyan-fg}`);
|
|
1263
1265
|
} catch (e) {
|
|
1264
1266
|
log(`{red-fg}\u2717{/red-fg} ${e.message}`);
|