@poolzin/pool-bot 2026.2.2 → 2026.2.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.
Files changed (127) hide show
  1. package/dist/acp/server.js +2 -0
  2. package/dist/agents/agent-paths.js +5 -1
  3. package/dist/agents/anthropic-payload-log.js +3 -2
  4. package/dist/agents/bash-tools.exec.js +2 -1
  5. package/dist/agents/bash-tools.shared.js +2 -1
  6. package/dist/agents/cache-trace.js +9 -5
  7. package/dist/agents/cli-runner.js +1 -1
  8. package/dist/agents/live-auth-keys.js +3 -2
  9. package/dist/agents/pi-embedded-runner/session-manager-cache.js +2 -1
  10. package/dist/agents/pi-embedded-subscribe.raw-stream.js +3 -2
  11. package/dist/agents/sandbox/browser.js +5 -0
  12. package/dist/agents/shell-utils.js +1 -1
  13. package/dist/agents/skills/bundled-dir.js +2 -1
  14. package/dist/agents/synthetic-models.js +8 -0
  15. package/dist/agents/workspace.js +1 -1
  16. package/dist/auto-reply/reply/get-reply.js +1 -1
  17. package/dist/build-info.json +3 -3
  18. package/dist/canvas-host/server.js +1 -1
  19. package/dist/channels/plugins/catalog.js +6 -1
  20. package/dist/cli/banner.js +12 -12
  21. package/dist/cli/browser-cli-manage.js +10 -10
  22. package/dist/cli/browser-cli.js +1 -1
  23. package/dist/cli/channel-options.js +1 -1
  24. package/dist/cli/cli-name.js +1 -1
  25. package/dist/cli/command-format.js +1 -1
  26. package/dist/cli/daemon-cli/install.js +4 -1
  27. package/dist/cli/daemon-cli/shared.js +8 -3
  28. package/dist/cli/daemon-cli/status.gather.js +2 -0
  29. package/dist/cli/daemon-cli/status.print.js +3 -3
  30. package/dist/cli/gateway-cli/dev.js +1 -1
  31. package/dist/cli/gateway-cli/run.js +11 -6
  32. package/dist/cli/gateway-cli/shared.js +1 -1
  33. package/dist/cli/memory-cli.js +9 -3
  34. package/dist/cli/node-cli/daemon.js +2 -1
  35. package/dist/cli/profile.js +14 -4
  36. package/dist/cli/program/help.js +1 -1
  37. package/dist/cli/program/preaction.js +1 -1
  38. package/dist/cli/program/register.agent.js +4 -4
  39. package/dist/cli/program/register.onboard.js +1 -1
  40. package/dist/cli/program/register.setup.js +1 -1
  41. package/dist/cli/program/register.subclis.js +2 -2
  42. package/dist/cli/route.js +1 -1
  43. package/dist/cli/tagline.js +8 -8
  44. package/dist/cli/update-cli.js +12 -10
  45. package/dist/commands/auth-choice-options.js +104 -33
  46. package/dist/commands/configure.wizard.js +28 -9
  47. package/dist/commands/daemon-install-helpers.js +1 -1
  48. package/dist/commands/dashboard.js +4 -1
  49. package/dist/commands/doctor-format.js +3 -3
  50. package/dist/commands/doctor-gateway-daemon-flow.js +9 -3
  51. package/dist/commands/doctor-gateway-services.js +6 -2
  52. package/dist/commands/doctor-platform-notes.js +25 -8
  53. package/dist/commands/doctor-update.js +1 -1
  54. package/dist/commands/gateway-status/helpers.js +4 -2
  55. package/dist/commands/health.js +2 -2
  56. package/dist/commands/node-daemon-install-helpers.js +1 -1
  57. package/dist/commands/onboard-helpers.js +6 -6
  58. package/dist/commands/status-all.js +4 -2
  59. package/dist/commands/status.gateway-probe.js +4 -2
  60. package/dist/commands/status.scan.js +3 -2
  61. package/dist/config/io.js +5 -3
  62. package/dist/config/paths.js +27 -14
  63. package/dist/config/schema.field-metadata.js +1 -1
  64. package/dist/config/schema.js +1 -1
  65. package/dist/config/sessions/store.js +1 -1
  66. package/dist/daemon/inspect.js +1 -1
  67. package/dist/daemon/launchd.js +8 -5
  68. package/dist/daemon/node-service.js +14 -0
  69. package/dist/daemon/paths.js +2 -2
  70. package/dist/daemon/schtasks.js +9 -6
  71. package/dist/daemon/service-env.js +25 -5
  72. package/dist/daemon/systemd.js +9 -6
  73. package/dist/entry.js +5 -2
  74. package/dist/gateway/auth.js +6 -3
  75. package/dist/gateway/call.js +3 -1
  76. package/dist/gateway/server/ws-connection/message-handler.js +4 -1
  77. package/dist/gateway/server-browser.js +4 -2
  78. package/dist/gateway/server-constants.js +5 -2
  79. package/dist/gateway/server-cron.js +3 -1
  80. package/dist/gateway/server-discovery-runtime.js +4 -1
  81. package/dist/gateway/server-discovery.js +2 -2
  82. package/dist/gateway/server-reload-handlers.js +4 -4
  83. package/dist/gateway/server-runtime-config.js +2 -2
  84. package/dist/gateway/server-startup.js +4 -4
  85. package/dist/gateway/server.impl.js +3 -2
  86. package/dist/gateway/test-helpers.mocks.js +3 -0
  87. package/dist/gateway/test-helpers.server.js +60 -22
  88. package/dist/hooks/bundled-dir.js +1 -1
  89. package/dist/hooks/gmail-watcher.js +1 -1
  90. package/dist/infra/bonjour.js +1 -1
  91. package/dist/infra/diagnostic-flags.js +3 -2
  92. package/dist/infra/dotenv.js +1 -1
  93. package/dist/infra/gateway-lock.js +1 -1
  94. package/dist/infra/home-dir.js +1 -1
  95. package/dist/infra/path-env.js +2 -1
  96. package/dist/infra/restart.js +4 -3
  97. package/dist/infra/shell-env.js +4 -3
  98. package/dist/infra/state-migrations.js +5 -3
  99. package/dist/infra/system-presence.js +4 -1
  100. package/dist/infra/update-runner.js +4 -1
  101. package/dist/infra/widearea-dns.js +1 -1
  102. package/dist/macos/gateway-daemon.js +6 -1
  103. package/dist/macos/relay-smoke.js +5 -1
  104. package/dist/macos/relay.js +1 -0
  105. package/dist/media/image-ops.js +4 -2
  106. package/dist/memory/batch-gemini.js +1 -1
  107. package/dist/memory/embeddings-gemini.js +1 -1
  108. package/dist/node-host/runner.js +4 -2
  109. package/dist/plugins/bundled-dir.js +2 -1
  110. package/dist/plugins/manifest-registry.js +3 -2
  111. package/dist/security/audit-extra.sync.js +1 -1
  112. package/dist/security/audit.js +4 -2
  113. package/dist/telegram/accounts.js +1 -1
  114. package/dist/telegram/bot-message-dispatch.js +1 -1
  115. package/dist/telegram/network-config.js +8 -4
  116. package/dist/terminal/palette.js +8 -6
  117. package/dist/terminal/theme.js +12 -12
  118. package/dist/test-helpers/state-dir-env.js +8 -0
  119. package/dist/tts/tts.js +1 -1
  120. package/dist/tui/gateway-chat.js +3 -1
  121. package/dist/tui/theme/theme.js +5 -5
  122. package/dist/tui/tui.js +12 -6
  123. package/dist/utils.js +2 -2
  124. package/dist/version.js +1 -0
  125. package/dist/wizard/onboarding.finalize.js +1 -1
  126. package/dist/wizard/onboarding.js +6 -2
  127. package/package.json +1 -1
