From 284b54af42dc410b0909ee51530c1db3987ac18e Mon Sep 17 00:00:00 2001 From: "A. Duk" Date: Wed, 28 Jan 2026 00:59:24 +0400 Subject: [PATCH] feat: Add support for Telegram quote (partial message replies) (#2900) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add support for Telegram quote (partial message replies) - Enhanced describeReplyTarget() to detect and extract quoted text from msg.quote - Updated reply formatting to distinguish between full message replies and quotes - Added isQuote flag to replyTarget object for proper identification - Quote replies show as [Quoting user] "quoted text" [/Quoting] - Regular replies unchanged: [Replying to user] full message [/Replying] Resolves need for partial message reply support in Telegram Bot API. Backward compatible with existing reply functionality. * updating references * Mac: finish Moltbot rename * Mac: finish Moltbot rename (paths) * fix(macOS): rename Clawdbot directories to Moltbot for naming consistency Directory renames: - apps/macos/Sources/Clawdbot → Moltbot - apps/macos/Sources/ClawdbotDiscovery → MoltbotDiscovery - apps/macos/Sources/ClawdbotIPC → MoltbotIPC - apps/macos/Sources/ClawdbotMacCLI → MoltbotMacCLI - apps/macos/Sources/ClawdbotProtocol → MoltbotProtocol - apps/macos/Tests/ClawdbotIPCTests → MoltbotIPCTests - apps/shared/ClawdbotKit → MoltbotKit - apps/shared/MoltbotKit/Sources/Clawdbot* → Moltbot* - apps/shared/MoltbotKit/Tests/ClawdbotKitTests → MoltbotKitTests Resource renames: - Clawdbot.icns → Moltbot.icns Code fixes: - Update Package.swift paths to reference Moltbot* directories - Fix clawdbot* → moltbot* symbol references in Swift code: - clawdbotManagedPaths → moltbotManagedPaths - clawdbotExecutable → moltbotExecutable - clawdbotCommand → moltbotCommand - clawdbotNodeCommand → moltbotNodeCommand - clawdbotOAuthDirEnv → moltbotOAuthDirEnv - clawdbotSelectSettingsTab → moltbotSelectSettingsTab * fix: update remaining ClawdbotKit path references to MoltbotKit - scripts/bundle-a2ui.sh: A2UI_APP_DIR path - package.json: format:swift and protocol:check paths - scripts/protocol-gen-swift.ts: output paths - .github/dependabot.yml: directory path and comment - .gitignore: build cache paths - .swiftformat: exclusion paths - .swiftlint.yml: exclusion path - apps/android/app/build.gradle.kts: assets.srcDir path - apps/ios/project.yml: package path - apps/ios/README.md: documentation reference - docs/concepts/typebox.md: documentation reference - apps/shared/MoltbotKit/Package.swift: fix argument order * chore: update Package.resolved after dependency resolution * fix: add MACOS_APP_SOURCES_DIR constant and update test to use new path The cron-protocol-conformance test was using LEGACY_MACOS_APP_SOURCES_DIR which points to the old Clawdbot path. Added a new MACOS_APP_SOURCES_DIR constant for the current Moltbot path and updated the test to use it. * fix: finish Moltbot macOS rename (#2844) (thanks @fal3) * Extensions: use workspace moltbot in memory-core * fix(security): recognize Venice-style claude-opus-45 as top-tier model The security audit was incorrectly flagging venice/claude-opus-45 as 'Below Claude 4.5' because the regex expected -4-5 (with dash) but Venice uses -45 (without dash between 4 and 5). Updated isClaude45OrHigher() regex to match both formats. Added test case to prevent regression. * Branding: update bot.molt bundle IDs + launchd labels * Branding: remove legacy android packages * fix: wire telegram quote support (#2900) Co-authored-by: aduk059 * fix: support Telegram quote replies (#2900) (thanks @aduk059) --------- Co-authored-by: Gustavo Madeira Santana Co-authored-by: Shadow Co-authored-by: Alex Fallah Co-authored-by: Josh Palmer Co-authored-by: jonisjongithub Co-authored-by: Gustavo Madeira Santana Co-authored-by: aduk059 --- CHANGELOG.md | 1 + clawdbot-2026-01-27.log | 88 +++++++++++++++++++++++ src/agents/tools/message-tool.ts | 3 + src/agents/tools/telegram-actions.test.ts | 25 +++++++ src/agents/tools/telegram-actions.ts | 2 + src/auto-reply/templating.ts | 1 + src/canvas-host/a2ui/.bundle.hash | 2 +- src/channels/plugins/actions/telegram.ts | 2 + src/channels/plugins/outbound/telegram.ts | 5 +- src/telegram/bot-message-context.ts | 11 ++- src/telegram/bot-message-dispatch.ts | 5 ++ src/telegram/bot.test.ts | 67 +++++++++++++++++ src/telegram/bot/delivery.test.ts | 31 ++++++++ src/telegram/bot/delivery.ts | 42 ++++++++--- src/telegram/bot/helpers.ts | 49 +++++++++---- src/telegram/bot/types.ts | 8 ++- src/telegram/send.ts | 14 +++- 17 files changed, 326 insertions(+), 30 deletions(-) create mode 100644 clawdbot-2026-01-27.log diff --git a/CHANGELOG.md b/CHANGELOG.md index e1efce475..c83dc1476 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ Status: unreleased. - Telegram: keep topic IDs in restart sentinel notifications. (#1807) Thanks @hsrvc. - Telegram: add optional silent send flag (disable notifications). (#2382) Thanks @Suksham-sharma. - Telegram: support editing sent messages via message(action="edit"). (#2394) Thanks @marcelomar21. +- Telegram: support quote replies for message tool and inbound context. (#2900) Thanks @aduk059. - Telegram: add sticker receive/send with vision caching. (#2629) Thanks @longjos. - Telegram: send sticker pixels to vision models. (#2650) - Config: apply config.env before ${VAR} substitution. (#1813) Thanks @spanishflu-est1918. diff --git a/clawdbot-2026-01-27.log b/clawdbot-2026-01-27.log new file mode 100644 index 000000000..b322c9909 --- /dev/null +++ b/clawdbot-2026-01-27.log @@ -0,0 +1,88 @@ +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=0f9a9294-1be3-4897-8480-6941fa5c918a tool=exec toolCallId=toolu_01ABvFAHSPxy2qorw3kJymm9","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:14:31.264Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:14:31.264Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=0f9a9294-1be3-4897-8480-6941fa5c918a tool=process toolCallId=toolu_01RWGLqhzLVxvSqrDdwBiPeE","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:14:35.645Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:14:35.645Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=0f9a9294-1be3-4897-8480-6941fa5c918a tool=process toolCallId=toolu_01RWGLqhzLVxvSqrDdwBiPeE","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:14:35.647Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:14:35.647Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=0f9a9294-1be3-4897-8480-6941fa5c918a tool=process toolCallId=toolu_01V56BA7uA5Bk5ezPcvUxndH","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:14:40.171Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:14:40.173Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=0f9a9294-1be3-4897-8480-6941fa5c918a tool=process toolCallId=toolu_01V56BA7uA5Bk5ezPcvUxndH","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:14:40.177Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:14:40.178Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=0f9a9294-1be3-4897-8480-6941fa5c918a tool=exec toolCallId=toolu_01W78WRUZ3cpbU8JLKw8Wjh2","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:14:45.819Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:14:45.820Z"} +{"0":"[tools] exec failed: gh not found\n\nCommand exited with code 1","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"clawdbot","date":"2026-01-27T18:14:45.823Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/console.js:187:32","fileName":"console.js","fileNameWithLine":"console.js:187","fileColumn":"32","fileLine":"187","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/console.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/console.js:187","method":"console.error"}},"time":"2026-01-27T18:14:45.823Z"} +{"0":"[tools] exec failed: gh not found\n\nCommand exited with code 1","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"clawdbot","date":"2026-01-27T18:14:45.824Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logger.js:47:17","fileName":"logger.js","fileNameWithLine":"logger.js:47","fileColumn":"17","fileLine":"47","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logger.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logger.js:47","method":"logError"}},"time":"2026-01-27T18:14:45.824Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=0f9a9294-1be3-4897-8480-6941fa5c918a tool=exec toolCallId=toolu_01W78WRUZ3cpbU8JLKw8Wjh2","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:14:45.825Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:14:45.826Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=0f9a9294-1be3-4897-8480-6941fa5c918a tool=exec toolCallId=toolu_01NgdcwcKb3EqeQzir6pv4ik","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:14:50.400Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:14:50.401Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=0f9a9294-1be3-4897-8480-6941fa5c918a tool=exec toolCallId=toolu_01NgdcwcKb3EqeQzir6pv4ik","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:00.423Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:00.424Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run agent end: runId=0f9a9294-1be3-4897-8480-6941fa5c918a","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:06.372Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:06.373Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run prompt end: runId=0f9a9294-1be3-4897-8480-6941fa5c918a sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac durationMs=64221","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:06.378Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:06.379Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"session state: sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac sessionKey=unknown prev=processing new=idle reason=\"run_completed\" queueDepth=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:06.379Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:06.380Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"run cleared: sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac totalActive=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:06.381Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:06.381Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run done: runId=0f9a9294-1be3-4897-8480-6941fa5c918a sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac durationMs=64258 aborted=false","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:06.396Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:06.396Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane task done: lane=main durationMs=64262 active=0 queued=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:06.399Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:06.400Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane task done: lane=session:agent:main:main durationMs=64267 active=0 queued=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:06.400Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:06.400Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane enqueue: lane=session:agent:main:main queueSize=1","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:31.507Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:31.510Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane dequeue: lane=session:agent:main:main waitMs=22 queueSize=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:31.512Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:31.515Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane enqueue: lane=main queueSize=1","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:31.516Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:31.520Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane dequeue: lane=main waitMs=5 queueSize=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:31.521Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:31.525Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac provider=anthropic model=claude-sonnet-4-20250514 thinking=low messageChannel=telegram","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:31.527Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:31.528Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"session state: sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac sessionKey=unknown prev=idle new=processing reason=\"run_started\" queueDepth=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:31.568Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:31.568Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"run registered: sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac totalActive=1","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:31.568Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:31.569Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run prompt start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:31.569Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:31.569Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run agent start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:31.573Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:31.573Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=process toolCallId=toolu_013owH6LL6iAptQbMoeMdvmo","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:38.594Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:38.595Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=process toolCallId=toolu_013owH6LL6iAptQbMoeMdvmo","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:38.605Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:38.605Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_01NsnqQqajHbMQ6ct3MZwGMD","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:43.562Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:43.563Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_01NsnqQqajHbMQ6ct3MZwGMD","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:43.684Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:43.685Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_01S13NTjo4WPXwRn12iZiU1H","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:50.141Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:50.141Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_01S13NTjo4WPXwRn12iZiU1H","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:50.166Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:50.167Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_018nDFSMN1Xd2Q6dYAAdH6WJ","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:54.948Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:54.949Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_018nDFSMN1Xd2Q6dYAAdH6WJ","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:15:54.968Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:15:54.969Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=process toolCallId=toolu_01CuWysDqcCKutJjiQ2psVDy","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:00.189Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:00.190Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=process toolCallId=toolu_01CuWysDqcCKutJjiQ2psVDy","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:00.196Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:00.197Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_01Eh8xXBgAEgePYyKZbC11fz","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:07.488Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:07.489Z"} +{"0":"[tools] exec failed: error validating token: HTTP 401: Bad credentials (https://api.github.com/)\nTry authenticating with: gh auth login\n\nCommand exited with code 1","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"clawdbot","date":"2026-01-27T18:16:08.403Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/console.js:187:32","fileName":"console.js","fileNameWithLine":"console.js:187","fileColumn":"32","fileLine":"187","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/console.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/console.js:187","method":"console.error"}},"time":"2026-01-27T18:16:08.404Z"} +{"0":"[tools] exec failed: error validating token: HTTP 401: Bad credentials (https://api.github.com/)\nTry authenticating with: gh auth login\n\nCommand exited with code 1","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"clawdbot","date":"2026-01-27T18:16:08.406Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logger.js:47:17","fileName":"logger.js","fileNameWithLine":"logger.js:47","fileColumn":"17","fileLine":"47","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logger.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logger.js:47","method":"logError"}},"time":"2026-01-27T18:16:08.406Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_01Eh8xXBgAEgePYyKZbC11fz","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:08.412Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:08.412Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_019KwfrHpsdRzcGv2NtcTDxc","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:14.712Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:14.713Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_019KwfrHpsdRzcGv2NtcTDxc","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:24.739Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:24.740Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=process toolCallId=toolu_015YVFpAkM9kDy3UQwWnPFpH","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:30.150Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:30.151Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=process toolCallId=toolu_015YVFpAkM9kDy3UQwWnPFpH","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:30.160Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:30.161Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=process toolCallId=toolu_01D9MN1HSUBLJgWh5yFKpU1N","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:38.339Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:38.340Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=process toolCallId=toolu_01D9MN1HSUBLJgWh5yFKpU1N","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:38.346Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:38.347Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_01DG4DcWXaNTHfa1bzvuHkeg","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:45.743Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:45.744Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 tool=exec toolCallId=toolu_01DG4DcWXaNTHfa1bzvuHkeg","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:45.766Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:45.766Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run agent end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:50.357Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:50.357Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run prompt end: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac durationMs=78790","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:50.359Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:50.360Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"session state: sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac sessionKey=unknown prev=processing new=idle reason=\"run_completed\" queueDepth=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:50.361Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:50.361Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"run cleared: sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac totalActive=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:50.363Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:50.363Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run done: runId=24db8b02-29b7-4aa8-89dc-3c8d4dfe2299 sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac durationMs=78850 aborted=false","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:50.376Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:50.376Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane task done: lane=main durationMs=78854 active=0 queued=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:50.379Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:50.379Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane task done: lane=session:agent:main:main durationMs=78865 active=0 queued=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:16:50.380Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:16:50.380Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane enqueue: lane=session:agent:main:main queueSize=1","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:38.593Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:38.596Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane dequeue: lane=session:agent:main:main waitMs=23 queueSize=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:38.598Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:38.599Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane enqueue: lane=main queueSize=1","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:38.600Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:38.601Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"lane dequeue: lane=main waitMs=2 queueSize=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:38.602Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:38.604Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac provider=anthropic model=claude-sonnet-4-20250514 thinking=low messageChannel=telegram","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:38.606Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:38.607Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"session state: sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac sessionKey=unknown prev=idle new=processing reason=\"run_started\" queueDepth=0","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:38.636Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:38.637Z"} +{"0":"{\"subsystem\":\"diagnostic\"}","1":"run registered: sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac totalActive=1","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"diagnostic\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:38.637Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:38.637Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run prompt start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 sessionId=5aa98bb1-c30c-4999-9d8a-ca3759b570ac","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:38.638Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:38.638Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run agent start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:38.641Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:38.642Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01M3auXfxxjuruCayApqWWbb","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:47.740Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:47.741Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01M3auXfxxjuruCayApqWWbb","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:47.785Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:47.786Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01SzWB3psudeXCe6UHAkNujV","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:52.306Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:52.308Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01SzWB3psudeXCe6UHAkNujV","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:52.374Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:52.375Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01KUa6PcWAhC5pguBqZheF4P","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:56.977Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:56.978Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01KUa6PcWAhC5pguBqZheF4P","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:17:57.037Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:17:57.037Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_018m48KASbUrd6TPybszdCSQ","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:02.566Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:02.567Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_018m48KASbUrd6TPybszdCSQ","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:02.625Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:02.627Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=read toolCallId=toolu_01MpiSBbHrxsLN1nR7fxq6gD","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:07.939Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:07.940Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=read toolCallId=toolu_01MpiSBbHrxsLN1nR7fxq6gD","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:07.947Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:07.948Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01D3X6LVt7Te7DxHt2kU2h2Q","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:12.794Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:12.795Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01D3X6LVt7Te7DxHt2kU2h2Q","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:12.814Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:12.815Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=read toolCallId=toolu_01Du1KUqgqETi8LuAQrastxx","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:18.162Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:18.163Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=read toolCallId=toolu_01Du1KUqgqETi8LuAQrastxx","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:18.171Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:18.171Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01JZciDdKu1fvdibZL9FXzDX","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:24.787Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:24.788Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01JZciDdKu1fvdibZL9FXzDX","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:24.808Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:24.808Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01T5WFmSeCnchAwFBVsMNzCu","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:29.196Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:29.196Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_01T5WFmSeCnchAwFBVsMNzCu","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:29.216Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:29.217Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=edit toolCallId=toolu_01VZHWRMtbxWmBvvLRGbzTZL","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:42.682Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:42.683Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=edit toolCallId=toolu_01VZHWRMtbxWmBvvLRGbzTZL","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:42.696Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:42.696Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=edit toolCallId=toolu_01GAK8pbPZpYLkh2CcJWhLYu","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:49.436Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:49.437Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool end: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=edit toolCallId=toolu_01GAK8pbPZpYLkh2CcJWhLYu","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:49.448Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:49.449Z"} +{"0":"{\"subsystem\":\"agent/embedded\"}","1":"embedded run tool start: runId=e82778a1-ad99-4e25-945c-2e7be70c3d96 tool=exec toolCallId=toolu_019F1KimkBzJ1VCnYzmgYDM4","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{\"subsystem\":\"agent/embedded\"}","parentNames":["clawdbot"],"date":"2026-01-27T18:18:53.947Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161:16","fileName":"subsystem.js","fileNameWithLine":"subsystem.js:161","fileColumn":"16","fileLine":"161","filePath":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js","filePathWithLine":"opt/homebrew/lib/node_modules/clawdbot/dist/logging/subsystem.js:161","method":"logToFile"}},"time":"2026-01-27T18:18:53.948Z"} diff --git a/src/agents/tools/message-tool.ts b/src/agents/tools/message-tool.ts index 2188d737d..4ea178a54 100644 --- a/src/agents/tools/message-tool.ts +++ b/src/agents/tools/message-tool.ts @@ -60,6 +60,9 @@ function buildSendSchema(options: { includeButtons: boolean; includeCards: boole threadId: Type.Optional(Type.String()), asVoice: Type.Optional(Type.Boolean()), silent: Type.Optional(Type.Boolean()), + quoteText: Type.Optional( + Type.String({ description: "Quote text for Telegram reply_parameters" }), + ), bestEffort: Type.Optional(Type.Boolean()), gifPlayback: Type.Optional(Type.Boolean()), buttons: Type.Optional( diff --git a/src/agents/tools/telegram-actions.test.ts b/src/agents/tools/telegram-actions.test.ts index 63a55e3d0..3b78dde20 100644 --- a/src/agents/tools/telegram-actions.test.ts +++ b/src/agents/tools/telegram-actions.test.ts @@ -261,6 +261,31 @@ describe("handleTelegramAction", () => { ); }); + it("passes quoteText when provided", async () => { + const cfg = { + channels: { telegram: { botToken: "tok" } }, + } as MoltbotConfig; + await handleTelegramAction( + { + action: "sendMessage", + to: "123456", + content: "Replying now", + replyToMessageId: 144, + quoteText: "The text you want to quote", + }, + cfg, + ); + expect(sendMessageTelegram).toHaveBeenCalledWith( + "123456", + "Replying now", + expect.objectContaining({ + token: "tok", + replyToMessageId: 144, + quoteText: "The text you want to quote", + }), + ); + }); + it("allows media-only messages without content", async () => { const cfg = { channels: { telegram: { botToken: "tok" } }, diff --git a/src/agents/tools/telegram-actions.ts b/src/agents/tools/telegram-actions.ts index 3d7dc6eb2..515ff8c47 100644 --- a/src/agents/tools/telegram-actions.ts +++ b/src/agents/tools/telegram-actions.ts @@ -165,6 +165,7 @@ export async function handleTelegramAction( const messageThreadId = readNumberParam(params, "messageThreadId", { integer: true, }); + const quoteText = readStringParam(params, "quoteText"); const token = resolveTelegramToken(cfg, { accountId }).token; if (!token) { throw new Error( @@ -178,6 +179,7 @@ export async function handleTelegramAction( buttons, replyToMessageId: replyToMessageId ?? undefined, messageThreadId: messageThreadId ?? undefined, + quoteText: quoteText ?? undefined, asVoice: typeof params.asVoice === "boolean" ? params.asVoice : undefined, silent: typeof params.silent === "boolean" ? params.silent : undefined, }); diff --git a/src/auto-reply/templating.ts b/src/auto-reply/templating.ts index 593858e64..242cee232 100644 --- a/src/auto-reply/templating.ts +++ b/src/auto-reply/templating.ts @@ -49,6 +49,7 @@ export type MsgContext = { ReplyToIdFull?: string; ReplyToBody?: string; ReplyToSender?: string; + ReplyToIsQuote?: boolean; ForwardedFrom?: string; ForwardedFromType?: string; ForwardedFromId?: string; diff --git a/src/canvas-host/a2ui/.bundle.hash b/src/canvas-host/a2ui/.bundle.hash index 6c9cb0299..98d7e8ccf 100644 --- a/src/canvas-host/a2ui/.bundle.hash +++ b/src/canvas-host/a2ui/.bundle.hash @@ -1 +1 @@ -b6d3dea7c656c8a480059c32e954c4d39053ff79c4e9c69b38f4c04e3f0280d4 +178acae008ecf5b85a4043c22b651c715278eb921b6b138f61234cd1d4853515 diff --git a/src/channels/plugins/actions/telegram.ts b/src/channels/plugins/actions/telegram.ts index 2acfaf9f1..693e94492 100644 --- a/src/channels/plugins/actions/telegram.ts +++ b/src/channels/plugins/actions/telegram.ts @@ -23,6 +23,7 @@ function readTelegramSendParams(params: Record) { const buttons = params.buttons; const asVoice = typeof params.asVoice === "boolean" ? params.asVoice : undefined; const silent = typeof params.silent === "boolean" ? params.silent : undefined; + const quoteText = readStringParam(params, "quoteText"); return { to, content, @@ -32,6 +33,7 @@ function readTelegramSendParams(params: Record) { buttons, asVoice, silent, + quoteText: quoteText ?? undefined, }; } diff --git a/src/channels/plugins/outbound/telegram.ts b/src/channels/plugins/outbound/telegram.ts index 6db7afd28..04abb77e0 100644 --- a/src/channels/plugins/outbound/telegram.ts +++ b/src/channels/plugins/outbound/telegram.ts @@ -56,8 +56,10 @@ export const telegramOutbound: ChannelOutboundAdapter = { const replyToMessageId = parseReplyToMessageId(replyToId); const messageThreadId = parseThreadId(threadId); const telegramData = payload.channelData?.telegram as - | { buttons?: Array> } + | { buttons?: Array>; quoteText?: string } | undefined; + const quoteText = + typeof telegramData?.quoteText === "string" ? telegramData.quoteText : undefined; const text = payload.text ?? ""; const mediaUrls = payload.mediaUrls?.length ? payload.mediaUrls @@ -69,6 +71,7 @@ export const telegramOutbound: ChannelOutboundAdapter = { textMode: "html" as const, messageThreadId, replyToMessageId, + quoteText, accountId: accountId ?? undefined, }; diff --git a/src/telegram/bot-message-context.ts b/src/telegram/bot-message-context.ts index 98b42fd10..aa6dcd88b 100644 --- a/src/telegram/bot-message-context.ts +++ b/src/telegram/bot-message-context.ts @@ -480,9 +480,13 @@ export const buildTelegramMessageContext = async ({ const replyTarget = describeReplyTarget(msg); const forwardOrigin = normalizeForwardedContext(msg); const replySuffix = replyTarget - ? `\n\n[Replying to ${replyTarget.sender}${ - replyTarget.id ? ` id:${replyTarget.id}` : "" - }]\n${replyTarget.body}\n[/Replying]` + ? replyTarget.kind === "quote" + ? `\n\n[Quoting ${replyTarget.sender}${ + replyTarget.id ? ` id:${replyTarget.id}` : "" + }]\n"${replyTarget.body}"\n[/Quoting]` + : `\n\n[Replying to ${replyTarget.sender}${ + replyTarget.id ? ` id:${replyTarget.id}` : "" + }]\n${replyTarget.body}\n[/Replying]` : ""; const forwardPrefix = forwardOrigin ? `[Forwarded from ${forwardOrigin.from}${ @@ -565,6 +569,7 @@ export const buildTelegramMessageContext = async ({ ReplyToId: replyTarget?.id, ReplyToBody: replyTarget?.body, ReplyToSender: replyTarget?.sender, + ReplyToIsQuote: replyTarget?.kind === "quote" ? true : undefined, ForwardedFrom: forwardOrigin?.from, ForwardedFromType: forwardOrigin?.fromType, ForwardedFromId: forwardOrigin?.fromId, diff --git a/src/telegram/bot-message-dispatch.ts b/src/telegram/bot-message-dispatch.ts index 27c6a3bfa..cead0628a 100644 --- a/src/telegram/bot-message-dispatch.ts +++ b/src/telegram/bot-message-dispatch.ts @@ -210,6 +210,10 @@ export const dispatchTelegramMessage = async ({ draftStream?.stop(); } + const replyQuoteText = + ctxPayload.ReplyToIsQuote && ctxPayload.ReplyToBody + ? ctxPayload.ReplyToBody.trim() || undefined + : undefined; await deliverReplies({ replies: [payload], chatId: String(chatId), @@ -223,6 +227,7 @@ export const dispatchTelegramMessage = async ({ chunkMode, onVoiceRecording: sendRecordVoice, linkPreview: telegramCfg.linkPreview, + replyQuoteText, }); }, onError: (err, info) => { diff --git a/src/telegram/bot.test.ts b/src/telegram/bot.test.ts index 72ee418bb..75dd32faf 100644 --- a/src/telegram/bot.test.ts +++ b/src/telegram/bot.test.ts @@ -894,6 +894,73 @@ describe("createTelegramBot", () => { expect(payload.ReplyToSender).toBe("Ada"); }); + it("uses quote text when a Telegram partial reply is received", async () => { + onSpy.mockReset(); + sendMessageSpy.mockReset(); + const replySpy = replyModule.__replySpy as unknown as ReturnType; + replySpy.mockReset(); + + createTelegramBot({ token: "tok" }); + const handler = getOnHandler("message") as (ctx: Record) => Promise; + + await handler({ + message: { + chat: { id: 7, type: "private" }, + text: "Sure, see below", + date: 1736380800, + reply_to_message: { + message_id: 9001, + text: "Can you summarize this?", + from: { first_name: "Ada" }, + }, + quote: { + text: "summarize this", + }, + }, + me: { username: "moltbot_bot" }, + getFile: async () => ({ download: async () => new Uint8Array() }), + }); + + expect(replySpy).toHaveBeenCalledTimes(1); + const payload = replySpy.mock.calls[0][0]; + expect(payload.Body).toContain("[Quoting Ada id:9001]"); + expect(payload.Body).toContain('"summarize this"'); + expect(payload.ReplyToId).toBe("9001"); + expect(payload.ReplyToBody).toBe("summarize this"); + expect(payload.ReplyToSender).toBe("Ada"); + }); + + it("handles quote-only replies without reply metadata", async () => { + onSpy.mockReset(); + sendMessageSpy.mockReset(); + const replySpy = replyModule.__replySpy as unknown as ReturnType; + replySpy.mockReset(); + + createTelegramBot({ token: "tok" }); + const handler = getOnHandler("message") as (ctx: Record) => Promise; + + await handler({ + message: { + chat: { id: 7, type: "private" }, + text: "Sure, see below", + date: 1736380800, + quote: { + text: "summarize this", + }, + }, + me: { username: "moltbot_bot" }, + getFile: async () => ({ download: async () => new Uint8Array() }), + }); + + expect(replySpy).toHaveBeenCalledTimes(1); + const payload = replySpy.mock.calls[0][0]; + expect(payload.Body).toContain("[Quoting unknown sender]"); + expect(payload.Body).toContain('"summarize this"'); + expect(payload.ReplyToId).toBeUndefined(); + expect(payload.ReplyToBody).toBe("summarize this"); + expect(payload.ReplyToSender).toBe("unknown sender"); + }); + it("sends replies without native reply threading", async () => { onSpy.mockReset(); sendMessageSpy.mockReset(); diff --git a/src/telegram/bot/delivery.test.ts b/src/telegram/bot/delivery.test.ts index 404cc2fc2..3cf1b2534 100644 --- a/src/telegram/bot/delivery.test.ts +++ b/src/telegram/bot/delivery.test.ts @@ -168,6 +168,37 @@ describe("deliverReplies", () => { ); }); + it("uses reply_parameters when quote text is provided", async () => { + const runtime = { error: vi.fn(), log: vi.fn() }; + const sendMessage = vi.fn().mockResolvedValue({ + message_id: 10, + chat: { id: "123" }, + }); + const bot = { api: { sendMessage } } as unknown as Bot; + + await deliverReplies({ + replies: [{ text: "Hello there", replyToId: "500" }], + chatId: "123", + token: "tok", + runtime, + bot, + replyToMode: "all", + textLimit: 4000, + replyQuoteText: "quoted text", + }); + + expect(sendMessage).toHaveBeenCalledWith( + "123", + expect.any(String), + expect.objectContaining({ + reply_parameters: { + message_id: 500, + quote: "quoted text", + }, + }), + ); + }); + it("falls back to text when sendVoice fails with VOICE_MESSAGES_FORBIDDEN", async () => { const runtime = { error: vi.fn(), log: vi.fn() }; const sendVoice = vi diff --git a/src/telegram/bot/delivery.ts b/src/telegram/bot/delivery.ts index 779c0c026..4f45f9997 100644 --- a/src/telegram/bot/delivery.ts +++ b/src/telegram/bot/delivery.ts @@ -42,11 +42,21 @@ export async function deliverReplies(params: { onVoiceRecording?: () => Promise | void; /** Controls whether link previews are shown. Default: true (previews enabled). */ linkPreview?: boolean; + /** Optional quote text for Telegram reply_parameters. */ + replyQuoteText?: string; }) { - const { replies, chatId, runtime, bot, replyToMode, textLimit, messageThreadId, linkPreview } = - params; + const { + replies, + chatId, + runtime, + bot, + replyToMode, + textLimit, + messageThreadId, + linkPreview, + replyQuoteText, + } = params; const chunkMode = params.chunkMode ?? "length"; - const threadParams = buildTelegramThreadParams(messageThreadId); let hasReplied = false; const chunkText = (markdown: string) => { const markdownChunks = @@ -97,6 +107,7 @@ export async function deliverReplies(params: { await sendTelegramText(bot, chatId, chunk.html, runtime, { replyToMessageId: replyToId && (replyToMode === "all" || !hasReplied) ? replyToId : undefined, + replyQuoteText, messageThreadId, textMode: "html", plainText: chunk.text, @@ -140,13 +151,14 @@ export async function deliverReplies(params: { const shouldAttachButtonsToMedia = isFirstMedia && replyMarkup && !followUpText; const mediaParams: Record = { caption: htmlCaption, - reply_to_message_id: replyToMessageId, ...(htmlCaption ? { parse_mode: "HTML" } : {}), ...(shouldAttachButtonsToMedia ? { reply_markup: replyMarkup } : {}), + ...buildTelegramSendParams({ + replyToMessageId, + messageThreadId, + replyQuoteText, + }), }; - if (threadParams) { - mediaParams.message_thread_id = threadParams.message_thread_id; - } if (isGif) { await withTelegramApiErrorLogging({ operation: "sendAnimation", @@ -207,6 +219,7 @@ export async function deliverReplies(params: { messageThreadId, linkPreview, replyMarkup, + replyQuoteText, }); // Skip this media item; continue with next. continue; @@ -391,6 +404,7 @@ async function sendTelegramVoiceFallbackText(opts: { messageThreadId?: number; linkPreview?: boolean; replyMarkup?: ReturnType; + replyQuoteText?: string; }): Promise { const chunks = opts.chunkText(opts.text); let hasReplied = opts.hasReplied; @@ -399,6 +413,7 @@ async function sendTelegramVoiceFallbackText(opts: { await sendTelegramText(opts.bot, opts.chatId, chunk.html, opts.runtime, { replyToMessageId: opts.replyToId && (opts.replyToMode === "all" || !hasReplied) ? opts.replyToId : undefined, + replyQuoteText: opts.replyQuoteText, messageThreadId: opts.messageThreadId, textMode: "html", plainText: chunk.text, @@ -415,11 +430,20 @@ async function sendTelegramVoiceFallbackText(opts: { function buildTelegramSendParams(opts?: { replyToMessageId?: number; messageThreadId?: number; + replyQuoteText?: string; }): Record { const threadParams = buildTelegramThreadParams(opts?.messageThreadId); const params: Record = {}; + const quoteText = opts?.replyQuoteText?.trim(); if (opts?.replyToMessageId) { - params.reply_to_message_id = opts.replyToMessageId; + if (quoteText) { + params.reply_parameters = { + message_id: Math.trunc(opts.replyToMessageId), + quote: quoteText, + }; + } else { + params.reply_to_message_id = opts.replyToMessageId; + } } if (threadParams) { params.message_thread_id = threadParams.message_thread_id; @@ -434,6 +458,7 @@ async function sendTelegramText( runtime: RuntimeEnv, opts?: { replyToMessageId?: number; + replyQuoteText?: string; messageThreadId?: number; textMode?: "markdown" | "html"; plainText?: string; @@ -443,6 +468,7 @@ async function sendTelegramText( ): Promise { const baseParams = buildTelegramSendParams({ replyToMessageId: opts?.replyToMessageId, + replyQuoteText: opts?.replyQuoteText, messageThreadId: opts?.messageThreadId, }); // Add link_preview_options when link preview is disabled. diff --git a/src/telegram/bot/helpers.ts b/src/telegram/bot/helpers.ts index f2e1eff24..19b8e76c0 100644 --- a/src/telegram/bot/helpers.ts +++ b/src/telegram/bot/helpers.ts @@ -150,28 +150,49 @@ export function resolveTelegramReplyId(raw?: string): number | undefined { return parsed; } -export function describeReplyTarget(msg: TelegramMessage) { +export type TelegramReplyTarget = { + id?: string; + sender: string; + body: string; + kind: "reply" | "quote"; +}; + +export function describeReplyTarget(msg: TelegramMessage): TelegramReplyTarget | null { const reply = msg.reply_to_message; - if (!reply) return null; - const replyBody = (reply.text ?? reply.caption ?? "").trim(); - let body = replyBody; - if (!body) { - if (reply.photo) body = ""; - else if (reply.video) body = ""; - else if (reply.audio || reply.voice) body = ""; - else if (reply.document) body = ""; - else { - const locationData = extractTelegramLocation(reply); - if (locationData) body = formatLocationText(locationData); + const quote = msg.quote; + let body = ""; + let kind: TelegramReplyTarget["kind"] = "reply"; + + if (quote?.text) { + body = quote.text.trim(); + if (body) { + kind = "quote"; + } + } + + if (!body && reply) { + const replyBody = (reply.text ?? reply.caption ?? "").trim(); + body = replyBody; + if (!body) { + if (reply.photo) body = ""; + else if (reply.video) body = ""; + else if (reply.audio || reply.voice) body = ""; + else if (reply.document) body = ""; + else { + const locationData = extractTelegramLocation(reply); + if (locationData) body = formatLocationText(locationData); + } } } if (!body) return null; - const sender = buildSenderName(reply); + const sender = reply ? buildSenderName(reply) : undefined; const senderLabel = sender ? `${sender}` : "unknown sender"; + return { - id: reply.message_id ? String(reply.message_id) : undefined, + id: reply?.message_id ? String(reply.message_id) : undefined, sender: senderLabel, body, + kind, }; } diff --git a/src/telegram/bot/types.ts b/src/telegram/bot/types.ts index 3e106b885..df3dba6d3 100644 --- a/src/telegram/bot/types.ts +++ b/src/telegram/bot/types.ts @@ -1,6 +1,12 @@ import type { Message } from "@grammyjs/types"; -export type TelegramMessage = Message; +export type TelegramQuote = { + text?: string; +}; + +export type TelegramMessage = Message & { + quote?: TelegramQuote; +}; export type TelegramStreamMode = "off" | "partial" | "block"; diff --git a/src/telegram/send.ts b/src/telegram/send.ts index 7dd79dd1f..e3f3ac30e 100644 --- a/src/telegram/send.ts +++ b/src/telegram/send.ts @@ -46,6 +46,8 @@ type TelegramSendOpts = { silent?: boolean; /** Message ID to reply to (for threading) */ replyToMessageId?: number; + /** Quote text for Telegram reply_parameters. */ + quoteText?: string; /** Forum topic thread ID (for forum supergroups) */ messageThreadId?: number; /** Inline keyboard buttons (reply markup). */ @@ -198,9 +200,17 @@ export async function sendMessageTelegram( const messageThreadId = opts.messageThreadId != null ? opts.messageThreadId : target.messageThreadId; const threadIdParams = buildTelegramThreadParams(messageThreadId); - const threadParams: Record = threadIdParams ? { ...threadIdParams } : {}; + const threadParams: Record = threadIdParams ? { ...threadIdParams } : {}; + const quoteText = opts.quoteText?.trim(); if (opts.replyToMessageId != null) { - threadParams.reply_to_message_id = Math.trunc(opts.replyToMessageId); + if (quoteText) { + threadParams.reply_parameters = { + message_id: Math.trunc(opts.replyToMessageId), + quote: quoteText, + }; + } else { + threadParams.reply_to_message_id = Math.trunc(opts.replyToMessageId); + } } const hasThreadParams = Object.keys(threadParams).length > 0; const request = createTelegramRetryRunner({