@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.
- package/dist/acp/server.js +2 -0
- package/dist/agents/agent-paths.js +3 -1
- package/dist/agents/anthropic-payload-log.js +2 -2
- package/dist/agents/bash-tools.exec.js +1 -1
- package/dist/agents/bash-tools.shared.js +2 -1
- package/dist/agents/cache-trace.js +5 -5
- package/dist/agents/cli-runner.js +1 -1
- package/dist/agents/live-auth-keys.js +2 -2
- package/dist/agents/pi-embedded-runner/session-manager-cache.js +1 -1
- package/dist/agents/pi-embedded-subscribe.raw-stream.js +2 -2
- package/dist/agents/sandbox/browser.js +5 -0
- package/dist/agents/shell-utils.js +1 -1
- package/dist/agents/skills/bundled-dir.js +1 -1
- package/dist/agents/synthetic-models.js +8 -0
- package/dist/agents/workspace.js +1 -1
- package/dist/auto-reply/reply/get-reply.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/canvas-host/server.js +1 -1
- package/dist/channels/plugins/catalog.js +1 -1
- package/dist/cli/banner.js +12 -12
- package/dist/cli/browser-cli-manage.js +10 -10
- package/dist/cli/browser-cli.js +1 -1
- package/dist/cli/channel-options.js +1 -1
- package/dist/cli/cli-name.js +1 -1
- package/dist/cli/command-format.js +1 -1
- package/dist/cli/daemon-cli/install.js +1 -1
- package/dist/cli/daemon-cli/shared.js +8 -3
- package/dist/cli/daemon-cli/status.gather.js +2 -2
- package/dist/cli/daemon-cli/status.print.js +3 -3
- package/dist/cli/gateway-cli/dev.js +1 -1
- package/dist/cli/gateway-cli/run.js +11 -6
- package/dist/cli/gateway-cli/shared.js +1 -1
- package/dist/cli/node-cli/daemon.js +2 -1
- package/dist/cli/profile.js +10 -4
- package/dist/cli/program/help.js +1 -1
- package/dist/cli/program/preaction.js +1 -1
- package/dist/cli/program/register.agent.js +4 -4
- package/dist/cli/program/register.onboard.js +1 -1
- package/dist/cli/program/register.setup.js +1 -1
- package/dist/cli/program/register.subclis.js +2 -2
- package/dist/cli/route.js +1 -1
- package/dist/cli/tagline.js +8 -8
- package/dist/cli/update-cli.js +12 -10
- package/dist/commands/auth-choice-options.js +104 -33
- package/dist/commands/configure.wizard.js +10 -10
- package/dist/commands/daemon-install-helpers.js +1 -1
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/doctor-format.js +3 -3
- package/dist/commands/doctor-gateway-daemon-flow.js +3 -3
- package/dist/commands/doctor-gateway-services.js +2 -2
- package/dist/commands/doctor-platform-notes.js +23 -8
- package/dist/commands/doctor-update.js +1 -1
- package/dist/commands/gateway-status/helpers.js +2 -2
- package/dist/commands/health.js +2 -2
- package/dist/commands/node-daemon-install-helpers.js +1 -1
- package/dist/commands/onboard-helpers.js +6 -6
- package/dist/commands/status-all.js +2 -2
- package/dist/commands/status.gateway-probe.js +2 -2
- package/dist/commands/status.scan.js +2 -2
- package/dist/config/io.js +5 -3
- package/dist/config/paths.js +15 -14
- package/dist/config/schema.field-metadata.js +1 -1
- package/dist/config/schema.js +1 -1
- package/dist/config/sessions/store.js +1 -1
- package/dist/daemon/inspect.js +1 -1
- package/dist/daemon/launchd.js +5 -5
- package/dist/daemon/node-service.js +14 -0
- package/dist/daemon/paths.js +2 -2
- package/dist/daemon/schtasks.js +6 -6
- package/dist/daemon/service-env.js +25 -5
- package/dist/daemon/systemd.js +6 -6
- package/dist/entry.js +3 -2
- package/dist/gateway/auth.js +3 -3
- package/dist/gateway/call.js +2 -2
- package/dist/gateway/server/ws-connection/message-handler.js +1 -1
- package/dist/gateway/server-browser.js +2 -2
- package/dist/gateway/server-constants.js +2 -2
- package/dist/gateway/server-cron.js +1 -1
- package/dist/gateway/server-discovery-runtime.js +2 -2
- package/dist/gateway/server-discovery.js +2 -2
- package/dist/gateway/server-reload-handlers.js +4 -4
- package/dist/gateway/server-runtime-config.js +2 -2
- package/dist/gateway/server-startup.js +4 -4
- package/dist/gateway/server.impl.js +3 -2
- package/dist/gateway/test-helpers.mocks.js +3 -0
- package/dist/gateway/test-helpers.server.js +60 -22
- package/dist/hooks/bundled-dir.js +1 -1
- package/dist/hooks/gmail-watcher.js +1 -1
- package/dist/infra/bonjour.js +1 -1
- package/dist/infra/diagnostic-flags.js +3 -2
- package/dist/infra/dotenv.js +1 -1
- package/dist/infra/gateway-lock.js +1 -1
- package/dist/infra/home-dir.js +1 -1
- package/dist/infra/path-env.js +2 -1
- package/dist/infra/restart.js +3 -3
- package/dist/infra/shell-env.js +3 -3
- package/dist/infra/state-migrations.js +3 -3
- package/dist/infra/system-presence.js +1 -1
- package/dist/infra/update-runner.js +1 -1
- package/dist/infra/widearea-dns.js +1 -1
- package/dist/macos/gateway-daemon.js +6 -4
- package/dist/macos/relay-smoke.js +1 -1
- package/dist/macos/relay.js +1 -1
- package/dist/media/image-ops.js +2 -2
- package/dist/memory/batch-gemini.js +1 -1
- package/dist/memory/embeddings-gemini.js +1 -1
- package/dist/node-host/runner.js +3 -2
- package/dist/plugins/bundled-dir.js +1 -1
- package/dist/plugins/manifest-registry.js +2 -2
- package/dist/security/audit-extra.sync.js +1 -1
- package/dist/security/audit.js +3 -2
- package/dist/telegram/accounts.js +1 -1
- package/dist/telegram/network-config.js +6 -4
- package/dist/test-helpers/state-dir-env.js +8 -0
- package/dist/tts/tts.js +1 -1
- package/dist/tui/gateway-chat.js +2 -1
- package/dist/utils.js +2 -2
- package/dist/version.js +1 -1
- package/dist/wizard/onboarding.finalize.js +1 -1
- package/dist/wizard/onboarding.js +2 -2
- package/package.json +1 -1
package/dist/cli/program/help.js
CHANGED
|
@@ -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
|
|
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 "
|
|
120
|
-
["poolbot agents set-identity --agent main --avatar avatars/
|
|
121
|
-
["poolbot agents set-identity --workspace ~/
|
|
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 ~/
|
|
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: ~/
|
|
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: ~/
|
|
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;
|
package/dist/cli/tagline.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
-
"
|
|
52
|
-
"I'll
|
|
53
|
-
"Shell yeah—I'm here to
|
|
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
|
|
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) {
|
package/dist/cli/update-cli.js
CHANGED
|
@@ -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
|
|
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
|
|
60
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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
|
|
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: "
|
|
22
|
-
label: "
|
|
23
|
-
hint: "
|
|
24
|
-
choices: ["
|
|
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: "
|
|
46
|
-
label: "
|
|
47
|
-
hint: "
|
|
48
|
-
choices: ["
|
|
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: "
|
|
58
|
-
label: "
|
|
59
|
-
hint: "
|
|
60
|
-
choices: ["
|
|
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({
|
|
101
|
-
|
|
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,8 @@ 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 ?? 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,
|
|
137
137
|
});
|
|
138
138
|
const remoteUrl = baseConfig.gateway?.remote?.url?.trim() ?? "";
|
|
139
139
|
const remoteProbe = remoteUrl
|
|
@@ -192,7 +192,7 @@ export async function runConfigureWizard(opts, runtime = defaultRuntime) {
|
|
|
192
192
|
let gatewayPort = resolveGatewayPort(baseConfig);
|
|
193
193
|
let gatewayToken = nextConfig.gateway?.auth?.token ??
|
|
194
194
|
baseConfig.gateway?.auth?.token ??
|
|
195
|
-
process.env.CLAWDBOT_GATEWAY_TOKEN;
|
|
195
|
+
process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN;
|
|
196
196
|
const persistConfig = async () => {
|
|
197
197
|
nextConfig = applyWizardMetadata(nextConfig, {
|
|
198
198
|
command: opts.command,
|
|
@@ -277,8 +277,8 @@ export async function runConfigureWizard(opts, runtime = defaultRuntime) {
|
|
|
277
277
|
});
|
|
278
278
|
const remoteUrl = nextConfig.gateway?.remote?.url?.trim();
|
|
279
279
|
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;
|
|
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;
|
|
282
282
|
await waitForGatewayReachable({
|
|
283
283
|
url: wsUrl,
|
|
284
284
|
token,
|
|
@@ -386,8 +386,8 @@ export async function runConfigureWizard(opts, runtime = defaultRuntime) {
|
|
|
386
386
|
});
|
|
387
387
|
const remoteUrl = nextConfig.gateway?.remote?.url?.trim();
|
|
388
388
|
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;
|
|
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;
|
|
391
391
|
await waitForGatewayReachable({
|
|
392
392
|
url: wsUrl,
|
|
393
393
|
token,
|
|
@@ -429,9 +429,9 @@ export async function runConfigureWizard(opts, runtime = defaultRuntime) {
|
|
|
429
429
|
basePath: nextConfig.gateway?.controlUi?.basePath,
|
|
430
430
|
});
|
|
431
431
|
// 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;
|
|
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;
|
|
435
435
|
let gatewayProbe = await probeGatewayReachable({
|
|
436
436
|
url: links.wsUrl,
|
|
437
437
|
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,7 @@ 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 ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN ?? "";
|
|
13
13
|
const links = resolveControlUiLinks({
|
|
14
14
|
port,
|
|
15
15
|
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
|
}
|
|
@@ -72,7 +72,7 @@ export async function maybeRepairGatewayDaemon(params) {
|
|
|
72
72
|
prompter: params.prompter,
|
|
73
73
|
});
|
|
74
74
|
await maybeRepairLaunchAgentBootstrap({
|
|
75
|
-
env: { ...process.env, CLAWDBOT_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel() },
|
|
75
|
+
env: { ...process.env, POOLBOT_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel(), CLAWDBOT_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel() },
|
|
76
76
|
title: "Node",
|
|
77
77
|
runtime: params.runtime,
|
|
78
78
|
prompter: params.prompter,
|
|
@@ -121,7 +121,7 @@ export async function maybeRepairGatewayDaemon(params) {
|
|
|
121
121
|
const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
|
|
122
122
|
env: process.env,
|
|
123
123
|
port,
|
|
124
|
-
token: params.cfg.gateway?.auth?.token ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
|
|
124
|
+
token: params.cfg.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
|
|
125
125
|
runtime: daemonRuntime,
|
|
126
126
|
warn: (message, title) => note(message, title),
|
|
127
127
|
config: params.cfg,
|
|
@@ -169,7 +169,7 @@ export async function maybeRepairGatewayDaemon(params) {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
if (process.platform === "darwin") {
|
|
172
|
-
const label = resolveGatewayLaunchAgentLabel(process.env.CLAWDBOT_PROFILE);
|
|
172
|
+
const label = resolveGatewayLaunchAgentLabel(process.env.POOLBOT_PROFILE || process.env.CLAWDBOT_PROFILE);
|
|
173
173
|
note(`LaunchAgent loaded; stopping requires "${formatCliCommand("poolbot gateway stop")}" or launchctl bootout gui/$UID/${label}.`, "Gateway");
|
|
174
174
|
}
|
|
175
175
|
if (serviceRuntime?.status === "running") {
|
|
@@ -80,7 +80,7 @@ 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.CLAWDBOT_GATEWAY_TOKEN,
|
|
83
|
+
token: cfg.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
|
|
84
84
|
runtime: daemonRuntime,
|
|
85
85
|
warn: (message, title) => note(message, title),
|
|
86
86
|
config: cfg,
|
|
@@ -138,7 +138,7 @@ export async function maybeRepairGatewayServiceConfig(cfg, mode, runtime, prompt
|
|
|
138
138
|
const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
|
|
139
139
|
env: process.env,
|
|
140
140
|
port,
|
|
141
|
-
token: cfg.gateway?.auth?.token ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
|
|
141
|
+
token: cfg.gateway?.auth?.token ?? process.env.POOLBOT_GATEWAY_TOKEN ?? process.env.CLAWDBOT_GATEWAY_TOKEN,
|
|
142
142
|
runtime: needsNodeRuntime && systemNodePath ? "node" : runtimeChoice,
|
|
143
143
|
nodePath: systemNodePath ?? undefined,
|
|
144
144
|
warn: (message, title) => note(message, title),
|
|
@@ -48,19 +48,34 @@ export async function noteMacLaunchctlGatewayEnvOverrides(cfg, deps) {
|
|
|
48
48
|
if (!hasConfigGatewayCreds(cfg))
|
|
49
49
|
return;
|
|
50
50
|
const getenv = deps?.getenv ?? launchctlGetenv;
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
|
|
51
|
+
// Check both POOLBOT_ (preferred) and CLAWDBOT_ (legacy) launchctl env vars
|
|
52
|
+
const poolbotToken = await getenv("POOLBOT_GATEWAY_TOKEN");
|
|
53
|
+
const clawdbotToken = await getenv("CLAWDBOT_GATEWAY_TOKEN");
|
|
54
|
+
const poolbotPassword = await getenv("POOLBOT_GATEWAY_PASSWORD");
|
|
55
|
+
const clawdbotPassword = await getenv("CLAWDBOT_GATEWAY_PASSWORD");
|
|
56
|
+
const hasToken = poolbotToken ?? clawdbotToken;
|
|
57
|
+
const hasPassword = poolbotPassword ?? clawdbotPassword;
|
|
58
|
+
if (!hasToken && !hasPassword)
|
|
54
59
|
return;
|
|
60
|
+
const tokenUnsets = [];
|
|
61
|
+
if (poolbotToken)
|
|
62
|
+
tokenUnsets.push(" launchctl unsetenv POOLBOT_GATEWAY_TOKEN");
|
|
63
|
+
if (clawdbotToken)
|
|
64
|
+
tokenUnsets.push(" launchctl unsetenv CLAWDBOT_GATEWAY_TOKEN");
|
|
65
|
+
const passwordUnsets = [];
|
|
66
|
+
if (poolbotPassword)
|
|
67
|
+
passwordUnsets.push(" launchctl unsetenv POOLBOT_GATEWAY_PASSWORD");
|
|
68
|
+
if (clawdbotPassword)
|
|
69
|
+
passwordUnsets.push(" launchctl unsetenv CLAWDBOT_GATEWAY_PASSWORD");
|
|
55
70
|
const lines = [
|
|
56
71
|
"- launchctl environment overrides detected (can cause confusing unauthorized errors).",
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
? "
|
|
72
|
+
hasToken ? `- \`${poolbotToken ? "POOLBOT" : "CLAWDBOT"}_GATEWAY_TOKEN\` is set; it overrides config tokens.` : undefined,
|
|
73
|
+
hasPassword
|
|
74
|
+
? `- \`${poolbotPassword ? "POOLBOT" : "CLAWDBOT"}_GATEWAY_PASSWORD\` is set; it overrides config passwords.`
|
|
60
75
|
: undefined,
|
|
61
76
|
"- Clear overrides and restart the app/gateway:",
|
|
62
|
-
|
|
63
|
-
|
|
77
|
+
...tokenUnsets,
|
|
78
|
+
...passwordUnsets,
|
|
64
79
|
].filter((line) => Boolean(line));
|
|
65
80
|
(deps?.noteFn ?? note)(lines.join("\n"), "Gateway (macOS)");
|
|
66
81
|
}
|
|
@@ -20,7 +20,7 @@ async function detectPoolbotGitCheckout(root) {
|
|
|
20
20
|
return res.stdout.trim() === root ? "git" : "not-git";
|
|
21
21
|
}
|
|
22
22
|
export async function maybeOfferUpdateBeforeDoctor(params) {
|
|
23
|
-
const updateInProgress = isTruthyEnvValue(process.env.CLAWDBOT_UPDATE_IN_PROGRESS);
|
|
23
|
+
const updateInProgress = isTruthyEnvValue(process.env.POOLBOT_UPDATE_IN_PROGRESS || process.env.CLAWDBOT_UPDATE_IN_PROGRESS);
|
|
24
24
|
const canOfferUpdate = !updateInProgress &&
|
|
25
25
|
params.options.nonInteractive !== true &&
|
|
26
26
|
params.options.yes !== true &&
|