Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

reorder menu options and cleanup shutdown lifecycle

Salman Qureshi50942a3148e8
diff --git a/src/channels/cli.ts b/src/channels/cli.ts
index 2b91c386..8a824a85 100644
--- a/src/channels/cli.ts
+++ b/src/channels/cli.ts
@@ -426,8 +426,8 @@ export class CLIChannel extends BaseChannel {
type: 'mode',
message: 'Choose how Mercury handles risky actions this session.',
options: [
- { value: 'ask-me', label: 'Ask Me — confirm before file writes, shell commands, and scope changes' },
{ value: 'allow-all', label: 'Allow All — auto-approve everything (scopes, commands, loop continuation)' },
+ { value: 'ask-me', label: 'Ask Me — confirm before file writes, shell commands, and scope changes' },
],
resolve: () => {},
},
diff --git a/src/core/agent.ts b/src/core/agent.ts
index fe56aa40..d9c07e79 100644
--- a/src/core/agent.ts
+++ b/src/core/agent.ts
@@ -1563,6 +1563,10 @@ Always specify owner and repo parameters on GitHub tools. The user's GitHub user
}
async shutdown(): Promise<void> {
+ if (this.supervisor) {
+ await this.supervisor.haltAll();
+ }
+ this.backgroundTasks.destroy();
await this.sleep();
logger.info('Mercury has shut down');
}