@poolzin/pool-bot 2026.2.3 → 2026.2.5
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/agents/agent-paths.js +3 -1
- package/dist/agents/anthropic-payload-log.js +2 -1
- package/dist/agents/bash-tools.exec.js +2 -1
- package/dist/agents/cache-trace.js +8 -4
- package/dist/agents/live-auth-keys.js +2 -1
- package/dist/agents/model-auth.js +1 -0
- package/dist/agents/model-forward-compat.js +187 -0
- package/dist/agents/pi-embedded-runner/model.js +10 -56
- package/dist/agents/pi-embedded-runner/session-manager-cache.js +2 -1
- package/dist/agents/pi-embedded-subscribe.raw-stream.js +2 -1
- package/dist/agents/skills/bundled-dir.js +2 -1
- package/dist/browser/constants.js +1 -1
- package/dist/browser/profiles.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/channels/plugins/catalog.js +6 -1
- package/dist/cli/daemon-cli/install.js +4 -1
- package/dist/cli/daemon-cli/status.gather.js +4 -2
- package/dist/cli/memory-cli.js +9 -3
- package/dist/cli/profile.js +6 -2
- package/dist/cli/program/register.onboard.js +10 -0
- package/dist/commands/auth-choice-options.js +11 -0
- package/dist/commands/auth-choice.apply.api-providers.js +55 -1
- package/dist/commands/auth-choice.apply.plugin-provider.js +1 -56
- package/dist/commands/auth-choice.preferred-provider.js +1 -0
- package/dist/commands/configure.wizard.js +29 -10
- package/dist/commands/dashboard.js +4 -1
- package/dist/commands/doctor-gateway-daemon-flow.js +8 -2
- package/dist/commands/doctor-gateway-services.js +6 -2
- package/dist/commands/doctor-platform-notes.js +3 -1
- package/dist/commands/gateway-status/helpers.js +3 -1
- package/dist/commands/models/auth.js +1 -58
- package/dist/commands/models/list.errors.js +14 -0
- package/dist/commands/models/list.list-command.js +32 -21
- package/dist/commands/models/list.registry.js +120 -28
- package/dist/commands/models/list.status-command.js +1 -0
- package/dist/commands/models/shared.js +14 -0
- package/dist/commands/onboard-auth.config-core.js +60 -2
- package/dist/commands/onboard-auth.credentials.js +12 -1
- package/dist/commands/onboard-auth.js +3 -3
- package/dist/commands/onboard-auth.models.js +22 -0
- package/dist/commands/onboard-non-interactive/local/auth-choice-inference.js +1 -0
- package/dist/commands/onboard-non-interactive/local/auth-choice.js +21 -1
- package/dist/commands/provider-auth-helpers.js +61 -0
- package/dist/commands/status-all.js +4 -2
- package/dist/commands/status.gateway-probe.js +4 -2
- package/dist/commands/status.scan.js +2 -1
- package/dist/config/paths.js +18 -6
- package/dist/daemon/launchd.js +4 -1
- package/dist/daemon/schtasks.js +4 -1
- package/dist/daemon/systemd.js +4 -1
- package/dist/entry.js +4 -2
- package/dist/gateway/auth.js +4 -1
- package/dist/gateway/call.js +4 -2
- 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 +5 -2
- package/dist/infra/restart.js +2 -1
- package/dist/infra/shell-env.js +3 -2
- package/dist/infra/state-migrations.js +3 -1
- package/dist/infra/system-presence.js +4 -1
- package/dist/infra/update-runner.js +4 -1
- package/dist/macos/gateway-daemon.js +6 -3
- package/dist/macos/relay-smoke.js +5 -1
- package/dist/macos/relay.js +2 -1
- package/dist/media/image-ops.js +3 -1
- package/dist/node-host/runner.js +2 -1
- package/dist/plugins/bundled-dir.js +2 -1
- package/dist/plugins/manifest-registry.js +2 -1
- package/dist/security/audit.js +2 -1
- package/dist/telegram/bot-message-dispatch.js +1 -1
- package/dist/telegram/network-config.js +4 -2
- package/dist/terminal/palette.js +8 -6
- package/dist/terminal/theme.js +12 -12
- package/dist/tui/gateway-chat.js +2 -1
- package/dist/tui/theme/theme.js +5 -5
- package/dist/tui/tui.js +12 -6
- package/dist/version.js +2 -1
- package/dist/wizard/onboarding.js +6 -2
- package/package.json +1 -1
package/dist/gateway/call.js
CHANGED
|
@@ -95,14 +95,16 @@ export async function callGateway(opts) {
|
|
|
95
95
|
? typeof remote?.token === "string" && remote.token.trim().length > 0
|
|
96
96
|
? remote.token.trim()
|
|
97
97
|
: undefined
|
|
98
|
-
: process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
|
|
98
|
+
: process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
|
|
99
|
+
process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
|
|
99
100
|
(typeof authToken === "string" && authToken.trim().length > 0
|
|
100
101
|
? authToken.trim()
|
|
101
102
|
: undefined));
|
|
102
103
|
const password = (typeof opts.password === "string" && opts.password.trim().length > 0
|
|
103
104
|
? opts.password.trim()
|
|
104
105
|
: undefined) ||
|
|
105
|
-
process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
|
|
106
|
+
process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
|
|
107
|
+
process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
|
|
106
108
|
(isRemoteMode
|
|
107
109
|
? typeof remote?.password === "string" && remote.password.trim().length > 0
|
|
108
110
|
? remote.password.trim()
|
|
@@ -642,7 +642,10 @@ export function attachGatewayWsMessageHandler(params) {
|
|
|
642
642
|
type: "hello-ok",
|
|
643
643
|
protocol: PROTOCOL_VERSION,
|
|
644
644
|
server: {
|
|
645
|
-
version: process.env.POOLBOT_VERSION ??
|
|
645
|
+
version: process.env.POOLBOT_VERSION ??
|
|
646
|
+
process.env.CLAWDBOT_VERSION ??
|
|
647
|
+
process.env.npm_package_version ??
|
|
648
|
+
"dev",
|
|
646
649
|
commit: process.env.GIT_COMMIT,
|
|
647
650
|
host: os.hostname(),
|
|
648
651
|
connId,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { isTruthyEnvValue } from "../infra/env.js";
|
|
2
2
|
export async function startBrowserControlServerIfEnabled() {
|
|
3
|
-
if (isTruthyEnvValue(process.env.POOLBOT_SKIP_BROWSER_CONTROL_SERVER ||
|
|
3
|
+
if (isTruthyEnvValue(process.env.POOLBOT_SKIP_BROWSER_CONTROL_SERVER ||
|
|
4
|
+
process.env.CLAWDBOT_SKIP_BROWSER_CONTROL_SERVER))
|
|
4
5
|
return null;
|
|
5
6
|
// Lazy import: keeps startup fast, but still bundles for the embedded
|
|
6
7
|
// gateway (bun --compile) via the static specifier path.
|
|
7
|
-
const override =
|
|
8
|
+
const override = process.env.POOLBOT_BROWSER_CONTROL_MODULE?.trim() ||
|
|
9
|
+
process.env.CLAWDBOT_BROWSER_CONTROL_MODULE?.trim();
|
|
8
10
|
const mod = override ? await import(override) : await import("../browser/control-service.js");
|
|
9
11
|
const start = typeof mod
|
|
10
12
|
.startBrowserControlServiceFromConfig === "function"
|
|
@@ -16,8 +16,11 @@ export const __setMaxChatHistoryMessagesBytesForTest = (value) => {
|
|
|
16
16
|
};
|
|
17
17
|
export const DEFAULT_HANDSHAKE_TIMEOUT_MS = 10_000;
|
|
18
18
|
export const getHandshakeTimeoutMs = () => {
|
|
19
|
-
if (process.env.VITEST &&
|
|
20
|
-
|
|
19
|
+
if (process.env.VITEST &&
|
|
20
|
+
(process.env.POOLBOT_TEST_HANDSHAKE_TIMEOUT_MS ||
|
|
21
|
+
process.env.CLAWDBOT_TEST_HANDSHAKE_TIMEOUT_MS)) {
|
|
22
|
+
const parsed = Number(process.env.POOLBOT_TEST_HANDSHAKE_TIMEOUT_MS ||
|
|
23
|
+
process.env.CLAWDBOT_TEST_HANDSHAKE_TIMEOUT_MS);
|
|
21
24
|
if (Number.isFinite(parsed) && parsed > 0)
|
|
22
25
|
return parsed;
|
|
23
26
|
}
|
|
@@ -14,7 +14,9 @@ import { defaultRuntime } from "../runtime.js";
|
|
|
14
14
|
export function buildGatewayCronService(params) {
|
|
15
15
|
const cronLogger = getChildLogger({ module: "cron" });
|
|
16
16
|
const storePath = resolveCronStorePath(params.cfg.cron?.store);
|
|
17
|
-
const cronEnabled = process.env.POOLBOT_SKIP_CRON !== "1" &&
|
|
17
|
+
const cronEnabled = process.env.POOLBOT_SKIP_CRON !== "1" &&
|
|
18
|
+
process.env.CLAWDBOT_SKIP_CRON !== "1" &&
|
|
19
|
+
params.cfg.cron?.enabled !== false;
|
|
18
20
|
const resolveCronAgent = (requested) => {
|
|
19
21
|
const runtimeConfig = loadConfig();
|
|
20
22
|
const normalized = typeof requested === "string" && requested.trim() ? normalizeAgentId(requested) : undefined;
|
|
@@ -7,7 +7,8 @@ export async function startGatewayDiscovery(params) {
|
|
|
7
7
|
const mdnsMode = params.mdnsMode ?? "minimal";
|
|
8
8
|
// mDNS can be disabled via config (mdnsMode: off) or env var.
|
|
9
9
|
const bonjourEnabled = mdnsMode !== "off" &&
|
|
10
|
-
process.env.POOLBOT_DISABLE_BONJOUR !== "1" &&
|
|
10
|
+
process.env.POOLBOT_DISABLE_BONJOUR !== "1" &&
|
|
11
|
+
process.env.CLAWDBOT_DISABLE_BONJOUR !== "1" &&
|
|
11
12
|
process.env.NODE_ENV !== "test" &&
|
|
12
13
|
!process.env.VITEST;
|
|
13
14
|
const mdnsMinimal = mdnsMode !== "full";
|
|
@@ -16,7 +17,9 @@ export async function startGatewayDiscovery(params) {
|
|
|
16
17
|
const tailnetDns = needsTailnetDns
|
|
17
18
|
? await resolveTailnetDnsHint({ enabled: tailscaleEnabled })
|
|
18
19
|
: undefined;
|
|
19
|
-
const sshPortEnv = mdnsMinimal
|
|
20
|
+
const sshPortEnv = mdnsMinimal
|
|
21
|
+
? undefined
|
|
22
|
+
: process.env.POOLBOT_SSH_PORT?.trim() || process.env.CLAWDBOT_SSH_PORT?.trim();
|
|
20
23
|
const sshPortParsed = sshPortEnv ? Number.parseInt(sshPortEnv, 10) : NaN;
|
|
21
24
|
const sshPort = Number.isFinite(sshPortParsed) && sshPortParsed > 0 ? sshPortParsed : undefined;
|
|
22
25
|
const cliPath = mdnsMinimal ? undefined : resolveBonjourCliPath();
|
package/dist/infra/restart.js
CHANGED
|
@@ -109,7 +109,8 @@ export function triggerPoolbotRestart() {
|
|
|
109
109
|
detail: "unsupported platform restart",
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
const label = process.env.POOLBOT_LAUNCHD_LABEL ||
|
|
112
|
+
const label = process.env.POOLBOT_LAUNCHD_LABEL ||
|
|
113
|
+
process.env.CLAWDBOT_LAUNCHD_LABEL ||
|
|
113
114
|
resolveGatewayLaunchAgentLabel(process.env.POOLBOT_PROFILE ?? process.env.CLAWDBOT_PROFILE);
|
|
114
115
|
const uid = typeof process.getuid === "function" ? process.getuid() : undefined;
|
|
115
116
|
const target = uid !== undefined ? `gui/${uid}/${label}` : label;
|
package/dist/infra/shell-env.js
CHANGED
|
@@ -72,10 +72,11 @@ export function loadShellEnvFallback(opts) {
|
|
|
72
72
|
return { ok: true, applied };
|
|
73
73
|
}
|
|
74
74
|
export function shouldEnableShellEnvFallback(env) {
|
|
75
|
-
return isTruthyEnvValue(env.POOLBOT_LOAD_SHELL_ENV) || isTruthyEnvValue(env.CLAWDBOT_LOAD_SHELL_ENV);
|
|
75
|
+
return (isTruthyEnvValue(env.POOLBOT_LOAD_SHELL_ENV) || isTruthyEnvValue(env.CLAWDBOT_LOAD_SHELL_ENV));
|
|
76
76
|
}
|
|
77
77
|
export function shouldDeferShellEnvFallback(env) {
|
|
78
|
-
return isTruthyEnvValue(env.POOLBOT_DEFER_SHELL_ENV_FALLBACK) ||
|
|
78
|
+
return (isTruthyEnvValue(env.POOLBOT_DEFER_SHELL_ENV_FALLBACK) ||
|
|
79
|
+
isTruthyEnvValue(env.CLAWDBOT_DEFER_SHELL_ENV_FALLBACK));
|
|
79
80
|
}
|
|
80
81
|
export function resolveShellEnvFallbackTimeoutMs(env) {
|
|
81
82
|
const raw = env.POOLBOT_SHELL_ENV_TIMEOUT_MS?.trim() || env.CLAWDBOT_SHELL_ENV_TIMEOUT_MS?.trim();
|
|
@@ -726,7 +726,9 @@ export async function autoMigrateLegacyState(params) {
|
|
|
726
726
|
homedir: params.homedir,
|
|
727
727
|
log: params.log,
|
|
728
728
|
});
|
|
729
|
-
if (env.POOLBOT_AGENT_DIR?.trim() ||
|
|
729
|
+
if (env.POOLBOT_AGENT_DIR?.trim() ||
|
|
730
|
+
env.CLAWDBOT_AGENT_DIR?.trim() ||
|
|
731
|
+
env.PI_CODING_AGENT_DIR?.trim()) {
|
|
730
732
|
return {
|
|
731
733
|
migrated: stateDirResult.migrated,
|
|
732
734
|
skipped: true,
|
|
@@ -33,7 +33,10 @@ function resolvePrimaryIPv4() {
|
|
|
33
33
|
function initSelfPresence() {
|
|
34
34
|
const host = os.hostname();
|
|
35
35
|
const ip = resolvePrimaryIPv4() ?? undefined;
|
|
36
|
-
const version = process.env.POOLBOT_VERSION ??
|
|
36
|
+
const version = process.env.POOLBOT_VERSION ??
|
|
37
|
+
process.env.CLAWDBOT_VERSION ??
|
|
38
|
+
process.env.npm_package_version ??
|
|
39
|
+
"unknown";
|
|
37
40
|
const modelIdentifier = (() => {
|
|
38
41
|
const p = os.platform();
|
|
39
42
|
if (p === "darwin") {
|
|
@@ -560,7 +560,10 @@ export async function runGatewayUpdate(opts = {}) {
|
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
562
|
const doctorArgv = [process.execPath, doctorEntry, "doctor", "--non-interactive"];
|
|
563
|
-
const doctorStep = await runStep(step("poolbot doctor", doctorArgv, gitRoot, {
|
|
563
|
+
const doctorStep = await runStep(step("poolbot doctor", doctorArgv, gitRoot, {
|
|
564
|
+
POOLBOT_UPDATE_IN_PROGRESS: "1",
|
|
565
|
+
CLAWDBOT_UPDATE_IN_PROGRESS: "1",
|
|
566
|
+
}));
|
|
564
567
|
steps.push(doctorStep);
|
|
565
568
|
const uiIndexHealth = await resolveControlUiDistIndexHealth({ root: gitRoot });
|
|
566
569
|
if (!uiIndexHealth.exists) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
const BUNDLED_VERSION = (typeof __CLAWDBOT_VERSION__ === "string" && __CLAWDBOT_VERSION__) ||
|
|
4
|
-
process.env.POOLBOT_BUNDLED_VERSION ||
|
|
4
|
+
process.env.POOLBOT_BUNDLED_VERSION ||
|
|
5
|
+
process.env.CLAWDBOT_BUNDLED_VERSION ||
|
|
5
6
|
"0.0.0";
|
|
6
7
|
function argValue(args, flag) {
|
|
7
8
|
const idx = args.indexOf(flag);
|
|
@@ -47,7 +48,8 @@ async function main() {
|
|
|
47
48
|
setGatewayWsLogStyle(wsLogStyle);
|
|
48
49
|
const cfg = loadConfig();
|
|
49
50
|
const portRaw = argValue(args, "--port") ??
|
|
50
|
-
process.env.POOLBOT_GATEWAY_PORT ??
|
|
51
|
+
process.env.POOLBOT_GATEWAY_PORT ??
|
|
52
|
+
process.env.CLAWDBOT_GATEWAY_PORT ??
|
|
51
53
|
(typeof cfg.gateway?.port === "number" ? String(cfg.gateway.port) : "") ??
|
|
52
54
|
"18789";
|
|
53
55
|
const port = Number.parseInt(portRaw, 10);
|
|
@@ -56,7 +58,8 @@ async function main() {
|
|
|
56
58
|
process.exit(1);
|
|
57
59
|
}
|
|
58
60
|
const bindRaw = argValue(args, "--bind") ??
|
|
59
|
-
process.env.POOLBOT_GATEWAY_BIND ??
|
|
61
|
+
process.env.POOLBOT_GATEWAY_BIND ??
|
|
62
|
+
process.env.CLAWDBOT_GATEWAY_BIND ??
|
|
60
63
|
cfg.gateway?.bind ??
|
|
61
64
|
"loopback";
|
|
62
65
|
const bind = bindRaw === "loopback" ||
|
|
@@ -13,7 +13,11 @@ export function parseRelaySmokeTest(args, env) {
|
|
|
13
13
|
return "qr";
|
|
14
14
|
// Back-compat: only run env-based smoke mode when no CLI args are present,
|
|
15
15
|
// to avoid surprising early-exit when users set env vars globally.
|
|
16
|
-
if (args.length === 0 &&
|
|
16
|
+
if (args.length === 0 &&
|
|
17
|
+
(env.POOLBOT_SMOKE_QR === "1" ||
|
|
18
|
+
env.CLAWDBOT_SMOKE_QR === "1" ||
|
|
19
|
+
env.POOLBOT_SMOKE === "qr" ||
|
|
20
|
+
env.CLAWDBOT_SMOKE === "qr")) {
|
|
17
21
|
return "qr";
|
|
18
22
|
}
|
|
19
23
|
return null;
|
package/dist/macos/relay.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
const BUNDLED_VERSION = (typeof __CLAWDBOT_VERSION__ === "string" && __CLAWDBOT_VERSION__) ||
|
|
4
|
-
process.env.POOLBOT_BUNDLED_VERSION ||
|
|
4
|
+
process.env.POOLBOT_BUNDLED_VERSION ||
|
|
5
|
+
process.env.CLAWDBOT_BUNDLED_VERSION ||
|
|
5
6
|
"0.0.0";
|
|
6
7
|
function hasFlag(args, flag) {
|
|
7
8
|
return args.includes(flag);
|
package/dist/media/image-ops.js
CHANGED
|
@@ -7,7 +7,9 @@ function isBun() {
|
|
|
7
7
|
}
|
|
8
8
|
function prefersSips() {
|
|
9
9
|
return ((process.env.POOLBOT_IMAGE_BACKEND || process.env.CLAWDBOT_IMAGE_BACKEND) === "sips" ||
|
|
10
|
-
((process.env.POOLBOT_IMAGE_BACKEND || process.env.CLAWDBOT_IMAGE_BACKEND) !== "sharp" &&
|
|
10
|
+
((process.env.POOLBOT_IMAGE_BACKEND || process.env.CLAWDBOT_IMAGE_BACKEND) !== "sharp" &&
|
|
11
|
+
isBun() &&
|
|
12
|
+
process.platform === "darwin"));
|
|
11
13
|
}
|
|
12
14
|
async function loadSharp() {
|
|
13
15
|
const mod = (await import("sharp"));
|
package/dist/node-host/runner.js
CHANGED
|
@@ -354,7 +354,8 @@ export async function runNodeHost(opts) {
|
|
|
354
354
|
const resolvedBrowser = resolveBrowserConfig(cfg.browser, cfg);
|
|
355
355
|
const browserProxyEnabled = browserProxy.enabled && resolvedBrowser.enabled;
|
|
356
356
|
const isRemoteMode = cfg.gateway?.mode === "remote";
|
|
357
|
-
const token = process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
|
|
357
|
+
const token = process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
|
|
358
|
+
process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
|
|
358
359
|
(isRemoteMode ? cfg.gateway?.remote?.token : cfg.gateway?.auth?.token);
|
|
359
360
|
const password = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
|
|
360
361
|
process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
|
|
@@ -2,7 +2,8 @@ import fs from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
export function resolveBundledPluginsDir() {
|
|
5
|
-
const override = process.env.POOLBOT_BUNDLED_PLUGINS_DIR?.trim() ||
|
|
5
|
+
const override = process.env.POOLBOT_BUNDLED_PLUGINS_DIR?.trim() ||
|
|
6
|
+
process.env.CLAWDBOT_BUNDLED_PLUGINS_DIR?.trim();
|
|
6
7
|
if (override)
|
|
7
8
|
return override;
|
|
8
9
|
// bun --compile: ship a sibling `extensions/` next to the executable.
|
|
@@ -17,7 +17,8 @@ function resolveManifestCacheMs(env) {
|
|
|
17
17
|
return Math.max(0, parsed);
|
|
18
18
|
}
|
|
19
19
|
function shouldUseManifestCache(env) {
|
|
20
|
-
const disabled = env.POOLBOT_DISABLE_PLUGIN_MANIFEST_CACHE?.trim() ||
|
|
20
|
+
const disabled = env.POOLBOT_DISABLE_PLUGIN_MANIFEST_CACHE?.trim() ||
|
|
21
|
+
env.CLAWDBOT_DISABLE_PLUGIN_MANIFEST_CACHE?.trim();
|
|
21
22
|
if (disabled)
|
|
22
23
|
return false;
|
|
23
24
|
return resolveManifestCacheMs(env) > 0;
|
package/dist/security/audit.js
CHANGED
|
@@ -664,7 +664,8 @@ async function maybeProbeGateway(params) {
|
|
|
664
664
|
? typeof remote?.token === "string" && remote.token.trim()
|
|
665
665
|
? remote.token.trim()
|
|
666
666
|
: undefined
|
|
667
|
-
: process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
|
|
667
|
+
: process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
|
|
668
|
+
process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
|
|
668
669
|
(typeof authToken === "string" && authToken.trim() ? authToken.trim() : undefined);
|
|
669
670
|
const password = process.env.POOLBOT_GATEWAY_PASSWORD?.trim() ||
|
|
670
671
|
process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() ||
|
|
@@ -234,7 +234,7 @@ export const dispatchTelegramMessage = async ({ context, bot, cfg, runtime, repl
|
|
|
234
234
|
});
|
|
235
235
|
draftStream?.stop();
|
|
236
236
|
let sentFallback = false;
|
|
237
|
-
if (!deliveryState.delivered &&
|
|
237
|
+
if (!deliveryState.delivered && counts.tool + counts.block + counts.final > 0) {
|
|
238
238
|
try {
|
|
239
239
|
await deliverReplies({
|
|
240
240
|
replies: [{ text: EMPTY_RESPONSE_FALLBACK }],
|
|
@@ -9,10 +9,12 @@ export function resolveTelegramAutoSelectFamilyDecision(params) {
|
|
|
9
9
|
const nodeMajor = typeof params?.nodeMajor === "number"
|
|
10
10
|
? params.nodeMajor
|
|
11
11
|
: Number(process.versions.node.split(".")[0]);
|
|
12
|
-
if (isTruthyEnvValue(env[TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV]) ||
|
|
12
|
+
if (isTruthyEnvValue(env[TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV]) ||
|
|
13
|
+
isTruthyEnvValue(env[TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV_LEGACY])) {
|
|
13
14
|
return { value: true, source: `env:${TELEGRAM_ENABLE_AUTO_SELECT_FAMILY_ENV}` };
|
|
14
15
|
}
|
|
15
|
-
if (isTruthyEnvValue(env[TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV]) ||
|
|
16
|
+
if (isTruthyEnvValue(env[TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV]) ||
|
|
17
|
+
isTruthyEnvValue(env[TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV_LEGACY])) {
|
|
16
18
|
return { value: false, source: `env:${TELEGRAM_DISABLE_AUTO_SELECT_FAMILY_ENV}` };
|
|
17
19
|
}
|
|
18
20
|
if (typeof params?.network?.autoSelectFamily === "boolean") {
|
package/dist/terminal/palette.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Pool Bot palette tokens for CLI/UI theming. "poolbot seam" == use this palette.
|
|
2
2
|
// Keep in sync with docs/cli/index.md (CLI palette section).
|
|
3
|
-
export const
|
|
4
|
-
accent: "#
|
|
5
|
-
accentBright: "#
|
|
6
|
-
accentDim: "#
|
|
7
|
-
info: "#
|
|
3
|
+
export const POOLBOT_PALETTE = {
|
|
4
|
+
accent: "#A855F7",
|
|
5
|
+
accentBright: "#C084FC",
|
|
6
|
+
accentDim: "#7C3AED",
|
|
7
|
+
info: "#A78BFA",
|
|
8
8
|
success: "#2FBF71",
|
|
9
9
|
warn: "#FFB020",
|
|
10
10
|
error: "#E23D2D",
|
|
11
11
|
muted: "#8B7F77",
|
|
12
12
|
};
|
|
13
|
+
/** @deprecated Use POOLBOT_PALETTE instead. */
|
|
14
|
+
export const LOBSTER_PALETTE = POOLBOT_PALETTE;
|
package/dist/terminal/theme.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import chalk, { Chalk } from "chalk";
|
|
2
|
-
import {
|
|
2
|
+
import { POOLBOT_PALETTE } from "./palette.js";
|
|
3
3
|
const hasForceColor = typeof process.env.FORCE_COLOR === "string" &&
|
|
4
4
|
process.env.FORCE_COLOR.trim().length > 0 &&
|
|
5
5
|
process.env.FORCE_COLOR.trim() !== "0";
|
|
6
6
|
const baseChalk = process.env.NO_COLOR && !hasForceColor ? new Chalk({ level: 0 }) : chalk;
|
|
7
7
|
const hex = (value) => baseChalk.hex(value);
|
|
8
8
|
export const theme = {
|
|
9
|
-
accent: hex(
|
|
10
|
-
accentBright: hex(
|
|
11
|
-
accentDim: hex(
|
|
12
|
-
info: hex(
|
|
13
|
-
success: hex(
|
|
14
|
-
warn: hex(
|
|
15
|
-
error: hex(
|
|
16
|
-
muted: hex(
|
|
17
|
-
heading: baseChalk.bold.hex(
|
|
18
|
-
command: hex(
|
|
19
|
-
option: hex(
|
|
9
|
+
accent: hex(POOLBOT_PALETTE.accent),
|
|
10
|
+
accentBright: hex(POOLBOT_PALETTE.accentBright),
|
|
11
|
+
accentDim: hex(POOLBOT_PALETTE.accentDim),
|
|
12
|
+
info: hex(POOLBOT_PALETTE.info),
|
|
13
|
+
success: hex(POOLBOT_PALETTE.success),
|
|
14
|
+
warn: hex(POOLBOT_PALETTE.warn),
|
|
15
|
+
error: hex(POOLBOT_PALETTE.error),
|
|
16
|
+
muted: hex(POOLBOT_PALETTE.muted),
|
|
17
|
+
heading: baseChalk.bold.hex(POOLBOT_PALETTE.accent),
|
|
18
|
+
command: hex(POOLBOT_PALETTE.accentBright),
|
|
19
|
+
option: hex(POOLBOT_PALETTE.info),
|
|
20
20
|
};
|
|
21
21
|
export const isRich = () => Boolean(baseChalk.level > 0);
|
|
22
22
|
export const colorize = (rich, color, value) => rich ? color(value) : value;
|
package/dist/tui/gateway-chat.js
CHANGED
|
@@ -131,7 +131,8 @@ export function resolveGatewayConnection(opts) {
|
|
|
131
131
|
? typeof remote?.token === "string" && remote.token.trim().length > 0
|
|
132
132
|
? remote.token.trim()
|
|
133
133
|
: undefined
|
|
134
|
-
: process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
|
|
134
|
+
: process.env.POOLBOT_GATEWAY_TOKEN?.trim() ||
|
|
135
|
+
process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() ||
|
|
135
136
|
(typeof authToken === "string" && authToken.trim().length > 0
|
|
136
137
|
? authToken.trim()
|
|
137
138
|
: undefined));
|
package/dist/tui/theme/theme.js
CHANGED
|
@@ -4,20 +4,20 @@ import { createSyntaxTheme } from "./syntax-theme.js";
|
|
|
4
4
|
const palette = {
|
|
5
5
|
text: "#E8E3D5",
|
|
6
6
|
dim: "#7B7F87",
|
|
7
|
-
accent: "#
|
|
8
|
-
accentSoft: "#
|
|
7
|
+
accent: "#A855F7", // vivid purple (was gold #F6C453)
|
|
8
|
+
accentSoft: "#C084FC", // soft purple (was orange #F2A65A)
|
|
9
9
|
border: "#3C414B",
|
|
10
10
|
userBg: "#2B2F36",
|
|
11
11
|
userText: "#F3EEE0",
|
|
12
12
|
systemText: "#9BA3B2",
|
|
13
|
-
toolPendingBg: "#
|
|
13
|
+
toolPendingBg: "#1F1F2F", // slight purple tint (was teal #1F2A2F)
|
|
14
14
|
toolSuccessBg: "#1E2D23",
|
|
15
15
|
toolErrorBg: "#2F1F1F",
|
|
16
|
-
toolTitle: "#
|
|
16
|
+
toolTitle: "#A855F7", // vivid purple (was gold #F6C453)
|
|
17
17
|
toolOutput: "#E1DACB",
|
|
18
18
|
quote: "#8CC8FF",
|
|
19
19
|
quoteBorder: "#3B4D6B",
|
|
20
|
-
code: "#
|
|
20
|
+
code: "#D4BBFF", // light lavender (was gold #F0C987)
|
|
21
21
|
codeBlock: "#1E232A",
|
|
22
22
|
codeBorder: "#343A45",
|
|
23
23
|
link: "#7DD3A5",
|
package/dist/tui/tui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CombinedAutocompleteProvider, Container, Loader, ProcessTerminal, Text, TUI, } from "@mariozechner/pi-tui";
|
|
1
|
+
import { CombinedAutocompleteProvider, Container, Loader, ProcessTerminal, Text, TUI, truncateToWidth, } from "@mariozechner/pi-tui";
|
|
2
2
|
import { resolveDefaultAgentId } from "../agents/agent-scope.js";
|
|
3
3
|
import { loadConfig } from "../config/config.js";
|
|
4
4
|
import { buildAgentMainSessionKey, normalizeAgentId, normalizeMainKey, parseAgentSessionKey, } from "../routing/session-key.js";
|
|
@@ -238,10 +238,12 @@ export async function runTui(opts) {
|
|
|
238
238
|
return `agent:${currentAgentId}:${trimmed}`;
|
|
239
239
|
};
|
|
240
240
|
currentSessionKey = resolveSessionKey(initialSessionInput);
|
|
241
|
+
const getContentWidth = () => Math.max(20, (tui.terminal.columns ?? 80) - 2); // paddingX=1 each side
|
|
241
242
|
const updateHeader = () => {
|
|
242
243
|
const sessionLabel = formatSessionKey(currentSessionKey);
|
|
243
244
|
const agentLabel = formatAgentLabel(currentAgentId);
|
|
244
|
-
|
|
245
|
+
const raw = `poolbot tui - ${client.connection.url} - agent ${agentLabel} - session ${sessionLabel}`;
|
|
246
|
+
header.setText(theme.header(truncateToWidth(raw, getContentWidth())));
|
|
245
247
|
};
|
|
246
248
|
const busyStates = new Set(["sending", "waiting", "streaming", "running"]);
|
|
247
249
|
let statusText = null;
|
|
@@ -278,18 +280,22 @@ export async function runTui(opts) {
|
|
|
278
280
|
if (!statusLoader || !statusStartedAt)
|
|
279
281
|
return;
|
|
280
282
|
const elapsed = formatElapsed(statusStartedAt);
|
|
283
|
+
// Truncate status messages to terminal width to prevent TUI crash
|
|
284
|
+
// (Loader adds spinner + space = 2 visible chars before the message)
|
|
285
|
+
const maxMsgWidth = Math.max(10, getContentWidth() - 4);
|
|
281
286
|
if (activityStatus === "waiting") {
|
|
282
287
|
waitingTick++;
|
|
283
|
-
|
|
288
|
+
const msg = buildWaitingStatusMessage({
|
|
284
289
|
theme,
|
|
285
290
|
tick: waitingTick,
|
|
286
291
|
elapsed,
|
|
287
292
|
connectionStatus,
|
|
288
293
|
phrases: waitingPhrase ? [waitingPhrase] : undefined,
|
|
289
|
-
})
|
|
294
|
+
});
|
|
295
|
+
statusLoader.setMessage(truncateToWidth(msg, maxMsgWidth));
|
|
290
296
|
return;
|
|
291
297
|
}
|
|
292
|
-
statusLoader.setMessage(`${activityStatus} • ${elapsed} | ${connectionStatus}
|
|
298
|
+
statusLoader.setMessage(truncateToWidth(`${activityStatus} • ${elapsed} | ${connectionStatus}`, maxMsgWidth));
|
|
293
299
|
};
|
|
294
300
|
const startStatusTimer = () => {
|
|
295
301
|
if (statusTimer)
|
|
@@ -398,7 +404,7 @@ export async function runTui(opts) {
|
|
|
398
404
|
reasoningLabel,
|
|
399
405
|
tokens,
|
|
400
406
|
].filter(Boolean);
|
|
401
|
-
footer.setText(theme.dim(footerParts.join(" | ")));
|
|
407
|
+
footer.setText(theme.dim(truncateToWidth(footerParts.join(" | "), getContentWidth())));
|
|
402
408
|
};
|
|
403
409
|
const { openOverlay, closeOverlay } = createOverlayHandlers(tui, editor);
|
|
404
410
|
const initialSessionAgentId = (() => {
|
package/dist/version.js
CHANGED
|
@@ -50,6 +50,7 @@ export function resolveVersionFromModuleUrl(moduleUrl) {
|
|
|
50
50
|
// - Embedded/bundled builds: injected define or env var.
|
|
51
51
|
// - Dev/npm builds: package.json.
|
|
52
52
|
export const VERSION = (typeof __CLAWDBOT_VERSION__ === "string" && __CLAWDBOT_VERSION__) ||
|
|
53
|
-
process.env.POOLBOT_BUNDLED_VERSION ||
|
|
53
|
+
process.env.POOLBOT_BUNDLED_VERSION ||
|
|
54
|
+
process.env.CLAWDBOT_BUNDLED_VERSION ||
|
|
54
55
|
resolveVersionFromModuleUrl(import.meta.url) ||
|
|
55
56
|
"0.0.0";
|
|
@@ -217,8 +217,12 @@ export async function runOnboardingWizard(opts, runtime = defaultRuntime, prompt
|
|
|
217
217
|
const localUrl = `ws://127.0.0.1:${localPort}`;
|
|
218
218
|
const localProbe = await probeGatewayReachable({
|
|
219
219
|
url: localUrl,
|
|
220
|
-
token: baseConfig.gateway?.auth?.token ??
|
|
221
|
-
|
|
220
|
+
token: baseConfig.gateway?.auth?.token ??
|
|
221
|
+
process.env.POOLBOT_GATEWAY_TOKEN ??
|
|
222
|
+
process.env.CLAWDBOT_GATEWAY_TOKEN,
|
|
223
|
+
password: baseConfig.gateway?.auth?.password ??
|
|
224
|
+
process.env.POOLBOT_GATEWAY_PASSWORD ??
|
|
225
|
+
process.env.CLAWDBOT_GATEWAY_PASSWORD,
|
|
222
226
|
});
|
|
223
227
|
const remoteUrl = baseConfig.gateway?.remote?.url?.trim() ?? "";
|
|
224
228
|
const remoteProbe = remoteUrl
|