@poolzin/pool-bot 2026.1.32 → 2026.1.33

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.
@@ -342,7 +342,9 @@ const ERROR_PATTERNS = {
342
342
  "string should match pattern",
343
343
  "tool_use.id",
344
344
  "tool_use_id",
345
+ "tool_use.name",
345
346
  "messages.1.content.1.tool_use.id",
347
+ "messages.1.content.1.tool_use.name",
346
348
  "invalid request format",
347
349
  ],
348
350
  };
@@ -1,4 +1,4 @@
1
- import { makeMissingToolResult } from "./session-transcript-repair.js";
1
+ import { makeMissingToolResult, sanitizeToolName } from "./session-transcript-repair.js";
2
2
  import { emitSessionTranscriptUpdate } from "../sessions/transcript-events.js";
3
3
  function extractAssistantToolCalls(msg) {
4
4
  const content = msg.content;
@@ -14,7 +14,7 @@ function extractAssistantToolCalls(msg) {
14
14
  if (rec.type === "toolCall" || rec.type === "toolUse" || rec.type === "functionCall") {
15
15
  toolCalls.push({
16
16
  id: rec.id,
17
- name: typeof rec.name === "string" ? rec.name : undefined,
17
+ name: sanitizeToolName(typeof rec.name === "string" ? rec.name : undefined),
18
18
  });
19
19
  }
20
20
  }
@@ -1,3 +1,22 @@
1
+ import { logWarn } from "../logger.js";
2
+ /**
3
+ * Maximum allowed tool name length per Anthropic API spec.
4
+ * Names exceeding this will cause "tool_use.name > 200 chars" validation errors.
5
+ */
6
+ export const MAX_TOOL_NAME_LENGTH = 64;
7
+ /**
8
+ * Truncate tool names that exceed the API limit.
9
+ * This prevents "tool_use.name > 200 chars" validation errors when
10
+ * the model hallucinates overly long tool names.
11
+ */
12
+ export function sanitizeToolName(name) {
13
+ if (!name)
14
+ return name;
15
+ if (name.length <= MAX_TOOL_NAME_LENGTH)
16
+ return name;
17
+ logWarn(`[transcript-repair] truncating tool name from ${name.length} to ${MAX_TOOL_NAME_LENGTH} chars: ${name.slice(0, 50)}...`);
18
+ return name.slice(0, MAX_TOOL_NAME_LENGTH);
19
+ }
1
20
  function extractToolCallsFromAssistant(msg) {
2
21
  const content = msg.content;
3
22
  if (!Array.isArray(content))
@@ -12,7 +31,7 @@ function extractToolCallsFromAssistant(msg) {
12
31
  if (rec.type === "toolCall" || rec.type === "toolUse" || rec.type === "functionCall") {
13
32
  toolCalls.push({
14
33
  id: rec.id,
15
- name: typeof rec.name === "string" ? rec.name : undefined,
34
+ name: sanitizeToolName(typeof rec.name === "string" ? rec.name : undefined),
16
35
  });
17
36
  }
18
37
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026.1.32",
3
- "commit": "6872480de072314e610d35042267561672a5b97a",
4
- "builtAt": "2026-02-04T15:55:30.791Z"
2
+ "version": "2026.1.33",
3
+ "commit": "e1bdb6f2a583877b7491c951af6ff5d69636befe",
4
+ "builtAt": "2026-02-04T17:02:44.196Z"
5
5
  }
package/dist/entry.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poolzin/pool-bot",
3
- "version": "2026.1.32",
3
+ "version": "2026.1.33",
4
4
  "description": "🎱 Pool Bot - AI assistant with PLCODE integrations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -76,12 +76,81 @@
76
76
  "dist/pairing/**",
77
77
  "dist/whatsapp/**"
78
78
  ],
79
+ "scripts": {
80
+ "dev": "node scripts/run-node.mjs",
81
+ "postinstall": "node scripts/postinstall.js",
82
+ "prepack": "pnpm build && pnpm ui:build",
83
+ "docs:list": "node scripts/docs-list.js",
84
+ "docs:bin": "node scripts/build-docs-list.mjs",
85
+ "docs:dev": "cd docs && mint dev",
86
+ "docs:build": "cd docs && pnpm dlx --reporter append-only mint broken-links",
87
+ "build": "tsc -p tsconfig.json && node --import tsx scripts/canvas-a2ui-copy.ts && node --import tsx scripts/copy-hook-metadata.ts && node --import tsx scripts/write-build-info.ts",
88
+ "plugins:sync": "node --import tsx scripts/sync-plugin-versions.ts",
89
+ "release:check": "node --import tsx scripts/release-check.ts",
90
+ "ui:install": "node scripts/ui.js install",
91
+ "ui:dev": "node scripts/ui.js dev",
92
+ "ui:build": "node scripts/ui.js build",
93
+ "start": "node scripts/run-node.mjs",
94
+ "poolbot": "node scripts/run-node.mjs",
95
+ "gateway:watch": "node scripts/watch-node.mjs gateway --force",
96
+ "gateway:dev": "CLAWDBOT_SKIP_CHANNELS=1 node scripts/run-node.mjs --dev gateway",
97
+ "gateway:dev:reset": "CLAWDBOT_SKIP_CHANNELS=1 node scripts/run-node.mjs --dev gateway --reset",
98
+ "tui": "node scripts/run-node.mjs tui",
99
+ "tui:dev": "CLAWDBOT_PROFILE=dev node scripts/run-node.mjs tui",
100
+ "poolbot:rpc": "node scripts/run-node.mjs agent --mode rpc --json",
101
+ "ios:gen": "cd apps/ios && xcodegen generate",
102
+ "ios:open": "cd apps/ios && xcodegen generate && open Moltbot.xcodeproj",
103
+ "ios:build": "bash -lc 'cd apps/ios && xcodegen generate && xcodebuild -project Moltbot.xcodeproj -scheme Moltbot -destination \"${IOS_DEST:-platform=iOS Simulator,name=iPhone 17}\" -configuration Debug build'",
104
+ "ios:run": "bash -lc 'cd apps/ios && xcodegen generate && xcodebuild -project Moltbot.xcodeproj -scheme Moltbot -destination \"${IOS_DEST:-platform=iOS Simulator,name=iPhone 17}\" -configuration Debug build && xcrun simctl boot \"${IOS_SIM:-iPhone 17}\" || true && xcrun simctl launch booted com.poolbot.ios'",
105
+ "android:assemble": "cd apps/android && ./gradlew :app:assembleDebug",
106
+ "android:install": "cd apps/android && ./gradlew :app:installDebug",
107
+ "android:run": "cd apps/android && ./gradlew :app:installDebug && adb shell am start -n com.poolbot.android/.MainActivity",
108
+ "android:test": "cd apps/android && ./gradlew :app:testDebugUnitTest",
109
+ "mac:restart": "bash scripts/restart-mac.sh",
110
+ "mac:package": "bash scripts/package-mac-app.sh",
111
+ "mac:open": "open dist/Moltbot.app",
112
+ "lint": "oxlint --type-aware src test",
113
+ "lint:swift": "swiftlint lint --config .swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)",
114
+ "lint:all": "pnpm lint && pnpm lint:swift",
115
+ "lint:fix": "pnpm format:fix && oxlint --type-aware --fix src test",
116
+ "format": "oxfmt --check src test",
117
+ "format:swift": "swiftformat --lint --config .swiftformat apps/macos/Sources apps/ios/Sources apps/shared/ClawdbotKit/Sources",
118
+ "format:all": "pnpm format && pnpm format:swift",
119
+ "format:fix": "oxfmt --write src test",
120
+ "test": "node scripts/test-parallel.mjs",
121
+ "test:watch": "vitest",
122
+ "test:ui": "pnpm --dir ui test",
123
+ "test:force": "node --import tsx scripts/test-force.ts",
124
+ "test:coverage": "vitest run --coverage",
125
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
126
+ "test:live": "CLAWDBOT_LIVE_TEST=1 vitest run --config vitest.live.config.ts",
127
+ "test:docker:onboard": "bash scripts/e2e/onboard-docker.sh",
128
+ "test:docker:gateway-network": "bash scripts/e2e/gateway-network-docker.sh",
129
+ "test:docker:live-models": "bash scripts/test-live-models-docker.sh",
130
+ "test:docker:live-gateway": "bash scripts/test-live-gateway-models-docker.sh",
131
+ "test:docker:qr": "bash scripts/e2e/qr-import-docker.sh",
132
+ "test:docker:doctor-switch": "bash scripts/e2e/doctor-install-switch-docker.sh",
133
+ "test:docker:plugins": "bash scripts/e2e/plugins-docker.sh",
134
+ "test:docker:cleanup": "bash scripts/test-cleanup-docker.sh",
135
+ "test:docker:all": "pnpm test:docker:live-models && pnpm test:docker:live-gateway && pnpm test:docker:onboard && pnpm test:docker:gateway-network && pnpm test:docker:qr && pnpm test:docker:doctor-switch && pnpm test:docker:plugins && pnpm test:docker:cleanup",
136
+ "test:all": "pnpm lint && pnpm build && pnpm test && pnpm test:e2e && pnpm test:live && pnpm test:docker:all",
137
+ "test:install:e2e": "bash scripts/test-install-sh-e2e-docker.sh",
138
+ "test:install:smoke": "bash scripts/test-install-sh-docker.sh",
139
+ "test:install:e2e:openai": "CLAWDBOT_E2E_MODELS=openai bash scripts/test-install-sh-e2e-docker.sh",
140
+ "test:install:e2e:anthropic": "CLAWDBOT_E2E_MODELS=anthropic bash scripts/test-install-sh-e2e-docker.sh",
141
+ "protocol:gen": "node --import tsx scripts/protocol-gen.ts",
142
+ "protocol:gen:swift": "node --import tsx scripts/protocol-gen-swift.ts",
143
+ "protocol:check": "pnpm protocol:gen && pnpm protocol:gen:swift && git diff --exit-code -- dist/protocol.schema.json apps/macos/Sources/ClawdbotProtocol/GatewayModels.swift",
144
+ "canvas:a2ui:bundle": "bash scripts/bundle-a2ui.sh",
145
+ "check:loc": "node --import tsx scripts/check-ts-max-loc.ts --max 500"
146
+ },
79
147
  "keywords": [],
80
148
  "author": "João Vitor Cunha <jvsantos.cunha@gmail.com>",
81
149
  "license": "MIT",
82
150
  "engines": {
83
151
  "node": ">=22.12.0"
84
152
  },
153
+ "packageManager": "pnpm@10.23.0",
85
154
  "dependencies": {
86
155
  "@agentclientprotocol/sdk": "0.13.1",
87
156
  "@aws-sdk/client-bedrock": "^3.975.0",
@@ -173,6 +242,14 @@
173
242
  "overrides": {
174
243
  "tar": "7.5.4"
175
244
  },
245
+ "pnpm": {
246
+ "minimumReleaseAge": 2880,
247
+ "overrides": {
248
+ "@sinclair/typebox": "0.34.47",
249
+ "hono": "4.11.4",
250
+ "tar": "7.5.4"
251
+ }
252
+ },
176
253
  "vitest": {
177
254
  "coverage": {
178
255
  "provider": "v8",
@@ -204,72 +281,5 @@
204
281
  "apps/macos/.build/**",
205
282
  "dist/Moltbot.app/**"
206
283
  ]
207
- },
208
- "scripts": {
209
- "dev": "node scripts/run-node.mjs",
210
- "postinstall": "node scripts/postinstall.js",
211
- "docs:list": "node scripts/docs-list.js",
212
- "docs:bin": "node scripts/build-docs-list.mjs",
213
- "docs:dev": "cd docs && mint dev",
214
- "docs:build": "cd docs && pnpm dlx --reporter append-only mint broken-links",
215
- "build": "tsc -p tsconfig.json && node --import tsx scripts/canvas-a2ui-copy.ts && node --import tsx scripts/copy-hook-metadata.ts && node --import tsx scripts/write-build-info.ts",
216
- "plugins:sync": "node --import tsx scripts/sync-plugin-versions.ts",
217
- "release:check": "node --import tsx scripts/release-check.ts",
218
- "ui:install": "node scripts/ui.js install",
219
- "ui:dev": "node scripts/ui.js dev",
220
- "ui:build": "node scripts/ui.js build",
221
- "start": "node scripts/run-node.mjs",
222
- "poolbot": "node scripts/run-node.mjs",
223
- "gateway:watch": "node scripts/watch-node.mjs gateway --force",
224
- "gateway:dev": "CLAWDBOT_SKIP_CHANNELS=1 node scripts/run-node.mjs --dev gateway",
225
- "gateway:dev:reset": "CLAWDBOT_SKIP_CHANNELS=1 node scripts/run-node.mjs --dev gateway --reset",
226
- "tui": "node scripts/run-node.mjs tui",
227
- "tui:dev": "CLAWDBOT_PROFILE=dev node scripts/run-node.mjs tui",
228
- "poolbot:rpc": "node scripts/run-node.mjs agent --mode rpc --json",
229
- "ios:gen": "cd apps/ios && xcodegen generate",
230
- "ios:open": "cd apps/ios && xcodegen generate && open Moltbot.xcodeproj",
231
- "ios:build": "bash -lc 'cd apps/ios && xcodegen generate && xcodebuild -project Moltbot.xcodeproj -scheme Moltbot -destination \"${IOS_DEST:-platform=iOS Simulator,name=iPhone 17}\" -configuration Debug build'",
232
- "ios:run": "bash -lc 'cd apps/ios && xcodegen generate && xcodebuild -project Moltbot.xcodeproj -scheme Moltbot -destination \"${IOS_DEST:-platform=iOS Simulator,name=iPhone 17}\" -configuration Debug build && xcrun simctl boot \"${IOS_SIM:-iPhone 17}\" || true && xcrun simctl launch booted com.poolbot.ios'",
233
- "android:assemble": "cd apps/android && ./gradlew :app:assembleDebug",
234
- "android:install": "cd apps/android && ./gradlew :app:installDebug",
235
- "android:run": "cd apps/android && ./gradlew :app:installDebug && adb shell am start -n com.poolbot.android/.MainActivity",
236
- "android:test": "cd apps/android && ./gradlew :app:testDebugUnitTest",
237
- "mac:restart": "bash scripts/restart-mac.sh",
238
- "mac:package": "bash scripts/package-mac-app.sh",
239
- "mac:open": "open dist/Moltbot.app",
240
- "lint": "oxlint --type-aware src test",
241
- "lint:swift": "swiftlint lint --config .swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)",
242
- "lint:all": "pnpm lint && pnpm lint:swift",
243
- "lint:fix": "pnpm format:fix && oxlint --type-aware --fix src test",
244
- "format": "oxfmt --check src test",
245
- "format:swift": "swiftformat --lint --config .swiftformat apps/macos/Sources apps/ios/Sources apps/shared/ClawdbotKit/Sources",
246
- "format:all": "pnpm format && pnpm format:swift",
247
- "format:fix": "oxfmt --write src test",
248
- "test": "node scripts/test-parallel.mjs",
249
- "test:watch": "vitest",
250
- "test:ui": "pnpm --dir ui test",
251
- "test:force": "node --import tsx scripts/test-force.ts",
252
- "test:coverage": "vitest run --coverage",
253
- "test:e2e": "vitest run --config vitest.e2e.config.ts",
254
- "test:live": "CLAWDBOT_LIVE_TEST=1 vitest run --config vitest.live.config.ts",
255
- "test:docker:onboard": "bash scripts/e2e/onboard-docker.sh",
256
- "test:docker:gateway-network": "bash scripts/e2e/gateway-network-docker.sh",
257
- "test:docker:live-models": "bash scripts/test-live-models-docker.sh",
258
- "test:docker:live-gateway": "bash scripts/test-live-gateway-models-docker.sh",
259
- "test:docker:qr": "bash scripts/e2e/qr-import-docker.sh",
260
- "test:docker:doctor-switch": "bash scripts/e2e/doctor-install-switch-docker.sh",
261
- "test:docker:plugins": "bash scripts/e2e/plugins-docker.sh",
262
- "test:docker:cleanup": "bash scripts/test-cleanup-docker.sh",
263
- "test:docker:all": "pnpm test:docker:live-models && pnpm test:docker:live-gateway && pnpm test:docker:onboard && pnpm test:docker:gateway-network && pnpm test:docker:qr && pnpm test:docker:doctor-switch && pnpm test:docker:plugins && pnpm test:docker:cleanup",
264
- "test:all": "pnpm lint && pnpm build && pnpm test && pnpm test:e2e && pnpm test:live && pnpm test:docker:all",
265
- "test:install:e2e": "bash scripts/test-install-sh-e2e-docker.sh",
266
- "test:install:smoke": "bash scripts/test-install-sh-docker.sh",
267
- "test:install:e2e:openai": "CLAWDBOT_E2E_MODELS=openai bash scripts/test-install-sh-e2e-docker.sh",
268
- "test:install:e2e:anthropic": "CLAWDBOT_E2E_MODELS=anthropic bash scripts/test-install-sh-e2e-docker.sh",
269
- "protocol:gen": "node --import tsx scripts/protocol-gen.ts",
270
- "protocol:gen:swift": "node --import tsx scripts/protocol-gen-swift.ts",
271
- "protocol:check": "pnpm protocol:gen && pnpm protocol:gen:swift && git diff --exit-code -- dist/protocol.schema.json apps/macos/Sources/ClawdbotProtocol/GatewayModels.swift",
272
- "canvas:a2ui:bundle": "bash scripts/bundle-a2ui.sh",
273
- "check:loc": "node --import tsx scripts/check-ts-max-loc.ts --max 500"
274
284
  }
275
- }
285
+ }
File without changes
File without changes
File without changes
File without changes