@poolzin/pool-bot 2026.2.3 → 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 (58) 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/pi-embedded-runner/session-manager-cache.js +2 -1
  7. package/dist/agents/pi-embedded-subscribe.raw-stream.js +2 -1
  8. package/dist/agents/skills/bundled-dir.js +2 -1
  9. package/dist/build-info.json +3 -3
  10. package/dist/channels/plugins/catalog.js +6 -1
  11. package/dist/cli/daemon-cli/install.js +4 -1
  12. package/dist/cli/daemon-cli/status.gather.js +4 -2
  13. package/dist/cli/memory-cli.js +9 -3
  14. package/dist/cli/profile.js +6 -2
  15. package/dist/commands/configure.wizard.js +29 -10
  16. package/dist/commands/dashboard.js +4 -1
  17. package/dist/commands/doctor-gateway-daemon-flow.js +8 -2
  18. package/dist/commands/doctor-gateway-services.js +6 -2
  19. package/dist/commands/doctor-platform-notes.js +3 -1
  20. package/dist/commands/gateway-status/helpers.js +3 -1
  21. package/dist/commands/status-all.js +4 -2
  22. package/dist/commands/status.gateway-probe.js +4 -2
  23. package/dist/commands/status.scan.js +2 -1
  24. package/dist/config/paths.js +18 -6
  25. package/dist/daemon/launchd.js +4 -1
  26. package/dist/daemon/schtasks.js +4 -1
  27. package/dist/daemon/systemd.js +4 -1
  28. package/dist/entry.js +4 -2
  29. package/dist/gateway/auth.js +4 -1
  30. package/dist/gateway/call.js +4 -2
  31. package/dist/gateway/server/ws-connection/message-handler.js +4 -1
  32. package/dist/gateway/server-browser.js +4 -2
  33. package/dist/gateway/server-constants.js +5 -2
  34. package/dist/gateway/server-cron.js +3 -1
  35. package/dist/gateway/server-discovery-runtime.js +5 -2
  36. package/dist/infra/restart.js +2 -1
  37. package/dist/infra/shell-env.js +3 -2
  38. package/dist/infra/state-migrations.js +3 -1
  39. package/dist/infra/system-presence.js +4 -1
  40. package/dist/infra/update-runner.js +4 -1
  41. package/dist/macos/gateway-daemon.js +6 -3
  42. package/dist/macos/relay-smoke.js +5 -1
  43. package/dist/macos/relay.js +2 -1
  44. package/dist/media/image-ops.js +3 -1
  45. package/dist/node-host/runner.js +2 -1
  46. package/dist/plugins/bundled-dir.js +2 -1
  47. package/dist/plugins/manifest-registry.js +2 -1
  48. package/dist/security/audit.js +2 -1
  49. package/dist/telegram/bot-message-dispatch.js +1 -1
  50. package/dist/telegram/network-config.js +4 -2
  51. package/dist/terminal/palette.js +8 -6
  52. package/dist/terminal/theme.js +12 -12
  53. package/dist/tui/gateway-chat.js +2 -1
  54. package/dist/tui/theme/theme.js +5 -5
  55. package/dist/tui/tui.js +12 -6
  56. package/dist/version.js +2 -1
  57. package/dist/wizard/onboarding.js +6 -2
  58. package/package.json +1 -1
@@ -3,7 +3,9 @@ import { resolveStateDir } from "../config/paths.js";
3
3
  import { DEFAULT_AGENT_ID } from "../routing/session-key.js";
4
4
  import { resolveUserPath } from "../utils.js";
