@poolzin/pool-bot 2026.1.38 → 2026.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/chrome-extension/README.md +3 -3
- package/assets/chrome-extension/background.js +5 -5
- package/assets/chrome-extension/manifest.json +3 -3
- package/assets/chrome-extension/options.html +4 -4
- package/assets/chrome-extension/options.js +1 -1
- package/dist/acp/client.js +3 -3
- package/dist/acp/types.js +1 -1
- package/dist/agents/agent-paths.js +3 -3
- package/dist/agents/auth-profiles/paths.js +3 -3
- package/dist/agents/cli-runner/helpers.js +1 -1
- package/dist/agents/cli-runner.js +2 -2
- package/dist/agents/cloudflare-ai-gateway.js +31 -0
- package/dist/agents/compaction.js +16 -2
- package/dist/agents/context-window-guard.js +13 -10
- package/dist/agents/context.js +4 -4
- package/dist/agents/docs-path.js +1 -1
- package/dist/agents/minimax-vlm.js +1 -1
- package/dist/agents/model-auth.js +12 -1
- package/dist/agents/model-catalog.js +4 -4
- package/dist/agents/model-selection.js +10 -4
- package/dist/agents/models-config.js +3 -3
- package/dist/agents/models-config.providers.js +147 -39
- package/dist/agents/pi-embedded-helpers/openai.js +1 -1
- package/dist/agents/pi-embedded-runner/compact.js +8 -8
- package/dist/agents/pi-embedded-runner/model.js +2 -2
- package/dist/agents/pi-embedded-runner/run/attempt.js +6 -6
- package/dist/agents/pi-embedded-runner/run.js +4 -4
- package/dist/agents/pi-embedded-runner/tool-result-truncation.js +275 -0
- package/dist/agents/pi-embedded-runner/utils.js +1 -1
- package/dist/agents/pi-model-discovery.js +10 -0
- package/dist/agents/pi-tool-definition-adapter.js +50 -9
- package/dist/agents/pi-tools.before-tool-call.js +67 -0
- package/dist/agents/pi-tools.js +10 -5
- package/dist/agents/pi-tools.read.js +2 -2
- package/dist/agents/session-file-repair.js +83 -0
- package/dist/agents/session-transcript-repair.js +68 -0
- package/dist/agents/skills/frontmatter.js +1 -1
- package/dist/agents/skills/workspace.js +2 -2
- package/dist/agents/system-prompt.js +28 -4
- package/dist/agents/together-models.js +127 -0
- package/dist/agents/tool-images.js +1 -1
- package/dist/agents/tool-policy.js +1 -1
- package/dist/agents/tools/browser-tool.js +3 -3
- package/dist/agents/tools/image-tool.js +2 -2
- package/dist/agents/tools/memory-tool.js +94 -7
- package/dist/agents/tools/web-search.js +1 -1
- package/dist/agents/workspace.js +1 -5
- package/dist/auto-reply/commands-registry.data.js +1 -1
- package/dist/auto-reply/reply/commands-context-report.js +2 -2
- package/dist/auto-reply/reply/commands-session.js +2 -2
- package/dist/auto-reply/reply/get-reply-run.js +14 -4
- package/dist/auto-reply/reply/groups.js +1 -1
- package/dist/auto-reply/reply/inbound-context.js +4 -0
- package/dist/auto-reply/reply/inbound-meta.js +130 -0
- package/dist/auto-reply/reply/untrusted-context.js +15 -0
- package/dist/auto-reply/status.js +1 -1
- package/dist/browser/client-fetch.js +1 -1
- package/dist/browser/config.js +1 -1
- package/dist/browser/extension-relay.js +3 -3
- package/dist/browser/server-context.js +2 -2
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui.js +3 -3
- package/dist/channels/plugins/agent-tools/whatsapp-login.js +1 -17
- package/dist/channels/plugins/catalog.js +2 -2
- package/dist/channels/plugins/onboarding/imessage.js +1 -1
- package/dist/channels/plugins/onboarding/signal.js +1 -1
- package/dist/channels/plugins/onboarding/slack.js +4 -4
- package/dist/channels/plugins/onboarding/whatsapp.js +3 -3
- package/dist/channels/plugins/pairing-message.js +1 -1
- package/dist/cli/browser-cli-extension.js +2 -2
- package/dist/cli/docs-cli.js +1 -1
- package/dist/cli/gateway-cli/dev.js +1 -1
- package/dist/cli/memory-cli.js +25 -15
- package/dist/cli/nodes-cli/register.canvas.js +1 -1
- package/dist/cli/plugins-cli.js +1 -1
- package/dist/cli/run-main.js +2 -2
- package/dist/cli/security-cli.js +1 -1
- package/dist/cli/tagline.js +1 -1
- package/dist/cli/update-cli.js +4 -4
- package/dist/cli/webhooks-cli.js +5 -5
- package/dist/commands/agents.commands.add.js +1 -1
- package/dist/commands/auth-choice.apply.api-providers.js +305 -17
- package/dist/commands/auth-choice.apply.js +4 -1
- package/dist/commands/auth-choice.apply.plugin-provider.js +2 -2
- package/dist/commands/auth-choice.apply.xai.js +63 -0
- package/dist/commands/auth-choice.preferred-provider.js +7 -1
- package/dist/commands/configure.wizard.js +1 -1
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/docs.js +1 -1
- package/dist/commands/doctor-gateway-services.js +3 -3
- package/dist/commands/doctor-state-integrity.js +2 -14
- package/dist/commands/doctor-update.js +3 -3
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/models/list.probe.js +2 -2
- package/dist/commands/models/list.registry.js +4 -4
- package/dist/commands/models/list.status-command.js +2 -2
- package/dist/commands/onboard-auth.config-core.js +366 -28
- package/dist/commands/onboard-auth.credentials.js +71 -9
- package/dist/commands/onboard-auth.js +3 -3
- package/dist/commands/onboard-auth.models.js +26 -24
- package/dist/commands/onboard-non-interactive/local/auth-choice.js +140 -6
- package/dist/commands/status-all/report-lines.js +1 -1
- package/dist/commands/status.command.js +1 -1
- package/dist/commands/uninstall.js +3 -3
- package/dist/compat/legacy-names.js +1 -1
- package/dist/config/io.js +3 -3
- package/dist/config/schema.js +1 -1
- package/dist/config/types.js +0 -1
- package/dist/config/types.memory.js +1 -0
- package/dist/config/version.js +4 -4
- package/dist/config/zod-schema.js +0 -6
- 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/message-handler.process.js +6 -4
- package/dist/gateway/client.js +0 -14
- package/dist/gateway/live-image-probe.js +1 -66
- package/dist/gateway/openai-http.js +2 -2
- package/dist/gateway/openresponses-http.js +4 -4
- package/dist/gateway/server-discovery.js +2 -2
- package/dist/gateway/server-http.js +1 -1
- package/dist/gateway/server.impl.js +2 -6
- package/dist/hooks/frontmatter.js +1 -1
- package/dist/hooks/hooks-status.js +1 -1
- package/dist/hooks/install.js +2 -2
- package/dist/hooks/loader.js +1 -1
- package/dist/hooks/workspace.js +3 -3
- package/dist/index.js +2 -2
- package/dist/infra/bonjour.js +3 -3
- package/dist/infra/path-env.js +3 -3
- package/dist/infra/provider-usage.fetch.minimax.js +1 -1
- package/dist/infra/restart.js +1 -1
- package/dist/infra/tailscale.js +1 -1
- package/dist/macos/relay.js +2 -2
- package/dist/media/input-files.js +1 -1
- package/dist/media/mime.js +4 -0
- package/dist/media/png-encode.js +74 -0
- package/dist/media-understanding/providers/image.js +2 -2
- package/dist/memory/backend-config.js +207 -0
- package/dist/memory/embeddings.js +1 -1
- package/dist/memory/index.js +0 -5
- package/dist/memory/manager.js +3 -25
- package/dist/memory/types.js +1 -0
- package/dist/node-host/runner.js +2 -2
- package/dist/pairing/pairing-messages.js +1 -1
- package/dist/plugins/discovery.js +1 -1
- package/dist/plugins/install.js +2 -2
- package/dist/plugins/update.js +1 -1
- package/dist/security/audit.js +2 -2
- package/dist/shared/text/reasoning-tags.js +52 -7
- package/dist/slack/monitor/message-handler/prepare.js +10 -4
- package/dist/slack/monitor/slash.js +10 -4
- package/dist/tailscale/detect.js +146 -0
- package/dist/telegram/bot-message-context.js +1 -1
- package/dist/test-helpers/workspace.js +11 -0
- package/dist/test-utils/channel-plugins.js +82 -0
- package/dist/test-utils/ports.js +73 -0
- package/dist/utils/shell-argv.js +61 -0
- package/dist/utils.js +10 -0
- package/dist/web/qr-image.js +1 -61
- package/dist/wizard/onboarding.finalize.js +7 -7
- package/dist/wizard/onboarding.js +3 -3
- package/docs/RELEASE_WORKFOTS_COMPARISON.md +3 -3
- package/docs/_config.yml +2 -2
- package/docs/_layouts/default.html +9 -9
- package/docs/concepts/typebox.md +1 -1
- package/docs/docs.json +1 -1
- package/docs/northflank.mdx +7 -7
- package/docs/railway.mdx +3 -3
- package/docs/render.mdx +5 -5
- package/docs/start/lore.md +2 -2
- package/extensions/bluebubbles/index.ts +2 -2
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/bluebubbles/src/accounts.ts +8 -8
- package/extensions/bluebubbles/src/actions.test.ts +22 -22
- package/extensions/bluebubbles/src/actions.ts +5 -5
- package/extensions/bluebubbles/src/attachments.ts +2 -2
- package/extensions/bluebubbles/src/channel.ts +16 -16
- package/extensions/bluebubbles/src/chat.ts +2 -2
- package/extensions/bluebubbles/src/media-send.ts +2 -2
- package/extensions/bluebubbles/src/monitor.test.ts +46 -46
- package/extensions/bluebubbles/src/monitor.ts +5 -5
- package/extensions/bluebubbles/src/onboarding.ts +7 -7
- package/extensions/bluebubbles/src/reactions.ts +2 -2
- package/extensions/bluebubbles/src/send.ts +2 -2
- package/extensions/copilot-proxy/README.md +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/index.ts +2 -2
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diagnostics-otel/src/service.ts +3 -3
- package/extensions/discord/index.ts +2 -2
- package/extensions/discord/package.json +1 -1
- package/extensions/google-antigravity-auth/README.md +1 -1
- package/extensions/google-antigravity-auth/index.ts +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/README.md +1 -1
- package/extensions/google-gemini-cli-auth/oauth.ts +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/index.ts +3 -3
- package/extensions/googlechat/package.json +1 -1
- package/extensions/googlechat/src/accounts.ts +8 -8
- package/extensions/googlechat/src/actions.ts +6 -6
- package/extensions/googlechat/src/channel.ts +21 -21
- package/extensions/googlechat/src/monitor.ts +8 -8
- package/extensions/googlechat/src/onboarding.ts +10 -10
- package/extensions/imessage/index.ts +2 -2
- package/extensions/imessage/package.json +1 -1
- package/extensions/line/index.ts +2 -2
- package/extensions/line/package.json +1 -1
- package/extensions/line/src/card-command.ts +2 -2
- package/extensions/line/src/channel.logout.test.ts +4 -4
- package/extensions/line/src/channel.sendPayload.test.ts +8 -8
- package/extensions/line/src/channel.ts +3 -3
- package/extensions/llm-task/README.md +3 -3
- package/extensions/llm-task/index.ts +2 -2
- package/extensions/llm-task/package.json +1 -1
- package/extensions/llm-task/src/llm-task-tool.ts +4 -4
- package/extensions/lobster/README.md +6 -6
- package/extensions/lobster/index.ts +2 -2
- package/extensions/lobster/src/lobster-tool.test.ts +4 -4
- package/extensions/lobster/src/lobster-tool.ts +2 -2
- package/extensions/matrix/index.ts +2 -2
- package/extensions/matrix/package.json +1 -1
- package/extensions/matrix/src/matrix/client/config.ts +1 -1
- package/extensions/matrix/src/matrix/monitor/handler.ts +1 -1
- package/extensions/matrix/src/onboarding.ts +1 -1
- package/extensions/mattermost/index.ts +2 -2
- package/extensions/mattermost/package.json +1 -1
- package/extensions/mattermost/src/mattermost/accounts.ts +8 -8
- package/extensions/mattermost/src/mattermost/monitor-helpers.ts +5 -5
- package/extensions/mattermost/src/mattermost/monitor.ts +2 -2
- package/extensions/mattermost/src/onboarding-helpers.ts +3 -3
- package/extensions/mattermost/src/onboarding.ts +2 -2
- package/extensions/memory-core/index.ts +2 -2
- package/extensions/memory-core/package.json +1 -4
- 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 -250
- package/skills/nano-banana-pro/scripts/generate_image.py +1 -1
- package/skills/tmux/scripts/find-sessions.sh +1 -1
- package/CHANGELOG.md +0 -200
- 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
- package/skills/webgpu-threejs-tsl/REFERENCE.md +0 -283
- package/skills/webgpu-threejs-tsl/SKILL.md +0 -91
- package/skills/webgpu-threejs-tsl/docs/compute-shaders.md +0 -404
- package/skills/webgpu-threejs-tsl/docs/core-concepts.md +0 -453
- package/skills/webgpu-threejs-tsl/docs/materials.md +0 -353
- package/skills/webgpu-threejs-tsl/docs/post-processing.md +0 -434
- package/skills/webgpu-threejs-tsl/docs/wgsl-integration.md +0 -324
- package/skills/webgpu-threejs-tsl/examples/basic-setup.js +0 -87
- package/skills/webgpu-threejs-tsl/examples/custom-material.js +0 -170
- package/skills/webgpu-threejs-tsl/examples/earth-shader.js +0 -292
- package/skills/webgpu-threejs-tsl/examples/particle-system.js +0 -259
- package/skills/webgpu-threejs-tsl/examples/post-processing.js +0 -199
- package/skills/webgpu-threejs-tsl/templates/compute-shader.js +0 -305
- package/skills/webgpu-threejs-tsl/templates/webgpu-project.js +0 -276
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolvePoolbotAgentDir } from "../agents/agent-paths.js";
|
|
2
2
|
import { upsertAuthProfile } from "../agents/auth-profiles.js";
|
|
3
|
-
|
|
3
|
+
export { CLOUDFLARE_AI_GATEWAY_DEFAULT_MODEL_REF } from "../agents/cloudflare-ai-gateway.js";
|
|
4
|
+
export { XAI_DEFAULT_MODEL_REF } from "./onboard-auth.models.js";
|
|
5
|
+
const resolveAuthAgentDir = (agentDir) => agentDir ?? resolvePoolbotAgentDir();
|
|
4
6
|
export async function writeOAuthCredentials(provider, creds, agentDir) {
|
|
5
|
-
|
|
7
|
+
const email = typeof creds.email === "string" && creds.email.trim() ? creds.email.trim() : "default";
|
|
6
8
|
upsertAuthProfile({
|
|
7
|
-
profileId: `${provider}:${
|
|
9
|
+
profileId: `${provider}:${email}`,
|
|
8
10
|
credential: {
|
|
9
11
|
type: "oauth",
|
|
10
12
|
provider,
|
|
@@ -61,13 +63,13 @@ export async function setMoonshotApiKey(key, agentDir) {
|
|
|
61
63
|
agentDir: resolveAuthAgentDir(agentDir),
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
|
-
export async function
|
|
66
|
+
export async function setKimiCodingApiKey(key, agentDir) {
|
|
65
67
|
// Write to resolved agent dir so gateway finds credentials on startup.
|
|
66
68
|
upsertAuthProfile({
|
|
67
|
-
profileId: "kimi-
|
|
69
|
+
profileId: "kimi-coding:default",
|
|
68
70
|
credential: {
|
|
69
71
|
type: "api_key",
|
|
70
|
-
provider: "kimi-
|
|
72
|
+
provider: "kimi-coding",
|
|
71
73
|
key,
|
|
72
74
|
},
|
|
73
75
|
agentDir: resolveAuthAgentDir(agentDir),
|
|
@@ -98,10 +100,11 @@ export async function setVeniceApiKey(key, agentDir) {
|
|
|
98
100
|
});
|
|
99
101
|
}
|
|
100
102
|
export const ZAI_DEFAULT_MODEL_REF = "zai/glm-4.7";
|
|
103
|
+
export const XIAOMI_DEFAULT_MODEL_REF = "xiaomi/mimo-v2-flash";
|
|
101
104
|
export const OPENROUTER_DEFAULT_MODEL_REF = "openrouter/auto";
|
|
102
|
-
export const
|
|
105
|
+
export const TOGETHER_DEFAULT_MODEL_REF = "together/moonshotai/Kimi-K2.5";
|
|
106
|
+
export const VERCEL_AI_GATEWAY_DEFAULT_MODEL_REF = "vercel-ai-gateway/anthropic/claude-opus-4.6";
|
|
103
107
|
export async function setZaiApiKey(key, agentDir) {
|
|
104
|
-
// Write to resolved agent dir so gateway finds credentials on startup.
|
|
105
108
|
upsertAuthProfile({
|
|
106
109
|
profileId: "zai:default",
|
|
107
110
|
credential: {
|
|
@@ -112,6 +115,17 @@ export async function setZaiApiKey(key, agentDir) {
|
|
|
112
115
|
agentDir: resolveAuthAgentDir(agentDir),
|
|
113
116
|
});
|
|
114
117
|
}
|
|
118
|
+
export async function setXiaomiApiKey(key, agentDir) {
|
|
119
|
+
upsertAuthProfile({
|
|
120
|
+
profileId: "xiaomi:default",
|
|
121
|
+
credential: {
|
|
122
|
+
type: "api_key",
|
|
123
|
+
provider: "xiaomi",
|
|
124
|
+
key,
|
|
125
|
+
},
|
|
126
|
+
agentDir: resolveAuthAgentDir(agentDir),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
115
129
|
export async function setOpenrouterApiKey(key, agentDir) {
|
|
116
130
|
upsertAuthProfile({
|
|
117
131
|
profileId: "openrouter:default",
|
|
@@ -123,6 +137,21 @@ export async function setOpenrouterApiKey(key, agentDir) {
|
|
|
123
137
|
agentDir: resolveAuthAgentDir(agentDir),
|
|
124
138
|
});
|
|
125
139
|
}
|
|
140
|
+
export async function setCloudflareAiGatewayConfig(accountId, gatewayId, apiKey, agentDir) {
|
|
141
|
+
upsertAuthProfile({
|
|
142
|
+
profileId: "cloudflare-ai-gateway:default",
|
|
143
|
+
credential: {
|
|
144
|
+
type: "api_key",
|
|
145
|
+
provider: "cloudflare-ai-gateway",
|
|
146
|
+
key: apiKey.trim(),
|
|
147
|
+
metadata: {
|
|
148
|
+
accountId: accountId.trim(),
|
|
149
|
+
gatewayId: gatewayId.trim(),
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
agentDir: resolveAuthAgentDir(agentDir),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
126
155
|
export async function setVercelAiGatewayApiKey(key, agentDir) {
|
|
127
156
|
upsertAuthProfile({
|
|
128
157
|
profileId: "vercel-ai-gateway:default",
|
|
@@ -145,3 +174,36 @@ export async function setOpencodeZenApiKey(key, agentDir) {
|
|
|
145
174
|
agentDir: resolveAuthAgentDir(agentDir),
|
|
146
175
|
});
|
|
147
176
|
}
|
|
177
|
+
export async function setTogetherApiKey(key, agentDir) {
|
|
178
|
+
upsertAuthProfile({
|
|
179
|
+
profileId: "together:default",
|
|
180
|
+
credential: {
|
|
181
|
+
type: "api_key",
|
|
182
|
+
provider: "together",
|
|
183
|
+
key,
|
|
184
|
+
},
|
|
185
|
+
agentDir: resolveAuthAgentDir(agentDir),
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
export function setQianfanApiKey(key, agentDir) {
|
|
189
|
+
upsertAuthProfile({
|
|
190
|
+
profileId: "qianfan:default",
|
|
191
|
+
credential: {
|
|
192
|
+
type: "api_key",
|
|
193
|
+
provider: "qianfan",
|
|
194
|
+
key,
|
|
195
|
+
},
|
|
196
|
+
agentDir: resolveAuthAgentDir(agentDir),
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
export function setXaiApiKey(key, agentDir) {
|
|
200
|
+
upsertAuthProfile({
|
|
201
|
+
profileId: "xai:default",
|
|
202
|
+
credential: {
|
|
203
|
+
type: "api_key",
|
|
204
|
+
provider: "xai",
|
|
205
|
+
key,
|
|
206
|
+
},
|
|
207
|
+
agentDir: resolveAuthAgentDir(agentDir),
|
|
208
|
+
});
|
|
209
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { SYNTHETIC_DEFAULT_MODEL_ID, SYNTHETIC_DEFAULT_MODEL_REF, } from "../agents/synthetic-models.js";
|
|
2
2
|
export { VENICE_DEFAULT_MODEL_ID, VENICE_DEFAULT_MODEL_REF } from "../agents/venice-models.js";
|
|
3
|
-
export { applyAuthProfileConfig, applyKimiCodeConfig, applyKimiCodeProviderConfig, applyMoonshotConfig, applyMoonshotProviderConfig, applyOpenrouterConfig, applyOpenrouterProviderConfig, applySyntheticConfig, applySyntheticProviderConfig, applyVeniceConfig, applyVeniceProviderConfig, applyVercelAiGatewayConfig, applyVercelAiGatewayProviderConfig, applyZaiConfig, } from "./onboard-auth.config-core.js";
|
|
3
|
+
export { applyAuthProfileConfig, applyCloudflareAiGatewayConfig, applyCloudflareAiGatewayProviderConfig, applyQianfanConfig, applyQianfanProviderConfig, applyKimiCodeConfig, applyKimiCodeProviderConfig, applyMoonshotConfig, applyMoonshotConfigCn, applyMoonshotProviderConfig, applyMoonshotProviderConfigCn, applyOpenrouterConfig, applyOpenrouterProviderConfig, applySyntheticConfig, applySyntheticProviderConfig, applyTogetherConfig, applyTogetherProviderConfig, applyVeniceConfig, applyVeniceProviderConfig, applyVercelAiGatewayConfig, applyVercelAiGatewayProviderConfig, applyXaiConfig, applyXaiProviderConfig, applyXiaomiConfig, applyXiaomiProviderConfig, applyZaiConfig, } from "./onboard-auth.config-core.js";
|
|
4
4
|
export { applyMinimaxApiConfig, applyMinimaxApiProviderConfig, applyMinimaxConfig, applyMinimaxHostedConfig, applyMinimaxHostedProviderConfig, applyMinimaxProviderConfig, } from "./onboard-auth.config-minimax.js";
|
|
5
5
|
export { applyOpencodeZenConfig, applyOpencodeZenProviderConfig, } from "./onboard-auth.config-opencode.js";
|
|
6
|
-
export { OPENROUTER_DEFAULT_MODEL_REF, setAnthropicApiKey, setGeminiApiKey,
|
|
7
|
-
export {
|
|
6
|
+
export { CLOUDFLARE_AI_GATEWAY_DEFAULT_MODEL_REF, OPENROUTER_DEFAULT_MODEL_REF, setAnthropicApiKey, setCloudflareAiGatewayConfig, setQianfanApiKey, setGeminiApiKey, setKimiCodingApiKey, setMinimaxApiKey, setMoonshotApiKey, setOpencodeZenApiKey, setOpenrouterApiKey, setSyntheticApiKey, setTogetherApiKey, setVeniceApiKey, setVercelAiGatewayApiKey, setXiaomiApiKey, setZaiApiKey, setXaiApiKey, writeOAuthCredentials, VERCEL_AI_GATEWAY_DEFAULT_MODEL_REF, XIAOMI_DEFAULT_MODEL_REF, ZAI_DEFAULT_MODEL_REF, TOGETHER_DEFAULT_MODEL_REF, XAI_DEFAULT_MODEL_REF, } from "./onboard-auth.credentials.js";
|
|
7
|
+
export { buildMinimaxApiModelDefinition, buildMinimaxModelDefinition, buildMoonshotModelDefinition, DEFAULT_MINIMAX_BASE_URL, MOONSHOT_CN_BASE_URL, QIANFAN_BASE_URL, QIANFAN_DEFAULT_MODEL_ID, QIANFAN_DEFAULT_MODEL_REF, KIMI_CODING_MODEL_ID, KIMI_CODING_MODEL_REF, MINIMAX_API_BASE_URL, MINIMAX_HOSTED_MODEL_ID, MINIMAX_HOSTED_MODEL_REF, MOONSHOT_BASE_URL, MOONSHOT_DEFAULT_MODEL_ID, MOONSHOT_DEFAULT_MODEL_REF, } from "./onboard-auth.models.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { QIANFAN_BASE_URL, QIANFAN_DEFAULT_MODEL_ID } from "../agents/models-config.providers.js";
|
|
1
2
|
export const DEFAULT_MINIMAX_BASE_URL = "https://api.minimax.io/v1";
|
|
2
3
|
export const MINIMAX_API_BASE_URL = "https://api.minimax.io/anthropic";
|
|
3
4
|
export const MINIMAX_HOSTED_MODEL_ID = "MiniMax-M2.1";
|
|
@@ -5,17 +6,15 @@ export const MINIMAX_HOSTED_MODEL_REF = `minimax/${MINIMAX_HOSTED_MODEL_ID}`;
|
|
|
5
6
|
export const DEFAULT_MINIMAX_CONTEXT_WINDOW = 200000;
|
|
6
7
|
export const DEFAULT_MINIMAX_MAX_TOKENS = 8192;
|
|
7
8
|
export const MOONSHOT_BASE_URL = "https://api.moonshot.ai/v1";
|
|
8
|
-
export const
|
|
9
|
+
export const MOONSHOT_CN_BASE_URL = "https://api.moonshot.cn/v1";
|
|
10
|
+
export const MOONSHOT_DEFAULT_MODEL_ID = "kimi-k2.5";
|
|
9
11
|
export const MOONSHOT_DEFAULT_MODEL_REF = `moonshot/${MOONSHOT_DEFAULT_MODEL_ID}`;
|
|
10
12
|
export const MOONSHOT_DEFAULT_CONTEXT_WINDOW = 256000;
|
|
11
13
|
export const MOONSHOT_DEFAULT_MAX_TOKENS = 8192;
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export
|
|
15
|
-
export const
|
|
16
|
-
export const KIMI_CODE_MAX_TOKENS = 32768;
|
|
17
|
-
export const KIMI_CODE_HEADERS = { "User-Agent": "KimiCLI/0.77" };
|
|
18
|
-
export const KIMI_CODE_COMPAT = { supportsDeveloperRole: false };
|
|
14
|
+
export const KIMI_CODING_MODEL_ID = "k2p5";
|
|
15
|
+
export const KIMI_CODING_MODEL_REF = `kimi-coding/${KIMI_CODING_MODEL_ID}`;
|
|
16
|
+
export { QIANFAN_BASE_URL, QIANFAN_DEFAULT_MODEL_ID };
|
|
17
|
+
export const QIANFAN_DEFAULT_MODEL_REF = `qianfan/${QIANFAN_DEFAULT_MODEL_ID}`;
|
|
19
18
|
// Pricing: MiniMax doesn't publish public rates. Override in models.json for accurate costs.
|
|
20
19
|
export const MINIMAX_API_COST = {
|
|
21
20
|
input: 15,
|
|
@@ -41,12 +40,6 @@ export const MOONSHOT_DEFAULT_COST = {
|
|
|
41
40
|
cacheRead: 0,
|
|
42
41
|
cacheWrite: 0,
|
|
43
42
|
};
|
|
44
|
-
export const KIMI_CODE_DEFAULT_COST = {
|
|
45
|
-
input: 0,
|
|
46
|
-
output: 0,
|
|
47
|
-
cacheRead: 0,
|
|
48
|
-
cacheWrite: 0,
|
|
49
|
-
};
|
|
50
43
|
const MINIMAX_MODEL_CATALOG = {
|
|
51
44
|
"MiniMax-M2.1": { name: "MiniMax M2.1", reasoning: false },
|
|
52
45
|
"MiniMax-M2.1-lightning": {
|
|
@@ -77,7 +70,7 @@ export function buildMinimaxApiModelDefinition(modelId) {
|
|
|
77
70
|
export function buildMoonshotModelDefinition() {
|
|
78
71
|
return {
|
|
79
72
|
id: MOONSHOT_DEFAULT_MODEL_ID,
|
|
80
|
-
name: "Kimi K2
|
|
73
|
+
name: "Kimi K2.5",
|
|
81
74
|
reasoning: false,
|
|
82
75
|
input: ["text"],
|
|
83
76
|
cost: MOONSHOT_DEFAULT_COST,
|
|
@@ -85,16 +78,25 @@ export function buildMoonshotModelDefinition() {
|
|
|
85
78
|
maxTokens: MOONSHOT_DEFAULT_MAX_TOKENS,
|
|
86
79
|
};
|
|
87
80
|
}
|
|
88
|
-
export
|
|
81
|
+
export const XAI_BASE_URL = "https://api.x.ai/v1";
|
|
82
|
+
export const XAI_DEFAULT_MODEL_ID = "grok-4";
|
|
83
|
+
export const XAI_DEFAULT_MODEL_REF = `xai/${XAI_DEFAULT_MODEL_ID}`;
|
|
84
|
+
export const XAI_DEFAULT_CONTEXT_WINDOW = 131072;
|
|
85
|
+
export const XAI_DEFAULT_MAX_TOKENS = 8192;
|
|
86
|
+
export const XAI_DEFAULT_COST = {
|
|
87
|
+
input: 0,
|
|
88
|
+
output: 0,
|
|
89
|
+
cacheRead: 0,
|
|
90
|
+
cacheWrite: 0,
|
|
91
|
+
};
|
|
92
|
+
export function buildXaiModelDefinition() {
|
|
89
93
|
return {
|
|
90
|
-
id:
|
|
91
|
-
name: "
|
|
92
|
-
reasoning:
|
|
94
|
+
id: XAI_DEFAULT_MODEL_ID,
|
|
95
|
+
name: "Grok 4",
|
|
96
|
+
reasoning: false,
|
|
93
97
|
input: ["text"],
|
|
94
|
-
cost:
|
|
95
|
-
contextWindow:
|
|
96
|
-
maxTokens:
|
|
97
|
-
headers: KIMI_CODE_HEADERS,
|
|
98
|
-
compat: KIMI_CODE_COMPAT,
|
|
98
|
+
cost: XAI_DEFAULT_COST,
|
|
99
|
+
contextWindow: XAI_DEFAULT_CONTEXT_WINDOW,
|
|
100
|
+
maxTokens: XAI_DEFAULT_MAX_TOKENS,
|
|
99
101
|
};
|
|
100
102
|
}
|
|
@@ -4,7 +4,7 @@ import { parseDurationMs } from "../../../cli/parse-duration.js";
|
|
|
4
4
|
import { upsertSharedEnvVar } from "../../../infra/env-file.js";
|
|
5
5
|
import { buildTokenProfileId, validateAnthropicSetupToken } from "../../auth-token.js";
|
|
6
6
|
import { applyGoogleGeminiModelDefault } from "../../google-gemini-model-default.js";
|
|
7
|
-
import { applyAuthProfileConfig, applyKimiCodeConfig, applyMinimaxApiConfig, applyMinimaxConfig, applyMoonshotConfig, applyOpencodeZenConfig, applyOpenrouterConfig, applySyntheticConfig, applyVeniceConfig, applyVercelAiGatewayConfig, applyZaiConfig, setAnthropicApiKey, setGeminiApiKey,
|
|
7
|
+
import { applyAuthProfileConfig, applyCloudflareAiGatewayConfig, applyKimiCodeConfig, applyMinimaxApiConfig, applyMinimaxConfig, applyMoonshotConfig, applyMoonshotConfigCn, applyOpencodeZenConfig, applyOpenrouterConfig, applyQianfanConfig, applySyntheticConfig, applyTogetherConfig, applyVeniceConfig, applyVercelAiGatewayConfig, applyXaiConfig, applyXiaomiConfig, applyZaiConfig, setAnthropicApiKey, setCloudflareAiGatewayConfig, setGeminiApiKey, setKimiCodingApiKey, setMinimaxApiKey, setMoonshotApiKey, setOpencodeZenApiKey, setOpenrouterApiKey, setQianfanApiKey, setSyntheticApiKey, setTogetherApiKey, setVeniceApiKey, setVercelAiGatewayApiKey, setXaiApiKey, setXiaomiApiKey, setZaiApiKey, } from "../../onboard-auth.js";
|
|
8
8
|
import { resolveNonInteractiveApiKey } from "../api-keys.js";
|
|
9
9
|
import { shortenHomePath } from "../../../utils.js";
|
|
10
10
|
export async function applyNonInteractiveAuthChoice(params) {
|
|
@@ -216,22 +216,42 @@ export async function applyNonInteractiveAuthChoice(params) {
|
|
|
216
216
|
});
|
|
217
217
|
return applyMoonshotConfig(nextConfig);
|
|
218
218
|
}
|
|
219
|
+
if (authChoice === "moonshot-api-key-cn") {
|
|
220
|
+
const resolved = await resolveNonInteractiveApiKey({
|
|
221
|
+
provider: "moonshot",
|
|
222
|
+
cfg: baseConfig,
|
|
223
|
+
flagValue: opts.moonshotApiKey,
|
|
224
|
+
flagName: "--moonshot-api-key",
|
|
225
|
+
envVar: "MOONSHOT_API_KEY",
|
|
226
|
+
runtime,
|
|
227
|
+
});
|
|
228
|
+
if (!resolved)
|
|
229
|
+
return null;
|
|
230
|
+
if (resolved.source !== "profile")
|
|
231
|
+
await setMoonshotApiKey(resolved.key);
|
|
232
|
+
nextConfig = applyAuthProfileConfig(nextConfig, {
|
|
233
|
+
profileId: "moonshot:default",
|
|
234
|
+
provider: "moonshot",
|
|
235
|
+
mode: "api_key",
|
|
236
|
+
});
|
|
237
|
+
return applyMoonshotConfigCn(nextConfig);
|
|
238
|
+
}
|
|
219
239
|
if (authChoice === "kimi-code-api-key") {
|
|
220
240
|
const resolved = await resolveNonInteractiveApiKey({
|
|
221
|
-
provider: "kimi-
|
|
241
|
+
provider: "kimi-coding",
|
|
222
242
|
cfg: baseConfig,
|
|
223
243
|
flagValue: opts.kimiCodeApiKey,
|
|
224
244
|
flagName: "--kimi-code-api-key",
|
|
225
|
-
envVar: "
|
|
245
|
+
envVar: "KIMI_API_KEY",
|
|
226
246
|
runtime,
|
|
227
247
|
});
|
|
228
248
|
if (!resolved)
|
|
229
249
|
return null;
|
|
230
250
|
if (resolved.source !== "profile")
|
|
231
|
-
await
|
|
251
|
+
await setKimiCodingApiKey(resolved.key);
|
|
232
252
|
nextConfig = applyAuthProfileConfig(nextConfig, {
|
|
233
|
-
profileId: "kimi-
|
|
234
|
-
provider: "kimi-
|
|
253
|
+
profileId: "kimi-coding:default",
|
|
254
|
+
provider: "kimi-coding",
|
|
235
255
|
mode: "api_key",
|
|
236
256
|
});
|
|
237
257
|
return applyKimiCodeConfig(nextConfig);
|
|
@@ -276,6 +296,120 @@ export async function applyNonInteractiveAuthChoice(params) {
|
|
|
276
296
|
});
|
|
277
297
|
return applyVeniceConfig(nextConfig);
|
|
278
298
|
}
|
|
299
|
+
if (authChoice === "xiaomi-api-key") {
|
|
300
|
+
const resolved = await resolveNonInteractiveApiKey({
|
|
301
|
+
provider: "xiaomi",
|
|
302
|
+
cfg: baseConfig,
|
|
303
|
+
flagValue: opts.xiaomiApiKey,
|
|
304
|
+
flagName: "--xiaomi-api-key",
|
|
305
|
+
envVar: "XIAOMI_API_KEY",
|
|
306
|
+
runtime,
|
|
307
|
+
});
|
|
308
|
+
if (!resolved)
|
|
309
|
+
return null;
|
|
310
|
+
if (resolved.source !== "profile")
|
|
311
|
+
await setXiaomiApiKey(resolved.key);
|
|
312
|
+
nextConfig = applyAuthProfileConfig(nextConfig, {
|
|
313
|
+
profileId: "xiaomi:default",
|
|
314
|
+
provider: "xiaomi",
|
|
315
|
+
mode: "api_key",
|
|
316
|
+
});
|
|
317
|
+
return applyXiaomiConfig(nextConfig);
|
|
318
|
+
}
|
|
319
|
+
if (authChoice === "xai-api-key") {
|
|
320
|
+
const resolved = await resolveNonInteractiveApiKey({
|
|
321
|
+
provider: "xai",
|
|
322
|
+
cfg: baseConfig,
|
|
323
|
+
flagValue: opts.xaiApiKey,
|
|
324
|
+
flagName: "--xai-api-key",
|
|
325
|
+
envVar: "XAI_API_KEY",
|
|
326
|
+
runtime,
|
|
327
|
+
});
|
|
328
|
+
if (!resolved)
|
|
329
|
+
return null;
|
|
330
|
+
if (resolved.source !== "profile")
|
|
331
|
+
setXaiApiKey(resolved.key);
|
|
332
|
+
nextConfig = applyAuthProfileConfig(nextConfig, {
|
|
333
|
+
profileId: "xai:default",
|
|
334
|
+
provider: "xai",
|
|
335
|
+
mode: "api_key",
|
|
336
|
+
});
|
|
337
|
+
return applyXaiConfig(nextConfig);
|
|
338
|
+
}
|
|
339
|
+
if (authChoice === "qianfan-api-key") {
|
|
340
|
+
const resolved = await resolveNonInteractiveApiKey({
|
|
341
|
+
provider: "qianfan",
|
|
342
|
+
cfg: baseConfig,
|
|
343
|
+
flagValue: opts.qianfanApiKey,
|
|
344
|
+
flagName: "--qianfan-api-key",
|
|
345
|
+
envVar: "QIANFAN_API_KEY",
|
|
346
|
+
runtime,
|
|
347
|
+
});
|
|
348
|
+
if (!resolved)
|
|
349
|
+
return null;
|
|
350
|
+
if (resolved.source !== "profile")
|
|
351
|
+
setQianfanApiKey(resolved.key);
|
|
352
|
+
nextConfig = applyAuthProfileConfig(nextConfig, {
|
|
353
|
+
profileId: "qianfan:default",
|
|
354
|
+
provider: "qianfan",
|
|
355
|
+
mode: "api_key",
|
|
356
|
+
});
|
|
357
|
+
return applyQianfanConfig(nextConfig);
|
|
358
|
+
}
|
|
359
|
+
if (authChoice === "cloudflare-ai-gateway-api-key") {
|
|
360
|
+
const accountId = opts.cloudflareAiGatewayAccountId?.trim() ?? "";
|
|
361
|
+
const gatewayId = opts.cloudflareAiGatewayGatewayId?.trim() ?? "";
|
|
362
|
+
if (!accountId || !gatewayId) {
|
|
363
|
+
runtime.error([
|
|
364
|
+
'Auth choice "cloudflare-ai-gateway-api-key" requires Account ID and Gateway ID.',
|
|
365
|
+
"Use --cloudflare-ai-gateway-account-id and --cloudflare-ai-gateway-gateway-id.",
|
|
366
|
+
].join("\n"));
|
|
367
|
+
runtime.exit(1);
|
|
368
|
+
return null;
|
|
369
|
+
}
|
|
370
|
+
const resolved = await resolveNonInteractiveApiKey({
|
|
371
|
+
provider: "cloudflare-ai-gateway",
|
|
372
|
+
cfg: baseConfig,
|
|
373
|
+
flagValue: opts.cloudflareAiGatewayApiKey,
|
|
374
|
+
flagName: "--cloudflare-ai-gateway-api-key",
|
|
375
|
+
envVar: "CLOUDFLARE_AI_GATEWAY_API_KEY",
|
|
376
|
+
runtime,
|
|
377
|
+
});
|
|
378
|
+
if (!resolved)
|
|
379
|
+
return null;
|
|
380
|
+
if (resolved.source !== "profile") {
|
|
381
|
+
await setCloudflareAiGatewayConfig(accountId, gatewayId, resolved.key);
|
|
382
|
+
}
|
|
383
|
+
nextConfig = applyAuthProfileConfig(nextConfig, {
|
|
384
|
+
profileId: "cloudflare-ai-gateway:default",
|
|
385
|
+
provider: "cloudflare-ai-gateway",
|
|
386
|
+
mode: "api_key",
|
|
387
|
+
});
|
|
388
|
+
return applyCloudflareAiGatewayConfig(nextConfig, {
|
|
389
|
+
accountId,
|
|
390
|
+
gatewayId,
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
if (authChoice === "together-api-key") {
|
|
394
|
+
const resolved = await resolveNonInteractiveApiKey({
|
|
395
|
+
provider: "together",
|
|
396
|
+
cfg: baseConfig,
|
|
397
|
+
flagValue: opts.togetherApiKey,
|
|
398
|
+
flagName: "--together-api-key",
|
|
399
|
+
envVar: "TOGETHER_API_KEY",
|
|
400
|
+
runtime,
|
|
401
|
+
});
|
|
402
|
+
if (!resolved)
|
|
403
|
+
return null;
|
|
404
|
+
if (resolved.source !== "profile")
|
|
405
|
+
await setTogetherApiKey(resolved.key);
|
|
406
|
+
nextConfig = applyAuthProfileConfig(nextConfig, {
|
|
407
|
+
profileId: "together:default",
|
|
408
|
+
provider: "together",
|
|
409
|
+
mode: "api_key",
|
|
410
|
+
});
|
|
411
|
+
return applyTogetherConfig(nextConfig);
|
|
412
|
+
}
|
|
279
413
|
if (authChoice === "minimax-cloud" ||
|
|
280
414
|
authChoice === "minimax-api" ||
|
|
281
415
|
authChoice === "minimax-api-lightning") {
|
|
@@ -88,7 +88,7 @@ export async function buildStatusAllReportLines(params) {
|
|
|
88
88
|
rows: agentRows,
|
|
89
89
|
});
|
|
90
90
|
const lines = [];
|
|
91
|
-
lines.push(heading("
|
|
91
|
+
lines.push(heading("Poolbot status --all"));
|
|
92
92
|
lines.push("");
|
|
93
93
|
lines.push(heading("Overview"));
|
|
94
94
|
lines.push(overview.trimEnd());
|
|
@@ -271,7 +271,7 @@ export async function statusCommand(opts, runtime) {
|
|
|
271
271
|
Value: `${summary.sessions.count} active · default ${defaults.model ?? "unknown"}${defaultCtx} · ${storeLabel}`,
|
|
272
272
|
},
|
|
273
273
|
];
|
|
274
|
-
runtime.log(theme.heading("
|
|
274
|
+
runtime.log(theme.heading("Poolbot status"));
|
|
275
275
|
runtime.log("");
|
|
276
276
|
runtime.log(theme.heading("Overview"));
|
|
277
277
|
runtime.log(renderTable({
|
|
@@ -59,9 +59,9 @@ async function stopAndUninstallService(runtime) {
|
|
|
59
59
|
async function removeMacApp(runtime, dryRun) {
|
|
60
60
|
if (process.platform !== "darwin")
|
|
61
61
|
return;
|
|
62
|
-
await removePath("/Applications/
|
|
62
|
+
await removePath("/Applications/Poolbot.app", runtime, {
|
|
63
63
|
dryRun,
|
|
64
|
-
label: "/Applications/
|
|
64
|
+
label: "/Applications/Poolbot.app",
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
export async function uninstallCommand(runtime, opts) {
|
|
@@ -91,7 +91,7 @@ export async function uninstallCommand(runtime, opts) {
|
|
|
91
91
|
{
|
|
92
92
|
value: "app",
|
|
93
93
|
label: "macOS app",
|
|
94
|
-
hint: "/Applications/
|
|
94
|
+
hint: "/Applications/Poolbot.app",
|
|
95
95
|
},
|
|
96
96
|
],
|
|
97
97
|
initialValues: ["service", "state", "workspace"],
|
|
@@ -2,4 +2,4 @@ export const LEGACY_PROJECT_NAME = "poolbot";
|
|
|
2
2
|
export const LEGACY_MANIFEST_KEY = LEGACY_PROJECT_NAME;
|
|
3
3
|
export const LEGACY_PLUGIN_MANIFEST_FILENAME = `${LEGACY_PROJECT_NAME}.plugin.json`;
|
|
4
4
|
export const LEGACY_CANVAS_HANDLER_NAME = `${LEGACY_PROJECT_NAME}CanvasA2UIAction`;
|
|
5
|
-
export const LEGACY_MACOS_APP_SOURCES_DIR = "apps/macos/Sources/
|
|
5
|
+
export const LEGACY_MACOS_APP_SOURCES_DIR = "apps/macos/Sources/Pool-Bot";
|
package/dist/config/io.js
CHANGED
|
@@ -15,7 +15,7 @@ import { normalizeConfigPaths } from "./normalize-paths.js";
|
|
|
15
15
|
import { resolveConfigPath, resolveDefaultConfigCandidates, resolveStateDir } from "./paths.js";
|
|
16
16
|
import { applyConfigOverrides } from "./runtime-overrides.js";
|
|
17
17
|
import { validateConfigObjectWithPlugins } from "./validation.js";
|
|
18
|
-
import {
|
|
18
|
+
import { comparePoolbotVersions } from "./version.js";
|
|
19
19
|
// Re-export for backwards compatibility
|
|
20
20
|
export { CircularIncludeError, ConfigIncludeError } from "./includes.js";
|
|
21
21
|
export { MissingEnvVarError } from "./env-substitution.js";
|
|
@@ -103,11 +103,11 @@ function warnIfConfigFromFuture(cfg, logger) {
|
|
|
103
103
|
const touched = cfg.meta?.lastTouchedVersion;
|
|
104
104
|
if (!touched)
|
|
105
105
|
return;
|
|
106
|
-
const cmp =
|
|
106
|
+
const cmp = comparePoolbotVersions(VERSION, touched);
|
|
107
107
|
if (cmp === null)
|
|
108
108
|
return;
|
|
109
109
|
if (cmp < 0) {
|
|
110
|
-
logger.warn(`Config was last written by a newer
|
|
110
|
+
logger.warn(`Config was last written by a newer Poolbot (${touched}); current version is ${VERSION}.`);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
function applyConfigEnv(cfg, env) {
|
package/dist/config/schema.js
CHANGED
|
@@ -315,7 +315,7 @@ const FIELD_LABELS = {
|
|
|
315
315
|
"plugins.installs.*.installedAt": "Plugin Install Time",
|
|
316
316
|
};
|
|
317
317
|
const FIELD_HELP = {
|
|
318
|
-
"meta.lastTouchedVersion": "Auto-set when
|
|
318
|
+
"meta.lastTouchedVersion": "Auto-set when Poolbot writes the config.",
|
|
319
319
|
"meta.lastTouchedAt": "ISO timestamp of the last config write (auto-set).",
|
|
320
320
|
"update.channel": 'Update channel for git + npm installs ("stable", "beta", or "dev").',
|
|
321
321
|
"update.checkOnStart": "Check for npm updates when the gateway starts (default: true).",
|
package/dist/config/types.js
CHANGED
|
@@ -20,7 +20,6 @@ export * from "./types.msteams.js";
|
|
|
20
20
|
export * from "./types.plugins.js";
|
|
21
21
|
export * from "./types.queue.js";
|
|
22
22
|
export * from "./types.sandbox.js";
|
|
23
|
-
export * from "./types.security.js";
|
|
24
23
|
export * from "./types.signal.js";
|
|
25
24
|
export * from "./types.skills.js";
|
|
26
25
|
export * from "./types.slack.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/config/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const VERSION_RE = /^v?(\d+)\.(\d+)\.(\d+)(?:-(\d+))?/;
|
|
2
|
-
export function
|
|
2
|
+
export function parsePoolbotVersion(raw) {
|
|
3
3
|
if (!raw)
|
|
4
4
|
return null;
|
|
5
5
|
const match = raw.trim().match(VERSION_RE);
|
|
@@ -13,9 +13,9 @@ export function parseMoltbotVersion(raw) {
|
|
|
13
13
|
revision: revision ? Number.parseInt(revision, 10) : 0,
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
export function
|
|
17
|
-
const parsedA =
|
|
18
|
-
const parsedB =
|
|
16
|
+
export function comparePoolbotVersions(a, b) {
|
|
17
|
+
const parsedA = parsePoolbotVersion(a);
|
|
18
|
+
const parsedB = parsePoolbotVersion(b);
|
|
19
19
|
if (!parsedA || !parsedB)
|
|
20
20
|
return null;
|
|
21
21
|
if (parsedA.major !== parsedB.major)
|
|
@@ -436,12 +436,6 @@ export const PoolBotSchema = z
|
|
|
436
436
|
})
|
|
437
437
|
.strict()
|
|
438
438
|
.optional(),
|
|
439
|
-
security: z
|
|
440
|
-
.object({
|
|
441
|
-
owners: z.array(z.string()).optional(),
|
|
442
|
-
})
|
|
443
|
-
.strict()
|
|
444
|
-
.optional(),
|
|
445
439
|
skills: z
|
|
446
440
|
.object({
|
|
447
441
|
allowBundled: z.array(z.string()).optional(),
|
package/dist/daemon/constants.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Default service labels (for backward compatibility and when no profile specified)
|
|
2
2
|
export const GATEWAY_LAUNCH_AGENT_LABEL = "com.poolbot.gateway";
|
|
3
3
|
export const GATEWAY_SYSTEMD_SERVICE_NAME = "poolbot-gateway";
|
|
4
|
-
export const GATEWAY_WINDOWS_TASK_NAME = "
|
|
4
|
+
export const GATEWAY_WINDOWS_TASK_NAME = "Poolbot Gateway";
|
|
5
5
|
export const GATEWAY_SERVICE_MARKER = "poolbot";
|
|
6
6
|
export const GATEWAY_SERVICE_KIND = "gateway";
|
|
7
7
|
export const NODE_LAUNCH_AGENT_LABEL = "com.poolbot.node";
|
|
8
8
|
export const NODE_SYSTEMD_SERVICE_NAME = "poolbot-node";
|
|
9
|
-
export const NODE_WINDOWS_TASK_NAME = "
|
|
9
|
+
export const NODE_WINDOWS_TASK_NAME = "Poolbot Node";
|
|
10
10
|
export const NODE_SERVICE_MARKER = "poolbot";
|
|
11
11
|
export const NODE_SERVICE_KIND = "node";
|
|
12
12
|
export const NODE_WINDOWS_TASK_SCRIPT_NAME = "node.cmd";
|
|
@@ -40,7 +40,7 @@ export function resolveGatewayWindowsTaskName(profile) {
|
|
|
40
40
|
const normalized = normalizeGatewayProfile(profile);
|
|
41
41
|
if (!normalized)
|
|
42
42
|
return GATEWAY_WINDOWS_TASK_NAME;
|
|
43
|
-
return `
|
|
43
|
+
return `Poolbot Gateway (${normalized})`;
|
|
44
44
|
}
|
|
45
45
|
export function formatGatewayServiceDescription(params) {
|
|
46
46
|
const profile = normalizeGatewayProfile(params?.profile);
|
|
@@ -51,8 +51,8 @@ export function formatGatewayServiceDescription(params) {
|
|
|
51
51
|
if (version)
|
|
52
52
|
parts.push(`v${version}`);
|
|
53
53
|
if (parts.length === 0)
|
|
54
|
-
return "
|
|
55
|
-
return `
|
|
54
|
+
return "Poolbot Gateway";
|
|
55
|
+
return `Poolbot Gateway (${parts.join(", ")})`;
|
|
56
56
|
}
|
|
57
57
|
export function resolveNodeLaunchAgentLabel() {
|
|
58
58
|
return NODE_LAUNCH_AGENT_LABEL;
|
|
@@ -66,6 +66,6 @@ export function resolveNodeWindowsTaskName() {
|
|
|
66
66
|
export function formatNodeServiceDescription(params) {
|
|
67
67
|
const version = params?.version?.trim();
|
|
68
68
|
if (!version)
|
|
69
|
-
return "
|
|
70
|
-
return `
|
|
69
|
+
return "Poolbot Node Host";
|
|
70
|
+
return `Poolbot Node Host (v${version})`;
|
|
71
71
|
}
|
package/dist/daemon/inspect.js
CHANGED
|
@@ -44,7 +44,7 @@ function hasGatewayServiceMarker(content) {
|
|
|
44
44
|
lower.includes("poolbot_service_kind") &&
|
|
45
45
|
lower.includes(GATEWAY_SERVICE_KIND.toLowerCase()));
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function isPoolbotGatewayLaunchdService(label, contents) {
|
|
48
48
|
if (hasGatewayServiceMarker(contents))
|
|
49
49
|
return true;
|
|
50
50
|
const lowerContents = contents.toLowerCase();
|
|
@@ -52,14 +52,14 @@ function isMoltbotGatewayLaunchdService(label, contents) {
|
|
|
52
52
|
return false;
|
|
53
53
|
return label.startsWith("com.poolbot.");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function isPoolbotGatewaySystemdService(name, contents) {
|
|
56
56
|
if (hasGatewayServiceMarker(contents))
|
|
57
57
|
return true;
|
|
58
58
|
if (!name.startsWith("poolbot-gateway"))
|
|
59
59
|
return false;
|
|
60
60
|
return contents.toLowerCase().includes("gateway");
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function isPoolbotGatewayTaskName(name) {
|
|
63
63
|
const normalized = name.trim().toLowerCase();
|
|
64
64
|
if (!normalized)
|
|
65
65
|
return false;
|
|
@@ -107,7 +107,7 @@ async function scanLaunchdDir(params) {
|
|
|
107
107
|
const label = tryExtractPlistLabel(contents) ?? labelFromName;
|
|
108
108
|
if (isIgnoredLaunchdLabel(label))
|
|
109
109
|
continue;
|
|
110
|
-
if (
|
|
110
|
+
if (isPoolbotGatewayLaunchdService(label, contents))
|
|
111
111
|
continue;
|
|
112
112
|
results.push({
|
|
113
113
|
platform: "darwin",
|
|
@@ -143,7 +143,7 @@ async function scanSystemdDir(params) {
|
|
|
143
143
|
}
|
|
144
144
|
if (!containsMarker(contents))
|
|
145
145
|
continue;
|
|
146
|
-
if (
|
|
146
|
+
if (isPoolbotGatewaySystemdService(name, contents))
|
|
147
147
|
continue;
|
|
148
148
|
results.push({
|
|
149
149
|
platform: "linux",
|
|
@@ -291,7 +291,7 @@ export async function findExtraGatewayServices(env, opts = {}) {
|
|
|
291
291
|
const name = task.name.trim();
|
|
292
292
|
if (!name)
|
|
293
293
|
continue;
|
|
294
|
-
if (
|
|
294
|
+
if (isPoolbotGatewayTaskName(name))
|
|
295
295
|
continue;
|
|
296
296
|
if (LEGACY_GATEWAY_WINDOWS_TASK_NAMES.includes(name))
|
|
297
297
|
continue;
|
|
@@ -13,7 +13,7 @@ function renderEnvLines(env) {
|
|
|
13
13
|
}
|
|
14
14
|
export function buildSystemdUnit({ description, programArguments, workingDirectory, environment, }) {
|
|
15
15
|
const execStart = programArguments.map(systemdEscapeArg).join(" ");
|
|
16
|
-
const descriptionLine = `Description=${description?.trim() || "
|
|
16
|
+
const descriptionLine = `Description=${description?.trim() || "Poolbot Gateway"}`;
|
|
17
17
|
const workingDirLine = workingDirectory
|
|
18
18
|
? `WorkingDirectory=${systemdEscapeArg(workingDirectory)}`
|
|
19
19
|
: null;
|
|
@@ -73,10 +73,12 @@ export async function processDiscordMessage(ctx) {
|
|
|
73
73
|
const forumContextLine = isForumStarter ? `[Forum parent: #${forumParentSlug}]` : null;
|
|
74
74
|
const groupChannel = isGuildMessage && displayChannelSlug ? `#${displayChannelSlug}` : undefined;
|
|
75
75
|
const groupSubject = isDirectMessage ? undefined : groupChannel;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
const channelDescription = channelInfo?.topic?.trim();
|
|
77
|
+
const systemPromptParts = [
|
|
78
|
+
channelDescription ? `Channel topic: ${channelDescription}` : null,
|
|
79
|
+
channelConfig?.systemPrompt?.trim() || null,
|
|
80
|
+
].filter((entry) => Boolean(entry));
|
|
81
|
+
const groupSystemPrompt = systemPromptParts.length > 0 ? systemPromptParts.join("\n\n") : undefined;
|
|
80
82
|
const storePath = resolveStorePath(cfg.session?.store, {
|
|
81
83
|
agentId: route.agentId,
|
|
82
84
|
});
|