@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,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotPluginApi } from "../../src/plugins/types.js";
|
|
2
2
|
|
|
3
3
|
import { createLlmTaskTool } from "./src/llm-task-tool.js";
|
|
4
4
|
|
|
5
|
-
export default function register(api:
|
|
5
|
+
export default function register(api: PoolbotPluginApi) {
|
|
6
6
|
api.registerTool(createLlmTaskTool(api), { optional: true });
|
|
7
7
|
}
|
|
@@ -5,12 +5,12 @@ import fs from "node:fs/promises";
|
|
|
5
5
|
import Ajv from "ajv";
|
|
6
6
|
import { Type } from "@sinclair/typebox";
|
|
7
7
|
|
|
8
|
-
// NOTE: This extension is intended to be bundled with
|
|
9
|
-
// When running from source (tests/dev),
|
|
8
|
+
// NOTE: This extension is intended to be bundled with Poolbot.
|
|
9
|
+
// When running from source (tests/dev), Poolbot internals live under src/.
|
|
10
10
|
// When running from a built install, internals live under dist/ (no src/ tree).
|
|
11
11
|
// So we resolve internal imports dynamically with src-first, dist-fallback.
|
|
12
12
|
|
|
13
|
-
import type {
|
|
13
|
+
import type { PoolbotPluginApi } from "../../../src/plugins/types.js";
|
|
14
14
|
|
|
15
15
|
type RunEmbeddedPiAgentFn = (params: Record<string, unknown>) => Promise<unknown>;
|
|
16
16
|
|
|
@@ -61,7 +61,7 @@ type PluginCfg = {
|
|
|
61
61
|
timeoutMs?: number;
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
export function createLlmTaskTool(api:
|
|
64
|
+
export function createLlmTaskTool(api: PoolbotPluginApi) {
|
|
65
65
|
return {
|
|
66
66
|
name: "llm-task",
|
|
67
67
|
description:
|
|
@@ -5,7 +5,7 @@ Adds the `lobster` agent tool as an **optional** plugin tool.
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
7
|
- Lobster is a standalone workflow shell (typed JSON-first pipelines + approvals/resume).
|
|
8
|
-
- This plugin integrates Lobster with
|
|
8
|
+
- This plugin integrates Lobster with Pool-Bot *without core changes*.
|
|
9
9
|
|
|
10
10
|
## Enable
|
|
11
11
|
|
|
@@ -30,15 +30,15 @@ Enable it in an agent allowlist:
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
## Using `clawd.invoke` (Lobster →
|
|
33
|
+
## Using `clawd.invoke` (Lobster → Pool-Bot tools)
|
|
34
34
|
|
|
35
|
-
Some Lobster pipelines may include a `clawd.invoke` step to call back into
|
|
35
|
+
Some Lobster pipelines may include a `clawd.invoke` step to call back into Pool-Bot tools/plugins (for example: `gog` for Google Workspace, `gh` for GitHub, `message.send`, etc.).
|
|
36
36
|
|
|
37
|
-
For this to work, the
|
|
37
|
+
For this to work, the Pool-Bot Gateway must expose the tool bridge endpoint and the target tool must be allowed by policy:
|
|
38
38
|
|
|
39
|
-
-
|
|
39
|
+
- Pool-Bot provides an HTTP endpoint: `POST /tools/invoke`.
|
|
40
40
|
- The request is gated by **gateway auth** (e.g. `Authorization: Bearer …` when token auth is enabled).
|
|
41
|
-
- The invoked tool is gated by **tool policy** (global + per-agent + provider + group policy). If the tool is not allowed,
|
|
41
|
+
- The invoked tool is gated by **tool policy** (global + per-agent + provider + group policy). If the tool is not allowed, Pool-Bot returns `404 Tool not available`.
|
|
42
42
|
|
|
43
43
|
### Allowlisting recommended
|
|
44
44
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotPluginApi } from "../../src/plugins/types.js";
|
|
2
2
|
|
|
3
3
|
import { createLobsterTool } from "./src/lobster-tool.js";
|
|
4
4
|
|
|
5
|
-
export default function register(api:
|
|
5
|
+
export default function register(api: PoolbotPluginApi) {
|
|
6
6
|
api.registerTool(
|
|
7
7
|
(ctx) => {
|
|
8
8
|
if (ctx.sandboxed) return null;
|
|
@@ -4,7 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
|
|
5
5
|
import { describe, expect, it } from "vitest";
|
|
6
6
|
|
|
7
|
-
import type {
|
|
7
|
+
import type { PoolbotPluginApi, PoolbotPluginToolContext } from "../../../src/plugins/types.js";
|
|
8
8
|
import { createLobsterTool } from "./lobster-tool.js";
|
|
9
9
|
|
|
10
10
|
async function writeFakeLobsterScript(scriptBody: string, prefix = "poolbot-lobster-plugin-") {
|
|
@@ -33,7 +33,7 @@ async function writeFakeLobster(params: { payload: unknown }) {
|
|
|
33
33
|
return await writeFakeLobsterScript(scriptBody);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
function fakeApi():
|
|
36
|
+
function fakeApi(): PoolbotPluginApi {
|
|
37
37
|
return {
|
|
38
38
|
id: "lobster",
|
|
39
39
|
name: "lobster",
|
|
@@ -52,7 +52,7 @@ function fakeApi(): MoltbotPluginApi {
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
function fakeCtx(overrides: Partial<
|
|
55
|
+
function fakeCtx(overrides: Partial<PoolbotPluginToolContext> = {}): PoolbotPluginToolContext {
|
|
56
56
|
return {
|
|
57
57
|
config: {} as any,
|
|
58
58
|
workspaceDir: "/tmp",
|
|
@@ -132,7 +132,7 @@ describe("lobster plugin tool", () => {
|
|
|
132
132
|
|
|
133
133
|
it("can be gated off in sandboxed contexts", async () => {
|
|
134
134
|
const api = fakeApi();
|
|
135
|
-
const factoryTool = (ctx:
|
|
135
|
+
const factoryTool = (ctx: PoolbotPluginToolContext) => {
|
|
136
136
|
if (ctx.sandboxed) return null;
|
|
137
137
|
return createLobsterTool(api);
|
|
138
138
|
};
|
|
@@ -2,7 +2,7 @@ import { Type } from "@sinclair/typebox";
|
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type { PoolbotPluginApi } from "../../../src/plugins/types.js";
|
|
6
6
|
|
|
7
7
|
type LobsterEnvelope =
|
|
8
8
|
| {
|
|
@@ -168,7 +168,7 @@ function parseEnvelope(stdout: string): LobsterEnvelope {
|
|
|
168
168
|
throw new Error("lobster returned invalid JSON envelope");
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
export function createLobsterTool(api:
|
|
171
|
+
export function createLobsterTool(api: PoolbotPluginApi) {
|
|
172
172
|
return {
|
|
173
173
|
name: "lobster",
|
|
174
174
|
description:
|
|
@@ -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 { matrixPlugin } from "./src/channel.js";
|
|
@@ -9,7 +9,7 @@ const plugin = {
|
|
|
9
9
|
name: "Matrix",
|
|
10
10
|
description: "Matrix channel plugin (matrix-js-sdk)",
|
|
11
11
|
configSchema: emptyPluginConfigSchema(),
|
|
12
|
-
register(api:
|
|
12
|
+
register(api: PoolbotPluginApi) {
|
|
13
13
|
setMatrixRuntime(api.runtime);
|
|
14
14
|
api.registerChannel({ plugin: matrixPlugin });
|
|
15
15
|
},
|
|
@@ -125,7 +125,7 @@ export async function resolveMatrixAuth(params?: {
|
|
|
125
125
|
type: "m.login.password",
|
|
126
126
|
identifier: { type: "m.id.user", user: resolved.userId },
|
|
127
127
|
password: resolved.password,
|
|
128
|
-
initial_device_display_name: resolved.deviceName ?? "
|
|
128
|
+
initial_device_display_name: resolved.deviceName ?? "Poolbot Gateway",
|
|
129
129
|
}),
|
|
130
130
|
});
|
|
131
131
|
|
|
@@ -252,7 +252,7 @@ export function createMatrixRoomMessageHandler(params: MatrixMonitorHandlerParam
|
|
|
252
252
|
await sendMessageMatrix(
|
|
253
253
|
`room:${roomId}`,
|
|
254
254
|
[
|
|
255
|
-
"
|
|
255
|
+
"Poolbot: access not configured.",
|
|
256
256
|
"",
|
|
257
257
|
`Pairing code: ${code}`,
|
|
258
258
|
"",
|
|
@@ -318,7 +318,7 @@ export const matrixOnboardingAdapter: ChannelOnboardingAdapter = {
|
|
|
318
318
|
const deviceName = String(
|
|
319
319
|
await prompter.text({
|
|
320
320
|
message: "Matrix device name (optional)",
|
|
321
|
-
initialValue: existing.deviceName ?? "
|
|
321
|
+
initialValue: existing.deviceName ?? "Poolbot Gateway",
|
|
322
322
|
}),
|
|
323
323
|
).trim();
|
|
324
324
|
|
|
@@ -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 { mattermostPlugin } from "./src/channel.js";
|
|
@@ -9,7 +9,7 @@ const plugin = {
|
|
|
9
9
|
name: "Mattermost",
|
|
10
10
|
description: "Mattermost channel plugin",
|
|
11
11
|
configSchema: emptyPluginConfigSchema(),
|
|
12
|
-
register(api:
|
|
12
|
+
register(api: PoolbotPluginApi) {
|
|
13
13
|
setMattermostRuntime(api.runtime);
|
|
14
14
|
api.registerChannel({ plugin: mattermostPlugin });
|
|
15
15
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "poolbot/plugin-sdk";
|
|
3
3
|
|
|
4
4
|
import type { MattermostAccountConfig, MattermostChatMode } from "../types.js";
|
|
@@ -24,26 +24,26 @@ export type ResolvedMattermostAccount = {
|
|
|
24
24
|
blockStreamingCoalesce?: MattermostAccountConfig["blockStreamingCoalesce"];
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
function listConfiguredAccountIds(cfg:
|
|
27
|
+
function listConfiguredAccountIds(cfg: PoolbotConfig): string[] {
|
|
28
28
|
const accounts = cfg.channels?.mattermost?.accounts;
|
|
29
29
|
if (!accounts || typeof accounts !== "object") return [];
|
|
30
30
|
return Object.keys(accounts).filter(Boolean);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export function listMattermostAccountIds(cfg:
|
|
33
|
+
export function listMattermostAccountIds(cfg: PoolbotConfig): string[] {
|
|
34
34
|
const ids = listConfiguredAccountIds(cfg);
|
|
35
35
|
if (ids.length === 0) return [DEFAULT_ACCOUNT_ID];
|
|
36
36
|
return ids.sort((a, b) => a.localeCompare(b));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export function resolveDefaultMattermostAccountId(cfg:
|
|
39
|
+
export function resolveDefaultMattermostAccountId(cfg: PoolbotConfig): string {
|
|
40
40
|
const ids = listMattermostAccountIds(cfg);
|
|
41
41
|
if (ids.includes(DEFAULT_ACCOUNT_ID)) return DEFAULT_ACCOUNT_ID;
|
|
42
42
|
return ids[0] ?? DEFAULT_ACCOUNT_ID;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function resolveAccountConfig(
|
|
46
|
-
cfg:
|
|
46
|
+
cfg: PoolbotConfig,
|
|
47
47
|
accountId: string,
|
|
48
48
|
): MattermostAccountConfig | undefined {
|
|
49
49
|
const accounts = cfg.channels?.mattermost?.accounts;
|
|
@@ -52,7 +52,7 @@ function resolveAccountConfig(
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
function mergeMattermostAccountConfig(
|
|
55
|
-
cfg:
|
|
55
|
+
cfg: PoolbotConfig,
|
|
56
56
|
accountId: string,
|
|
57
57
|
): MattermostAccountConfig {
|
|
58
58
|
const { accounts: _ignored, ...base } = (cfg.channels?.mattermost ??
|
|
@@ -69,7 +69,7 @@ function resolveMattermostRequireMention(config: MattermostAccountConfig): boole
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export function resolveMattermostAccount(params: {
|
|
72
|
-
cfg:
|
|
72
|
+
cfg: PoolbotConfig;
|
|
73
73
|
accountId?: string | null;
|
|
74
74
|
}): ResolvedMattermostAccount {
|
|
75
75
|
const accountId = normalizeAccountId(params.accountId);
|
|
@@ -108,7 +108,7 @@ export function resolveMattermostAccount(params: {
|
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
export function listEnabledMattermostAccounts(cfg:
|
|
111
|
+
export function listEnabledMattermostAccounts(cfg: PoolbotConfig): ResolvedMattermostAccount[] {
|
|
112
112
|
return listMattermostAccountIds(cfg)
|
|
113
113
|
.map((accountId) => resolveMattermostAccount({ cfg, accountId }))
|
|
114
114
|
.filter((account) => account.enabled);
|
|
@@ -2,7 +2,7 @@ import { Buffer } from "node:buffer";
|
|
|
2
2
|
|
|
3
3
|
import type WebSocket from "ws";
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
6
6
|
|
|
7
7
|
export type ResponsePrefixContext = {
|
|
8
8
|
model?: string;
|
|
@@ -114,20 +114,20 @@ function normalizeAgentId(value: string | undefined | null): string {
|
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
type AgentEntry = NonNullable<NonNullable<
|
|
117
|
+
type AgentEntry = NonNullable<NonNullable<PoolbotConfig["agents"]>["list"]>[number];
|
|
118
118
|
|
|
119
|
-
function listAgents(cfg:
|
|
119
|
+
function listAgents(cfg: PoolbotConfig): AgentEntry[] {
|
|
120
120
|
const list = cfg.agents?.list;
|
|
121
121
|
if (!Array.isArray(list)) return [];
|
|
122
122
|
return list.filter((entry): entry is AgentEntry => Boolean(entry && typeof entry === "object"));
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
function resolveAgentEntry(cfg:
|
|
125
|
+
function resolveAgentEntry(cfg: PoolbotConfig, agentId: string): AgentEntry | undefined {
|
|
126
126
|
const id = normalizeAgentId(agentId);
|
|
127
127
|
return listAgents(cfg).find((entry) => normalizeAgentId(entry.id) === id);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
export function resolveIdentityName(cfg:
|
|
130
|
+
export function resolveIdentityName(cfg: PoolbotConfig, agentId: string): string | undefined {
|
|
131
131
|
const entry = resolveAgentEntry(cfg, agentId);
|
|
132
132
|
return entry?.identity?.name?.trim() || undefined;
|
|
133
133
|
}
|
|
@@ -2,7 +2,7 @@ import WebSocket from "ws";
|
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
4
|
ChannelAccountSnapshot,
|
|
5
|
-
|
|
5
|
+
PoolbotConfig,
|
|
6
6
|
ReplyPayload,
|
|
7
7
|
RuntimeEnv,
|
|
8
8
|
} from "poolbot/plugin-sdk";
|
|
@@ -45,7 +45,7 @@ export type MonitorMattermostOpts = {
|
|
|
45
45
|
botToken?: string;
|
|
46
46
|
baseUrl?: string;
|
|
47
47
|
accountId?: string;
|
|
48
|
-
config?:
|
|
48
|
+
config?: PoolbotConfig;
|
|
49
49
|
runtime?: RuntimeEnv;
|
|
50
50
|
abortSignal?: AbortSignal;
|
|
51
51
|
statusSink?: (patch: Partial<ChannelAccountSnapshot>) => void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotConfig, WizardPrompter } from "poolbot/plugin-sdk";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "poolbot/plugin-sdk";
|
|
3
3
|
|
|
4
4
|
type PromptAccountIdParams = {
|
|
5
|
-
cfg:
|
|
5
|
+
cfg: PoolbotConfig;
|
|
6
6
|
prompter: WizardPrompter;
|
|
7
7
|
label: string;
|
|
8
8
|
currentId?: string;
|
|
9
|
-
listAccountIds: (cfg:
|
|
9
|
+
listAccountIds: (cfg: PoolbotConfig) => string[];
|
|
10
10
|
defaultAccountId: string;
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChannelOnboardingAdapter,
|
|
1
|
+
import type { ChannelOnboardingAdapter, PoolbotConfig, WizardPrompter } from "poolbot/plugin-sdk";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "poolbot/plugin-sdk";
|
|
3
3
|
|
|
4
4
|
import {
|
|
@@ -177,7 +177,7 @@ export const mattermostOnboardingAdapter: ChannelOnboardingAdapter = {
|
|
|
177
177
|
|
|
178
178
|
return { cfg: next, accountId };
|
|
179
179
|
},
|
|
180
|
-
disable: (cfg:
|
|
180
|
+
disable: (cfg: PoolbotConfig) => ({
|
|
181
181
|
...cfg,
|
|
182
182
|
channels: {
|
|
183
183
|
...cfg.channels,
|
|
@@ -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
|
const memoryCorePlugin = {
|
|
@@ -7,7 +7,7 @@ const memoryCorePlugin = {
|
|
|
7
7
|
description: "File-backed memory search tools and CLI",
|
|
8
8
|
kind: "memory",
|
|
9
9
|
configSchema: emptyPluginConfigSchema(),
|
|
10
|
-
register(api:
|
|
10
|
+
register(api: PoolbotPluginApi) {
|
|
11
11
|
api.registerTool(
|
|
12
12
|
(ctx) => {
|
|
13
13
|
const memorySearchTool = api.runtime.tools.createMemorySearchTool({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Poolbot Memory (LanceDB) Plugin
|
|
3
3
|
*
|
|
4
4
|
* Long-term memory with vector search for AI conversations.
|
|
5
5
|
* Uses LanceDB for storage and OpenAI for embeddings.
|
|
@@ -10,7 +10,7 @@ import { Type } from "@sinclair/typebox";
|
|
|
10
10
|
import * as lancedb from "@lancedb/lancedb";
|
|
11
11
|
import OpenAI from "openai";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
|
-
import type {
|
|
13
|
+
import type { PoolbotPluginApi } from "poolbot/plugin-sdk";
|
|
14
14
|
import { stringEnum } from "poolbot/plugin-sdk";
|
|
15
15
|
|
|
16
16
|
import {
|
|
@@ -220,7 +220,7 @@ const memoryPlugin = {
|
|
|
220
220
|
kind: "memory" as const,
|
|
221
221
|
configSchema: memoryConfigSchema,
|
|
222
222
|
|
|
223
|
-
register(api:
|
|
223
|
+
register(api: PoolbotPluginApi) {
|
|
224
224
|
const cfg = memoryConfigSchema.parse(api.pluginConfig);
|
|
225
225
|
const resolvedDbPath = api.resolvePath(cfg.dbPath!);
|
|
226
226
|
const vectorDim = vectorDimsForModel(cfg.embedding.model ?? "text-embedding-3-small");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@poolbot/memory-lancedb",
|
|
3
3
|
"version": "2026.1.26",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Poolbot LanceDB-backed long-term memory plugin with auto-recall/capture",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@lancedb/lancedb": "^0.23.0",
|
|
8
8
|
"@sinclair/typebox": "0.34.47",
|
|
@@ -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 { msteamsPlugin } from "./src/channel.js";
|
|
@@ -9,7 +9,7 @@ const plugin = {
|
|
|
9
9
|
name: "Microsoft Teams",
|
|
10
10
|
description: "Microsoft Teams channel plugin (Bot Framework)",
|
|
11
11
|
configSchema: emptyPluginConfigSchema(),
|
|
12
|
-
register(api:
|
|
12
|
+
register(api: PoolbotPluginApi) {
|
|
13
13
|
setMSTeamsRuntime(api.runtime);
|
|
14
14
|
api.registerChannel({ plugin: msteamsPlugin });
|
|
15
15
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { PoolbotConfig } from "poolbot/plugin-sdk";
|
|
4
4
|
|
|
5
5
|
import { msteamsPlugin } from "./channel.js";
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ describe("msteams directory", () => {
|
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
|
-
} as unknown as
|
|
24
|
+
} as unknown as PoolbotConfig;
|
|
25
25
|
|
|
26
26
|
expect(msteamsPlugin.directory).toBeTruthy();
|
|
27
27
|
expect(msteamsPlugin.directory?.listPeers).toBeTruthy();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChannelMessageActionName, ChannelPlugin,
|
|
1
|
+
import type { ChannelMessageActionName, ChannelPlugin, PoolbotConfig } from "poolbot/plugin-sdk";
|
|
2
2
|
import {
|
|
3
3
|
buildChannelConfigSchema,
|
|
4
4
|
DEFAULT_ACCOUNT_ID,
|
|
@@ -102,7 +102,7 @@ export const msteamsPlugin: ChannelPlugin<ResolvedMSTeamsAccount> = {
|
|
|
102
102
|
},
|
|
103
103
|
}),
|
|
104
104
|
deleteAccount: ({ cfg }) => {
|
|
105
|
-
const next = { ...cfg } as
|
|
105
|
+
const next = { ...cfg } as PoolbotConfig;
|
|
106
106
|
const nextChannels = { ...cfg.channels };
|
|
107
107
|
delete nextChannels.msteams;
|
|
108
108
|
if (Object.keys(nextChannels).length > 0) {
|
|
@@ -36,8 +36,8 @@ export async function uploadToOneDrive(params: {
|
|
|
36
36
|
const fetchFn = params.fetchFn ?? fetch;
|
|
37
37
|
const token = await params.tokenProvider.getAccessToken(GRAPH_SCOPE);
|
|
38
38
|
|
|
39
|
-
// Use "
|
|
40
|
-
const uploadPath = `/
|
|
39
|
+
// Use "PoolbotShared" folder to organize bot-uploaded files
|
|
40
|
+
const uploadPath = `/PoolbotShared/${encodeURIComponent(params.filename)}`;
|
|
41
41
|
|
|
42
42
|
const res = await fetchFn(`${GRAPH_ROOT}/me/drive/root:${uploadPath}:/content`, {
|
|
43
43
|
method: "PUT",
|
|
@@ -179,8 +179,8 @@ export async function uploadToSharePoint(params: {
|
|
|
179
179
|
const fetchFn = params.fetchFn ?? fetch;
|
|
180
180
|
const token = await params.tokenProvider.getAccessToken(GRAPH_SCOPE);
|
|
181
181
|
|
|
182
|
-
// Use "
|
|
183
|
-
const uploadPath = `/
|
|
182
|
+
// Use "PoolbotShared" folder to organize bot-uploaded files
|
|
183
|
+
const uploadPath = `/PoolbotShared/${encodeURIComponent(params.filename)}`;
|
|
184
184
|
|
|
185
185
|
const res = await fetchFn(`${GRAPH_ROOT}/sites/${params.siteId}/drive/root:${uploadPath}:/content`, {
|
|
186
186
|
method: "PUT",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolbotConfig, RuntimeEnv } from "poolbot/plugin-sdk";
|
|
2
2
|
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
|
3
3
|
import {
|
|
4
4
|
buildFileInfoCard,
|
|
@@ -27,7 +27,7 @@ export type MSTeamsActivityHandler = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export type MSTeamsMessageHandlerDeps = {
|
|
30
|
-
cfg:
|
|
30
|
+
cfg: PoolbotConfig;
|
|
31
31
|
runtime: RuntimeEnv;
|
|
32
32
|
appId: string;
|
|
33
33
|
adapter: MSTeamsAdapter;
|
|
@@ -2,7 +2,7 @@ import type { Request, Response } from "express";
|
|
|
2
2
|
import {
|
|
3
3
|
mergeAllowlist,
|
|
4
4
|
summarizeMapping,
|
|
5
|
-
type
|
|
5
|
+
type PoolbotConfig,
|
|
6
6
|
type RuntimeEnv,
|
|
7
7
|
} from "poolbot/plugin-sdk";
|
|
8
8
|
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
|
@@ -20,7 +20,7 @@ import { resolveMSTeamsCredentials } from "./token.js";
|
|
|
20
20
|
import { getMSTeamsRuntime } from "./runtime.js";
|
|
21
21
|
|
|
22
22
|
export type MonitorMSTeamsOpts = {
|
|
23
|
-
cfg:
|
|
23
|
+
cfg: PoolbotConfig;
|
|
24
24
|
runtime?: RuntimeEnv;
|
|
25
25
|
abortSignal?: AbortSignal;
|
|
26
26
|
conversationStore?: MSTeamsConversationStore;
|
|
@@ -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";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
|
|
22
22
|
const channel = "msteams" as const;
|
|
23
23
|
|
|
24
|
-
function setMSTeamsDmPolicy(cfg:
|
|
24
|
+
function setMSTeamsDmPolicy(cfg: PoolbotConfig, dmPolicy: DmPolicy) {
|
|
25
25
|
const allowFrom =
|
|
26
26
|
dmPolicy === "open"
|
|
27
27
|
? addWildcardAllowFrom(cfg.channels?.msteams?.allowFrom)?.map((entry) => String(entry))
|
|
@@ -39,7 +39,7 @@ function setMSTeamsDmPolicy(cfg: MoltbotConfig, dmPolicy: DmPolicy) {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
function setMSTeamsAllowFrom(cfg:
|
|
42
|
+
function setMSTeamsAllowFrom(cfg: PoolbotConfig, allowFrom: string[]): PoolbotConfig {
|
|
43
43
|
return {
|
|
44
44
|
...cfg,
|
|
45
45
|
channels: {
|
|
@@ -64,9 +64,9 @@ function looksLikeGuid(value: string): boolean {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
async function promptMSTeamsAllowFrom(params: {
|
|
67
|
-
cfg:
|
|
67
|
+
cfg: PoolbotConfig;
|
|
68
68
|
prompter: WizardPrompter;
|
|
69
|
-
}): Promise<
|
|
69
|
+
}): Promise<PoolbotConfig> {
|
|
70
70
|
const existing = params.cfg.channels?.msteams?.allowFrom ?? [];
|
|
71
71
|
await params.prompter.note(
|
|
72
72
|
[
|
|
@@ -144,9 +144,9 @@ async function noteMSTeamsCredentialHelp(prompter: WizardPrompter): Promise<void
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
function setMSTeamsGroupPolicy(
|
|
147
|
-
cfg:
|
|
147
|
+
cfg: PoolbotConfig,
|
|
148
148
|
groupPolicy: "open" | "allowlist" | "disabled",
|
|
149
|
-
):
|
|
149
|
+
): PoolbotConfig {
|
|
150
150
|
return {
|
|
151
151
|
...cfg,
|
|
152
152
|
channels: {
|
|
@@ -161,9 +161,9 @@ function setMSTeamsGroupPolicy(
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
function setMSTeamsTeamsAllowlist(
|
|
164
|
-
cfg:
|
|
164
|
+
cfg: PoolbotConfig,
|
|
165
165
|
entries: Array<{ teamKey: string; channelKey?: string }>,
|
|
166
|
-
):
|
|
166
|
+
): PoolbotConfig {
|
|
167
167
|
const baseTeams = cfg.channels?.msteams?.teams ?? {};
|
|
168
168
|
const teams: Record<string, { channels?: Record<string, unknown> }> = { ...baseTeams };
|
|
169
169
|
for (const entry of entries) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createTypingCallbacks,
|
|
4
4
|
logTypingFailure,
|
|
5
5
|
resolveChannelMediaMaxBytes,
|
|
6
|
-
type
|
|
6
|
+
type PoolbotConfig,
|
|
7
7
|
type MSTeamsReplyStyle,
|
|
8
8
|
type RuntimeEnv,
|
|
9
9
|
} from "poolbot/plugin-sdk";
|
|
@@ -24,7 +24,7 @@ import type { MSTeamsTurnContext } from "./sdk-types.js";
|
|
|
24
24
|
import { getMSTeamsRuntime } from "./runtime.js";
|
|
25
25
|
|
|
26
26
|
export function createMSTeamsReplyDispatcher(params: {
|
|
27
|
-
cfg:
|
|
27
|
+
cfg: PoolbotConfig;
|
|
28
28
|
agentId: string;
|
|
29
29
|
runtime: RuntimeEnv;
|
|
30
30
|
log: MSTeamsMonitorLogger;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveChannelMediaMaxBytes, type
|
|
1
|
+
import { resolveChannelMediaMaxBytes, type PoolbotConfig, type PluginRuntime } from "poolbot/plugin-sdk";
|
|
2
2
|
import type { MSTeamsAccessTokenProvider } from "./attachments/types.js";
|
|
3
3
|
import type {
|
|
4
4
|
MSTeamsConversationStore,
|
|
@@ -84,7 +84,7 @@ async function findConversationReference(recipient: {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
export async function resolveMSTeamsSendContext(params: {
|
|
87
|
-
cfg:
|
|
87
|
+
cfg: PoolbotConfig;
|
|
88
88
|
to: string;
|
|
89
89
|
}): Promise<MSTeamsProactiveContext> {
|
|
90
90
|
const msteamsCfg = params.cfg.channels?.msteams;
|