@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.
- package/dist/acp/server.js +2 -0
- package/dist/agents/agent-paths.js +5 -1
- package/dist/agents/anthropic-payload-log.js +3 -2
- package/dist/agents/bash-tools.exec.js +2 -1
- package/dist/agents/bash-tools.shared.js +2 -1
- package/dist/agents/cache-trace.js +9 -5
- package/dist/agents/cli-runner.js +1 -1
- package/dist/agents/live-auth-keys.js +3 -2
- package/dist/agents/pi-embedded-runner/session-manager-cache.js +2 -1
- package/dist/agents/pi-embedded-subscribe.raw-stream.js +3 -2
- package/dist/agents/sandbox/browser.js +5 -0
- package/dist/agents/shell-utils.js +1 -1
- package/dist/agents/skills/bundled-dir.js +2 -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 +3 -3
- package/dist/canvas-host/server.js +1 -1
- package/dist/channels/plugins/catalog.js +6 -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 +4 -1
- package/dist/cli/daemon-cli/shared.js +8 -3
- package/dist/cli/daemon-cli/status.gather.js +2 -0
- 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/memory-cli.js +9 -3
- package/dist/cli/node-cli/daemon.js +2 -1
- package/dist/cli/profile.js +14 -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 +28 -9
- package/dist/commands/daemon-install-helpers.js +1 -1
- package/dist/commands/dashboard.js +4 -1
- package/dist/commands/doctor-format.js +3 -3
- package/dist/commands/doctor-gateway-daemon-flow.js +9 -3
- package/dist/commands/doctor-gateway-services.js +6 -2
- package/dist/commands/doctor-platform-notes.js +25 -8
- package/dist/commands/doctor-update.js +1 -1
- package/dist/commands/gateway-status/helpers.js +4 -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 +4 -2
- package/dist/commands/status.gateway-probe.js +4 -2
- package/dist/commands/status.scan.js +3 -2
- package/dist/config/io.js +5 -3
- package/dist/config/paths.js +27 -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 +8 -5
- package/dist/daemon/node-service.js +14 -0
- package/dist/daemon/paths.js +2 -2
- package/dist/daemon/schtasks.js +9 -6
- package/dist/daemon/service-env.js +25 -5
- package/dist/daemon/systemd.js +9 -6
- package/dist/entry.js +5 -2
- package/dist/gateway/auth.js +6 -3
- package/dist/gateway/call.js +3 -1
- package/dist/gateway/server/ws-connection/message-handler.js +4 -1
- package/dist/gateway/server-browser.js +4 -2
- package/dist/gateway/server-constants.js +5 -2
- package/dist/gateway/server-cron.js +3 -1
- package/dist/gateway/server-discovery-runtime.js +4 -1
- 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 +4 -3
- package/dist/infra/shell-env.js +4 -3
- package/dist/infra/state-migrations.js +5 -3
- package/dist/infra/system-presence.js +4 -1
- package/dist/infra/update-runner.js +4 -1
- package/dist/infra/widearea-dns.js +1 -1
- package/dist/macos/gateway-daemon.js +6 -1
- package/dist/macos/relay-smoke.js +5 -1
- package/dist/macos/relay.js +1 -0
- package/dist/media/image-ops.js +4 -2
- package/dist/memory/batch-gemini.js +1 -1
- package/dist/memory/embeddings-gemini.js +1 -1
- package/dist/node-host/runner.js +4 -2
- package/dist/plugins/bundled-dir.js +2 -1
- package/dist/plugins/manifest-registry.js +3 -2
- package/dist/security/audit-extra.sync.js +1 -1
- package/dist/security/audit.js +4 -2
- package/dist/telegram/accounts.js +1 -1
- package/dist/telegram/bot-message-dispatch.js +1 -1
- package/dist/telegram/network-config.js +8 -4
- package/dist/terminal/palette.js +8 -6
- package/dist/terminal/theme.js +12 -12
- package/dist/test-helpers/state-dir-env.js +8 -0
- package/dist/tts/tts.js +1 -1
- package/dist/tui/gateway-chat.js +3 -1
- package/dist/tui/theme/theme.js +5 -5
- package/dist/tui/tui.js +12 -6
- package/dist/utils.js +2 -2
- package/dist/version.js +1 -0
- package/dist/wizard/onboarding.finalize.js +1 -1
- package/dist/wizard/onboarding.js +6 -2
- package/package.json +1 -1
package/dist/acp/server.js
CHANGED
|
@@ -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,9 @@ import { resolveStateDir } from "../config/paths.js";
|
|
|
3
3
|
import { DEFAULT_AGENT_ID } from "../routing/session-key.js";
|
|
4
4
|
import { resolveUserPath } from "../utils.js";
|
|
5
5
|
export function resolvePoolbotAgentDir() {
|
|
6
|
-
const override = process.env.
|
|
6
|
+
const override = process.env.POOLBOT_AGENT_DIR?.trim() ||
|
|
7
|
+
process.env.CLAWDBOT_AGENT_DIR?.trim() ||
|
|
8
|
+
process.env.PI_CODING_AGENT_DIR?.trim();
|
|
7
9
|
if (override)
|
|
8
10
|
return resolveUserPath(override);
|
|
9
11
|
const defaultAgentDir = path.join(resolveStateDir(), "agents", DEFAULT_AGENT_ID, "agent");
|
|
@@ -11,6 +13,8 @@ export function resolvePoolbotAgentDir() {
|
|
|
11
13
|
}
|
|
12
14
|
export function ensurePoolbotAgentEnv() {
|
|
13
15
|
const dir = resolvePoolbotAgentDir();
|
|
16
|
+
if (!process.env.POOLBOT_AGENT_DIR)
|
|
17
|
+
process.env.POOLBOT_AGENT_DIR = dir;
|
|
14
18
|
if (!process.env.CLAWDBOT_AGENT_DIR)
|
|
15
19
|
process.env.CLAWDBOT_AGENT_DIR = dir;
|
|
16
20
|
if (!process.env.PI_CODING_AGENT_DIR)
|
|
@@ -8,8 +8,9 @@ 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) ??
|
|
12
|
-
|
|
11
|
+
const enabled = parseBooleanValue(env.POOLBOT_ANTHROPIC_PAYLOAD_LOG ?? env.CLAWDBOT_ANTHROPIC_PAYLOAD_LOG) ??
|
|
12
|
+
false;
|
|
13
|
+
const fileOverride = (env.POOLBOT_ANTHROPIC_PAYLOAD_LOG_FILE ?? env.CLAWDBOT_ANTHROPIC_PAYLOAD_LOG_FILE)?.trim();
|
|
13
14
|
const filePath = fileOverride
|
|
14
15
|
? resolveUserPath(fileOverride)
|
|
15
16
|
: path.join(resolveStateDir(env), "logs", "anthropic-payload.jsonl");
|
|
@@ -56,7 +56,8 @@ function validateHostEnv(env) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
const DEFAULT_MAX_OUTPUT = clampNumber(readEnvInt("PI_BASH_MAX_OUTPUT_CHARS"), 200_000, 1_000, 200_000);
|
|
59
|
-
const DEFAULT_PENDING_MAX_OUTPUT = clampNumber(readEnvInt("
|
|
59
|
+
const DEFAULT_PENDING_MAX_OUTPUT = clampNumber(readEnvInt("POOLBOT_BASH_PENDING_MAX_OUTPUT_CHARS") ??
|
|
60
|
+
readEnvInt("CLAWDBOT_BASH_PENDING_MAX_OUTPUT_CHARS"), 200_000, 1_000, 200_000);
|
|
60
61
|
const DEFAULT_PATH = process.env.PATH ?? "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
|
|
61
62
|
const DEFAULT_NOTIFY_TAIL_CHARS = 400;
|
|
62
63
|
const DEFAULT_APPROVAL_TIMEOUT_MS = 120_000;
|
|
@@ -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,19 @@ 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() ||
|
|
13
|
+
const fileOverride = config?.filePath?.trim() ||
|
|
14
|
+
(env.POOLBOT_CACHE_TRACE_FILE ?? env.CLAWDBOT_CACHE_TRACE_FILE)?.trim();
|
|
14
15
|
const filePath = fileOverride
|
|
15
16
|
? resolveUserPath(fileOverride)
|
|
16
17
|
: path.join(resolveStateDir(env), "logs", "cache-trace.jsonl");
|
|
17
|
-
const includeMessages = parseBooleanValue(env.CLAWDBOT_CACHE_TRACE_MESSAGES) ??
|
|
18
|
-
|
|
19
|
-
const
|
|
18
|
+
const includeMessages = parseBooleanValue(env.POOLBOT_CACHE_TRACE_MESSAGES ?? env.CLAWDBOT_CACHE_TRACE_MESSAGES) ??
|
|
19
|
+
config?.includeMessages;
|
|
20
|
+
const includePrompt = parseBooleanValue(env.POOLBOT_CACHE_TRACE_PROMPT ?? env.CLAWDBOT_CACHE_TRACE_PROMPT) ??
|
|
21
|
+
config?.includePrompt;
|
|
22
|
+
const includeSystem = parseBooleanValue(env.POOLBOT_CACHE_TRACE_SYSTEM ?? env.CLAWDBOT_CACHE_TRACE_SYSTEM) ??
|
|
23
|
+
config?.includeSystem;
|
|
20
24
|
return {
|
|
21
25
|
enabled,
|
|
22
26
|
filePath,
|
|
@@ -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,11 @@ function collectEnvPrefixedKeys(prefix) {
|
|
|
20
20
|
return keys;
|
|
21
21
|
}
|
|
22
22
|
export function collectAnthropicApiKeys() {
|
|
23
|
-
const forcedSingle = process.env.
|
|
23
|
+
const forcedSingle = process.env.POOLBOT_LIVE_ANTHROPIC_KEY?.trim() ||
|
|
24
|
+
process.env.CLAWDBOT_LIVE_ANTHROPIC_KEY?.trim();
|
|
24
25
|
if (forcedSingle)
|
|
25
26
|
return [forcedSingle];
|
|
26
|
-
const fromList = parseKeyList(process.env.CLAWDBOT_LIVE_ANTHROPIC_KEYS);
|
|
27
|
+
const fromList = parseKeyList(process.env.POOLBOT_LIVE_ANTHROPIC_KEYS || process.env.CLAWDBOT_LIVE_ANTHROPIC_KEYS);
|
|
27
28
|
const fromEnv = collectEnvPrefixedKeys("ANTHROPIC_API_KEY");
|
|
28
29
|
const primary = process.env.ANTHROPIC_API_KEY?.trim();
|
|
29
30
|
const seen = new Set();
|
|
@@ -5,7 +5,8 @@ const SESSION_MANAGER_CACHE = new Map();
|
|
|
5
5
|
const DEFAULT_SESSION_MANAGER_TTL_MS = 45_000; // 45 seconds
|
|
6
6
|
function getSessionManagerTtl() {
|
|
7
7
|
return resolveCacheTtlMs({
|
|
8
|
-
envValue: process.env.
|
|
8
|
+
envValue: process.env.POOLBOT_SESSION_MANAGER_CACHE_TTL_MS ||
|
|
9
|
+
process.env.CLAWDBOT_SESSION_MANAGER_CACHE_TTL_MS,
|
|
9
10
|
defaultTtlMs: DEFAULT_SESSION_MANAGER_TTL_MS,
|
|
10
11
|
});
|
|
11
12
|
}
|
|
@@ -2,8 +2,9 @@ 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.
|
|
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() ||
|
|
7
|
+
process.env.CLAWDBOT_RAW_STREAM_PATH?.trim() ||
|
|
7
8
|
path.join(resolveStateDir(), "logs", "raw-stream.jsonl");
|
|
8
9
|
let rawStreamReady = false;
|
|
9
10
|
export function appendRawStream(payload) {
|
|
@@ -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,8 @@ function looksLikeSkillsDir(dir) {
|
|
|
25
25
|
return false;
|
|
26
26
|
}
|
|
27
27
|
export function resolveBundledSkillsDir(opts = {}) {
|
|
28
|
-
const override = process.env.
|
|
28
|
+
const override = process.env.POOLBOT_BUNDLED_SKILLS_DIR?.trim() ||
|
|
29
|
+
process.env.CLAWDBOT_BUNDLED_SKILLS_DIR?.trim();
|
|
29
30
|
if (override)
|
|
30
31
|
return override;
|
|
31
32
|
// bun --compile: ship a sibling `skills/` next to the executable.
|
|
@@ -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",
|
package/dist/agents/workspace.js
CHANGED
|
@@ -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;
|
package/dist/build-info.json
CHANGED
|
@@ -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,12 @@ const DEFAULT_CATALOG_PATHS = [
|
|
|
14
14
|
path.join(CONFIG_DIR, "mpm", "catalog.json"),
|
|
15
15
|
path.join(CONFIG_DIR, "plugins", "catalog.json"),
|
|
16
16
|
];
|
|
17
|
-
const ENV_CATALOG_PATHS = [
|
|
17
|
+
const ENV_CATALOG_PATHS = [
|
|
18
|
+
"POOLBOT_PLUGIN_CATALOG_PATHS",
|
|
19
|
+
"POOLBOT_MPM_CATALOG_PATHS",
|
|
20
|
+
"CLAWDBOT_PLUGIN_CATALOG_PATHS",
|
|
21
|
+
"CLAWDBOT_MPM_CATALOG_PATHS",
|
|
22
|
+
];
|
|
18
23
|
function isRecord(value) {
|
|
19
24
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
20
25
|
}
|
package/dist/cli/banner.js
CHANGED
|
@@ -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
|
-
"
|
|
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("
|
|
71
|
-
return (theme.muted("
|
|
72
|
-
theme.accent("
|
|
73
|
-
theme.info("
|
|
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 ?? "
|
|
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 ?? "
|
|
68
|
-
defaultRuntime.log(info(
|
|
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 ?? "
|
|
93
|
-
defaultRuntime.log(info(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
?
|
|
397
|
-
:
|
|
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
|
});
|
package/dist/cli/browser-cli.js
CHANGED
|
@@ -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
|
|
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]);
|
package/dist/cli/cli-name.js
CHANGED
|
@@ -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,10 @@ export async function runDaemonInstall(opts) {
|
|
|
73
73
|
const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
|
|
74
74
|
env: process.env,
|
|
75
75
|
port,
|
|
76
|
-
token: opts.token ||
|
|
76
|
+
token: opts.token ||
|
|
77
|
+
cfg.gateway?.auth?.token ||
|
|
78
|
+
process.env.POOLBOT_GATEWAY_TOKEN ||
|
|
79
|
+
process.env.CLAWDBOT_GATEWAY_TOKEN,
|
|
77
80
|
runtime: runtimeRaw,
|
|
78
81
|
warn: (message) => {
|
|
79
82
|
if (json)
|
|
@@ -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,9 +106,11 @@ export async function gatherDaemonStatus(opts) {
|
|
|
106
106
|
? await probeGatewayStatus({
|
|
107
107
|
url: probeUrl,
|
|
108
108
|
token: opts.rpc.token ||
|
|
109
|
+
mergedDaemonEnv.POOLBOT_GATEWAY_TOKEN ||
|
|
109
110
|
mergedDaemonEnv.CLAWDBOT_GATEWAY_TOKEN ||
|
|
110
111
|
daemonCfg.gateway?.auth?.token,
|
|
111
112
|
password: opts.rpc.password ||
|
|
113
|
+
mergedDaemonEnv.POOLBOT_GATEWAY_PASSWORD ||
|
|
112
114
|
mergedDaemonEnv.CLAWDBOT_GATEWAY_PASSWORD ||
|
|
113
115
|
daemonCfg.gateway?.auth?.password,
|
|
114
116
|
timeoutMs,
|
|
@@ -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 /
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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 [
|