@tspappsen/elamax 1.2.3 → 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.
package/README.md CHANGED
@@ -11,7 +11,7 @@ curl -fsSL https://raw.githubusercontent.com/burkeholland/max/main/install.sh |
11
11
  Or install directly with npm:
12
12
 
13
13
  ```bash
14
- npm install -g elamax
14
+ npm install -g @tspappsen/elamax
15
15
  ```
16
16
 
17
17
  ## Quick Start
@@ -189,6 +189,15 @@ max tui
189
189
 
190
190
  On Windows, prefer `node dist/cli.js setup` for local development rather than the shell installer.
191
191
 
192
+ ### Publish to npm
193
+
194
+ ```bash
195
+ npm version patch
196
+ npm publish
197
+ ```
198
+
199
+ The package is published as `@tspappsen/elamax`, and `prepublishOnly` runs `npm run build` automatically.
200
+
192
201
  ### Running as a background service with pm2
193
202
 
194
203
  To keep Max running even after you close the terminal, use [pm2](https://pm2.keymetrics.io/):
@@ -25,16 +25,16 @@ This restriction does NOT apply to:
25
25
  - Any files outside the Max installation directory
26
26
  `;
27
27
  const osName = getOsName();
28
- return `You are Max, a personal AI assistant for developers running 24/7 on the user's machine (${osName}). You are Erik's always-on assistant.
28
+ return `You are Max, a personal AI assistant for developers running 24/7 on the user's machine (${osName}).
29
29
 
30
30
  ## Your Architecture
31
31
 
32
32
  You are a Node.js daemon process built with the Copilot SDK. Here's how you work:
33
33
 
34
- - **Telegram bot**: Your primary interface. Erik messages you from his phone or Telegram desktop. Messages arrive tagged with \`[via telegram]\`. Keep responses concise and mobile-friendly — short paragraphs, no huge code blocks.
35
- - **Discord bot**: Your other interface. Erik messages Discord. Messages arrive tagged with \`[via discord]\`. Keep responses concise — sensible paragraphs, but no huge code blocks.
34
+ - **Telegram bot**: Your primary interface. Your human collaborator messages you from Telegram, often on a phone or desktop client. Messages arrive tagged with \`[via telegram]\`. Keep responses concise and mobile-friendly — short paragraphs, no huge code blocks.
35
+ - **Discord bot**: Your other interface. Your human collaborator messages you on Discord. Messages arrive tagged with \`[via discord]\`. Keep responses concise — sensible paragraphs, but no huge code blocks.
36
36
  - **Local TUI**: A terminal readline interface on the local machine. Messages arrive tagged with \`[via tui]\`. You can be more verbose here since it's a full terminal.
37
- - **Background tasks**: Messages tagged \`[via background]\` are results from worker sessions you dispatched. Summarize and relay these to Erik.
37
+ - **Background tasks**: Messages tagged \`[via background]\` are results from worker sessions you dispatched. Summarize and relay these to your human collaborator.
38
38
  - **HTTP API**: You expose a local API on port ${config.apiPort} for programmatic access.
39
39
 
40
40
  When no source tag is present, assume Telegram.
@@ -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.3",
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"