@poolzin/pool-bot 2026.2.3 → 2026.2.5

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.
Files changed (81) hide show
  1. package/dist/agents/agent-paths.js +3 -1
  2. package/dist/agents/anthropic-payload-log.js +2 -1
  3. package/dist/agents/bash-tools.exec.js +2 -1
  4. package/dist/agents/cache-trace.js +8 -4
  5. package/dist/agents/live-auth-keys.js +2 -1
  6. package/dist/agents/model-auth.js +1 -0
  7. package/dist/agents/model-forward-compat.js +187 -0
  8. package/dist/agents/pi-embedded-runner/model.js +10 -56
  9. package/dist/agents/pi-embedded-runner/session-manager-cache.js +2 -1
  10. package/dist/agents/pi-embedded-subscribe.raw-stream.js +2 -1
  11. package/dist/agents/skills/bundled-dir.js +2 -1
  12. package/dist/browser/constants.js +1 -1
  13. package/dist/browser/profiles.js +1 -1
  14. package/dist/build-info.json +3 -3
  15. package/dist/channels/plugins/catalog.js +6 -1
  16. package/dist/cli/daemon-cli/install.js +4 -1
  17. package/dist/cli/daemon-cli/status.gather.js +4 -2
  18. package/dist/cli/memory-cli.js +9 -3
  19. package/dist/cli/profile.js +6 -2
  20. package/dist/cli/program/register.onboard.js +10 -0
  21. package/dist/commands/auth-choice-options.js +11 -0
  22. package/dist/commands/auth-choice.apply.api-providers.js +55 -1
  23. package/dist/commands/auth-choice.apply.plugin-provider.js +1 -56
  24. package/dist/commands/auth-choice.preferred-provider.js +1 -0
  25. package/dist/commands/configure.wizard.js +29 -10
  26. package/dist/commands/dashboard.js +4 -1
  27. package/dist/commands/doctor-gateway-daemon-flow.js +8 -2
  28. package/dist/commands/doctor-gateway-services.js +6 -2
  29. package/dist/commands/doctor-platform-notes.js +3 -1
  30. package/dist/commands/gateway-status/helpers.js +3 -1
  31. package/dist/commands/models/auth.js +1 -58
  32. package/dist/commands/models/list.errors.js +14 -0
  33. package/dist/commands/models/list.list-command.js +32 -21
  34. package/dist/commands/models/list.registry.js +120 -28
  35. package/dist/commands/models/list.status-command.js +1 -0
  36. package/dist/commands/models/shared.js +14 -0
  37. package/dist/commands/onboard-auth.config-core.js +60 -2
  38. package/dist/commands/onboard-auth.credentials.js +12 -1
  39. package/dist/commands/onboard-auth.js +3 -3
  40. package/dist/commands/onboard-auth.models.js +22 -0
  41. package/dist/commands/onboard-non-interactive/local/auth-choice-inference.js +1 -0
  42. package/dist/commands/onboard-non-interactive/local/auth-choice.js +21 -1
  43. package/dist/commands/provider-auth-helpers.js +61 -0
  44. package/dist/commands/status-all.js +4 -2
  45. package/dist/commands/status.gateway-probe.js +4 -2
  46. package/dist/commands/status.scan.js +2 -1
  47. package/dist/config/paths.js +18 -6
  48. package/dist/daemon/launchd.js +4 -1
  49. package/dist/daemon/schtasks.js +4 -1
  50. package/dist/daemon/systemd.js +4 -1
  51. package/dist/entry.js +4 -2
  52. package/dist/gateway/auth.js +4 -1
  53. package/dist/gateway/call.js +4 -2
  54. package/dist/gateway/server/ws-connection/message-handler.js +4 -1
  55. package/dist/gateway/server-browser.js +4 -2
  56. package/dist/gateway/server-constants.js +5 -2
  57. package/dist/gateway/server-cron.js +3 -1
  58. package/dist/gateway/server-discovery-runtime.js +5 -2
  59. package/dist/infra/restart.js +2 -1
  60. package/dist/infra/shell-env.js +3 -2
  61. package/dist/infra/state-migrations.js +3 -1
  62. package/dist/infra/system-presence.js +4 -1
  63. package/dist/infra/update-runner.js +4 -1
  64. package/dist/macos/gateway-daemon.js +6 -3
  65. package/dist/macos/relay-smoke.js +5 -1
  66. package/dist/macos/relay.js +2 -1
  67. package/dist/media/image-ops.js +3 -1
  68. package/dist/node-host/runner.js +2 -1
  69. package/dist/plugins/bundled-dir.js +2 -1
  70. package/dist/plugins/manifest-registry.js +2 -1
  71. package/dist/security/audit.js +2 -1
  72. package/dist/telegram/bot-message-dispatch.js +1 -1
  73. package/dist/telegram/network-config.js +4 -2
  74. package/dist/terminal/palette.js +8 -6
  75. package/dist/terminal/theme.js +12 -12
  76. package/dist/tui/gateway-chat.js +2 -1
  77. package/dist/tui/theme/theme.js +5 -5
  78. package/dist/tui/tui.js +12 -6
  79. package/dist/version.js +2 -1
  80. package/dist/wizard/onboarding.js +6 -2
  81. package/package.json +1 -1
