@poolzin/pool-bot 2026.2.2 → 2026.2.3

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 (121) hide show
  1. package/dist/acp/server.js +2 -0
  2. package/dist/agents/agent-paths.js +3 -1
  3. package/dist/agents/anthropic-payload-log.js +2 -2
  4. package/dist/agents/bash-tools.exec.js +1 -1
  5. package/dist/agents/bash-tools.shared.js +2 -1
  6. package/dist/agents/cache-trace.js +5 -5
  7. package/dist/agents/cli-runner.js +1 -1
  8. package/dist/agents/live-auth-keys.js +2 -2
  9. package/dist/agents/pi-embedded-runner/session-manager-cache.js +1 -1
  10. package/dist/agents/pi-embedded-subscribe.raw-stream.js +2 -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 +1 -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 +2 -2
  18. package/dist/canvas-host/server.js +1 -1
  19. package/dist/channels/plugins/catalog.js +1 -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 +1 -1
  27. package/dist/cli/daemon-cli/shared.js +8 -3
  28. package/dist/cli/daemon-cli/status.gather.js +2 -2
  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/node-cli/daemon.js +2 -1
  34. package/dist/cli/profile.js +10 -4
  35. package/dist/cli/program/help.js +1 -1
  36. package/dist/cli/program/preaction.js +1 -1
  37. package/dist/cli/program/register.agent.js +4 -4
  38. package/dist/cli/program/register.onboard.js +1 -1
  39. package/dist/cli/program/register.setup.js +1 -1
  40. package/dist/cli/program/register.subclis.js +2 -2
  41. package/dist/cli/route.js +1 -1
  42. package/dist/cli/tagline.js +8 -8
  43. package/dist/cli/update-cli.js +12 -10
  44. package/dist/commands/auth-choice-options.js +104 -33
  45. package/dist/commands/configure.wizard.js +10 -10
  46. package/dist/commands/daemon-install-helpers.js +1 -1
  47. package/dist/commands/dashboard.js +1 -1
  48. package/dist/commands/doctor-format.js +3 -3
  49. package/dist/commands/doctor-gateway-daemon-flow.js +3 -3
  50. package/dist/commands/doctor-gateway-services.js +2 -2
  51. package/dist/commands/doctor-platform-notes.js +23 -8
  52. package/dist/commands/doctor-update.js +1 -1
  53. package/dist/commands/gateway-status/helpers.js +2 -2
  54. package/dist/commands/health.js +2 -2
  55. package/dist/commands/node-daemon-install-helpers.js +1 -1
  56. package/dist/commands/onboard-helpers.js +6 -6
  57. package/dist/commands/status-all.js +2 -2
  58. package/dist/commands/status.gateway-probe.js +2 -2
  59. package/dist/commands/status.scan.js +2 -2
  60. package/dist/config/io.js +5 -3
  61. package/dist/config/paths.js +15 -14
  62. package/dist/config/schema.field-metadata.js +1 -1
  63. package/dist/config/schema.js +1 -1
  64. package/dist/config/sessions/store.js +1 -1
  65. package/dist/daemon/inspect.js +1 -1
  66. package/dist/daemon/launchd.js +5 -5
  67. package/dist/daemon/node-service.js +14 -0
  68. package/dist/daemon/paths.js +2 -2
  69. package/dist/daemon/schtasks.js +6 -6
  70. package/dist/daemon/service-env.js +25 -5
  71. package/dist/daemon/systemd.js +6 -6
  72. package/dist/entry.js +3 -2
  73. package/dist/gateway/auth.js +3 -3
  74. package/dist/gateway/call.js +2 -2
  75. package/dist/gateway/server/ws-connection/message-handler.js +1 -1
  76. package/dist/gateway/server-browser.js +2 -2
  77. package/dist/gateway/server-constants.js +2 -2
  78. package/dist/gateway/server-cron.js +1 -1
  79. package/dist/gateway/server-discovery-runtime.js +2 -2
  80. package/dist/gateway/server-discovery.js +2 -2
  81. package/dist/gateway/server-reload-handlers.js +4 -4
  82. package/dist/gateway/server-runtime-config.js +2 -2
  83. package/dist/gateway/server-startup.js +4 -4
  84. package/dist/gateway/server.impl.js +3 -2
  85. package/dist/gateway/test-helpers.mocks.js +3 -0
  86. package/dist/gateway/test-helpers.server.js +60 -22
  87. package/dist/hooks/bundled-dir.js +1 -1
  88. package/dist/hooks/gmail-watcher.js +1 -1
  89. package/dist/infra/bonjour.js +1 -1
  90. package/dist/infra/diagnostic-flags.js +3 -2
  91. package/dist/infra/dotenv.js +1 -1
  92. package/dist/infra/gateway-lock.js +1 -1
  93. package/dist/infra/home-dir.js +1 -1
  94. package/dist/infra/path-env.js +2 -1
  95. package/dist/infra/restart.js +3 -3
  96. package/dist/infra/shell-env.js +3 -3
  97. package/dist/infra/state-migrations.js +3 -3
  98. package/dist/infra/system-presence.js +1 -1
  99. package/dist/infra/update-runner.js +1 -1
  100. package/dist/infra/widearea-dns.js +1 -1
  101. package/dist/macos/gateway-daemon.js +6 -4
  102. package/dist/macos/relay-smoke.js +1 -1
  103. package/dist/macos/relay.js +1 -1
  104. package/dist/media/image-ops.js +2 -2
  105. package/dist/memory/batch-gemini.js +1 -1
  106. package/dist/memory/embeddings-gemini.js +1 -1
  107. package/dist/node-host/runner.js +3 -2
  108. package/dist/plugins/bundled-dir.js +1 -1
  109. package/dist/plugins/manifest-registry.js +2 -2
  110. package/dist/security/audit-extra.sync.js +1 -1
  111. package/dist/security/audit.js +3 -2
  112. package/dist/telegram/accounts.js +1 -1
  113. package/dist/telegram/network-config.js +6 -4
  114. package/dist/test-helpers/state-dir-env.js +8 -0
  115. package/dist/tts/tts.js +1 -1
  116. package/dist/tui/gateway-chat.js +2 -1
  117. package/dist/utils.js +2 -2
  118. package/dist/version.js +1 -1
  119. package/dist/wizard/onboarding.finalize.js +1 -1
  120. package/dist/wizard/onboarding.js +2 -2
  121. package/package.json +1 -1
