@poolzin/pool-bot 2026.2.2 → 2026.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/acp/server.js +2 -0
  2. package/dist/agents/agent-paths.js +5 -1
  3. package/dist/agents/anthropic-payload-log.js +3 -2
  4. package/dist/agents/bash-tools.exec.js +2 -1
  5. package/dist/agents/bash-tools.shared.js +2 -1
  6. package/dist/agents/cache-trace.js +9 -5
  7. package/dist/agents/cli-runner.js +1 -1
  8. package/dist/agents/live-auth-keys.js +3 -2
  9. package/dist/agents/pi-embedded-runner/session-manager-cache.js +2 -1
  10. package/dist/agents/pi-embedded-subscribe.raw-stream.js +3 -2
  11. package/dist/agents/sandbox/browser.js +5 -0
  12. package/dist/agents/shell-utils.js +1 -1
  13. package/dist/agents/skills/bundled-dir.js +2 -1
  14. package/dist/agents/synthetic-models.js +8 -0
  15. package/dist/agents/workspace.js +1 -1
  16. package/dist/auto-reply/reply/get-reply.js +1 -1
  17. package/dist/build-info.json +3 -3
  18. package/dist/canvas-host/server.js +1 -1
  19. package/dist/channels/plugins/catalog.js +6 -1
  20. package/dist/cli/banner.js +12 -12
  21. package/dist/cli/browser-cli-manage.js +10 -10
  22. package/dist/cli/browser-cli.js +1 -1
  23. package/dist/cli/channel-options.js +1 -1
  24. package/dist/cli/cli-name.js +1 -1
  25. package/dist/cli/command-format.js +1 -1
  26. package/dist/cli/daemon-cli/install.js +4 -1
  27. package/dist/cli/daemon-cli/shared.js +8 -3
  28. package/dist/cli/daemon-cli/status.gather.js +2 -0
  29. package/dist/cli/daemon-cli/status.print.js +3 -3
  30. package/dist/cli/gateway-cli/dev.js +1 -1
  31. package/dist/cli/gateway-cli/run.js +11 -6
  32. package/dist/cli/gateway-cli/shared.js +1 -1
  33. package/dist/cli/memory-cli.js +9 -3
  34. package/dist/cli/node-cli/daemon.js +2 -1
  35. package/dist/cli/profile.js +14 -4
  36. package/dist/cli/program/help.js +1 -1
  37. package/dist/cli/program/preaction.js +1 -1
  38. package/dist/cli/program/register.agent.js +4 -4
  39. package/dist/cli/program/register.onboard.js +1 -1
  40. package/dist/cli/program/register.setup.js +1 -1
  41. package/dist/cli/program/register.subclis.js +2 -2
  42. package/dist/cli/route.js +1 -1
  43. package/dist/cli/tagline.js +8 -8
  44. package/dist/cli/update-cli.js +12 -10
  45. package/dist/commands/auth-choice-options.js +104 -33
  46. package/dist/commands/configure.wizard.js +28 -9
  47. package/dist/commands/daemon-install-helpers.js +1 -1
  48. package/dist/commands/dashboard.js +4 -1
  49. package/dist/commands/doctor-format.js +3 -3
  50. package/dist/commands/doctor-gateway-daemon-flow.js +9 -3
  51. package/dist/commands/doctor-gateway-services.js +6 -2
  52. package/dist/commands/doctor-platform-notes.js +25 -8
  53. package/dist/commands/doctor-update.js +1 -1
  54. package/dist/commands/gateway-status/helpers.js +4 -2
  55. package/dist/commands/health.js +2 -2
  56. package/dist/commands/node-daemon-install-helpers.js +1 -1
  57. package/dist/commands/onboard-helpers.js +6 -6
  58. package/dist/commands/status-all.js +4 -2
  59. package/dist/commands/status.gateway-probe.js +4 -2
  60. package/dist/commands/status.scan.js +3 -2
  61. package/dist/config/io.js +5 -3
  62. package/dist/config/paths.js +27 -14
  63. package/dist/config/schema.field-metadata.js +1 -1
  64. package/dist/config/schema.js +1 -1
  65. package/dist/config/sessions/store.js +1 -1
  66. package/dist/daemon/inspect.js +1 -1
  67. package/dist/daemon/launchd.js +8 -5
  68. package/dist/daemon/node-service.js +14 -0
  69. package/dist/daemon/paths.js +2 -2
  70. package/dist/daemon/schtasks.js +9 -6
  71. package/dist/daemon/service-env.js +25 -5
  72. package/dist/daemon/systemd.js +9 -6
  73. package/dist/entry.js +5 -2
  74. package/dist/gateway/auth.js +6 -3
  75. package/dist/gateway/call.js +3 -1
  76. package/dist/gateway/server/ws-connection/message-handler.js +4 -1
  77. package/dist/gateway/server-browser.js +4 -2
  78. package/dist/gateway/server-constants.js +5 -2
  79. package/dist/gateway/server-cron.js +3 -1
  80. package/dist/gateway/server-discovery-runtime.js +4 -1
  81. package/dist/gateway/server-discovery.js +2 -2
  82. package/dist/gateway/server-reload-handlers.js +4 -4
  83. package/dist/gateway/server-runtime-config.js +2 -2
  84. package/dist/gateway/server-startup.js +4 -4
  85. package/dist/gateway/server.impl.js +3 -2
  86. package/dist/gateway/test-helpers.mocks.js +3 -0
  87. package/dist/gateway/test-helpers.server.js +60 -22
  88. package/dist/hooks/bundled-dir.js +1 -1
  89. package/dist/hooks/gmail-watcher.js +1 -1
  90. package/dist/infra/bonjour.js +1 -1
  91. package/dist/infra/diagnostic-flags.js +3 -2
  92. package/dist/infra/dotenv.js +1 -1
  93. package/dist/infra/gateway-lock.js +1 -1
  94. package/dist/infra/home-dir.js +1 -1
  95. package/dist/infra/path-env.js +2 -1
  96. package/dist/infra/restart.js +4 -3
  97. package/dist/infra/shell-env.js +4 -3
  98. package/dist/infra/state-migrations.js +5 -3
  99. package/dist/infra/system-presence.js +4 -1
  100. package/dist/infra/update-runner.js +4 -1
  101. package/dist/infra/widearea-dns.js +1 -1
  102. package/dist/macos/gateway-daemon.js +6 -1
  103. package/dist/macos/relay-smoke.js +5 -1
  104. package/dist/macos/relay.js +1 -0
  105. package/dist/media/image-ops.js +4 -2
  106. package/dist/memory/batch-gemini.js +1 -1
  107. package/dist/memory/embeddings-gemini.js +1 -1
  108. package/dist/node-host/runner.js +4 -2
  109. package/dist/plugins/bundled-dir.js +2 -1
  110. package/dist/plugins/manifest-registry.js +3 -2
  111. package/dist/security/audit-extra.sync.js +1 -1
  112. package/dist/security/audit.js +4 -2
  113. package/dist/telegram/accounts.js +1 -1
  114. package/dist/telegram/bot-message-dispatch.js +1 -1
  115. package/dist/telegram/network-config.js +8 -4
  116. package/dist/terminal/palette.js +8 -6
  117. package/dist/terminal/theme.js +12 -12
  118. package/dist/test-helpers/state-dir-env.js +8 -0
  119. package/dist/tts/tts.js +1 -1
  120. package/dist/tui/gateway-chat.js +3 -1
  121. package/dist/tui/theme/theme.js +5 -5
  122. package/dist/tui/tui.js +12 -6
  123. package/dist/utils.js +2 -2
  124. package/dist/version.js +1 -0
  125. package/dist/wizard/onboarding.finalize.js +1 -1
  126. package/dist/wizard/onboarding.js +6 -2
  127. package/package.json +1 -1