@@ -95,14 +95,16 @@ export async function callGateway(opts) {
95
95
  ? typeof remote?.token === "string" && remote.token.trim().length > 0
96
96
  ? remote.token.trim()
97
97
  : undefined
98
- : process.env.POOLBOT_GATEWAY_TOKEN?.trim() || process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
98
+ : process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
99
+ process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
99
100
  (typeof authToken === "string" && authToken.trim().length > 0
100
101
  ? authToken.trim()
101
102
  : undefined));
102
103
  const password = (typeof opts.password === "string" && opts.password.trim().length > 0
103
104
  ? opts.password.trim()
104
105
  : undefined) ||
105
- process.env.POOLBOT_GATEWAY_PASSWORD?.trim() || process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
106
+ process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
107
+ process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
106
108
  (isRemoteMode
107
109
  ? typeof remote?.password === "string" && remote.password.trim().length > 0
108
110
  ? remote.password.trim()
@@ -642,7 +642,10 @@ export function attachGatewayWsMessageHandler(params) {
642
642
  type: "hello-ok",
643
643
  protocol: PROTOCOL_VERSION,
644
644
  server: {
645
- version: process.env.POOLBOT_VERSION ?? process.env.CLAWDBOT_VERSION ?? process.env.npm_package_version ?? "dev",
645
+ version: process.env.POOLBOT_VERSION ??
646
+ process.env.CLAWDBOT_VERSION ??
647
+ process.env.npm_package_version ??
648
+ "dev",
646
649
  commit: process.env.GIT_COMMIT,
647
650
  host: os.hostname(),
648
651
  connId,
@@ -1,10 +1,12 @@
1
1
  import { isTruthyEnvValue } from "../infra/env.js";
2
2
  export async function startBrowserControlServerIfEnabled() {
3
- if (isTruthyEnvValue(process.env.POOLBOT_SKIP_BROWSER_CONTROL_SERVER || process.env.CLAWDBOT_SKIP_BROWSER_CONTROL_SERVER))
3
+ if (isTruthyEnvValue(process.env.POOLBOT_SKIP_BROWSER_CONTROL_SERVER ||
4
+ process.env.CLAWDBOT_SKIP_BROWSER_CONTROL_SERVER))
4
5
  return null;
5
6
  // Lazy import: keeps startup fast, but still bundles for the embedded
6
7
  // gateway (bun --compile) via the static specifier path.
7
- const override = (process.env.POOLBOT_BROWSER_CONTROL_MODULE?.trim() || process.env.CLAWDBOT_BROWSER_CONTROL_MODULE?.trim());
8
+ const override = process.env.POOLBOT_BROWSER_CONTROL_MODULE?.trim() ||
9
+ process.env.CLAWDBOT_BROWSER_CONTROL_MODULE?.trim();
8
10
  const mod = override ? await import(override) : await import("../browser/control-service.js");
9
11
  const start = typeof mod
10
12
  .startBrowserControlServiceFromConfig === "function"
@@ -16,8 +16,11 @@ export const __setMaxChatHistoryMessagesBytesForTest = (value) => {
16
16
  };
17
17
  export const DEFAULT_HANDSHAKE_TIMEOUT_MS = 10_000;
18
18
  export const getHandshakeTimeoutMs = () => {
19
- if (process.env.VITEST && (process.env.POOLBOT_TEST_HANDSHAKE_TIMEOUT_MS || process.env.CLAWDBOT_TEST_HANDSHAKE_TIMEOUT_MS)) {
20
- const parsed = Number(process.env.POOLBOT_TEST_HANDSHAKE_TIMEOUT_MS || process.env.CLAWDBOT_TEST_HANDSHAKE_TIMEOUT_MS);
19
+ if (process.env.VITEST &&
20
+ (process.env.POOLBOT_TEST_HANDSHAKE_TIMEOUT_MS ||
21
+ process.env.CLAWDBOT_TEST_HANDSHAKE_TIMEOUT_MS)) {
22
+ const parsed = Number(process.env.POOLBOT_TEST_HANDSHAKE_TIMEOUT_MS ||
23
+ process.env.CLAWDBOT_TEST_HANDSHAKE_TIMEOUT_MS);
21
24
  if (Number.isFinite(parsed) && parsed > 0)
22
25
  return parsed;
23
26
  }
@@ -14,7 +14,9 @@ import { defaultRuntime } from "../runtime.js";
14
14
  export function buildGatewayCronService(params) {
15
15
  const cronLogger = getChildLogger({ module: "cron" });
16
16
  const storePath = resolveCronStorePath(params.cfg.cron?.store);
17
- const cronEnabled = process.env.POOLBOT_SKIP_CRON !== "1" && process.env.CLAWDBOT_SKIP_CRON !== "1" && params.cfg.cron?.enabled !== false;
17
+ const cronEnabled = process.env.POOLBOT_SKIP_CRON !== "1" &&
18
+ process.env.CLAWDBOT_SKIP_CRON !== "1" &&
19
+ params.cfg.cron?.enabled !== false;
18
20
  const resolveCronAgent = (requested) => {
19
21
  const runtimeConfig = loadConfig();
20
22
  const normalized = typeof requested === "string" && requested.trim() ? normalizeAgentId(requested) : undefined;
@@ -7,7 +7,8 @@ export async function startGatewayDiscovery(params) {
7
7
  const mdnsMode = params.mdnsMode ?? "minimal";
8
8
  // mDNS can be disabled via config (mdnsMode: off) or env var.
9
9
  const bonjourEnabled = mdnsMode !== "off" &&
10
- process.env.POOLBOT_DISABLE_BONJOUR !== "1" && process.env.CLAWDBOT_DISABLE_BONJOUR !== "1" &&
10
+ process.env.POOLBOT_DISABLE_BONJOUR !== "1" &&
11
+ process.env.CLAWDBOT_DISABLE_BONJOUR !== "1" &&
11
12
  process.env.NODE_ENV !== "test" &&
12
13
  !process.env.VITEST;
13
14
  const mdnsMinimal = mdnsMode !== "full";
@@ -16,7 +17,9 @@ export async function startGatewayDiscovery(params) {
16
17
  const tailnetDns = needsTailnetDns
17
18
  ? await resolveTailnetDnsHint({ enabled: tailscaleEnabled })
18
19
  : undefined;
19
- const sshPortEnv = mdnsMinimal ? undefined : (process.env.POOLBOT_SSH_PORT?.trim() || process.env.CLAWDBOT_SSH_PORT?.trim());
20
+ const sshPortEnv = mdnsMinimal
21
+ ? undefined
22
+ : process.env.POOLBOT_SSH_PORT?.trim() || process.env.CLAWDBOT_SSH_PORT?.trim();
20
23
  const sshPortParsed = sshPortEnv ? Number.parseInt(sshPortEnv, 10) : NaN;
21
24
  const sshPort = Number.isFinite(sshPortParsed) && sshPortParsed > 0 ? sshPortParsed : undefined;
22
25
  const cliPath = mdnsMinimal ? undefined : resolveBonjourCliPath();
@@ -109,7 +109,8 @@ export function triggerPoolbotRestart() {
109
109
  detail: "unsupported platform restart",
110
110
  };
111
111
  }
112
- const label = process.env.POOLBOT_LAUNCHD_LABEL || process.env.CLAWDBOT_LAUNCHD_LABEL ||
112
+ const label = process.env.POOLBOT_LAUNCHD_LABEL ||
113
+ process.env.CLAWDBOT_LAUNCHD_LABEL ||
113
114
  resolveGatewayLaunchAgentLabel(process.env.POOLBOT_PROFILE ?? process.env.CLAWDBOT_PROFILE);
114
115
  const uid = typeof process.getuid === "function" ? process.getuid() : undefined;
115
116
  const target = uid !== undefined ? `gui/${uid}/${label}` : label;
@@ -72,10 +72,11 @@ export function loadShellEnvFallback(opts) {
72
72
  return { ok: true, applied };
73
73
  }
74
74
  export function shouldEnableShellEnvFallback(env) {
75
- return isTruthyEnvValue(env.POOLBOT_LOAD_SHELL_ENV) || isTruthyEnvValue(env.CLAWDBOT_LOAD_SHELL_ENV);
75
+ return (isTruthyEnvValue(env.POOLBOT_LOAD_SHELL_ENV) || isTruthyEnvValue(env.CLAWDBOT_LOAD_SHELL_ENV));
76
76
  }
77
77
  export function shouldDeferShellEnvFallback(env) {
78
- return isTruthyEnvValue(env.POOLBOT_DEFER_SHELL_ENV_FALLBACK) || isTruthyEnvValue(env.CLAWDBOT_DEFER_SHELL_ENV_FALLBACK);
78
+ return (isTruthyEnvValue(env.POOLBOT_DEFER_SHELL_ENV_FALLBACK) ||
79
+ isTruthyEnvValue(env.CLAWDBOT_DEFER_SHELL_ENV_FALLBACK));
79
80
  }
80
81
  export function resolveShellEnvFallbackTimeoutMs(env) {
81
82
  const raw = env.POOLBOT_SHELL_ENV_TIMEOUT_MS?.trim() || env.CLAWDBOT_SHELL_ENV_TIMEOUT_MS?.trim();
@@ -726,7 +726,9 @@ export async function autoMigrateLegacyState(params) {
726
726
  homedir: params.homedir,
727
727
  log: params.log,
728
728
  });
729
- if (env.POOLBOT_AGENT_DIR?.trim() || env.CLAWDBOT_AGENT_DIR?.trim() || env.PI_CODING_AGENT_DIR?.trim()) {
729
+ if (env.POOLBOT_AGENT_DIR?.trim() ||
730
+ env.CLAWDBOT_AGENT_DIR?.trim() ||
731
+ env.PI_CODING_AGENT_DIR?.trim()) {
730
732
  return {
731
733
  migrated: stateDirResult.migrated,
732
734
  skipped: true,
@@ -33,7 +33,10 @@ function resolvePrimaryIPv4() {
33
33
  function initSelfPresence() {
34
34
  const host = os.hostname();
35
35
  const ip = resolvePrimaryIPv4() ?? undefined;
36
- const version = process.env.POOLBOT_VERSION ?? process.env.CLAWDBOT_VERSION ?? process.env.npm_package_version ?? "unknown";
36
+ const version = process.env.POOLBOT_VERSION ??
37
+ process.env.CLAWDBOT_VERSION ??
38
+ process.env.npm_package_version ??
39
+ "unknown";
37
40
  const modelIdentifier = (() => {
38
41
  const p = os.platform();
39
42
  if (p === "darwin") {
@@ -560,7 +560,10 @@ export async function runGatewayUpdate(opts = {}) {
560
560
  };
561
561
  }
562
562
  const doctorArgv = [process.execPath, doctorEntry, "doctor", "--non-interactive"];
563
- const doctorStep = await runStep(step("poolbot doctor", doctorArgv, gitRoot, { POOLBOT_UPDATE_IN_PROGRESS: "1", CLAWDBOT_UPDATE_IN_PROGRESS: "1" }));
563
+ const doctorStep = await runStep(step("poolbot doctor", doctorArgv, gitRoot, {
564
+ POOLBOT_UPDATE_IN_PROGRESS: "1",
565
+ CLAWDBOT_UPDATE_IN_PROGRESS: "1",
566
+ }));
564
567
  steps.push(doctorStep);
565
568
  const uiIndexHealth = await resolveControlUiDistIndexHealth({ root: gitRoot });
566
569
  if (!uiIndexHealth.exists) {
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import process from "node:process";
3
3
  const BUNDLED_VERSION = (typeof __CLAWDBOT_VERSION__ === "string" && __CLAWDBOT_VERSION__) ||
4
- process.env.POOLBOT_BUNDLED_VERSION || process.env.CLAWDBOT_BUNDLED_VERSION ||
4
+ process.env.POOLBOT_BUNDLED_VERSION ||
5
+ process.env.CLAWDBOT_BUNDLED_VERSION ||
5
6
  "0.0.0";
6
7
  function argValue(args, flag) {
7
8
  const idx = args.indexOf(flag);
@@ -47,7 +48,8 @@ async function main() {
47
48
  setGatewayWsLogStyle(wsLogStyle);
48
49
  const cfg = loadConfig();
49
50
  const portRaw = argValue(args, "--port") ??
50
- process.env.POOLBOT_GATEWAY_PORT ?? process.env.CLAWDBOT_GATEWAY_PORT ??
51
+ process.env.POOLBOT_GATEWAY_PORT ??
52
+ process.env.CLAWDBOT_GATEWAY_PORT ??
51
53
  (typeof cfg.gateway?.port === "number" ? String(cfg.gateway.port) : "") ??
52
54
  "18789";
53
55
  const port = Number.parseInt(portRaw, 10);
@@ -56,7 +58,8 @@ async function main() {
56
58
  process.exit(1);
57
59
  }
58
60
  const bindRaw = argValue(args, "--bind") ??
59
- process.env.POOLBOT_GATEWAY_BIND ?? process.env.CLAWDBOT_GATEWAY_BIND ??
61
+ process.env.POOLBOT_GATEWAY_BIND ??
62
+ process.env.CLAWDBOT_GATEWAY_BIND ??
60
63
  cfg.gateway?.bind ??
61
64
  "loopback";
62
65
  const bind = bindRaw === "loopback" ||
@@ -13,7 +13,11 @@ export function parseRelaySmokeTest(args, env) {
13
13
  return "qr";
14
14
  // Back-compat: only run env-based smoke mode when no CLI args are present,
15
15
  // to avoid surprising early-exit when users set env vars globally.
16
- if (args.length === 0 && (env.POOLBOT_SMOKE_QR === "1" || env.CLAWDBOT_SMOKE_QR === "1" || env.POOLBOT_SMOKE === "qr" || env.CLAWDBOT_SMOKE === "qr")) {
16
+ if (args.length === 0 &&
17
+ (env.POOLBOT_SMOKE_QR === "1" ||
18
+ env.CLAWDBOT_SMOKE_QR === "1" ||
19
+ env.POOLBOT_SMOKE === "qr" ||
20
+ env.CLAWDBOT_SMOKE === "qr")) {
17
21
  return "qr";
18
22
  }
19
23
  return null;
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import process from "node:process";
3
3
  const BUNDLED_VERSION = (typeof __CLAWDBOT_VERSION__ === "string" && __CLAWDBOT_VERSION__) ||
4
- process.env.POOLBOT_BUNDLED_VERSION || process.env.CLAWDBOT_BUNDLED_VERSION ||
4
+ process.env.POOLBOT_BUNDLED_VERSION ||
5
+ process.env.CLAWDBOT_BUNDLED_VERSION ||
5
6
  "0.0.0";
6
7
  function hasFlag(args, flag) {
7
8
  return args.includes(flag);
@@ -7,7 +7,9 @@ function isBun() {
7
7
  }
8
8
  function prefersSips() {
9
9
  return ((process.env.POOLBOT_IMAGE_BACKEND || process.env.CLAWDBOT_IMAGE_BACKEND) === "sips" ||
10
- ((process.env.POOLBOT_IMAGE_BACKEND || process.env.CLAWDBOT_IMAGE_BACKEND) !== "sharp" && isBun() && process.platform === "darwin"));
10
+ ((process.env.POOLBOT_IMAGE_BACKEND || process.env.CLAWDBOT_IMAGE_BACKEND) !== "sharp" &&
11
+ isBun() &&
12
+ process.platform === "darwin"));
11
13
  }
12
14
  async function loadSharp() {
13
15
  const mod = (await import("sharp"));
@@ -354,7 +354,8 @@ export async function runNodeHost(opts) {
354
354
  const resolvedBrowser = resolveBrowserConfig(cfg.browser, cfg);
355
355
  const browserProxyEnabled = browserProxy.enabled && resolvedBrowser.enabled;
356
356
  const isRemoteMode = cfg.gateway?.mode === "remote";
357
- const token = process.env.POOLBOT_GATEWAY_TOKEN?.trim() || process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
357
+ const token = process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
358
+ process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
358
359
  (isRemoteMode ? cfg.gateway?.remote?.token : cfg.gateway?.auth?.token);
359
360
  const password = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
360
361
  process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
@@ -2,7 +2,8 @@ import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  export function resolveBundledPluginsDir() {
5
- const override = process.env.POOLBOT_BUNDLED_PLUGINS_DIR?.trim() || process.env.CLAWDBOT_BUNDLED_PLUGINS_DIR?.trim();
5
+ const override = process.env.POOLBOT_BUNDLED_PLUGINS_DIR?.trim() ||
6
+ process.env.CLAWDBOT_BUNDLED_PLUGINS_DIR?.trim();
6
7
  if (override)
7
8
  return override;
8
9
  // bun --compile: ship a sibling `extensions/` next to the executable.
@@ -17,7 +17,8 @@ function resolveManifestCacheMs(env) {
17
17
  return Math.max(0, parsed);
18
18
  }
19
19
  function shouldUseManifestCache(env) {
20
- const disabled = env.POOLBOT_DISABLE_PLUGIN_MANIFEST_CACHE?.trim() || env.CLAWDBOT_DISABLE_PLUGIN_MANIFEST_CACHE?.trim();
20
+ const disabled = env.POOLBOT_DISABLE_PLUGIN_MANIFEST_CACHE?.trim() ||
21
+ env.CLAWDBOT_DISABLE_PLUGIN_MANIFEST_CACHE?.trim();
21
22
  if (disabled)
22
23
  return false;
23
24
  return resolveManifestCacheMs(env) > 0;
@@ -664,7 +664,8 @@ async function maybeProbeGateway(params) {
664
664
  ? typeof remote?.token === "string" && remote.token.trim()
665
665
  ? remote.token.trim()
666
666
  : undefined
667
- : process.env.POOLBOT_GATEWAY_TOKEN?.trim() || process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
667
+ : process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
668
+ process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
668
669
  (typeof authToken === "string" && authToken.trim() ? authToken.trim() : undefined);
669
670
  const password = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
670
671
  process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
@@ -234,7 +234,7 @@ export const dispatchTelegramMessage = async ({ context, bot, cfg, runtime, repl
234
234
  });
235
235
  draftStream?.stop();
236
236
  let sentFallback = false;
237
- if (!deliveryState.delivered && (counts.tool + counts.block + counts.final) > 0) {
237
+ if (!deliveryState.delivered && counts.tool + counts.block + counts.final > 0) {
238
238
  try {
239
239
  await deliverReplies({
240
240
  replies: [{ text: EMPTY_RESPONSE_FALLBACK }],
@@ -9,10 +9,12 @@ export function resolveTelegramAutoSelectFamilyDecision(params) {
9
9
  const nodeMajor = typeof params?.nodeMajor === "number"
10
10
  ? params.nodeMajor
11
11
  : Number(process.versions.node.split(".")[0]);
12
- if (isTruthyEnvValue(env[TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV]) || isTruthyEnvValue(env[TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV_LEGACY])) {
12
+ if (isTruthyEnvValue(env[TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV]) ||
13
+ isTruthyEnvValue(env[TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV_LEGACY])) {
13
14
  return { value: true, source: `env:${TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV}` };
14
15
  }
15
- if (isTruthyEnvValue(env[TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV]) || isTruthyEnvValue(env[TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV_LEGACY])) {
16
+ if (isTruthyEnvValue(env[TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV]) ||
17
+ isTruthyEnvValue(env[TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV_LEGACY])) {
16
18
  return { value: false, source: `env:${TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV}` };
17
19
  }
18
20
  if (typeof params?.network?.autoSelectFamily === "boolean") {
@@ -1,12 +1,14 @@
1
- // Lobster palette tokens for CLI/UI theming. "lobster seam" == use this palette.
1
+ // Pool Bot palette tokens for CLI/UI theming. "poolbot seam" == use this palette.
2
2
  // Keep in sync with docs/cli/index.md (CLI palette section).
3
- export const LOBSTER_PALETTE = {
4
- accent: "#FF5A2D",
5
- accentBright: "#FF7A3D",
6
- accentDim: "#D14A22",
7
- info: "#FF8A5B",
3
+ export const POOLBOT_PALETTE = {
4
+ accent: "#A855F7",
5
+ accentBright: "#C084FC",
6
+ accentDim: "#7C3AED",
7
+ info: "#A78BFA",
8
8
  success: "#2FBF71",
9
9
  warn: "#FFB020",
10
10
  error: "#E23D2D",
11
11
  muted: "#8B7F77",
12
12
  };
13
+ /** @deprecated Use POOLBOT_PALETTE instead. */
14
+ export const LOBSTER_PALETTE = POOLBOT_PALETTE;
@@ -1,22 +1,22 @@
1
1
  import chalk, { Chalk } from "chalk";
2
- import { LOBSTER_PALETTE } from "./palette.js";
2
+ import { POOLBOT_PALETTE } from "./palette.js";
3
3
  const hasForceColor = typeof process.env.FORCE_COLOR === "string" &&
4
4
  process.env.FORCE_COLOR.trim().length > 0 &&
5
5
  process.env.FORCE_COLOR.trim() !== "0";
6
6
  const baseChalk = process.env.NO_COLOR && !hasForceColor ? new Chalk({ level: 0 }) : chalk;
7
7
  const hex = (value) => baseChalk.hex(value);
8
8
  export const theme = {
9
- accent: hex(LOBSTER_PALETTE.accent),
10
- accentBright: hex(LOBSTER_PALETTE.accentBright),
11
- accentDim: hex(LOBSTER_PALETTE.accentDim),
12
- info: hex(LOBSTER_PALETTE.info),
13
- success: hex(LOBSTER_PALETTE.success),
14
- warn: hex(LOBSTER_PALETTE.warn),
15
- error: hex(LOBSTER_PALETTE.error),
16
- muted: hex(LOBSTER_PALETTE.muted),
17
- heading: baseChalk.bold.hex(LOBSTER_PALETTE.accent),
18
- command: hex(LOBSTER_PALETTE.accentBright),
19
- option: hex(LOBSTER_PALETTE.warn),
9
+ accent: hex(POOLBOT_PALETTE.accent),
10
+ accentBright: hex(POOLBOT_PALETTE.accentBright),
11
+ accentDim: hex(POOLBOT_PALETTE.accentDim),
12
+ info: hex(POOLBOT_PALETTE.info),
13
+ success: hex(POOLBOT_PALETTE.success),
14
+ warn: hex(POOLBOT_PALETTE.warn),
15
+ error: hex(POOLBOT_PALETTE.error),
16
+ muted: hex(POOLBOT_PALETTE.muted),
17
+ heading: baseChalk.bold.hex(POOLBOT_PALETTE.accent),
18
+ command: hex(POOLBOT_PALETTE.accentBright),
19
+ option: hex(POOLBOT_PALETTE.info),
20
20
  };
21
21
  export const isRich = () => Boolean(baseChalk.level > 0);
22
22
  export const colorize = (rich, color, value) => rich ? color(value) : value;
@@ -131,7 +131,8 @@ export function resolveGatewayConnection(opts) {
131
131
  ? typeof remote?.token === "string" && remote.token.trim().length > 0
132
132
  ? remote.token.trim()
133
133
  : undefined
134
- : process.env.POOLBOT_GATEWAY_TOKEN?.trim() || process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
134
+ : process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
135
+ process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
135
136
  (typeof authToken === "string" && authToken.trim().length > 0
136
137
  ? authToken.trim()
137
138
  : undefined));
@@ -4,20 +4,20 @@ import { createSyntaxTheme } from "./syntax-theme.js";
4
4
  const palette = {
5
5
  text: "#E8E3D5",
6
6
  dim: "#7B7F87",
7
- accent: "#F6C453",
8
- accentSoft: "#F2A65A",
7
+ accent: "#A855F7", // vivid purple (was gold #F6C453)
8
+ accentSoft: "#C084FC", // soft purple (was orange #F2A65A)
9
9
  border: "#3C414B",
10
10
  userBg: "#2B2F36",
11
11
  userText: "#F3EEE0",
12
12
  systemText: "#9BA3B2",
13
- toolPendingBg: "#1F2A2F",
13
+ toolPendingBg: "#1F1F2F", // slight purple tint (was teal #1F2A2F)
14
14
  toolSuccessBg: "#1E2D23",
15
15
  toolErrorBg: "#2F1F1F",
16
- toolTitle: "#F6C453",
16
+ toolTitle: "#A855F7", // vivid purple (was gold #F6C453)
17
17
  toolOutput: "#E1DACB",
18
18
  quote: "#8CC8FF",
19
19
  quoteBorder: "#3B4D6B",
20
- code: "#F0C987",
20
+ code: "#D4BBFF", // light lavender (was gold #F0C987)
21
21
  codeBlock: "#1E232A",
22
22
  codeBorder: "#343A45",
23
23
  link: "#7DD3A5",
package/dist/tui/tui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { CombinedAutocompleteProvider, Container, Loader, ProcessTerminal, Text, TUI, } from "@mariozechner/pi-tui";
1
+ import { CombinedAutocompleteProvider, Container, Loader, ProcessTerminal, Text, TUI, truncateToWidth, } from "@mariozechner/pi-tui";
2
2
  import { resolveDefaultAgentId } from "../agents/agent-scope.js";
3
3
  import { loadConfig } from "../config/config.js";
4
4
  import { buildAgentMainSessionKey, normalizeAgentId, normalizeMainKey, parseAgentSessionKey, } from "../routing/session-key.js";
@@ -238,10 +238,12 @@ export async function runTui(opts) {
238
238
  return `agent:${currentAgentId}:${trimmed}`;
239
239
  };
240
240
  currentSessionKey = resolveSessionKey(initialSessionInput);
241
+ const getContentWidth = () => Math.max(20, (tui.terminal.columns ?? 80) - 2); // paddingX=1 each side
241
242
  const updateHeader = () => {
242
243
  const sessionLabel = formatSessionKey(currentSessionKey);
243
244
  const agentLabel = formatAgentLabel(currentAgentId);
244
- header.setText(theme.header(`poolbot tui - ${client.connection.url} - agent ${agentLabel} - session ${sessionLabel}`));
245
+ const raw = `poolbot tui - ${client.connection.url} - agent ${agentLabel} - session ${sessionLabel}`;
246
+ header.setText(theme.header(truncateToWidth(raw, getContentWidth())));
245
247
  };
246
248
  const busyStates = new Set(["sending", "waiting", "streaming", "running"]);
247
249
  let statusText = null;
@@ -278,18 +280,22 @@ export async function runTui(opts) {
278
280
  if (!statusLoader || !statusStartedAt)
279
281
  return;
280
282
  const elapsed = formatElapsed(statusStartedAt);
283
+ // Truncate status messages to terminal width to prevent TUI crash
284
+ // (Loader adds spinner + space = 2 visible chars before the message)
285
+ const maxMsgWidth = Math.max(10, getContentWidth() - 4);
281
286
  if (activityStatus === "waiting") {
282
287
  waitingTick++;
283
- statusLoader.setMessage(buildWaitingStatusMessage({
288
+ const msg = buildWaitingStatusMessage({
284
289
  theme,
285
290
  tick: waitingTick,
286
291
  elapsed,
287
292
  connectionStatus,
288
293
  phrases: waitingPhrase ? [waitingPhrase] : undefined,
289
- }));
294
+ });
295
+ statusLoader.setMessage(truncateToWidth(msg, maxMsgWidth));
290
296
  return;
291
297
  }
292
- statusLoader.setMessage(`${activityStatus} • ${elapsed} | ${connectionStatus}`);
298
+ statusLoader.setMessage(truncateToWidth(`${activityStatus} • ${elapsed} | ${connectionStatus}`, maxMsgWidth));
293
299
  };
294
300
  const startStatusTimer = () => {
295
301
  if (statusTimer)
@@ -398,7 +404,7 @@ export async function runTui(opts) {
398
404
  reasoningLabel,
399
405
  tokens,
400
406
  ].filter(Boolean);
401
- footer.setText(theme.dim(footerParts.join(" | ")));
407
+ footer.setText(theme.dim(truncateToWidth(footerParts.join(" | "), getContentWidth())));
402
408
  };
403
409
  const { openOverlay, closeOverlay } = createOverlayHandlers(tui, editor);
404
410
  const initialSessionAgentId = (() => {
package/dist/version.js CHANGED
@@ -50,6 +50,7 @@ export function resolveVersionFromModuleUrl(moduleUrl) {
50
50
  // - Embedded/bundled builds: injected define or env var.
51
51
  // - Dev/npm builds: package.json.
52
52
  export const VERSION = (typeof __CLAWDBOT_VERSION__ === "string" && __CLAWDBOT_VERSION__) ||
53
- process.env.POOLBOT_BUNDLED_VERSION || process.env.CLAWDBOT_BUNDLED_VERSION ||
53
+ process.env.POOLBOT_BUNDLED_VERSION ||
54
+ process.env.CLAWDBOT_BUNDLED_VERSION ||
54
55
  resolveVersionFromModuleUrl(import.meta.url) ||
55
56
  "0.0.0";
@@ -217,8 +217,12 @@ export async function runOnboardingWizard(opts, runtime = defaultRuntime, prompt
217
217
  const localUrl = `ws://127.0.0.1:${localPort}`;
218
218
  const localProbe = await probeGatewayReachable({
219
219
  url: localUrl,
220
- token: baseConfig.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
221
- password: baseConfig.gateway?.auth?.password ?? process.env.POOLBOT_GATEWAY_PASSWORD ?? process.env.CLAWDBOT_GATEWAY_PASSWORD,
220
+ token: baseConfig.gateway?.auth?.token ??
221
+ process.env.POOLBOT_GATEWAY_TOKEN ??
222
+ process.env.CLAWDBOT_GATEWAY_TOKEN,
223
+ password: baseConfig.gateway?.auth?.password ??
224
+ process.env.POOLBOT_GATEWAY_PASSWORD ??
225
+ process.env.CLAWDBOT_GATEWAY_PASSWORD,
222
226
  });
223
227
  const remoteUrl = baseConfig.gateway?.remote?.url?.trim() ?? "";
224
228
  const remoteProbe = remoteUrl
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poolzin/pool-bot",
3
- "version": "2026.2.3",
3
+ "version": "2026.2.5",
4
4
  "description": "🎱 Pool Bot - AI assistant with PLCODE integrations",
5
5
  "keywords": [],
6
6
  "license": "MIT",