@@ -20,10 +20,12 @@ export function serveAcpGateway(opts = {}) {
20
20
  const auth = resolveGatewayAuth({ authConfig: cfg.gateway?.auth, env: process.env });
21
21
  const token = opts.gatewayToken ??
22
22
  (isRemoteMode ? remote?.token?.trim() : undefined) ??
23
+ process.env.POOLBOT_GATEWAY_TOKEN ??
23
24
  process.env.CLAWDBOT_GATEWAY_TOKEN ??
24
25
  auth.token;
25
26
  const password = opts.gatewayPassword ??
26
27
  (isRemoteMode ? remote?.password?.trim() : undefined) ??
28
+ process.env.POOLBOT_GATEWAY_PASSWORD ??
27
29
  process.env.CLAWDBOT_GATEWAY_PASSWORD ??
28
30
  auth.password;
29
31
  let agent = null;
@@ -3,7 +3,7 @@ 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.CLAWDBOT_AGENT_DIR?.trim() || process.env.PI_CODING_AGENT_DIR?.trim();
6
+ const override = process.env.POOLBOT_AGENT_DIR?.trim() || process.env.CLAWDBOT_AGENT_DIR?.trim() || process.env.PI_CODING_AGENT_DIR?.trim();
7
7
  if (override)
8
8
  return resolveUserPath(override);
9
9
  const defaultAgentDir = path.join(resolveStateDir(), "agents", DEFAULT_AGENT_ID, "agent");
@@ -11,6 +11,8 @@ export function resolvePoolbotAgentDir() {
11
11
  }
12
12
  export function ensurePoolbotAgentEnv() {
13
13
  const dir = resolvePoolbotAgentDir();
14
+ if (!process.env.POOLBOT_AGENT_DIR)
15
+ process.env.POOLBOT_AGENT_DIR = dir;
14
16
  if (!process.env.CLAWDBOT_AGENT_DIR)
15
17
  process.env.CLAWDBOT_AGENT_DIR = dir;
16
18
  if (!process.env.PI_CODING_AGENT_DIR)
@@ -8,8 +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.CLAWDBOT_ANTHROPIC_PAYLOAD_LOG) ?? false;
12
- const fileOverride = env.CLAWDBOT_ANTHROPIC_PAYLOAD_LOG_FILE?.trim();
11
+ const enabled = parseBooleanValue(env.POOLBOT_ANTHROPIC_PAYLOAD_LOG ?? env.CLAWDBOT_ANTHROPIC_PAYLOAD_LOG) ?? false;
12
+ const fileOverride = (env.POOLBOT_ANTHROPIC_PAYLOAD_LOG_FILE ?? env.CLAWDBOT_ANTHROPIC_PAYLOAD_LOG_FILE)?.trim();
13
13
  const filePath = fileOverride
14
14
  ? resolveUserPath(fileOverride)
15
15
  : path.join(resolveStateDir(env), "logs", "anthropic-payload.jsonl");
@@ -56,7 +56,7 @@ 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("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") ?? readEnvInt("CLAWDBOT_BASH_PENDING_MAX_OUTPUT_CHARS"), 200_000, 1_000, 200_000);
60
60
  const DEFAULT_PATH = process.env.PATH ?? "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
61
61
  const DEFAULT_NOTIFY_TAIL_CHARS = 400;
62
62
  const DEFAULT_APPROVAL_TIMEOUT_MS = 120_000;