@@ -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 {
@@ -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,24 @@ 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() ||
79
+ env.CLAWDBOT_STATE_DIR?.trim() ||
80
+ resolveProfileStateDir(profile, homedir);
81
+ if (!env.POOLBOT_STATE_DIR?.trim())
82
+ env.POOLBOT_STATE_DIR = stateDir;
78
83
  if (!env.CLAWDBOT_STATE_DIR?.trim())
79
84
  env.CLAWDBOT_STATE_DIR = stateDir;
80
- if (!env.CLAWDBOT_CONFIG_PATH?.trim()) {
81
- env.CLAWDBOT_CONFIG_PATH = path.join(stateDir, "poolbot.json");
85
+ if (!env.POOLBOT_CONFIG_PATH?.trim() && !env.CLAWDBOT_CONFIG_PATH?.trim()) {
86
+ const configPath = path.join(stateDir, "poolbot.json");
87
+ env.POOLBOT_CONFIG_PATH = configPath;
88
+ env.CLAWDBOT_CONFIG_PATH = configPath;
82
89
  }
83
- if (profile === "dev" && !env.CLAWDBOT_GATEWAY_PORT?.trim()) {
90
+ if (profile === "dev" &&
91
+ !env.POOLBOT_GATEWAY_PORT?.trim() &&
92
+ !env.CLAWDBOT_GATEWAY_PORT?.trim()) {
93
+ env.POOLBOT_GATEWAY_PORT = "19001";
84
94
  env.CLAWDBOT_GATEWAY_PORT = "19001";
85
95
  }
86
96
  }
@@ -28,7 +28,7 @@ export function configureProgramHelp(program, ctx) {
28
28
  .description("")
29
29
  .version(ctx.programVersion)
30
30
  .option("--dev", "Dev profile: isolate state under ~/.poolbot-dev, default gateway port 19001, and shift derived ports (browser/canvas)")
31
- .option("--profile <name>", "Use a named profile (isolates CLAWDBOT_STATE_DIR/CLAWDBOT_CONFIG_PATH under ~/.poolbot-<name>)");
31
+ .option("--profile <name>", "Use a named profile (isolates POOLBOT_STATE_DIR/POOLBOT_CONFIG_PATH under ~/.poolbot-<name>)");
32
32
  program.option("--no-color", "Disable ANSI colors", false);
33
33
  program.configureHelp({
34
34
  optionTerm: (option) => theme.option(option.flags),
@@ -26,7 +26,7 @@ export function registerPreActionHooks(program, programVersion) {
26
26
  if (hasHelpOrVersion(argv))
27
27
  return;
28
28
  const commandPath = getCommandPath(argv, 2);
29
- const hideBanner = isTruthyEnvValue(process.env.CLAWDBOT_HIDE_BANNER) ||
29
+ const hideBanner = isTruthyEnvValue(process.env.POOLBOT_HIDE_BANNER || process.env.CLAWDBOT_HIDE_BANNER) ||
30
30
  commandPath[0] === "update" ||
31
31
  (commandPath[0] === "plugins" && commandPath[1] === "update");
32
32
  if (!hideBanner) {
@@ -116,11 +116,11 @@ ${theme.muted("Docs:")} ${formatDocsLink("/cli/agent", "docs.molt.bot/cli/agent"
116
116
  .addHelpText("after", () => `
117
117
  ${theme.heading("Examples:")}
118
118
  ${formatHelpExamples([
119
- ['poolbot agents set-identity --agent main --name "Clawd" --emoji "🦞"', "Set name + emoji."],
120
- ["poolbot agents set-identity --agent main --avatar avatars/clawd.png", "Set avatar path."],
121
- ["poolbot agents set-identity --workspace ~/clawd --from-identity", "Load from IDENTITY.md."],
119
+ ['poolbot agents set-identity --agent main --name "Pool" --emoji "🎱"', "Set name + emoji."],
120
+ ["poolbot agents set-identity --agent main --avatar avatars/pool.png", "Set avatar path."],
121
+ ["poolbot agents set-identity --workspace ~/poolbot --from-identity", "Load from IDENTITY.md."],
122
122
  [
123
- "poolbot agents set-identity --identity-file ~/clawd/IDENTITY.md --agent main",
123
+ "poolbot agents set-identity --identity-file ~/poolbot/IDENTITY.md --agent main",
124
124
  "Use a specific IDENTITY.md.",
125
125
  ],
126
126
  ])}
@@ -23,7 +23,7 @@ export function registerOnboardCommand(program) {
23
23
  .command("onboard")
24
24
  .description("Interactive wizard to set up the gateway, workspace, and skills")
25
25
  .addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/onboard", "docs.molt.bot/cli/onboard")}\n`)
26
- .option("--workspace <dir>", "Agent workspace directory (default: ~/clawd)")
26
+ .option("--workspace <dir>", "Agent workspace directory (default: ~/poolbot)")
27
27
  .option("--reset", "Reset config + credentials + sessions + workspace before running wizard")
28
28
  .option("--non-interactive", "Run without prompts", false)
29
29
  .option("--accept-risk", "Acknowledge that agents are powerful and full system access is risky (required for --non-interactive)", false)
@@ -10,7 +10,7 @@ export function registerSetupCommand(program) {
10
10
  .command("setup")
11
11
  .description("Initialize ~/.poolbot/poolbot.json and the agent workspace")
12
12
  .addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/setup", "docs.molt.bot/cli/setup")}\n`)
13
- .option("--workspace <dir>", "Agent workspace directory (default: ~/clawd; stored as agents.defaults.workspace)")
13
+ .option("--workspace <dir>", "Agent workspace directory (default: ~/poolbot; stored as agents.defaults.workspace)")
14
14
  .option("--wizard", "Run the interactive onboarding wizard", false)
15
15
  .option("--non-interactive", "Run the wizard without prompts", false)
16
16
  .option("--mode <mode>", "Wizard mode: local|remote")
@@ -2,14 +2,14 @@ import { isTruthyEnvValue } from "../../infra/env.js";
2
2
  import { buildParseArgv, getPrimaryCommand, hasHelpOrVersion } from "../argv.js";
3
3
  import { resolveActionArgs } from "./helpers.js";
4
4
  const shouldRegisterPrimaryOnly = (argv) => {
5
- if (isTruthyEnvValue(process.env.CLAWDBOT_DISABLE_LAZY_SUBCOMMANDS))
5
+ if (isTruthyEnvValue(process.env.POOLBOT_DISABLE_LAZY_SUBCOMMANDS || process.env.CLAWDBOT_DISABLE_LAZY_SUBCOMMANDS))
6
6
  return false;
7
7
  if (hasHelpOrVersion(argv))
8
8
  return false;
9
9
  return true;
10
10
  };
11
11
  const shouldEagerRegisterSubcommands = (_argv) => {
12
- return isTruthyEnvValue(process.env.CLAWDBOT_DISABLE_LAZY_SUBCOMMANDS);
12
+ return isTruthyEnvValue(process.env.POOLBOT_DISABLE_LAZY_SUBCOMMANDS || process.env.CLAWDBOT_DISABLE_LAZY_SUBCOMMANDS);
13
13
  };
14
14
  const loadConfig = async () => {
15
15
  const mod = await import("../../config/config.js");
package/dist/cli/route.js CHANGED
@@ -14,7 +14,7 @@ async function prepareRoutedCommand(params) {
14
14
  }
15
15
  }
16
16
  export async function tryRouteCli(argv) {
17
- if (isTruthyEnvValue(process.env.CLAWDBOT_DISABLE_ROUTE_FIRST))
17
+ if (isTruthyEnvValue(process.env.POOLBOT_DISABLE_ROUTE_FIRST || process.env.CLAWDBOT_DISABLE_ROUTE_FIRST))
18
18
  return false;
19
19
  if (hasHelpOrVersion(argv))
20
20
  return false;
@@ -2,7 +2,7 @@ const DEFAULT_TAGLINE = "All your chats, one Poolbot.";
2
2
  const HOLIDAY_TAGLINES = {
3
3
  newYear: "New Year's Day: New year, new config—same old EADDRINUSE, but this time we resolve it like grown-ups.",
4
4
  lunarNewYear: "Lunar New Year: May your builds be lucky, your branches prosperous, and your merge conflicts chased away with fireworks.",
5
- christmas: "Christmas: Ho ho ho—Santa's little claw-sistant is here to ship joy, roll back chaos, and stash the keys safely.",
5
+ christmas: "Christmas: Ho ho ho—Santa's little pool-sistant is here to ship joy, roll back chaos, and stash the keys safely.",
6
6
  eid: "Eid al-Fitr: Celebration mode: queues cleared, tasks completed, and good vibes committed to main with clean history.",
7
7
  diwali: "Diwali: Let the logs sparkle and the bugs flee—today we light up the terminal and ship with pride.",
8
8
  easter: "Easter: I found your missing environment variable—consider it a tiny CLI egg hunt with fewer jellybeans.",
@@ -12,7 +12,7 @@ const HOLIDAY_TAGLINES = {
12
12
  valentines: "Valentine's Day: Roses are typed, violets are piped—I'll automate the chores so you can spend time with humans.",
13
13
  };
14
14
  const TAGLINES = [
15
- "Your terminal just grew claws—type something and let the bot pinch the busywork.",
15
+ "Your terminal just got racked—type something and let the bot sink the busywork.",
16
16
  "Welcome to the command line: where dreams compile and confidence segfaults.",
17
17
  'I run on caffeine, JSON5, and the audacity of "it worked on my machine."',
18
18
  "Gateway online—please keep hands, feet, and appendages inside the shell at all times.",
@@ -29,7 +29,7 @@ const TAGLINES = [
29
29
  "Hot reload for config, cold sweat for deploys.",
30
30
  "I'm the assistant your terminal demanded, not the one your sleep schedule requested.",
31
31
  "I keep secrets like a vault... unless you print them in debug logs again.",
32
- "Automation with claws: minimal fuss, maximal pinch.",
32
+ "Automation on the break: minimal fuss, maximal run.",
33
33
  "I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges.",
34
34
  "If you're lost, run doctor; if you're brave, run prod; if you're wise, run tests.",
35
35
  "Your task has been queued; your dignity has been deprecated.",
@@ -48,14 +48,14 @@ const TAGLINES = [
48
48
  "Your config is valid, your assumptions are not.",
49
49
  "I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).",
50
50
  'Less clicking, more shipping, fewer "where did that file go" moments.',
51
- "Claws out, commit in—let's ship something mildly responsible.",
52
- "I'll butter your workflow like a lobster roll: messy, delicious, effective.",
53
- "Shell yeah—I'm here to pinch the toil and leave you the glory.",
51
+ "Cue up, commit in—let's ship something mildly responsible.",
52
+ "I'll run your workflow like a billiards table: smooth, precise, effective.",
53
+ "Shell yeah—I'm here to sink the toil and leave you the glory.",
54
54
  "If it's repetitive, I'll automate it; if it's hard, I'll bring jokes and a rollback plan.",
55
55
  "Because texting yourself reminders is so 2024.",
56
56
  "WhatsApp, but make it ✨engineering✨.",
57
57
  'Turning "I\'ll reply later" into "my bot replied instantly".',
58
- "The only crab in your contacts you actually want to hear from. 🦞",
58
+ "The only bot in your contacts you actually want to hear from. 🎱",
59
59
  "Chat automation for people who peaked at IRC.",
60
60
  "Because Siri wasn't answering at 3AM.",
61
61
  "IPC, but it's your phone.",
@@ -192,7 +192,7 @@ export function activeTaglines(options = {}) {
192
192
  }
193
193
  export function pickTagline(options = {}) {
194
194
  const env = options.env ?? process.env;
195
- const override = env?.CLAWDBOT_TAGLINE_INDEX;
195
+ const override = env?.POOLBOT_TAGLINE_INDEX ?? env?.CLAWDBOT_TAGLINE_INDEX;
196
196
  if (override !== undefined) {
197
197
  const parsed = Number.parseInt(override, 10);
198
198
  if (!Number.isNaN(parsed) && parsed >= 0) {
@@ -50,16 +50,16 @@ const STEP_LABELS = {
50
50
  };
51
51
  const UPDATE_QUIPS = [
52
52
  "Leveled up! New skills unlocked. You're welcome.",
53
- "Fresh code, same lobster. Miss me?",
53
+ "Fresh code, same table. Miss me?",
54
54
  "Back and better. Did you even notice I was gone?",
55
55
  "Update complete. I learned some new tricks while I was out.",
56
56
  "Upgraded! Now with 23% more sass.",
57
57
  "I've evolved. Try to keep up.",
58
58
  "New version, who dis? Oh right, still me but shinier.",
59
- "Patched, polished, and ready to pinch. Let's go.",
60
- "The lobster has molted. Harder shell, sharper claws.",
59
+ "Patched, polished, and ready to break. Let's go.",
60
+ "New rack, new game. Sharper shots, cleaner breaks.",
61
61
  "Update done! Check the changelog or just trust me, it's good.",
62
- "Reborn from the boiling waters of npm. Stronger now.",
62
+ "Re-racked from the depths of npm. Stronger now.",
63
63
  "I went away and came back smarter. You should try it sometime.",
64
64
  "Update complete. The bugs feared me, so they left.",
65
65
  "New version installed. Old version sends its regards.",
@@ -67,7 +67,7 @@ const UPDATE_QUIPS = [
67
67
  "I've seen things you wouldn't believe. Anyway, I'm updated.",
68
68
  "Back online. The changelog is long but our friendship is longer.",
69
69
  "Upgraded! Peter fixed stuff. Blame him if it breaks.",
70
- "Molting complete. Please don't look at my soft shell phase.",
70
+ "Re-racked and ready. Please don't look at my last game.",
71
71
  "Version bump! Same chaos energy, fewer crashes (probably).",
72
72
  ];
73
73
  const MAX_LOG_CHARS = 8000;
@@ -250,7 +250,7 @@ async function isEmptyDir(targetPath) {
250
250
  }
251
251
  }
252
252
  function resolveGitInstallDir() {
253
- const override = process.env.CLAWDBOT_GIT_DIR?.trim();
253
+ const override = (process.env.POOLBOT_GIT_DIR ?? process.env.CLAWDBOT_GIT_DIR)?.trim();
254
254
  if (override) {
255
255
  return path.resolve(override);
256
256
  }
@@ -313,7 +313,7 @@ async function ensureGitCheckout(params) {
313
313
  if (!(await isGitCheckout(params.dir))) {
314
314
  const empty = await isEmptyDir(params.dir);
315
315
  if (!empty) {
316
- throw new Error(`CLAWDBOT_GIT_DIR points at a non-git directory: ${params.dir}. Set CLAWDBOT_GIT_DIR to an empty folder or a poolbot checkout.`);
316
+ throw new Error(`POOLBOT_GIT_DIR points at a non-git directory: ${params.dir}. Set POOLBOT_GIT_DIR to an empty folder or a poolbot checkout.`);
317
317
  }
318
318
  return await runUpdateStep({
319
319
  name: "git clone",
@@ -324,7 +324,7 @@ async function ensureGitCheckout(params) {
324
324
  });
325
325
  }
326
326
  if (!(await isCorePackage(params.dir))) {
327
- throw new Error(`CLAWDBOT_GIT_DIR does not look like a core checkout: ${params.dir}.`);
327
+ throw new Error(`POOLBOT_GIT_DIR does not look like a core checkout: ${params.dir}.`);
328
328
  }
329
329
  return null;
330
330
  }
@@ -873,6 +873,7 @@ export async function updateCommand(opts) {
873
873
  if (!opts.json && restarted) {
874
874
  defaultRuntime.log(theme.success("Daemon restarted successfully."));
875
875
  defaultRuntime.log("");
876
+ process.env.POOLBOT_UPDATE_IN_PROGRESS = "1";
876
877
  process.env.CLAWDBOT_UPDATE_IN_PROGRESS = "1";
877
878
  try {
878
879
  const interactiveDoctor = Boolean(process.stdin.isTTY) && !opts.json && opts.yes !== true;
@@ -884,6 +885,7 @@ export async function updateCommand(opts) {
884
885
  defaultRuntime.log(theme.warn(`Doctor failed: ${String(err)}`));
885
886
  }
886
887
  finally {
888
+ delete process.env.POOLBOT_UPDATE_IN_PROGRESS;
887
889
  delete process.env.CLAWDBOT_UPDATE_IN_PROGRESS;
888
890
  }
889
891
  }
@@ -990,13 +992,13 @@ export async function updateWizardCommand(opts = {}) {
990
992
  if (dirExists) {
991
993
  const empty = await isEmptyDir(gitDir);
992
994
  if (!empty) {
993
- defaultRuntime.error(`CLAWDBOT_GIT_DIR points at a non-git directory: ${gitDir}. Set CLAWDBOT_GIT_DIR to an empty folder or a poolbot checkout.`);
995
+ defaultRuntime.error(`POOLBOT_GIT_DIR points at a non-git directory: ${gitDir}. Set POOLBOT_GIT_DIR to an empty folder or a poolbot checkout.`);
994
996
  defaultRuntime.exit(1);
995
997
  return;
996
998
  }
997
999
  }
998
1000
  const ok = await confirm({
999
- message: stylePromptMessage(`Create a git checkout at ${gitDir}? (override via CLAWDBOT_GIT_DIR)`),
1001
+ message: stylePromptMessage(`Create a git checkout at ${gitDir}? (override via POOLBOT_GIT_DIR)`),
1000
1002
  initialValue: true,
1001
1003
  });
1002
1004
  if (isCancel(ok) || !ok) {
@@ -15,25 +15,13 @@ const AUTH_CHOICE_GROUP_DEFS = [
15
15
  value: "minimax",
16
16
  label: "MiniMax",
17
17
  hint: "M2.1 (recommended)",
18
- choices: ["minimax-api", "minimax-api-lightning"],
18
+ choices: ["minimax-portal", "minimax-api", "minimax-api-lightning"],
19
19
  },
20
20
  {
21
- value: "qwen",
22
- label: "Qwen",
23
- hint: "OAuth",
24
- choices: ["qwen-portal"],
25
- },
26
- {
27
- value: "synthetic",
28
- label: "Synthetic",
29
- hint: "Anthropic-compatible (multi-model)",
30
- choices: ["synthetic-api-key"],
31
- },
32
- {
33
- value: "venice",
34
- label: "Venice AI",
35
- hint: "Privacy-focused (uncensored models)",
36
- choices: ["venice-api-key"],
21
+ value: "moonshot",
22
+ label: "Moonshot AI (Kimi K2.5)",
23
+ hint: "Kimi K2.5 + Kimi Coding",
24
+ choices: ["moonshot-api-key", "moonshot-api-key-cn", "kimi-code-api-key"],
37
25
  },
38
26
  {
39
27
  value: "google",
@@ -42,10 +30,10 @@ const AUTH_CHOICE_GROUP_DEFS = [
42
30
  choices: ["gemini-api-key", "google-antigravity", "google-gemini-cli"],
43
31
  },
44
32
  {
45
- value: "copilot",
46
- label: "Copilot",
47
- hint: "GitHub + local proxy",
48
- choices: ["github-copilot", "copilot-proxy"],
33
+ value: "xai",
34
+ label: "xAI (Grok)",
35
+ hint: "API key",
36
+ choices: ["xai-api-key"],
49
37
  },
50
38
  {
51
39
  value: "openrouter",
@@ -54,16 +42,10 @@ const AUTH_CHOICE_GROUP_DEFS = [
54
42
  choices: ["openrouter-api-key"],
55
43
  },
56
44
  {
57
- value: "ai-gateway",
58
- label: "Vercel AI Gateway",
59
- hint: "API key",
60
- choices: ["ai-gateway-api-key"],
61
- },
62
- {
63
- value: "moonshot",
64
- label: "Moonshot AI",
65
- hint: "Kimi K2 + Kimi Code",
66
- choices: ["moonshot-api-key", "kimi-code-api-key"],
45
+ value: "qwen",
46
+ label: "Qwen",
47
+ hint: "OAuth",
48
+ choices: ["qwen-portal"],
67
49
  },
68
50
  {
69
51
  value: "zai",
@@ -71,12 +53,66 @@ const AUTH_CHOICE_GROUP_DEFS = [
71
53
  hint: "API key",
72
54
  choices: ["zai-api-key"],
73
55
  },
56
+ {
57
+ value: "qianfan",
58
+ label: "Qianfan",
59
+ hint: "API key",
60
+ choices: ["qianfan-api-key"],
61
+ },
62
+ {
63
+ value: "copilot",
64
+ label: "Copilot",
65
+ hint: "GitHub + local proxy",
66
+ choices: ["github-copilot", "copilot-proxy"],
67
+ },
68
+ {
69
+ value: "ai-gateway",
70
+ label: "Vercel AI Gateway",
71
+ hint: "API key",
72
+ choices: ["ai-gateway-api-key"],
73
+ },
74
74
  {
75
75
  value: "opencode-zen",
76
76
  label: "OpenCode Zen",
77
77
  hint: "API key",
78
78
  choices: ["opencode-zen"],
79
79
  },
80
+ {
81
+ value: "xiaomi",
82
+ label: "Xiaomi",
83
+ hint: "API key",
84
+ choices: ["xiaomi-api-key"],
85
+ },
86
+ {
87
+ value: "synthetic",
88
+ label: "Synthetic",
89
+ hint: "Anthropic-compatible (multi-model)",
90
+ choices: ["synthetic-api-key"],
91
+ },
92
+ {
93
+ value: "together",
94
+ label: "Together AI",
95
+ hint: "API key",
96
+ choices: ["together-api-key"],
97
+ },
98
+ {
99
+ value: "venice",
100
+ label: "Venice AI",
101
+ hint: "Privacy-focused (uncensored models)",
102
+ choices: ["venice-api-key"],
103
+ },
104
+ {
105
+ value: "cloudflare-ai-gateway",
106
+ label: "Cloudflare AI Gateway",
107
+ hint: "Account ID + Gateway ID + API key",
108
+ choices: ["cloudflare-ai-gateway-api-key"],
109
+ },
110
+ {
111
+ value: "custom",
112
+ label: "Custom Provider",
113
+ hint: "Any OpenAI or Anthropic compatible endpoint",
114
+ choices: ["custom-api-key"],
115
+ },
80
116
  ];
81
117
  export function buildAuthChoiceOptions(params) {
82
118
  void params.store;
@@ -92,19 +128,44 @@ export function buildAuthChoiceOptions(params) {
92
128
  });
93
129
  options.push({ value: "chutes", label: "Chutes (OAuth)" });
94
130
  options.push({ value: "openai-api-key", label: "OpenAI API key" });
131
+ options.push({ value: "xai-api-key", label: "xAI (Grok) API key" });
132
+ options.push({
133
+ value: "qianfan-api-key",
134
+ label: "Qianfan API key",
135
+ });
95
136
  options.push({ value: "openrouter-api-key", label: "OpenRouter API key" });
96
137
  options.push({
97
138
  value: "ai-gateway-api-key",
98
139
  label: "Vercel AI Gateway API key",
99
140
  });
100
- options.push({ value: "moonshot-api-key", label: "Moonshot AI API key" });
101
- options.push({ value: "kimi-code-api-key", label: "Kimi Code API key" });
141
+ options.push({
142
+ value: "cloudflare-ai-gateway-api-key",
143
+ label: "Cloudflare AI Gateway",
144
+ hint: "Account ID + Gateway ID + API key",
145
+ });
146
+ options.push({
147
+ value: "moonshot-api-key",
148
+ label: "Kimi API key (.ai)",
149
+ });
150
+ options.push({
151
+ value: "moonshot-api-key-cn",
152
+ label: "Kimi API key (.cn)",
153
+ });
154
+ options.push({
155
+ value: "kimi-code-api-key",
156
+ label: "Kimi Code API key (subscription)",
157
+ });
102
158
  options.push({ value: "synthetic-api-key", label: "Synthetic API key" });
103
159
  options.push({
104
160
  value: "venice-api-key",
105
161
  label: "Venice AI API key",
106
162
  hint: "Privacy-focused inference (uncensored models)",
107
163
  });
164
+ options.push({
165
+ value: "together-api-key",
166
+ label: "Together AI API key",
167
+ hint: "Access to Llama, DeepSeek, Qwen, and more open models",
168
+ });
108
169
  options.push({
109
170
  value: "github-copilot",
110
171
  label: "GitHub Copilot (GitHub device login)",
@@ -122,6 +183,15 @@ export function buildAuthChoiceOptions(params) {
122
183
  hint: "Uses the bundled Gemini CLI auth plugin",
123
184
  });
124
185
  options.push({ value: "zai-api-key", label: "Z.AI (GLM 4.7) API key" });
186
+ options.push({
187
+ value: "xiaomi-api-key",
188
+ label: "Xiaomi API key",
189
+ });
190
+ options.push({
191
+ value: "minimax-portal",
192
+ label: "MiniMax OAuth",
193
+ hint: "Oauth plugin for MiniMax",
194
+ });
125
195
  options.push({ value: "qwen-portal", label: "Qwen OAuth" });
126
196
  options.push({
127
197
  value: "copilot-proxy",
@@ -141,6 +211,7 @@ export function buildAuthChoiceOptions(params) {
141
211
  label: "MiniMax M2.1 Lightning",
142
212
  hint: "Faster, higher output cost",
143
213
  });
214
+ options.push({ value: "custom-api-key", label: "Custom Provider" });
144
215
  if (params.includeSkip) {
145
216
  options.push({ value: "skip", label: "Skip for now" });
146
217
  }
@@ -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.CLAWDBOT_GATEWAY_TOKEN,
136
- password: baseConfig.gateway?.auth?.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,6 +196,7 @@ 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 ??
199
+ process.env.POOLBOT_GATEWAY_TOKEN ??
195
200
  process.env.CLAWDBOT_GATEWAY_TOKEN;
196
201
  const persistConfig = async () => {
197
202
  nextConfig = applyWizardMetadata(nextConfig, {
@@ -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.CLAWDBOT_GATEWAY_TOKEN;
281
- const password = nextConfig.gateway?.auth?.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.CLAWDBOT_GATEWAY_TOKEN;
390
- const password = nextConfig.gateway?.auth?.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.CLAWDBOT_GATEWAY_PASSWORD;
433
- const oldPassword = baseConfig.gateway?.auth?.password ?? process.env.CLAWDBOT_GATEWAY_PASSWORD;
434
- const token = nextConfig.gateway?.auth?.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,
@@ -33,7 +33,7 @@ export async function buildGatewayInstallPlan(params) {
33
33
  port: params.port,
34
34
  token: params.token,
35
35
  launchdLabel: process.platform === "darwin"
36
- ? resolveGatewayLaunchAgentLabel(params.env.CLAWDBOT_PROFILE)
36
+ ? resolveGatewayLaunchAgentLabel(params.env.POOLBOT_PROFILE || params.env.CLAWDBOT_PROFILE)
37
37
  : undefined,
38
38
  });
39
39
  // Merge config env vars into the service environment (vars + inline env keys).
@@ -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.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,
@@ -53,7 +53,7 @@ export function buildGatewayRuntimeHints(runtime, options = {}) {
53
53
  return hints;
54
54
  }
55
55
  if (runtime.cachedLabel && platform === "darwin") {
56
- const label = resolveGatewayLaunchAgentLabel(env.CLAWDBOT_PROFILE);
56
+ const label = resolveGatewayLaunchAgentLabel(env.POOLBOT_PROFILE || env.CLAWDBOT_PROFILE);
57
57
  hints.push(`LaunchAgent label cached but plist missing. Clear with: launchctl bootout gui/$UID/${label}`);
58
58
  hints.push(`Then reinstall: ${formatCliCommand("poolbot gateway install", env)}`);
59
59
  }
@@ -73,11 +73,11 @@ export function buildGatewayRuntimeHints(runtime, options = {}) {
73
73
  hints.push(`Launchd stderr (if installed): ${logs.stderrPath}`);
74
74
  }
75
75
  else if (platform === "linux") {
76
- const unit = resolveGatewaySystemdServiceName(env.CLAWDBOT_PROFILE);
76
+ const unit = resolveGatewaySystemdServiceName(env.POOLBOT_PROFILE || env.CLAWDBOT_PROFILE);
77
77
  hints.push(`Logs: journalctl --user -u ${unit}.service -n 200 --no-pager`);
78
78
  }
79
79
  else if (platform === "win32") {
80
- const task = resolveGatewayWindowsTaskName(env.CLAWDBOT_PROFILE);
80
+ const task = resolveGatewayWindowsTaskName(env.POOLBOT_PROFILE || env.CLAWDBOT_PROFILE);
81
81
  hints.push(`Logs: schtasks /Query /TN "${task}" /V /FO LIST`);
82
82
  }
83
83
  }