@cosmicstack/mercury-agent 0.2.3 → 0.2.4

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/dist/index.js CHANGED
@@ -1,6 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/index.ts
4
+ import { readFileSync as readFileSync12 } from "fs";
5
+ import { fileURLToPath } from "url";
6
+ import { dirname as dirname3, join as join11 } from "path";
4
7
  import { Command } from "commander";
5
8
  import readline2 from "readline";
6
9
  import chalk6 from "chalk";
@@ -4258,6 +4261,8 @@ function sleep(ms) {
4258
4261
  }
4259
4262
 
4260
4263
  // src/index.ts
4264
+ var __dirname = dirname3(fileURLToPath(import.meta.url));
4265
+ var pkgVersion = JSON.parse(readFileSync12(join11(__dirname, "..", "package.json"), "utf8")).version;
4261
4266
  function hr() {
4262
4267
  console.log(chalk6.dim("\u2500".repeat(50)));
4263
4268
  }
@@ -4269,7 +4274,7 @@ function banner() {
4269
4274
  }
4270
4275
  console.log("");
4271
4276
  console.log(chalk6.white(" an AI agent for personal tasks"));
4272
- console.log(chalk6.dim(" v0.2.3 \xB7 by Cosmic Stack \xB7 mercury.cosmicstack.org"));
4277
+ console.log(chalk6.dim(` v${pkgVersion} \xB7 by Cosmic Stack \xB7 mercury.cosmicstack.org`));
4273
4278
  console.log("");
4274
4279
  }
4275
4280
  function splashScreen() {
@@ -4555,7 +4560,7 @@ async function runAgent(isDaemon = false) {
4555
4560
  process.on("SIGTERM", shutdown);
4556
4561
  }
4557
4562
  var program = new Command();
4558
- program.name("mercury").description("Mercury \u2014 Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access.").version("0.2.3").option("-v, --verbose", "Show debug logs").action(async () => {
4563
+ program.name("mercury").description("Mercury \u2014 Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access.").version(pkgVersion).option("-v, --verbose", "Show debug logs").action(async () => {
4559
4564
  if (!isSetupComplete()) {
4560
4565
  await configure();
4561
4566
  autoDaemonize();