@@ -42,6 +42,7 @@ export function buildDockerExecArgs(params) {
42
42
  const hasCustomPath = typeof params.env.PATH === "string" && params.env.PATH.length > 0;
43
43
  if (hasCustomPath) {
44
44
  // Avoid interpolating PATH into the shell command; pass it via env instead.
45
+ args.push("-e", `POOLBOT_PREPEND_PATH=${params.env.PATH}`);
45
46
  args.push("-e", `CLAWDBOT_PREPEND_PATH=${params.env.PATH}`);
46
47
  }
47
48
  // Login shell (-l) sources /etc/profile which resets PATH to a minimal set,
@@ -49,7 +50,7 @@ export function buildDockerExecArgs(params) {
49
50
  // Prepend custom PATH after profile sourcing to ensure custom tools are accessible
50
51
  // while preserving system paths that /etc/profile may have added.
51
52
  const pathExport = hasCustomPath
52
- ? 'export PATH="${CLAWDBOT_PREPEND_PATH}:$PATH"; unset CLAWDBOT_PREPEND_PATH; '
53
+ ? 'export PATH="${POOLBOT_PREPEND_PATH:-$CLAWDBOT_PREPEND_PATH}:$PATH"; unset POOLBOT_PREPEND_PATH CLAWDBOT_PREPEND_PATH; '
53
54
  : "";
54
55
  args.push(params.containerName, "sh", "-lc", `${pathExport}${params.command}`);
55
56
  return args;
@@ -8,15 +8,15 @@ const writers = new Map();
8
8
  function resolveCacheTraceConfig(params) {
9
9
  const env = params.env ?? process.env;
10
10
  const config = params.cfg?.diagnostics?.cacheTrace;
11
- const envEnabled = parseBooleanValue(env.CLAWDBOT_CACHE_TRACE);
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.CLAWDBOT_CACHE_TRACE_FILE?.trim();
13
+ const fileOverride = config?.filePath?.trim() || (env.POOLBOT_CACHE_TRACE_FILE ?? env.CLAWDBOT_CACHE_TRACE_FILE)?.trim();
14
14
  const filePath = fileOverride
15
15
  ? resolveUserPath(fileOverride)
16
16
  : path.join(resolveStateDir(env), "logs", "cache-trace.jsonl");
17
- const includeMessages = parseBooleanValue(env.CLAWDBOT_CACHE_TRACE_MESSAGES) ?? config?.includeMessages;
18
- const includePrompt = parseBooleanValue(env.CLAWDBOT_CACHE_TRACE_PROMPT) ?? config?.includePrompt;
19
- const includeSystem = parseBooleanValue(env.CLAWDBOT_CACHE_TRACE_SYSTEM) ?? config?.includeSystem;
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;
20
20
  return {
21
21
  enabled,
22
22
  filePath,
@@ -117,7 +117,7 @@ export async function runCliAgent(params) {
117
117
  try {
118
118
  const output = await enqueueCliRun(queueKey, async () => {
119
119
  log.info(`cli exec: provider=${params.provider} model=${normalizedModel} promptChars=${params.prompt.length}`);
120
- const logOutputText = isTruthyEnvValue(process.env.CLAWDBOT_CLAUDE_CLI_LOG_OUTPUT);
120
+ const logOutputText = isTruthyEnvValue(process.env.POOLBOT_CLAUDE_CLI_LOG_OUTPUT || process.env.CLAWDBOT_CLAUDE_CLI_LOG_OUTPUT);
121
121
  if (logOutputText) {
122
122
  const logArgs = [];
123
123
  for (let i = 0; i < args.length; i += 1) {
@@ -20,10 +20,10 @@ function collectEnvPrefixedKeys(prefix) {
20
20
  return keys;
21
21
  }
22
22
  export function collectAnthropicApiKeys() {
23
- const forcedSingle = process.env.CLAWDBOT_LIVE_ANTHROPIC_KEY?.trim();
23
+ const forcedSingle = (process.env.POOLBOT_LIVE_ANTHROPIC_KEY?.trim() || process.env.CLAWDBOT_LIVE_ANTHROPIC_KEY?.trim());
24
24
  if (forcedSingle)
25
25
  return [forcedSingle];
26
- const fromList = parseKeyList(process.env.CLAWDBOT_LIVE_ANTHROPIC_KEYS);
26
+ const fromList = parseKeyList(process.env.POOLBOT_LIVE_ANTHROPIC_KEYS || process.env.CLAWDBOT_LIVE_ANTHROPIC_KEYS);
27
27
  const fromEnv = collectEnvPrefixedKeys("ANTHROPIC_API_KEY");
28
28
  const primary = process.env.ANTHROPIC_API_KEY?.trim();
29
29
  const seen = new Set();
@@ -5,7 +5,7 @@ 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.CLAWDBOT_SESSION_MANAGER_CACHE_TTL_MS,
8
+ envValue: process.env.POOLBOT_SESSION_MANAGER_CACHE_TTL_MS || process.env.CLAWDBOT_SESSION_MANAGER_CACHE_TTL_MS,
9
9
  defaultTtlMs: DEFAULT_SESSION_MANAGER_TTL_MS,
10
10
  });
11
11
  }
@@ -2,8 +2,8 @@ import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { resolveStateDir } from "../config/paths.js";
4
4
  import { isTruthyEnvValue } from "../infra/env.js";
5
- const RAW_STREAM_ENABLED = isTruthyEnvValue(process.env.CLAWDBOT_RAW_STREAM);
6
- const RAW_STREAM_PATH = process.env.CLAWDBOT_RAW_STREAM_PATH?.trim() ||
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() ||
7
7
  path.join(resolveStateDir(), "logs", "raw-stream.jsonl");
8
8
  let rawStreamReady = false;
9
9
  export function appendRawStream(payload) {
@@ -89,10 +89,15 @@ export async function ensureSandboxBrowser(params) {
89
89
  if (params.cfg.browser.enableNoVnc && !params.cfg.browser.headless) {
90
90
  args.push("-p", `127.0.0.1::${params.cfg.browser.noVncPort}`);
91
91
  }
92
+ args.push("-e", `POOLBOT_BROWSER_HEADLESS=${params.cfg.browser.headless ? "1" : "0"}`);
92
93
  args.push("-e", `CLAWDBOT_BROWSER_HEADLESS=${params.cfg.browser.headless ? "1" : "0"}`);
94
+ args.push("-e", `POOLBOT_BROWSER_ENABLE_NOVNC=${params.cfg.browser.enableNoVnc ? "1" : "0"}`);
93
95
  args.push("-e", `CLAWDBOT_BROWSER_ENABLE_NOVNC=${params.cfg.browser.enableNoVnc ? "1" : "0"}`);
96
+ args.push("-e", `POOLBOT_BROWSER_CDP_PORT=${params.cfg.browser.cdpPort}`);
94
97
  args.push("-e", `CLAWDBOT_BROWSER_CDP_PORT=${params.cfg.browser.cdpPort}`);
98
+ args.push("-e", `POOLBOT_BROWSER_VNC_PORT=${params.cfg.browser.vncPort}`);
95
99
  args.push("-e", `CLAWDBOT_BROWSER_VNC_PORT=${params.cfg.browser.vncPort}`);
100
+ args.push("-e", `POOLBOT_BROWSER_NOVNC_PORT=${params.cfg.browser.noVncPort}`);
96
101
  args.push("-e", `CLAWDBOT_BROWSER_NOVNC_PORT=${params.cfg.browser.noVncPort}`);
97
102
  args.push(params.cfg.browser.image);
98
103
  await execDocker(args);
@@ -64,7 +64,7 @@ function normalizeShellName(value) {
64
64
  .replace(/[^a-zA-Z0-9_-]/g, "");
65
65
  }
66
66
  export function detectRuntimeShell() {
67
- const overrideShell = process.env.CLAWDBOT_SHELL?.trim();
67
+ const overrideShell = process.env.POOLBOT_SHELL?.trim() || process.env.CLAWDBOT_SHELL?.trim();
68
68
  if (overrideShell) {
69
69
  const name = normalizeShellName(overrideShell);
70
70
  if (name) {
@@ -25,7 +25,7 @@ function looksLikeSkillsDir(dir) {
25
25
  return false;
26
26
  }
27
27
  export function resolveBundledSkillsDir(opts = {}) {
28
- const override = process.env.CLAWDBOT_BUNDLED_SKILLS_DIR?.trim();
28
+ const override = process.env.POOLBOT_BUNDLED_SKILLS_DIR?.trim() || process.env.CLAWDBOT_BUNDLED_SKILLS_DIR?.trim();
29
29
  if (override)
30
30
  return override;
31
31
  // bun --compile: ship a sibling `skills/` next to the executable.
@@ -96,6 +96,14 @@ export const SYNTHETIC_MODEL_CATALOG = [
96
96
  contextWindow: 256000,
97
97
  maxTokens: 8192,
98
98
  },
99
+ {
100
+ id: "hf:moonshotai/Kimi-K2.5",
101
+ name: "Kimi K2.5",
102
+ reasoning: true,
103
+ input: ["text"],
104
+ contextWindow: 256000,
105
+ maxTokens: 8192,
106
+ },
99
107
  {
100
108
  id: "hf:openai/gpt-oss-120b",
101
109
  name: "GPT OSS 120B",
@@ -6,7 +6,7 @@ import { isSubagentSessionKey } from "../routing/session-key.js";
6
6
  import { runCommandWithTimeout } from "../process/exec.js";
7
7
  import { resolveUserPath } from "../utils.js";
8
8
  export function resolveDefaultAgentWorkspaceDir(env = process.env, homedir = os.homedir) {
9
- const profile = env.CLAWDBOT_PROFILE?.trim();
9
+ const profile = env.POOLBOT_PROFILE?.trim() || env.CLAWDBOT_PROFILE?.trim();
10
10
  if (profile && profile.toLowerCase() !== "default") {
11
11
  return path.join(homedir(), `clawd-${profile}`);
12
12
  }
@@ -18,7 +18,7 @@ import { applyResetModelOverride } from "./session-reset-model.js";
18
18
  import { stageSandboxMedia } from "./stage-sandbox-media.js";
19
19
  import { createTypingController } from "./typing.js";
20
20
  export async function getReplyFromConfig(ctx, opts, configOverride) {
21
- const isFastTestEnv = process.env.CLAWDBOT_TEST_FAST === "1";
21
+ const isFastTestEnv = process.env.POOLBOT_TEST_FAST === "1" || process.env.CLAWDBOT_TEST_FAST === "1";
22
22
  const cfg = configOverride ?? loadConfig();
23
23
  const targetSessionKey = ctx.CommandSource === "native" ? ctx.CommandTargetSessionKey?.trim() : undefined;
24
24
  const agentSessionKey = targetSessionKey || ctx.SessionKey;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026.2.2",
2
+ "version": "2026.2.3",
3
3
  "commit": "84e7160aa161f8c42b9f4a276ea99d44597d7f19",
4
- "builtAt": "2026-02-12T23:46:09.256Z"
4
+ "builtAt": "2026-02-14T00:56:24.316Z"
5
5
  }
@@ -151,7 +151,7 @@ async function resolveFilePath(rootReal, urlPath) {
151
151
  return await tryOpen(rel);
152
152
  }
153
153
  function isDisabledByEnv() {
154
- if (isTruthyEnvValue(process.env.CLAWDBOT_SKIP_CANVAS_HOST))
154
+ if (isTruthyEnvValue(process.env.POOLBOT_SKIP_CANVAS_HOST || process.env.CLAWDBOT_SKIP_CANVAS_HOST))
155
155
  return true;
156
156
  if (process.env.NODE_ENV === "test")
157
157
  return true;
@@ -14,7 +14,7 @@ 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 = ["CLAWDBOT_PLUGIN_CATALOG_PATHS", "CLAWDBOT_MPM_CATALOG_PATHS"];
17
+ const ENV_CATALOG_PATHS = ["POOLBOT_PLUGIN_CATALOG_PATHS", "POOLBOT_MPM_CATALOG_PATHS", "CLAWDBOT_PLUGIN_CATALOG_PATHS", "CLAWDBOT_MPM_CATALOG_PATHS"];
18
18
  function isRecord(value) {
19
19
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
20
20
  }
@@ -26,7 +26,7 @@ export function formatCliBannerLine(version, options = {}) {
26
26
  const rich = options.richTty ?? isRich();
27
27
  const cliName = resolveCliName(options.argv ?? process.argv, options.env);
28
28
  const title = cliName === "poolbot" ? "🎱 Pool Bot" : "🎱 Pool Bot";
29
- const prefix = "🦞 ";
29
+ const prefix = "🎱 ";
30
30
  const columns = options.columns ?? process.stdout.columns ?? 120;
31
31
  const plainFullLine = `${title} ${version} (${commitLabel}) — ${tagline}`;
32
32
  const fitsOnOneLine = visibleWidth(plainFullLine) <= columns;
@@ -46,12 +46,12 @@ export function formatCliBannerLine(version, options = {}) {
46
46
  return `${line1}\n${line2}`;
47
47
  }
48
48
  const LOBSTER_ASCII = [
49
- "░████░█░░░░░█████░█░░░█░███░░████░░████░░▀█▀",
50
- "█░░░░░█░░░░░█░░░█░█░█░█░█░░█░█░░░█░█░░░█░░█░",
51
- "█░░░░░█░░░░░█████░█░█░█░█░░█░████░░█░░░█░░█░",
52
- "█░░░░░█░░░░░█░░░█░█░█░█░█░░█░█░░█░░█░░░█░░█░",
53
- "░████░█████░█░░░█░░█░█░░███░░████░░░███░░░█░",
54
- " 🦞 FRESH DAILY 🦞",
49
+ "████░░░███░░░███░░█░░░░████░░░███░░▀█▀",
50
+ "█░░░█░█░░░█░█░░░█░█░░░░█░░░█░█░░░█░░█░",
51
+ "████░░█░░░█░█░░░█░█░░░░████░░█░░░█░░█░",
52
+ "█░░░░░█░░░█░█░░░█░█░░░░█░░░█░█░░░█░░█░",
53
+ "█░░░░░░███░░░███░░█████░████░░░███░░░█░",
54
+ " 🎱 RACK 'EM UP 🎱",
55
55
  ];
56
56
  export function formatCliBannerArt(options = {}) {
57
57
  const rich = options.richTty ?? isRich();
@@ -67,11 +67,11 @@ export function formatCliBannerArt(options = {}) {
67
67
  return theme.muted(ch);
68
68
  };
69
69
  const colored = LOBSTER_ASCII.map((line) => {
70
- if (line.includes("FRESH DAILY")) {
71
- return (theme.muted(" ") +
72
- theme.accent("🦞") +
73
- theme.info(" FRESH DAILY ") +
74
- theme.accent("🦞"));
70
+ if (line.includes("RACK 'EM UP")) {
71
+ return (theme.muted(" ") +
72
+ theme.accent("🎱") +
73
+ theme.info(" RACK 'EM UP ") +
74
+ theme.accent("🎱"));
75
75
  }
76
76
  return splitGraphemes(line).map(colorChar).join("");
77
77
  });
@@ -30,7 +30,7 @@ export function registerBrowserManageCommands(browser, parentOpts) {
30
30
  const detectedPath = status.detectedExecutablePath ?? status.executablePath;
31
31
  const detectedDisplay = detectedPath ? shortenHomePath(detectedPath) : "auto";
32
32
  defaultRuntime.log([
33
- `profile: ${status.profile ?? "clawd"}`,
33
+ `profile: ${status.profile ?? "poolbot"}`,
34
34
  `enabled: ${status.enabled}`,
35
35
  `running: ${status.running}`,
36
36
  `cdpPort: ${status.cdpPort}`,
@@ -64,8 +64,8 @@ export function registerBrowserManageCommands(browser, parentOpts) {
64
64
  defaultRuntime.log(JSON.stringify(status, null, 2));
65
65
  return;
66
66
  }
67
- const name = status.profile ?? "clawd";
68
- defaultRuntime.log(info(`🦞 browser [${name}] running: ${status.running}`));
67
+ const name = status.profile ?? "poolbot";
68
+ defaultRuntime.log(info(`🎱 browser [${name}] running: ${status.running}`));
69
69
  });
70
70
  });
71
71
  browser
@@ -89,8 +89,8 @@ export function registerBrowserManageCommands(browser, parentOpts) {
89
89
  defaultRuntime.log(JSON.stringify(status, null, 2));
90
90
  return;
91
91
  }
92
- const name = status.profile ?? "clawd";
93
- defaultRuntime.log(info(`🦞 browser [${name}] running: ${status.running}`));
92
+ const name = status.profile ?? "poolbot";
93
+ defaultRuntime.log(info(`🎱 browser [${name}] running: ${status.running}`));
94
94
  });
95
95
  });
96
96
  browser
@@ -110,11 +110,11 @@ export function registerBrowserManageCommands(browser, parentOpts) {
110
110
  return;
111
111
  }
112
112
  if (!result.moved) {
113
- defaultRuntime.log(info(`🦞 browser profile already missing.`));
113
+ defaultRuntime.log(info(`🎱 browser profile already missing.`));
114
114
  return;
115
115
  }
116
116
  const dest = result.to ?? result.from;
117
- defaultRuntime.log(info(`🦞 browser profile moved to Trash (${dest})`));
117
+ defaultRuntime.log(info(`🎱 browser profile moved to Trash (${dest})`));
118
118
  });
119
119
  });
120
120
  browser
@@ -374,7 +374,7 @@ export function registerBrowserManageCommands(browser, parentOpts) {
374
374
  return;
375
375
  }
376
376
  const loc = result.isRemote ? ` cdpUrl: ${result.cdpUrl}` : ` port: ${result.cdpPort}`;
377
- defaultRuntime.log(info(`🦞 Created profile "${result.profile}"\n${loc}\n color: ${result.color}${opts.driver === "extension" ? "\n driver: extension" : ""}`));
377
+ defaultRuntime.log(info(`🎱 Created profile "${result.profile}"\n${loc}\n color: ${result.color}${opts.driver === "extension" ? "\n driver: extension" : ""}`));
378
378
  });
379
379
  });
380
380
  browser
@@ -393,8 +393,8 @@ export function registerBrowserManageCommands(browser, parentOpts) {
393
393
  return;
394
394
  }
395
395
  const msg = result.deleted
396
- ? `🦞 Deleted profile "${result.profile}" (user data removed)`
397
- : `🦞 Deleted profile "${result.profile}" (no user data found)`;
396
+ ? `🎱 Deleted profile "${result.profile}" (user data removed)`
397
+ : `🎱 Deleted profile "${result.profile}" (no user data found)`;
398
398
  defaultRuntime.log(info(msg));
399
399
  });
400
400
  });
@@ -16,7 +16,7 @@ import { addGatewayClientOptions } from "./gateway-rpc.js";
16
16
  export function registerBrowserCli(program) {
17
17
  const browser = program
18
18
  .command("browser")
19
- .description("Manage clawd's dedicated browser (Chrome/Chromium)")
19
+ .description("Manage poolbot's dedicated browser (Chrome/Chromium)")
20
20
  .option("--browser-profile <name>", "Browser profile name (default from config)")
21
21
  .option("--json", "Output machine-readable JSON", false)
22
22
  .addHelpText("after", () => `\n${theme.heading("Examples:")}\n${formatHelpExamples([...browserCoreExamples, ...browserActionExamples].map((cmd) => [cmd, ""]), true)}\n\n${theme.muted("Docs:")} ${formatDocsLink("/cli/browser", "docs.molt.bot/cli/browser")}\n`)
@@ -17,7 +17,7 @@ function dedupe(values) {
17
17
  export function resolveCliChannelOptions() {
18
18
  const catalog = listChannelPluginCatalogEntries().map((entry) => entry.id);
19
19
  const base = dedupe([...CHAT_CHANNEL_ORDER, ...catalog]);
20
- if (isTruthyEnvValue(process.env.CLAWDBOT_EAGER_CHANNEL_OPTIONS)) {
20
+ if (isTruthyEnvValue(process.env.POOLBOT_EAGER_CHANNEL_OPTIONS || process.env.CLAWDBOT_EAGER_CHANNEL_OPTIONS)) {
21
21
  ensurePluginRegistryLoaded();
22
22
  const pluginIds = listChannelPlugins().map((plugin) => plugin.id);
23
23
  return dedupe([...base, ...pluginIds]);
@@ -4,7 +4,7 @@ export const LEGACY_CLI_NAME = "poolbot";
4
4
  const KNOWN_CLI_NAMES = new Set([DEFAULT_CLI_NAME, LEGACY_CLI_NAME]);
5
5
  const CLI_PREFIX_RE = /^(?:((?:pnpm|npm|bunx|npx)\s+))?(poolbot|poolbot)\b/;
6
6
  export function resolveCliName(argv = process.argv, env = process.env) {
7
- const override = env.MOLTBOT_CLI_NAME?.trim() || env.CLAWDBOT_CLI_NAME?.trim();
7
+ const override = env.POOLBOT_CLI_NAME?.trim() || env.MOLTBOT_CLI_NAME?.trim() || env.CLAWDBOT_CLI_NAME?.trim();
8
8
  if (override)
9
9
  return override;
10
10
  const argv1 = argv[1];
@@ -6,7 +6,7 @@ const DEV_FLAG_RE = /(?:^|\s)--dev(?:\s|$)/;
6
6
  export function formatCliCommand(command, env = process.env) {
7
7
  const cliName = resolveCliName(undefined, env);
8
8
  const normalizedCommand = replaceCliName(command, cliName);
9
- const profile = normalizeProfileName(env.CLAWDBOT_PROFILE);
9
+ const profile = normalizeProfileName(env.POOLBOT_PROFILE || env.CLAWDBOT_PROFILE);
10
10
  if (!profile)
11
11
  return normalizedCommand;
12
12
  if (!CLI_PREFIX_RE.test(normalizedCommand))
@@ -73,7 +73,7 @@ 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.CLAWDBOT_GATEWAY_TOKEN,
76
+ token: opts.token || cfg.gateway?.auth?.token || process.env.POOLBOT_GATEWAY_TOKEN || process.env.CLAWDBOT_GATEWAY_TOKEN,
77
77
  runtime: runtimeRaw,
78
78
  warn: (message) => {
79
79
  if (json)
@@ -45,6 +45,11 @@ export function pickProbeHostForBind(bindMode, tailnetIPv4, customBindHost) {
45
45
  return "127.0.0.1";
46
46
  }
47
47
  const SAFE_DAEMON_ENV_KEYS = [
48
+ "POOLBOT_STATE_DIR",
49
+ "POOLBOT_CONFIG_PATH",
50
+ "POOLBOT_PROFILE",
51
+ "POOLBOT_GATEWAY_PORT",
52
+ "POOLBOT_NIX_MODE",
48
53
  "MOLTBOT_STATE_DIR",
49
54
  "MOLTBOT_CONFIG_PATH",
50
55
  "CLAWDBOT_PROFILE",
@@ -129,11 +134,11 @@ export function renderRuntimeHints(runtime, env = process.env) {
129
134
  hints.push(`Launchd stderr (if installed): ${logs.stderrPath}`);
130
135
  }
131
136
  else if (process.platform === "linux") {
132
- const unit = resolveGatewaySystemdServiceName(env.CLAWDBOT_PROFILE);
137
+ const unit = resolveGatewaySystemdServiceName(env.POOLBOT_PROFILE ?? env.CLAWDBOT_PROFILE);
133
138
  hints.push(`Logs: journalctl --user -u ${unit}.service -n 200 --no-pager`);
134
139
  }
135
140
  else if (process.platform === "win32") {
136
- const task = resolveGatewayWindowsTaskName(env.CLAWDBOT_PROFILE);
141
+ const task = resolveGatewayWindowsTaskName(env.POOLBOT_PROFILE ?? env.CLAWDBOT_PROFILE);
137
142
  hints.push(`Logs: schtasks /Query /TN "${task}" /V /FO LIST`);
138
143
  }
139
144
  }
@@ -144,7 +149,7 @@ export function renderGatewayServiceStartHints(env = process.env) {
144
149
  formatCliCommand("poolbot gateway install", env),
145
150
  formatCliCommand("poolbot gateway", env),
146
151
  ];
147
- const profile = env.CLAWDBOT_PROFILE;
152
+ const profile = env.POOLBOT_PROFILE ?? env.CLAWDBOT_PROFILE;
148
153
  switch (process.platform) {
149
154
  case "darwin": {
150
155
  const label = resolveGatewayLaunchAgentLabel(profile);
@@ -106,10 +106,10 @@ export async function gatherDaemonStatus(opts) {
106
106
  ? await probeGatewayStatus({
107
107
  url: probeUrl,
108
108
  token: opts.rpc.token ||
109
- mergedDaemonEnv.CLAWDBOT_GATEWAY_TOKEN ||
109
+ mergedDaemonEnv.POOLBOT_GATEWAY_TOKEN || mergedDaemonEnv.CLAWDBOT_GATEWAY_TOKEN ||
110
110
  daemonCfg.gateway?.auth?.token,
111
111
  password: opts.rpc.password ||
112
- mergedDaemonEnv.CLAWDBOT_GATEWAY_PASSWORD ||
112
+ mergedDaemonEnv.POOLBOT_GATEWAY_PASSWORD || mergedDaemonEnv.CLAWDBOT_GATEWAY_PASSWORD ||
113
113
  daemonCfg.gateway?.auth?.password,
114
114
  timeoutMs,
115
115
  json: opts.rpc.json,
@@ -95,7 +95,7 @@ export function printDaemonStatus(status, opts) {
95
95
  }
96
96
  if (status.config.mismatch) {
97
97
  defaultRuntime.error(errorText("Root cause: CLI and service are using different config paths (likely a profile/state-dir mismatch)."));
98
- defaultRuntime.error(errorText(`Fix: rerun \`${formatCliCommand("poolbot gateway install --force")}\` from the same --profile / CLAWDBOT_STATE_DIR you expect.`));
98
+ defaultRuntime.error(errorText(`Fix: rerun \`${formatCliCommand("poolbot gateway install --force")}\` from the same --profile / POOLBOT_STATE_DIR you expect.`));
99
99
  }
100
100
  spacer();
101
101
  }
@@ -176,7 +176,7 @@ export function printDaemonStatus(status, opts) {
176
176
  }
177
177
  if (service.runtime?.cachedLabel) {
178
178
  const env = (service.command?.environment ?? process.env);
179
- const labelValue = resolveGatewayLaunchAgentLabel(env.CLAWDBOT_PROFILE);
179
+ const labelValue = resolveGatewayLaunchAgentLabel(env.POOLBOT_PROFILE || env.CLAWDBOT_PROFILE);
180
180
  defaultRuntime.error(errorText(`LaunchAgent label cached but plist missing. Clear with: launchctl bootout gui/$UID/${labelValue}`));
181
181
  defaultRuntime.error(errorText(`Then reinstall: ${formatCliCommand("poolbot gateway install")}`));
182
182
  spacer();
@@ -203,7 +203,7 @@ export function printDaemonStatus(status, opts) {
203
203
  }
204
204
  if (process.platform === "linux") {
205
205
  const env = (service.command?.environment ?? process.env);
206
- const unit = resolveGatewaySystemdServiceName(env.CLAWDBOT_PROFILE);
206
+ const unit = resolveGatewaySystemdServiceName(env.POOLBOT_PROFILE || env.CLAWDBOT_PROFILE);
207
207
  defaultRuntime.error(errorText(`Logs: journalctl --user -u ${unit}.service -n 200 --no-pager`));
208
208
  }
209
209
  else if (process.platform === "darwin") {
@@ -27,7 +27,7 @@ async function loadDevTemplate(name, fallback) {
27
27
  }
28
28
  const resolveDevWorkspaceDir = (env = process.env) => {
29
29
  const baseDir = resolveDefaultAgentWorkspaceDir(env, os.homedir);
30
- const profile = env.CLAWDBOT_PROFILE?.trim().toLowerCase();
30
+ const profile = (env.POOLBOT_PROFILE || env.CLAWDBOT_PROFILE)?.trim().toLowerCase();
31
31
  if (profile === "dev")
32
32
  return baseDir;
33
33
  return `${baseDir}-${DEV_AGENT_WORKSPACE_SUFFIX}`;
@@ -16,7 +16,7 @@ import { runGatewayLoop } from "./run-loop.js";
16
16
  import { describeUnknownError, extractGatewayMiskeys, maybeExplainGatewayServiceStop, parsePort, toOptionString, } from "./shared.js";
17
17
  const gatewayLog = createSubsystemLogger("gateway");
18
18
  async function runGatewayCommand(opts) {
19
- const isDevProfile = process.env.CLAWDBOT_PROFILE?.trim().toLowerCase() === "dev";
19
+ const isDevProfile = (process.env.POOLBOT_PROFILE || process.env.CLAWDBOT_PROFILE)?.trim().toLowerCase() === "dev";
20
20
  const devMode = Boolean(opts.dev) || isDevProfile;
21
21
  if (opts.reset && !devMode) {
22
22
  defaultRuntime.error("Use --reset with --dev.");
@@ -27,6 +27,7 @@ async function runGatewayCommand(opts) {
27
27
  setVerbose(Boolean(opts.verbose));
28
28
  if (opts.claudeCliLogs) {
29
29
  setConsoleSubsystemFilter(["agent/claude-cli"]);
30
+ process.env.POOLBOT_CLAUDE_CLI_LOG_OUTPUT = "1";
30
31
  process.env.CLAWDBOT_CLAUDE_CLI_LOG_OUTPUT = "1";
31
32
  }
32
33
  const wsLogRaw = (opts.compact ? "compact" : opts.wsLog);
@@ -40,10 +41,12 @@ async function runGatewayCommand(opts) {
40
41
  }
41
42
  setGatewayWsLogStyle(wsLogStyle);
42
43
  if (opts.rawStream) {
44
+ process.env.POOLBOT_RAW_STREAM = "1";
43
45
  process.env.CLAWDBOT_RAW_STREAM = "1";
44
46
  }
45
47
  const rawStreamPath = toOptionString(opts.rawStreamPath);
46
48
  if (rawStreamPath) {
49
+ process.env.POOLBOT_RAW_STREAM_PATH = rawStreamPath;
47
50
  process.env.CLAWDBOT_RAW_STREAM_PATH = rawStreamPath;
48
51
  }
49
52
  if (devMode) {
@@ -90,8 +93,10 @@ async function runGatewayCommand(opts) {
90
93
  }
91
94
  if (opts.token) {
92
95
  const token = toOptionString(opts.token);
93
- if (token)
96
+ if (token) {
97
+ process.env.POOLBOT_GATEWAY_TOKEN = token;
94
98
  process.env.CLAWDBOT_GATEWAY_TOKEN = token;
99
+ }
95
100
  }
96
101
  const authModeRaw = toOptionString(opts.auth);
97
102
  const authMode = authModeRaw === "token" || authModeRaw === "password" ? authModeRaw : null;
@@ -165,7 +170,7 @@ async function runGatewayCommand(opts) {
165
170
  if (resolvedAuthMode === "token" && !hasToken && !resolvedAuth.allowTailscale) {
166
171
  defaultRuntime.error([
167
172
  "Gateway auth is set to token, but no token is configured.",
168
- "Set gateway.auth.token (or CLAWDBOT_GATEWAY_TOKEN), or pass --token.",
173
+ "Set gateway.auth.token (or POOLBOT_GATEWAY_TOKEN), or pass --token.",
169
174
  ...authHints,
170
175
  ]
171
176
  .filter(Boolean)
@@ -176,7 +181,7 @@ async function runGatewayCommand(opts) {
176
181
  if (resolvedAuthMode === "password" && !hasPassword) {
177
182
  defaultRuntime.error([
178
183
  "Gateway auth is set to password, but no password is configured.",
179
- "Set gateway.auth.password (or CLAWDBOT_GATEWAY_PASSWORD), or pass --password.",
184
+ "Set gateway.auth.password (or POOLBOT_GATEWAY_PASSWORD), or pass --password.",
180
185
  ...authHints,
181
186
  ]
182
187
  .filter(Boolean)
@@ -187,7 +192,7 @@ async function runGatewayCommand(opts) {
187
192
  if (bind !== "loopback" && !hasSharedSecret) {
188
193
  defaultRuntime.error([
189
194
  `Refusing to bind gateway to ${bind} without auth.`,
190
- "Set gateway.auth.token/password (or CLAWDBOT_GATEWAY_TOKEN/CLAWDBOT_GATEWAY_PASSWORD) or pass --token/--password.",
195
+ "Set gateway.auth.token/password (or POOLBOT_GATEWAY_TOKEN/POOLBOT_GATEWAY_PASSWORD) or pass --token/--password.",
191
196
  ...authHints,
192
197
  ]
193
198
  .filter(Boolean)
@@ -244,7 +249,7 @@ export function addGatewayRunCommand(cmd) {
244
249
  return cmd
245
250
  .option("--port <port>", "Port for the gateway WebSocket")
246
251
  .option("--bind <mode>", 'Bind mode ("loopback"|"lan"|"tailnet"|"auto"|"custom"). Defaults to config gateway.bind (or loopback).')
247
- .option("--token <token>", "Shared token required in connect.params.auth.token (default: CLAWDBOT_GATEWAY_TOKEN env if set)")
252
+ .option("--token <token>", "Shared token required in connect.params.auth.token (default: POOLBOT_GATEWAY_TOKEN env if set)")
248
253
  .option("--auth <mode>", 'Gateway auth mode ("token"|"password")')
249
254
  .option("--password <password>", "Password for auth mode=password")
250
255
  .option("--tailscale <mode>", 'Tailscale exposure mode ("off"|"serve"|"funnel")')
@@ -60,7 +60,7 @@ export function extractGatewayMiskeys(parsed) {
60
60
  return { hasGatewayToken, hasRemoteToken };
61
61
  }
62
62
  export function renderGatewayServiceStopHints(env = process.env) {
63
- const profile = env.CLAWDBOT_PROFILE;
63
+ const profile = env.POOLBOT_PROFILE || env.CLAWDBOT_PROFILE;
64
64
  switch (process.platform) {
65
65
  case "darwin":
66
66
  return [
@@ -463,7 +463,8 @@ export async function runNodeDaemonStatus(opts = {}) {
463
463
  };
464
464
  const hintEnv = {
465
465
  ...baseEnv,
466
- CLAWDBOT_LOG_PREFIX: baseEnv.CLAWDBOT_LOG_PREFIX ?? "node",
466
+ POOLBOT_LOG_PREFIX: baseEnv.POOLBOT_LOG_PREFIX || baseEnv.CLAWDBOT_LOG_PREFIX || "node",
467
+ CLAWDBOT_LOG_PREFIX: baseEnv.POOLBOT_LOG_PREFIX || baseEnv.CLAWDBOT_LOG_PREFIX || "node",
467
468
  };
468
469
  if (runtime?.missingUnit) {
469
470
  defaultRuntime.error(errorText("Service unit not found."));
@@ -73,14 +73,20 @@ export function applyCliProfileEnv(params) {
73
73
  if (!profile)
74
74
  return;
75
75
  // Convenience only: fill defaults, never override explicit env values.
76
+ env.POOLBOT_PROFILE = profile;
76
77
  env.CLAWDBOT_PROFILE = profile;
77
- const stateDir = env.CLAWDBOT_STATE_DIR?.trim() || resolveProfileStateDir(profile, homedir);
78
+ const stateDir = env.POOLBOT_STATE_DIR?.trim() || env.CLAWDBOT_STATE_DIR?.trim() || resolveProfileStateDir(profile, homedir);
79
+ if (!env.POOLBOT_STATE_DIR?.trim())
80
+ env.POOLBOT_STATE_DIR = stateDir;
78
81
  if (!env.CLAWDBOT_STATE_DIR?.trim())
79
82
  env.CLAWDBOT_STATE_DIR = stateDir;
80
- if (!env.CLAWDBOT_CONFIG_PATH?.trim()) {
81
- env.CLAWDBOT_CONFIG_PATH = path.join(stateDir, "poolbot.json");
83
+ if (!env.POOLBOT_CONFIG_PATH?.trim() && !env.CLAWDBOT_CONFIG_PATH?.trim()) {
84
+ const configPath = path.join(stateDir, "poolbot.json");
85
+ env.POOLBOT_CONFIG_PATH = configPath;
86
+ env.CLAWDBOT_CONFIG_PATH = configPath;
82
87
  }
83
- if (profile === "dev" && !env.CLAWDBOT_GATEWAY_PORT?.trim()) {
88
+ if (profile === "dev" && !env.POOLBOT_GATEWAY_PORT?.trim() && !env.CLAWDBOT_GATEWAY_PORT?.trim()) {
89
+ env.POOLBOT_GATEWAY_PORT = "19001";
84
90
  env.CLAWDBOT_GATEWAY_PORT = "19001";
85
91
  }
86
92
  }