@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { loadWebMedia, resolveChannelMediaMaxBytes } from "poolbot/plugin-sdk";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
3
3
|
import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js";
|
|
4
4
|
import {
|
|
5
5
|
classifyMSTeamsSendError,
|
|
@@ -21,7 +21,7 @@ import { resolveMSTeamsSendContext, type MSTeamsProactiveContext } from "./send-
|
|
|
21
21
|
|
|
22
22
|
export type SendMSTeamsMessageParams = {
|
|
23
23
|
/** Full config (for credentials) */
|
|
24
|
-
cfg:
|
|
24
|
+
cfg: PoolbotConfig;
|
|
25
25
|
/** Conversation ID or user ID to send to */
|
|
26
26
|
to: string;
|
|
27
27
|
/** Message text */
|
|
@@ -48,7 +48,7 @@ const MSTEAMS_MAX_MEDIA_BYTES = 100 * 1024 * 1024;
|
|
|
48
48
|
|
|
49
49
|
export type SendMSTeamsPollParams = {
|
|
50
50
|
/** Full config (for credentials) */
|
|
51
|
-
cfg:
|
|
51
|
+
cfg: PoolbotConfig;
|
|
52
52
|
/** Conversation ID or user ID to send to */
|
|
53
53
|
to: string;
|
|
54
54
|
/** Poll question */
|
|
@@ -67,7 +67,7 @@ export type SendMSTeamsPollResult = {
|
|
|
67
67
|
|
|
68
68
|
export type SendMSTeamsCardParams = {
|
|
69
69
|
/** Full config (for credentials) */
|
|
70
|
-
cfg:
|
|
70
|
+
cfg: PoolbotConfig;
|
|
71
71
|
/** Conversation ID or user ID to send to */
|
|
72
72
|
to: string;
|
|
73
73
|
/** Adaptive Card JSON object */
|
|
@@ -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 { nextcloudTalkPlugin } from "./src/channel.js";
|
|
@@ -9,7 +9,7 @@ const plugin = {
|
|
|
9
9
|
name: "Nextcloud Talk",
|
|
10
10
|
description: "Nextcloud Talk channel plugin",
|
|
11
11
|
configSchema: emptyPluginConfigSchema(),
|
|
12
|
-
register(api:
|
|
12
|
+
register(api: PoolbotPluginApi) {
|
|
13
13
|
setNextcloudTalkRuntime(api.runtime);
|
|
14
14
|
api.registerChannel({ plugin: nextcloudTalkPlugin });
|
|
15
15
|
},
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
normalizeAccountId,
|
|
8
8
|
setAccountEnabledInConfigSection,
|
|
9
9
|
type ChannelPlugin,
|
|
10
|
-
type
|
|
10
|
+
type PoolbotConfig,
|
|
11
11
|
type ChannelSetupInput,
|
|
12
12
|
} from "poolbot/plugin-sdk";
|
|
13
13
|
|
|
@@ -173,7 +173,7 @@ export const nextcloudTalkPlugin: ChannelPlugin<ResolvedNextcloudTalkAccount> =
|
|
|
173
173
|
resolveAccountId: ({ accountId }) => normalizeAccountId(accountId),
|
|
174
174
|
applyAccountName: ({ cfg, accountId, name }) =>
|
|
175
175
|
applyAccountNameToChannelSection({
|
|
176
|
-
cfg: cfg as
|
|
176
|
+
cfg: cfg as PoolbotConfig,
|
|
177
177
|
channelKey: "nextcloud-talk",
|
|
178
178
|
accountId,
|
|
179
179
|
name,
|
|
@@ -194,7 +194,7 @@ export const nextcloudTalkPlugin: ChannelPlugin<ResolvedNextcloudTalkAccount> =
|
|
|
194
194
|
applyAccountConfig: ({ cfg, accountId, input }) => {
|
|
195
195
|
const setupInput = input as NextcloudSetupInput;
|
|
196
196
|
const namedConfig = applyAccountNameToChannelSection({
|
|
197
|
-
cfg: cfg as
|
|
197
|
+
cfg: cfg as PoolbotConfig,
|
|
198
198
|
channelKey: "nextcloud-talk",
|
|
199
199
|
accountId,
|
|
200
200
|
name: setupInput.name,
|
|
@@ -217,7 +217,7 @@ export const nextcloudTalkPlugin: ChannelPlugin<ResolvedNextcloudTalkAccount> =
|
|
|
217
217
|
: {}),
|
|
218
218
|
},
|
|
219
219
|
},
|
|
220
|
-
} as
|
|
220
|
+
} as PoolbotConfig;
|
|
221
221
|
}
|
|
222
222
|
return {
|
|
223
223
|
...namedConfig,
|
|
@@ -241,7 +241,7 @@ export const nextcloudTalkPlugin: ChannelPlugin<ResolvedNextcloudTalkAccount> =
|
|
|
241
241
|
},
|
|
242
242
|
},
|
|
243
243
|
},
|
|
244
|
-
} as
|
|
244
|
+
} as PoolbotConfig;
|
|
245
245
|
},
|
|
246
246
|
},
|
|
247
247
|
outbound: {
|
|
@@ -323,7 +323,7 @@ export const nextcloudTalkPlugin: ChannelPlugin<ResolvedNextcloudTalkAccount> =
|
|
|
323
323
|
return { stop };
|
|
324
324
|
},
|
|
325
325
|
logoutAccount: async ({ accountId, cfg }) => {
|
|
326
|
-
const nextCfg = { ...cfg } as
|
|
326
|
+
const nextCfg = { ...cfg } as PoolbotConfig;
|
|
327
327
|
const nextSection = cfg.channels?.["nextcloud-talk"]
|
|
328
328
|
? { ...cfg.channels["nextcloud-talk"] }
|
|
329
329
|
: undefined;
|
|
@@ -377,7 +377,7 @@ export const nextcloudTalkPlugin: ChannelPlugin<ResolvedNextcloudTalkAccount> =
|
|
|
377
377
|
const nextChannels = { ...nextCfg.channels } as Record<string, unknown>;
|
|
378
378
|
delete nextChannels["nextcloud-talk"];
|
|
379
379
|
if (Object.keys(nextChannels).length > 0) {
|
|
380
|
-
nextCfg.channels = nextChannels as
|
|
380
|
+
nextCfg.channels = nextChannels as PoolbotConfig["channels"];
|
|
381
381
|
} else {
|
|
382
382
|
delete nextCfg.channels;
|
|
383
383
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
logInboundDrop,
|
|
3
3
|
resolveControlCommandGate,
|
|
4
|
-
type
|
|
4
|
+
type PoolbotConfig,
|
|
5
5
|
type RuntimeEnv,
|
|
6
6
|
} from "poolbot/plugin-sdk";
|
|
7
7
|
|
|
@@ -114,7 +114,7 @@ export async function handleNextcloudTalkInbound(params: {
|
|
|
114
114
|
const effectiveGroupAllowFrom = [...baseGroupAllowFrom, ...storeAllowList].filter(Boolean);
|
|
115
115
|
|
|
116
116
|
const allowTextCommands = core.channel.commands.shouldHandleTextCommands({
|
|
117
|
-
cfg: config as
|
|
117
|
+
cfg: config as PoolbotConfig,
|
|
118
118
|
surface: CHANNEL_ID,
|
|
119
119
|
});
|
|
120
120
|
const useAccessGroups = config.commands?.useAccessGroups !== false;
|
|
@@ -125,7 +125,7 @@ export async function handleNextcloudTalkInbound(params: {
|
|
|
125
125
|
}).allowed;
|
|
126
126
|
const hasControlCommand = core.channel.text.hasControlCommand(
|
|
127
127
|
rawBody,
|
|
128
|
-
config as
|
|
128
|
+
config as PoolbotConfig,
|
|
129
129
|
);
|
|
130
130
|
const commandGate = resolveControlCommandGate({
|
|
131
131
|
useAccessGroups,
|
|
@@ -211,7 +211,7 @@ export async function handleNextcloudTalkInbound(params: {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
const mentionRegexes = core.channel.mentions.buildMentionRegexes(
|
|
214
|
-
config as
|
|
214
|
+
config as PoolbotConfig,
|
|
215
215
|
);
|
|
216
216
|
const wasMentioned = mentionRegexes.length
|
|
217
217
|
? core.channel.mentions.matchesMentionPatterns(rawBody, mentionRegexes)
|
|
@@ -236,7 +236,7 @@ export async function handleNextcloudTalkInbound(params: {
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
const route = core.channel.routing.resolveAgentRoute({
|
|
239
|
-
cfg: config as
|
|
239
|
+
cfg: config as PoolbotConfig,
|
|
240
240
|
channel: CHANNEL_ID,
|
|
241
241
|
accountId: account.accountId,
|
|
242
242
|
peer: {
|
|
@@ -252,7 +252,7 @@ export async function handleNextcloudTalkInbound(params: {
|
|
|
252
252
|
agentId: route.agentId,
|
|
253
253
|
});
|
|
254
254
|
const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(
|
|
255
|
-
config as
|
|
255
|
+
config as PoolbotConfig,
|
|
256
256
|
);
|
|
257
257
|
const previousTimestamp = core.channel.session.readSessionUpdatedAt({
|
|
258
258
|
storePath,
|
|
@@ -304,7 +304,7 @@ export async function handleNextcloudTalkInbound(params: {
|
|
|
304
304
|
|
|
305
305
|
await core.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
|
|
306
306
|
ctx: ctxPayload,
|
|
307
|
-
cfg: config as
|
|
307
|
+
cfg: config as PoolbotConfig,
|
|
308
308
|
dispatcherOptions: {
|
|
309
309
|
deliver: async (payload) => {
|
|
310
310
|
await deliverNextcloudTalkReply({
|
|
@@ -43,7 +43,7 @@ async function noteNextcloudTalkSecretHelp(prompter: WizardPrompter): Promise<vo
|
|
|
43
43
|
await prompter.note(
|
|
44
44
|
[
|
|
45
45
|
"1) SSH into your Nextcloud server",
|
|
46
|
-
'2) Run: ./occ talk:bot:install "
|
|
46
|
+
'2) Run: ./occ talk:bot:install "Poolbot" "<shared-secret>" "<webhook-url>" --feature reaction',
|
|
47
47
|
"3) Copy the shared secret you used in the command",
|
|
48
48
|
"4) Enable the bot in your Nextcloud Talk room settings",
|
|
49
49
|
"Tip: you can also set NEXTCLOUD_TALK_BOT_SECRET in your env.",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @poolbot/nostr
|
|
2
2
|
|
|
3
|
-
Nostr DM channel plugin for
|
|
3
|
+
Nostr DM channel plugin for Pool-Bot using NIP-04 encrypted direct messages.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
This extension adds Nostr as a messaging channel to
|
|
7
|
+
This extension adds Nostr as a messaging channel to Pool-Bot. It enables your bot to:
|
|
8
8
|
|
|
9
9
|
- Receive encrypted DMs from Nostr users
|
|
10
10
|
- Send encrypted responses back
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotPluginApi, PoolbotConfig } from "poolbot/plugin-sdk";
|
|
2
2
|
import { emptyPluginConfigSchema } from "poolbot/plugin-sdk";
|
|
3
3
|
|
|
4
4
|
import { nostrPlugin } from "./src/channel.js";
|
|
@@ -12,7 +12,7 @@ const plugin = {
|
|
|
12
12
|
name: "Nostr",
|
|
13
13
|
description: "Nostr DM channel plugin via NIP-04",
|
|
14
14
|
configSchema: emptyPluginConfigSchema(),
|
|
15
|
-
register(api:
|
|
15
|
+
register(api: PoolbotPluginApi) {
|
|
16
16
|
setNostrRuntime(api.runtime);
|
|
17
17
|
api.registerChannel({ plugin: nostrPlugin });
|
|
18
18
|
|
|
@@ -20,13 +20,13 @@ const plugin = {
|
|
|
20
20
|
const httpHandler = createNostrProfileHttpHandler({
|
|
21
21
|
getConfigProfile: (accountId: string) => {
|
|
22
22
|
const runtime = getNostrRuntime();
|
|
23
|
-
const cfg = runtime.config.loadConfig() as
|
|
23
|
+
const cfg = runtime.config.loadConfig() as PoolbotConfig;
|
|
24
24
|
const account = resolveNostrAccount({ cfg, accountId });
|
|
25
25
|
return account.profile;
|
|
26
26
|
},
|
|
27
27
|
updateConfigProfile: async (accountId: string, profile: NostrProfile) => {
|
|
28
28
|
const runtime = getNostrRuntime();
|
|
29
|
-
const cfg = runtime.config.loadConfig() as
|
|
29
|
+
const cfg = runtime.config.loadConfig() as PoolbotConfig;
|
|
30
30
|
|
|
31
31
|
// Build the config patch for channels.nostr.profile
|
|
32
32
|
const channels = (cfg.channels ?? {}) as Record<string, unknown>;
|
|
@@ -49,7 +49,7 @@ const plugin = {
|
|
|
49
49
|
},
|
|
50
50
|
getAccountInfo: (accountId: string) => {
|
|
51
51
|
const runtime = getNostrRuntime();
|
|
52
|
-
const cfg = runtime.config.loadConfig() as
|
|
52
|
+
const cfg = runtime.config.loadConfig() as PoolbotConfig;
|
|
53
53
|
const account = resolveNostrAccount({ cfg, accountId });
|
|
54
54
|
if (!account.configured || !account.publicKey) {
|
|
55
55
|
return null;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@poolbot/nostr",
|
|
3
3
|
"version": "2026.1.26",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Poolbot Nostr channel plugin for NIP-04 encrypted DMs",
|
|
6
6
|
"poolbot": {
|
|
7
7
|
"extensions": [
|
|
8
8
|
"./index.ts"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
2
2
|
import { getPublicKeyFromPrivate } from "./nostr-bus.js";
|
|
3
3
|
import { DEFAULT_RELAYS } from "./nostr-bus.js";
|
|
4
4
|
import type { NostrProfile } from "./config-schema.js";
|
|
@@ -30,7 +30,7 @@ const DEFAULT_ACCOUNT_ID = "default";
|
|
|
30
30
|
/**
|
|
31
31
|
* List all configured Nostr account IDs
|
|
32
32
|
*/
|
|
33
|
-
export function listNostrAccountIds(cfg:
|
|
33
|
+
export function listNostrAccountIds(cfg: PoolbotConfig): string[] {
|
|
34
34
|
const nostrCfg = (cfg.channels as Record<string, unknown> | undefined)?.nostr as
|
|
35
35
|
| NostrAccountConfig
|
|
36
36
|
| undefined;
|
|
@@ -46,7 +46,7 @@ export function listNostrAccountIds(cfg: MoltbotConfig): string[] {
|
|
|
46
46
|
/**
|
|
47
47
|
* Get the default account ID
|
|
48
48
|
*/
|
|
49
|
-
export function resolveDefaultNostrAccountId(cfg:
|
|
49
|
+
export function resolveDefaultNostrAccountId(cfg: PoolbotConfig): string {
|
|
50
50
|
const ids = listNostrAccountIds(cfg);
|
|
51
51
|
if (ids.includes(DEFAULT_ACCOUNT_ID)) return DEFAULT_ACCOUNT_ID;
|
|
52
52
|
return ids[0] ?? DEFAULT_ACCOUNT_ID;
|
|
@@ -56,7 +56,7 @@ export function resolveDefaultNostrAccountId(cfg: MoltbotConfig): string {
|
|
|
56
56
|
* Resolve a Nostr account from config
|
|
57
57
|
*/
|
|
58
58
|
export function resolveNostrAccount(opts: {
|
|
59
|
-
cfg:
|
|
59
|
+
cfg: PoolbotConfig;
|
|
60
60
|
accountId?: string | null;
|
|
61
61
|
}): ResolvedNostrAccount {
|
|
62
62
|
const accountId = opts.accountId ?? DEFAULT_ACCOUNT_ID;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotPluginApi } from "../../src/plugins/types.js";
|
|
2
2
|
|
|
3
|
-
export default function register(_api:
|
|
3
|
+
export default function register(_api: PoolbotPluginApi) {
|
|
4
4
|
// OpenProse is delivered via plugin-shipped skills.
|
|
5
5
|
}
|
|
@@ -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 { signalPlugin } from "./src/channel.js";
|
|
@@ -9,7 +9,7 @@ const plugin = {
|
|
|
9
9
|
name: "Signal",
|
|
10
10
|
description: "Signal channel plugin",
|
|
11
11
|
configSchema: emptyPluginConfigSchema(),
|
|
12
|
-
register(api:
|
|
12
|
+
register(api: PoolbotPluginApi) {
|
|
13
13
|
setSignalRuntime(api.runtime);
|
|
14
14
|
api.registerChannel({ plugin: signalPlugin });
|
|
15
15
|
},
|
|
@@ -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 { slackPlugin } from "./src/channel.js";
|
|
@@ -9,7 +9,7 @@ const plugin = {
|
|
|
9
9
|
name: "Slack",
|
|
10
10
|
description: "Slack channel plugin",
|
|
11
11
|
configSchema: emptyPluginConfigSchema(),
|
|
12
|
-
register(api:
|
|
12
|
+
register(api: PoolbotPluginApi) {
|
|
13
13
|
setSlackRuntime(api.runtime);
|
|
14
14
|
api.registerChannel({ plugin: slackPlugin });
|
|
15
15
|
},
|
|
@@ -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 { telegramPlugin } from "./src/channel.js";
|
|
@@ -9,7 +9,7 @@ const plugin = {
|
|
|
9
9
|
name: "Telegram",
|
|
10
10
|
description: "Telegram channel plugin",
|
|
11
11
|
configSchema: emptyPluginConfigSchema(),
|
|
12
|
-
register(api:
|
|
12
|
+
register(api: PoolbotPluginApi) {
|
|
13
13
|
setTelegramRuntime(api.runtime);
|
|
14
14
|
api.registerChannel({ plugin: telegramPlugin });
|
|
15
15
|
},
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
TelegramConfigSchema,
|
|
24
24
|
type ChannelMessageActionAdapter,
|
|
25
25
|
type ChannelPlugin,
|
|
26
|
-
type
|
|
26
|
+
type PoolbotConfig,
|
|
27
27
|
type ResolvedTelegramAccount,
|
|
28
28
|
} from "poolbot/plugin-sdk";
|
|
29
29
|
|
|
@@ -408,7 +408,7 @@ export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount> = {
|
|
|
408
408
|
},
|
|
409
409
|
logoutAccount: async ({ accountId, cfg }) => {
|
|
410
410
|
const envToken = process.env.TELEGRAM_BOT_TOKEN?.trim() ?? "";
|
|
411
|
-
const nextCfg = { ...cfg } as
|
|
411
|
+
const nextCfg = { ...cfg } as PoolbotConfig;
|
|
412
412
|
const nextTelegram = cfg.channels?.telegram ? { ...cfg.channels.telegram } : undefined;
|
|
413
413
|
let cleared = false;
|
|
414
414
|
let changed = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# Tlon (
|
|
1
|
+
# Tlon (Pool-Bot plugin)
|
|
2
2
|
|
|
3
|
-
Tlon/Urbit channel plugin for
|
|
3
|
+
Tlon/Urbit channel plugin for Pool-Bot. Supports DMs, group mentions, and thread replies.
|
|
4
4
|
|
|
5
5
|
Docs: https://docs.molt.bot/channels/tlon
|
package/extensions/tlon/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 { tlonPlugin } from "./src/channel.js";
|
|
@@ -9,7 +9,7 @@ const plugin = {
|
|
|
9
9
|
name: "Tlon",
|
|
10
10
|
description: "Tlon/Urbit channel plugin",
|
|
11
11
|
configSchema: emptyPluginConfigSchema(),
|
|
12
|
-
register(api:
|
|
12
|
+
register(api: PoolbotPluginApi) {
|
|
13
13
|
setTlonRuntime(api.runtime);
|
|
14
14
|
api.registerChannel({ plugin: tlonPlugin });
|
|
15
15
|
},
|
|
@@ -2,7 +2,7 @@ import type {
|
|
|
2
2
|
ChannelOutboundAdapter,
|
|
3
3
|
ChannelPlugin,
|
|
4
4
|
ChannelSetupInput,
|
|
5
|
-
|
|
5
|
+
PoolbotConfig,
|
|
6
6
|
} from "poolbot/plugin-sdk";
|
|
7
7
|
import {
|
|
8
8
|
applyAccountNameToChannelSection,
|
|
@@ -30,10 +30,10 @@ type TlonSetupInput = ChannelSetupInput & {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
function applyTlonSetupConfig(params: {
|
|
33
|
-
cfg:
|
|
33
|
+
cfg: PoolbotConfig;
|
|
34
34
|
accountId: string;
|
|
35
35
|
input: TlonSetupInput;
|
|
36
|
-
}):
|
|
36
|
+
}): PoolbotConfig {
|
|
37
37
|
const { cfg, accountId, input } = params;
|
|
38
38
|
const useDefault = accountId === DEFAULT_ACCOUNT_ID;
|
|
39
39
|
const namedConfig = applyAccountNameToChannelSection({
|
|
@@ -108,7 +108,7 @@ const tlonOutbound: ChannelOutboundAdapter = {
|
|
|
108
108
|
return { ok: true, to: parsed.nest };
|
|
109
109
|
},
|
|
110
110
|
sendText: async ({ cfg, to, text, accountId, replyToId, threadId }) => {
|
|
111
|
-
const account = resolveTlonAccount(cfg as
|
|
111
|
+
const account = resolveTlonAccount(cfg as PoolbotConfig, accountId ?? undefined);
|
|
112
112
|
if (!account.configured || !account.ship || !account.url || !account.code) {
|
|
113
113
|
throw new Error("Tlon account not configured");
|
|
114
114
|
}
|
|
@@ -188,8 +188,8 @@ export const tlonPlugin: ChannelPlugin = {
|
|
|
188
188
|
reload: { configPrefixes: ["channels.tlon"] },
|
|
189
189
|
configSchema: tlonChannelConfigSchema,
|
|
190
190
|
config: {
|
|
191
|
-
listAccountIds: (cfg) => listTlonAccountIds(cfg as
|
|
192
|
-
resolveAccount: (cfg, accountId) => resolveTlonAccount(cfg as
|
|
191
|
+
listAccountIds: (cfg) => listTlonAccountIds(cfg as PoolbotConfig),
|
|
192
|
+
resolveAccount: (cfg, accountId) => resolveTlonAccount(cfg as PoolbotConfig, accountId ?? undefined),
|
|
193
193
|
defaultAccountId: () => "default",
|
|
194
194
|
setAccountEnabled: ({ cfg, accountId, enabled }) => {
|
|
195
195
|
const useDefault = !accountId || accountId === "default";
|
|
@@ -203,7 +203,7 @@ export const tlonPlugin: ChannelPlugin = {
|
|
|
203
203
|
enabled,
|
|
204
204
|
},
|
|
205
205
|
},
|
|
206
|
-
} as
|
|
206
|
+
} as PoolbotConfig;
|
|
207
207
|
}
|
|
208
208
|
return {
|
|
209
209
|
...cfg,
|
|
@@ -220,7 +220,7 @@ export const tlonPlugin: ChannelPlugin = {
|
|
|
220
220
|
},
|
|
221
221
|
},
|
|
222
222
|
},
|
|
223
|
-
} as
|
|
223
|
+
} as PoolbotConfig;
|
|
224
224
|
},
|
|
225
225
|
deleteAccount: ({ cfg, accountId }) => {
|
|
226
226
|
const useDefault = !accountId || accountId === "default";
|
|
@@ -232,7 +232,7 @@ export const tlonPlugin: ChannelPlugin = {
|
|
|
232
232
|
...cfg.channels,
|
|
233
233
|
tlon: rest,
|
|
234
234
|
},
|
|
235
|
-
} as
|
|
235
|
+
} as PoolbotConfig;
|
|
236
236
|
}
|
|
237
237
|
const { [accountId]: removed, ...remainingAccounts } = cfg.channels?.tlon?.accounts ?? {};
|
|
238
238
|
return {
|
|
@@ -244,7 +244,7 @@ export const tlonPlugin: ChannelPlugin = {
|
|
|
244
244
|
accounts: remainingAccounts,
|
|
245
245
|
},
|
|
246
246
|
},
|
|
247
|
-
} as
|
|
247
|
+
} as PoolbotConfig;
|
|
248
248
|
},
|
|
249
249
|
isConfigured: (account) => account.configured,
|
|
250
250
|
describeAccount: (account) => ({
|
|
@@ -260,14 +260,14 @@ export const tlonPlugin: ChannelPlugin = {
|
|
|
260
260
|
resolveAccountId: ({ accountId }) => normalizeAccountId(accountId),
|
|
261
261
|
applyAccountName: ({ cfg, accountId, name }) =>
|
|
262
262
|
applyAccountNameToChannelSection({
|
|
263
|
-
cfg: cfg as
|
|
263
|
+
cfg: cfg as PoolbotConfig,
|
|
264
264
|
channelKey: "tlon",
|
|
265
265
|
accountId,
|
|
266
266
|
name,
|
|
267
267
|
}),
|
|
268
268
|
validateInput: ({ cfg, accountId, input }) => {
|
|
269
269
|
const setupInput = input as TlonSetupInput;
|
|
270
|
-
const resolved = resolveTlonAccount(cfg as
|
|
270
|
+
const resolved = resolveTlonAccount(cfg as PoolbotConfig, accountId ?? undefined);
|
|
271
271
|
const ship = setupInput.ship?.trim() || resolved.ship;
|
|
272
272
|
const url = setupInput.url?.trim() || resolved.url;
|
|
273
273
|
const code = setupInput.code?.trim() || resolved.code;
|
|
@@ -278,7 +278,7 @@ export const tlonPlugin: ChannelPlugin = {
|
|
|
278
278
|
},
|
|
279
279
|
applyAccountConfig: ({ cfg, accountId, input }) =>
|
|
280
280
|
applyTlonSetupConfig({
|
|
281
|
-
cfg: cfg as
|
|
281
|
+
cfg: cfg as PoolbotConfig,
|
|
282
282
|
accountId,
|
|
283
283
|
input: input as TlonSetupInput,
|
|
284
284
|
}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { format } from "node:util";
|
|
2
2
|
|
|
3
|
-
import type { RuntimeEnv, ReplyPayload,
|
|
3
|
+
import type { RuntimeEnv, ReplyPayload, PoolbotConfig } from "poolbot/plugin-sdk";
|
|
4
4
|
|
|
5
5
|
import { getTlonRuntime } from "../runtime.js";
|
|
6
6
|
import { resolveTlonAccount } from "../types.js";
|
|
@@ -31,7 +31,7 @@ type ChannelAuthorization = {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
function resolveChannelAuthorization(
|
|
34
|
-
cfg:
|
|
34
|
+
cfg: PoolbotConfig,
|
|
35
35
|
channelNest: string,
|
|
36
36
|
): { mode: "restricted" | "open"; allowedShips: string[] } {
|
|
37
37
|
const tlonConfig = cfg.channels?.tlon as
|
|
@@ -49,7 +49,7 @@ function resolveChannelAuthorization(
|
|
|
49
49
|
|
|
50
50
|
export async function monitorTlonProvider(opts: MonitorTlonOpts = {}): Promise<void> {
|
|
51
51
|
const core = getTlonRuntime();
|
|
52
|
-
const cfg = core.config.loadConfig() as
|
|
52
|
+
const cfg = core.config.loadConfig() as PoolbotConfig;
|
|
53
53
|
if (cfg.channels?.tlon?.enabled === false) return;
|
|
54
54
|
|
|
55
55
|
const logger = core.logging.getChildLogger({ module: "tlon-auto-reply" });
|
|
@@ -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
|
},
|