@inetafrica/open-claudia 1.9.0 → 1.9.2
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 +38 -0
- package/bot-agent.js +16 -7
- package/bot.js +21 -11
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v1.9.2
|
|
4
|
+
- Fix: show what's new after upgrade
|
|
5
|
+
- Startup message shows version
|
|
6
|
+
|
|
7
|
+
## v1.9.1
|
|
8
|
+
- Fix: duplicate messages — progress message now edited instead of sending a second copy
|
|
9
|
+
|
|
10
|
+
## v1.9.0
|
|
11
|
+
- Force password change on first web UI login
|
|
12
|
+
- Password complexity requirements (12+ chars, uppercase, lowercase, number, symbol)
|
|
13
|
+
|
|
14
|
+
## v1.8.1
|
|
15
|
+
- Web UI accepts WEB_PASSWORD env var for managed deployments
|
|
16
|
+
- Config API whitelist (only safe keys editable)
|
|
17
|
+
- Stronger password entropy (32 chars)
|
|
18
|
+
|
|
19
|
+
## v1.7.4
|
|
20
|
+
- Run as non-root user in Docker (Claude Code security requirement)
|
|
21
|
+
- Numeric UID 1001 for K8s compatibility
|
|
22
|
+
|
|
23
|
+
## v1.6.0
|
|
24
|
+
- Agent mode: non-blocking side conversations while tasks run
|
|
25
|
+
- /mode command to switch between direct and agent modes
|
|
26
|
+
|
|
27
|
+
## v1.5.0
|
|
28
|
+
- Robust message delivery with retry on replyTo failure
|
|
29
|
+
- Adaptive rate limiting (2s -> 5s) to avoid Telegram 429 errors
|
|
30
|
+
- Global error handling with Telegram notification on crash
|
|
31
|
+
- editMessage handles rate limits gracefully
|
|
32
|
+
|
|
33
|
+
## v1.4.5
|
|
34
|
+
- Streaming progress with tool names and elapsed time
|
|
35
|
+
- Voice note transcription via whisper.cpp
|
|
36
|
+
- File and image handling
|
|
37
|
+
- Cron jobs for scheduled tasks
|
|
38
|
+
- Encrypted vault for credentials
|
package/bot-agent.js
CHANGED
|
@@ -830,11 +830,7 @@ async function runClaude(prompt, cwd, replyToMsgId, opts = {}) {
|
|
|
830
830
|
const chunks = splitMessage(finalText);
|
|
831
831
|
const firstChunk = chunks[0];
|
|
832
832
|
|
|
833
|
-
|
|
834
|
-
firstChunk.length < 4000 && chunks.length === 1 &&
|
|
835
|
-
lastUpdate.includes(firstChunk.slice(0, 200));
|
|
836
|
-
|
|
837
|
-
if (progressAlreadyHasFinal) {
|
|
833
|
+
if (statusMessageId && chunks.length === 1) {
|
|
838
834
|
await editMessage(statusMessageId, firstChunk);
|
|
839
835
|
} else {
|
|
840
836
|
const sent = await send(firstChunk, { replyTo: replyToMsgId });
|
|
@@ -1022,10 +1018,23 @@ bot.onText(/\/upgrade$/, async (msg) => {
|
|
|
1022
1018
|
cwd: process.env.HOME || require("os").homedir(),
|
|
1023
1019
|
env: { ...process.env, PATH: FULL_PATH, HOME: process.env.HOME || require("os").homedir() },
|
|
1024
1020
|
});
|
|
1025
|
-
// Read version from newly installed package
|
|
1021
|
+
// Read version and changelog from newly installed package
|
|
1026
1022
|
const root = execSync("npm root -g", { encoding: "utf-8", cwd: process.env.HOME || require("os").homedir(), env: { ...process.env, PATH: FULL_PATH } }).trim();
|
|
1027
1023
|
const newPkg = JSON.parse(fs.readFileSync(path.join(root, "@inetafrica", "open-claudia", "package.json"), "utf-8"));
|
|
1028
|
-
|
|
1024
|
+
let whatsNew = "";
|
|
1025
|
+
try {
|
|
1026
|
+
const changelog = fs.readFileSync(path.join(root, "@inetafrica", "open-claudia", "CHANGELOG.md"), "utf-8");
|
|
1027
|
+
const versionHeader = `## v${newPkg.version}`;
|
|
1028
|
+
const start = changelog.indexOf(versionHeader);
|
|
1029
|
+
if (start >= 0) {
|
|
1030
|
+
const afterHeader = changelog.slice(start + versionHeader.length);
|
|
1031
|
+
const nextVersion = afterHeader.indexOf("\n## ");
|
|
1032
|
+
const section = nextVersion >= 0 ? afterHeader.slice(0, nextVersion) : afterHeader;
|
|
1033
|
+
whatsNew = section.trim();
|
|
1034
|
+
}
|
|
1035
|
+
} catch (e) { /* no changelog */ }
|
|
1036
|
+
const msg = `Installed v${newPkg.version}.${whatsNew ? `\n\nWhat's new:\n${whatsNew}` : ""}\n\nGoing offline to restart...`;
|
|
1037
|
+
await send(msg);
|
|
1029
1038
|
} catch (e) {
|
|
1030
1039
|
const errOutput = (e.stdout || e.stderr || e.message || "").slice(-500);
|
|
1031
1040
|
await send(`Upgrade failed:\n${errOutput}`);
|
package/bot.js
CHANGED
|
@@ -862,15 +862,11 @@ async function runClaude(prompt, cwd, replyToMsgId, opts = {}) {
|
|
|
862
862
|
const chunks = splitMessage(finalText);
|
|
863
863
|
const firstChunk = chunks[0];
|
|
864
864
|
|
|
865
|
-
// If
|
|
866
|
-
//
|
|
867
|
-
// or multi-chunk
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
lastUpdate.includes(firstChunk.slice(0, 200));
|
|
871
|
-
|
|
872
|
-
if (progressAlreadyHasFinal) {
|
|
873
|
-
// Edit the progress message to show clean final text (remove tool steps header)
|
|
865
|
+
// If there's already a progress message showing, edit it to the final text
|
|
866
|
+
// instead of sending a duplicate. Only send a NEW message if there was no
|
|
867
|
+
// progress message or the response is multi-chunk (too long for one edit).
|
|
868
|
+
if (statusMessageId && chunks.length === 1) {
|
|
869
|
+
// Edit progress message to clean final text
|
|
874
870
|
await editMessage(statusMessageId, firstChunk);
|
|
875
871
|
} else {
|
|
876
872
|
// Send final result as a new message (triggers notification)
|
|
@@ -1064,10 +1060,24 @@ bot.onText(/\/upgrade$/, async (msg) => {
|
|
|
1064
1060
|
cwd: process.env.HOME || require("os").homedir(),
|
|
1065
1061
|
env: { ...process.env, PATH: FULL_PATH, HOME: process.env.HOME || require("os").homedir() },
|
|
1066
1062
|
});
|
|
1067
|
-
// Read version from newly installed package
|
|
1063
|
+
// Read version and changelog from newly installed package
|
|
1068
1064
|
const root = execSync("npm root -g", { encoding: "utf-8", cwd: process.env.HOME || require("os").homedir(), env: { ...process.env, PATH: FULL_PATH } }).trim();
|
|
1069
1065
|
const newPkg = JSON.parse(fs.readFileSync(path.join(root, "@inetafrica", "open-claudia", "package.json"), "utf-8"));
|
|
1070
|
-
|
|
1066
|
+
// Extract current version's changelog entry
|
|
1067
|
+
let whatsNew = "";
|
|
1068
|
+
try {
|
|
1069
|
+
const changelog = fs.readFileSync(path.join(root, "@inetafrica", "open-claudia", "CHANGELOG.md"), "utf-8");
|
|
1070
|
+
const versionHeader = `## v${newPkg.version}`;
|
|
1071
|
+
const start = changelog.indexOf(versionHeader);
|
|
1072
|
+
if (start >= 0) {
|
|
1073
|
+
const afterHeader = changelog.slice(start + versionHeader.length);
|
|
1074
|
+
const nextVersion = afterHeader.indexOf("\n## ");
|
|
1075
|
+
const section = nextVersion >= 0 ? afterHeader.slice(0, nextVersion) : afterHeader;
|
|
1076
|
+
whatsNew = section.trim();
|
|
1077
|
+
}
|
|
1078
|
+
} catch (e) { /* no changelog */ }
|
|
1079
|
+
const msg = `Installed v${newPkg.version}.${whatsNew ? `\n\nWhat's new:\n${whatsNew}` : ""}\n\nGoing offline to restart...`;
|
|
1080
|
+
await send(msg);
|
|
1071
1081
|
} catch (e) {
|
|
1072
1082
|
const errOutput = (e.stdout || e.stderr || e.message || "").slice(-500);
|
|
1073
1083
|
await send(`Upgrade failed:\n${errOutput}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inetafrica/open-claudia",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"description": "Your always-on AI coding assistant — Claude Code via Telegram",
|
|
5
5
|
"main": "bot.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"docker-entrypoint.sh",
|
|
26
26
|
".dockerignore",
|
|
27
27
|
".env.example",
|
|
28
|
-
"README.md"
|
|
28
|
+
"README.md",
|
|
29
|
+
"CHANGELOG.md"
|
|
29
30
|
],
|
|
30
31
|
"keywords": [
|
|
31
32
|
"claude",
|