@@ -1,6 +1,7 @@
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 ||
4
5
  process.env.CLAWDBOT_BUNDLED_VERSION ||
5
6
  "0.0.0";
6
7
  function argValue(args, flag) {
@@ -47,6 +48,7 @@ async function main() {
47
48
  setGatewayWsLogStyle(wsLogStyle);
48
49
  const cfg = loadConfig();
49
50
  const portRaw = argValue(args, "--port") ??
51
+ process.env.POOLBOT_GATEWAY_PORT ??
50
52
  process.env.CLAWDBOT_GATEWAY_PORT ??
51
53
  (typeof cfg.gateway?.port === "number" ? String(cfg.gateway.port) : "") ??
52
54
  "18789";
@@ -56,6 +58,7 @@ async function main() {
56
58
  process.exit(1);
57
59
  }
58
60
  const bindRaw = argValue(args, "--bind") ??
61
+ process.env.POOLBOT_GATEWAY_BIND ??
59
62
  process.env.CLAWDBOT_GATEWAY_BIND ??
60
63
  cfg.gateway?.bind ??
61
64
  "loopback";
@@ -71,8 +74,10 @@ async function main() {
71
74
  process.exit(1);
72
75
  }
73
76
  const token = argValue(args, "--token");
74
- if (token)
77
+ if (token) {
78
+ process.env.POOLBOT_GATEWAY_TOKEN = token;
75
79
  process.env.CLAWDBOT_GATEWAY_TOKEN = token;
80
+ }
76
81
  let server = null;
77
82
  let lock = null;
78
83
  let shuttingDown = false;
@@ -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.CLAWDBOT_SMOKE_QR === "1" || 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,6 +1,7 @@
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 ||
4
5
  process.env.CLAWDBOT_BUNDLED_VERSION ||
5
6
  "0.0.0";
6
7
  function hasFlag(args, flag) {
@@ -6,8 +6,10 @@ function isBun() {
6
6
  return typeof process.versions.bun === "string";
7
7
  }
8
8
  function prefersSips() {
9
- return (process.env.CLAWDBOT_IMAGE_BACKEND === "sips" ||
10
- (process.env.CLAWDBOT_IMAGE_BACKEND !== "sharp" && isBun() && process.platform === "darwin"));
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" &&
11
+ isBun() &&
12
+ process.platform === "darwin"));
11
13
  }
12
14
  async function loadSharp() {
13
15
  const mod = (await import("sharp"));
@@ -2,7 +2,7 @@ import { createSubsystemLogger } from "../logging/subsystem.js";
2
2
  import { isTruthyEnvValue } from "../infra/env.js";
3
3
  import { hashText } from "./internal.js";
4
4
  const GEMINI_BATCH_MAX_REQUESTS = 50000;
5
- const debugEmbeddings = isTruthyEnvValue(process.env.CLAWDBOT_DEBUG_MEMORY_EMBEDDINGS);
5
+ const debugEmbeddings = isTruthyEnvValue(process.env.POOLBOT_DEBUG_MEMORY_EMBEDDINGS || process.env.CLAWDBOT_DEBUG_MEMORY_EMBEDDINGS);
6
6
  const log = createSubsystemLogger("memory/embeddings");
7
7
  const debugLog = (message, meta) => {
8
8
  if (!debugEmbeddings)
@@ -3,7 +3,7 @@ import { isTruthyEnvValue } from "../infra/env.js";
3
3
  import { createSubsystemLogger } from "../logging/subsystem.js";
4
4
  const DEFAULT_GEMINI_BASE_URL = "https://generativelanguage.googleapis.com/v1beta";
5
5
  export const DEFAULT_GEMINI_EMBEDDING_MODEL = "gemini-embedding-001";
6
- const debugEmbeddings = isTruthyEnvValue(process.env.CLAWDBOT_DEBUG_MEMORY_EMBEDDINGS);
6
+ const debugEmbeddings = isTruthyEnvValue(process.env.POOLBOT_DEBUG_MEMORY_EMBEDDINGS || process.env.CLAWDBOT_DEBUG_MEMORY_EMBEDDINGS);
7
7
  const log = createSubsystemLogger("memory/embeddings");
8
8
  const debugLog = (message, meta) => {
9
9
  if (!debugEmbeddings)
@@ -354,9 +354,11 @@ 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.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
- const password = process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
360
+ const password = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
361
+ process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
360
362
  (isRemoteMode ? cfg.gateway?.remote?.password : cfg.gateway?.auth?.password);
361
363
  const host = gateway.host ?? "127.0.0.1";
362
364
  const port = gateway.port ?? 18789;
@@ -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.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.
@@ -6,7 +6,7 @@ import { loadPluginManifest } from "./manifest.js";
6
6
  const registryCache = new Map();
7
7
  const DEFAULT_MANIFEST_CACHE_MS = 200;
8
8
  function resolveManifestCacheMs(env) {
9
- const raw = env.CLAWDBOT_PLUGIN_MANIFEST_CACHE_MS?.trim();
9
+ const raw = env.POOLBOT_PLUGIN_MANIFEST_CACHE_MS?.trim() || env.CLAWDBOT_PLUGIN_MANIFEST_CACHE_MS?.trim();
10
10
  if (raw === "" || raw === "0")
11
11
  return 0;
12
12
  if (!raw)
@@ -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.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;
@@ -272,7 +272,7 @@ export function collectSecretsInConfigFindings(cfg) {
272
272
  severity: "warn",
273
273
  title: "Gateway password is stored in config",
274
274
  detail: "gateway.auth.password is set in the config file; prefer environment variables for secrets when possible.",
275
- remediation: "Prefer CLAWDBOT_GATEWAY_PASSWORD (env) and remove gateway.auth.password from disk.",
275
+ remediation: "Prefer POOLBOT_GATEWAY_PASSWORD (env) and remove gateway.auth.password from disk.",
276
276
  });
277
277
  }
278
278
  const hooksToken = typeof cfg.hooks?.token === "string" ? cfg.hooks.token.trim() : "";
@@ -664,9 +664,11 @@ async function maybeProbeGateway(params) {
664
664
  ? typeof remote?.token === "string" && remote.token.trim()
665
665
  ? remote.token.trim()
666
666
  : undefined
667
- : 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
- const password = process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
670
+ const password = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
671
+ process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
670
672
  (mode === "remote"
671
673
  ? typeof remote?.password === "string" && remote.password.trim()
672
674
  ? remote.password.trim()
@@ -3,7 +3,7 @@ import { listBoundAccountIds, resolveDefaultAgentBoundAccountId } from "../routi
3
3
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../routing/session-key.js";
4
4
  import { resolveTelegramToken } from "./token.js";
5
5
  const debugAccounts = (...args) => {
6
- if (isTruthyEnvValue(process.env.CLAWDBOT_DEBUG_TELEGRAM_ACCOUNTS)) {
6
+ if (isTruthyEnvValue(process.env.POOLBOT_DEBUG_TELEGRAM_ACCOUNTS || process.env.CLAWDBOT_DEBUG_TELEGRAM_ACCOUNTS)) {
7
7
  console.warn("[telegram:accounts]", ...args);
8
8
  }
9
9
  };
@@ -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 }],
@@ -1,16 +1,20 @@
1
1
  import process from "node:process";
2
2
  import { isTruthyEnvValue } from "../infra/env.js";
3
- export const TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV = "CLAWDBOT_TELEGRAM_DISABLE_AUTO_SELECT_FAMILY";
4
- export const TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV = "CLAWDBOT_TELEGRAM_ENABLE_AUTO_SELECT_FAMILY";
3
+ export const TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV = "POOLBOT_TELEGRAM_DISABLE_AUTO_SELECT_FAMILY";
4
+ export const TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV = "POOLBOT_TELEGRAM_ENABLE_AUTO_SELECT_FAMILY";
5
+ const TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV_LEGACY = "CLAWDBOT_TELEGRAM_DISABLE_AUTO_SELECT_FAMILY";
6
+ const TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV_LEGACY = "CLAWDBOT_TELEGRAM_ENABLE_AUTO_SELECT_FAMILY";
5
7
  export function resolveTelegramAutoSelectFamilyDecision(params) {
6
8
  const env = params?.env ?? process.env;
7
9
  const nodeMajor = typeof params?.nodeMajor === "number"
8
10
  ? params.nodeMajor
9
11
  : Number(process.versions.node.split(".")[0]);
10
- if (isTruthyEnvValue(env[TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV])) {
12
+ if (isTruthyEnvValue(env[TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV]) ||
13
+ isTruthyEnvValue(env[TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV_LEGACY])) {
11
14
  return { value: true, source: `env:${TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV}` };
12
15
  }
13
- if (isTruthyEnvValue(env[TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV])) {
16
+ if (isTruthyEnvValue(env[TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV]) ||
17
+ isTruthyEnvValue(env[TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV_LEGACY])) {
14
18
  return { value: false, source: `env:${TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV}` };
15
19
  }
16
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.warn),
20
20
  };
21
21
  export const isRich = () => Boolean(baseChalk.level > 0);
22
22
  export const colorize = (rich, color, value) => rich ? color(value) : value;
@@ -1,9 +1,16 @@
1
1
  export function snapshotStateDirEnv() {
2
2
  return {
3
+ poolbotStateDir: process.env.POOLBOT_STATE_DIR,
3
4
  clawdbotStateDir: process.env.CLAWDBOT_STATE_DIR,
4
5
  };
5
6
  }
6
7
  export function restoreStateDirEnv(snapshot) {
8
+ if (snapshot.poolbotStateDir === undefined) {
9
+ delete process.env.POOLBOT_STATE_DIR;
10
+ }
11
+ else {
12
+ process.env.POOLBOT_STATE_DIR = snapshot.poolbotStateDir;
13
+ }
7
14
  if (snapshot.clawdbotStateDir === undefined) {
8
15
  delete process.env.CLAWDBOT_STATE_DIR;
9
16
  }
@@ -12,5 +19,6 @@ export function restoreStateDirEnv(snapshot) {
12
19
  }
13
20
  }
14
21
  export function setStateDirEnv(stateDir) {
22
+ process.env.POOLBOT_STATE_DIR = stateDir;
15
23
  process.env.CLAWDBOT_STATE_DIR = stateDir;
16
24
  }
package/dist/tts/tts.js CHANGED
@@ -141,7 +141,7 @@ export function resolveTtsConfig(cfg) {
141
141
  export function resolveTtsPrefsPath(config) {
142
142
  if (config.prefsPath?.trim())
143
143
  return resolveUserPath(config.prefsPath.trim());
144
- const envPath = process.env.CLAWDBOT_TTS_PREFS?.trim();
144
+ const envPath = process.env.POOLBOT_TTS_PREFS?.trim() || process.env.CLAWDBOT_TTS_PREFS?.trim();
145
145
  if (envPath)
146
146
  return resolveUserPath(envPath);
147
147
  return path.join(CONFIG_DIR, "settings", "tts.json");
@@ -131,13 +131,15 @@ 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.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));
138
139
  const password = (typeof opts.password === "string" && opts.password.trim().length > 0
139
140
  ? opts.password.trim()
140
141
  : undefined) ||
142
+ process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
141
143
  process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
142
144
  (typeof remote?.password === "string" && remote.password.trim().length > 0
143
145
  ? remote.password.trim()
@@ -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/utils.js CHANGED
@@ -230,7 +230,7 @@ export function resolveUserPath(input) {
230
230
  return path.resolve(trimmed);
231
231
  }
232
232
  export function resolveConfigDir(env = process.env, homedir = os.homedir) {
233
- const override = env.CLAWDBOT_STATE_DIR?.trim();
233
+ const override = env.POOLBOT_STATE_DIR?.trim() || env.CLAWDBOT_STATE_DIR?.trim();
234
234
  if (override)
235
235
  return resolveUserPath(override);
236
236
  return path.join(homedir(), ".poolbot");
@@ -284,5 +284,5 @@ export function isPlainObject(value) {
284
284
  const proto = Object.getPrototypeOf(value);
285
285
  return proto === Object.prototype || proto === null;
286
286
  }
287
- // Configuration root; can be overridden via CLAWDBOT_STATE_DIR.
287
+ // Configuration root; can be overridden via POOLBOT_STATE_DIR (or CLAWDBOT_STATE_DIR).
288
288
  export const CONFIG_DIR = resolveConfigDir();
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 ||
53
54
  process.env.CLAWDBOT_BUNDLED_VERSION ||
54
55
  resolveVersionFromModuleUrl(import.meta.url) ||
55
56
  "0.0.0";
@@ -218,7 +218,7 @@ export async function finalizeOnboardingWizard(options) {
218
218
  }
219
219
  await prompter.note([
220
220
  "Gateway token: shared auth for the Gateway + Control UI.",
221
- "Stored in: ~/.poolbot/poolbot.json (gateway.auth.token) or CLAWDBOT_GATEWAY_TOKEN.",
221
+ "Stored in: ~/.poolbot/poolbot.json (gateway.auth.token) or POOLBOT_GATEWAY_TOKEN.",
222
222
  "Web UI stores a copy in this browser's localStorage (poolbot.control.settings.v1).",
223
223
  `Get the tokenized link anytime: ${formatCliCommand("poolbot dashboard --no-open")}`,
224
224
  ].join("\n"), "Token");
@@ -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.CLAWDBOT_GATEWAY_TOKEN,
221
- password: baseConfig.gateway?.auth?.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.2",
3
+ "version": "2026.2.4",
4
4
  "description": "🎱 Pool Bot - AI assistant with PLCODE integrations",
5
5
  "keywords": [],
6
6
  "license": "MIT",