@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
|
@@ -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;
|
|
@@ -3,7 +3,7 @@ import type { IncomingMessage, ServerResponse } from "node:http";
|
|
|
3
3
|
import { EventEmitter } from "node:events";
|
|
4
4
|
|
|
5
5
|
import { removeAckReactionAfterReply, shouldAckReaction } from "poolbot/plugin-sdk";
|
|
6
|
-
import type {
|
|
6
|
+
import type { PoolbotConfig, PluginRuntime } from "poolbot/plugin-sdk";
|
|
7
7
|
import {
|
|
8
8
|
handleBlueBubblesWebhookRequest,
|
|
9
9
|
registerBlueBubblesWebhookTarget,
|
|
@@ -264,7 +264,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
264
264
|
describe("webhook parsing + auth handling", () => {
|
|
265
265
|
it("rejects non-POST requests", async () => {
|
|
266
266
|
const account = createMockAccount();
|
|
267
|
-
const config:
|
|
267
|
+
const config: PoolbotConfig = {};
|
|
268
268
|
const core = createMockRuntime();
|
|
269
269
|
setBlueBubblesRuntime(core);
|
|
270
270
|
|
|
@@ -287,7 +287,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
287
287
|
|
|
288
288
|
it("accepts POST requests with valid JSON payload", async () => {
|
|
289
289
|
const account = createMockAccount();
|
|
290
|
-
const config:
|
|
290
|
+
const config: PoolbotConfig = {};
|
|
291
291
|
const core = createMockRuntime();
|
|
292
292
|
setBlueBubblesRuntime(core);
|
|
293
293
|
|
|
@@ -323,7 +323,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
323
323
|
|
|
324
324
|
it("rejects requests with invalid JSON", async () => {
|
|
325
325
|
const account = createMockAccount();
|
|
326
|
-
const config:
|
|
326
|
+
const config: PoolbotConfig = {};
|
|
327
327
|
const core = createMockRuntime();
|
|
328
328
|
setBlueBubblesRuntime(core);
|
|
329
329
|
|
|
@@ -346,7 +346,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
346
346
|
|
|
347
347
|
it("authenticates via password query parameter", async () => {
|
|
348
348
|
const account = createMockAccount({ password: "secret-token" });
|
|
349
|
-
const config:
|
|
349
|
+
const config: PoolbotConfig = {};
|
|
350
350
|
const core = createMockRuntime();
|
|
351
351
|
setBlueBubblesRuntime(core);
|
|
352
352
|
|
|
@@ -380,7 +380,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
380
380
|
|
|
381
381
|
it("authenticates via x-password header", async () => {
|
|
382
382
|
const account = createMockAccount({ password: "secret-token" });
|
|
383
|
-
const config:
|
|
383
|
+
const config: PoolbotConfig = {};
|
|
384
384
|
const core = createMockRuntime();
|
|
385
385
|
setBlueBubblesRuntime(core);
|
|
386
386
|
|
|
@@ -418,7 +418,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
418
418
|
|
|
419
419
|
it("rejects unauthorized requests with wrong password", async () => {
|
|
420
420
|
const account = createMockAccount({ password: "secret-token" });
|
|
421
|
-
const config:
|
|
421
|
+
const config: PoolbotConfig = {};
|
|
422
422
|
const core = createMockRuntime();
|
|
423
423
|
setBlueBubblesRuntime(core);
|
|
424
424
|
|
|
@@ -451,7 +451,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
451
451
|
|
|
452
452
|
it("allows localhost requests without authentication", async () => {
|
|
453
453
|
const account = createMockAccount({ password: "secret-token" });
|
|
454
|
-
const config:
|
|
454
|
+
const config: PoolbotConfig = {};
|
|
455
455
|
const core = createMockRuntime();
|
|
456
456
|
setBlueBubblesRuntime(core);
|
|
457
457
|
|
|
@@ -497,7 +497,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
497
497
|
vi.mocked(resolveChatGuidForTarget).mockClear();
|
|
498
498
|
|
|
499
499
|
const account = createMockAccount({ groupPolicy: "open" });
|
|
500
|
-
const config:
|
|
500
|
+
const config: PoolbotConfig = {};
|
|
501
501
|
const core = createMockRuntime();
|
|
502
502
|
setBlueBubblesRuntime(core);
|
|
503
503
|
|
|
@@ -545,7 +545,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
545
545
|
});
|
|
546
546
|
|
|
547
547
|
const account = createMockAccount({ groupPolicy: "open" });
|
|
548
|
-
const config:
|
|
548
|
+
const config: PoolbotConfig = {};
|
|
549
549
|
const core = createMockRuntime();
|
|
550
550
|
setBlueBubblesRuntime(core);
|
|
551
551
|
|
|
@@ -591,7 +591,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
591
591
|
dmPolicy: "allowlist",
|
|
592
592
|
allowFrom: ["+15551234567"],
|
|
593
593
|
});
|
|
594
|
-
const config:
|
|
594
|
+
const config: PoolbotConfig = {};
|
|
595
595
|
const core = createMockRuntime();
|
|
596
596
|
setBlueBubblesRuntime(core);
|
|
597
597
|
|
|
@@ -632,7 +632,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
632
632
|
dmPolicy: "allowlist",
|
|
633
633
|
allowFrom: ["+15559999999"], // Different number
|
|
634
634
|
});
|
|
635
|
-
const config:
|
|
635
|
+
const config: PoolbotConfig = {};
|
|
636
636
|
const core = createMockRuntime();
|
|
637
637
|
setBlueBubblesRuntime(core);
|
|
638
638
|
|
|
@@ -673,7 +673,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
673
673
|
dmPolicy: "pairing",
|
|
674
674
|
allowFrom: ["+15559999999"], // Different number than sender
|
|
675
675
|
});
|
|
676
|
-
const config:
|
|
676
|
+
const config: PoolbotConfig = {};
|
|
677
677
|
const core = createMockRuntime();
|
|
678
678
|
setBlueBubblesRuntime(core);
|
|
679
679
|
|
|
@@ -716,7 +716,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
716
716
|
dmPolicy: "pairing",
|
|
717
717
|
allowFrom: ["+15559999999"], // Different number than sender
|
|
718
718
|
});
|
|
719
|
-
const config:
|
|
719
|
+
const config: PoolbotConfig = {};
|
|
720
720
|
const core = createMockRuntime();
|
|
721
721
|
setBlueBubblesRuntime(core);
|
|
722
722
|
|
|
@@ -757,7 +757,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
757
757
|
dmPolicy: "open",
|
|
758
758
|
allowFrom: [],
|
|
759
759
|
});
|
|
760
|
-
const config:
|
|
760
|
+
const config: PoolbotConfig = {};
|
|
761
761
|
const core = createMockRuntime();
|
|
762
762
|
setBlueBubblesRuntime(core);
|
|
763
763
|
|
|
@@ -794,7 +794,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
794
794
|
const account = createMockAccount({
|
|
795
795
|
dmPolicy: "disabled",
|
|
796
796
|
});
|
|
797
|
-
const config:
|
|
797
|
+
const config: PoolbotConfig = {};
|
|
798
798
|
const core = createMockRuntime();
|
|
799
799
|
setBlueBubblesRuntime(core);
|
|
800
800
|
|
|
@@ -833,7 +833,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
833
833
|
const account = createMockAccount({
|
|
834
834
|
groupPolicy: "open",
|
|
835
835
|
});
|
|
836
|
-
const config:
|
|
836
|
+
const config: PoolbotConfig = {};
|
|
837
837
|
const core = createMockRuntime();
|
|
838
838
|
setBlueBubblesRuntime(core);
|
|
839
839
|
|
|
@@ -871,7 +871,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
871
871
|
const account = createMockAccount({
|
|
872
872
|
groupPolicy: "disabled",
|
|
873
873
|
});
|
|
874
|
-
const config:
|
|
874
|
+
const config: PoolbotConfig = {};
|
|
875
875
|
const core = createMockRuntime();
|
|
876
876
|
setBlueBubblesRuntime(core);
|
|
877
877
|
|
|
@@ -910,7 +910,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
910
910
|
groupPolicy: "allowlist",
|
|
911
911
|
dmPolicy: "open",
|
|
912
912
|
});
|
|
913
|
-
const config:
|
|
913
|
+
const config: PoolbotConfig = {};
|
|
914
914
|
const core = createMockRuntime();
|
|
915
915
|
setBlueBubblesRuntime(core);
|
|
916
916
|
|
|
@@ -949,7 +949,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
949
949
|
groupPolicy: "allowlist",
|
|
950
950
|
groupAllowFrom: ["chat_guid:iMessage;+;chat123456"],
|
|
951
951
|
});
|
|
952
|
-
const config:
|
|
952
|
+
const config: PoolbotConfig = {};
|
|
953
953
|
const core = createMockRuntime();
|
|
954
954
|
setBlueBubblesRuntime(core);
|
|
955
955
|
|
|
@@ -990,7 +990,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
990
990
|
mockMatchesMentionPatterns.mockReturnValue(true);
|
|
991
991
|
|
|
992
992
|
const account = createMockAccount({ groupPolicy: "open" });
|
|
993
|
-
const config:
|
|
993
|
+
const config: PoolbotConfig = {};
|
|
994
994
|
const core = createMockRuntime();
|
|
995
995
|
setBlueBubblesRuntime(core);
|
|
996
996
|
|
|
@@ -1031,7 +1031,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1031
1031
|
mockMatchesMentionPatterns.mockReturnValue(false);
|
|
1032
1032
|
|
|
1033
1033
|
const account = createMockAccount({ groupPolicy: "open" });
|
|
1034
|
-
const config:
|
|
1034
|
+
const config: PoolbotConfig = {};
|
|
1035
1035
|
const core = createMockRuntime();
|
|
1036
1036
|
setBlueBubblesRuntime(core);
|
|
1037
1037
|
|
|
@@ -1069,7 +1069,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1069
1069
|
mockResolveRequireMention.mockReturnValue(false);
|
|
1070
1070
|
|
|
1071
1071
|
const account = createMockAccount({ groupPolicy: "open" });
|
|
1072
|
-
const config:
|
|
1072
|
+
const config: PoolbotConfig = {};
|
|
1073
1073
|
const core = createMockRuntime();
|
|
1074
1074
|
setBlueBubblesRuntime(core);
|
|
1075
1075
|
|
|
@@ -1107,7 +1107,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1107
1107
|
describe("group metadata", () => {
|
|
1108
1108
|
it("includes group subject + members in ctx", async () => {
|
|
1109
1109
|
const account = createMockAccount({ groupPolicy: "open" });
|
|
1110
|
-
const config:
|
|
1110
|
+
const config: PoolbotConfig = {};
|
|
1111
1111
|
const core = createMockRuntime();
|
|
1112
1112
|
setBlueBubblesRuntime(core);
|
|
1113
1113
|
|
|
@@ -1153,7 +1153,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1153
1153
|
describe("reply metadata", () => {
|
|
1154
1154
|
it("surfaces reply fields in ctx when provided", async () => {
|
|
1155
1155
|
const account = createMockAccount({ dmPolicy: "open" });
|
|
1156
|
-
const config:
|
|
1156
|
+
const config: PoolbotConfig = {};
|
|
1157
1157
|
const core = createMockRuntime();
|
|
1158
1158
|
setBlueBubblesRuntime(core);
|
|
1159
1159
|
|
|
@@ -1201,7 +1201,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1201
1201
|
|
|
1202
1202
|
it("preserves part index prefixes in reply tags when short IDs are unavailable", async () => {
|
|
1203
1203
|
const account = createMockAccount({ dmPolicy: "open" });
|
|
1204
|
-
const config:
|
|
1204
|
+
const config: PoolbotConfig = {};
|
|
1205
1205
|
const core = createMockRuntime();
|
|
1206
1206
|
setBlueBubblesRuntime(core);
|
|
1207
1207
|
|
|
@@ -1246,7 +1246,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1246
1246
|
|
|
1247
1247
|
it("hydrates missing reply sender/body from the recent-message cache", async () => {
|
|
1248
1248
|
const account = createMockAccount({ dmPolicy: "open", groupPolicy: "open" });
|
|
1249
|
-
const config:
|
|
1249
|
+
const config: PoolbotConfig = {};
|
|
1250
1250
|
const core = createMockRuntime();
|
|
1251
1251
|
setBlueBubblesRuntime(core);
|
|
1252
1252
|
|
|
@@ -1316,7 +1316,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1316
1316
|
|
|
1317
1317
|
it("falls back to threadOriginatorGuid when reply metadata is absent", async () => {
|
|
1318
1318
|
const account = createMockAccount({ dmPolicy: "open" });
|
|
1319
|
-
const config:
|
|
1319
|
+
const config: PoolbotConfig = {};
|
|
1320
1320
|
const core = createMockRuntime();
|
|
1321
1321
|
setBlueBubblesRuntime(core);
|
|
1322
1322
|
|
|
@@ -1357,7 +1357,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1357
1357
|
describe("tapback text parsing", () => {
|
|
1358
1358
|
it("does not rewrite tapback-like text without metadata", async () => {
|
|
1359
1359
|
const account = createMockAccount({ dmPolicy: "open" });
|
|
1360
|
-
const config:
|
|
1360
|
+
const config: PoolbotConfig = {};
|
|
1361
1361
|
const core = createMockRuntime();
|
|
1362
1362
|
setBlueBubblesRuntime(core);
|
|
1363
1363
|
|
|
@@ -1397,7 +1397,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1397
1397
|
|
|
1398
1398
|
it("parses tapback text with custom emoji when metadata is present", async () => {
|
|
1399
1399
|
const account = createMockAccount({ dmPolicy: "open" });
|
|
1400
|
-
const config:
|
|
1400
|
+
const config: PoolbotConfig = {};
|
|
1401
1401
|
const core = createMockRuntime();
|
|
1402
1402
|
setBlueBubblesRuntime(core);
|
|
1403
1403
|
|
|
@@ -1442,7 +1442,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1442
1442
|
vi.mocked(sendBlueBubblesReaction).mockClear();
|
|
1443
1443
|
|
|
1444
1444
|
const account = createMockAccount({ dmPolicy: "open" });
|
|
1445
|
-
const config:
|
|
1445
|
+
const config: PoolbotConfig = {
|
|
1446
1446
|
messages: {
|
|
1447
1447
|
ackReaction: "❤️",
|
|
1448
1448
|
ackReactionScope: "direct",
|
|
@@ -1500,7 +1500,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1500
1500
|
groupPolicy: "open",
|
|
1501
1501
|
allowFrom: ["+15551234567"],
|
|
1502
1502
|
});
|
|
1503
|
-
const config:
|
|
1503
|
+
const config: PoolbotConfig = {};
|
|
1504
1504
|
const core = createMockRuntime();
|
|
1505
1505
|
setBlueBubblesRuntime(core);
|
|
1506
1506
|
|
|
@@ -1543,7 +1543,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1543
1543
|
groupPolicy: "open",
|
|
1544
1544
|
allowFrom: [], // No one authorized
|
|
1545
1545
|
});
|
|
1546
|
-
const config:
|
|
1546
|
+
const config: PoolbotConfig = {};
|
|
1547
1547
|
const core = createMockRuntime();
|
|
1548
1548
|
setBlueBubblesRuntime(core);
|
|
1549
1549
|
|
|
@@ -1586,7 +1586,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1586
1586
|
const account = createMockAccount({
|
|
1587
1587
|
sendReadReceipts: true,
|
|
1588
1588
|
});
|
|
1589
|
-
const config:
|
|
1589
|
+
const config: PoolbotConfig = {};
|
|
1590
1590
|
const core = createMockRuntime();
|
|
1591
1591
|
setBlueBubblesRuntime(core);
|
|
1592
1592
|
|
|
@@ -1627,7 +1627,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1627
1627
|
const account = createMockAccount({
|
|
1628
1628
|
sendReadReceipts: false,
|
|
1629
1629
|
});
|
|
1630
|
-
const config:
|
|
1630
|
+
const config: PoolbotConfig = {};
|
|
1631
1631
|
const core = createMockRuntime();
|
|
1632
1632
|
setBlueBubblesRuntime(core);
|
|
1633
1633
|
|
|
@@ -1666,7 +1666,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1666
1666
|
vi.mocked(sendBlueBubblesTyping).mockClear();
|
|
1667
1667
|
|
|
1668
1668
|
const account = createMockAccount();
|
|
1669
|
-
const config:
|
|
1669
|
+
const config: PoolbotConfig = {};
|
|
1670
1670
|
const core = createMockRuntime();
|
|
1671
1671
|
setBlueBubblesRuntime(core);
|
|
1672
1672
|
|
|
@@ -1714,7 +1714,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1714
1714
|
vi.mocked(sendBlueBubblesTyping).mockClear();
|
|
1715
1715
|
|
|
1716
1716
|
const account = createMockAccount();
|
|
1717
|
-
const config:
|
|
1717
|
+
const config: PoolbotConfig = {};
|
|
1718
1718
|
const core = createMockRuntime();
|
|
1719
1719
|
setBlueBubblesRuntime(core);
|
|
1720
1720
|
|
|
@@ -1763,7 +1763,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1763
1763
|
vi.mocked(sendBlueBubblesTyping).mockClear();
|
|
1764
1764
|
|
|
1765
1765
|
const account = createMockAccount();
|
|
1766
|
-
const config:
|
|
1766
|
+
const config: PoolbotConfig = {};
|
|
1767
1767
|
const core = createMockRuntime();
|
|
1768
1768
|
setBlueBubblesRuntime(core);
|
|
1769
1769
|
|
|
@@ -1813,7 +1813,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1813
1813
|
});
|
|
1814
1814
|
|
|
1815
1815
|
const account = createMockAccount();
|
|
1816
|
-
const config:
|
|
1816
|
+
const config: PoolbotConfig = {};
|
|
1817
1817
|
const core = createMockRuntime();
|
|
1818
1818
|
setBlueBubblesRuntime(core);
|
|
1819
1819
|
|
|
@@ -1859,7 +1859,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1859
1859
|
mockEnqueueSystemEvent.mockClear();
|
|
1860
1860
|
|
|
1861
1861
|
const account = createMockAccount();
|
|
1862
|
-
const config:
|
|
1862
|
+
const config: PoolbotConfig = {};
|
|
1863
1863
|
const core = createMockRuntime();
|
|
1864
1864
|
setBlueBubblesRuntime(core);
|
|
1865
1865
|
|
|
@@ -1899,7 +1899,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1899
1899
|
mockEnqueueSystemEvent.mockClear();
|
|
1900
1900
|
|
|
1901
1901
|
const account = createMockAccount();
|
|
1902
|
-
const config:
|
|
1902
|
+
const config: PoolbotConfig = {};
|
|
1903
1903
|
const core = createMockRuntime();
|
|
1904
1904
|
setBlueBubblesRuntime(core);
|
|
1905
1905
|
|
|
@@ -1939,7 +1939,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1939
1939
|
mockEnqueueSystemEvent.mockClear();
|
|
1940
1940
|
|
|
1941
1941
|
const account = createMockAccount();
|
|
1942
|
-
const config:
|
|
1942
|
+
const config: PoolbotConfig = {};
|
|
1943
1943
|
const core = createMockRuntime();
|
|
1944
1944
|
setBlueBubblesRuntime(core);
|
|
1945
1945
|
|
|
@@ -1976,7 +1976,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
1976
1976
|
mockEnqueueSystemEvent.mockClear();
|
|
1977
1977
|
|
|
1978
1978
|
const account = createMockAccount();
|
|
1979
|
-
const config:
|
|
1979
|
+
const config: PoolbotConfig = {};
|
|
1980
1980
|
const core = createMockRuntime();
|
|
1981
1981
|
setBlueBubblesRuntime(core);
|
|
1982
1982
|
|
|
@@ -2017,7 +2017,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
2017
2017
|
describe("short message ID mapping", () => {
|
|
2018
2018
|
it("assigns sequential short IDs to messages", async () => {
|
|
2019
2019
|
const account = createMockAccount({ dmPolicy: "open" });
|
|
2020
|
-
const config:
|
|
2020
|
+
const config: PoolbotConfig = {};
|
|
2021
2021
|
const core = createMockRuntime();
|
|
2022
2022
|
setBlueBubblesRuntime(core);
|
|
2023
2023
|
|
|
@@ -2057,7 +2057,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
2057
2057
|
|
|
2058
2058
|
it("resolves short ID back to UUID", async () => {
|
|
2059
2059
|
const account = createMockAccount({ dmPolicy: "open" });
|
|
2060
|
-
const config:
|
|
2060
|
+
const config: PoolbotConfig = {};
|
|
2061
2061
|
const core = createMockRuntime();
|
|
2062
2062
|
setBlueBubblesRuntime(core);
|
|
2063
2063
|
|
|
@@ -2110,7 +2110,7 @@ describe("BlueBubbles webhook monitor", () => {
|
|
|
2110
2110
|
describe("fromMe messages", () => {
|
|
2111
2111
|
it("ignores messages from self (fromMe=true)", async () => {
|
|
2112
2112
|
const account = createMockAccount();
|
|
2113
|
-
const config:
|
|
2113
|
+
const config: PoolbotConfig = {};
|
|
2114
2114
|
const core = createMockRuntime();
|
|
2115
2115
|
setBlueBubblesRuntime(core);
|
|
2116
2116
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
4
4
|
import {
|
|
5
5
|
logAckFailure,
|
|
6
6
|
logInboundDrop,
|
|
@@ -26,7 +26,7 @@ export type BlueBubblesRuntimeEnv = {
|
|
|
26
26
|
|
|
27
27
|
export type BlueBubblesMonitorOptions = {
|
|
28
28
|
account: ResolvedBlueBubblesAccount;
|
|
29
|
-
config:
|
|
29
|
+
config: PoolbotConfig;
|
|
30
30
|
runtime: BlueBubblesRuntimeEnv;
|
|
31
31
|
abortSignal: AbortSignal;
|
|
32
32
|
statusSink?: (patch: { lastInboundAt?: number; lastOutboundAt?: number }) => void;
|
|
@@ -243,7 +243,7 @@ function logGroupAllowlistHint(params: {
|
|
|
243
243
|
|
|
244
244
|
type WebhookTarget = {
|
|
245
245
|
account: ResolvedBlueBubblesAccount;
|
|
246
|
-
config:
|
|
246
|
+
config: PoolbotConfig;
|
|
247
247
|
runtime: BlueBubblesRuntimeEnv;
|
|
248
248
|
core: BlueBubblesCoreRuntime;
|
|
249
249
|
path: string;
|
|
@@ -340,7 +340,7 @@ const targetDebouncers = new Map<
|
|
|
340
340
|
>();
|
|
341
341
|
|
|
342
342
|
function resolveBlueBubblesDebounceMs(
|
|
343
|
-
config:
|
|
343
|
+
config: PoolbotConfig,
|
|
344
344
|
core: BlueBubblesCoreRuntime,
|
|
345
345
|
): number {
|
|
346
346
|
const inbound = config.messages?.inbound;
|
|
@@ -940,7 +940,7 @@ function maskSecret(value: string): string {
|
|
|
940
940
|
}
|
|
941
941
|
|
|
942
942
|
function resolveBlueBubblesAckReaction(params: {
|
|
943
|
-
cfg:
|
|
943
|
+
cfg: PoolbotConfig;
|
|
944
944
|
agentId: string;
|
|
945
945
|
core: BlueBubblesCoreRuntime;
|
|
946
946
|
runtime: BlueBubblesRuntimeEnv;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
ChannelOnboardingAdapter,
|
|
3
3
|
ChannelOnboardingDmPolicy,
|
|
4
|
-
|
|
4
|
+
PoolbotConfig,
|
|
5
5
|
DmPolicy,
|
|
6
6
|
WizardPrompter,
|
|
7
7
|
} from "poolbot/plugin-sdk";
|
|
@@ -22,7 +22,7 @@ import { parseBlueBubblesAllowTarget, normalizeBlueBubblesHandle } from "./targe
|
|
|
22
22
|
|
|
23
23
|
const channel = "bluebubbles" as const;
|
|
24
24
|
|
|
25
|
-
function setBlueBubblesDmPolicy(cfg:
|
|
25
|
+
function setBlueBubblesDmPolicy(cfg: PoolbotConfig, dmPolicy: DmPolicy): PoolbotConfig {
|
|
26
26
|
const allowFrom =
|
|
27
27
|
dmPolicy === "open" ? addWildcardAllowFrom(cfg.channels?.bluebubbles?.allowFrom) : undefined;
|
|
28
28
|
return {
|
|
@@ -39,10 +39,10 @@ function setBlueBubblesDmPolicy(cfg: MoltbotConfig, dmPolicy: DmPolicy): Moltbot
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function setBlueBubblesAllowFrom(
|
|
42
|
-
cfg:
|
|
42
|
+
cfg: PoolbotConfig,
|
|
43
43
|
accountId: string,
|
|
44
44
|
allowFrom: string[],
|
|
45
|
-
):
|
|
45
|
+
): PoolbotConfig {
|
|
46
46
|
if (accountId === DEFAULT_ACCOUNT_ID) {
|
|
47
47
|
return {
|
|
48
48
|
...cfg,
|
|
@@ -81,10 +81,10 @@ function parseBlueBubblesAllowFromInput(raw: string): string[] {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
async function promptBlueBubblesAllowFrom(params: {
|
|
84
|
-
cfg:
|
|
84
|
+
cfg: PoolbotConfig;
|
|
85
85
|
prompter: WizardPrompter;
|
|
86
86
|
accountId?: string;
|
|
87
|
-
}): Promise<
|
|
87
|
+
}): Promise<PoolbotConfig> {
|
|
88
88
|
const accountId =
|
|
89
89
|
params.accountId && normalizeAccountId(params.accountId)
|
|
90
90
|
? (normalizeAccountId(params.accountId) ?? DEFAULT_ACCOUNT_ID)
|
|
@@ -318,7 +318,7 @@ export const blueBubblesOnboardingAdapter: ChannelOnboardingAdapter = {
|
|
|
318
318
|
[
|
|
319
319
|
"Configure the webhook URL in BlueBubbles Server:",
|
|
320
320
|
"1. Open BlueBubbles Server → Settings → Webhooks",
|
|
321
|
-
"2. Add your
|
|
321
|
+
"2. Add your Poolbot gateway URL + webhook path",
|
|
322
322
|
" Example: https://your-gateway-host:3000/bluebubbles-webhook",
|
|
323
323
|
"3. Enable the webhook and save",
|
|
324
324
|
"",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveBlueBubblesAccount } from "./accounts.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
3
3
|
import { blueBubblesFetchWithTimeout, buildBlueBubblesApiUrl } from "./types.js";
|
|
4
4
|
|
|
5
5
|
export type BlueBubblesReactionOpts = {
|
|
@@ -7,7 +7,7 @@ export type BlueBubblesReactionOpts = {
|
|
|
7
7
|
password?: string;
|
|
8
8
|
accountId?: string;
|
|
9
9
|
timeoutMs?: number;
|
|
10
|
-
cfg?:
|
|
10
|
+
cfg?: PoolbotConfig;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const REACTION_TYPES = new Set([
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
normalizeBlueBubblesHandle,
|
|
7
7
|
parseBlueBubblesTarget,
|
|
8
8
|
} from "./targets.js";
|
|
9
|
-
import type {
|
|
9
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
10
10
|
import {
|
|
11
11
|
blueBubblesFetchWithTimeout,
|
|
12
12
|
buildBlueBubblesApiUrl,
|
|
@@ -18,7 +18,7 @@ export type BlueBubblesSendOpts = {
|
|
|
18
18
|
password?: string;
|
|
19
19
|
accountId?: string;
|
|
20
20
|
timeoutMs?: number;
|
|
21
|
-
cfg?:
|
|
21
|
+
cfg?: PoolbotConfig;
|
|
22
22
|
/** Message GUID to reply to (reply threading) */
|
|
23
23
|
replyToMessageGuid?: string;
|
|
24
24
|
/** Part index for reply (default: 0) */
|
|
@@ -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 { createDiagnosticsOtelService } from "./src/service.js";
|
|
@@ -8,7 +8,7 @@ const plugin = {
|
|
|
8
8
|
name: "Diagnostics OpenTelemetry",
|
|
9
9
|
description: "Export diagnostics events to OpenTelemetry",
|
|
10
10
|
configSchema: emptyPluginConfigSchema(),
|
|
11
|
-
register(api:
|
|
11
|
+
register(api: PoolbotPluginApi) {
|
|
12
12
|
api.registerService(createDiagnosticsOtelService());
|
|
13
13
|
},
|
|
14
14
|
};
|
|
@@ -10,7 +10,7 @@ import { NodeSDK } from "@opentelemetry/sdk-node";
|
|
|
10
10
|
import { ParentBasedSampler, TraceIdRatioBasedSampler } from "@opentelemetry/sdk-trace-base";
|
|
11
11
|
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
|
|
12
12
|
|
|
13
|
-
import type {
|
|
13
|
+
import type { PoolbotPluginService, DiagnosticEventPayload } from "poolbot/plugin-sdk";
|
|
14
14
|
import { onDiagnosticEvent, registerLogTransport } from "poolbot/plugin-sdk";
|
|
15
15
|
|
|
16
16
|
const DEFAULT_SERVICE_NAME = "poolbot";
|
|
@@ -32,7 +32,7 @@ function resolveSampleRate(value: number | undefined): number | undefined {
|
|
|
32
32
|
return value;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export function createDiagnosticsOtelService():
|
|
35
|
+
export function createDiagnosticsOtelService(): PoolbotPluginService {
|
|
36
36
|
let sdk: NodeSDK | null = null;
|
|
37
37
|
let logProvider: LoggerProvider | null = null;
|
|
38
38
|
let stopLogTransport: (() => void) | null = null;
|
|
@@ -562,5 +562,5 @@ export function createDiagnosticsOtelService(): MoltbotPluginService {
|
|
|
562
562
|
sdk = null;
|
|
563
563
|
}
|
|
564
564
|
},
|
|
565
|
-
} satisfies
|
|
565
|
+
} satisfies PoolbotPluginService;
|
|
566
566
|
}
|
|
@@ -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 { discordPlugin } from "./src/channel.js";
|
|
@@ -9,7 +9,7 @@ const plugin = {
|
|
|
9
9
|
name: "Discord",
|
|
10
10
|
description: "Discord channel plugin",
|
|
11
11
|
configSchema: emptyPluginConfigSchema(),
|
|
12
|
-
register(api:
|
|
12
|
+
register(api: PoolbotPluginApi) {
|
|
13
13
|
setDiscordRuntime(api.runtime);
|
|
14
14
|
api.registerChannel({ plugin: discordPlugin });
|
|
15
15
|
},
|