@tspappsen/elamax 1.2.5 → 1.2.6

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.
@@ -11,6 +11,7 @@ import { searchMemories } from "../store/db.js";
11
11
  import { listSkills } from "../copilot/skills.js";
12
12
  import { restartDaemon } from "../daemon.js";
13
13
  import { getRouterConfig, updateRouterConfig } from "../copilot/router.js";
14
+ import { VERSION } from "../version.js";
14
15
  let client;
15
16
  const commands = [
16
17
  new SlashCommandBuilder().setName("help").setDescription("Show help"),
@@ -24,6 +25,7 @@ const commands = [
24
25
  new SlashCommandBuilder().setName("skills").setDescription("List installed skills"),
25
26
  new SlashCommandBuilder().setName("workers").setDescription("List active worker sessions"),
26
27
  new SlashCommandBuilder().setName("restart").setDescription("Restart Max"),
28
+ new SlashCommandBuilder().setName("version").setDescription("Show Max version"),
27
29
  ];
28
30
  function getHelpText() {
29
31
  return ("I'm Max, your AI daemon.\n\n" +
@@ -37,6 +39,7 @@ function getHelpText() {
37
39
  "/skills — List installed skills\n" +
38
40
  "/workers — List active worker sessions\n" +
39
41
  "/restart — Restart Max\n" +
42
+ "/version — Show Max version\n" +
40
43
  "/help — Show this help");
41
44
  }
42
45
  function isAllowedChannel(channelId) {
@@ -329,6 +332,10 @@ async function handleSlashCommand(interaction) {
329
332
  }, 500);
330
333
  return;
331
334
  }
335
+ case "version": {
336
+ await sendDiscordInteractionResponse(interaction, `Max v${VERSION}`);
337
+ return;
338
+ }
332
339
  default: {
333
340
  await sendDiscordInteractionResponse(interaction, "Unknown command.");
334
341
  }
@@ -11,6 +11,7 @@ import { searchMemories } from "../store/db.js";
11
11
  import { listSkills } from "../copilot/skills.js";
12
12
  import { restartDaemon } from "../daemon.js";
13
13
  import { getRouterConfig, updateRouterConfig } from "../copilot/router.js";
14
+ import { VERSION } from "../version.js";
14
15
  let bot;
15
16
  async function sendTelegramResponse(ctx, text, replyParams, indicator) {
16
17
  const formatted = toTelegramMarkdown(text) + (indicator?.markdownSuffix ?? "");
@@ -174,6 +175,7 @@ export function createBot() {
174
175
  "/skills — List installed skills\n" +
175
176
  "/workers — List active worker sessions\n" +
176
177
  "/restart — Restart Max\n" +
178
+ "/version — Show Max version\n" +
177
179
  "/help — Show this help"));
178
180
  bot.command("cancel", async (ctx) => {
179
181
  const cancelled = await cancelCurrentMessage();
@@ -248,6 +250,7 @@ export function createBot() {
248
250
  });
249
251
  }, 500);
250
252
  });
253
+ bot.command("version", (ctx) => ctx.reply(`Max v${VERSION}`));
251
254
  bot.command("auto", async (ctx) => {
252
255
  const current = getRouterConfig();
253
256
  const newState = !current.enabled;
@@ -0,0 +1,5 @@
1
+ import { createRequire } from "node:module";
2
+ const require = createRequire(import.meta.url);
3
+ const pkg = require("../package.json");
4
+ export const VERSION = pkg.version;
5
+ //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tspappsen/elamax",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Max — a personal AI assistant for developers, built on the GitHub Copilot SDK",
5
5
  "bin": {
6
6
  "max": "dist/cli.js"