@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
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export function splitShellArgs(raw) {
|
|
2
|
+
const tokens = [];
|
|
3
|
+
let buf = "";
|
|
4
|
+
let inSingle = false;
|
|
5
|
+
let inDouble = false;
|
|
6
|
+
let escaped = false;
|
|
7
|
+
const pushToken = () => {
|
|
8
|
+
if (buf.length > 0) {
|
|
9
|
+
tokens.push(buf);
|
|
10
|
+
buf = "";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
for (let i = 0; i < raw.length; i += 1) {
|
|
14
|
+
const ch = raw[i];
|
|
15
|
+
if (escaped) {
|
|
16
|
+
buf += ch;
|
|
17
|
+
escaped = false;
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (!inSingle && !inDouble && ch === "\\") {
|
|
21
|
+
escaped = true;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (inSingle) {
|
|
25
|
+
if (ch === "'") {
|
|
26
|
+
inSingle = false;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
buf += ch;
|
|
30
|
+
}
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (inDouble) {
|
|
34
|
+
if (ch === '"') {
|
|
35
|
+
inDouble = false;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
buf += ch;
|
|
39
|
+
}
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (ch === "'") {
|
|
43
|
+
inSingle = true;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (ch === '"') {
|
|
47
|
+
inDouble = true;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (/\s/.test(ch)) {
|
|
51
|
+
pushToken();
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
buf += ch;
|
|
55
|
+
}
|
|
56
|
+
if (escaped || inSingle || inDouble) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
pushToken();
|
|
60
|
+
return tokens;
|
|
61
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const TOOL_CALL_TYPES = new Set(["tool_use", "toolcall", "tool_call"]);
|
|
2
|
+
const TOOL_RESULT_TYPES = new Set(["tool_result", "tool_result_error"]);
|
|
3
|
+
const normalizeType = (value) => {
|
|
4
|
+
if (typeof value !== "string") {
|
|
5
|
+
return "";
|
|
6
|
+
}
|
|
7
|
+
return value.trim().toLowerCase();
|
|
8
|
+
};
|
|
9
|
+
export const extractToolCallNames = (message) => {
|
|
10
|
+
const names = new Set();
|
|
11
|
+
const toolNameRaw = message.toolName ?? message.tool_name;
|
|
12
|
+
if (typeof toolNameRaw === "string" && toolNameRaw.trim()) {
|
|
13
|
+
names.add(toolNameRaw.trim());
|
|
14
|
+
}
|
|
15
|
+
const content = message.content;
|
|
16
|
+
if (!Array.isArray(content)) {
|
|
17
|
+
return Array.from(names);
|
|
18
|
+
}
|
|
19
|
+
for (const entry of content) {
|
|
20
|
+
if (!entry || typeof entry !== "object") {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const block = entry;
|
|
24
|
+
const type = normalizeType(block.type);
|
|
25
|
+
if (!TOOL_CALL_TYPES.has(type)) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
const name = block.name;
|
|
29
|
+
if (typeof name === "string" && name.trim()) {
|
|
30
|
+
names.add(name.trim());
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return Array.from(names);
|
|
34
|
+
};
|
|
35
|
+
export const hasToolCall = (message) => extractToolCallNames(message).length > 0;
|
|
36
|
+
export const countToolResults = (message) => {
|
|
37
|
+
const content = message.content;
|
|
38
|
+
if (!Array.isArray(content)) {
|
|
39
|
+
return { total: 0, errors: 0 };
|
|
40
|
+
}
|
|
41
|
+
let total = 0;
|
|
42
|
+
let errors = 0;
|
|
43
|
+
for (const entry of content) {
|
|
44
|
+
if (!entry || typeof entry !== "object") {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
const block = entry;
|
|
48
|
+
const type = normalizeType(block.type);
|
|
49
|
+
if (!TOOL_RESULT_TYPES.has(type)) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
total += 1;
|
|
53
|
+
if (block.is_error === true) {
|
|
54
|
+
errors += 1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return { total, errors };
|
|
58
|
+
};
|
package/dist/utils.js
CHANGED
|
@@ -3,15 +3,54 @@ import os from "node:os";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { resolveOAuthDir } from "./config/paths.js";
|
|
5
5
|
import { logVerbose, shouldLogVerbose } from "./globals.js";
|
|
6
|
+
import { expandHomePrefix, resolveEffectiveHomeDir, resolveRequiredHomeDir, } from "./infra/home-dir.js";
|
|
6
7
|
export async function ensureDir(dir) {
|
|
7
8
|
await fs.promises.mkdir(dir, { recursive: true });
|
|
8
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Check if a file or directory exists at the given path.
|
|
12
|
+
*/
|
|
13
|
+
export async function pathExists(targetPath) {
|
|
14
|
+
try {
|
|
15
|
+
await fs.promises.access(targetPath);
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
9
22
|
export function clampNumber(value, min, max) {
|
|
10
23
|
return Math.max(min, Math.min(max, value));
|
|
11
24
|
}
|
|
12
25
|
export function clampInt(value, min, max) {
|
|
13
26
|
return clampNumber(Math.floor(value), min, max);
|
|
14
27
|
}
|
|
28
|
+
/** Alias for clampNumber (shorter, more common name) */
|
|
29
|
+
export const clamp = clampNumber;
|
|
30
|
+
/**
|
|
31
|
+
* Escapes special regex characters in a string so it can be used in a RegExp constructor.
|
|
32
|
+
*/
|
|
33
|
+
export function escapeRegExp(value) {
|
|
34
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Safely parse JSON, returning null on error instead of throwing.
|
|
38
|
+
*/
|
|
39
|
+
export function safeParseJson(raw) {
|
|
40
|
+
try {
|
|
41
|
+
return JSON.parse(raw);
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Type guard for Record<string, unknown> (less strict than isPlainObject).
|
|
49
|
+
* Accepts any non-null object that isn't an array.
|
|
50
|
+
*/
|
|
51
|
+
export function isRecord(value) {
|
|
52
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
53
|
+
}
|
|
15
54
|
export function assertWebChannel(input) {
|
|
16
55
|
if (input !== "web") {
|
|
17
56
|
throw new Error("Web channel must be 'web'");
|
|
@@ -181,7 +220,11 @@ export function resolveUserPath(input) {
|
|
|
181
220
|
if (!trimmed)
|
|
182
221
|
return trimmed;
|
|
183
222
|
if (trimmed.startsWith("~")) {
|
|
184
|
-
const expanded = trimmed
|
|
223
|
+
const expanded = expandHomePrefix(trimmed, {
|
|
224
|
+
home: resolveRequiredHomeDir(process.env, os.homedir),
|
|
225
|
+
env: process.env,
|
|
226
|
+
homedir: os.homedir,
|
|
227
|
+
});
|
|
185
228
|
return path.resolve(expanded);
|
|
186
229
|
}
|
|
187
230
|
return path.resolve(trimmed);
|
|
@@ -193,19 +236,7 @@ export function resolveConfigDir(env = process.env, homedir = os.homedir) {
|
|
|
193
236
|
return path.join(homedir(), ".poolbot");
|
|
194
237
|
}
|
|
195
238
|
export function resolveHomeDir() {
|
|
196
|
-
|
|
197
|
-
if (envHome)
|
|
198
|
-
return envHome;
|
|
199
|
-
const envProfile = process.env.USERPROFILE?.trim();
|
|
200
|
-
if (envProfile)
|
|
201
|
-
return envProfile;
|
|
202
|
-
try {
|
|
203
|
-
const home = os.homedir();
|
|
204
|
-
return home?.trim() ? home : undefined;
|
|
205
|
-
}
|
|
206
|
-
catch {
|
|
207
|
-
return undefined;
|
|
208
|
-
}
|
|
239
|
+
return resolveEffectiveHomeDir(process.env, os.homedir);
|
|
209
240
|
}
|
|
210
241
|
export function shortenHomePath(input) {
|
|
211
242
|
if (!input)
|
|
@@ -243,5 +274,15 @@ export function formatTerminalLink(label, url, opts) {
|
|
|
243
274
|
}
|
|
244
275
|
return `\u001b]8;;${safeUrl}\u0007${safeLabel}\u001b]8;;\u0007`;
|
|
245
276
|
}
|
|
277
|
+
/**
|
|
278
|
+
* Strict plain-object check — returns true only for `Object.create(null)` or `{}` literals.
|
|
279
|
+
* Arrays, Dates, RegExps, class instances, and null/undefined all return false.
|
|
280
|
+
*/
|
|
281
|
+
export function isPlainObject(value) {
|
|
282
|
+
if (typeof value !== "object" || value === null)
|
|
283
|
+
return false;
|
|
284
|
+
const proto = Object.getPrototypeOf(value);
|
|
285
|
+
return proto === Object.prototype || proto === null;
|
|
286
|
+
}
|
|
246
287
|
// Configuration root; can be overridden via CLAWDBOT_STATE_DIR.
|
|
247
288
|
export const CONFIG_DIR = resolveConfigDir();
|
package/dist/version.js
CHANGED
|
@@ -1,18 +1,55 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
|
|
2
|
+
const CORE_PACKAGE_NAME = "poolbot";
|
|
3
|
+
const PACKAGE_JSON_CANDIDATES = [
|
|
4
|
+
"../package.json",
|
|
5
|
+
"../../package.json",
|
|
6
|
+
"../../../package.json",
|
|
7
|
+
"./package.json",
|
|
8
|
+
];
|
|
9
|
+
const BUILD_INFO_CANDIDATES = [
|
|
10
|
+
"../build-info.json",
|
|
11
|
+
"../../build-info.json",
|
|
12
|
+
"./build-info.json",
|
|
13
|
+
];
|
|
14
|
+
function readVersionFromJsonCandidates(moduleUrl, candidates, opts = {}) {
|
|
3
15
|
try {
|
|
4
|
-
const require = createRequire(
|
|
5
|
-
const
|
|
6
|
-
|
|
16
|
+
const require = createRequire(moduleUrl);
|
|
17
|
+
for (const candidate of candidates) {
|
|
18
|
+
try {
|
|
19
|
+
const parsed = require(candidate);
|
|
20
|
+
const version = parsed.version?.trim();
|
|
21
|
+
if (!version)
|
|
22
|
+
continue;
|
|
23
|
+
if (opts.requirePackageName && parsed.name !== CORE_PACKAGE_NAME)
|
|
24
|
+
continue;
|
|
25
|
+
return version;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// ignore missing or unreadable candidate
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
7
32
|
}
|
|
8
33
|
catch {
|
|
9
34
|
return null;
|
|
10
35
|
}
|
|
11
36
|
}
|
|
37
|
+
export function readVersionFromPackageJsonForModuleUrl(moduleUrl) {
|
|
38
|
+
return readVersionFromJsonCandidates(moduleUrl, PACKAGE_JSON_CANDIDATES, {
|
|
39
|
+
requirePackageName: true,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export function readVersionFromBuildInfoForModuleUrl(moduleUrl) {
|
|
43
|
+
return readVersionFromJsonCandidates(moduleUrl, BUILD_INFO_CANDIDATES);
|
|
44
|
+
}
|
|
45
|
+
export function resolveVersionFromModuleUrl(moduleUrl) {
|
|
46
|
+
return (readVersionFromPackageJsonForModuleUrl(moduleUrl) ||
|
|
47
|
+
readVersionFromBuildInfoForModuleUrl(moduleUrl));
|
|
48
|
+
}
|
|
12
49
|
// Single source of truth for the current poolbot version.
|
|
13
50
|
// - Embedded/bundled builds: injected define or env var.
|
|
14
51
|
// - Dev/npm builds: package.json.
|
|
15
52
|
export const VERSION = (typeof __CLAWDBOT_VERSION__ === "string" && __CLAWDBOT_VERSION__) ||
|
|
16
53
|
process.env.CLAWDBOT_BUNDLED_VERSION ||
|
|
17
|
-
|
|
54
|
+
resolveVersionFromModuleUrl(import.meta.url) ||
|
|
18
55
|
"0.0.0";
|
package/dist/web/qr-image.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { deflateSync } from "node:zlib";
|
|
2
1
|
import QRCodeModule from "qrcode-terminal/vendor/QRCode/index.js";
|
|
3
2
|
import QRErrorCorrectLevelModule from "qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js";
|
|
3
|
+
import { encodePngRgba, fillPixel } from "../media/png-encode.js";
|
|
4
4
|
const QRCode = QRCodeModule;
|
|
5
5
|
const QRErrorCorrectLevel = QRErrorCorrectLevelModule;
|
|
6
6
|
function createQrMatrix(input) {
|
|
@@ -9,66 +9,6 @@ function createQrMatrix(input) {
|
|
|
9
9
|
qr.make();
|
|
10
10
|
return qr;
|
|
11
11
|
}
|
|
12
|
-
function fillPixel(buf, x, y, width, r, g, b, a = 255) {
|
|
13
|
-
const idx = (y * width + x) * 4;
|
|
14
|
-
buf[idx] = r;
|
|
15
|
-
buf[idx + 1] = g;
|
|
16
|
-
buf[idx + 2] = b;
|
|
17
|
-
buf[idx + 3] = a;
|
|
18
|
-
}
|
|
19
|
-
function crcTable() {
|
|
20
|
-
const table = new Uint32Array(256);
|
|
21
|
-
for (let i = 0; i < 256; i += 1) {
|
|
22
|
-
let c = i;
|
|
23
|
-
for (let k = 0; k < 8; k += 1) {
|
|
24
|
-
c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
|
|
25
|
-
}
|
|
26
|
-
table[i] = c >>> 0;
|
|
27
|
-
}
|
|
28
|
-
return table;
|
|
29
|
-
}
|
|
30
|
-
const CRC_TABLE = crcTable();
|
|
31
|
-
function crc32(buf) {
|
|
32
|
-
let crc = 0xffffffff;
|
|
33
|
-
for (let i = 0; i < buf.length; i += 1) {
|
|
34
|
-
crc = CRC_TABLE[(crc ^ buf[i]) & 0xff] ^ (crc >>> 8);
|
|
35
|
-
}
|
|
36
|
-
return (crc ^ 0xffffffff) >>> 0;
|
|
37
|
-
}
|
|
38
|
-
function pngChunk(type, data) {
|
|
39
|
-
const typeBuf = Buffer.from(type, "ascii");
|
|
40
|
-
const len = Buffer.alloc(4);
|
|
41
|
-
len.writeUInt32BE(data.length, 0);
|
|
42
|
-
const crc = crc32(Buffer.concat([typeBuf, data]));
|
|
43
|
-
const crcBuf = Buffer.alloc(4);
|
|
44
|
-
crcBuf.writeUInt32BE(crc, 0);
|
|
45
|
-
return Buffer.concat([len, typeBuf, data, crcBuf]);
|
|
46
|
-
}
|
|
47
|
-
function encodePngRgba(buffer, width, height) {
|
|
48
|
-
const stride = width * 4;
|
|
49
|
-
const raw = Buffer.alloc((stride + 1) * height);
|
|
50
|
-
for (let row = 0; row < height; row += 1) {
|
|
51
|
-
const rawOffset = row * (stride + 1);
|
|
52
|
-
raw[rawOffset] = 0; // filter: none
|
|
53
|
-
buffer.copy(raw, rawOffset + 1, row * stride, row * stride + stride);
|
|
54
|
-
}
|
|
55
|
-
const compressed = deflateSync(raw);
|
|
56
|
-
const signature = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
|
|
57
|
-
const ihdr = Buffer.alloc(13);
|
|
58
|
-
ihdr.writeUInt32BE(width, 0);
|
|
59
|
-
ihdr.writeUInt32BE(height, 4);
|
|
60
|
-
ihdr[8] = 8; // bit depth
|
|
61
|
-
ihdr[9] = 6; // color type RGBA
|
|
62
|
-
ihdr[10] = 0; // compression
|
|
63
|
-
ihdr[11] = 0; // filter
|
|
64
|
-
ihdr[12] = 0; // interlace
|
|
65
|
-
return Buffer.concat([
|
|
66
|
-
signature,
|
|
67
|
-
pngChunk("IHDR", ihdr),
|
|
68
|
-
pngChunk("IDAT", compressed),
|
|
69
|
-
pngChunk("IEND", Buffer.alloc(0)),
|
|
70
|
-
]);
|
|
71
|
-
}
|
|
72
12
|
export async function renderQrPngBase64(input, opts = {}) {
|
|
73
13
|
const { scale = 6, marginModules = 4 } = opts;
|
|
74
14
|
const qr = createQrMatrix(input);
|
|
@@ -269,8 +269,8 @@ export async function finalizeOnboardingWizard(options) {
|
|
|
269
269
|
await prompter.note([
|
|
270
270
|
`Dashboard link (with token): ${authedUrl}`,
|
|
271
271
|
controlUiOpened
|
|
272
|
-
? "Opened in your browser. Keep that tab to control
|
|
273
|
-
: "Copy/paste this URL in a browser on this machine to control
|
|
272
|
+
? "Opened in your browser. Keep that tab to control Poolbot."
|
|
273
|
+
: "Copy/paste this URL in a browser on this machine to control Poolbot.",
|
|
274
274
|
controlUiOpenHint,
|
|
275
275
|
]
|
|
276
276
|
.filter(Boolean)
|
|
@@ -314,8 +314,8 @@ export async function finalizeOnboardingWizard(options) {
|
|
|
314
314
|
await prompter.note([
|
|
315
315
|
`Dashboard link (with token): ${authedUrl}`,
|
|
316
316
|
controlUiOpened
|
|
317
|
-
? "Opened in your browser. Keep that tab to control
|
|
318
|
-
: "Copy/paste this URL in a browser on this machine to control
|
|
317
|
+
? "Opened in your browser. Keep that tab to control Poolbot."
|
|
318
|
+
: "Copy/paste this URL in a browser on this machine to control Poolbot.",
|
|
319
319
|
controlUiOpenHint,
|
|
320
320
|
]
|
|
321
321
|
.filter(Boolean)
|
|
@@ -336,7 +336,7 @@ export async function finalizeOnboardingWizard(options) {
|
|
|
336
336
|
: [
|
|
337
337
|
"If you want your agent to be able to search the web, you’ll need an API key.",
|
|
338
338
|
"",
|
|
339
|
-
"
|
|
339
|
+
"Poolbot uses Brave Search for the `web_search` tool. Without a Brave Search API key, web search won’t work.",
|
|
340
340
|
"",
|
|
341
341
|
"Set it up interactively:",
|
|
342
342
|
`- Run: ${formatCliCommand("poolbot configure --section web")}`,
|
|
@@ -347,8 +347,8 @@ export async function finalizeOnboardingWizard(options) {
|
|
|
347
347
|
].join("\n"), "Web search (optional)");
|
|
348
348
|
await prompter.note('What now: https://molt.bot/showcase ("What People Are Building").', "What now");
|
|
349
349
|
await prompter.outro(controlUiOpened
|
|
350
|
-
? "Onboarding complete. Dashboard opened with your token; keep that tab to control
|
|
350
|
+
? "Onboarding complete. Dashboard opened with your token; keep that tab to control Poolbot."
|
|
351
351
|
: seededInBackground
|
|
352
352
|
? "Onboarding complete. Web UI seeded in the background; open it anytime with the tokenized link above."
|
|
353
|
-
: "Onboarding complete. Use the tokenized dashboard link above to control
|
|
353
|
+
: "Onboarding complete. Use the tokenized dashboard link above to control Poolbot.");
|
|
354
354
|
}
|
|
@@ -22,11 +22,11 @@ async function requireRiskAcknowledgement(params) {
|
|
|
22
22
|
await params.prompter.note([
|
|
23
23
|
"Security warning — please read.",
|
|
24
24
|
"",
|
|
25
|
-
"
|
|
25
|
+
"Poolbot is a hobby project and still in beta. Expect sharp edges.",
|
|
26
26
|
"This bot can read files and run actions if tools are enabled.",
|
|
27
27
|
"A bad prompt can trick it into doing unsafe things.",
|
|
28
28
|
"",
|
|
29
|
-
"If you’re not comfortable with basic security and access control, don’t run
|
|
29
|
+
"If you’re not comfortable with basic security and access control, don’t run Poolbot.",
|
|
30
30
|
"Ask someone experienced to help before enabling tools or exposing it to the internet.",
|
|
31
31
|
"",
|
|
32
32
|
"Recommended baseline:",
|
|
@@ -51,7 +51,7 @@ async function requireRiskAcknowledgement(params) {
|
|
|
51
51
|
}
|
|
52
52
|
export async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
53
53
|
printWizardHeader(runtime);
|
|
54
|
-
await prompter.intro("
|
|
54
|
+
await prompter.intro("Poolbot onboarding");
|
|
55
55
|
await requireRiskAcknowledgement({ opts, prompter });
|
|
56
56
|
const snapshot = await readConfigFileSnapshot();
|
|
57
57
|
let baseConfig = snapshot.valid ? snapshot.config : {};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Existem **dois workflows de release** diferentes no pool-bot:
|
|
6
6
|
|
|
7
7
|
### 1. `release.yml` - Binários CLI
|
|
8
|
-
- **O que faz:** Gera binários standalone do
|
|
8
|
+
- **O que faz:** Gera binários standalone do Poolbot CLI
|
|
9
9
|
- **Ferramenta:** `pkg`
|
|
10
10
|
- **Saída:**
|
|
11
11
|
- Windows: `poolbot-win-x64.exe` (CLI)
|
|
@@ -38,13 +38,13 @@ Existem **dois workflows de release** diferentes no pool-bot:
|
|
|
38
38
|
## Quando Usar Cada Workflow
|
|
39
39
|
|
|
40
40
|
### release.yml (CLI)
|
|
41
|
-
- Quando você quer instalar o
|
|
41
|
+
- Quando você quer instalar o Poolbot como ferramenta de CLI
|
|
42
42
|
- Quando você quer executar `poolbot gateway`, `poolbot tui`, etc.
|
|
43
43
|
- Quando você quer integrar em scripts de automação
|
|
44
44
|
- Para desenvolvedores e usuários técnicos
|
|
45
45
|
|
|
46
46
|
### release-apps.yml (Apps)
|
|
47
|
-
- Quando você quer usar o
|
|
47
|
+
- Quando você quer usar o Poolbot como app normal
|
|
48
48
|
- Quando você quer notificações nativas no Windows
|
|
49
49
|
- Quando você quer Canvas, Chat e Camera no Android
|
|
50
50
|
- Para usuários finais, não técnicos
|
package/docs/_config.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
title: "
|
|
1
|
+
title: "Poolbot Docs"
|
|
2
2
|
description: "A TypeScript/Node gateway + macOS/iOS/Android companions for WhatsApp (web) and Telegram (bot)."
|
|
3
3
|
markdown: kramdown
|
|
4
4
|
highlighter: rouge
|
|
@@ -22,7 +22,7 @@ defaults:
|
|
|
22
22
|
nav:
|
|
23
23
|
- title: "Home"
|
|
24
24
|
url: "/"
|
|
25
|
-
- title: "
|
|
25
|
+
- title: "Poolbot Assistant"
|
|
26
26
|
url: "/start/clawd/"
|
|
27
27
|
- title: "Gateway"
|
|
28
28
|
url: "/gateway/"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<script>
|
|
18
18
|
(() => {
|
|
19
19
|
try {
|
|
20
|
-
const stored = localStorage.getItem("
|
|
20
|
+
const stored = localStorage.getItem("poolbot:theme");
|
|
21
21
|
if (stored === "light" || stored === "dark") document.documentElement.dataset.theme = stored;
|
|
22
22
|
} catch {
|
|
23
23
|
// ignore
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
<header class="shell">
|
|
36
36
|
<div class="shell__frame" role="banner">
|
|
37
37
|
<div class="shell__titlebar">
|
|
38
|
-
<div class="brand" aria-label="
|
|
38
|
+
<div class="brand" aria-label="Poolbot docs terminal">
|
|
39
39
|
<img
|
|
40
40
|
class="brand__logo"
|
|
41
41
|
src="{{ "/assets/pixel-lobster.svg" | relative_url }}"
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
decoding="async"
|
|
46
46
|
/>
|
|
47
47
|
<div class="brand__text">
|
|
48
|
-
<div class="brand__name">
|
|
48
|
+
<div class="brand__name">Poolbot</div>
|
|
49
49
|
<div class="brand__hint">docs // lobster terminal</div>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
|
|
53
53
|
<div class="titlebar__actions">
|
|
54
|
-
<a class="titlebar__cta" href="https://github.com/
|
|
54
|
+
<a class="titlebar__cta" href="https://github.com/poolbot/poolbot">
|
|
55
55
|
<span class="titlebar__cta-label">GitHub</span>
|
|
56
56
|
<span class="titlebar__cta-meta">repo</span>
|
|
57
57
|
</a>
|
|
58
|
-
<a class="titlebar__cta titlebar__cta--accent" href="https://github.com/
|
|
58
|
+
<a class="titlebar__cta titlebar__cta--accent" href="https://github.com/poolbot/poolbot/releases/latest">
|
|
59
59
|
<span class="titlebar__cta-label">Download</span>
|
|
60
60
|
<span class="titlebar__cta-meta">latest</span>
|
|
61
61
|
</a>
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<main id="content" class="content" role="main">
|
|
91
91
|
<div class="terminal">
|
|
92
92
|
<div class="terminal__prompt" aria-hidden="true">
|
|
93
|
-
<span class="prompt__user">clawd</span>@<span class="prompt__host">
|
|
93
|
+
<span class="prompt__user">clawd</span>@<span class="prompt__host">poolbot</span>:<span class="prompt__path">~/docs</span>$<span class="prompt__cmd">
|
|
94
94
|
{% if page.url == "/" %}cat index.md{% else %}less {{ page.path }}{% endif %}
|
|
95
95
|
</span>
|
|
96
96
|
</div>
|
|
@@ -116,11 +116,11 @@
|
|
|
116
116
|
|
|
117
117
|
<footer class="terminal__footer" role="contentinfo">
|
|
118
118
|
<div class="footer__line">
|
|
119
|
-
<span class="footer__sig">
|
|
119
|
+
<span class="footer__sig">poolbot.ai</span>
|
|
120
120
|
<span class="footer__sep">·</span>
|
|
121
|
-
<a href="https://github.com/
|
|
121
|
+
<a href="https://github.com/poolbot/poolbot">source</a>
|
|
122
122
|
<span class="footer__sep">·</span>
|
|
123
|
-
<a href="https://github.com/
|
|
123
|
+
<a href="https://github.com/poolbot/poolbot/releases">releases</a>
|
|
124
124
|
</div>
|
|
125
125
|
<div class="footer__hint" aria-hidden="true">
|
|
126
126
|
tip: press <kbd>F2</kbd> (Mac: <kbd>fn</kbd>+<kbd>F2</kbd>) to flip
|
package/docs/concepts/typebox.md
CHANGED
|
@@ -58,7 +58,7 @@ Authoritative list lives in `src/gateway/server.ts` (`METHODS`, `EVENTS`).
|
|
|
58
58
|
- Server handshake + method dispatch: `src/gateway/server.ts`
|
|
59
59
|
- Node client: `src/gateway/client.ts`
|
|
60
60
|
- Generated JSON Schema: `dist/protocol.schema.json`
|
|
61
|
-
- Generated Swift models: `apps/macos/Sources/
|
|
61
|
+
- Generated Swift models: `apps/macos/Sources/Pool-BotProtocol/GatewayModels.swift`
|
|
62
62
|
|
|
63
63
|
## Current pipeline
|
|
64
64
|
|
package/docs/docs.json
CHANGED
package/docs/northflank.mdx
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
title: Deploy on Northflank
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Deploy
|
|
5
|
+
Deploy Poolbot on Northflank with a one-click template and finish setup in your browser.
|
|
6
6
|
This is the easiest “no terminal on the server” path: Northflank runs the Gateway for you,
|
|
7
7
|
and you configure everything via the `/setup` web wizard.
|
|
8
8
|
|
|
9
9
|
## How to get started
|
|
10
10
|
|
|
11
|
-
1. Click [Deploy
|
|
11
|
+
1. Click [Deploy Poolbot](https://northflank.com/stacks/deploy-moltbot) to open the template.
|
|
12
12
|
2. Create an [account on Northflank](https://app.northflank.com/signup) if you don’t already have one.
|
|
13
|
-
3. Click **Deploy
|
|
13
|
+
3. Click **Deploy Poolbot now**.
|
|
14
14
|
4. Set the required environment variable: `SETUP_PASSWORD`.
|
|
15
|
-
5. Click **Deploy stack** to build and run the
|
|
15
|
+
5. Click **Deploy stack** to build and run the Poolbot template.
|
|
16
16
|
6. Wait for the deployment to complete, then click **View resources**.
|
|
17
|
-
7. Open the
|
|
18
|
-
8. Open the public
|
|
17
|
+
7. Open the Poolbot service.
|
|
18
|
+
8. Open the public Poolbot URL and complete setup at `/setup`.
|
|
19
19
|
9. Open the Control UI at `/moltbot`.
|
|
20
20
|
|
|
21
21
|
## What you get
|
|
22
22
|
|
|
23
|
-
- Hosted
|
|
23
|
+
- Hosted Poolbot Gateway + Control UI
|
|
24
24
|
- Web setup wizard at `/setup` (no terminal commands)
|
|
25
25
|
- Persistent storage via Northflank Volume (`/data`) so config/credentials/workspace survive redeploys
|
|
26
26
|
|
package/docs/railway.mdx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: Deploy on Railway
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Deploy
|
|
5
|
+
Deploy Poolbot on Railway with a one-click template and finish setup in your browser.
|
|
6
6
|
This is the easiest “no terminal on the server” path: Railway runs the Gateway for you,
|
|
7
7
|
and you configure everything via the `/setup` web wizard.
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ Then open:
|
|
|
31
31
|
|
|
32
32
|
## What you get
|
|
33
33
|
|
|
34
|
-
- Hosted
|
|
34
|
+
- Hosted Poolbot Gateway + Control UI
|
|
35
35
|
- Web setup wizard at `/setup` (no terminal commands)
|
|
36
36
|
- Persistent storage via Railway Volume (`/data`) so config/credentials/workspace survive redeploys
|
|
37
37
|
- Backup export at `/setup/export` to migrate off Railway later
|
|
@@ -93,4 +93,4 @@ Download a backup at:
|
|
|
93
93
|
|
|
94
94
|
- `https://<your-railway-domain>/setup/export`
|
|
95
95
|
|
|
96
|
-
This exports your
|
|
96
|
+
This exports your Poolbot state + workspace so you can migrate to another host without losing config or memory.
|
package/docs/render.mdx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: Deploy on Render
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Deploy
|
|
5
|
+
Deploy Poolbot on Render using Infrastructure as Code. The included `render.yaml` Blueprint defines your entire stack declaratively, service, disk, environment variables, so you can deploy with a single click and version your infrastructure alongside your code.
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ Once deployed, your service URL follows the pattern `https://<service-name>.onre
|
|
|
24
24
|
## Understanding the Blueprint
|
|
25
25
|
|
|
26
26
|
Render Blueprints are YAML files that define your infrastructure. The `render.yaml` in this
|
|
27
|
-
repository configures everything needed to run
|
|
27
|
+
repository configures everything needed to run Poolbot:
|
|
28
28
|
|
|
29
29
|
```yaml
|
|
30
30
|
services:
|
|
@@ -104,7 +104,7 @@ Modify variables in **Dashboard → your service → Environment**. Changes trig
|
|
|
104
104
|
|
|
105
105
|
### Auto-deploy
|
|
106
106
|
|
|
107
|
-
If you use the original
|
|
107
|
+
If you use the original Poolbot repository, Render will not auto-deploy your Poolbot. To update it, run a manual Blueprint sync from the dashboard.
|
|
108
108
|
|
|
109
109
|
## Custom domain
|
|
110
110
|
|
|
@@ -120,7 +120,7 @@ Render supports horizontal and vertical scaling:
|
|
|
120
120
|
- **Vertical**: Change the plan to get more CPU/RAM
|
|
121
121
|
- **Horizontal**: Increase instance count (Standard plan and above)
|
|
122
122
|
|
|
123
|
-
For
|
|
123
|
+
For Poolbot, vertical scaling is usually sufficient. Horizontal scaling requires sticky sessions or external state management.
|
|
124
124
|
|
|
125
125
|
## Backups and migration
|
|
126
126
|
|
|
@@ -130,7 +130,7 @@ Export your configuration and workspace at any time:
|
|
|
130
130
|
https://<your-service>.onrender.com/setup/export
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
This downloads a portable backup you can restore on any
|
|
133
|
+
This downloads a portable backup you can restore on any Poolbot host.
|
|
134
134
|
|
|
135
135
|
## Troubleshooting
|
|
136
136
|
|