@poolzin/pool-bot 2026.2.6 → 2026.2.7

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026.2.6",
3
- "commit": "d67aa6d87b042556d38fbe64f7ed4ce6a22dbf4e",
4
- "builtAt": "2026-02-14T08:48:33.834Z"
2
+ "version": "2026.2.7",
3
+ "commit": "60f0895a4604c140b6e6d000fc7141252efe40e9",
4
+ "builtAt": "2026-02-15T06:21:58.829Z"
5
5
  }
@@ -10,9 +10,13 @@ export const NODE_WINDOWS_TASK_NAME = "Poolbot Node";
10
10
  export const NODE_SERVICE_MARKER = "poolbot";
11
11
  export const NODE_SERVICE_KIND = "node";
12
12
  export const NODE_WINDOWS_TASK_SCRIPT_NAME = "node.cmd";
13
- export const LEGACY_GATEWAY_LAUNCH_AGENT_LABELS = ["com.steipete.poolbot.gateway"];
14
- export const LEGACY_GATEWAY_SYSTEMD_SERVICE_NAMES = [];
15
- export const LEGACY_GATEWAY_WINDOWS_TASK_NAMES = [];
13
+ export const LEGACY_GATEWAY_LAUNCH_AGENT_LABELS = [
14
+ "com.steipete.poolbot.gateway",
15
+ "com.moltbot.gateway",
16
+ "com.clawdbot.gateway",
17
+ ];
18
+ export const LEGACY_GATEWAY_SYSTEMD_SERVICE_NAMES = ["moltbot-gateway", "clawdbot-gateway"];
19
+ export const LEGACY_GATEWAY_WINDOWS_TASK_NAMES = ["Moltbot Gateway", "Clawdbot Gateway"];
16
20
  export function normalizeGatewayProfile(profile) {
17
21
  const trimmed = profile?.trim();
18
22
  if (!trimmed || trimmed.toLowerCase() === "default")
@@ -1,4 +1,4 @@
1
- import { Input, matchesKey, SelectList, getEditorKeybindings, } from "@mariozechner/pi-tui";
1
+ import { Input, matchesKey, SelectList, getEditorKeybindings, truncateToWidth, } from "@mariozechner/pi-tui";
2
2
  import chalk from "chalk";
3
3
  import { fuzzyFilterLower, prepareSearchItems } from "./fuzzy-filter.js";
4
4
  /**
@@ -46,7 +46,10 @@ export class FilterableSelectList {
46
46
  // Select list
47
47
  const listLines = this.selectList.render(width);
48
48
  lines.push(...listLines);
49
- return lines;
49
+ // Defensive truncation: ensure no line exceeds the target width after
50
+ // all ANSI formatting. Prevents pi-tui compositeLineAt crash on
51
+ // ANSI-heavy backgrounds ("Rendered line N exceeds terminal width").
52
+ return lines.map((line) => truncateToWidth(line, width));
50
53
  }
51
54
  handleInput(keyData) {
52
55
  const allowVimNav = !this.filterText.trim();
@@ -149,7 +149,12 @@ export class SearchableSelectList {
149
149
  const scrollInfo = `${this.selectedIndex + 1}/${this.filteredItems.length}`;
150
150
  lines.push(this.theme.scrollInfo(` ${scrollInfo}`));
151
151
  }
152
- return lines;
152
+ // Defensive truncation: ensure no line exceeds the target width after
153
+ // all ANSI formatting has been applied. pi-tui's compositeLineAt can
154
+ // miscalculate visible widths on ANSI-heavy lines, causing a crash
155
+ // ("Rendered line N exceeds terminal width"). Truncating here is a
156
+ // safe final guard that prevents the crash.
157
+ return lines.map((line) => truncateToWidth(line, width));
153
158
  }
154
159
  renderItemLine(item, isSelected, width, query) {
155
160
  const prefix = isSelected ? "→ " : " ";
@@ -1,3 +1,4 @@
1
+ import { truncateToWidth } from "@mariozechner/pi-tui";
1
2
  import { formatThinkingLevels, normalizeUsageDisplay, resolveResponseUsageMode, } from "../auto-reply/thinking.js";
2
3
  import { normalizeAgentId } from "../routing/session-key.js";
3
4
  import { formatRelativeTime } from "../utils/time-format.js";
@@ -10,6 +11,10 @@ export function createCommandHandlers(context) {
10
11
  state.currentAgentId = normalizeAgentId(id);
11
12
  await setSession("");
12
13
  };
14
+ // Maximum visible width for overlay item strings. The overlay has its own
15
+ // padding/chrome (~4 chars). We subtract a generous margin so that even
16
+ // after ANSI formatting, lines stay within terminal bounds.
17
+ const overlayItemWidth = () => Math.max(30, (tui.terminal.columns ?? 80) - 6);
13
18
  const openModelSelector = async () => {
14
19
  try {
15
20
  const models = await client.listModels();
@@ -18,10 +23,11 @@ export function createCommandHandlers(context) {
18
23
  tui.requestRender();
19
24
  return;
20
25
  }
26
+ const maxW = overlayItemWidth();
21
27
  const items = models.map((model) => ({
22
28
  value: `${model.provider}/${model.id}`,
23
- label: `${model.provider}/${model.id}`,
24
- description: model.name && model.name !== model.id ? model.name : "",
29
+ label: truncateToWidth(`${model.provider}/${model.id}`, maxW),
30
+ description: model.name && model.name !== model.id ? truncateToWidth(model.name, maxW) : "",
25
31
  }));
26
32
  const selector = createSearchableSelectList(items, 9);
27
33
  selector.onSelect = (item) => {
@@ -60,9 +66,10 @@ export function createCommandHandlers(context) {
60
66
  tui.requestRender();
61
67
  return;
62
68
  }
69
+ const maxW = overlayItemWidth();
63
70
  const items = state.agents.map((agent) => ({
64
71
  value: agent.id,
65
- label: agent.name ? `${agent.id} (${agent.name})` : agent.id,
72
+ label: truncateToWidth(agent.name ? `${agent.id} (${agent.name})` : agent.id, maxW),
66
73
  description: agent.id === state.agentDefaultId ? "default" : "",
67
74
  }));
68
75
  const selector = createSearchableSelectList(items, 9);
@@ -89,6 +96,7 @@ export function createCommandHandlers(context) {
89
96
  includeLastMessage: true,
90
97
  agentId: state.currentAgentId,
91
98
  });
99
+ const maxW = overlayItemWidth();
92
100
  const items = result.sessions.map((session) => {
93
101
  const title = session.derivedTitle ?? session.displayName;
94
102
  const formattedKey = formatSessionKey(session.key);
@@ -100,8 +108,8 @@ export function createCommandHandlers(context) {
100
108
  const description = timePart && preview ? `${timePart} · ${preview}` : (preview ?? timePart);
101
109
  return {
102
110
  value: session.key,
103
- label,
104
- description,
111
+ label: truncateToWidth(label, maxW),
112
+ description: truncateToWidth(description, maxW),
105
113
  searchText: [
106
114
  session.displayName,
107
115
  session.label,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poolzin/pool-bot",
3
- "version": "2026.2.6",
3
+ "version": "2026.2.7",
4
4
  "description": "🎱 Pool Bot - AI assistant with PLCODE integrations",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -110,10 +110,10 @@
110
110
  "@larksuiteoapi/node-sdk": "^1.58.0",
111
111
  "@line/bot-sdk": "^10.6.0",
112
112
  "@lydell/node-pty": "1.2.0-beta.3",
113
- "@mariozechner/pi-agent-core": "0.52.9",
114
- "@mariozechner/pi-ai": "0.52.9",
115
- "@mariozechner/pi-coding-agent": "0.52.9",
116
- "@mariozechner/pi-tui": "0.52.9",
113
+ "@mariozechner/pi-agent-core": "0.52.12",
114
+ "@mariozechner/pi-ai": "0.52.12",
115
+ "@mariozechner/pi-coding-agent": "0.52.12",
116
+ "@mariozechner/pi-tui": "0.52.12",
117
117
  "@mozilla/readability": "^0.6.0",
118
118
  "@sinclair/typebox": "0.34.48",
119
119
  "@slack/bolt": "^4.6.0",