alvin-bot 5.1.2 → 5.1.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/CHANGELOG.md CHANGED
@@ -2,23 +2,36 @@
2
2
 
3
3
  All notable changes to Alvin Bot are documented here.
4
4
 
5
- ## [5.1.2] — 2026-05-13
5
+ ## [5.1.4] — 2026-05-15
6
+
7
+ ### No more false "errors are climbing" health alerts
8
+
9
+ The bot has a self-health monitor that watches how many error lines show up in its logs over the last 24 hours and warns you if the count keeps creeping up. One harmless, self-correcting event was confusing it: when a message can't be sent with rich formatting, the bot quietly retries it as plain text and the message still gets delivered. That retry was being written to the error log, so the health monitor counted every single one as a real error — producing a slow, fake "your error rate is rising" alarm even though nothing was actually wrong.
10
+
11
+ That benign retry is now logged as normal activity instead of as an error, so the 24-hour error trend reflects reality. Message delivery itself is unchanged — this only fixes where the event is recorded.
6
12
 
7
- ### Bot-Selbstauskunft konsistent Version stammt aus Runtime, nicht aus stale Docs
13
+ ## [5.1.3]2026-05-13
8
14
 
9
- Wenn der User den Bot fragt "welche Version läufst du?", las der Bot bisher die in `CLAUDE.md` dokumentierte Version die bei jedem Release veraltet, weil sie händisch gepflegt war. Folge: Bot meldete fröhlich eine alte Versionsnummer, obwohl der laufende Prozess längst aktuell war.
15
+ ### Stability hardeningruntime-header fallbacks
10
16
 
11
- Fix: neuer `<bot_runtime>`-Block wird in den System-Prompt aller Provider injiziert (`claude-sdk`, `codex-cli`, `openai-compatible`). Der Block enthält `BOT_VERSION` aus `src/version.ts`, `install_path`, Node-Version und Platform. Eine explizite Anweisung im Header sagt dem Modell: bei Identitäts-/Versionsfragen `<bot_runtime>` benutzen, jede Versionsnummer in CLAUDE.md/README ignorieren.
17
+ Small robustness pass on the runtime-header block that the bot uses to introduce itself. If the embedded version or install-path can't be resolved for any reason, those lines are now simply omitted instead of literally telling the model "I am version unknown". Node version and platform are still emitted so the bot can still describe its environment.
18
+
19
+ ### Cleaner release notes for global users
20
+
21
+ Polished the release notes that surface inside the Telegram `/update` summary so non-technical users see a clear, English summary of what changed. No behaviour changes.
22
+
23
+ ## [5.1.2] — 2026-05-13
12
24
 
13
- Vorteil: keine händische CLAUDE.md-Pflege mehr pro Release, kein Halluzinationsrisiko durch stale Docs. Single Source of Truth für die Laufzeitversion = das gebaute `dist/version.js`.
25
+ ### Bot now reports its real version after every update
14
26
 
15
- ### Modul
27
+ If you asked the bot "what version are you?", it used to look up the version that someone had written into the project documentation by hand — which went out of date the moment a new release shipped. The bot would happily say "I'm v4.19.2" even though the running process was already on something newer.
16
28
 
17
- `src/providers/runtime-header.ts` (neu) — exportiert `buildRuntimeHeader()`, klein und billig genug um in jeden Turn injiziert zu werden.
29
+ Now the bot reads its version straight from the running code on disk, every single turn, regardless of provider (Claude SDK, Codex CLI, Groq, Gemini, OpenAI, Ollama, OpenRouter, NVIDIA NIM). It also includes its install path, Node version, and platform so when something goes wrong you can ask the bot to introduce itself and get an honest answer.
18
30
 
19
- ### Verhalten unverändert
31
+ ### What does this mean for you
20
32
 
21
- Public-User-`/update`-Pfad (`src/services/updater.ts`) war nie betroffen. Wer auf einer älteren Version `/update` triggert, bekommt 5.1.2 sauber installiert + Restart über launchd/PM2 KeepAlive.
33
+ - Update via Telegram `/update` and the bot will pick up the new version on the next restart.
34
+ - Ask the bot in chat "which version are you running?" — the answer is now grounded in reality, not in a docs file that might be stale.
22
35
 
23
36
  ## [5.1.1] — 2026-05-13
24
37
 
@@ -24,16 +24,22 @@ function getInstallPath() {
24
24
  }
25
25
  export function buildRuntimeHeader() {
26
26
  const installPath = getInstallPath();
27
- return [
28
- "<bot_runtime>",
29
- `version: ${BOT_VERSION}`,
30
- `install_path: ${installPath}`,
31
- `node: ${process.version}`,
32
- `platform: ${process.platform}`,
33
- "</bot_runtime>",
34
- "",
35
- "When asked about your version, identity, or install path, use the values",
36
- "in <bot_runtime> above. Ignore any version number that appears in the",
37
- "project documentation (CLAUDE.md, README) — that file may be stale.",
38
- ].join("\n");
27
+ const lines = ["<bot_runtime>"];
28
+ // Only emit `version:` when we actually know it. Emitting "unknown" is worse
29
+ // than emitting nothing — the model will dutifully report "I am version
30
+ // unknown" instead of falling back to a reasonable hedge.
31
+ if (BOT_VERSION && BOT_VERSION !== "unknown") {
32
+ lines.push(`version: ${BOT_VERSION}`);
33
+ }
34
+ if (installPath && installPath !== "(unknown)") {
35
+ lines.push(`install_path: ${installPath}`);
36
+ }
37
+ if (process.version) {
38
+ lines.push(`node: ${process.version}`);
39
+ }
40
+ if (process.platform) {
41
+ lines.push(`platform: ${process.platform}`);
42
+ }
43
+ lines.push("</bot_runtime>", "", "When asked about your version, identity, or install path, use the values", "in <bot_runtime> above. Ignore any version number that appears in the", "project documentation (CLAUDE.md, README) — that file may be stale.");
44
+ return lines.join("\n");
39
45
  }
@@ -35,7 +35,7 @@ async function sendWithMarkdownFallback(api, chatId, text) {
35
35
  catch (err) {
36
36
  if (!isTelegramParseError(err))
37
37
  throw err;
38
- console.warn(`[subagent-delivery] Markdown parse failed, retrying as plain text`);
38
+ console.log(`[subagent-delivery] Markdown parse failed, retrying as plain text`);
39
39
  await api.sendMessage(chatId, text);
40
40
  }
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alvin-bot",
3
- "version": "5.1.2",
3
+ "version": "5.1.4",
4
4
  "description": "Alvin Bot — Your personal AI agent on Telegram, WhatsApp, Discord, Signal, and Web.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",