Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
v0.2.4 — dynamic version from package.json, no more hardcoding
Salman Qureshica0bdf947ada
diff --git a/package.json b/package.jsonindex 2f1250a1..06e1fde9 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "@cosmicstack/mercury-agent",- "version": "0.2.3",+ "version": "0.2.4","description": "Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI or Telegram.","type": "module","main": "dist/index.js",diff --git a/src/index.ts b/src/index.tsindex 5d928242..8828354d 100644--- a/src/index.ts+++ b/src/index.ts@@ -1,3 +1,6 @@+import { readFileSync } from 'node:fs';+import { fileURLToPath } from 'node:url';+import { dirname, join } from 'node:path';import { Command } from 'commander';import readline from 'node:readline';import chalk from 'chalk';@@ -21,6 +24,9 @@ import { startBackground, stopDaemon, showLogs, getDaemonStatus, restartDaemon,import { installService, uninstallService, showServiceStatus, isServiceInstalled } from './cli/service.js';import { runWithWatchdog } from './cli/watchdog.js';+const __dirname = dirname(fileURLToPath(import.meta.url));+const pkgVersion = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8')).version;+function hr() {console.log(chalk.dim('─'.repeat(50)));}@@ -33,7 +39,7 @@ function banner() {}console.log('');console.log(chalk.white(' an AI agent for personal tasks'));- console.log(chalk.dim(' v0.2.3 · by Cosmic Stack · mercury.cosmicstack.org'));+ console.log(chalk.dim(` v${pkgVersion} · by Cosmic Stack · mercury.cosmicstack.org`));console.log('');}@@ -366,7 +372,7 @@ const program = new Command();program.name('mercury').description('Mercury — Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access.')- .version('0.2.3')+ .version(pkgVersion).option('-v, --verbose', 'Show debug logs').action(async () => {if (!isSetupComplete()) {