@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
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
import { listTlonAccountIds, resolveTlonAccount } from "./types.js";
|
|
11
11
|
import type { TlonResolvedAccount } from "./types.js";
|
|
12
|
-
import type {
|
|
12
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
13
13
|
|
|
14
14
|
const channel = "tlon" as const;
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@ function isConfigured(account: TlonResolvedAccount): boolean {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
function applyAccountConfig(params: {
|
|
21
|
-
cfg:
|
|
21
|
+
cfg: PoolbotConfig;
|
|
22
22
|
accountId: string;
|
|
23
23
|
input: {
|
|
24
24
|
name?: string;
|
|
@@ -29,7 +29,7 @@ function applyAccountConfig(params: {
|
|
|
29
29
|
dmAllowlist?: string[];
|
|
30
30
|
autoDiscoverChannels?: boolean;
|
|
31
31
|
};
|
|
32
|
-
}):
|
|
32
|
+
}): PoolbotConfig {
|
|
33
33
|
const { cfg, accountId, input } = params;
|
|
34
34
|
const useDefault = accountId === DEFAULT_ACCOUNT_ID;
|
|
35
35
|
const base = cfg.channels?.tlon ?? {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
2
2
|
|
|
3
3
|
export type TlonResolvedAccount = {
|
|
4
4
|
accountId: string;
|
|
@@ -14,7 +14,7 @@ export type TlonResolvedAccount = {
|
|
|
14
14
|
showModelSignature: boolean | null;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export function resolveTlonAccount(cfg:
|
|
17
|
+
export function resolveTlonAccount(cfg: PoolbotConfig, accountId?: string | null): TlonResolvedAccount {
|
|
18
18
|
const base = cfg.channels?.tlon as
|
|
19
19
|
| {
|
|
20
20
|
name?: string;
|
|
@@ -75,7 +75,7 @@ export function resolveTlonAccount(cfg: MoltbotConfig, accountId?: string | null
|
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
export function listTlonAccountIds(cfg:
|
|
78
|
+
export function listTlonAccountIds(cfg: PoolbotConfig): string[] {
|
|
79
79
|
const base = cfg.channels?.tlon as
|
|
80
80
|
| { ship?: string; accounts?: Record<string, Record<string, unknown>> }
|
|
81
81
|
| undefined;
|
|
@@ -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 { twitchPlugin } from "./src/plugin.js";
|
|
@@ -11,7 +11,7 @@ const plugin = {
|
|
|
11
11
|
name: "Twitch",
|
|
12
12
|
description: "Twitch channel plugin",
|
|
13
13
|
configSchema: emptyPluginConfigSchema(),
|
|
14
|
-
register(api:
|
|
14
|
+
register(api: PoolbotPluginApi) {
|
|
15
15
|
setTwitchRuntime(api.runtime);
|
|
16
16
|
api.registerChannel({ plugin: twitchPlugin as any });
|
|
17
17
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
2
2
|
import type { TwitchAccountConfig } from "./types.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -24,7 +24,7 @@ export function getAccountConfig(
|
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const cfg = coreConfig as
|
|
27
|
+
const cfg = coreConfig as PoolbotConfig;
|
|
28
28
|
const twitch = cfg.channels?.twitch;
|
|
29
29
|
// Access accounts via unknown to handle union type (single-account vs multi-account)
|
|
30
30
|
const twitchRaw = twitch as Record<string, unknown> | undefined;
|
|
@@ -88,7 +88,7 @@ export function getAccountConfig(
|
|
|
88
88
|
*
|
|
89
89
|
* Includes both explicit accounts and implicit "default" from base-level config
|
|
90
90
|
*/
|
|
91
|
-
export function listAccountIds(cfg:
|
|
91
|
+
export function listAccountIds(cfg: PoolbotConfig): string[] {
|
|
92
92
|
const twitch = cfg.channels?.twitch;
|
|
93
93
|
// Access accounts via unknown to handle union type (single-account vs multi-account)
|
|
94
94
|
const twitchRaw = twitch as Record<string, unknown> | undefined;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* resolves agent routes, and handles replies.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ReplyPayload,
|
|
8
|
+
import type { ReplyPayload, PoolbotConfig } from "poolbot/plugin-sdk";
|
|
9
9
|
import type { TwitchAccountConfig, TwitchChatMessage } from "./types.js";
|
|
10
10
|
import { checkTwitchAccessControl } from "./access-control.js";
|
|
11
11
|
import { getTwitchRuntime } from "./runtime.js";
|
|
@@ -20,7 +20,7 @@ export type TwitchRuntimeEnv = {
|
|
|
20
20
|
export type TwitchMonitorOptions = {
|
|
21
21
|
account: TwitchAccountConfig;
|
|
22
22
|
accountId: string;
|
|
23
|
-
config: unknown; //
|
|
23
|
+
config: unknown; // PoolbotConfig
|
|
24
24
|
runtime: TwitchRuntimeEnv;
|
|
25
25
|
abortSignal: AbortSignal;
|
|
26
26
|
statusSink?: (patch: { lastInboundAt?: number; lastOutboundAt?: number }) => void;
|
|
@@ -45,7 +45,7 @@ async function processTwitchMessage(params: {
|
|
|
45
45
|
statusSink?: (patch: { lastInboundAt?: number; lastOutboundAt?: number }) => void;
|
|
46
46
|
}): Promise<void> {
|
|
47
47
|
const { message, account, accountId, config, runtime, core, statusSink } = params;
|
|
48
|
-
const cfg = config as
|
|
48
|
+
const cfg = config as PoolbotConfig;
|
|
49
49
|
|
|
50
50
|
const route = core.channel.routing.resolveAgentRoute({
|
|
51
51
|
cfg,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { DEFAULT_ACCOUNT_ID, getAccountConfig } from "./config.js";
|
|
13
13
|
import { isAccountConfigured } from "./utils/twitch.js";
|
|
14
14
|
import type { TwitchAccountConfig, TwitchRole } from "./types.js";
|
|
15
|
-
import type {
|
|
15
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
16
16
|
|
|
17
17
|
const channel = "twitch" as const;
|
|
18
18
|
|
|
@@ -20,9 +20,9 @@ const channel = "twitch" as const;
|
|
|
20
20
|
* Set Twitch account configuration
|
|
21
21
|
*/
|
|
22
22
|
function setTwitchAccount(
|
|
23
|
-
cfg:
|
|
23
|
+
cfg: PoolbotConfig,
|
|
24
24
|
account: Partial<TwitchAccountConfig>,
|
|
25
|
-
):
|
|
25
|
+
): PoolbotConfig {
|
|
26
26
|
const existing = getAccountConfig(cfg, DEFAULT_ACCOUNT_ID);
|
|
27
27
|
const merged: TwitchAccountConfig = {
|
|
28
28
|
username: account.username ?? existing?.username ?? "",
|
|
@@ -205,13 +205,13 @@ async function promptRefreshTokenSetup(
|
|
|
205
205
|
* Configure with env token path (returns early if user chooses env token).
|
|
206
206
|
*/
|
|
207
207
|
async function configureWithEnvToken(
|
|
208
|
-
cfg:
|
|
208
|
+
cfg: PoolbotConfig,
|
|
209
209
|
prompter: WizardPrompter,
|
|
210
210
|
account: TwitchAccountConfig | null,
|
|
211
211
|
envToken: string,
|
|
212
212
|
forceAllowFrom: boolean,
|
|
213
213
|
dmPolicy: ChannelOnboardingDmPolicy,
|
|
214
|
-
): Promise<{ cfg:
|
|
214
|
+
): Promise<{ cfg: PoolbotConfig } | null> {
|
|
215
215
|
const useEnv = await prompter.confirm({
|
|
216
216
|
message: "Twitch env var CLAWDBOT_TWITCH_ACCESS_TOKEN detected. Use env token?",
|
|
217
217
|
initialValue: true,
|
|
@@ -241,10 +241,10 @@ async function configureWithEnvToken(
|
|
|
241
241
|
* Set Twitch access control (role-based)
|
|
242
242
|
*/
|
|
243
243
|
function setTwitchAccessControl(
|
|
244
|
-
cfg:
|
|
244
|
+
cfg: PoolbotConfig,
|
|
245
245
|
allowedRoles: TwitchRole[],
|
|
246
246
|
requireMention: boolean,
|
|
247
|
-
):
|
|
247
|
+
): PoolbotConfig {
|
|
248
248
|
const account = getAccountConfig(cfg, DEFAULT_ACCOUNT_ID);
|
|
249
249
|
if (!account) {
|
|
250
250
|
return cfg;
|
|
@@ -272,7 +272,7 @@ const dmPolicy: ChannelOnboardingDmPolicy = {
|
|
|
272
272
|
setPolicy: (cfg, policy) => {
|
|
273
273
|
const allowedRoles: TwitchRole[] =
|
|
274
274
|
policy === "open" ? ["all"] : policy === "allowlist" ? [] : ["moderator"];
|
|
275
|
-
return setTwitchAccessControl(cfg as
|
|
275
|
+
return setTwitchAccessControl(cfg as PoolbotConfig, allowedRoles, true);
|
|
276
276
|
},
|
|
277
277
|
promptAllowFrom: async ({ cfg, prompter }) => {
|
|
278
278
|
const account = getAccountConfig(cfg, DEFAULT_ACCOUNT_ID);
|
|
@@ -289,7 +289,7 @@ const dmPolicy: ChannelOnboardingDmPolicy = {
|
|
|
289
289
|
.map((s) => s.trim())
|
|
290
290
|
.filter(Boolean);
|
|
291
291
|
|
|
292
|
-
return setTwitchAccount(cfg as
|
|
292
|
+
return setTwitchAccount(cfg as PoolbotConfig, {
|
|
293
293
|
...(account ?? undefined),
|
|
294
294
|
allowFrom,
|
|
295
295
|
});
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
13
13
|
import { twitchOutbound } from "./outbound.js";
|
|
14
|
-
import type {
|
|
14
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
15
15
|
|
|
16
16
|
// Mock dependencies
|
|
17
17
|
vi.mock("./config.js", () => ({
|
|
@@ -49,7 +49,7 @@ describe("outbound", () => {
|
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
|
-
} as unknown as
|
|
52
|
+
} as unknown as PoolbotConfig;
|
|
53
53
|
|
|
54
54
|
beforeEach(() => {
|
|
55
55
|
vi.clearAllMocks();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
3
3
|
import { twitchPlugin } from "./plugin.js";
|
|
4
4
|
|
|
5
5
|
describe("twitchPlugin.status.buildAccountSnapshot", () => {
|
|
@@ -27,7 +27,7 @@ describe("twitchPlugin.status.buildAccountSnapshot", () => {
|
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
|
-
} as
|
|
30
|
+
} as PoolbotConfig;
|
|
31
31
|
|
|
32
32
|
const snapshot = await twitchPlugin.status?.buildAccountSnapshot?.({
|
|
33
33
|
account: secondary,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Twitch channel plugin for
|
|
2
|
+
* Twitch channel plugin for Poolbot.
|
|
3
3
|
*
|
|
4
4
|
* Main plugin export combining all adapters (outbound, actions, status, gateway).
|
|
5
5
|
* This is the primary entry point for the Twitch channel integration.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type {
|
|
8
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
9
9
|
import { buildChannelConfigSchema } from "poolbot/plugin-sdk";
|
|
10
10
|
import { twitchMessageActions } from "./actions.js";
|
|
11
11
|
import { TwitchConfigSchema } from "./config-schema.js";
|
|
@@ -33,7 +33,7 @@ import type {
|
|
|
33
33
|
* Twitch channel plugin.
|
|
34
34
|
*
|
|
35
35
|
* Implements the ChannelPlugin interface to provide Twitch chat integration
|
|
36
|
-
* for
|
|
36
|
+
* for Poolbot. Supports message sending, receiving, access control, and
|
|
37
37
|
* status monitoring.
|
|
38
38
|
*/
|
|
39
39
|
export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
|
@@ -75,10 +75,10 @@ export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
|
|
75
75
|
/** Account configuration management */
|
|
76
76
|
config: {
|
|
77
77
|
/** List all configured account IDs */
|
|
78
|
-
listAccountIds: (cfg:
|
|
78
|
+
listAccountIds: (cfg: PoolbotConfig): string[] => listAccountIds(cfg),
|
|
79
79
|
|
|
80
80
|
/** Resolve an account config by ID */
|
|
81
|
-
resolveAccount: (cfg:
|
|
81
|
+
resolveAccount: (cfg: PoolbotConfig, accountId?: string | null): TwitchAccountConfig => {
|
|
82
82
|
const account = getAccountConfig(cfg, accountId ?? DEFAULT_ACCOUNT_ID);
|
|
83
83
|
if (!account) {
|
|
84
84
|
// Return a default/empty account if not configured
|
|
@@ -96,7 +96,7 @@ export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
|
|
96
96
|
defaultAccountId: (): string => DEFAULT_ACCOUNT_ID,
|
|
97
97
|
|
|
98
98
|
/** Check if an account is configured */
|
|
99
|
-
isConfigured: (_account: unknown, cfg:
|
|
99
|
+
isConfigured: (_account: unknown, cfg: PoolbotConfig): boolean => {
|
|
100
100
|
const account = getAccountConfig(cfg, DEFAULT_ACCOUNT_ID);
|
|
101
101
|
const tokenResolution = resolveTwitchToken(cfg, { accountId: DEFAULT_ACCOUNT_ID });
|
|
102
102
|
return account ? isAccountConfigured(account, tokenResolution.token) : false;
|
|
@@ -130,7 +130,7 @@ export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
|
|
130
130
|
kind,
|
|
131
131
|
runtime,
|
|
132
132
|
}: {
|
|
133
|
-
cfg:
|
|
133
|
+
cfg: PoolbotConfig;
|
|
134
134
|
accountId?: string | null;
|
|
135
135
|
inputs: string[];
|
|
136
136
|
kind: ChannelResolveKind;
|
|
@@ -198,7 +198,7 @@ export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
|
|
198
198
|
probe,
|
|
199
199
|
}: {
|
|
200
200
|
account: TwitchAccountConfig;
|
|
201
|
-
cfg:
|
|
201
|
+
cfg: PoolbotConfig;
|
|
202
202
|
runtime?: ChannelAccountSnapshot;
|
|
203
203
|
probe?: unknown;
|
|
204
204
|
}): ChannelAccountSnapshot => {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
14
14
|
import { sendMessageTwitchInternal } from "./send.js";
|
|
15
|
-
import type {
|
|
15
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
16
16
|
|
|
17
17
|
// Mock dependencies
|
|
18
18
|
vi.mock("./config.js", () => ({
|
|
@@ -57,7 +57,7 @@ describe("send", () => {
|
|
|
57
57
|
},
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
|
-
} as unknown as
|
|
60
|
+
} as unknown as PoolbotConfig;
|
|
61
61
|
|
|
62
62
|
beforeEach(() => {
|
|
63
63
|
vi.clearAllMocks();
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { DEFAULT_ACCOUNT_ID, getAccountConfig } from "./config.js";
|
|
9
9
|
import { getClientManager as getRegistryClientManager } from "./client-manager-registry.js";
|
|
10
|
-
import type {
|
|
10
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
11
11
|
import { resolveTwitchToken } from "./token.js";
|
|
12
12
|
import { stripMarkdownForTwitch } from "./utils/markdown.js";
|
|
13
13
|
import { generateMessageId, isAccountConfigured, normalizeTwitchChannel } from "./utils/twitch.js";
|
|
@@ -27,12 +27,12 @@ export interface SendMessageResult {
|
|
|
27
27
|
/**
|
|
28
28
|
* Internal send function used by the outbound adapter.
|
|
29
29
|
*
|
|
30
|
-
* This function has access to the full
|
|
30
|
+
* This function has access to the full Poolbot config and handles
|
|
31
31
|
* account resolution, markdown stripping, and actual message sending.
|
|
32
32
|
*
|
|
33
33
|
* @param channel - The channel name
|
|
34
34
|
* @param text - The message text
|
|
35
|
-
* @param cfg - Full
|
|
35
|
+
* @param cfg - Full Poolbot configuration
|
|
36
36
|
* @param accountId - Account ID to use
|
|
37
37
|
* @param stripMarkdown - Whether to strip markdown (default: true)
|
|
38
38
|
* @param logger - Logger instance
|
|
@@ -51,7 +51,7 @@ export interface SendMessageResult {
|
|
|
51
51
|
export async function sendMessageTwitchInternal(
|
|
52
52
|
channel: string,
|
|
53
53
|
text: string,
|
|
54
|
-
cfg:
|
|
54
|
+
cfg: PoolbotConfig,
|
|
55
55
|
accountId: string = DEFAULT_ACCOUNT_ID,
|
|
56
56
|
stripMarkdown: boolean = true,
|
|
57
57
|
logger: Console = console,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
12
12
|
import { resolveTwitchToken, type TwitchTokenSource } from "./token.js";
|
|
13
|
-
import type {
|
|
13
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
14
14
|
|
|
15
15
|
describe("token", () => {
|
|
16
16
|
// Multi-account config for testing non-default accounts
|
|
@@ -29,7 +29,7 @@ describe("token", () => {
|
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
|
-
} as unknown as
|
|
32
|
+
} as unknown as PoolbotConfig;
|
|
33
33
|
|
|
34
34
|
// Simplified single-account config
|
|
35
35
|
const mockSimplifiedConfig = {
|
|
@@ -39,7 +39,7 @@ describe("token", () => {
|
|
|
39
39
|
accessToken: "oauth:config-token",
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
|
-
} as unknown as
|
|
42
|
+
} as unknown as PoolbotConfig;
|
|
43
43
|
|
|
44
44
|
beforeEach(() => {
|
|
45
45
|
vi.clearAllMocks();
|
|
@@ -85,7 +85,7 @@ describe("token", () => {
|
|
|
85
85
|
accessToken: "",
|
|
86
86
|
},
|
|
87
87
|
},
|
|
88
|
-
} as unknown as
|
|
88
|
+
} as unknown as PoolbotConfig;
|
|
89
89
|
|
|
90
90
|
const result = resolveTwitchToken(configWithEmptyToken, { accountId: "default" });
|
|
91
91
|
|
|
@@ -101,7 +101,7 @@ describe("token", () => {
|
|
|
101
101
|
accessToken: "",
|
|
102
102
|
},
|
|
103
103
|
},
|
|
104
|
-
} as unknown as
|
|
104
|
+
} as unknown as PoolbotConfig;
|
|
105
105
|
|
|
106
106
|
const result = resolveTwitchToken(configWithoutToken, { accountId: "default" });
|
|
107
107
|
|
|
@@ -123,7 +123,7 @@ describe("token", () => {
|
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
125
|
},
|
|
126
|
-
} as unknown as
|
|
126
|
+
} as unknown as PoolbotConfig;
|
|
127
127
|
|
|
128
128
|
const result = resolveTwitchToken(configWithoutToken, { accountId: "secondary" });
|
|
129
129
|
|
|
@@ -139,7 +139,7 @@ describe("token", () => {
|
|
|
139
139
|
accounts: {},
|
|
140
140
|
},
|
|
141
141
|
},
|
|
142
|
-
} as unknown as
|
|
142
|
+
} as unknown as PoolbotConfig;
|
|
143
143
|
|
|
144
144
|
const result = resolveTwitchToken(configWithoutAccount, { accountId: "nonexistent" });
|
|
145
145
|
|
|
@@ -150,7 +150,7 @@ describe("token", () => {
|
|
|
150
150
|
it("should handle missing Twitch config section", () => {
|
|
151
151
|
const configWithoutSection = {
|
|
152
152
|
channels: {},
|
|
153
|
-
} as unknown as
|
|
153
|
+
} as unknown as PoolbotConfig;
|
|
154
154
|
|
|
155
155
|
const result = resolveTwitchToken(configWithoutSection, { accountId: "default" });
|
|
156
156
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 2. Environment variable: CLAWDBOT_TWITCH_ACCESS_TOKEN (default account only)
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import type {
|
|
12
|
+
import type { PoolbotConfig } from "../../../src/config/config.js";
|
|
13
13
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../../../src/routing/session-key.js";
|
|
14
14
|
|
|
15
15
|
export type TwitchTokenSource = "env" | "config" | "none";
|
|
@@ -40,12 +40,12 @@ function normalizeTwitchToken(raw?: string | null): string | undefined {
|
|
|
40
40
|
* The getAccountConfig function handles merging base-level config with accounts.default,
|
|
41
41
|
* so this logic works for both simplified and multi-account patterns.
|
|
42
42
|
*
|
|
43
|
-
* @param cfg -
|
|
43
|
+
* @param cfg - Poolbot config
|
|
44
44
|
* @param opts - Options including accountId and optional envToken override
|
|
45
45
|
* @returns Token resolution with source
|
|
46
46
|
*/
|
|
47
47
|
export function resolveTwitchToken(
|
|
48
|
-
cfg?:
|
|
48
|
+
cfg?: PoolbotConfig,
|
|
49
49
|
opts: { accountId?: string | null; envToken?: string | null } = {},
|
|
50
50
|
): TwitchTokenResolution {
|
|
51
51
|
const accountId = normalizeAccountId(opts.accountId);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RefreshingAuthProvider, StaticAuthProvider } from "@twurple/auth";
|
|
2
2
|
import { ChatClient, LogLevel } from "@twurple/chat";
|
|
3
|
-
import type {
|
|
3
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
4
4
|
import type { ChannelLogSink, TwitchAccountConfig, TwitchChatMessage } from "./types.js";
|
|
5
5
|
import { resolveTwitchToken } from "./token.js";
|
|
6
6
|
import { normalizeToken } from "./utils/twitch.js";
|
|
@@ -76,7 +76,7 @@ export class TwitchClientManager {
|
|
|
76
76
|
*/
|
|
77
77
|
async getClient(
|
|
78
78
|
account: TwitchAccountConfig,
|
|
79
|
-
cfg?:
|
|
79
|
+
cfg?: PoolbotConfig,
|
|
80
80
|
accountId?: string,
|
|
81
81
|
): Promise<ChatClient> {
|
|
82
82
|
const key = this.getAccountKey(account);
|
|
@@ -236,7 +236,7 @@ export class TwitchClientManager {
|
|
|
236
236
|
account: TwitchAccountConfig,
|
|
237
237
|
channel: string,
|
|
238
238
|
message: string,
|
|
239
|
-
cfg?:
|
|
239
|
+
cfg?: PoolbotConfig,
|
|
240
240
|
accountId?: string,
|
|
241
241
|
): Promise<{ ok: boolean; error?: string; messageId?: string }> {
|
|
242
242
|
try {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Twitch channel plugin types.
|
|
3
3
|
*
|
|
4
4
|
* This file defines Twitch-specific types. Generic channel types are imported
|
|
5
|
-
* from
|
|
5
|
+
* from Poolbot core.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type {
|
|
@@ -22,7 +22,7 @@ import type {
|
|
|
22
22
|
ChannelResolveResult,
|
|
23
23
|
ChannelStatusAdapter,
|
|
24
24
|
} from "../../../src/channels/plugins/types.adapters.js";
|
|
25
|
-
import type {
|
|
25
|
+
import type { PoolbotConfig } from "../../../src/config/config.js";
|
|
26
26
|
import type { OutboundDeliveryResult } from "../../../src/infra/outbound/deliver.js";
|
|
27
27
|
import type { RuntimeEnv } from "../../../src/runtime.js";
|
|
28
28
|
|
|
@@ -137,5 +137,5 @@ import type { TwitchConfigSchema } from "./config-schema.js";
|
|
|
137
137
|
import type { z } from "zod";
|
|
138
138
|
export type TwitchConfig = z.infer<typeof TwitchConfigSchema>;
|
|
139
139
|
|
|
140
|
-
export type {
|
|
140
|
+
export type { PoolbotConfig };
|
|
141
141
|
export type { RuntimeEnv };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Markdown utilities for Twitch chat
|
|
3
3
|
*
|
|
4
4
|
* Twitch chat doesn't support markdown formatting, so we strip it before sending.
|
|
5
|
-
* Based on
|
|
5
|
+
* Based on Poolbot's markdownToText in src/agents/tools/web-fetch-utils.ts.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @poolbot/voice-call
|
|
2
2
|
|
|
3
|
-
Official Voice Call plugin for **
|
|
3
|
+
Official Voice Call plugin for **Pool-Bot**.
|
|
4
4
|
|
|
5
5
|
Providers:
|
|
6
6
|
- **Twilio** (Programmable Voice + Media Streams)
|
|
@@ -13,7 +13,7 @@ Plugin system: `https://docs.molt.bot/plugin`
|
|
|
13
13
|
|
|
14
14
|
## Install (local dev)
|
|
15
15
|
|
|
16
|
-
### Option A: install via
|
|
16
|
+
### Option A: install via Pool-Bot (recommended)
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
poolbot plugins install @poolbot/voice-call
|
|
@@ -100,7 +100,7 @@ Notes:
|
|
|
100
100
|
## CLI
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
|
-
poolbot voicecall call --to "+15555550123" --message "Hello from
|
|
103
|
+
poolbot voicecall call --to "+15555550123" --message "Hello from Pool-Bot"
|
|
104
104
|
poolbot voicecall continue --call-id <id> --message "Any questions?"
|
|
105
105
|
poolbot voicecall speak --call-id <id> --message "One moment"
|
|
106
106
|
poolbot voicecall end --call-id <id>
|
|
@@ -86,7 +86,7 @@ function findPackageRoot(startDir: string, name: string): string | null {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
function
|
|
89
|
+
function resolvePoolbotRoot(): string {
|
|
90
90
|
if (coreRootCache) return coreRootCache;
|
|
91
91
|
const override = process.env.MOLTBOT_ROOT?.trim() || process.env.CLAWDBOT_ROOT?.trim();
|
|
92
92
|
if (override) {
|
|
@@ -122,7 +122,7 @@ function resolveMoltbotRoot(): string {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
async function importCoreModule<T>(relativePath: string): Promise<T> {
|
|
125
|
-
const root =
|
|
125
|
+
const root = resolvePoolbotRoot();
|
|
126
126
|
const distPath = path.join(root, "dist", relativePath);
|
|
127
127
|
if (!fs.existsSync(distPath)) {
|
|
128
128
|
throw new Error(
|
|
@@ -12,7 +12,7 @@ import type { VoiceCallConfig } from "./config.js";
|
|
|
12
12
|
export type VoiceResponseParams = {
|
|
13
13
|
/** Voice call config */
|
|
14
14
|
voiceConfig: VoiceCallConfig;
|
|
15
|
-
/** Core
|
|
15
|
+
/** Core Poolbot config */
|
|
16
16
|
coreConfig: CoreConfig;
|
|
17
17
|
/** Call ID for session tracking */
|
|
18
18
|
callId: string;
|
|
@@ -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 { whatsappPlugin } from "./src/channel.js";
|
|
@@ -9,7 +9,7 @@ const plugin = {
|
|
|
9
9
|
name: "WhatsApp",
|
|
10
10
|
description: "WhatsApp channel plugin",
|
|
11
11
|
configSchema: emptyPluginConfigSchema(),
|
|
12
|
-
register(api:
|
|
12
|
+
register(api: PoolbotPluginApi) {
|
|
13
13
|
setWhatsAppRuntime(api.runtime);
|
|
14
14
|
api.registerChannel({ plugin: whatsappPlugin });
|
|
15
15
|
},
|
package/extensions/zalo/index.ts
CHANGED
|
@@ -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 { zaloDock, zaloPlugin } from "./src/channel.js";
|
|
@@ -10,7 +10,7 @@ const plugin = {
|
|
|
10
10
|
name: "Zalo",
|
|
11
11
|
description: "Zalo channel plugin (Bot API)",
|
|
12
12
|
configSchema: emptyPluginConfigSchema(),
|
|
13
|
-
register(api:
|
|
13
|
+
register(api: PoolbotPluginApi) {
|
|
14
14
|
setZaloRuntime(api.runtime);
|
|
15
15
|
api.registerChannel({ plugin: zaloPlugin, dock: zaloDock });
|
|
16
16
|
api.registerHttpHandler(handleZaloWebhookRequest);
|