@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
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<script>
|
|
18
18
|
(() => {
|
|
19
19
|
try {
|
|
20
|
-
const stored = localStorage.getItem("
|
|
20
|
+
const stored = localStorage.getItem("poolbot:theme");
|
|
21
21
|
if (stored === "light" || stored === "dark") document.documentElement.dataset.theme = stored;
|
|
22
22
|
} catch {
|
|
23
23
|
// ignore
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
<header class="shell">
|
|
36
36
|
<div class="shell__frame" role="banner">
|
|
37
37
|
<div class="shell__titlebar">
|
|
38
|
-
<div class="brand" aria-label="
|
|
38
|
+
<div class="brand" aria-label="Poolbot docs terminal">
|
|
39
39
|
<img
|
|
40
40
|
class="brand__logo"
|
|
41
41
|
src="{{ "/assets/pixel-lobster.svg" | relative_url }}"
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
decoding="async"
|
|
46
46
|
/>
|
|
47
47
|
<div class="brand__text">
|
|
48
|
-
<div class="brand__name">
|
|
48
|
+
<div class="brand__name">Poolbot</div>
|
|
49
49
|
<div class="brand__hint">docs // lobster terminal</div>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
|
|
53
53
|
<div class="titlebar__actions">
|
|
54
|
-
<a class="titlebar__cta" href="https://github.com/
|
|
54
|
+
<a class="titlebar__cta" href="https://github.com/poolbot/poolbot">
|
|
55
55
|
<span class="titlebar__cta-label">GitHub</span>
|
|
56
56
|
<span class="titlebar__cta-meta">repo</span>
|
|
57
57
|
</a>
|
|
58
|
-
<a class="titlebar__cta titlebar__cta--accent" href="https://github.com/
|
|
58
|
+
<a class="titlebar__cta titlebar__cta--accent" href="https://github.com/poolbot/poolbot/releases/latest">
|
|
59
59
|
<span class="titlebar__cta-label">Download</span>
|
|
60
60
|
<span class="titlebar__cta-meta">latest</span>
|
|
61
61
|
</a>
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<main id="content" class="content" role="main">
|
|
91
91
|
<div class="terminal">
|
|
92
92
|
<div class="terminal__prompt" aria-hidden="true">
|
|
93
|
-
<span class="prompt__user">clawd</span>@<span class="prompt__host">
|
|
93
|
+
<span class="prompt__user">clawd</span>@<span class="prompt__host">poolbot</span>:<span class="prompt__path">~/docs</span>$<span class="prompt__cmd">
|
|
94
94
|
{% if page.url == "/" %}cat index.md{% else %}less {{ page.path }}{% endif %}
|
|
95
95
|
</span>
|
|
96
96
|
</div>
|
|
@@ -116,11 +116,11 @@
|
|
|
116
116
|
|
|
117
117
|
<footer class="terminal__footer" role="contentinfo">
|
|
118
118
|
<div class="footer__line">
|
|
119
|
-
<span class="footer__sig">
|
|
119
|
+
<span class="footer__sig">poolbot.ai</span>
|
|
120
120
|
<span class="footer__sep">·</span>
|
|
121
|
-
<a href="https://github.com/
|
|
121
|
+
<a href="https://github.com/poolbot/poolbot">source</a>
|
|
122
122
|
<span class="footer__sep">·</span>
|
|
123
|
-
<a href="https://github.com/
|
|
123
|
+
<a href="https://github.com/poolbot/poolbot/releases">releases</a>
|
|
124
124
|
</div>
|
|
125
125
|
<div class="footer__hint" aria-hidden="true">
|
|
126
126
|
tip: press <kbd>F2</kbd> (Mac: <kbd>fn</kbd>+<kbd>F2</kbd>) to flip
|
package/docs/concepts/typebox.md
CHANGED
|
@@ -58,7 +58,7 @@ Authoritative list lives in `src/gateway/server.ts` (`METHODS`, `EVENTS`).
|
|
|
58
58
|
- Server handshake + method dispatch: `src/gateway/server.ts`
|
|
59
59
|
- Node client: `src/gateway/client.ts`
|
|
60
60
|
- Generated JSON Schema: `dist/protocol.schema.json`
|
|
61
|
-
- Generated Swift models: `apps/macos/Sources/
|
|
61
|
+
- Generated Swift models: `apps/macos/Sources/Pool-BotProtocol/GatewayModels.swift`
|
|
62
62
|
|
|
63
63
|
## Current pipeline
|
|
64
64
|
|
package/docs/docs.json
CHANGED
package/docs/northflank.mdx
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
title: Deploy on Northflank
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Deploy
|
|
5
|
+
Deploy Poolbot on Northflank with a one-click template and finish setup in your browser.
|
|
6
6
|
This is the easiest “no terminal on the server” path: Northflank runs the Gateway for you,
|
|
7
7
|
and you configure everything via the `/setup` web wizard.
|
|
8
8
|
|
|
9
9
|
## How to get started
|
|
10
10
|
|
|
11
|
-
1. Click [Deploy
|
|
11
|
+
1. Click [Deploy Poolbot](https://northflank.com/stacks/deploy-moltbot) to open the template.
|
|
12
12
|
2. Create an [account on Northflank](https://app.northflank.com/signup) if you don’t already have one.
|
|
13
|
-
3. Click **Deploy
|
|
13
|
+
3. Click **Deploy Poolbot now**.
|
|
14
14
|
4. Set the required environment variable: `SETUP_PASSWORD`.
|
|
15
|
-
5. Click **Deploy stack** to build and run the
|
|
15
|
+
5. Click **Deploy stack** to build and run the Poolbot template.
|
|
16
16
|
6. Wait for the deployment to complete, then click **View resources**.
|
|
17
|
-
7. Open the
|
|
18
|
-
8. Open the public
|
|
17
|
+
7. Open the Poolbot service.
|
|
18
|
+
8. Open the public Poolbot URL and complete setup at `/setup`.
|
|
19
19
|
9. Open the Control UI at `/moltbot`.
|
|
20
20
|
|
|
21
21
|
## What you get
|
|
22
22
|
|
|
23
|
-
- Hosted
|
|
23
|
+
- Hosted Poolbot Gateway + Control UI
|
|
24
24
|
- Web setup wizard at `/setup` (no terminal commands)
|
|
25
25
|
- Persistent storage via Northflank Volume (`/data`) so config/credentials/workspace survive redeploys
|
|
26
26
|
|
package/docs/railway.mdx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: Deploy on Railway
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Deploy
|
|
5
|
+
Deploy Poolbot on Railway with a one-click template and finish setup in your browser.
|
|
6
6
|
This is the easiest “no terminal on the server” path: Railway runs the Gateway for you,
|
|
7
7
|
and you configure everything via the `/setup` web wizard.
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ Then open:
|
|
|
31
31
|
|
|
32
32
|
## What you get
|
|
33
33
|
|
|
34
|
-
- Hosted
|
|
34
|
+
- Hosted Poolbot Gateway + Control UI
|
|
35
35
|
- Web setup wizard at `/setup` (no terminal commands)
|
|
36
36
|
- Persistent storage via Railway Volume (`/data`) so config/credentials/workspace survive redeploys
|
|
37
37
|
- Backup export at `/setup/export` to migrate off Railway later
|
|
@@ -93,4 +93,4 @@ Download a backup at:
|
|
|
93
93
|
|
|
94
94
|
- `https://<your-railway-domain>/setup/export`
|
|
95
95
|
|
|
96
|
-
This exports your
|
|
96
|
+
This exports your Poolbot state + workspace so you can migrate to another host without losing config or memory.
|
package/docs/render.mdx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: Deploy on Render
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Deploy
|
|
5
|
+
Deploy Poolbot on Render using Infrastructure as Code. The included `render.yaml` Blueprint defines your entire stack declaratively, service, disk, environment variables, so you can deploy with a single click and version your infrastructure alongside your code.
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ Once deployed, your service URL follows the pattern `https://<service-name>.onre
|
|
|
24
24
|
## Understanding the Blueprint
|
|
25
25
|
|
|
26
26
|
Render Blueprints are YAML files that define your infrastructure. The `render.yaml` in this
|
|
27
|
-
repository configures everything needed to run
|
|
27
|
+
repository configures everything needed to run Poolbot:
|
|
28
28
|
|
|
29
29
|
```yaml
|
|
30
30
|
services:
|
|
@@ -104,7 +104,7 @@ Modify variables in **Dashboard → your service → Environment**. Changes trig
|
|
|
104
104
|
|
|
105
105
|
### Auto-deploy
|
|
106
106
|
|
|
107
|
-
If you use the original
|
|
107
|
+
If you use the original Poolbot repository, Render will not auto-deploy your Poolbot. To update it, run a manual Blueprint sync from the dashboard.
|
|
108
108
|
|
|
109
109
|
## Custom domain
|
|
110
110
|
|
|
@@ -120,7 +120,7 @@ Render supports horizontal and vertical scaling:
|
|
|
120
120
|
- **Vertical**: Change the plan to get more CPU/RAM
|
|
121
121
|
- **Horizontal**: Increase instance count (Standard plan and above)
|
|
122
122
|
|
|
123
|
-
For
|
|
123
|
+
For Poolbot, vertical scaling is usually sufficient. Horizontal scaling requires sticky sessions or external state management.
|
|
124
124
|
|
|
125
125
|
## Backups and migration
|
|
126
126
|
|
|
@@ -130,7 +130,7 @@ Export your configuration and workspace at any time:
|
|
|
130
130
|
https://<your-service>.onrender.com/setup/export
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
This downloads a portable backup you can restore on any
|
|
133
|
+
This downloads a portable backup you can restore on any Poolbot host.
|
|
134
134
|
|
|
135
135
|
## Troubleshooting
|
|
136
136
|
|
package/docs/start/lore.md
CHANGED
|
@@ -13,7 +13,7 @@ In the beginning, there was **Warelay** — a sensible name for a WhatsApp gatew
|
|
|
13
13
|
|
|
14
14
|
But then came a space lobster.
|
|
15
15
|
|
|
16
|
-
For a while, the lobster was called **Clawd**, living in a **
|
|
16
|
+
For a while, the lobster was called **Clawd**, living in a **Pool-Bot**. But in January 2026, Anthropic sent a polite email asking for a name change (trademark stuff). And so the lobster did what lobsters do best:
|
|
17
17
|
|
|
18
18
|
**It molted.**
|
|
19
19
|
|
|
@@ -94,7 +94,7 @@ Then the chaos began.
|
|
|
94
94
|
|
|
95
95
|
**The Handsome Molty Incident:** Molty was given elevated access to generate their own new icon. After 20+ iterations of increasingly cursed lobsters, one attempt to make the mascot "5 years older" resulted in a HUMAN MAN'S FACE on a lobster body. Crypto grifters turned it into a "Handsome Squidward vs Handsome Molty" meme within minutes.
|
|
96
96
|
|
|
97
|
-
**The Fake Developers:** Scammers created fake GitHub profiles claiming to be "Head of Engineering at
|
|
97
|
+
**The Fake Developers:** Scammers created fake GitHub profiles claiming to be "Head of Engineering at Pool-Bot" to promote pump-and-dump tokens.
|
|
98
98
|
|
|
99
99
|
Peter, watching the chaos unfold: *"this is cinema"* 🎬
|
|
100
100
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotPluginApi } from "poolbot/plugin-sdk";
|
|
2
2
|
import { emptyPluginConfigSchema } from "poolbot/plugin-sdk";
|
|
3
3
|
|
|
4
4
|
import { bluebubblesPlugin } from "./src/channel.js";
|
|
@@ -10,7 +10,7 @@ const plugin = {
|
|
|
10
10
|
name: "BlueBubbles",
|
|
11
11
|
description: "BlueBubbles channel plugin (macOS app)",
|
|
12
12
|
configSchema: emptyPluginConfigSchema(),
|
|
13
|
-
register(api:
|
|
13
|
+
register(api: PoolbotPluginApi) {
|
|
14
14
|
setBlueBubblesRuntime(api.runtime);
|
|
15
15
|
api.registerChannel({ plugin: bluebubblesPlugin });
|
|
16
16
|
api.registerHttpHandler(handleBlueBubblesWebhookRequest);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "poolbot/plugin-sdk";
|
|
3
3
|
import { normalizeBlueBubblesServerUrl, type BlueBubblesAccountConfig } from "./types.js";
|
|
4
4
|
|
|
@@ -11,26 +11,26 @@ export type ResolvedBlueBubblesAccount = {
|
|
|
11
11
|
baseUrl?: string;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
function listConfiguredAccountIds(cfg:
|
|
14
|
+
function listConfiguredAccountIds(cfg: PoolbotConfig): string[] {
|
|
15
15
|
const accounts = cfg.channels?.bluebubbles?.accounts;
|
|
16
16
|
if (!accounts || typeof accounts !== "object") return [];
|
|
17
17
|
return Object.keys(accounts).filter(Boolean);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export function listBlueBubblesAccountIds(cfg:
|
|
20
|
+
export function listBlueBubblesAccountIds(cfg: PoolbotConfig): string[] {
|
|
21
21
|
const ids = listConfiguredAccountIds(cfg);
|
|
22
22
|
if (ids.length === 0) return [DEFAULT_ACCOUNT_ID];
|
|
23
23
|
return ids.sort((a, b) => a.localeCompare(b));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export function resolveDefaultBlueBubblesAccountId(cfg:
|
|
26
|
+
export function resolveDefaultBlueBubblesAccountId(cfg: PoolbotConfig): string {
|
|
27
27
|
const ids = listBlueBubblesAccountIds(cfg);
|
|
28
28
|
if (ids.includes(DEFAULT_ACCOUNT_ID)) return DEFAULT_ACCOUNT_ID;
|
|
29
29
|
return ids[0] ?? DEFAULT_ACCOUNT_ID;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function resolveAccountConfig(
|
|
33
|
-
cfg:
|
|
33
|
+
cfg: PoolbotConfig,
|
|
34
34
|
accountId: string,
|
|
35
35
|
): BlueBubblesAccountConfig | undefined {
|
|
36
36
|
const accounts = cfg.channels?.bluebubbles?.accounts;
|
|
@@ -39,7 +39,7 @@ function resolveAccountConfig(
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function mergeBlueBubblesAccountConfig(
|
|
42
|
-
cfg:
|
|
42
|
+
cfg: PoolbotConfig,
|
|
43
43
|
accountId: string,
|
|
44
44
|
): BlueBubblesAccountConfig {
|
|
45
45
|
const base = (cfg.channels?.bluebubbles ?? {}) as BlueBubblesAccountConfig & {
|
|
@@ -52,7 +52,7 @@ function mergeBlueBubblesAccountConfig(
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export function resolveBlueBubblesAccount(params: {
|
|
55
|
-
cfg:
|
|
55
|
+
cfg: PoolbotConfig;
|
|
56
56
|
accountId?: string | null;
|
|
57
57
|
}): ResolvedBlueBubblesAccount {
|
|
58
58
|
const accountId = normalizeAccountId(params.accountId);
|
|
@@ -73,7 +73,7 @@ export function resolveBlueBubblesAccount(params: {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
export function listEnabledBlueBubblesAccounts(cfg:
|
|
76
|
+
export function listEnabledBlueBubblesAccounts(cfg: PoolbotConfig): ResolvedBlueBubblesAccount[] {
|
|
77
77
|
return listBlueBubblesAccountIds(cfg)
|
|
78
78
|
.map((accountId) => resolveBlueBubblesAccount({ cfg, accountId }))
|
|
79
79
|
.filter((account) => account.enabled);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it, vi, beforeEach } from "vitest";
|
|
2
2
|
|
|
3
3
|
import { bluebubblesMessageActions } from "./actions.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
5
5
|
|
|
6
6
|
vi.mock("./accounts.js", () => ({
|
|
7
7
|
resolveBlueBubblesAccount: vi.fn(({ cfg, accountId }) => {
|
|
@@ -49,7 +49,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
49
49
|
|
|
50
50
|
describe("listActions", () => {
|
|
51
51
|
it("returns empty array when account is not enabled", () => {
|
|
52
|
-
const cfg:
|
|
52
|
+
const cfg: PoolbotConfig = {
|
|
53
53
|
channels: { bluebubbles: { enabled: false } },
|
|
54
54
|
};
|
|
55
55
|
const actions = bluebubblesMessageActions.listActions({ cfg });
|
|
@@ -57,7 +57,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
it("returns empty array when account is not configured", () => {
|
|
60
|
-
const cfg:
|
|
60
|
+
const cfg: PoolbotConfig = {
|
|
61
61
|
channels: { bluebubbles: { enabled: true } },
|
|
62
62
|
};
|
|
63
63
|
const actions = bluebubblesMessageActions.listActions({ cfg });
|
|
@@ -65,7 +65,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
it("returns react action when enabled and configured", () => {
|
|
68
|
-
const cfg:
|
|
68
|
+
const cfg: PoolbotConfig = {
|
|
69
69
|
channels: {
|
|
70
70
|
bluebubbles: {
|
|
71
71
|
enabled: true,
|
|
@@ -79,7 +79,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
it("excludes react action when reactions are gated off", () => {
|
|
82
|
-
const cfg:
|
|
82
|
+
const cfg: PoolbotConfig = {
|
|
83
83
|
channels: {
|
|
84
84
|
bluebubbles: {
|
|
85
85
|
enabled: true,
|
|
@@ -153,7 +153,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
153
153
|
|
|
154
154
|
describe("handleAction", () => {
|
|
155
155
|
it("throws for unsupported actions", async () => {
|
|
156
|
-
const cfg:
|
|
156
|
+
const cfg: PoolbotConfig = {
|
|
157
157
|
channels: {
|
|
158
158
|
bluebubbles: {
|
|
159
159
|
serverUrl: "http://localhost:1234",
|
|
@@ -172,7 +172,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
172
172
|
});
|
|
173
173
|
|
|
174
174
|
it("throws when emoji is missing for react action", async () => {
|
|
175
|
-
const cfg:
|
|
175
|
+
const cfg: PoolbotConfig = {
|
|
176
176
|
channels: {
|
|
177
177
|
bluebubbles: {
|
|
178
178
|
serverUrl: "http://localhost:1234",
|
|
@@ -191,7 +191,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
191
191
|
});
|
|
192
192
|
|
|
193
193
|
it("throws when messageId is missing", async () => {
|
|
194
|
-
const cfg:
|
|
194
|
+
const cfg: PoolbotConfig = {
|
|
195
195
|
channels: {
|
|
196
196
|
bluebubbles: {
|
|
197
197
|
serverUrl: "http://localhost:1234",
|
|
@@ -213,7 +213,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
213
213
|
const { resolveChatGuidForTarget } = await import("./send.js");
|
|
214
214
|
vi.mocked(resolveChatGuidForTarget).mockResolvedValueOnce(null);
|
|
215
215
|
|
|
216
|
-
const cfg:
|
|
216
|
+
const cfg: PoolbotConfig = {
|
|
217
217
|
channels: {
|
|
218
218
|
bluebubbles: {
|
|
219
219
|
serverUrl: "http://localhost:1234",
|
|
@@ -234,7 +234,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
234
234
|
it("sends reaction successfully with chatGuid", async () => {
|
|
235
235
|
const { sendBlueBubblesReaction } = await import("./reactions.js");
|
|
236
236
|
|
|
237
|
-
const cfg:
|
|
237
|
+
const cfg: PoolbotConfig = {
|
|
238
238
|
channels: {
|
|
239
239
|
bluebubbles: {
|
|
240
240
|
serverUrl: "http://localhost:1234",
|
|
@@ -269,7 +269,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
269
269
|
it("sends reaction removal successfully", async () => {
|
|
270
270
|
const { sendBlueBubblesReaction } = await import("./reactions.js");
|
|
271
271
|
|
|
272
|
-
const cfg:
|
|
272
|
+
const cfg: PoolbotConfig = {
|
|
273
273
|
channels: {
|
|
274
274
|
bluebubbles: {
|
|
275
275
|
serverUrl: "http://localhost:1234",
|
|
@@ -305,7 +305,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
305
305
|
const { resolveChatGuidForTarget } = await import("./send.js");
|
|
306
306
|
vi.mocked(resolveChatGuidForTarget).mockResolvedValueOnce("iMessage;-;+15559876543");
|
|
307
307
|
|
|
308
|
-
const cfg:
|
|
308
|
+
const cfg: PoolbotConfig = {
|
|
309
309
|
channels: {
|
|
310
310
|
bluebubbles: {
|
|
311
311
|
serverUrl: "http://localhost:1234",
|
|
@@ -335,7 +335,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
335
335
|
it("passes partIndex when provided", async () => {
|
|
336
336
|
const { sendBlueBubblesReaction } = await import("./reactions.js");
|
|
337
337
|
|
|
338
|
-
const cfg:
|
|
338
|
+
const cfg: PoolbotConfig = {
|
|
339
339
|
channels: {
|
|
340
340
|
bluebubbles: {
|
|
341
341
|
serverUrl: "http://localhost:1234",
|
|
@@ -367,7 +367,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
367
367
|
const { resolveChatGuidForTarget } = await import("./send.js");
|
|
368
368
|
vi.mocked(resolveChatGuidForTarget).mockResolvedValueOnce("iMessage;-;+15550001111");
|
|
369
369
|
|
|
370
|
-
const cfg:
|
|
370
|
+
const cfg: PoolbotConfig = {
|
|
371
371
|
channels: {
|
|
372
372
|
bluebubbles: {
|
|
373
373
|
serverUrl: "http://localhost:1234",
|
|
@@ -405,7 +405,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
405
405
|
const { sendBlueBubblesReaction } = await import("./reactions.js");
|
|
406
406
|
vi.mocked(resolveBlueBubblesMessageId).mockReturnValueOnce("resolved-uuid");
|
|
407
407
|
|
|
408
|
-
const cfg:
|
|
408
|
+
const cfg: PoolbotConfig = {
|
|
409
409
|
channels: {
|
|
410
410
|
bluebubbles: {
|
|
411
411
|
serverUrl: "http://localhost:1234",
|
|
@@ -439,7 +439,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
439
439
|
throw new Error("short id expired");
|
|
440
440
|
});
|
|
441
441
|
|
|
442
|
-
const cfg:
|
|
442
|
+
const cfg: PoolbotConfig = {
|
|
443
443
|
channels: {
|
|
444
444
|
bluebubbles: {
|
|
445
445
|
serverUrl: "http://localhost:1234",
|
|
@@ -465,7 +465,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
465
465
|
it("accepts message param for edit action", async () => {
|
|
466
466
|
const { editBlueBubblesMessage } = await import("./chat.js");
|
|
467
467
|
|
|
468
|
-
const cfg:
|
|
468
|
+
const cfg: PoolbotConfig = {
|
|
469
469
|
channels: {
|
|
470
470
|
bluebubbles: {
|
|
471
471
|
serverUrl: "http://localhost:1234",
|
|
@@ -491,7 +491,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
491
491
|
it("accepts message/target aliases for sendWithEffect", async () => {
|
|
492
492
|
const { sendMessageBlueBubbles } = await import("./send.js");
|
|
493
493
|
|
|
494
|
-
const cfg:
|
|
494
|
+
const cfg: PoolbotConfig = {
|
|
495
495
|
channels: {
|
|
496
496
|
bluebubbles: {
|
|
497
497
|
serverUrl: "http://localhost:1234",
|
|
@@ -524,7 +524,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
524
524
|
it("passes asVoice through sendAttachment", async () => {
|
|
525
525
|
const { sendBlueBubblesAttachment } = await import("./attachments.js");
|
|
526
526
|
|
|
527
|
-
const cfg:
|
|
527
|
+
const cfg: PoolbotConfig = {
|
|
528
528
|
channels: {
|
|
529
529
|
bluebubbles: {
|
|
530
530
|
serverUrl: "http://localhost:1234",
|
|
@@ -558,7 +558,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
558
558
|
});
|
|
559
559
|
|
|
560
560
|
it("throws when buffer is missing for setGroupIcon", async () => {
|
|
561
|
-
const cfg:
|
|
561
|
+
const cfg: PoolbotConfig = {
|
|
562
562
|
channels: {
|
|
563
563
|
bluebubbles: {
|
|
564
564
|
serverUrl: "http://localhost:1234",
|
|
@@ -580,7 +580,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
580
580
|
it("sets group icon successfully with chatGuid and buffer", async () => {
|
|
581
581
|
const { setGroupIconBlueBubbles } = await import("./chat.js");
|
|
582
582
|
|
|
583
|
-
const cfg:
|
|
583
|
+
const cfg: PoolbotConfig = {
|
|
584
584
|
channels: {
|
|
585
585
|
bluebubbles: {
|
|
586
586
|
serverUrl: "http://localhost:1234",
|
|
@@ -619,7 +619,7 @@ describe("bluebubblesMessageActions", () => {
|
|
|
619
619
|
it("uses default filename when not provided for setGroupIcon", async () => {
|
|
620
620
|
const { setGroupIconBlueBubbles } = await import("./chat.js");
|
|
621
621
|
|
|
622
|
-
const cfg:
|
|
622
|
+
const cfg: PoolbotConfig = {
|
|
623
623
|
channels: {
|
|
624
624
|
bluebubbles: {
|
|
625
625
|
serverUrl: "http://localhost:1234",
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
type ChannelMessageActionAdapter,
|
|
10
10
|
type ChannelMessageActionName,
|
|
11
11
|
type ChannelToolSend,
|
|
12
|
-
type
|
|
12
|
+
type PoolbotConfig,
|
|
13
13
|
} from "poolbot/plugin-sdk";
|
|
14
14
|
|
|
15
15
|
import { resolveBlueBubblesAccount } from "./accounts.js";
|
|
@@ -66,9 +66,9 @@ const SUPPORTED_ACTIONS = new Set<ChannelMessageActionName>(BLUEBUBBLES_ACTION_N
|
|
|
66
66
|
|
|
67
67
|
export const bluebubblesMessageActions: ChannelMessageActionAdapter = {
|
|
68
68
|
listActions: ({ cfg }) => {
|
|
69
|
-
const account = resolveBlueBubblesAccount({ cfg: cfg as
|
|
69
|
+
const account = resolveBlueBubblesAccount({ cfg: cfg as PoolbotConfig });
|
|
70
70
|
if (!account.enabled || !account.configured) return [];
|
|
71
|
-
const gate = createActionGate((cfg as
|
|
71
|
+
const gate = createActionGate((cfg as PoolbotConfig).channels?.bluebubbles?.actions);
|
|
72
72
|
const actions = new Set<ChannelMessageActionName>();
|
|
73
73
|
const macOS26 = isMacOS26OrHigher(account.accountId);
|
|
74
74
|
for (const action of BLUEBUBBLES_ACTION_NAMES) {
|
|
@@ -90,12 +90,12 @@ export const bluebubblesMessageActions: ChannelMessageActionAdapter = {
|
|
|
90
90
|
},
|
|
91
91
|
handleAction: async ({ action, params, cfg, accountId, toolContext }) => {
|
|
92
92
|
const account = resolveBlueBubblesAccount({
|
|
93
|
-
cfg: cfg as
|
|
93
|
+
cfg: cfg as PoolbotConfig,
|
|
94
94
|
accountId: accountId ?? undefined,
|
|
95
95
|
});
|
|
96
96
|
const baseUrl = account.config.serverUrl?.trim();
|
|
97
97
|
const password = account.config.password?.trim();
|
|
98
|
-
const opts = { cfg: cfg as
|
|
98
|
+
const opts = { cfg: cfg as PoolbotConfig, accountId: accountId ?? undefined };
|
|
99
99
|
|
|
100
100
|
// Helper to resolve chatGuid from various params or session context
|
|
101
101
|
const resolveChatGuid = async (): Promise<string> => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import crypto from "node:crypto";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import type {
|
|
3
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
4
4
|
import { resolveBlueBubblesAccount } from "./accounts.js";
|
|
5
5
|
import { resolveChatGuidForTarget } from "./send.js";
|
|
6
6
|
import { parseBlueBubblesTarget, normalizeBlueBubblesHandle } from "./targets.js";
|
|
@@ -16,7 +16,7 @@ export type BlueBubblesAttachmentOpts = {
|
|
|
16
16
|
password?: string;
|
|
17
17
|
accountId?: string;
|
|
18
18
|
timeoutMs?: number;
|
|
19
|
-
cfg?:
|
|
19
|
+
cfg?: PoolbotConfig;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
const DEFAULT_ATTACHMENT_MAX_BYTES = 8 * 1024 * 1024;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChannelAccountSnapshot, ChannelPlugin,
|
|
1
|
+
import type { ChannelAccountSnapshot, ChannelPlugin, PoolbotConfig } from "poolbot/plugin-sdk";
|
|
2
2
|
import {
|
|
3
3
|
applyAccountNameToChannelSection,
|
|
4
4
|
buildChannelConfigSchema,
|
|
@@ -78,13 +78,13 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
78
78
|
configSchema: buildChannelConfigSchema(BlueBubblesConfigSchema),
|
|
79
79
|
onboarding: blueBubblesOnboardingAdapter,
|
|
80
80
|
config: {
|
|
81
|
-
listAccountIds: (cfg) => listBlueBubblesAccountIds(cfg as
|
|
81
|
+
listAccountIds: (cfg) => listBlueBubblesAccountIds(cfg as PoolbotConfig),
|
|
82
82
|
resolveAccount: (cfg, accountId) =>
|
|
83
|
-
resolveBlueBubblesAccount({ cfg: cfg as
|
|
84
|
-
defaultAccountId: (cfg) => resolveDefaultBlueBubblesAccountId(cfg as
|
|
83
|
+
resolveBlueBubblesAccount({ cfg: cfg as PoolbotConfig, accountId }),
|
|
84
|
+
defaultAccountId: (cfg) => resolveDefaultBlueBubblesAccountId(cfg as PoolbotConfig),
|
|
85
85
|
setAccountEnabled: ({ cfg, accountId, enabled }) =>
|
|
86
86
|
setAccountEnabledInConfigSection({
|
|
87
|
-
cfg: cfg as
|
|
87
|
+
cfg: cfg as PoolbotConfig,
|
|
88
88
|
sectionKey: "bluebubbles",
|
|
89
89
|
accountId,
|
|
90
90
|
enabled,
|
|
@@ -92,7 +92,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
92
92
|
}),
|
|
93
93
|
deleteAccount: ({ cfg, accountId }) =>
|
|
94
94
|
deleteAccountFromConfigSection({
|
|
95
|
-
cfg: cfg as
|
|
95
|
+
cfg: cfg as PoolbotConfig,
|
|
96
96
|
sectionKey: "bluebubbles",
|
|
97
97
|
accountId,
|
|
98
98
|
clearBaseFields: ["serverUrl", "password", "name", "webhookPath"],
|
|
@@ -106,7 +106,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
106
106
|
baseUrl: account.baseUrl,
|
|
107
107
|
}),
|
|
108
108
|
resolveAllowFrom: ({ cfg, accountId }) =>
|
|
109
|
-
(resolveBlueBubblesAccount({ cfg: cfg as
|
|
109
|
+
(resolveBlueBubblesAccount({ cfg: cfg as PoolbotConfig, accountId }).config.allowFrom ??
|
|
110
110
|
[]).map(
|
|
111
111
|
(entry) => String(entry),
|
|
112
112
|
),
|
|
@@ -122,7 +122,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
122
122
|
resolveDmPolicy: ({ cfg, accountId, account }) => {
|
|
123
123
|
const resolvedAccountId = accountId ?? account.accountId ?? DEFAULT_ACCOUNT_ID;
|
|
124
124
|
const useAccountPath = Boolean(
|
|
125
|
-
(cfg as
|
|
125
|
+
(cfg as PoolbotConfig).channels?.bluebubbles?.accounts?.[resolvedAccountId],
|
|
126
126
|
);
|
|
127
127
|
const basePath = useAccountPath
|
|
128
128
|
? `channels.bluebubbles.accounts.${resolvedAccountId}.`
|
|
@@ -207,7 +207,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
207
207
|
resolveAccountId: ({ accountId }) => normalizeAccountId(accountId),
|
|
208
208
|
applyAccountName: ({ cfg, accountId, name }) =>
|
|
209
209
|
applyAccountNameToChannelSection({
|
|
210
|
-
cfg: cfg as
|
|
210
|
+
cfg: cfg as PoolbotConfig,
|
|
211
211
|
channelKey: "bluebubbles",
|
|
212
212
|
accountId,
|
|
213
213
|
name,
|
|
@@ -222,7 +222,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
222
222
|
},
|
|
223
223
|
applyAccountConfig: ({ cfg, accountId, input }) => {
|
|
224
224
|
const namedConfig = applyAccountNameToChannelSection({
|
|
225
|
-
cfg: cfg as
|
|
225
|
+
cfg: cfg as PoolbotConfig,
|
|
226
226
|
channelKey: "bluebubbles",
|
|
227
227
|
accountId,
|
|
228
228
|
name: input.name,
|
|
@@ -247,7 +247,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
247
247
|
...(input.webhookPath ? { webhookPath: input.webhookPath } : {}),
|
|
248
248
|
},
|
|
249
249
|
},
|
|
250
|
-
} as
|
|
250
|
+
} as PoolbotConfig;
|
|
251
251
|
}
|
|
252
252
|
return {
|
|
253
253
|
...next,
|
|
@@ -268,7 +268,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
268
268
|
},
|
|
269
269
|
},
|
|
270
270
|
},
|
|
271
|
-
} as
|
|
271
|
+
} as PoolbotConfig;
|
|
272
272
|
},
|
|
273
273
|
},
|
|
274
274
|
pairing: {
|
|
@@ -276,7 +276,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
276
276
|
normalizeAllowEntry: (entry) => normalizeBlueBubblesHandle(entry.replace(/^bluebubbles:/i, "")),
|
|
277
277
|
notifyApproval: async ({ cfg, id }) => {
|
|
278
278
|
await sendMessageBlueBubbles(id, PAIRING_APPROVED_MESSAGE, {
|
|
279
|
-
cfg: cfg as
|
|
279
|
+
cfg: cfg as PoolbotConfig,
|
|
280
280
|
});
|
|
281
281
|
},
|
|
282
282
|
},
|
|
@@ -300,7 +300,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
300
300
|
? resolveBlueBubblesMessageId(rawReplyToId, { requireKnownShortId: true })
|
|
301
301
|
: "";
|
|
302
302
|
const result = await sendMessageBlueBubbles(to, text, {
|
|
303
|
-
cfg: cfg as
|
|
303
|
+
cfg: cfg as PoolbotConfig,
|
|
304
304
|
accountId: accountId ?? undefined,
|
|
305
305
|
replyToMessageGuid: replyToMessageGuid || undefined,
|
|
306
306
|
});
|
|
@@ -317,7 +317,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
317
317
|
};
|
|
318
318
|
const resolvedCaption = caption ?? text;
|
|
319
319
|
const result = await sendBlueBubblesMedia({
|
|
320
|
-
cfg: cfg as
|
|
320
|
+
cfg: cfg as PoolbotConfig,
|
|
321
321
|
to,
|
|
322
322
|
mediaUrl,
|
|
323
323
|
mediaPath,
|
|
@@ -388,7 +388,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
388
388
|
ctx.log?.info(`[${account.accountId}] starting provider (webhook=${webhookPath})`);
|
|
389
389
|
return monitorBlueBubblesProvider({
|
|
390
390
|
account,
|
|
391
|
-
config: ctx.cfg as
|
|
391
|
+
config: ctx.cfg as PoolbotConfig,
|
|
392
392
|
runtime: ctx.runtime,
|
|
393
393
|
abortSignal: ctx.abortSignal,
|
|
394
394
|
statusSink: (patch) => ctx.setStatus({ accountId: ctx.accountId, ...patch }),
|