@poolzin/pool-bot 2026.1.39 → 2026.2.1
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/bash-tools.exec.js +76 -25
- package/dist/agents/cli-runner/helpers.js +10 -12
- 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/identity.js +47 -7
- package/dist/agents/memory-search.js +25 -8
- 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 +31 -4
- package/dist/agents/models-config.js +3 -3
- package/dist/agents/models-config.providers.js +147 -39
- package/dist/agents/pi-embedded-block-chunker.js +117 -42
- package/dist/agents/pi-embedded-helpers/errors.js +183 -78
- package/dist/agents/pi-embedded-helpers/openai.js +1 -1
- package/dist/agents/pi-embedded-helpers.js +1 -1
- package/dist/agents/pi-embedded-runner/compact.js +9 -8
- package/dist/agents/pi-embedded-runner/model.js +63 -4
- package/dist/agents/pi-embedded-runner/run/attempt.js +27 -17
- package/dist/agents/pi-embedded-runner/run.js +203 -50
- package/dist/agents/pi-embedded-runner/system-prompt.js +10 -2
- 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-embedded-subscribe.js +118 -29
- 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 +20 -10
- package/dist/agents/pi-tools.read.js +2 -2
- package/dist/agents/poolbot-tools.js +15 -10
- package/dist/agents/sandbox-paths.js +31 -0
- package/dist/agents/session-file-repair.js +83 -0
- package/dist/agents/session-tool-result-guard.js +94 -15
- package/dist/agents/session-transcript-repair.js +68 -0
- package/dist/agents/shell-utils.js +51 -0
- package/dist/agents/skills/bundled-context.js +23 -0
- package/dist/agents/skills/bundled-dir.js +41 -7
- package/dist/agents/skills/frontmatter.js +1 -1
- package/dist/agents/skills/workspace.js +2 -2
- package/dist/agents/skills-install.js +60 -23
- package/dist/agents/subagent-announce.js +79 -34
- 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.conformance.js +14 -0
- package/dist/agents/tool-policy.js +25 -1
- package/dist/agents/tools/browser-tool.js +3 -3
- package/dist/agents/tools/cron-tool.js +166 -19
- package/dist/agents/tools/discord-actions-presence.js +78 -0
- package/dist/agents/tools/image-tool.js +2 -2
- package/dist/agents/tools/memory-tool.js +93 -5
- package/dist/agents/tools/message-tool.js +56 -2
- package/dist/agents/tools/sessions-history-tool.js +69 -1
- package/dist/agents/tools/web-search.js +211 -42
- package/dist/agents/usage.js +23 -1
- package/dist/agents/workspace-run.js +67 -0
- package/dist/agents/workspace-templates.js +44 -0
- package/dist/auto-reply/command-auth.js +121 -6
- package/dist/auto-reply/commands-registry.data.js +1 -1
- package/dist/auto-reply/envelope.js +50 -72
- package/dist/auto-reply/reply/commands-compact.js +1 -0
- package/dist/auto-reply/reply/commands-context-report.js +3 -2
- package/dist/auto-reply/reply/commands-context.js +1 -0
- package/dist/auto-reply/reply/commands-models.js +107 -60
- package/dist/auto-reply/reply/commands-ptt.js +171 -0
- package/dist/auto-reply/reply/commands-session.js +2 -2
- package/dist/auto-reply/reply/get-reply-run.js +16 -5
- package/dist/auto-reply/reply/groups.js +1 -1
- package/dist/auto-reply/reply/inbound-context.js +9 -1
- package/dist/auto-reply/reply/inbound-meta.js +130 -0
- package/dist/auto-reply/reply/model-selection.js +3 -3
- package/dist/auto-reply/reply/untrusted-context.js +15 -0
- package/dist/auto-reply/status.js +1 -1
- package/dist/auto-reply/thinking.js +88 -43
- package/dist/browser/bridge-server.js +13 -0
- package/dist/browser/cdp.helpers.js +38 -24
- package/dist/browser/client-fetch.js +51 -8
- package/dist/browser/config.js +2 -11
- package/dist/browser/extension-relay.js +104 -43
- package/dist/browser/pw-ai.js +1 -1
- package/dist/browser/pw-session.js +143 -8
- package/dist/browser/pw-tools-core.interactions.js +125 -27
- package/dist/browser/pw-tools-core.responses.js +1 -1
- package/dist/browser/pw-tools-core.state.js +1 -1
- package/dist/browser/routes/agent.act.js +86 -41
- package/dist/browser/routes/dispatcher.js +4 -4
- package/dist/browser/screenshot.js +1 -1
- package/dist/browser/server-context.js +2 -2
- package/dist/browser/server.js +13 -0
- 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/channels/reply-prefix.js +8 -1
- package/dist/cli/browser-cli-extension.js +2 -2
- package/dist/cli/cron-cli/register.cron-add.js +61 -40
- package/dist/cli/cron-cli/register.cron-edit.js +60 -34
- package/dist/cli/cron-cli/shared.js +56 -41
- package/dist/cli/dns-cli.js +26 -14
- package/dist/cli/docs-cli.js +1 -1
- package/dist/cli/gateway-cli/dev.js +1 -1
- package/dist/cli/gateway-cli/register.js +37 -19
- package/dist/cli/memory-cli.js +30 -20
- package/dist/cli/nodes-cli/register.canvas.js +1 -1
- package/dist/cli/parse-bytes.js +37 -0
- 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 +173 -52
- package/dist/cli/webhooks-cli.js +5 -5
- package/dist/commands/agent.js +1 -0
- 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-config-flow.js +61 -5
- package/dist/commands/doctor-gateway-services.js +3 -3
- package/dist/commands/doctor-state-migrations.js +1 -1
- package/dist/commands/doctor-update.js +3 -3
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/health.js +1 -1
- package/dist/commands/model-allowlist.js +29 -0
- package/dist/commands/model-picker.js +2 -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 +44 -24
- package/dist/commands/models/shared.js +15 -0
- 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-custom.js +384 -0
- package/dist/commands/onboard-non-interactive/local/auth-choice-inference.js +35 -0
- package/dist/commands/onboard-non-interactive/local/auth-choice.js +146 -9
- package/dist/commands/onboard-skills.js +63 -38
- package/dist/commands/openai-model-default.js +41 -0
- 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/defaults.js +3 -2
- package/dist/config/io.js +3 -3
- package/dist/config/paths.js +136 -35
- package/dist/config/plugin-auto-enable.js +21 -5
- package/dist/config/redact-snapshot.js +153 -0
- package/dist/config/schema.field-metadata.js +590 -0
- package/dist/config/schema.js +3 -3
- package/dist/config/sessions/store.js +291 -23
- package/dist/config/types.memory.js +1 -0
- package/dist/config/version.js +4 -4
- package/dist/config/zod-schema.agent-defaults.js +3 -0
- package/dist/config/zod-schema.agent-runtime.js +13 -2
- package/dist/config/zod-schema.providers-core.js +142 -0
- package/dist/config/zod-schema.session.js +3 -0
- package/dist/cron/delivery.js +57 -0
- package/dist/cron/isolated-agent/delivery-target.js +18 -3
- package/dist/cron/isolated-agent/helpers.js +22 -5
- package/dist/cron/isolated-agent/run.js +171 -63
- package/dist/cron/isolated-agent/session.js +2 -0
- package/dist/cron/normalize.js +356 -28
- package/dist/cron/parse.js +10 -5
- package/dist/cron/run-log.js +35 -10
- package/dist/cron/schedule.js +41 -6
- package/dist/cron/service/jobs.js +208 -35
- package/dist/cron/service/ops.js +72 -16
- package/dist/cron/service/state.js +2 -0
- package/dist/cron/service/store.js +386 -14
- package/dist/cron/service/timer.js +390 -147
- package/dist/cron/session-reaper.js +86 -0
- package/dist/cron/store.js +23 -8
- package/dist/cron/validate-timestamp.js +43 -0
- package/dist/daemon/constants.js +7 -7
- package/dist/daemon/inspect.js +6 -6
- package/dist/daemon/systemd-unit.js +1 -1
- package/dist/discord/monitor/agent-components.js +438 -0
- package/dist/discord/monitor/allow-list.js +28 -5
- package/dist/discord/monitor/gateway-registry.js +29 -0
- package/dist/discord/monitor/native-command.js +44 -23
- package/dist/discord/monitor/sender-identity.js +45 -0
- package/dist/discord/pluralkit.js +27 -0
- package/dist/discord/send.outbound.js +92 -5
- package/dist/discord/send.shared.js +60 -23
- package/dist/discord/targets.js +84 -1
- package/dist/entry.js +15 -9
- package/dist/extensionAPI.js +8 -0
- package/dist/gateway/control-ui.js +8 -1
- package/dist/gateway/hooks-mapping.js +3 -0
- package/dist/gateway/hooks.js +65 -0
- package/dist/gateway/live-image-probe.js +1 -66
- package/dist/gateway/net.js +96 -31
- package/dist/gateway/node-command-policy.js +50 -15
- package/dist/gateway/openai-http.js +2 -2
- package/dist/gateway/openresponses-http.js +4 -4
- package/dist/gateway/origin-check.js +56 -0
- package/dist/gateway/protocol/client-info.js +9 -0
- package/dist/gateway/protocol/index.js +9 -2
- package/dist/gateway/protocol/schema/agents-models-skills.js +71 -1
- package/dist/gateway/protocol/schema/cron.js +22 -10
- package/dist/gateway/protocol/schema/protocol-schemas.js +16 -2
- package/dist/gateway/protocol/schema/sessions.js +12 -0
- package/dist/gateway/server/hooks.js +1 -1
- package/dist/gateway/server-broadcast.js +26 -9
- package/dist/gateway/server-chat.js +112 -23
- package/dist/gateway/server-discovery-runtime.js +10 -2
- package/dist/gateway/server-discovery.js +2 -2
- package/dist/gateway/server-http.js +110 -12
- package/dist/gateway/server-methods/agent-timestamp.js +60 -0
- package/dist/gateway/server-methods/agents.js +321 -2
- package/dist/gateway/server-methods/usage.js +559 -16
- package/dist/gateway/server-runtime-state.js +22 -8
- package/dist/gateway/server-startup-memory.js +16 -0
- package/dist/gateway/server.impl.js +7 -3
- package/dist/gateway/session-utils.fs.js +23 -25
- package/dist/gateway/session-utils.js +20 -10
- package/dist/gateway/sessions-patch.js +7 -22
- package/dist/gateway/test-helpers.server.js +35 -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/imessage/constants.js +2 -0
- package/dist/imessage/monitor/deliver.js +4 -1
- package/dist/imessage/monitor/monitor-provider.js +51 -1
- package/dist/index.js +2 -2
- package/dist/infra/bonjour-discovery.js +131 -70
- package/dist/infra/bonjour.js +3 -3
- package/dist/infra/control-ui-assets.js +134 -12
- package/dist/infra/errors.js +12 -0
- package/dist/infra/exec-approvals.js +266 -57
- package/dist/infra/format-time/format-datetime.js +79 -0
- package/dist/infra/format-time/format-duration.js +81 -0
- package/dist/infra/format-time/format-relative.js +80 -0
- package/dist/infra/heartbeat-runner.js +140 -49
- package/dist/infra/home-dir.js +54 -0
- package/dist/infra/net/fetch-guard.js +122 -0
- package/dist/infra/net/ssrf.js +65 -29
- package/dist/infra/outbound/abort.js +14 -0
- package/dist/infra/outbound/message-action-runner.js +77 -13
- package/dist/infra/outbound/outbound-session.js +143 -37
- package/dist/infra/path-env.js +3 -3
- package/dist/infra/poolbot-root.js +43 -1
- package/dist/infra/provider-usage.fetch.minimax.js +1 -1
- package/dist/infra/restart.js +1 -1
- package/dist/infra/session-cost-usage.js +631 -41
- package/dist/infra/state-migrations.js +317 -47
- package/dist/infra/tailscale.js +1 -1
- package/dist/infra/update-global.js +35 -0
- package/dist/infra/update-runner.js +149 -43
- package/dist/infra/warning-filter.js +65 -0
- package/dist/infra/widearea-dns.js +30 -9
- package/dist/logging/redact-identifier.js +12 -0
- package/dist/macos/relay.js +2 -2
- package/dist/media/fetch.js +81 -58
- 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/apply.js +403 -3
- package/dist/media-understanding/attachments.js +38 -27
- package/dist/media-understanding/defaults.js +16 -0
- package/dist/media-understanding/providers/deepgram/audio.js +22 -14
- package/dist/media-understanding/providers/google/audio.js +24 -17
- package/dist/media-understanding/providers/google/video.js +24 -17
- package/dist/media-understanding/providers/image.js +4 -4
- package/dist/media-understanding/providers/index.js +4 -1
- package/dist/media-understanding/providers/openai/audio.js +22 -14
- package/dist/media-understanding/providers/shared.js +16 -11
- package/dist/media-understanding/providers/zai/index.js +6 -0
- package/dist/media-understanding/runner.js +158 -90
- package/dist/memory/backend-config.js +207 -0
- package/dist/memory/batch-voyage.js +277 -0
- package/dist/memory/embeddings-voyage.js +75 -0
- package/dist/memory/embeddings.js +29 -17
- package/dist/memory/internal.js +101 -18
- package/dist/memory/manager.js +155 -48
- package/dist/memory/search-manager.js +173 -0
- package/dist/memory/session-files.js +9 -3
- package/dist/memory/types.js +1 -0
- package/dist/node-host/runner.js +36 -26
- package/dist/node-host/with-timeout.js +27 -0
- package/dist/pairing/pairing-messages.js +1 -1
- package/dist/plugins/commands.js +5 -1
- package/dist/plugins/config-state.js +86 -7
- package/dist/plugins/discovery.js +1 -1
- package/dist/plugins/install.js +2 -2
- package/dist/plugins/source-display.js +51 -0
- package/dist/plugins/update.js +1 -1
- package/dist/process/exec.js +20 -2
- package/dist/routing/resolve-route.js +12 -0
- package/dist/routing/session-key.js +15 -0
- package/dist/runtime.js +2 -0
- package/dist/security/audit-extra.async.js +601 -0
- package/dist/security/audit-extra.js +2 -830
- package/dist/security/audit-extra.sync.js +505 -0
- package/dist/security/audit.js +2 -2
- package/dist/security/channel-metadata.js +34 -0
- package/dist/security/external-content.js +88 -6
- package/dist/security/skill-scanner.js +330 -0
- package/dist/sessions/session-key-utils.js +7 -0
- package/dist/shared/text/reasoning-tags.js +52 -7
- package/dist/signal/monitor/event-handler.js +80 -1
- package/dist/slack/monitor/media.js +85 -15
- package/dist/tailscale/detect.js +145 -0
- package/dist/telegram/bot/helpers.js +109 -28
- package/dist/telegram/bot-handlers.js +144 -3
- package/dist/telegram/bot-message-context.js +38 -11
- package/dist/telegram/bot-message-dispatch.js +48 -15
- package/dist/telegram/bot-native-commands.js +86 -29
- package/dist/telegram/bot.js +30 -29
- package/dist/telegram/model-buttons.js +163 -0
- package/dist/telegram/monitor.js +110 -85
- package/dist/telegram/send.js +129 -47
- package/dist/terminal/restore.js +45 -0
- package/dist/test-helpers/state-dir-env.js +16 -0
- 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/tts/tts.js +12 -6
- package/dist/tui/tui-session-actions.js +166 -54
- package/dist/utils/fetch-timeout.js +20 -0
- package/dist/utils/normalize-secret-input.js +19 -0
- package/dist/utils/shell-argv.js +61 -0
- package/dist/utils/transcript-tools.js +58 -0
- package/dist/utils.js +55 -14
- package/dist/version.js +42 -5
- 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
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 }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import crypto from "node:crypto";
|
|
2
2
|
import { resolveBlueBubblesAccount } from "./accounts.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
4
4
|
import { blueBubblesFetchWithTimeout, buildBlueBubblesApiUrl } from "./types.js";
|
|
5
5
|
|
|
6
6
|
export type BlueBubblesChatOpts = {
|
|
@@ -8,7 +8,7 @@ export type BlueBubblesChatOpts = {
|
|
|
8
8
|
password?: string;
|
|
9
9
|
accountId?: string;
|
|
10
10
|
timeoutMs?: number;
|
|
11
|
-
cfg?:
|
|
11
|
+
cfg?: PoolbotConfig;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
function resolveAccount(params: BlueBubblesChatOpts) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
|
|
4
|
-
import { resolveChannelMediaMaxBytes, type
|
|
4
|
+
import { resolveChannelMediaMaxBytes, type PoolbotConfig } from "poolbot/plugin-sdk";
|
|
5
5
|
|
|
6
6
|
import { sendBlueBubblesAttachment } from "./attachments.js";
|
|
7
7
|
import { resolveBlueBubblesMessageId } from "./monitor.js";
|
|
@@ -49,7 +49,7 @@ function resolveFilenameFromSource(source?: string): string | undefined {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export async function sendBlueBubblesMedia(params: {
|
|
52
|
-
cfg:
|
|
52
|
+
cfg: PoolbotConfig;
|
|
53
53
|
to: string;
|
|
54
54
|
mediaUrl?: string;
|
|
55
55
|
mediaPath?: string;
|