@tractorscorch/clank 1.4.5 → 1.4.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/CHANGELOG.md CHANGED
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
6
 
7
7
  ---
8
8
 
9
+ ## [1.4.6] — 2026-03-22
10
+
11
+ ### Fixed
12
+ - **Telegram stutter (for real)** — when the model responds fast, the initial `sendMessage` promise hasn't resolved by the time the full response is ready, causing a duplicate message via the fallback path; now waits for the in-flight message ID before falling back
13
+
14
+ ---
15
+
9
16
  ## [1.4.5] — 2026-03-22
10
17
 
11
18
  ### Fixed
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="https://github.com/ItsTrag1c/Clank/releases/latest"><img src="https://img.shields.io/badge/version-1.4.5-blue.svg" alt="Version" /></a>
12
+ <a href="https://github.com/ItsTrag1c/Clank/releases/latest"><img src="https://img.shields.io/badge/version-1.4.6-blue.svg" alt="Version" /></a>
13
13
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License" /></a>
14
14
  <a href="https://www.npmjs.com/package/@tractorscorch/clank"><img src="https://img.shields.io/npm/v/@tractorscorch/clank.svg" alt="npm" /></a>
15
15
  <a href="https://github.com/ItsTrag1c/Clank/stargazers"><img src="https://img.shields.io/github/stars/ItsTrag1c/Clank.svg" alt="Stars" /></a>
@@ -75,7 +75,7 @@ That's it. Setup auto-detects your local models, configures the gateway, and get
75
75
  | Platform | Download |
76
76
  |----------|----------|
77
77
  | **npm** (all platforms) | `npm install -g @tractorscorch/clank` |
78
- | **macOS** (Apple Silicon) | [Clank_1.4.5_macos](https://github.com/ItsTrag1c/Clank/releases/latest/download/Clank_1.4.5_macos) |
78
+ | **macOS** (Apple Silicon) | [Clank_1.4.6_macos](https://github.com/ItsTrag1c/Clank/releases/latest/download/Clank_1.4.6_macos) |
79
79
 
80
80
  ## Features
81
81
 
package/dist/index.js CHANGED
@@ -5275,6 +5275,20 @@ var init_telegram = __esm({
5275
5275
  }
5276
5276
  }
5277
5277
  );
5278
+ if (sendingInitial && !streamMsgId) {
5279
+ await new Promise((r) => {
5280
+ const check2 = setInterval(() => {
5281
+ if (streamMsgId) {
5282
+ clearInterval(check2);
5283
+ r();
5284
+ }
5285
+ }, 50);
5286
+ setTimeout(() => {
5287
+ clearInterval(check2);
5288
+ r();
5289
+ }, 3e3);
5290
+ });
5291
+ }
5278
5292
  if (streamMsgId && response) {
5279
5293
  const finalText = response.length > 4e3 ? response.slice(0, 3950) + "\n... (truncated)" : response;
5280
5294
  await bot.api.editMessageText(chatId, streamMsgId, finalText).catch(() => {
@@ -6064,7 +6078,7 @@ var init_server = __esm({
6064
6078
  res.writeHead(200, { "Content-Type": "application/json" });
6065
6079
  res.end(JSON.stringify({
6066
6080
  status: "ok",
6067
- version: "1.4.5",
6081
+ version: "1.4.6",
6068
6082
  uptime: process.uptime(),
6069
6083
  clients: this.clients.size,
6070
6084
  agents: this.engines.size
@@ -6176,7 +6190,7 @@ var init_server = __esm({
6176
6190
  const hello = {
6177
6191
  type: "hello",
6178
6192
  protocol: PROTOCOL_VERSION,
6179
- version: "1.4.5",
6193
+ version: "1.4.6",
6180
6194
  agents: this.config.agents.list.map((a) => ({
6181
6195
  id: a.id,
6182
6196
  name: a.name || a.id,
@@ -7570,7 +7584,7 @@ async function runTui(opts) {
7570
7584
  ws.on("open", () => {
7571
7585
  ws.send(JSON.stringify({
7572
7586
  type: "connect",
7573
- params: { auth: { token }, mode: "tui", version: "1.4.5" }
7587
+ params: { auth: { token }, mode: "tui", version: "1.4.6" }
7574
7588
  }));
7575
7589
  });
7576
7590
  ws.on("message", (data) => {
@@ -7872,14 +7886,14 @@ async function runUpdate() {
7872
7886
  }
7873
7887
  console.log(dim9(" Pulling latest version..."));
7874
7888
  try {
7875
- const output = execSync2("npm install -g @tractorscorch/clank@latest --force", {
7889
+ const output = execSync2("npm install -g @tractorscorch/clank@latest --force --prefer-online", {
7876
7890
  encoding: "utf-8",
7877
7891
  timeout: 12e4
7878
7892
  });
7879
7893
  console.log(dim9(` ${output.trim()}`));
7880
7894
  } catch (err) {
7881
7895
  console.error(red6(` Update failed: ${err instanceof Error ? err.message : err}`));
7882
- console.error(dim9(" Try manually: npm install -g @tractorscorch/clank@latest --force"));
7896
+ console.error(dim9(" Try manually: npm install -g @tractorscorch/clank@latest --force --prefer-online"));
7883
7897
  return;
7884
7898
  }
7885
7899
  try {
@@ -7999,7 +8013,7 @@ import { fileURLToPath as fileURLToPath5 } from "url";
7999
8013
  import { dirname as dirname5, join as join19 } from "path";
8000
8014
  var __filename3 = fileURLToPath5(import.meta.url);
8001
8015
  var __dirname3 = dirname5(__filename3);
8002
- var version = "1.4.5";
8016
+ var version = "1.4.6";
8003
8017
  try {
8004
8018
  const pkg = JSON.parse(readFileSync(join19(__dirname3, "..", "package.json"), "utf-8"));
8005
8019
  version = pkg.version;