@poolzin/pool-bot 2026.1.39 → 2026.2.0
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/assets/chrome-extension/README.md +3 -3
- package/assets/chrome-extension/background.js +5 -5
- package/assets/chrome-extension/manifest.json +3 -3
- package/assets/chrome-extension/options.html +4 -4
- package/assets/chrome-extension/options.js +1 -1
- package/dist/acp/client.js +3 -3
- package/dist/acp/types.js +1 -1
- package/dist/agents/agent-paths.js +3 -3
- package/dist/agents/auth-profiles/paths.js +3 -3
- package/dist/agents/cli-runner/helpers.js +1 -1
- package/dist/agents/cli-runner.js +2 -2
- package/dist/agents/cloudflare-ai-gateway.js +31 -0
- package/dist/agents/compaction.js +16 -2
- package/dist/agents/context-window-guard.js +13 -10
- package/dist/agents/context.js +4 -4
- package/dist/agents/docs-path.js +1 -1
- package/dist/agents/minimax-vlm.js +1 -1
- package/dist/agents/model-auth.js +12 -1
- package/dist/agents/model-catalog.js +4 -4
- package/dist/agents/model-selection.js +10 -4
- package/dist/agents/models-config.js +3 -3
- package/dist/agents/models-config.providers.js +147 -39
- package/dist/agents/pi-embedded-helpers/openai.js +1 -1
- package/dist/agents/pi-embedded-runner/compact.js +8 -8
- package/dist/agents/pi-embedded-runner/model.js +2 -2
- package/dist/agents/pi-embedded-runner/run/attempt.js +6 -6
- package/dist/agents/pi-embedded-runner/run.js +4 -4
- package/dist/agents/pi-embedded-runner/tool-result-truncation.js +275 -0
- package/dist/agents/pi-embedded-runner/utils.js +1 -1
- package/dist/agents/pi-model-discovery.js +10 -0
- package/dist/agents/pi-tool-definition-adapter.js +50 -9
- package/dist/agents/pi-tools.before-tool-call.js +67 -0
- package/dist/agents/pi-tools.js +10 -5
- package/dist/agents/pi-tools.read.js +2 -2
- package/dist/agents/session-file-repair.js +83 -0
- package/dist/agents/session-transcript-repair.js +68 -0
- package/dist/agents/skills/frontmatter.js +1 -1
- package/dist/agents/skills/workspace.js +2 -2
- package/dist/agents/system-prompt.js +28 -4
- package/dist/agents/together-models.js +127 -0
- package/dist/agents/tool-images.js +1 -1
- package/dist/agents/tool-policy.js +1 -1
- package/dist/agents/tools/browser-tool.js +3 -3
- package/dist/agents/tools/image-tool.js +2 -2
- package/dist/agents/tools/memory-tool.js +93 -5
- package/dist/agents/tools/web-search.js +1 -1
- package/dist/auto-reply/commands-registry.data.js +1 -1
- package/dist/auto-reply/reply/commands-context-report.js +2 -2
- package/dist/auto-reply/reply/commands-session.js +2 -2
- package/dist/auto-reply/reply/get-reply-run.js +14 -4
- package/dist/auto-reply/reply/groups.js +1 -1
- package/dist/auto-reply/reply/inbound-context.js +4 -0
- package/dist/auto-reply/reply/inbound-meta.js +130 -0
- package/dist/auto-reply/reply/untrusted-context.js +15 -0
- package/dist/auto-reply/status.js +1 -1
- package/dist/browser/client-fetch.js +1 -1
- package/dist/browser/config.js +1 -1
- package/dist/browser/extension-relay.js +3 -3
- package/dist/browser/server-context.js +2 -2
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui.js +3 -3
- package/dist/channels/plugins/catalog.js +2 -2
- package/dist/channels/plugins/onboarding/imessage.js +1 -1
- package/dist/channels/plugins/onboarding/signal.js +1 -1
- package/dist/channels/plugins/onboarding/slack.js +4 -4
- package/dist/channels/plugins/onboarding/whatsapp.js +3 -3
- package/dist/channels/plugins/pairing-message.js +1 -1
- package/dist/cli/browser-cli-extension.js +2 -2
- package/dist/cli/docs-cli.js +1 -1
- package/dist/cli/gateway-cli/dev.js +1 -1
- package/dist/cli/memory-cli.js +25 -15
- package/dist/cli/nodes-cli/register.canvas.js +1 -1
- package/dist/cli/plugins-cli.js +1 -1
- package/dist/cli/run-main.js +2 -2
- package/dist/cli/security-cli.js +1 -1
- package/dist/cli/tagline.js +1 -1
- package/dist/cli/update-cli.js +4 -4
- package/dist/cli/webhooks-cli.js +5 -5
- package/dist/commands/agents.commands.add.js +1 -1
- package/dist/commands/auth-choice.apply.api-providers.js +305 -17
- package/dist/commands/auth-choice.apply.js +4 -1
- package/dist/commands/auth-choice.apply.plugin-provider.js +2 -2
- package/dist/commands/auth-choice.apply.xai.js +63 -0
- package/dist/commands/auth-choice.preferred-provider.js +7 -1
- package/dist/commands/configure.wizard.js +1 -1
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/docs.js +1 -1
- package/dist/commands/doctor-gateway-services.js +3 -3
- package/dist/commands/doctor-update.js +3 -3
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/models/list.probe.js +2 -2
- package/dist/commands/models/list.registry.js +4 -4
- package/dist/commands/models/list.status-command.js +2 -2
- package/dist/commands/onboard-auth.config-core.js +366 -28
- package/dist/commands/onboard-auth.credentials.js +71 -9
- package/dist/commands/onboard-auth.js +3 -3
- package/dist/commands/onboard-auth.models.js +26 -24
- package/dist/commands/onboard-non-interactive/local/auth-choice.js +140 -6
- package/dist/commands/status-all/report-lines.js +1 -1
- package/dist/commands/status.command.js +1 -1
- package/dist/commands/uninstall.js +3 -3
- package/dist/compat/legacy-names.js +1 -1
- package/dist/config/io.js +3 -3
- package/dist/config/schema.js +1 -1
- package/dist/config/types.memory.js +1 -0
- package/dist/config/version.js +4 -4
- package/dist/daemon/constants.js +7 -7
- package/dist/daemon/inspect.js +6 -6
- package/dist/daemon/systemd-unit.js +1 -1
- package/dist/gateway/live-image-probe.js +1 -66
- package/dist/gateway/openai-http.js +2 -2
- package/dist/gateway/openresponses-http.js +4 -4
- package/dist/gateway/server-discovery.js +2 -2
- package/dist/gateway/server-http.js +1 -1
- package/dist/gateway/server.impl.js +2 -2
- package/dist/hooks/frontmatter.js +1 -1
- package/dist/hooks/hooks-status.js +1 -1
- package/dist/hooks/install.js +2 -2
- package/dist/hooks/loader.js +1 -1
- package/dist/hooks/workspace.js +3 -3
- package/dist/index.js +2 -2
- package/dist/infra/bonjour.js +3 -3
- package/dist/infra/path-env.js +3 -3
- package/dist/infra/provider-usage.fetch.minimax.js +1 -1
- package/dist/infra/restart.js +1 -1
- package/dist/infra/tailscale.js +1 -1
- package/dist/macos/relay.js +2 -2
- package/dist/media/input-files.js +1 -1
- package/dist/media/mime.js +4 -0
- package/dist/media/png-encode.js +74 -0
- package/dist/media-understanding/providers/image.js +2 -2
- package/dist/memory/backend-config.js +207 -0
- package/dist/memory/embeddings.js +1 -1
- package/dist/memory/manager.js +1 -0
- package/dist/memory/types.js +1 -0
- package/dist/node-host/runner.js +2 -2
- package/dist/pairing/pairing-messages.js +1 -1
- package/dist/plugins/discovery.js +1 -1
- package/dist/plugins/install.js +2 -2
- package/dist/plugins/update.js +1 -1
- package/dist/security/audit.js +2 -2
- package/dist/shared/text/reasoning-tags.js +52 -7
- package/dist/tailscale/detect.js +146 -0
- package/dist/telegram/bot-message-context.js +1 -1
- package/dist/test-helpers/workspace.js +11 -0
- package/dist/test-utils/channel-plugins.js +82 -0
- package/dist/test-utils/ports.js +73 -0
- package/dist/utils/shell-argv.js +61 -0
- package/dist/utils.js +10 -0
- package/dist/web/qr-image.js +1 -61
- package/dist/wizard/onboarding.finalize.js +7 -7
- package/dist/wizard/onboarding.js +3 -3
- package/docs/RELEASE_WORKFOTS_COMPARISON.md +3 -3
- package/docs/_config.yml +2 -2
- package/docs/_layouts/default.html +9 -9
- package/docs/concepts/typebox.md +1 -1
- package/docs/docs.json +1 -1
- package/docs/northflank.mdx +7 -7
- package/docs/railway.mdx +3 -3
- package/docs/render.mdx +5 -5
- package/docs/start/lore.md +2 -2
- package/extensions/bluebubbles/index.ts +2 -2
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/bluebubbles/src/accounts.ts +8 -8
- package/extensions/bluebubbles/src/actions.test.ts +22 -22
- package/extensions/bluebubbles/src/actions.ts +5 -5
- package/extensions/bluebubbles/src/attachments.ts +2 -2
- package/extensions/bluebubbles/src/channel.ts +16 -16
- package/extensions/bluebubbles/src/chat.ts +2 -2
- package/extensions/bluebubbles/src/media-send.ts +2 -2
- package/extensions/bluebubbles/src/monitor.test.ts +46 -46
- package/extensions/bluebubbles/src/monitor.ts +5 -5
- package/extensions/bluebubbles/src/onboarding.ts +7 -7
- package/extensions/bluebubbles/src/reactions.ts +2 -2
- package/extensions/bluebubbles/src/send.ts +2 -2
- package/extensions/copilot-proxy/README.md +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/index.ts +2 -2
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diagnostics-otel/src/service.ts +3 -3
- package/extensions/discord/index.ts +2 -2
- package/extensions/discord/package.json +1 -1
- package/extensions/google-antigravity-auth/README.md +1 -1
- package/extensions/google-antigravity-auth/index.ts +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/README.md +1 -1
- package/extensions/google-gemini-cli-auth/oauth.ts +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/index.ts +3 -3
- package/extensions/googlechat/package.json +1 -1
- package/extensions/googlechat/src/accounts.ts +8 -8
- package/extensions/googlechat/src/actions.ts +6 -6
- package/extensions/googlechat/src/channel.ts +21 -21
- package/extensions/googlechat/src/monitor.ts +8 -8
- package/extensions/googlechat/src/onboarding.ts +10 -10
- package/extensions/imessage/index.ts +2 -2
- package/extensions/imessage/package.json +1 -1
- package/extensions/line/index.ts +2 -2
- package/extensions/line/package.json +1 -1
- package/extensions/line/src/card-command.ts +2 -2
- package/extensions/line/src/channel.logout.test.ts +4 -4
- package/extensions/line/src/channel.sendPayload.test.ts +8 -8
- package/extensions/line/src/channel.ts +3 -3
- package/extensions/llm-task/README.md +3 -3
- package/extensions/llm-task/index.ts +2 -2
- package/extensions/llm-task/package.json +1 -1
- package/extensions/llm-task/src/llm-task-tool.ts +4 -4
- package/extensions/lobster/README.md +6 -6
- package/extensions/lobster/index.ts +2 -2
- package/extensions/lobster/src/lobster-tool.test.ts +4 -4
- package/extensions/lobster/src/lobster-tool.ts +2 -2
- package/extensions/matrix/index.ts +2 -2
- package/extensions/matrix/package.json +1 -1
- package/extensions/matrix/src/matrix/client/config.ts +1 -1
- package/extensions/matrix/src/matrix/monitor/handler.ts +1 -1
- package/extensions/matrix/src/onboarding.ts +1 -1
- package/extensions/mattermost/index.ts +2 -2
- package/extensions/mattermost/package.json +1 -1
- package/extensions/mattermost/src/mattermost/accounts.ts +8 -8
- package/extensions/mattermost/src/mattermost/monitor-helpers.ts +5 -5
- package/extensions/mattermost/src/mattermost/monitor.ts +2 -2
- package/extensions/mattermost/src/onboarding-helpers.ts +3 -3
- package/extensions/mattermost/src/onboarding.ts +2 -2
- package/extensions/memory-core/index.ts +2 -2
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/index.ts +3 -3
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/msteams/index.ts +2 -2
- package/extensions/msteams/package.json +1 -1
- package/extensions/msteams/src/channel.directory.test.ts +2 -2
- package/extensions/msteams/src/channel.ts +2 -2
- package/extensions/msteams/src/graph-upload.ts +4 -4
- package/extensions/msteams/src/monitor-handler.ts +2 -2
- package/extensions/msteams/src/monitor.ts +2 -2
- package/extensions/msteams/src/onboarding.ts +9 -9
- package/extensions/msteams/src/reply-dispatcher.ts +2 -2
- package/extensions/msteams/src/send-context.ts +2 -2
- package/extensions/msteams/src/send.ts +4 -4
- package/extensions/nextcloud-talk/index.ts +2 -2
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nextcloud-talk/src/channel.ts +7 -7
- package/extensions/nextcloud-talk/src/inbound.ts +7 -7
- package/extensions/nextcloud-talk/src/onboarding.ts +1 -1
- package/extensions/nostr/README.md +2 -2
- package/extensions/nostr/index.ts +5 -5
- package/extensions/nostr/package.json +1 -1
- package/extensions/nostr/src/types.ts +4 -4
- package/extensions/open-prose/index.ts +2 -2
- package/extensions/qwen-portal-auth/README.md +1 -1
- package/extensions/signal/index.ts +2 -2
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/index.ts +2 -2
- package/extensions/slack/package.json +1 -1
- package/extensions/telegram/index.ts +2 -2
- package/extensions/telegram/package.json +1 -1
- package/extensions/telegram/src/channel.ts +2 -2
- package/extensions/tlon/README.md +2 -2
- package/extensions/tlon/index.ts +2 -2
- package/extensions/tlon/package.json +1 -1
- package/extensions/tlon/src/channel.ts +13 -13
- package/extensions/tlon/src/monitor/index.ts +3 -3
- package/extensions/tlon/src/onboarding.ts +3 -3
- package/extensions/tlon/src/types.ts +3 -3
- package/extensions/twitch/README.md +1 -1
- package/extensions/twitch/index.ts +2 -2
- package/extensions/twitch/package.json +1 -1
- package/extensions/twitch/src/config.ts +3 -3
- package/extensions/twitch/src/monitor.ts +3 -3
- package/extensions/twitch/src/onboarding.ts +9 -9
- package/extensions/twitch/src/outbound.test.ts +2 -2
- package/extensions/twitch/src/plugin.test.ts +2 -2
- package/extensions/twitch/src/plugin.ts +8 -8
- package/extensions/twitch/src/send.test.ts +2 -2
- package/extensions/twitch/src/send.ts +4 -4
- package/extensions/twitch/src/token.test.ts +8 -8
- package/extensions/twitch/src/token.ts +3 -3
- package/extensions/twitch/src/twitch-client.ts +3 -3
- package/extensions/twitch/src/types.ts +3 -3
- package/extensions/twitch/src/utils/markdown.ts +1 -1
- package/extensions/voice-call/README.md +3 -3
- package/extensions/voice-call/package.json +1 -1
- package/extensions/voice-call/src/core-bridge.ts +2 -2
- package/extensions/voice-call/src/response-generator.ts +1 -1
- package/extensions/whatsapp/index.ts +2 -2
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/README.md +1 -1
- package/extensions/zalo/index.ts +2 -2
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalo/src/accounts.ts +8 -8
- package/extensions/zalo/src/actions.ts +4 -4
- package/extensions/zalo/src/channel.directory.test.ts +2 -2
- package/extensions/zalo/src/channel.ts +18 -18
- package/extensions/zalo/src/monitor.ts +9 -9
- package/extensions/zalo/src/monitor.webhook.test.ts +2 -2
- package/extensions/zalo/src/onboarding.ts +24 -24
- package/extensions/zalo/src/send.ts +2 -2
- package/extensions/zalouser/README.md +2 -2
- package/extensions/zalouser/index.ts +2 -2
- package/extensions/zalouser/package.json +1 -1
- package/extensions/zalouser/src/accounts.ts +9 -9
- package/extensions/zalouser/src/channel.ts +24 -24
- package/extensions/zalouser/src/monitor.ts +4 -4
- package/extensions/zalouser/src/onboarding.ts +28 -28
- package/package.json +13 -251
- package/skills/nano-banana-pro/scripts/generate_image.py +1 -1
- package/skills/tmux/scripts/find-sessions.sh +1 -1
- package/CHANGELOG.md +0 -102
- package/README-header.png +0 -0
- package/git-hooks/pre-commit +0 -4
- package/scripts/format-staged.js +0 -148
- package/scripts/postinstall.js +0 -300
- package/scripts/setup-git-hooks.js +0 -96
|
@@ -16,7 +16,7 @@ function normalizeInstallOptions(entry) {
|
|
|
16
16
|
let label = (spec.label ?? "").trim();
|
|
17
17
|
if (!label) {
|
|
18
18
|
if (spec.kind === "bundled") {
|
|
19
|
-
label = "Bundled with
|
|
19
|
+
label = "Bundled with Poolbot";
|
|
20
20
|
}
|
|
21
21
|
else if (spec.kind === "npm" && spec.package) {
|
|
22
22
|
label = `Install ${spec.package} (npm)`;
|
package/dist/hooks/install.js
CHANGED
|
@@ -23,7 +23,7 @@ export function resolveHookInstallDir(hookId, hooksDir) {
|
|
|
23
23
|
const hooksBase = hooksDir ? resolveUserPath(hooksDir) : path.join(CONFIG_DIR, "hooks");
|
|
24
24
|
return path.join(hooksBase, safeDirName(hookId));
|
|
25
25
|
}
|
|
26
|
-
async function
|
|
26
|
+
async function ensurePoolbotHooks(manifest) {
|
|
27
27
|
const hooks = manifest.poolbot?.hooks ?? manifest[LEGACY_MANIFEST_KEY]?.hooks;
|
|
28
28
|
if (!Array.isArray(hooks)) {
|
|
29
29
|
throw new Error("package.json missing poolbot.hooks");
|
|
@@ -72,7 +72,7 @@ async function installHookPackageFromDir(params) {
|
|
|
72
72
|
}
|
|
73
73
|
let hookEntries;
|
|
74
74
|
try {
|
|
75
|
-
hookEntries = await
|
|
75
|
+
hookEntries = await ensurePoolbotHooks(manifest);
|
|
76
76
|
}
|
|
77
77
|
catch (err) {
|
|
78
78
|
return { ok: false, error: String(err) };
|
package/dist/hooks/loader.js
CHANGED
|
@@ -17,7 +17,7 @@ import { shouldIncludeHook } from "./config.js";
|
|
|
17
17
|
* 1. Directory-based discovery (bundled, managed, workspace)
|
|
18
18
|
* 2. Legacy config handlers (backwards compatibility)
|
|
19
19
|
*
|
|
20
|
-
* @param cfg -
|
|
20
|
+
* @param cfg - Poolbot configuration
|
|
21
21
|
* @param workspaceDir - Workspace directory for hook discovery
|
|
22
22
|
* @returns Number of handlers successfully loaded
|
|
23
23
|
*
|
package/dist/hooks/workspace.js
CHANGED
|
@@ -4,7 +4,7 @@ import { LEGACY_MANIFEST_KEY } from "../compat/legacy-names.js";
|
|
|
4
4
|
import { CONFIG_DIR, resolveUserPath } from "../utils.js";
|
|
5
5
|
import { resolveBundledHooksDir } from "./bundled-dir.js";
|
|
6
6
|
import { shouldIncludeHook } from "./config.js";
|
|
7
|
-
import { parseFrontmatter,
|
|
7
|
+
import { parseFrontmatter, resolvePoolbotMetadata, resolveHookInvocationPolicy, } from "./frontmatter.js";
|
|
8
8
|
function filterHookEntries(entries, config, eligibility) {
|
|
9
9
|
return entries.filter((entry) => shouldIncludeHook({ entry, config, eligibility }));
|
|
10
10
|
}
|
|
@@ -128,7 +128,7 @@ export function loadHookEntriesFromDir(params) {
|
|
|
128
128
|
pluginId: params.pluginId,
|
|
129
129
|
},
|
|
130
130
|
frontmatter,
|
|
131
|
-
metadata:
|
|
131
|
+
metadata: resolvePoolbotMetadata(frontmatter),
|
|
132
132
|
invocation: resolveHookInvocationPolicy(frontmatter),
|
|
133
133
|
};
|
|
134
134
|
return entry;
|
|
@@ -185,7 +185,7 @@ function loadHookEntries(workspaceDir, opts) {
|
|
|
185
185
|
return {
|
|
186
186
|
hook,
|
|
187
187
|
frontmatter,
|
|
188
|
-
metadata:
|
|
188
|
+
metadata: resolvePoolbotMetadata(frontmatter),
|
|
189
189
|
invocation: resolveHookInvocationPolicy(frontmatter),
|
|
190
190
|
};
|
|
191
191
|
});
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { ensureBinary } from "./infra/binaries.js";
|
|
|
13
13
|
import { loadDotEnv } from "./infra/dotenv.js";
|
|
14
14
|
import { normalizeEnv } from "./infra/env.js";
|
|
15
15
|
import { isMainModule } from "./infra/is-main.js";
|
|
16
|
-
import {
|
|
16
|
+
import { ensurePoolbotCliOnPath } from "./infra/path-env.js";
|
|
17
17
|
import { describePortOwner, ensurePortAvailable, handlePortError, PortInUseError, } from "./infra/ports.js";
|
|
18
18
|
import { assertSupportedRuntime } from "./infra/runtime-guard.js";
|
|
19
19
|
import { formatUncaughtError } from "./infra/errors.js";
|
|
@@ -23,7 +23,7 @@ import { runCommandWithTimeout, runExec } from "./process/exec.js";
|
|
|
23
23
|
import { assertWebChannel, normalizeE164, toWhatsappJid } from "./utils.js";
|
|
24
24
|
loadDotEnv({ quiet: true });
|
|
25
25
|
normalizeEnv();
|
|
26
|
-
|
|
26
|
+
ensurePoolbotCliOnPath();
|
|
27
27
|
// Capture all console output into structured logs while keeping stdout/stderr behavior.
|
|
28
28
|
enableConsoleCapture();
|
|
29
29
|
// Enforce the minimum supported runtime before doing any work.
|
package/dist/infra/bonjour.js
CHANGED
|
@@ -16,11 +16,11 @@ function isDisabledByEnv() {
|
|
|
16
16
|
}
|
|
17
17
|
function safeServiceName(name) {
|
|
18
18
|
const trimmed = name.trim();
|
|
19
|
-
return trimmed.length > 0 ? trimmed : "
|
|
19
|
+
return trimmed.length > 0 ? trimmed : "Poolbot";
|
|
20
20
|
}
|
|
21
21
|
function prettifyInstanceName(name) {
|
|
22
22
|
const normalized = name.trim().replace(/\s+/g, " ");
|
|
23
|
-
return normalized.replace(/\s+\(
|
|
23
|
+
return normalized.replace(/\s+\(Poolbot\)\s*$/i, "").trim() || normalized;
|
|
24
24
|
}
|
|
25
25
|
function serviceSummary(label, svc) {
|
|
26
26
|
let fqdn = "unknown";
|
|
@@ -63,7 +63,7 @@ export async function startGatewayBonjourAdvertiser(opts) {
|
|
|
63
63
|
.trim() || "poolbot";
|
|
64
64
|
const instanceName = typeof opts.instanceName === "string" && opts.instanceName.trim()
|
|
65
65
|
? opts.instanceName.trim()
|
|
66
|
-
: `${hostname} (
|
|
66
|
+
: `${hostname} (Poolbot)`;
|
|
67
67
|
const displayName = prettifyInstanceName(instanceName);
|
|
68
68
|
const txtBase = {
|
|
69
69
|
role: "gateway",
|
package/dist/infra/path-env.js
CHANGED
|
@@ -45,8 +45,8 @@ function candidateBinDirs(opts) {
|
|
|
45
45
|
// Bundled macOS app: `poolbot` lives next to the executable (process.execPath).
|
|
46
46
|
try {
|
|
47
47
|
const execDir = path.dirname(execPath);
|
|
48
|
-
const
|
|
49
|
-
if (isExecutable(
|
|
48
|
+
const siblingPoolbot = path.join(execDir, "poolbot");
|
|
49
|
+
if (isExecutable(siblingPoolbot))
|
|
50
50
|
candidates.push(execDir);
|
|
51
51
|
}
|
|
52
52
|
catch {
|
|
@@ -79,7 +79,7 @@ function candidateBinDirs(opts) {
|
|
|
79
79
|
* Best-effort PATH bootstrap so skills that require the `poolbot` CLI can run
|
|
80
80
|
* under launchd/minimal environments (and inside the macOS app bundle).
|
|
81
81
|
*/
|
|
82
|
-
export function
|
|
82
|
+
export function ensurePoolbotCliOnPath(opts = {}) {
|
|
83
83
|
if (isTruthyEnvValue(process.env.CLAWDBOT_PATH_BOOTSTRAPPED))
|
|
84
84
|
return;
|
|
85
85
|
process.env.CLAWDBOT_PATH_BOOTSTRAPPED = "1";
|
|
@@ -260,7 +260,7 @@ export async function fetchMinimaxUsage(apiKey, timeoutMs, fetchFn) {
|
|
|
260
260
|
headers: {
|
|
261
261
|
Authorization: `Bearer ${apiKey}`,
|
|
262
262
|
"Content-Type": "application/json",
|
|
263
|
-
"MM-API-Source": "
|
|
263
|
+
"MM-API-Source": "Poolbot",
|
|
264
264
|
},
|
|
265
265
|
}, timeoutMs, fetchFn);
|
|
266
266
|
if (!res.ok) {
|
package/dist/infra/restart.js
CHANGED
|
@@ -71,7 +71,7 @@ function normalizeSystemdUnit(raw, profile) {
|
|
|
71
71
|
}
|
|
72
72
|
return unit.endsWith(".service") ? unit : `${unit}.service`;
|
|
73
73
|
}
|
|
74
|
-
export function
|
|
74
|
+
export function triggerPoolbotRestart() {
|
|
75
75
|
if (process.env.VITEST || process.env.NODE_ENV === "test") {
|
|
76
76
|
return { ok: true, method: "supervisor", detail: "test mode" };
|
|
77
77
|
}
|
package/dist/infra/tailscale.js
CHANGED
|
@@ -263,7 +263,7 @@ export async function ensureFunnel(port, exec = runExec, runtime = defaultRuntim
|
|
|
263
263
|
console.error(warn("Tailscale client/server version mismatch detected; try updating tailscale/tailscaled."));
|
|
264
264
|
}
|
|
265
265
|
runtime.error("Failed to enable Tailscale Funnel. Is it allowed on your tailnet?");
|
|
266
|
-
runtime.error(info(`Tip: Funnel is optional for
|
|
266
|
+
runtime.error(info(`Tip: Funnel is optional for Poolbot. You can keep running the web gateway without it: \`${formatCliCommand("poolbot gateway")}\``));
|
|
267
267
|
if (shouldLogVerbose()) {
|
|
268
268
|
const rich = isRich();
|
|
269
269
|
if (stdout.trim()) {
|
package/dist/macos/relay.js
CHANGED
|
@@ -37,8 +37,8 @@ async function main() {
|
|
|
37
37
|
await patchBunLongForProtobuf();
|
|
38
38
|
const { loadDotEnv } = await import("../infra/dotenv.js");
|
|
39
39
|
loadDotEnv({ quiet: true });
|
|
40
|
-
const {
|
|
41
|
-
|
|
40
|
+
const { ensurePoolbotCliOnPath } = await import("../infra/path-env.js");
|
|
41
|
+
ensurePoolbotCliOnPath();
|
|
42
42
|
const { enableConsoleCapture } = await import("../logging.js");
|
|
43
43
|
enableConsoleCapture();
|
|
44
44
|
const { assertSupportedRuntime } = await import("../infra/runtime-guard.js");
|
|
@@ -78,7 +78,7 @@ export async function fetchWithGuard(params) {
|
|
|
78
78
|
try {
|
|
79
79
|
const response = await fetch(parsedUrl, {
|
|
80
80
|
signal: controller.signal,
|
|
81
|
-
headers: { "User-Agent": "
|
|
81
|
+
headers: { "User-Agent": "Poolbot-Gateway/1.0" },
|
|
82
82
|
redirect: "manual",
|
|
83
83
|
dispatcher,
|
|
84
84
|
});
|
package/dist/media/mime.js
CHANGED
|
@@ -11,7 +11,10 @@ const EXT_BY_MIME = {
|
|
|
11
11
|
"image/gif": ".gif",
|
|
12
12
|
"audio/ogg": ".ogg",
|
|
13
13
|
"audio/mpeg": ".mp3",
|
|
14
|
+
"audio/x-m4a": ".m4a",
|
|
15
|
+
"audio/mp4": ".m4a",
|
|
14
16
|
"video/mp4": ".mp4",
|
|
17
|
+
"video/quicktime": ".mov",
|
|
15
18
|
"application/pdf": ".pdf",
|
|
16
19
|
"application/json": ".json",
|
|
17
20
|
"application/zip": ".zip",
|
|
@@ -43,6 +46,7 @@ const AUDIO_FILE_EXTENSIONS = new Set([
|
|
|
43
46
|
".ogg",
|
|
44
47
|
".opus",
|
|
45
48
|
".wav",
|
|
49
|
+
".caf",
|
|
46
50
|
]);
|
|
47
51
|
function normalizeHeaderMime(mime) {
|
|
48
52
|
if (!mime)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal PNG encoder for generating simple RGBA images without native dependencies.
|
|
3
|
+
* Used for QR codes, live probes, and other programmatic image generation.
|
|
4
|
+
*/
|
|
5
|
+
import { deflateSync } from "node:zlib";
|
|
6
|
+
const CRC_TABLE = (() => {
|
|
7
|
+
const table = new Uint32Array(256);
|
|
8
|
+
for (let i = 0; i < 256; i += 1) {
|
|
9
|
+
let c = i;
|
|
10
|
+
for (let k = 0; k < 8; k += 1) {
|
|
11
|
+
c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
|
|
12
|
+
}
|
|
13
|
+
table[i] = c >>> 0;
|
|
14
|
+
}
|
|
15
|
+
return table;
|
|
16
|
+
})();
|
|
17
|
+
/** Compute CRC32 checksum for a buffer (used in PNG chunk encoding). */
|
|
18
|
+
export function crc32(buf) {
|
|
19
|
+
let crc = 0xffffffff;
|
|
20
|
+
for (let i = 0; i < buf.length; i += 1) {
|
|
21
|
+
crc = CRC_TABLE[(crc ^ buf[i]) & 0xff] ^ (crc >>> 8);
|
|
22
|
+
}
|
|
23
|
+
return (crc ^ 0xffffffff) >>> 0;
|
|
24
|
+
}
|
|
25
|
+
/** Create a PNG chunk with type, data, and CRC. */
|
|
26
|
+
export function pngChunk(type, data) {
|
|
27
|
+
const typeBuf = Buffer.from(type, "ascii");
|
|
28
|
+
const len = Buffer.alloc(4);
|
|
29
|
+
len.writeUInt32BE(data.length, 0);
|
|
30
|
+
const crc = crc32(Buffer.concat([typeBuf, data]));
|
|
31
|
+
const crcBuf = Buffer.alloc(4);
|
|
32
|
+
crcBuf.writeUInt32BE(crc, 0);
|
|
33
|
+
return Buffer.concat([len, typeBuf, data, crcBuf]);
|
|
34
|
+
}
|
|
35
|
+
/** Write a pixel to an RGBA buffer. Ignores out-of-bounds writes. */
|
|
36
|
+
export function fillPixel(buf, x, y, width, r, g, b, a = 255) {
|
|
37
|
+
if (x < 0 || y < 0 || x >= width) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const idx = (y * width + x) * 4;
|
|
41
|
+
if (idx < 0 || idx + 3 >= buf.length) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
buf[idx] = r;
|
|
45
|
+
buf[idx + 1] = g;
|
|
46
|
+
buf[idx + 2] = b;
|
|
47
|
+
buf[idx + 3] = a;
|
|
48
|
+
}
|
|
49
|
+
/** Encode an RGBA buffer as a PNG image. */
|
|
50
|
+
export function encodePngRgba(buffer, width, height) {
|
|
51
|
+
const stride = width * 4;
|
|
52
|
+
const raw = Buffer.alloc((stride + 1) * height);
|
|
53
|
+
for (let row = 0; row < height; row += 1) {
|
|
54
|
+
const rawOffset = row * (stride + 1);
|
|
55
|
+
raw[rawOffset] = 0; // filter: none
|
|
56
|
+
buffer.copy(raw, rawOffset + 1, row * stride, row * stride + stride);
|
|
57
|
+
}
|
|
58
|
+
const compressed = deflateSync(raw);
|
|
59
|
+
const signature = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
|
|
60
|
+
const ihdr = Buffer.alloc(13);
|
|
61
|
+
ihdr.writeUInt32BE(width, 0);
|
|
62
|
+
ihdr.writeUInt32BE(height, 4);
|
|
63
|
+
ihdr[8] = 8; // bit depth
|
|
64
|
+
ihdr[9] = 6; // color type RGBA
|
|
65
|
+
ihdr[10] = 0; // compression
|
|
66
|
+
ihdr[11] = 0; // filter
|
|
67
|
+
ihdr[12] = 0; // interlace
|
|
68
|
+
return Buffer.concat([
|
|
69
|
+
signature,
|
|
70
|
+
pngChunk("IHDR", ihdr),
|
|
71
|
+
pngChunk("IDAT", compressed),
|
|
72
|
+
pngChunk("IEND", Buffer.alloc(0)),
|
|
73
|
+
]);
|
|
74
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { complete } from "@mariozechner/pi-ai";
|
|
2
2
|
import { discoverAuthStorage, discoverModels } from "@mariozechner/pi-coding-agent";
|
|
3
3
|
import { getApiKeyForModel, requireApiKey } from "../../agents/model-auth.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ensurePoolbotModelsJson } from "../../agents/models-config.js";
|
|
5
5
|
import { minimaxUnderstandImage } from "../../agents/minimax-vlm.js";
|
|
6
6
|
import { coerceImageAssistantText } from "../../agents/tools/image-tool.helpers.js";
|
|
7
7
|
export async function describeImageWithModel(params) {
|
|
8
|
-
await
|
|
8
|
+
await ensurePoolbotModelsJson(params.cfg, params.agentDir);
|
|
9
9
|
const authStorage = discoverAuthStorage(params.agentDir);
|
|
10
10
|
const modelRegistry = discoverModels(authStorage, params.agentDir);
|
|
11
11
|
const model = modelRegistry.find(params.provider, params.model);
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { resolveAgentWorkspaceDir } from "../agents/agent-scope.js";
|
|
3
|
+
import { parseDurationMs } from "../cli/parse-duration.js";
|
|
4
|
+
import { resolveUserPath } from "../utils.js";
|
|
5
|
+
import { splitShellArgs } from "../utils/shell-argv.js";
|
|
6
|
+
const DEFAULT_BACKEND = "builtin";
|
|
7
|
+
const DEFAULT_CITATIONS = "auto";
|
|
8
|
+
const DEFAULT_QMD_INTERVAL = "5m";
|
|
9
|
+
const DEFAULT_QMD_DEBOUNCE_MS = 15_000;
|
|
10
|
+
const DEFAULT_QMD_TIMEOUT_MS = 4_000;
|
|
11
|
+
const DEFAULT_QMD_EMBED_INTERVAL = "60m";
|
|
12
|
+
const DEFAULT_QMD_COMMAND_TIMEOUT_MS = 30_000;
|
|
13
|
+
const DEFAULT_QMD_UPDATE_TIMEOUT_MS = 120_000;
|
|
14
|
+
const DEFAULT_QMD_EMBED_TIMEOUT_MS = 120_000;
|
|
15
|
+
const DEFAULT_QMD_LIMITS = {
|
|
16
|
+
maxResults: 6,
|
|
17
|
+
maxSnippetChars: 700,
|
|
18
|
+
maxInjectedChars: 4_000,
|
|
19
|
+
timeoutMs: DEFAULT_QMD_TIMEOUT_MS,
|
|
20
|
+
};
|
|
21
|
+
const DEFAULT_QMD_SCOPE = {
|
|
22
|
+
default: "deny",
|
|
23
|
+
rules: [
|
|
24
|
+
{
|
|
25
|
+
action: "allow",
|
|
26
|
+
match: { chatType: "direct" },
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
function sanitizeName(input) {
|
|
31
|
+
const lower = input.toLowerCase().replace(/[^a-z0-9-]+/g, "-");
|
|
32
|
+
const trimmed = lower.replace(/^-+|-+$/g, "");
|
|
33
|
+
return trimmed || "collection";
|
|
34
|
+
}
|
|
35
|
+
function ensureUniqueName(base, existing) {
|
|
36
|
+
let name = sanitizeName(base);
|
|
37
|
+
if (!existing.has(name)) {
|
|
38
|
+
existing.add(name);
|
|
39
|
+
return name;
|
|
40
|
+
}
|
|
41
|
+
let suffix = 2;
|
|
42
|
+
while (existing.has(`${name}-${suffix}`)) {
|
|
43
|
+
suffix += 1;
|
|
44
|
+
}
|
|
45
|
+
const unique = `${name}-${suffix}`;
|
|
46
|
+
existing.add(unique);
|
|
47
|
+
return unique;
|
|
48
|
+
}
|
|
49
|
+
function resolvePath(raw, workspaceDir) {
|
|
50
|
+
const trimmed = raw.trim();
|
|
51
|
+
if (!trimmed) {
|
|
52
|
+
throw new Error("path required");
|
|
53
|
+
}
|
|
54
|
+
if (trimmed.startsWith("~") || path.isAbsolute(trimmed)) {
|
|
55
|
+
return path.normalize(resolveUserPath(trimmed));
|
|
56
|
+
}
|
|
57
|
+
return path.normalize(path.resolve(workspaceDir, trimmed));
|
|
58
|
+
}
|
|
59
|
+
function resolveIntervalMs(raw) {
|
|
60
|
+
const value = raw?.trim();
|
|
61
|
+
if (!value) {
|
|
62
|
+
return parseDurationMs(DEFAULT_QMD_INTERVAL, { defaultUnit: "m" });
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
return parseDurationMs(value, { defaultUnit: "m" });
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
return parseDurationMs(DEFAULT_QMD_INTERVAL, { defaultUnit: "m" });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function resolveEmbedIntervalMs(raw) {
|
|
72
|
+
const value = raw?.trim();
|
|
73
|
+
if (!value) {
|
|
74
|
+
return parseDurationMs(DEFAULT_QMD_EMBED_INTERVAL, { defaultUnit: "m" });
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
return parseDurationMs(value, { defaultUnit: "m" });
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return parseDurationMs(DEFAULT_QMD_EMBED_INTERVAL, { defaultUnit: "m" });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function resolveDebounceMs(raw) {
|
|
84
|
+
if (typeof raw === "number" && Number.isFinite(raw) && raw >= 0) {
|
|
85
|
+
return Math.floor(raw);
|
|
86
|
+
}
|
|
87
|
+
return DEFAULT_QMD_DEBOUNCE_MS;
|
|
88
|
+
}
|
|
89
|
+
function resolveTimeoutMs(raw, fallback) {
|
|
90
|
+
if (typeof raw === "number" && Number.isFinite(raw) && raw > 0) {
|
|
91
|
+
return Math.floor(raw);
|
|
92
|
+
}
|
|
93
|
+
return fallback;
|
|
94
|
+
}
|
|
95
|
+
function resolveLimits(raw) {
|
|
96
|
+
const parsed = { ...DEFAULT_QMD_LIMITS };
|
|
97
|
+
if (raw?.maxResults && raw.maxResults > 0) {
|
|
98
|
+
parsed.maxResults = Math.floor(raw.maxResults);
|
|
99
|
+
}
|
|
100
|
+
if (raw?.maxSnippetChars && raw.maxSnippetChars > 0) {
|
|
101
|
+
parsed.maxSnippetChars = Math.floor(raw.maxSnippetChars);
|
|
102
|
+
}
|
|
103
|
+
if (raw?.maxInjectedChars && raw.maxInjectedChars > 0) {
|
|
104
|
+
parsed.maxInjectedChars = Math.floor(raw.maxInjectedChars);
|
|
105
|
+
}
|
|
106
|
+
if (raw?.timeoutMs && raw.timeoutMs > 0) {
|
|
107
|
+
parsed.timeoutMs = Math.floor(raw.timeoutMs);
|
|
108
|
+
}
|
|
109
|
+
return parsed;
|
|
110
|
+
}
|
|
111
|
+
function resolveSessionConfig(cfg, workspaceDir) {
|
|
112
|
+
const enabled = Boolean(cfg?.enabled);
|
|
113
|
+
const exportDirRaw = cfg?.exportDir?.trim();
|
|
114
|
+
const exportDir = exportDirRaw ? resolvePath(exportDirRaw, workspaceDir) : undefined;
|
|
115
|
+
const retentionDays = cfg?.retentionDays && cfg.retentionDays > 0 ? Math.floor(cfg.retentionDays) : undefined;
|
|
116
|
+
return {
|
|
117
|
+
enabled,
|
|
118
|
+
exportDir,
|
|
119
|
+
retentionDays,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function resolveCustomPaths(rawPaths, workspaceDir, existing) {
|
|
123
|
+
if (!rawPaths?.length) {
|
|
124
|
+
return [];
|
|
125
|
+
}
|
|
126
|
+
const collections = [];
|
|
127
|
+
rawPaths.forEach((entry, index) => {
|
|
128
|
+
const trimmedPath = entry?.path?.trim();
|
|
129
|
+
if (!trimmedPath) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
let resolved;
|
|
133
|
+
try {
|
|
134
|
+
resolved = resolvePath(trimmedPath, workspaceDir);
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const pattern = entry.pattern?.trim() || "**/*.md";
|
|
140
|
+
const baseName = entry.name?.trim() || `custom-${index + 1}`;
|
|
141
|
+
const name = ensureUniqueName(baseName, existing);
|
|
142
|
+
collections.push({
|
|
143
|
+
name,
|
|
144
|
+
path: resolved,
|
|
145
|
+
pattern,
|
|
146
|
+
kind: "custom",
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
return collections;
|
|
150
|
+
}
|
|
151
|
+
function resolveDefaultCollections(include, workspaceDir, existing) {
|
|
152
|
+
if (!include) {
|
|
153
|
+
return [];
|
|
154
|
+
}
|
|
155
|
+
const entries = [
|
|
156
|
+
{ path: workspaceDir, pattern: "MEMORY.md", base: "memory-root" },
|
|
157
|
+
{ path: workspaceDir, pattern: "memory.md", base: "memory-alt" },
|
|
158
|
+
{ path: path.join(workspaceDir, "memory"), pattern: "**/*.md", base: "memory-dir" },
|
|
159
|
+
];
|
|
160
|
+
return entries.map((entry) => ({
|
|
161
|
+
name: ensureUniqueName(entry.base, existing),
|
|
162
|
+
path: entry.path,
|
|
163
|
+
pattern: entry.pattern,
|
|
164
|
+
kind: "memory",
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
export function resolveMemoryBackendConfig(params) {
|
|
168
|
+
const backend = params.cfg.memory?.backend ?? DEFAULT_BACKEND;
|
|
169
|
+
const citations = params.cfg.memory?.citations ?? DEFAULT_CITATIONS;
|
|
170
|
+
if (backend !== "qmd") {
|
|
171
|
+
return { backend: "builtin", citations };
|
|
172
|
+
}
|
|
173
|
+
const workspaceDir = resolveAgentWorkspaceDir(params.cfg, params.agentId);
|
|
174
|
+
const qmdCfg = params.cfg.memory?.qmd;
|
|
175
|
+
const includeDefaultMemory = qmdCfg?.includeDefaultMemory !== false;
|
|
176
|
+
const nameSet = new Set();
|
|
177
|
+
const collections = [
|
|
178
|
+
...resolveDefaultCollections(includeDefaultMemory, workspaceDir, nameSet),
|
|
179
|
+
...resolveCustomPaths(qmdCfg?.paths, workspaceDir, nameSet),
|
|
180
|
+
];
|
|
181
|
+
const rawCommand = qmdCfg?.command?.trim() || "qmd";
|
|
182
|
+
const parsedCommand = splitShellArgs(rawCommand);
|
|
183
|
+
const command = parsedCommand?.[0] || rawCommand.split(/\s+/)[0] || "qmd";
|
|
184
|
+
const resolved = {
|
|
185
|
+
command,
|
|
186
|
+
collections,
|
|
187
|
+
includeDefaultMemory,
|
|
188
|
+
sessions: resolveSessionConfig(qmdCfg?.sessions, workspaceDir),
|
|
189
|
+
update: {
|
|
190
|
+
intervalMs: resolveIntervalMs(qmdCfg?.update?.interval),
|
|
191
|
+
debounceMs: resolveDebounceMs(qmdCfg?.update?.debounceMs),
|
|
192
|
+
onBoot: qmdCfg?.update?.onBoot !== false,
|
|
193
|
+
waitForBootSync: qmdCfg?.update?.waitForBootSync === true,
|
|
194
|
+
embedIntervalMs: resolveEmbedIntervalMs(qmdCfg?.update?.embedInterval),
|
|
195
|
+
commandTimeoutMs: resolveTimeoutMs(qmdCfg?.update?.commandTimeoutMs, DEFAULT_QMD_COMMAND_TIMEOUT_MS),
|
|
196
|
+
updateTimeoutMs: resolveTimeoutMs(qmdCfg?.update?.updateTimeoutMs, DEFAULT_QMD_UPDATE_TIMEOUT_MS),
|
|
197
|
+
embedTimeoutMs: resolveTimeoutMs(qmdCfg?.update?.embedTimeoutMs, DEFAULT_QMD_EMBED_TIMEOUT_MS),
|
|
198
|
+
},
|
|
199
|
+
limits: resolveLimits(qmdCfg?.limits),
|
|
200
|
+
scope: qmdCfg?.scope ?? DEFAULT_QMD_SCOPE,
|
|
201
|
+
};
|
|
202
|
+
return {
|
|
203
|
+
backend: "qmd",
|
|
204
|
+
citations,
|
|
205
|
+
qmd: resolved,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
@@ -160,7 +160,7 @@ function formatLocalSetupError(err) {
|
|
|
160
160
|
"To enable local embeddings:",
|
|
161
161
|
"1) Use Node 22 LTS (recommended for installs/updates)",
|
|
162
162
|
missing
|
|
163
|
-
? "2) Reinstall
|
|
163
|
+
? "2) Reinstall Poolbot (this should install node-llama-cpp): npm i -g poolbot@latest"
|
|
164
164
|
: null,
|
|
165
165
|
"3) If you use pnpm: pnpm approve-builds (select node-llama-cpp), then pnpm rebuild node-llama-cpp",
|
|
166
166
|
'Or set agents.defaults.memorySearch.provider = "openai" (remote).',
|
package/dist/memory/manager.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/node-host/runner.js
CHANGED
|
@@ -13,7 +13,7 @@ import { createBrowserControlContext, startBrowserControlServiceFromConfig, } fr
|
|
|
13
13
|
import { createBrowserRouteDispatcher } from "../browser/routes/dispatcher.js";
|
|
14
14
|
import { detectMime } from "../media/mime.js";
|
|
15
15
|
import { resolveAgentConfig } from "../agents/agent-scope.js";
|
|
16
|
-
import {
|
|
16
|
+
import { ensurePoolbotCliOnPath } from "../infra/path-env.js";
|
|
17
17
|
import { VERSION } from "../version.js";
|
|
18
18
|
import { GATEWAY_CLIENT_MODES, GATEWAY_CLIENT_NAMES } from "../utils/message-channel.js";
|
|
19
19
|
import { ensureNodeHostConfig, saveNodeHostConfig } from "./config.js";
|
|
@@ -296,7 +296,7 @@ function resolveEnvPath(env) {
|
|
|
296
296
|
return raw.split(path.delimiter).filter(Boolean);
|
|
297
297
|
}
|
|
298
298
|
function ensureNodePathEnv() {
|
|
299
|
-
|
|
299
|
+
ensurePoolbotCliOnPath({ pathEnv: process.env.PATH ?? "" });
|
|
300
300
|
const current = process.env.PATH ?? "";
|
|
301
301
|
if (current.trim())
|
|
302
302
|
return current;
|
|
@@ -58,7 +58,7 @@ function addCandidate(params) {
|
|
|
58
58
|
packageVersion: manifest?.version?.trim() || undefined,
|
|
59
59
|
packageDescription: manifest?.description?.trim() || undefined,
|
|
60
60
|
packageDir: params.packageDir,
|
|
61
|
-
|
|
61
|
+
packagePoolbot: getPackageManifestMetadata(manifest ?? undefined),
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
function discoverInDirectory(params) {
|
package/dist/plugins/install.js
CHANGED
|
@@ -21,7 +21,7 @@ function safeDirName(input) {
|
|
|
21
21
|
function safeFileName(input) {
|
|
22
22
|
return safeDirName(input);
|
|
23
23
|
}
|
|
24
|
-
async function
|
|
24
|
+
async function ensurePoolbotExtensions(manifest) {
|
|
25
25
|
const extensions = manifest.poolbot?.extensions ?? manifest[LEGACY_MANIFEST_KEY]?.extensions;
|
|
26
26
|
if (!Array.isArray(extensions)) {
|
|
27
27
|
throw new Error("package.json missing poolbot.extensions");
|
|
@@ -56,7 +56,7 @@ async function installPluginFromPackageDir(params) {
|
|
|
56
56
|
}
|
|
57
57
|
let extensions;
|
|
58
58
|
try {
|
|
59
|
-
extensions = await
|
|
59
|
+
extensions = await ensurePoolbotExtensions(manifest);
|
|
60
60
|
}
|
|
61
61
|
catch (err) {
|
|
62
62
|
return { ok: false, error: String(err) };
|
package/dist/plugins/update.js
CHANGED
|
@@ -26,7 +26,7 @@ function resolveBundledPluginSources(params) {
|
|
|
26
26
|
const pluginId = manifest.manifest.id;
|
|
27
27
|
if (bundled.has(pluginId))
|
|
28
28
|
continue;
|
|
29
|
-
const npmSpec = candidate.
|
|
29
|
+
const npmSpec = candidate.packagePoolbot?.install?.npmSpec?.trim() ||
|
|
30
30
|
candidate.packageName?.trim() ||
|
|
31
31
|
undefined;
|
|
32
32
|
bundled.set(pluginId, {
|
package/dist/security/audit.js
CHANGED
|
@@ -65,7 +65,7 @@ async function collectFilesystemFindings(params) {
|
|
|
65
65
|
checkId: "fs.state_dir.perms_world_writable",
|
|
66
66
|
severity: "critical",
|
|
67
67
|
title: "State dir is world-writable",
|
|
68
|
-
detail: `${formatPermissionDetail(params.stateDir, stateDirPerms)}; other users can write into your
|
|
68
|
+
detail: `${formatPermissionDetail(params.stateDir, stateDirPerms)}; other users can write into your Poolbot state.`,
|
|
69
69
|
remediation: formatPermissionRemediation({
|
|
70
70
|
targetPath: params.stateDir,
|
|
71
71
|
perms: stateDirPerms,
|
|
@@ -80,7 +80,7 @@ async function collectFilesystemFindings(params) {
|
|
|
80
80
|
checkId: "fs.state_dir.perms_group_writable",
|
|
81
81
|
severity: "warn",
|
|
82
82
|
title: "State dir is group-writable",
|
|
83
|
-
detail: `${formatPermissionDetail(params.stateDir, stateDirPerms)}; group users can write into your
|
|
83
|
+
detail: `${formatPermissionDetail(params.stateDir, stateDirPerms)}; group users can write into your Poolbot state.`,
|
|
84
84
|
remediation: formatPermissionRemediation({
|
|
85
85
|
targetPath: params.stateDir,
|
|
86
86
|
perms: stateDirPerms,
|