5
5
  export function resolvePoolbotAgentDir() {
6
- const override = process.env.POOLBOT_AGENT_DIR?.trim() || process.env.CLAWDBOT_AGENT_DIR?.trim() || process.env.PI_CODING_AGENT_DIR?.trim();
6
+ const override = process.env.POOLBOT_AGENT_DIR?.trim() ||
7
+ process.env.CLAWDBOT_AGENT_DIR?.trim() ||
8
+ process.env.PI_CODING_AGENT_DIR?.trim();
7
9
  if (override)
8
10
  return resolveUserPath(override);
9
11
  const defaultAgentDir = path.join(resolveStateDir(), "agents", DEFAULT_AGENT_ID, "agent");
@@ -8,7 +8,8 @@ import { createSubsystemLogger } from "../logging/subsystem.js";
8
8
  const writers = new Map();
9
9
  const log = createSubsystemLogger("agent/anthropic-payload");
10
10
  function resolvePayloadLogConfig(env) {
11
- const enabled = parseBooleanValue(env.POOLBOT_ANTHROPIC_PAYLOAD_LOG ?? env.CLAWDBOT_ANTHROPIC_PAYLOAD_LOG) ?? false;
11
+ const enabled = parseBooleanValue(env.POOLBOT_ANTHROPIC_PAYLOAD_LOG ?? env.CLAWDBOT_ANTHROPIC_PAYLOAD_LOG) ??
12
+ false;
12
13
  const fileOverride = (env.POOLBOT_ANTHROPIC_PAYLOAD_LOG_FILE ?? env.CLAWDBOT_ANTHROPIC_PAYLOAD_LOG_FILE)?.trim();
13
14
  const filePath = fileOverride
14
15
  ? resolveUserPath(fileOverride)
@@ -56,7 +56,8 @@ function validateHostEnv(env) {
56
56
  }
57
57
  }
58
58
  const DEFAULT_MAX_OUTPUT = clampNumber(readEnvInt("PI_BASH_MAX_OUTPUT_CHARS"), 200_000, 1_000, 200_000);
59
- const DEFAULT_PENDING_MAX_OUTPUT = clampNumber(readEnvInt("POOLBOT_BASH_PENDING_MAX_OUTPUT_CHARS") ?? readEnvInt("CLAWDBOT_BASH_PENDING_MAX_OUTPUT_CHARS"), 200_000, 1_000, 200_000);
59
+ const DEFAULT_PENDING_MAX_OUTPUT = clampNumber(readEnvInt("POOLBOT_BASH_PENDING_MAX_OUTPUT_CHARS") ??
60
+ readEnvInt("CLAWDBOT_BASH_PENDING_MAX_OUTPUT_CHARS"), 200_000, 1_000, 200_000);
60
61
  const DEFAULT_PATH = process.env.PATH ?? "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
61
62
  const DEFAULT_NOTIFY_TAIL_CHARS = 400;
62
63
  const DEFAULT_APPROVAL_TIMEOUT_MS = 120_000;
@@ -10,13 +10,17 @@ function resolveCacheTraceConfig(params) {
10
10
  const config = params.cfg?.diagnostics?.cacheTrace;
11
11
  const envEnabled = parseBooleanValue(env.POOLBOT_CACHE_TRACE ?? env.CLAWDBOT_CACHE_TRACE);
12
12
  const enabled = envEnabled ?? config?.enabled ?? false;
13
- const fileOverride = config?.filePath?.trim() || (env.POOLBOT_CACHE_TRACE_FILE ?? env.CLAWDBOT_CACHE_TRACE_FILE)?.trim();
13
+ const fileOverride = config?.filePath?.trim() ||
14
+ (env.POOLBOT_CACHE_TRACE_FILE ?? env.CLAWDBOT_CACHE_TRACE_FILE)?.trim();
14
15
  const filePath = fileOverride
15
16
  ? resolveUserPath(fileOverride)
16
17
  : path.join(resolveStateDir(env), "logs", "cache-trace.jsonl");
17
- const includeMessages = parseBooleanValue(env.POOLBOT_CACHE_TRACE_MESSAGES ?? env.CLAWDBOT_CACHE_TRACE_MESSAGES) ?? config?.includeMessages;
18
- const includePrompt = parseBooleanValue(env.POOLBOT_CACHE_TRACE_PROMPT ?? env.CLAWDBOT_CACHE_TRACE_PROMPT) ?? config?.includePrompt;
19
- const includeSystem = parseBooleanValue(env.POOLBOT_CACHE_TRACE_SYSTEM ?? env.CLAWDBOT_CACHE_TRACE_SYSTEM) ?? config?.includeSystem;
18
+ const includeMessages = parseBooleanValue(env.POOLBOT_CACHE_TRACE_MESSAGES ?? env.CLAWDBOT_CACHE_TRACE_MESSAGES) ??
19
+ config?.includeMessages;
20
+ const includePrompt = parseBooleanValue(env.POOLBOT_CACHE_TRACE_PROMPT ?? env.CLAWDBOT_CACHE_TRACE_PROMPT) ??
21
+ config?.includePrompt;
22
+ const includeSystem = parseBooleanValue(env.POOLBOT_CACHE_TRACE_SYSTEM ?? env.CLAWDBOT_CACHE_TRACE_SYSTEM) ??
23
+ config?.includeSystem;
20
24
  return {
21
25
  enabled,
22
26
  filePath,
@@ -20,7 +20,8 @@ function collectEnvPrefixedKeys(prefix) {
20
20
  return keys;
21
21
  }
22
22
  export function collectAnthropicApiKeys() {
23
- const forcedSingle = (process.env.POOLBOT_LIVE_ANTHROPIC_KEY?.trim() || process.env.CLAWDBOT_LIVE_ANTHROPIC_KEY?.trim());
23
+ const forcedSingle = process.env.POOLBOT_LIVE_ANTHROPIC_KEY?.trim() ||
24
+ process.env.CLAWDBOT_LIVE_ANTHROPIC_KEY?.trim();
24
25
  if (forcedSingle)
25
26
  return [forcedSingle];
26
27
  const fromList = parseKeyList(process.env.POOLBOT_LIVE_ANTHROPIC_KEYS || process.env.CLAWDBOT_LIVE_ANTHROPIC_KEYS);
@@ -5,7 +5,8 @@ const SESSION_MANAGER_CACHE = new Map();
5
5
  const DEFAULT_SESSION_MANAGER_TTL_MS = 45_000; // 45 seconds
6
6
  function getSessionManagerTtl() {
7
7
  return resolveCacheTtlMs({
8
- envValue: process.env.POOLBOT_SESSION_MANAGER_CACHE_TTL_MS || process.env.CLAWDBOT_SESSION_MANAGER_CACHE_TTL_MS,
8
+ envValue: process.env.POOLBOT_SESSION_MANAGER_CACHE_TTL_MS ||
9
+ process.env.CLAWDBOT_SESSION_MANAGER_CACHE_TTL_MS,
9
10
  defaultTtlMs: DEFAULT_SESSION_MANAGER_TTL_MS,
10
11
  });
11
12
  }
@@ -3,7 +3,8 @@ import path from "node:path";
3
3
  import { resolveStateDir } from "../config/paths.js";
4
4
  import { isTruthyEnvValue } from "../infra/env.js";
5
5
  const RAW_STREAM_ENABLED = isTruthyEnvValue(process.env.POOLBOT_RAW_STREAM || process.env.CLAWDBOT_RAW_STREAM);
6
- const RAW_STREAM_PATH = process.env.POOLBOT_RAW_STREAM_PATH?.trim() || process.env.CLAWDBOT_RAW_STREAM_PATH?.trim() ||
6
+ const RAW_STREAM_PATH = process.env.POOLBOT_RAW_STREAM_PATH?.trim() ||
7
+ process.env.CLAWDBOT_RAW_STREAM_PATH?.trim() ||
7
8
  path.join(resolveStateDir(), "logs", "raw-stream.jsonl");
8
9
  let rawStreamReady = false;
9
10
  export function appendRawStream(payload) {
@@ -25,7 +25,8 @@ function looksLikeSkillsDir(dir) {
25
25
  return false;
26
26
  }
27
27
  export function resolveBundledSkillsDir(opts = {}) {
28
- const override = process.env.POOLBOT_BUNDLED_SKILLS_DIR?.trim() || process.env.CLAWDBOT_BUNDLED_SKILLS_DIR?.trim();
28
+ const override = process.env.POOLBOT_BUNDLED_SKILLS_DIR?.trim() ||
29
+ process.env.CLAWDBOT_BUNDLED_SKILLS_DIR?.trim();
29
30
  if (override)
30
31
  return override;
31
32
  // bun --compile: ship a sibling `skills/` next to the executable.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026.2.3",
3
- "commit": "84e7160aa161f8c42b9f4a276ea99d44597d7f19",
4
- "builtAt": "2026-02-14T00:56:24.316Z"
2
+ "version": "2026.2.4",
3
+ "commit": "c64f0b4b98cd3ef3ffe676270cab95c2c859479d",
4
+ "builtAt": "2026-02-14T01:53:48.010Z"
5
5
  }
@@ -14,7 +14,12 @@ const DEFAULT_CATALOG_PATHS = [
14
14
  path.join(CONFIG_DIR, "mpm", "catalog.json"),
15
15
  path.join(CONFIG_DIR, "plugins", "catalog.json"),
16
16
  ];
17
- const ENV_CATALOG_PATHS = ["POOLBOT_PLUGIN_CATALOG_PATHS", "POOLBOT_MPM_CATALOG_PATHS", "CLAWDBOT_PLUGIN_CATALOG_PATHS", "CLAWDBOT_MPM_CATALOG_PATHS"];
17
+ const ENV_CATALOG_PATHS = [
18
+ "POOLBOT_PLUGIN_CATALOG_PATHS",
19
+ "POOLBOT_MPM_CATALOG_PATHS",
20
+ "CLAWDBOT_PLUGIN_CATALOG_PATHS",
21
+ "CLAWDBOT_MPM_CATALOG_PATHS",
22
+ ];
18
23
  function isRecord(value) {
19
24
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
20
25
  }
@@ -73,7 +73,10 @@ export async function runDaemonInstall(opts) {
73
73
  const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
74
74
  env: process.env,
75
75
  port,
76
- token: opts.token || cfg.gateway?.auth?.token || process.env.POOLBOT_GATEWAY_TOKEN || process.env.CLAWDBOT_GATEWAY_TOKEN,
76
+ token: opts.token ||
77
+ cfg.gateway?.auth?.token ||
78
+ process.env.POOLBOT_GATEWAY_TOKEN ||
79
+ process.env.CLAWDBOT_GATEWAY_TOKEN,
77
80
  runtime: runtimeRaw,
78
81
  warn: (message) => {
79
82
  if (json)
@@ -106,10 +106,12 @@ export async function gatherDaemonStatus(opts) {
106
106
  ? await probeGatewayStatus({
107
107
  url: probeUrl,
108
108
  token: opts.rpc.token ||
109
- mergedDaemonEnv.POOLBOT_GATEWAY_TOKEN || mergedDaemonEnv.CLAWDBOT_GATEWAY_TOKEN ||
109
+ mergedDaemonEnv.POOLBOT_GATEWAY_TOKEN ||
110
+ mergedDaemonEnv.CLAWDBOT_GATEWAY_TOKEN ||
110
111
  daemonCfg.gateway?.auth?.token,
111
112
  password: opts.rpc.password ||
112
- mergedDaemonEnv.POOLBOT_GATEWAY_PASSWORD || mergedDaemonEnv.CLAWDBOT_GATEWAY_PASSWORD ||
113
+ mergedDaemonEnv.POOLBOT_GATEWAY_PASSWORD ||
114
+ mergedDaemonEnv.CLAWDBOT_GATEWAY_PASSWORD ||
113
115
  daemonCfg.gateway?.auth?.password,
114
116
  timeoutMs,
115
117
  json: opts.rpc.json,
@@ -161,7 +161,9 @@ export async function runMemoryStatus(opts) {
161
161
  getManager: () => getMemorySearchManager({ cfg, agentId }),
162
162
  onMissing: (error) => defaultRuntime.log(error ?? "Memory search disabled."),
163
163
  onCloseError: (err) => defaultRuntime.error(`Memory manager close failed: ${formatErrorMessage(err)}`),
164
- close: async (manager) => { await manager.close?.(); },
164
+ close: async (manager) => {
165
+ await manager.close?.();
166
+ },
165
167
  run: async (manager) => {
166
168
  const deep = Boolean(opts.deep || opts.index);
167
169
  let embeddingProbe;
@@ -387,7 +389,9 @@ export function registerMemoryCli(program) {
387
389
  getManager: () => getMemorySearchManager({ cfg, agentId }),
388
390
  onMissing: (error) => defaultRuntime.log(error ?? "Memory search disabled."),
389
391
  onCloseError: (err) => defaultRuntime.error(`Memory manager close failed: ${formatErrorMessage(err)}`),
390
- close: async (manager) => { await manager.close?.(); },
392
+ close: async (manager) => {
393
+ await manager.close?.();
394
+ },
391
395
  run: async (manager) => {
392
396
  try {
393
397
  if (opts.verbose) {
@@ -500,7 +504,9 @@ export function registerMemoryCli(program) {
500
504
  getManager: () => getMemorySearchManager({ cfg, agentId }),
501
505
  onMissing: (error) => defaultRuntime.log(error ?? "Memory search disabled."),
502
506
  onCloseError: (err) => defaultRuntime.error(`Memory manager close failed: ${formatErrorMessage(err)}`),
503
- close: async (manager) => { await manager.close?.(); },
507
+ close: async (manager) => {
508
+ await manager.close?.();
509
+ },
504
510
  run: async (manager) => {
505
511
  let results;
506
512
  try {
@@ -75,7 +75,9 @@ export function applyCliProfileEnv(params) {
75
75
  // Convenience only: fill defaults, never override explicit env values.
76
76
  env.POOLBOT_PROFILE = profile;
77
77
  env.CLAWDBOT_PROFILE = profile;
78
- const stateDir = env.POOLBOT_STATE_DIR?.trim() || env.CLAWDBOT_STATE_DIR?.trim() || resolveProfileStateDir(profile, homedir);
78
+ const stateDir = env.POOLBOT_STATE_DIR?.trim() ||
79
+ env.CLAWDBOT_STATE_DIR?.trim() ||
80
+ resolveProfileStateDir(profile, homedir);
79
81
  if (!env.POOLBOT_STATE_DIR?.trim())
80
82
  env.POOLBOT_STATE_DIR = stateDir;
81
83
  if (!env.CLAWDBOT_STATE_DIR?.trim())
@@ -85,7 +87,9 @@ export function applyCliProfileEnv(params) {
85
87
  env.POOLBOT_CONFIG_PATH = configPath;
86
88
  env.CLAWDBOT_CONFIG_PATH = configPath;
87
89
  }
88
- if (profile === "dev" && !env.POOLBOT_GATEWAY_PORT?.trim() && !env.CLAWDBOT_GATEWAY_PORT?.trim()) {
90
+ if (profile === "dev" &&
91
+ !env.POOLBOT_GATEWAY_PORT?.trim() &&
92
+ !env.CLAWDBOT_GATEWAY_PORT?.trim()) {
89
93
  env.POOLBOT_GATEWAY_PORT = "19001";
90
94
  env.CLAWDBOT_GATEWAY_PORT = "19001";
91
95
  }
@@ -132,8 +132,12 @@ export async function runConfigureWizard(opts, runtime = defaultRuntime) {
132
132
  const localUrl = "ws://127.0.0.1:18789";
133
133
  const localProbe = await probeGatewayReachable({
134
134
  url: localUrl,
135
- token: baseConfig.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
136
- password: baseConfig.gateway?.auth?.password ?? process.env.POOLBOT_GATEWAY_PASSWORD ?? process.env.CLAWDBOT_GATEWAY_PASSWORD,
135
+ token: baseConfig.gateway?.auth?.token ??
136
+ process.env.POOLBOT_GATEWAY_TOKEN ??
137
+ process.env.CLAWDBOT_GATEWAY_TOKEN,
138
+ password: baseConfig.gateway?.auth?.password ??
139
+ process.env.POOLBOT_GATEWAY_PASSWORD ??
140
+ process.env.CLAWDBOT_GATEWAY_PASSWORD,
137
141
  });
138
142
  const remoteUrl = baseConfig.gateway?.remote?.url?.trim() ?? "";
139
143
  const remoteProbe = remoteUrl
@@ -192,7 +196,8 @@ export async function runConfigureWizard(opts, runtime = defaultRuntime) {
192
196
  let gatewayPort = resolveGatewayPort(baseConfig);
193
197
  let gatewayToken = nextConfig.gateway?.auth?.token ??
194
198
  baseConfig.gateway?.auth?.token ??
195
- process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN;
199
+ process.env.POOLBOT_GATEWAY_TOKEN ??
200
+ process.env.CLAWDBOT_GATEWAY_TOKEN;
196
201
  const persistConfig = async () => {
197
202
  nextConfig = applyWizardMetadata(nextConfig, {
198
203
  command: opts.command,
@@ -277,8 +282,12 @@ export async function runConfigureWizard(opts, runtime = defaultRuntime) {
277
282
  });
278
283
  const remoteUrl = nextConfig.gateway?.remote?.url?.trim();
279
284
  const wsUrl = nextConfig.gateway?.mode === "remote" && remoteUrl ? remoteUrl : localLinks.wsUrl;
280
- const token = nextConfig.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN;
281
- const password = nextConfig.gateway?.auth?.password ?? process.env.POOLBOT_GATEWAY_PASSWORD ?? process.env.CLAWDBOT_GATEWAY_PASSWORD;
285
+ const token = nextConfig.gateway?.auth?.token ??
286
+ process.env.POOLBOT_GATEWAY_TOKEN ??
287
+ process.env.CLAWDBOT_GATEWAY_TOKEN;
288
+ const password = nextConfig.gateway?.auth?.password ??
289
+ process.env.POOLBOT_GATEWAY_PASSWORD ??
290
+ process.env.CLAWDBOT_GATEWAY_PASSWORD;
282
291
  await waitForGatewayReachable({
283
292
  url: wsUrl,
284
293
  token,
@@ -386,8 +395,12 @@ export async function runConfigureWizard(opts, runtime = defaultRuntime) {
386
395
  });
387
396
  const remoteUrl = nextConfig.gateway?.remote?.url?.trim();
388
397
  const wsUrl = nextConfig.gateway?.mode === "remote" && remoteUrl ? remoteUrl : localLinks.wsUrl;
389
- const token = nextConfig.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN;
390
- const password = nextConfig.gateway?.auth?.password ?? process.env.POOLBOT_GATEWAY_PASSWORD ?? process.env.CLAWDBOT_GATEWAY_PASSWORD;
398
+ const token = nextConfig.gateway?.auth?.token ??
399
+ process.env.POOLBOT_GATEWAY_TOKEN ??
400
+ process.env.CLAWDBOT_GATEWAY_TOKEN;
401
+ const password = nextConfig.gateway?.auth?.password ??
402
+ process.env.POOLBOT_GATEWAY_PASSWORD ??
403
+ process.env.CLAWDBOT_GATEWAY_PASSWORD;
391
404
  await waitForGatewayReachable({
392
405
  url: wsUrl,
393
406
  token,
@@ -429,9 +442,15 @@ export async function runConfigureWizard(opts, runtime = defaultRuntime) {
429
442
  basePath: nextConfig.gateway?.controlUi?.basePath,
430
443
  });
431
444
  // Try both new and old passwords since gateway may still have old config.
432
- const newPassword = nextConfig.gateway?.auth?.password ?? process.env.POOLBOT_GATEWAY_PASSWORD ?? process.env.CLAWDBOT_GATEWAY_PASSWORD;
433
- const oldPassword = baseConfig.gateway?.auth?.password ?? process.env.POOLBOT_GATEWAY_PASSWORD ?? process.env.CLAWDBOT_GATEWAY_PASSWORD;
434
- const token = nextConfig.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN;
445
+ const newPassword = nextConfig.gateway?.auth?.password ??
446
+ process.env.POOLBOT_GATEWAY_PASSWORD ??
447
+ process.env.CLAWDBOT_GATEWAY_PASSWORD;
448
+ const oldPassword = baseConfig.gateway?.auth?.password ??
449
+ process.env.POOLBOT_GATEWAY_PASSWORD ??
450
+ process.env.CLAWDBOT_GATEWAY_PASSWORD;
451
+ const token = nextConfig.gateway?.auth?.token ??
452
+ process.env.POOLBOT_GATEWAY_TOKEN ??
453
+ process.env.CLAWDBOT_GATEWAY_TOKEN;
435
454
  let gatewayProbe = await probeGatewayReachable({
436
455
  url: links.wsUrl,
437
456
  token,
@@ -9,7 +9,10 @@ export async function dashboardCommand(runtime = defaultRuntime, options = {}) {
9
9
  const bind = cfg.gateway?.bind ?? "loopback";
10
10
  const basePath = cfg.gateway?.controlUi?.basePath;
11
11
  const customBindHost = cfg.gateway?.customBindHost;
12
- const token = cfg.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN ?? "";
12
+ const token = cfg.gateway?.auth?.token ??
13
+ process.env.POOLBOT_GATEWAY_TOKEN ??
14
+ process.env.CLAWDBOT_GATEWAY_TOKEN ??
15
+ "";
13
16
  const links = resolveControlUiLinks({
14
17
  port,
15
18
  bind,
@@ -72,7 +72,11 @@ export async function maybeRepairGatewayDaemon(params) {
72
72
  prompter: params.prompter,
73
73
  });
74
74
  await maybeRepairLaunchAgentBootstrap({
75
- env: { ...process.env, POOLBOT_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel(), CLAWDBOT_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel() },
75
+ env: {
76
+ ...process.env,
77
+ POOLBOT_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel(),
78
+ CLAWDBOT_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel(),
79
+ },
76
80
  title: "Node",
77
81
  runtime: params.runtime,
78
82
  prompter: params.prompter,
@@ -121,7 +125,9 @@ export async function maybeRepairGatewayDaemon(params) {
121
125
  const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
122
126
  env: process.env,
123
127
  port,
124
- token: params.cfg.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
128
+ token: params.cfg.gateway?.auth?.token ??
129
+ process.env.POOLBOT_GATEWAY_TOKEN ??
130
+ process.env.CLAWDBOT_GATEWAY_TOKEN,
125
131
  runtime: daemonRuntime,
126
132
  warn: (message, title) => note(message, title),
127
133
  config: params.cfg,
@@ -80,7 +80,9 @@ export async function maybeMigrateLegacyGatewayService(cfg, mode, runtime, promp
80
80
  const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
81
81
  env: process.env,
82
82
  port,
83
- token: cfg.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
83
+ token: cfg.gateway?.auth?.token ??
84
+ process.env.POOLBOT_GATEWAY_TOKEN ??
85
+ process.env.CLAWDBOT_GATEWAY_TOKEN,
84
86
  runtime: daemonRuntime,
85
87
  warn: (message, title) => note(message, title),
86
88
  config: cfg,
@@ -138,7 +140,9 @@ export async function maybeRepairGatewayServiceConfig(cfg, mode, runtime, prompt
138
140
  const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
139
141
  env: process.env,
140
142
  port,
141
- token: cfg.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
143
+ token: cfg.gateway?.auth?.token ??
144
+ process.env.POOLBOT_GATEWAY_TOKEN ??
145
+ process.env.CLAWDBOT_GATEWAY_TOKEN,
142
146
  runtime: needsNodeRuntime && systemNodePath ? "node" : runtimeChoice,
143
147
  nodePath: systemNodePath ?? undefined,
144
148
  warn: (message, title) => note(message, title),
@@ -69,7 +69,9 @@ export async function noteMacLaunchctlGatewayEnvOverrides(cfg, deps) {
69
69
  passwordUnsets.push(" launchctl unsetenv CLAWDBOT_GATEWAY_PASSWORD");
70
70
  const lines = [
71
71
  "- launchctl environment overrides detected (can cause confusing unauthorized errors).",
72
- hasToken ? `- \`${poolbotToken ? "POOLBOT" : "CLAWDBOT"}_GATEWAY_TOKEN\` is set; it overrides config tokens.` : undefined,
72
+ hasToken
73
+ ? `- \`${poolbotToken ? "POOLBOT" : "CLAWDBOT"}_GATEWAY_TOKEN\` is set; it overrides config tokens.`
74
+ : undefined,
73
75
  hasPassword
74
76
  ? `- \`${poolbotPassword ? "POOLBOT" : "CLAWDBOT"}_GATEWAY_PASSWORD\` is set; it overrides config passwords.`
75
77
  : undefined,
@@ -92,7 +92,9 @@ export function resolveAuthForTarget(cfg, target, overrides) {
92
92
  };
93
93
  }
94
94
  const envToken = process.env.POOLBOT_GATEWAY_TOKEN?.trim() || process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() || "";
95
- const envPassword = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() || process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() || "";
95
+ const envPassword = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
96
+ process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
97
+ "";
96
98
  const cfgToken = typeof cfg.gateway?.auth?.token === "string" ? cfg.gateway.auth.token.trim() : "";
97
99
  const cfgPassword = typeof cfg.gateway?.auth?.password === "string" ? cfg.gateway.auth.password.trim() : "";
98
100
  return {
@@ -118,9 +118,11 @@ export async function statusAllCommand(runtime, opts) {
118
118
  ? typeof remote?.token === "string" && remote.token.trim()
119
119
  ? remote.token.trim()
120
120
  : undefined
121
- : process.env.POOLBOT_GATEWAY_TOKEN?.trim() || process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
121
+ : process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
122
+ process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
122
123
  (typeof authToken === "string" && authToken.trim() ? authToken.trim() : undefined);
123
- const password = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() || process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
124
+ const password = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
125
+ process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
124
126
  (mode === "remote"
125
127
  ? typeof remote?.password === "string" && remote.password.trim()
126
128
  ? remote.password.trim()
@@ -7,9 +7,11 @@ export function resolveGatewayProbeAuth(cfg) {
7
7
  ? typeof remote?.token === "string" && remote.token.trim().length > 0
8
8
  ? remote.token.trim()
9
9
  : undefined
10
- : process.env.POOLBOT_GATEWAY_TOKEN?.trim() || process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
10
+ : process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
11
+ process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
11
12
  (typeof authToken === "string" && authToken.trim().length > 0 ? authToken.trim() : undefined);
12
- const password = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() || process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
13
+ const password = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
14
+ process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
13
15
  (isRemoteMode
14
16
  ? typeof remote?.password === "string" && remote.password.trim().length > 0
15
17
  ? remote.password.trim()
@@ -87,7 +87,8 @@ export async function scanStatus(opts, _runtime) {
87
87
  const channels = await buildChannelsTable(cfg, {
88
88
  // Show token previews in regular status; keep `status --all` redacted.
89
89
  // Set `POOLBOT_SHOW_SECRETS=0` (or `CLAWDBOT_SHOW_SECRETS=0`) to force redaction.
90
- showSecrets: (process.env.POOLBOT_SHOW_SECRETS?.trim() ?? process.env.CLAWDBOT_SHOW_SECRETS?.trim()) !== "0",
90
+ showSecrets: (process.env.POOLBOT_SHOW_SECRETS?.trim() ??
91
+ process.env.CLAWDBOT_SHOW_SECRETS?.trim()) !== "0",
91
92
  });
92
93
  progress.tick();
93
94
  progress.setLabel("Checking memory…");
@@ -47,7 +47,9 @@ export function resolveNewStateDir(homedir = resolveDefaultHomeDir) {
47
47
  */
48
48
  export function resolveStateDir(env = process.env, homedir = envHomedir(env)) {
49
49
  const effectiveHomedir = () => resolveRequiredHomeDir(env, homedir);
50
- const override = env.POOLBOT_STATE_DIR?.trim() || env.MOLTBOT_STATE_DIR?.trim() || env.CLAWDBOT_STATE_DIR?.trim();
50
+ const override = env.POOLBOT_STATE_DIR?.trim() ||
51
+ env.MOLTBOT_STATE_DIR?.trim() ||
52
+ env.CLAWDBOT_STATE_DIR?.trim();
51
53
  if (override) {
52
54
  return resolveUserPath(override, env, effectiveHomedir);
53
55
  }
@@ -92,7 +94,9 @@ export const STATE_DIR = resolveStateDir();
92
94
  * Default: ~/.poolbot/poolbot.json (or $*_STATE_DIR/poolbot.json)
93
95
  */
94
96
  export function resolveCanonicalConfigPath(env = process.env, stateDir = resolveStateDir(env, envHomedir(env))) {
95
- const override = env.POOLBOT_CONFIG_PATH?.trim() || env.MOLTBOT_CONFIG_PATH?.trim() || env.CLAWDBOT_CONFIG_PATH?.trim();
97
+ const override = env.POOLBOT_CONFIG_PATH?.trim() ||
98
+ env.MOLTBOT_CONFIG_PATH?.trim() ||
99
+ env.CLAWDBOT_CONFIG_PATH?.trim();
96
100
  if (override) {
97
101
  return resolveUserPath(override, env, envHomedir(env));
98
102
  }
@@ -121,11 +125,15 @@ export function resolveConfigPathCandidate(env = process.env, homedir = envHomed
121
125
  * Active config path (prefers existing config files).
122
126
  */
123
127
  export function resolveConfigPath(env = process.env, stateDir = resolveStateDir(env, envHomedir(env)), homedir = envHomedir(env)) {
124
- const override = env.POOLBOT_CONFIG_PATH?.trim() || env.MOLTBOT_CONFIG_PATH?.trim() || env.CLAWDBOT_CONFIG_PATH?.trim();
128
+ const override = env.POOLBOT_CONFIG_PATH?.trim() ||
129
+ env.MOLTBOT_CONFIG_PATH?.trim() ||
130
+ env.CLAWDBOT_CONFIG_PATH?.trim();
125
131
  if (override) {
126
132
  return resolveUserPath(override, env, homedir);
127
133
  }
128
- const stateOverride = env.POOLBOT_STATE_DIR?.trim() || env.MOLTBOT_STATE_DIR?.trim() || env.CLAWDBOT_STATE_DIR?.trim();
134
+ const stateOverride = env.POOLBOT_STATE_DIR?.trim() ||
135
+ env.MOLTBOT_STATE_DIR?.trim() ||
136
+ env.CLAWDBOT_STATE_DIR?.trim();
129
137
  const candidates = [
130
138
  path.join(stateDir, CONFIG_FILENAME),
131
139
  ...LEGACY_CONFIG_FILENAMES.map((name) => path.join(stateDir, name)),
@@ -157,12 +165,16 @@ export const CONFIG_PATH = resolveConfigPathCandidate();
157
165
  */
158
166
  export function resolveDefaultConfigCandidates(env = process.env, homedir = envHomedir(env)) {
159
167
  const effectiveHomedir = () => resolveRequiredHomeDir(env, homedir);
160
- const explicit = env.POOLBOT_CONFIG_PATH?.trim() || env.MOLTBOT_CONFIG_PATH?.trim() || env.CLAWDBOT_CONFIG_PATH?.trim();
168
+ const explicit = env.POOLBOT_CONFIG_PATH?.trim() ||
169
+ env.MOLTBOT_CONFIG_PATH?.trim() ||
170
+ env.CLAWDBOT_CONFIG_PATH?.trim();
161
171
  if (explicit) {
162
172
  return [resolveUserPath(explicit, env, effectiveHomedir)];
163
173
  }
164
174
  const candidates = [];
165
- const poolbotStateDir = env.POOLBOT_STATE_DIR?.trim() || env.MOLTBOT_STATE_DIR?.trim() || env.CLAWDBOT_STATE_DIR?.trim();
175
+ const poolbotStateDir = env.POOLBOT_STATE_DIR?.trim() ||
176
+ env.MOLTBOT_STATE_DIR?.trim() ||
177
+ env.CLAWDBOT_STATE_DIR?.trim();
166
178
  if (poolbotStateDir) {
167
179
  const resolved = resolveUserPath(poolbotStateDir, env, effectiveHomedir);
168
180
  candidates.push(path.join(resolved, CONFIG_FILENAME));
@@ -278,7 +278,10 @@ export async function installLaunchAgent({ env, stdout, programArguments, workin
278
278
  const serviceDescription = description ??
279
279
  formatGatewayServiceDescription({
280
280
  profile: env.POOLBOT_PROFILE ?? env.CLAWDBOT_PROFILE,
281
- version: environment?.POOLBOT_SERVICE_VERSION ?? environment?.CLAWDBOT_SERVICE_VERSION ?? env.POOLBOT_SERVICE_VERSION ?? env.CLAWDBOT_SERVICE_VERSION,
281
+ version: environment?.POOLBOT_SERVICE_VERSION ??
282
+ environment?.CLAWDBOT_SERVICE_VERSION ??
283
+ env.POOLBOT_SERVICE_VERSION ??
284
+ env.CLAWDBOT_SERVICE_VERSION,
282
285
  });
283
286
  const plist = buildLaunchAgentPlist({
284
287
  label,
@@ -186,7 +186,10 @@ export async function installScheduledTask({ env, stdout, programArguments, work
186
186
  const taskDescription = description ??
187
187
  formatGatewayServiceDescription({
188
188
  profile: env.POOLBOT_PROFILE ?? env.CLAWDBOT_PROFILE,
189
- version: environment?.POOLBOT_SERVICE_VERSION ?? environment?.CLAWDBOT_SERVICE_VERSION ?? env.POOLBOT_SERVICE_VERSION ?? env.CLAWDBOT_SERVICE_VERSION,
189
+ version: environment?.POOLBOT_SERVICE_VERSION ??
190
+ environment?.CLAWDBOT_SERVICE_VERSION ??
191
+ env.POOLBOT_SERVICE_VERSION ??
192
+ env.CLAWDBOT_SERVICE_VERSION,
190
193
  });
191
194
  const script = buildTaskScript({
192
195
  description: taskDescription,
@@ -153,7 +153,10 @@ export async function installSystemdService({ env, stdout, programArguments, wor
153
153
  const serviceDescription = description ??
154
154
  formatGatewayServiceDescription({
155
155
  profile: env.POOLBOT_PROFILE ?? env.CLAWDBOT_PROFILE,
156
- version: environment?.POOLBOT_SERVICE_VERSION ?? environment?.CLAWDBOT_SERVICE_VERSION ?? env.POOLBOT_SERVICE_VERSION ?? env.CLAWDBOT_SERVICE_VERSION,
156
+ version: environment?.POOLBOT_SERVICE_VERSION ??
157
+ environment?.CLAWDBOT_SERVICE_VERSION ??
158
+ env.POOLBOT_SERVICE_VERSION ??
159
+ env.CLAWDBOT_SERVICE_VERSION,
157
160
  });
158
161
  const unit = buildSystemdUnit({
159
162
  description: serviceDescription,
package/dist/entry.js CHANGED
@@ -25,9 +25,11 @@ function hasExperimentalWarningSuppressed() {
25
25
  return false;
26
26
  }
27
27
  function ensureExperimentalWarningSuppressed() {
28
- if (isTruthyEnvValue(process.env.POOLBOT_NO_RESPAWN) || isTruthyEnvValue(process.env.CLAWDBOT_NO_RESPAWN))
28
+ if (isTruthyEnvValue(process.env.POOLBOT_NO_RESPAWN) ||
29
+ isTruthyEnvValue(process.env.CLAWDBOT_NO_RESPAWN))
29
30
  return false;
30
- if (isTruthyEnvValue(process.env.POOLBOT_NODE_OPTIONS_READY) || isTruthyEnvValue(process.env.CLAWDBOT_NODE_OPTIONS_READY))
31
+ if (isTruthyEnvValue(process.env.POOLBOT_NODE_OPTIONS_READY) ||
32
+ isTruthyEnvValue(process.env.CLAWDBOT_NODE_OPTIONS_READY))
31
33
  return false;
32
34
  if (hasExperimentalWarningSuppressed())
33
35
  return false;
@@ -128,7 +128,10 @@ export function resolveGatewayAuth(params) {
128
128
  const authConfig = params.authConfig ?? {};
129
129
  const env = params.env ?? process.env;
130
130
  const token = authConfig.token ?? env.POOLBOT_GATEWAY_TOKEN ?? env.CLAWDBOT_GATEWAY_TOKEN ?? undefined;
131
- const password = authConfig.password ?? env.POOLBOT_GATEWAY_PASSWORD ?? env.CLAWDBOT_GATEWAY_PASSWORD ?? undefined;
131
+ const password = authConfig.password ??
132
+ env.POOLBOT_GATEWAY_PASSWORD ??
133
+ env.CLAWDBOT_GATEWAY_PASSWORD ??
134
+ undefined;
132
135
  const mode = authConfig.mode ?? (password ? "password" : "token");
133
136
  const allowTailscale = authConfig.allowTailscale ?? (params.tailscaleMode === "serve" && mode !== "password");
134
137
  return {
@@ -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.warn),
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.4",
4
4
  "description": "🎱 Pool Bot - AI assistant with PLCODE integrations",
5
5
  "keywords": [],
6
6
  "license": "MIT",