Fix missing before_tool_call hook integration#6570
Merged
steipete merged 3 commits intoopenclaw:mainfrom Feb 1, 2026
Merged
Conversation
- Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
- 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing
src/agents/pi-embedded-subscribe.handlers.tools.before-tool-call-hook.test.ts
Show resolved
Hide resolved
Address P0/P1/P3 bugs:
P0 - Fix parameter mutation crash for non-object args:
- Normalize args to objects before passing to hooks (maintains hook contract)
- Handle parameter merging safely for both object and non-object args
P1 - Add missing internal state updates when blocking tools:
- Set toolMetaById metadata like normal flow
- Call onAgentEvent callback to maintain consistency
- Emit events in same order as normal tool execution
P1 - Fix test expectations to match implementation reality:
- Non-object args normalized to {} for hook params (not passed as-is)
- Add test for safe parameter modification with various arg types
- Update mocks to verify state updates when blocking
P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class:
- More robust error handling without property collision risk
- Cleaner control flow that's serialization-safe
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Contributor
Author
|
there's seven more of these documented hooks that aren't actually in there. i can (have my bots) work on the next seven in a batch, or one PR at a time, once judgement on this one is passed |
steipete
added a commit
that referenced
this pull request
Feb 1, 2026
steipete
added a commit
that referenced
this pull request
Feb 1, 2026
steipete
added a commit
that referenced
this pull request
Feb 1, 2026
Contributor
|
Merged via squash.
Thanks @ryancnelson! |
bennewton999
pushed a commit
to bennewton999/openclaw
that referenced
this pull request
Feb 2, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
bennewton999
pushed a commit
to bennewton999/openclaw
that referenced
this pull request
Feb 2, 2026
buiilding
pushed a commit
to buiilding/openclaw
that referenced
this pull request
Feb 2, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
buiilding
pushed a commit
to buiilding/openclaw
that referenced
this pull request
Feb 2, 2026
3 tasks
xampla
pushed a commit
to xampla/openclaw
that referenced
this pull request
Feb 2, 2026
Now that before_tool_call is implemented (openclaw#6570), this PR adds the complementary after_tool_call hook for post-execution telemetry. - Add pi-tools.hooks.ts: wraps tool execute methods to fire after_tool_call - Hook fires as fire-and-forget after tool returns with timing data - Provides: toolName, params, result, error, durationMs - Hook context includes agentId and sessionKey for correlation - Hook errors are caught and logged, never breaking tool execution - Tools are only wrapped when hooks are actually registered (zero overhead) This addresses another hook from openclaw#6535 (2 of 8 now working). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
HashWarlock
pushed a commit
to HashWarlock/openclaw
that referenced
this pull request
Feb 4, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
HashWarlock
pushed a commit
to HashWarlock/openclaw
that referenced
this pull request
Feb 4, 2026
uxcu
pushed a commit
to uxcu/kook-openclaw
that referenced
this pull request
Feb 5, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
uxcu
pushed a commit
to uxcu/kook-openclaw
that referenced
this pull request
Feb 5, 2026
bestNiu
pushed a commit
to bestNiu/clawdbot
that referenced
this pull request
Feb 5, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
bestNiu
pushed a commit
to bestNiu/clawdbot
that referenced
this pull request
Feb 5, 2026
batao9
pushed a commit
to batao9/openclaw
that referenced
this pull request
Feb 7, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
batao9
pushed a commit
to batao9/openclaw
that referenced
this pull request
Feb 7, 2026
6 tasks
claucondor
added a commit
to claucondor/openclaw
that referenced
this pull request
Feb 7, 2026
Following the test pattern established in pi-tools.before-tool-call.test.ts (from openclaw#6570), add coverage for the newly wired hooks: - after_tool_call: verifies hook fires after tool execution, passes normalized tool name and result, handles errors gracefully, and skips invocation when no hooks are registered. - gateway_stop: verifies hook fires before shutdown with reason string, uses default reason when none provided, does not block shutdown on hook failure, and skips when no hooks are registered. 10 tests total (5 per hook).
6 tasks
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Feb 8, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com> (cherry picked from commit 6c6f1e9)
This was referenced Feb 8, 2026
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Feb 8, 2026
…thanks @ryancnelson) (openclaw#6660) (cherry picked from commit 8eb11bd) # Conflicts: # CHANGELOG.md # README.md # src/agents/pi-embedded-subscribe.handlers.tools.ts
6 tasks
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Feb 8, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com> (cherry picked from commit 6c6f1e9)
battman21
pushed a commit
to battman21/openclaw
that referenced
this pull request
Feb 12, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
battman21
pushed a commit
to battman21/openclaw
that referenced
this pull request
Feb 12, 2026
battman21
pushed a commit
to battman21/openclaw
that referenced
this pull request
Feb 12, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
battman21
pushed a commit
to battman21/openclaw
that referenced
this pull request
Feb 12, 2026
hughdidit
added a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 1, 2026
* fix: restore verbose tool summaries in DM sessions
875b018ea removed onToolResult from dispatch-from-config.ts to prevent
tool summaries leaking into group channels. However, this also broke
verbose tool summaries in DM/private sessions where they are expected.
This restores onToolResult but gates it behind ChatType !== 'group',
so group channels remain unaffected while DM verbose works again.
mirror=false is passed to sendPayloadAsync to avoid duplicating tool
summaries in the session transcript (matching the block reply behavior).
Fixes #2665
(cherry picked from commit f27a5030d898ffd747d394d8c5066a332000ec79)
* fix: exclude native slash commands from onToolResult
Native slash commands (e.g. /verbose, /status) should not emit tool
summaries. Gate onToolResult behind CommandSource !== 'native' in
addition to the existing ChatType !== 'group' check.
Add test for native command exclusion.
(cherry picked from commit c13c39f1214f5acad37eea355fbc41a6df4fff07)
* fix: handle telegram video notes (#2905) (thanks @mylukin)
(cherry picked from commit 4ac7aa4a481503508e8bd2c49d2e71e00fccfe36)
* fix: include AccountId in telegram native command context (#2942) (thanks @Chloe-VP)
(cherry picked from commit fcc53bcf1bca757a2c330e6dab2383adb563aef3)
* fix: use & instead of <> in XML escaping test for Windows NTFS compatibility (#3750)
NTFS does not allow < or > in filenames, causing the XML filename
escaping test to fail on Windows CI with ENOENT.
Replace file<test>.txt with file&test.txt — & is valid on all platforms
and still requires XML escaping (&), preserving the test's intent.
Fixes #3748
(cherry picked from commit c20035094ddf95d3186429e88c1b753b99edc36b)
* fix: avoid silent telegram empty replies (#3796) (#3796)
(cherry picked from commit 718bc3f9c818a3521c675a58d8d2942c51d39f4e)
# Conflicts:
# CHANGELOG.md
# src/telegram/bot-native-commands.ts
# src/telegram/bot/delivery.ts
* fix: preserve reasoning tags inside code blocks (#4118) (thanks @vinaygit18)
(cherry picked from commit 4583f88626f20efedc454d893afaaf898c23523b)
# Conflicts:
# CHANGELOG.md
* fix: update config types
(cherry picked from commit d47b4e6f8127e698a9fa6263c0f6a0df93a88b40)
# Conflicts:
# src/commands/onboard-auth.config-core.ts
# src/plugins/config-state.ts
* fix: migrate legacy gateway services
(cherry picked from commit 02576615cb4c1382abf1d0aee10ed10f1f676e78)
# Conflicts:
# docs/providers/xiaomi.md
# package.json
# src/cli/banner.ts
# src/commands/doctor-gateway-services.ts
# src/commands/doctor.ts
# src/commands/onboard-helpers.ts
# src/daemon/inspect.ts
* fix: migrate legacy config
(cherry picked from commit a155e2f8ae32e0b8aa82daa1a546ebfa3b6f9124)
# Conflicts:
# src/commands/doctor-config-flow.ts
* fix: migrate legacy state dirs
(cherry picked from commit 9886fd1a5a3f1e07817865dbf4c1663a919749e3)
# Conflicts:
# package.json
# src/commands/onboard-helpers.ts
# src/config/paths.ts
* fix: migrate symlinked legacy state dirs
(cherry picked from commit b9afa3d33f97f86f7ee9e841719b877e887b76b1)
# Conflicts:
# package.json
# src/infra/state-migrations.ts
* fix: detect legacy gateway launchd labels
(cherry picked from commit 151ddd624bd368e6f4345207c8ea7d9e6521a619)
# Conflicts:
# package.json
* fix: scope telegram skill commands per bot (#4360) (thanks @robhparker)
(cherry picked from commit 9025da2296c11829bf48f0f38c434d6a0ce82fa3)
# Conflicts:
# src/telegram/bot-native-commands.ts
* fix: honor Telegram proxy dispatcher (#4456) (thanks @spiceoogway)
(cherry picked from commit 3a85cb18330ef7b426668191d0acb7ec7b6a86cf)
# Conflicts:
# CHANGELOG.md
* fix: accept numeric Telegram react ids (#4533) (thanks @Ayush10)
(cherry picked from commit bc432d8435214b3a00556f64a4a7ecd2f2ba7616)
# Conflicts:
# README.md
* fix: add docker ui install changelog entry (#4584) (thanks @obviyus)
(cherry picked from commit fa9ec6e85452a81d21fcb046c770e519a16e8dda)
# Conflicts:
# CHANGELOG.md
* fix: correct telegram html nesting (#4578) (thanks @ThanhNguyxn)
(cherry picked from commit da71eaebd2f613f8afaddccdff12cb28c1d7e0f4)
# Conflicts:
# CHANGELOG.md
# src/markdown/render.ts
# src/telegram/format.test.ts
* fix: don't warn about expired OAuth tokens with valid refresh tokens (#4593)
OAuth credentials with a refresh token auto-renew on first API call,
so the doctor should not warn about access token expiration when a
refresh token is present. This avoids unnecessary "expired" warnings
that prompt users to re-auth when no action is needed.
Fixes #3032
Co-authored-by: Ayush Ojha <ayushozha@outlook.com>
(cherry picked from commit 37e295fc029070a214e2690d08429791fcac1512)
* fix: local updates for PR #4780
Co-authored-by: jlowin <jlowin@users.noreply.github.com>
(cherry picked from commit f24e3cdae539b985593626e282a9404b9a00c917)
# Conflicts:
# src/cli/models-cli.ts
# src/commands/models/list.status-command.ts
# src/commands/models/list.status.test.ts
* fix: add per-agent models status (#4780) (thanks @jlowin)
(cherry picked from commit daf27dd37e99cb19b3d169569591a162d5547712)
# Conflicts:
# CHANGELOG.md
* fix: local updates for PR #4873
Co-authored-by: Hisleren <Hisleren@users.noreply.github.com>
(cherry picked from commit e5a95b5b66113b145dbf2f80cc082c269a73728e)
# Conflicts:
# src/commands/configure.gateway.ts
# src/wizard/onboarding.gateway-config.ts
* fix: prevent undefined gateway token defaults (#4873) (thanks @Hisleren)
Co-authored-by: Hisleren <Hisleren@users.noreply.github.com>
(cherry picked from commit 39eb0b7bc0c2594620a7d2eff34f07d987845528)
# Conflicts:
# CHANGELOG.md
* fix: resolve Control UI assets for global installs (#4909) (thanks @YuriNachos)
Co-authored-by: YuriNachos <YuriNachos@users.noreply.github.com>
(cherry picked from commit 34bdbdb4050dfc2bea27085e058e629060a1c8a4)
# Conflicts:
# CHANGELOG.md
# src/infra/control-ui-assets.ts
* fix: prefer requesterOrigin over stale session entry in subagent announce routing (#4957)
* fix: prefer requesterOrigin over stale session entry in subagent announce routing
When a subagent finishes and announces results back, resolveAnnounceOrigin
merged the session entry (primary) with requesterOrigin (fallback). If the
session store had a stale lastChannel (e.g. whatsapp) from a previous
interaction but the user was now on a different channel (e.g. bluebubbles),
the announce would route to the wrong channel.
Swap the merge order so requesterOrigin (captured at spawn time, reflecting
the actual current channel) takes priority, with the session entry as
fallback for any missing fields.
Error before fix:
Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp
Adds regression test for the stale-channel scenario.
* fix: match test to exact failure scenario and improve reliability (#4957) (thanks @tyler6204)
- Remove lastTo from stale session store to match the exact mismatch scenario described in the PR
- Replace 5ms setTimeout sleeps with expect.poll for better test reliability
- Prevents flakiness on slower CI machines
(cherry picked from commit 57248a7ca120b1083005f37a833ffebcddbd45d8)
* fix: normalize telegram account token lookup (#5055) (thanks @jasonsschin)
(cherry picked from commit e849df64dcce9721844cc1f92fcd427ead210c31)
# Conflicts:
# CHANGELOG.md
# src/telegram/token.ts
* fix: preserve delivery thread fallback (#4911) (thanks @yevhen)
(cherry picked from commit 310eed825e92448552bea310236ff82b93660699)
# Conflicts:
# src/config/sessions/store.ts
# src/utils/delivery-context.test.ts
# src/utils/delivery-context.ts
* fix: suppress banner and doctor checks for completion command
(cherry picked from commit 48aaf6ce4eb3f6233391a6a1ba35a4d0555747fd)
* fix: remove unused variables and fix template literal type
(cherry picked from commit 3c8fa0f9130bca7fa97ab48d36fcad8c3eb8e13d)
# Conflicts:
# src/cli/completion-cli.ts
* fix: repair docker build typing
(cherry picked from commit e9f0be06eb6da3c62f22203f15945d81ce9e286b)
# Conflicts:
# src/agents/pi-embedded-runner/compact.ts
# src/agents/pi-model-discovery.ts
* fix: align embedded session setup with sdk
(cherry picked from commit d2a852b982fbc92941db8999a8482fc8d19ea2f3)
# Conflicts:
# src/agents/pi-embedded-runner/compact.ts
# src/agents/pi-embedded-runner/run/attempt.ts
# src/commands/models.list.test.ts
* fix: restore embedded extension discovery typings
(cherry picked from commit 51e72d41c29e861b24784c8e29b14849a906b181)
* fix: restore tsc build and plugin install tests
(cherry picked from commit a42e1c82d9ac256fe3a6ffd448e1c7d7a6bb406b)
# Conflicts:
# src/agents/bash-tools.exec.ts
# src/agents/model-scan.ts
# src/agents/pi-embedded-runner/run/attempt.ts
# src/agents/skills.ts
# src/agents/subagent-announce.ts
# src/auto-reply/reply/commands-subagents.ts
# src/cli/nodes-cli/register.status.ts
# src/discord/resolve-channels.ts
# src/wizard/onboarding.gateway-config.ts
# tsconfig.json
* fix: lint cleanups
(cherry picked from commit ee26b68fe17505e6872e1a3b43384c6138f25da9)
# Conflicts:
# src/auto-reply/reply/commands-subagents.ts
# src/discord/resolve-channels.ts
* fix: Also build `entry.ts` into `dist/entry.mjs`.
(cherry picked from commit ed65131c1cb813ff396b99884dac9e789ce65a81)
# Conflicts:
# package.json
# src/daemon/program-args.test.ts
# src/infra/control-ui-assets.ts
# src/infra/gateway-lock.ts
# src/infra/ports.test.ts
* fix: Update a few more `entry.js` to `entry.mjs` paths.
(cherry picked from commit 4b7406719cf785975835d8dae1c8c20bb98daea0)
* fix: Fix `scripts/watch-node.mjs` and use `tsdown --watch`.
(cherry picked from commit 68ba1afb34ee97b045e02d7a175102182f4210ed)
# Conflicts:
# package.json
# scripts/watch-node.mjs
* fix: resolve workspace templates from package root
(cherry picked from commit ddc5683c675d77427a06a3fb8b79b186e9723a2e)
# Conflicts:
# src/cli/gateway-cli/dev.ts
* fix: retry gateway watch after dist rebuild
(cherry picked from commit e25fedf9321e924f15313c7a88d050de95f5e3ff)
# Conflicts:
# scripts/watch-node.mjs
* fix: Update `CONTRIBUTING.md` + adjust `watch-node.mjs` again to be faster with `tsc`.
(cherry picked from commit dae00fe18450b6b2eb5dd6981d6b4ea80dce0091)
# Conflicts:
# CONTRIBUTING.md
# scripts/watch-node.mjs
* fix: sync docker-compose gateway command
(cherry picked from commit c3a8a5374f17c43cbf855dd49847ed2084fbe945)
# Conflicts:
# docker-compose.yml
* fix: avoid stderr backpressure in macOS discovery (#3304) (thanks @abhijeet117)
(cherry picked from commit b9b94715fa0b0bc0fff1ecf5e8e4665c1084ad9c)
# Conflicts:
# CHANGELOG.md
# apps/macos/Sources/MoltbotDiscovery/WideAreaGatewayDiscovery.swift
* fix: restore telegram draft streaming partials
(cherry picked from commit 37721ebd7ca95205973023947016cc772aed4a27)
# Conflicts:
# src/telegram/bot-message-dispatch.ts
# src/telegram/bot.ts
* fix: harden telegram streaming state
(cherry picked from commit a64d8d2d66eac8a5fe8b7c8305cd6b0d839d786f)
# Conflicts:
# src/telegram/draft-stream.ts
* fix: stabilize partial streaming filters
(cherry picked from commit b5c2b1880d8ccb50d1c61950bf6c2a6ec333c219)
* fix: restore telegram draft streaming partials (#5543) (thanks @obviyus)
(cherry picked from commit f1de88c198d84a1b15c646fa6fc717cfdfe2e672)
# Conflicts:
# CHANGELOG.md
* fix: Failing tests due to import sorting.
(cherry picked from commit 58f4185925a6b73d99d42cd3e6da86fb71c22d17)
# Conflicts:
# docs/channels/discord.md
# src/discord/monitor/native-command.ts
# src/discord/monitor/sender-identity.ts
* fix: skip extension append if command already has one
Addresses review feedback - now checks path.extname() before
appending .cmd to avoid producing invalid paths like npm.cmd.cmd
(cherry picked from commit dc8a63cb8bb325228779dce4f2813b0612d4e139)
# Conflicts:
# src/process/exec.ts
* fix: resolve Windows npm spawn ENOENT (#5815) (thanks @thejhinvirtuoso)
(cherry picked from commit 3d5c03ec29ebe60e3d6a46151e4034e3ee5edcfe)
# Conflicts:
# CHANGELOG.md
* fix(tui): prevent crash when searching with digits in model selector
highlightMatch() was replacing tokens inside ANSI escape codes,
corrupting sequences like [38;2;123;127;135m when searching for '2'.
Fix: apply highlighting to plain text before theme styling.
(cherry picked from commit c621c80afcfd6bfb42e4645a129da051fd5d7d2b)
* fix: use telegram user id for pairing request
(cherry picked from commit 633f8484815afa2f23f94dcf1be4cba0d0d97aa0)
# Conflicts:
# src/telegram/bot-message-context.ts
* fix: use shared pairing store for telegram (#6127) (thanks @obviyus)
(cherry picked from commit 1f3afa38e8d7d67f2aa9392e81ae88521c577adf)
* fix: secure chrome extension relay cdp
(cherry picked from commit a1e89afcc19efd641c02b24d66d689f181ae2b5c)
# Conflicts:
# src/browser/cdp.helpers.ts
# src/browser/extension-relay.ts
* fix: friendlier Windows onboarding message (#6242)
Co-authored-by: CLAWDINATOR <clawdinator@openclaw.ai>
Co-authored-by: Scott Hanselman <scott@hanselman.com>
(cherry picked from commit b897389b877a9d3a92cbc02c77f8c30d54d35337)
# Conflicts:
# src/commands/onboard.ts
* fix: update compaction safeguard to respect context window tokens
(cherry picked from commit 5d3c898a9496670f876a03cbd8368a9833f84148)
* fix: cap context window resolution (#6187) (thanks @iamEvanYT)
(cherry picked from commit 0992c5a8094316f26138ccb0c39b7cee7b0fceb8)
# Conflicts:
# docs/concepts/session-pruning.md
# src/agents/context-window-guard.ts
* fix: satisfy lint curly rule (#6310)
* fix: satisfy lint curly rule
* docs: apply oxfmt formatting
(cherry picked from commit e9f70e858563695c2f9013fb38dba10fb01d239b)
# Conflicts:
# docs/.i18n/README.md
# docs/concepts/session-pruning.md
# docs/zh-CN/index.md
# docs/zh-CN/start/getting-started.md
# docs/zh-CN/start/wizard.md
* fix: cover OpenRouter attribution headers
(cherry picked from commit 083ec9325e4195633bff306a6f8c42998a1b6123)
# Conflicts:
# src/agents/pi-embedded-runner/extra-params.ts
* fix: align embedded agent session setup
(cherry picked from commit bcde2fca5a100e9e540c7485ce56b50e44d17029)
# Conflicts:
# src/agents/auth-profiles/oauth.ts
# src/agents/pi-embedded-runner/compact.ts
# src/agents/pi-embedded-runner/run/attempt.ts
* fix: wire before_tool_call hook into tool execution (#6570) (thanks @ryancnelson) (#6660)
(cherry picked from commit 8eb11bd3044a21eb6ce76e8a451ae94ec4ab0549)
# Conflicts:
# CHANGELOG.md
# README.md
# src/agents/pi-embedded-subscribe.handlers.tools.ts
* fix: align embedded runner with session API changes
(cherry picked from commit 3367b2aa272f7626b3b2157c5f2ca8792a4f4d1a)
# Conflicts:
# src/agents/pi-embedded-runner/compact.ts
# src/agents/pi-embedded-runner/run/attempt.ts
* fix: harden host exec env validation (#4896) (thanks @HassanFleyah)
(cherry picked from commit a87a07ec8ada6e17d434306247b6258cb76eba68)
# Conflicts:
# CHANGELOG.md
# src/agents/bash-tools.exec.ts
* fix: clean up plugin linting and types
(cherry picked from commit 19775abdda11c4066c308752894fad156b9aeef4)
# Conflicts:
# .oxlintrc.json
# extensions/googlechat/src/accounts.ts
# extensions/line/src/channel.ts
* fix: align embedded runner with pi-coding-agent API
(cherry picked from commit e58291e070108aaffc36412d1ed71d01d64ed9c3)
# Conflicts:
# src/agents/pi-embedded-runner/compact.ts
# src/agents/pi-embedded-runner/run/attempt.ts
* fix: refine oauth provider guard
(cherry picked from commit 7aeabbabd46d544a23704732fc526e7355633856)
* fix: align pi-coding-agent typings and docs
(cherry picked from commit aa2eb48b9c0fe63aa7b8be6329869d3a2539c446)
# Conflicts:
# docs/pi.md
* fix: format issues and lint error in oauth.ts
(cherry picked from commit 4347d2468c37be54fe51ba4e4df0de502d4c87c3)
# Conflicts:
# CHANGELOG.md
# docs/nodes/index.md
# docs/providers/moonshot.md
* fix: convert HTML comments to MDX comments in docs
(cherry picked from commit 7ee99af9f892e7a6be9888e88d9b055fc8100d8c)
# Conflicts:
# docs/concepts/model-providers.md
* fix: format docs
(cherry picked from commit dda8a2b23848695b834fb77f95c34a022740917a)
# Conflicts:
# docs/concepts/model-providers.md
* fix: L2-normalize local embedding vectors to fix semantic search (#5332)
* fix: L2-normalize local embedding vectors to fix semantic search
* fix: handle non‑finite magnitude in L2 normalization and remove stale test reset
* refactor: add braces to l2Normalize guard clause in embeddings
* fix: sanitize local embeddings (#5332) (thanks @akramcodez)
---------
Co-authored-by: Gustavo Madeira Santana <gumadeiras@gmail.com>
(cherry picked from commit 5020bfa2a9bdad33e79d5ae04e0b6a74a457485a)
# Conflicts:
# src/memory/embeddings.ts
* fix: unify telegram thread handling
(cherry picked from commit 19b8416a8108bc997cec1c1bc020a12389ae4739)
# Conflicts:
# src/telegram/bot-native-commands.ts
# src/telegram/bot/delivery.ts
* fix: require thread specs for telegram sends
(cherry picked from commit 1d7dd5f261492b4cfd0219871abbfcb8a975b6ac)
* fix: inline telegram thread scope type
(cherry picked from commit 0bc8a592a6ad47de0674396b3e1c2dc30159fedb)
* fix: add changelog for telegram thread spec (#6833) (thanks @obviyus)
(cherry picked from commit e25f8ed56c3dad7a79a5277ae8e633ce1bd732da)
# Conflicts:
# CHANGELOG.md
* fix: add telegram download timeouts (#6914) (thanks @hclsys)
(cherry picked from commit 01449a2f4158fed111807978424e20b7d5cf8b54)
* fix: treat '*' tool allowlist as valid
(cherry picked from commit 521b12181571c5cc2575389cc24a4c1eef8d2b67)
# Conflicts:
# CHANGELOG.md
* fix: flush block streaming on paragraph boundaries for chunkMode=newline (#7014)
* feat: Implement paragraph boundary flushing in block streaming
- Added `flushOnParagraph` option to `BlockReplyChunking` for immediate flushing on paragraph breaks.
- Updated `EmbeddedBlockChunker` to handle paragraph boundaries during chunking.
- Enhanced `createBlockReplyCoalescer` to support flushing on enqueue.
- Added tests to verify behavior of flushing with and without `flushOnEnqueue` set.
- Updated relevant types and interfaces to include `flushOnParagraph` and `flushOnEnqueue` options.
* fix: Improve streaming behavior and enhance block chunking logic
- Resolved issue with stuck typing indicator after streamed BlueBubbles replies.
- Refactored `EmbeddedBlockChunker` to streamline fence-split handling and ensure maxChars fallback for newline chunking.
- Added tests to validate new chunking behavior, including handling of paragraph breaks and fence scenarios.
- Updated changelog to reflect these changes.
* test: Add test for clamping long paragraphs in EmbeddedBlockChunker
- Introduced a new test case to verify that long paragraphs are correctly clamped to maxChars when flushOnParagraph is enabled.
- Updated logic in EmbeddedBlockChunker to handle cases where the next paragraph break exceeds maxChars, ensuring proper chunking behavior.
* refactor: streamline logging and improve error handling in message processing
- Removed verbose logging statements from the `processMessage` function to reduce clutter.
- Enhanced error handling by using `runtime.error` for typing restart failures.
- Updated the `applySystemPromptOverrideToSession` function to accept a string directly instead of a function, simplifying the prompt application process.
- Adjusted the `runEmbeddedAttempt` function to directly use the system prompt override without invoking it as a function.
(cherry picked from commit 9ef24fd400ba60bdca7cc9ab0e2d64a839c54f21)
# Conflicts:
# CHANGELOG.md
# docs/channels/bluebubbles.md
# extensions/bluebubbles/src/monitor.ts
# src/agents/pi-embedded-block-chunker.ts
# src/auto-reply/reply/block-reply-coalescer.ts
* fix: restore lint/build gates
(cherry picked from commit 34dd7324d90cbf26370181cfcb5382422f082763)
# Conflicts:
# .oxlintrc.json
# package.json
# src/agents/auth-profiles/oauth.ts
# src/agents/pi-embedded-runner/system-prompt.ts
* fix: harden plugin and hook install paths
(cherry picked from commit d03eca8450dc493b198a88b105fd180895238e57)
# Conflicts:
# src/agents/pi-embedded-runner/compact.ts
# src/hooks/install.ts
# src/plugins/install.test.ts
# src/plugins/install.ts
* fix: gate Teams media auth retries
(cherry picked from commit 41cc5bcd4f1d434ad1bbdfa55b56f25025ecbf6b)
# Conflicts:
# docs/channels/msteams.md
# extensions/msteams/src/attachments/download.ts
* fix: resolve system prompt overrides
(cherry picked from commit b8174decf334b1990c9a308b6e4d118a53933fc9)
# Conflicts:
# src/agents/pi-embedded-runner/system-prompt.ts
* fix: align tool execute signature
(cherry picked from commit 284d24209bf6d587c4943bb56ea9d21c3319a22d)
# Conflicts:
# src/agents/pi-tool-definition-adapter.ts
* fix: align tool execute parameter order
(cherry picked from commit 2d317ce423720af020403c2da86faef43e42ba8b)
# Conflicts:
# src/agents/pi-tool-definition-adapter.ts
* fix: align tool definition adapter
(cherry picked from commit 9ae1b732ef69ba880fa681fa41d9d788691b34c8)
# Conflicts:
# docs/install/docker.md
# src/agents/pi-embedded-runner.createsystempromptoverride.test.ts
# src/agents/pi-tool-definition-adapter.ts
* fix: normalize tool execute args
(cherry picked from commit bcb0ed0866c87c4ef1097569ec39890be010716c)
# Conflicts:
# src/agents/pi-tool-definition-adapter.ts
* fix: handle legacy tool execute signatures
(cherry picked from commit 845d97b6a50eecc1e614ee529b6246131c91f6d2)
* fix: satisfy tool adapter lint
(cherry picked from commit bf08b485bde8e66e9bb0a48592326c5f3767d4ef)
* fix: guard remote media fetches with SSRF checks
(cherry picked from commit 81c68f582d4a9a20d9cca9f367d2da9edc5a65ae)
# Conflicts:
# CHANGELOG.md
# src/agents/tools/web-fetch.ts
# src/media/fetch.test.ts
# src/media/fetch.ts
# src/media/input-files.ts
# src/slack/monitor/media.ts
# src/web/media.test.ts
# src/web/media.ts
* fix: start gateway in docker CMD (#6635) (thanks @kaizen403)
(cherry picked from commit 66307695eba71b7da1a03cfa10e770bd4b1c9004)
* fix: polish docker setup flow
(cherry picked from commit dfef943f0a18e05e9c81b82f1e800024f444d276)
# Conflicts:
# docker-setup.sh
* fix: expand SSRF guard coverage
(cherry picked from commit 9bd64c8a1f91dda602afc1d5246a2ff2be164647)
# Conflicts:
# CHANGELOG.md
# src/media-understanding/providers/deepgram/audio.test.ts
# src/media-understanding/providers/openai/audio.test.ts
# src/slack/monitor/media.ts
# src/telegram/bot.media.downloads-media-file-path-no-file-download.test.ts
* fix: stabilize docker e2e flows
(cherry picked from commit f9fae2c439bbbe6fcd4305cd2cb2958df5a45473)
# Conflicts:
# scripts/e2e/doctor-install-switch-docker.sh
# scripts/e2e/onboard-docker.sh
# scripts/e2e/plugins-docker.sh
* fix: address review feedback — retryDelay uses effectiveForce, default overrides param, @state() on chatNewMessagesBelow
(cherry picked from commit 822388fe9236abe6e66a4b1b40967fb8d754ce82)
# Conflicts:
# ui/src/ui/app-scroll.test.ts
# ui/src/ui/app-scroll.ts
# ui/src/ui/app.ts
* fix: resolve check errors in nodes-tool and commands-ptt
(cherry picked from commit d3bb32273e1b77e13d05a8d10e97194be94e9806)
# Conflicts:
# src/agents/tools/nodes-tool.ts
# src/auto-reply/reply/commands-ptt.ts
* fix: validate AbortSignal instances before calling AbortSignal.any()
Fixes #7269
(cherry picked from commit a63ec41a7bf53efeea97ab46e2216deb85051c55)
# Conflicts:
# src/agents/pi-tools.abort.ts
* fix: validate AbortSignal instances before calling AbortSignal.any() (#7277) (thanks @Elarwei001)
(cherry picked from commit 5fb8f779ca1e4a5432fc8fd9c0fd243107b95de9)
# Conflicts:
# CHANGELOG.md
# src/agents/pi-tools.abort.ts
* fix: skip audio files from text extraction to prevent binary processing (#7475)
* fix: skip audio files from text extraction early
Audio files should not be processed through extractFileBlocks for text
extraction - they are handled by the dedicated audio transcription
capability (STT).
Previously, audio files were only skipped if they didn't "look like text"
(looksLikeUtf8Text check). This caused issues where some audio binary
data (e.g., long Telegram voice messages) could accidentally pass the
heuristic check and get processed as text content.
This fix:
1. Adds audio to the early skip alongside image/video (more efficient)
2. Removes the redundant secondary check that had the flawed condition
Fixes audio binary being incorrectly processed as text in Telegram and
other platforms.
* Media: skip binary media in file extraction (#7475) (thanks @AlexZhangji)
---------
Co-authored-by: Shakker <shakkerdroid@gmail.com>
(cherry picked from commit f49297e2c116281b9ffc292297e83a1d4781ea33)
# Conflicts:
# CHANGELOG.md
# src/media-understanding/apply.test.ts
# src/media-understanding/apply.ts
* fix: repair malformed tool calls and session transcripts (#7473) (thanks @justinhuangcode)
(cherry picked from commit cfd6b21d0eb6d98c8d122bc897b226ece0751ce2)
# Conflicts:
# CHANGELOG.md
* fix: harden exec allowlist parsing
(cherry picked from commit d1ecb46076145deb188abcba8f0699709ea17198)
# Conflicts:
# src/infra/exec-approvals.ts
* fix: error handling in restore failure reporting
(cherry picked from commit e9f182def70a6a692e258c4529780ad9b2d4c2a0)
# Conflicts:
# src/terminal/restore.ts
* Fix build regressions after merge
(cherry picked from commit 23cfcd60df5418bf16c374cf8132854d3f9b8c45)
# Conflicts:
# src/config/zod-schema.ts
# src/memory/manager.ts
# src/memory/types.ts
* fix: make QMD cache key deterministic
(cherry picked from commit d0b98c75e574852e53894eabd98f5b91ca631c3f)
# Conflicts:
# src/memory/search-manager.ts
* fix: derive citations chat type via session parser
(cherry picked from commit edd6289f26f19b4c03f0626b6295e934eca3ba95)
# Conflicts:
# src/agents/tools/memory-tool.citations.test.ts
# src/agents/tools/memory-tool.ts
* fix: restore session_status and CLI examples
(cherry picked from commit 7d5ca1176d0ef8a7bc4fd50b0b39006b82dcf75f)
* fix: restore safety + session_status hints
(cherry picked from commit afbb1af6c5d875a17b4b63883d3bb7aa42f8e415)
# Conflicts:
# src/agents/system-prompt.ts
* fix: changelog entry for QMD memory (#3160) (thanks @vignesh07)
(cherry picked from commit 1ee57cf7277ec70043dfca8a0747909ab7207950)
# Conflicts:
# CHANGELOG.md
* fix: Remove `tsconfig.oxlint.json` AGAIN.
(cherry picked from commit 425003417dff3a2b57af05bc352f22d9e98b1b15)
# Conflicts:
# .oxlintrc.json
# package.json
# src/media-understanding/providers/google/video.test.ts
# src/telegram/bot.media.downloads-media-file-path-no-file-download.test.ts
# src/web/auto-reply.web-auto-reply.compresses-common-formats-jpeg-cap.test.ts
# src/web/auto-reply.web-auto-reply.falls-back-text-media-send-fails.test.ts
# tsdown.config.ts
* fix: Fix Mac app build step.
(cherry picked from commit be4f7ef361a88cf3a46faf5338d99f1543d32902)
# Conflicts:
# scripts/package-mac-app.sh
* fix: harden Windows exec allowlist
(cherry picked from commit a7f4a53ce80c98ba1452eb90802d447fca9bf3d6)
* fix: restore OpenClaw docs/source links in system prompt
(cherry picked from commit 9d2066bd53f675d525187732c162ec702b433e3d)
# Conflicts:
# src/agents/system-prompt.ts
* fix: harden control ui framing + ws origin
(cherry picked from commit 66d8117d4483df542d450b9f4bb6dd2a2b769046)
# Conflicts:
# src/config/schema.ts
# src/config/types.gateway.ts
# src/config/zod-schema.ts
# src/gateway/control-ui.test.ts
# src/gateway/control-ui.ts
# src/gateway/server/ws-connection/message-handler.ts
* fix: use build-info for version fallback
(cherry picked from commit a9bb96ade321073914f12f640d82e09ffd4cba14)
# Conflicts:
# src/version.ts
* fix: improve build-info resolution for commit/version
(cherry picked from commit e895e85f5488f85e007940b46829d779b04b29f7)
# Conflicts:
# CHANGELOG.md
# package.json
* fix: enforce Nextcloud Talk allowlist by user id
(cherry picked from commit 6b4b6049b47c3329a7014509594647826669892d)
* fix: add legacy daemon-cli shim for updates
(cherry picked from commit 9c5941ba466b86e3056b6743cd6d4fc554b13e8d)
# Conflicts:
# package.json
* fix: honor telegram model overrides in buttons (#8193) (thanks @gildo)
(cherry picked from commit 41a4f1200bb10672ebbf578d29a430342cd7a153)
# Conflicts:
# CHANGELOG.md
# src/telegram/bot-handlers.ts
* fix: keep Moonshot CN base URL in onboarding (#7180) (thanks @waynelwz)
(cherry picked from commit 4a5d36892691ae70b63bbf9dae6fb6b48a4b2553)
# Conflicts:
# CHANGELOG.md
# src/commands/auth-choice.apply.api-providers.ts
# src/commands/onboard-auth.config-core.ts
* fix: harden voice-call webhook verification
(cherry picked from commit a749db9820eb6d6224032a5a34223d286d2dcc2f)
# Conflicts:
# CHANGELOG.md
# extensions/voice-call/src/config.ts
# extensions/voice-call/src/providers/plivo.ts
# extensions/voice-call/src/providers/twilio.ts
# extensions/voice-call/src/runtime.ts
# extensions/voice-call/src/webhook-security.ts
* fix: cron announce delivery path (#8540) (thanks @tyler6204)
(cherry picked from commit 6341819d74c1d9f4664ac40c33fec79b70dd56b9)
# Conflicts:
# docs/automation/cron-jobs.md
# src/cron/isolated-agent.delivers-response-has-heartbeat-ok-but-includes.test.ts
# src/cron/isolated-agent.skips-delivery-without-whatsapp-recipient-besteffortdeliver-true.test.ts
# src/cron/isolated-agent/run.ts
# src/cron/service/timer.ts
# ui/src/ui/format.test.ts
* fix: trim legacy signature fallback, type fromChatType as union
(cherry picked from commit b2361292e7a7c12fc2b874b05013ef3183b5597a)
# Conflicts:
# src/telegram/bot/helpers.test.ts
# src/telegram/bot/helpers.ts
* fix: telegram forward metadata + cron delivery guard (#8392) (thanks @Glucksberg)
(cherry picked from commit 78fd1947228634111a4e2a36f2a7e3c13b321998)
# Conflicts:
# CHANGELOG.md
# src/cron/isolated-agent/run.ts
# src/telegram/bot/helpers.ts
* fix: address review comments
- Use optional timeoutMs parameter (undefined = use config/default)
- Extract DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS to shared constants.ts
- Import constant in client.ts instead of hardcoding
- Re-export constant from probe.ts for backwards compatibility
(cherry picked from commit f633a8cb22302fe62ce3b9d541ac991cd2e7bc22)
# Conflicts:
# src/imessage/client.ts
# src/imessage/monitor/monitor-provider.ts
# src/imessage/probe.ts
* fix: align proxy fetch typing
(cherry picked from commit 19ecdce2751d51b177c47341fc3bbe09759e6ec9)
# Conflicts:
# src/telegram/proxy.ts
* fix: force reload cron store
(cherry picked from commit 6f200ea77f2da9d3ec5b520090a578a4c2ce732f)
# Conflicts:
# src/cron/service/store.ts
* fix: cover anonymous voice allowlist callers (#8104) (thanks @victormier) (#9188)
(cherry picked from commit 0cd47d830f8681339ef76a745397866f4fa1c0f4)
# Conflicts:
# CHANGELOG.md
# extensions/voice-call/src/manager.test.ts
* fix: enforce owner allowlist for commands
(cherry picked from commit 385a7eba3376a4ca65093ce42c6d009c49089c40)
# Conflicts:
# src/auto-reply/command-auth.ts
# src/auto-reply/command-control.test.ts
* fix: infer --auth-choice from API key flags during non-interactive onboarding (#9241)
* fix: infer --auth-choice from API key flags during non-interactive onboarding
When --anthropic-api-key (or other provider key flags) is passed without
an explicit --auth-choice, the auth choice defaults to "skip", silently
discarding the API key. This means the gateway starts without credentials
and fails on every inbound message with "No API key found for provider".
Add inferAuthChoiceFromFlags() to derive the correct auth choice from
whichever provider API key flag was supplied, so credentials are persisted
to auth-profiles.json as expected.
Fixes #8481
* fix: infer auth choice from API key flags (#8484) (thanks @f-trycua)
* refactor: centralize auth choice inference flags (#8484) (thanks @f-trycua)
---------
Co-authored-by: f-trycua <f@trycua.com>
(cherry picked from commit 22927b0834926a4188fb248fa2309aa04b1800ff)
# Conflicts:
# CHANGELOG.md
# src/commands/onboard-non-interactive.cloudflare-ai-gateway.test.ts
# src/commands/onboard-non-interactive/local.ts
* fix: gracefully downgrade xhigh thinking level in cron isolated agent (#9363)
When thinkingDefault is set to "xhigh" but the configured model does not
support it (e.g. Claude), the cron isolated-agent path throws a hard error
causing the job to fail. The interactive chat path already handles this by
silently downgrading to "high".
Apply the same graceful downgrade in the cron path: log a warning and
fall back to "high" instead of crashing.
Co-authored-by: hyf0-agent <hyf0-agent@users.noreply.github.com>
(cherry picked from commit 85246664548b4481f2da2b706dd58157484abe86)
* fix: restore discord owner hint from allowlists
(cherry picked from commit d84eb46467d74e12e7fad63ee2a257ad1473fcd8)
# Conflicts:
# CHANGELOG.md
# src/auto-reply/command-auth.ts
# src/auto-reply/command-control.test.ts
# src/auto-reply/templating.ts
# src/discord/monitor/message-handler.process.ts
* fix: remove unused cron import
(cherry picked from commit 3b40227bc677fb50a7931d5cce00a370a5d405b6)
# Conflicts:
# src/cron/isolated-agent/run.ts
* fix: resolve bundled chrome extension assets (#8914) (thanks @kelvinCB)
(cherry picked from commit 1ee1522daad498a322febaa93e6bc66e84ae0fb0)
# Conflicts:
# CHANGELOG.md
# src/cli/browser-cli-extension.test.ts
# src/cli/browser-cli-extension.ts
* fix: stabilize windows acl tests and command auth registry (#9335) (thanks @M00N7682)
(cherry picked from commit d6cde28c8e33f4908f91a4160fbeb331862a5901)
# Conflicts:
# src/security/windows-acl.test.ts
* fix: resolve discord owner allowFrom matches
(cherry picked from commit a4d1af1b1118c08aef0792b88b33f4a24878d8c5)
* fix: preserve telegram DM topic threadId (#9039) (thanks @lailoo)
(cherry picked from commit f2c5c847bd265701fa7ec3966ff5dc96bdddc5b8)
# Conflicts:
# CHANGELOG.md
* fix: update changelog for help sorting (#8068) (thanks @deepsoumya617)
(cherry picked from commit cf95b2f3f41bd1b5fb8024e3bf073df06993f15e)
# Conflicts:
# CHANGELOG.md
* fix: auto-inject Telegram forum topic threadId in message tool
When using Telegram DM topics (forum topics), messages sent via the
message tool (media, buttons, etc.) land in General Topic instead of
the user's current topic. This happens because Slack has
resolveSlackAutoThreadId for auto-threading but Telegram had no
equivalent.
Add resolveTelegramAutoThreadId that mirrors the Slack pattern:
- When channel is telegram and no explicit threadId is provided
- Check if toolContext.currentThreadTs (the topic ID) is set
- Verify the target matches the originating chat
- Inject the threadId into params so the Telegram plugin action
handler picks it up for sendMessage/sendMedia
The subagent announce path already correctly passes threadId via
requesterOrigin (set from agentThreadId in sessions-spawn-tool),
so no changes needed there.
(cherry picked from commit eef247b7a4bcbac0ef43d70f6ecbab5a97dc8a9b)
# Conflicts:
# src/infra/outbound/message-action-runner.ts
* fix: pass threadId/to/accountId from parent to subagent gateway call
When spawning a subagent, the requesterOrigin's threadId, to, and
accountId were not forwarded to the callGateway({method:'agent'}) params.
This meant the subagent's runContext had no currentThreadTs or
currentChannelId, so resolveTelegramAutoThreadId could not auto-inject
the forum topic thread ID when the subagent used the message tool.
Changes:
- sessions-spawn-tool: pass to, accountId, threadId from requesterOrigin
- run-context: populate currentChannelId from opts.to as fallback
Fixes subagent messages landing in General Topic instead of the correct
Telegram DM topic thread.
(cherry picked from commit a13efbe2b5818a2ebf632afa591f94fb8c108a78)
* fix: telegram topic auto-threading — use parseTelegramTarget, add tests (#7235) (thanks @Lukavyi)
(cherry picked from commit 01db1dde1ad77392c96ff0e3d9be72d5146a9e91)
# Conflicts:
# CHANGELOG.md
# src/agents/sessions-spawn-threadid.test.ts
# src/infra/outbound/message-action-runner.threading.test.ts
# src/infra/outbound/message-action-runner.ts
* fix: remove orphaned tool_results during compaction pruning
When pruneHistoryForContextShare drops chunks of messages, it could drop
an assistant message with tool_use blocks while leaving corresponding
tool_result messages in the kept portion. These orphaned tool_results
cause Anthropic's API to reject the session with 'unexpected tool_use_id'.
Fix by calling repairToolUseResultPairing after each chunk drop to clean
up any orphaned tool_results. This reuses existing battle-tested code
from session-transcript-repair.ts.
Fixes #9769, #9724, #9672
(cherry picked from commit f32eeae3bc00ab3e8b6b0e33fe61336449d3b196)
# Conflicts:
# CHANGELOG.md
* fix cron scheduling and reminder delivery regressions (#9733)
* fix(cron): prevent timer from allowing process exit (fixes #9694)
The cron timer was using .unref(), which caused the Node.js event
loop to exit or sleep if no other handles were active. This prevented
cron jobs from firing in some environments.
* fix(cron): infer delivery target for isolated jobs (fixes #9683)
When creating isolated agentTurn jobs (e.g. reminders) without explicit
delivery options, the job would default to 'announce' but fail to
resolve the target conversation. Now, we infer the channel and
recipient from the agent's current session key.
* fix(cron): enhance delivery inference for threaded sessions and null inputs (#9733)
Improves the delivery inference logic in the cron tool to correctly handle threaded session keys and cases where delivery is explicitly set to null. This ensures that the appropriate delivery mode and target are inferred based on the agent's session key, enhancing the reliability of job execution.
* fix: preserve telegram topic delivery inference (#9733) (thanks @tyler6204)
* fix: simplify cron delivery merge spread (#9733) (thanks @tyler6204)
(cherry picked from commit 821520a05718b58bb47c88ba329e3bc01d755514)
# Conflicts:
# src/agents/tools/cron-tool.ts
* fix: clear stale token metrics on /new and /reset (#8929)
When starting a new session via /new or /reset, the token usage fields
(totalTokens, inputTokens, outputTokens, contextTokens) survived from the
previous session via the spread pattern in session init. This caused /status
to display misleading context usage from the old session.
Clear all four token metrics explicitly in the isNewSession block, alongside
the existing compactionCount reset. Also add diagnostic logging for session
forking via ParentSessionKey to help trace context inheritance.
(cherry picked from commit 93b450349f77fa2521c7948a724a6ffdaeaeb09f)
* fix: allow multiple compaction retries on context overflow (#8928)
Previously, overflowCompactionAttempted was a boolean flag set once, preventing
recovery when a single compaction wasn't enough. Change to a counter allowing up
to 3 attempts before giving up. Also add diagnostic logging on overflow events to
help debug early-overflow issues.
Fixes sessions that hit context overflow during long agentic turns with many tool
calls, where one compaction round isn't sufficient to bring context below limits.
(cherry picked from commit 4e1a7cd60cc78ce0b3b1790a2e5b96a7a8deddc4)
* Fix: Enable scrolling on the dashboard config page (#1822)
* Fix: Enable scrolling in dashboard
* Fix: Enable scrolling in dashboard
* Fix: Enable scrolling in dashboard
(cherry picked from commit cefd87f3557ce7bee0550050f39349ebe5c8bd10)
* fix: normalize xhigh aliases and docs sync (#9976)
(cherry picked from commit de7b2ba7d523e37521d4acc7cc682dbc5ecebd74)
# Conflicts:
# docs/tools/thinking.md
* fix: release session locks on process termination (#1962)
Adds cleanup handlers to release held file locks when the process
terminates via SIGTERM, SIGINT, or normal exit. This prevents orphaned
lock files that would block future sessions.
Fixes #1951
(cherry picked from commit ec0728b3574f115c83fd458967ea9493f388c647)
* fix: untrack dist/control-ui build artifacts (#1856)
The dist/control-ui/ files were committed before the dist/ gitignore
rule was effective. These build artifacts get regenerated during
builds, causing dirty repo errors that block the auto-update mechanism.
Removes the files from git tracking while keeping them locally and
respecting the existing dist/ gitignore entry.
Fixes #1838
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 3ad7958365485db2179fb98658b939206f930ff9)
* fix: wire onToolResult callback for verbose tool summaries (#2022)
HOTFIX: Tool summaries were not being sent to chat channels when verbose mode
was enabled. The onToolResult callback was defined in the types but never
wired up in dispatch-from-config.ts.
This adds the missing callback alongside onBlockReply, using the same
dispatcher.sendBlockReply() path to deliver tool summaries to WhatsApp,
Telegram, and other chat channels.
Fixes verbose tool summaries not appearing in WhatsApp despite /verbose on.
(cherry picked from commit 05b28c147d5d27be3b751d4d7d1d735b21a4296c)
* fix: Gateway canvas host bypasses auth and serves files unauthenticated
(cherry picked from commit 47538bca4d8ac702c7545b218e183fced155dfff)
# Conflicts:
# src/gateway/server-http.ts
* fix: `onToolResult` fallback is not expected.
(cherry picked from commit 8abce8a84dc93ddd474fb7067bcb13a8794805ea)
* fix: Do not `process.exit(0)` in the middle of a test.
(cherry picked from commit f16e32b73d321a0571a16f94ab226487e4f3f060)
* fix: silence unused hook token url param (#9436)
* fix: Gateway authentication token exposed in URL query parameters
* fix: silence unused hook token url param
* fix: remove gateway auth tokens from URLs (#9436) (thanks @coygeek)
* test: fix Windows path separators in audit test (#9436)
---------
Co-authored-by: George Pickett <gpickett00@gmail.com>
(cherry picked from commit 717129f7f9b21dd919a990f06c26008c63863f3d)
# Conflicts:
# docs/gateway/configuration.md
# docs/help/faq.md
# docs/platforms/exe-dev.md
# docs/start/clawd.md
# docs/web/dashboard.md
# src/commands/dashboard.ts
# src/gateway/hooks.ts
# src/gateway/server-http.ts
# src/wizard/onboarding.finalize.ts
# ui/src/ui/app-settings.ts
# ui/src/ui/views/overview.ts
* fix: add fallback for Control UI asset resolution in global installs
(cherry picked from commit 72245855e5fea3dbf1026ea282dcc91e621ace4b)
# Conflicts:
# CHANGELOG.md
# src/infra/control-ui-assets.ts
* fix: remove dead restore control-ui step from update runner
(cherry picked from commit b40da2cb7aa4643c5f3cc36a66b01db9aac6e666)
* fix: CLI harden update restart imports and fix nested bundle version resolution
(cherry picked from commit 4a59b7786be7a98492358b3cc837c1f7cbe40e72)
# Conflicts:
# src/cli/update-cli.ts
# src/version.ts
* fix: guard resolveUserPath against undefined input (#10176)
* fix: guard resolveUserPath against undefined input
When subagent spawner omits workspaceDir, resolveUserPath receives
undefined and crashes on .trim(). Add a falsy guard that falls back
to process.cwd(), matching the behavior callers already expect.
Closes #10089
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: harden runner workspace fallback (#10176) (thanks @Yida-Dev)
* fix: harden workspace fallback scoping (#10176) (thanks @Yida-Dev)
* refactor: centralize workspace fallback classification and redaction (#10176) (thanks @Yida-Dev)
* test: remove explicit any from utils mock (#10176) (thanks @Yida-Dev)
* security: reject malformed agent session keys for workspace resolution (#10176) (thanks @Yida-Dev)
---------
Co-authored-by: Yida-Dev <reyifeijun@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Gustavo Madeira Santana <gumadeiras@gmail.com>
(cherry picked from commit 421644940517ae1857281bddf8603aeef9cebf1c)
# Conflicts:
# CHANGELOG.md
# src/agents/cli-runner.test.ts
# src/agents/cli-runner.ts
# src/agents/pi-embedded-runner/run.ts
# src/agents/pi-embedded-runner/run/attempt.ts
# src/auto-reply/reply/agent-runner-execution.ts
# src/commands/status-all/channels.ts
# src/utils.test.ts
* fix(hooks): replace debug console.log with proper subsystem logging in session-memory (#10730)
* fix: replace debug console.log with proper subsystem logging in session-memory
* fix(hooks): normalize session-memory subsystem logging
---------
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
(cherry picked from commit 2c8af78d20d4d1f9d2a1151fc1ff15bfec847a3d)
* fix: cron scheduler reliability, store hardening, and UX improvements (#10776)
* refactor: update cron job wake mode and run mode handling
- Changed default wake mode from 'next-heartbeat' to 'now' in CronJobEditor and related CLI commands.
- Updated cron-tool tests to reflect changes in run mode, introducing 'due' and 'force' options.
- Enhanced cron-tool logic to handle new run modes and ensure compatibility with existing job structures.
- Added new tests for delivery plan consistency and job execution behavior under various conditions.
- Improved normalization functions to handle wake mode and session target casing.
This refactor aims to streamline cron job configurations and enhance the overall user experience with clearer defaults and improved functionality.
* test: enhance cron job functionality and UI
- Added tests to ensure the isolated agent correctly announces the final payload text when delivering messages via Telegram.
- Implemented a new function to pick the last deliverable payload from a list of delivery payloads.
- Enhanced the cron service to maintain legacy "every" jobs while minute cron jobs recompute schedules.
- Updated the cron store migration tests to verify the addition of anchorMs to legacy every schedules.
- Improved the UI for displaying cron job details, including job state and delivery information, with new styles and layout adjustments.
These changes aim to improve the reliability and user experience of the cron job system.
* test: enhance sessions thinking level handling
- Added tests to verify that the correct thinking levels are applied during session spawning.
- Updated the sessions-spawn-tool to include a new parameter for overriding thinking levels.
- Enhanced the UI to support additional thinking levels, including "xhigh" and "full", and improved the handling of current options in dropdowns.
These changes aim to improve the flexibility and accuracy of thinking level configurations in session management.
* feat: enhance session management and cron job functionality
- Introduced passthrough arguments in the test-parallel script to allow for flexible command-line options.
- Updated session handling to hide cron run alias session keys from the sessions list, improving clarity.
- Enhanced the cron service to accurately record job start times and durations, ensuring better tracking of job execution.
- Added tests to verify the correct behavior of the cron service under various conditions, including zero-delay timers.
These changes aim to improve the usability and reliability of session and cron job management.
* feat: implement job running state checks in cron service
- Added functionality to prevent manual job runs if a job is already in progress, enhancing job management.
- Updated the `isJobDue` function to include checks for running jobs, ensuring accurate scheduling.
- Enhanced the `run` function to return a specific reason when a job is already running.
- Introduced a new test case to verify the behavior of forced manual runs during active job execution.
These changes aim to improve the reliability and clarity of cron job execution and management.
* feat: add session ID and key to CronRunLogEntry model
- Introduced `sessionid` and `sessionkey` properties to the `CronRunLogEntry` struct for enhanced tracking of session-related information.
- Updated the initializer and Codable conformance to accommodate the new properties, ensuring proper serialization and deserialization.
These changes aim to improve the granularity of logging and session management within the cron job system.
* fix: improve session display name resolution
- Updated the `resolveSessionDisplayName` function to ensure that both label and displayName are trimmed and default to an empty string if not present.
- Enhanced the logic to prevent returning the key if it matches the label or displayName, improving clarity in session naming.
These changes aim to enhance the accuracy and usability of session display names in the UI.
* perf: skip cron store persist when idle timer tick produces no changes
recomputeNextRuns now returns a boolean indicating whether any job
state was mutated. The idle path in onTimer only persists when the
return value is true, eliminating unnecessary file writes every 60s
for far-future or idle schedules.
* fix: prep for merge - explicit delivery mode migration, docs + changelog (#10776) (thanks @tyler6204)
(cherry picked from commit d90cac990c8f9864d2bcb0f3605a057fad2003cf)
# Conflicts:
# CHANGELOG.md
# docs/automation/cron-jobs.md
# scripts/test-parallel.mjs
# src/agents/openclaw-tools.subagents.sessions-spawn-applies-thinking-default.test.ts
# src/cli/cron-cli/register.cron-add.ts
# src/cron/delivery.ts
# src/cron/isolated-agent.skips-delivery-without-whatsapp-recipient-besteffortdeliver-true.test.ts
# src/cron/isolated-agent/run.ts
# src/cron/normalize.ts
# src/cron/run-log.ts
# src/cron/service.every-jobs-fire.test.ts
# src/cron/service.skips-main-jobs-empty-systemevent-text.test.ts
# src/cron/service.store.migration.test.ts
# src/cron/service/jobs.ts
# src/cron/service/store.ts
# src/cron/service/timer.ts
# src/cron/store.ts
# src/gateway/protocol/schema/cron.ts
# src/gateway/session-utils.ts
# ui/src/ui/app-defaults.ts
# ui/src/ui/app-render.helpers.ts
# ui/src/ui/app-render.ts
# ui/src/ui/format.test.ts
# ui/src/ui/format.ts
# ui/src/ui/views/cron.ts
# ui/src/ui/views/sessions.ts
* fix: comprehensive BlueBubbles and channel cleanup (#11093)
* feat(bluebubbles): auto-strip markdown from outbound messages (#7402)
* fix(security): add timeout to webhook body reading (#6762)
Adds 30-second timeout to readBody() in voice-call, bluebubbles, and nostr
webhook handlers. Prevents Slow-Loris DoS (CWE-400, CVSS 7.5).
Merged with existing maxBytes protection in voice-call.
* fix(security): unify Error objects and lint fixes in webhook timeouts (#6762)
* fix: prevent plugins from auto-enabling without user consent (#3961)
Changes default plugin enabled state from true to false in enablePluginEntry().
Preserves existing enabled:true values. Fixes #3932.
* fix: apply hierarchical mediaMaxMb config to all channels (#8749)
Generalizes resolveAttachmentMaxBytes() to use account → channel → global
config resolution for all channels, not just BlueBubbles. Fixes #7847.
* fix(bluebubbles): sanitize attachment filenames against header injection (#10333)
Strip ", \r, \n, and \\ from filenames after path.basename() to prevent
multipart Content-Disposition header injection (CWE-93, CVSS 5.4).
Also adds sanitization to setGroupIconBlueBubbles which had zero filename
sanitization.
* fix(lint): exclude extensions/ from Oxlint preflight check (#9313)
Extensions use PluginRuntime|null patterns that trigger
no-redundant-type-constituents because PluginRuntime resolves to any.
Excluding extensions/ from Oxlint unblocks user upgrades.
Re-applies the approach from closed PR #10087.
* fix(bluebubbles): add tempGuid to createNewChatWithMessage payload (#7745)
Non-Private-API mode (AppleScript) requires tempGuid in send payloads.
The main sendMessageBlueBubbles already had it, but createNewChatWithMessage
was missing it, causing 400 errors for new chat creation without Private API.
* fix: send stop-typing signal when run ends with NO_REPLY (#8785)
Adds onCleanup callback to the typing controller that fires when the
controller is cleaned up while typing was active (e.g., after NO_REPLY).
Channels using createTypingCallbacks automatically get stop-typing on
cleanup. This prevents the typing indicator from lingering in group chats
when the agent decides not to reply.
* fix(telegram): deduplicate skill commands in multi-agent setup (#5717)
Two fixes:
1. Skip duplicate workspace dirs when listing skill commands across agents.
Multiple agents sharing the same workspace would produce duplicate commands
with _2, _3 suffixes.
2. Clear stale commands via deleteMyCommands before registering new ones.
Commands from deleted skills now get cleaned up on restart.
* fix: add size limits to unbounded in-memory caches (#4948)
Adds max-size caps with oldest-entry eviction to prevent OOM in
long-running deployments:
- BlueBubbles serverInfoCache: 64 entries (already has TTL)
- Google Chat authCache: 32 entries
- Matrix directRoomCache: 1024 entries
- Discord presenceCache: 5000 entries per account
* fix: address review concerns (#11093)
- Chain deleteMyCommands → setMyCommands to prevent race condition (#5717)
- Rename enablePluginEntry to registerPluginEntry (now sets enabled: false)
- Add Slow-Loris timeout test for readJsonBody (#6023)
(cherry picked from commit 1007d71f0cece18ca74d2a2bc7ab3b88c734f75e)
# Conflicts:
# extensions/bluebubbles/src/chat.ts
# extensions/bluebubbles/src/send.ts
# extensions/voice-call/src/webhook.ts
# src/auto-reply/skill-commands.ts
# src/config/plugin-auto-enable.ts
* fix: add .caf to AUDIO_FILE_EXTENSIONS (#10982)
* fix: add .caf to AUDIO_FILE_EXTENSIONS for iMessage voice messages
* fix: add caf audio extension regression coverage (#10982) (thanks @succ985)
---------
Co-authored-by: succ985 <succ985@users.noreply.github.com>
Co-authored-by: Gustavo Madeira Santana <gumadeiras@gmail.com>
(cherry picked from commit b8f740fb148cce8e56191114c583859b6393bf61)
# Conflicts:
# CHANGELOG.md
# src/media/mime.test.ts
* fix: recover from context overflow caused by oversized tool results (#11579)
* fix: gracefully handle oversized tool results causing context overflow
When a subagent reads a very large file or gets a huge tool result (e.g.,
gh pr diff on a massive PR), it can exceed the model's context window in
a single prompt. Auto-compaction can't help because there's no older
history to compact — just one giant tool result.
This adds two layers of defense:
1. Pre-emptive: Hard cap on tool result size (400K chars ≈ 100K tokens)
applied in the session tool result guard before persistence. This
prevents extremely large tool results from being stored in full,
regardless of model context window size.
2. Recovery: When context overflow is detected and compaction fails,
scan session messages for oversized tool results relative to the
model's actual context window (30% max share). If found, truncate
them in the session via branching (creating a new branch with
truncated content) and retry the prompt.
The truncation preserves the beginning of the content (most useful for
understanding what was read) and appends a notice explaining the
truncation and suggesting offset/limit parameters for targeted reads.
Includes comprehensive tests for:
- Text truncation with newline-boundary awareness
- Context-window-proportional size calculation
- In-memory message truncation
- Oversized detection heuristics
- Guard-level size capping during persistence
* fix: prep fixes for tool result truncation PR (#11579) (thanks @tyler6204)
(cherry picked from commit 0deb8b0da187ed3a5ca1b0dc37736548795fbe31)
# Conflicts:
# src/agents/pi-embedded-runner/run.ts
# src/agents/session-tool-result-guard.test.ts
# src/agents/session-tool-result-guard.ts
* Memory: add SQLITE_BUSY fallback regression test
(cherry picked from commit 95263f4e60e734709cfd53ac45aa84d1a81fc108)
# Conflicts:
# src/memory/search-manager.test.ts
* fix: use STATE_DIR instead of hardcoded ~/.openclaw for identity and canvas (#4824)
* fix: use STATE_DIR instead of hardcoded ~/.openclaw for identity and canvas
device-identity.ts and canvas-host/server.ts used hardcoded
path.join(os.homedir(), '.openclaw', ...) ignoring OPENCLAW_STATE_DIR
env var and the resolveStateDir() logic from config/paths.ts.
This caused ~/.openclaw/identity and ~/.openclaw/canvas directories
to be created even when state dir was overridden or resided elsewhere.
* fix: format and remove duplicate imports
* fix: scope state-dir patch + add regression tests (#4824) (thanks @kossoy)
* fix: align state-dir fallbacks in hooks and agent paths (#4824) (thanks @kossoy)
---------
Co-authored-by: Gustavo Madeira Santana <gumadeiras@gmail.com>
(cherry picked from commit ebe57304016aaadf69c0357d49ec1e36df6a5daa)
# Conflicts:
# CHANGELOG.md
# src/agents/agent-scope.ts
# src/agents/sandbox/constants.ts
# src/canvas-host/server.ts
# src/cli/update-cli.ts
# src/commands/agents.test.ts
# src/hooks/bundled/command-logger/handler.ts
# src/hooks/bundled/session-memory/handler.ts
# src/infra/device-identity.ts
* fix: context overflow compaction and subagent announce improvements (#11664) (thanks @tyler6204)
* initial commit
* feat: implement deriveSessionTotalTokens function and update usage tests
* Added deriveSessionTotalTokens function to calculate total tokens based on usage and context tokens.
* Updated usage tests to include cases for derived session total tokens.
* Refactored session usage calculations in multiple files to utilize the new function for improved accuracy.
* fix: restore overflow truncation fallback + changelog/test hardening (#11551) (thanks @tyler6204)
(cherry picked from commit 191da1feb52e2cb164c6d1212c0dd133ae3f9198)
# Conflicts:
# CHANGELOG.md
# scripts/test-parallel.mjs
# src/agents/clawdbot-tools.subagents.sessions-spawn-normalizes-allowlisted-agent-ids.test.ts
# src/agents/pi-embedded-runner/run.overflow-compaction.test.ts
# src/agents/pi-embedded-runner/run.ts
# src/agents/pi-embedded-runner/run/types.ts
# src/agents/pi-embedded-subscribe.handlers.messages.ts
# src/agents/subagent-announce.format.test.ts
# src/agents/subagent-announce.ts
# src/agents/subagent-registry.ts
# src/agents/timeout.ts
# src/agents/usage.test.ts
# src/commands/agent/session-store.ts
# ui/src/styles/components.css
# ui/src/ui/views/chat.ts
---------
Co-authored-by: Clawdbot <lukavyi@me.com>
Co-authored-by: Ayaan Zaidi <zaidi@uplause.io>
Co-authored-by: Conroy Whitney <konreu@gmail.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Co-authored-by: Shakker <shakkerdroid@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Ayush Ojha <ayushgreat10@gmail.com>
Co-authored-by: Ayush Ojha <ayushozha@outlook.com>
Co-authored-by: Gustavo Madeira Santana <gumadeiras@gmail.com>
Co-authored-by: Tyler Yust <64381258+tyler6204@users.noreply.github.com>
Co-authored-by: cpojer <christoph.pojer@gmail.com>
Co-authored-by: Jhin <jhin@summonai.org>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
Co-authored-by: clawdinator[bot] <253378751+clawdinator[bot]@users.noreply.github.com>
Co-authored-by: Evan <evan@iamevan.dev>
Co-authored-by: Sk Akram <skcodewizard786@gmail.com>
Co-authored-by: Marco Marandiz <admin-marco@Mac.lan>
Co-authored-by: Elarwei <elarweis@gmail.com>
Co-authored-by: Ji <jizhang.work@gmail.com>
Co-authored-by: Benjamin Jesuiter <bjesuiter@gmail.com>
Co-authored-by: Vignesh Natarajan <vigneshnatarajan92@gmail.com>
Co-authored-by: Glucksberg <markuscontasul@gmail.com>
Co-authored-by: Yudong Han <hanyd@pku.edu.cn>
Co-authored-by: Gustavo Madeira Santana <gumadeiras@users.noreply.github.com>
Co-authored-by: hyf0-agent <ada.20260202@outlook.com>
Co-authored-by: hyf0-agent <hyf0-agent@users.noreply.github.com>
Co-authored-by: Christian Klotz <hello@christianklotz.co.uk>
Co-authored-by: Glucksberg <80581902+Glucksberg@users.noreply.github.com>
Co-authored-by: Daijiro Miyazawa <dxd5001@gmail.com>
Co-authored-by: Darshil <ddhameliya@mail.sfsu.edu>
Co-authored-by: Sash Zats <sash@zats.io>
Co-authored-by: zerone0x <hi@trine.dev>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: adam91holt <mail@adamholt.co.nz>
Co-authored-by: Coy Geek <65363919+coygeek@users.noreply.github.com>
Co-authored-by: Yida-Dev <92713555+Yida-Dev@users.noreply.github.com>
Co-authored-by: Shadril Hassan Shifat <63901551+shadril238@users.noreply.github.com>
Co-authored-by: succ985 <3186520056@qq.com>
Co-authored-by: Oleg Kossoy <oleg.kossoy@gmail.com>
Co-authored-by: hughdidit <hugh.chapman@hughdidit.com>
hughdidit
added a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 1, 2026
* Fix missing before_tool_call hook integration (#6570)
* Fix missing before_tool_call hook integration
- Add hook call in handleToolExecutionStart before tool execution begins
- Support parameter modification via hookResult.params
- Support tool call blocking via hookResult.block with custom blockReason
- Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag
- Maintain tool event consistency by emitting start/end events when blocked
- Addresses GitHub issue #6535 (1 of 8 unimplemented hooks now working)
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
* Add comprehensive test suite for before_tool_call hook
- 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling
- Tests tool name normalization and different argument types
- Verifies proper error re-throwing and logging behavior
- Maintained in fork for regression testing
* Fix all issues identified by Greptile code review
Address P0/P1/P3 bugs:
P0 - Fix parameter mutation crash for non-object args:
- Normalize args to objects before passing to hooks (maintains hook contract)
- Handle parameter merging safely for both object and non-object args
P1 - Add missing internal state updates when blocking tools:
- Set toolMetaById metadata like normal flow
- Call onAgentEvent callback to maintain consistency
- Emit events in same order as normal tool execution
P1 - Fix test expectations to match implementation reality:
- Non-object args normalized to {} for hook params (not passed as-is)
- Add test for safe parameter modification with various arg types
- Update mocks to verify state updates when blocking
P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class:
- More robust error handling without property collision risk
- Cleaner control flow that's serialization-safe
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
(cherry picked from commit 6c6f1e9660bd81424a25a9a4d1a9c66b9bae5a6c)
* feat: extend CreateAgentSessionOptions with new properties
- Added systemPrompt for overriding the default system prompt.
- Introduced skills for pre-loaded skills management.
- Added contextFiles for handling pre-loaded context files with path and content attributes.
(cherry picked from commit bcbb4473573d89beb9a2e028db05d59325a0d74e)
* feat: update chat layout and session management
- Added max-width to chat controls and session select for better layout.
- Increased CHAT_SESSIONS_ACTIVE_MINUTES from 10 to 120 for extended session duration.
- Changed brand logo source to a local favicon for improved asset management.
(cherry picked from commit f8575c401cc0577f905b9efa320bbd50fff1ac2e)
# Conflicts:
# ui/src/ui/app-render.ts
* require TLS 1.3 as minimum
TLS 1.2 is not getting any protocol update anytime soon.
https://www.ietf.org/archive/id/draft-ietf-tls-tls12-frozen-08.html
(cherry picked from commit a2b00495cdcea73dc24e3f2908ede32778b20264)
* fix(tlon): add timeout to SSE client fetch calls (CWE-400) (#5926)
Add timeout protection to prevent indefinite hangs when Urbit server
becomes unresponsive or network partition occurs.
Changes:
- Add AbortSignal.timeout(30_000) to 7 one-shot fetch calls
- Add AbortController with 60s connection timeout to SSE stream fetch
(clears timeout after headers received to avoid aborting active stream)
Affected methods: sendSubscription, connect, openStream, poke, scry, close
Fixes #5266
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit 411d5fda587c5ae44735550f9a23fe224de5da9f)
* Gateway: avoid writing host config in tools invoke test
(cherry picked from commit 476f367cf16081acd144048ee61198e58d15df21)
# Conflicts:
# src/gateway/tools-invoke-http.test.ts
* Docs: fix Moonshot sync markers (#6789)
* Docs: fix Moonshot sync markers
* Docs: use MDX comment markers for Moonshot sync
* Docs: use markdown comment markers for Moonshot sync
* Docs: hide Moonshot sync markers in MDX
(cherry picked from commit b9910ab03713d2598a5d4fcbf95c9dc935064b68)
# Conflicts:
# docs/providers/moonshot.md
* chore: lint the `ui` folder.
(cherry picked from commit 5ba4586e587fc4a378e2791b240aff3a9c6aa666)
# Conflicts:
# ui/src/ui/app-gateway.ts
# ui/src/ui/app-polling.ts
# ui/src/ui/app-settings.ts
# ui/src/ui/controllers/chat.ts
* chore: Manually fix lint issues in `ui`.
(cherry picked from commit e9a32b83c2b59392585e25caee61ddd073b0f6ef)
# Conflicts:
# ui/src/ui/app-gateway.ts
# ui/src/ui/app-polling.ts
# ui/src/ui/app-render.ts
# ui/src/ui/app-settings.ts
# ui/src/ui/chat-markdown.browser.test.ts
# ui/src/ui/controllers/chat.ts
# ui/src/ui/focus-mode.browser.test.ts
# ui/src/ui/navigation.browser.test.ts
# ui/vite.config.ts
* chore: Re-enable `no-redundant-type-constituents` rule.
(cherry picked from commit 87a61c3b88af25dca5a0d422a4155dcf58f9dc54)
* chore: Enable `no-unnecessary-template-expression` lint rule.
(cherry picked from commit baa1e95b9d9401c5916e0218e42196a8edc0e5e2)
* chore: Enable `typescript/no-explicit-any` rule.
(cherry picked from commit 935a0e57083d94590f742c587bdbfbad9ea3139c)
# Conflicts:
# extensions/lobster/src/lobster-tool.test.ts
# src/agents/auth-profiles/oauth.ts
# src/agents/pi-tools.before-tool-call.test.ts
# src/discord/monitor/sender-identity.ts
# src/telegram/draft-stream.test.ts
* fix(telegram): add timeout to file download to prevent DoS (CWE-400)
Add AbortSignal.timeout() to both fetch calls in download.ts to prevent
indefinite hangs when Telegram API is slow or unresponsive.
- getTelegramFile(): 30s timeout for metadata API call
- downloadTelegramFile(): 60s timeout for file download
Both functions now accept optional timeoutMs parameter for configurability.
Fixes #6849
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit d46b489e21c7b6cd9549baa5971d47382ab54b6b)
* Fix subagent announce failover race (always emit lifecycle end + treat timeout=0 as no-timeout) (#6621)
* Fix subagent announce race and timeout handling
Bug 1: Subagent announce fires before model failover retries finish
- Problem: CLI provider emitted lifecycle error on each attempt, causing
subagent registry to prematurely call beginSubagentCleanup() and announce
with incorrect status before failover retries completed
- Fix: Removed lifecycle error emission from CLI provider's attempt-level
.catch() in agent-runner-execution.ts. Errors still propagate to
runWithModelFallback for retry, but no intermediate lifecycle events
are emitted. Only the final outcome (after all retries) emits lifecycle
events.
Bug 2: Hard 600s per-prompt timeout ignores runTimeoutSeconds=0
- Problem: When runTimeoutSeconds=0 (meaning 'no timeout'), the code
returned the default 600s timeout instead of respecting the 0 setting
- Fix: Modified resolveAgentTimeoutMs() to treat 0 as 'no timeout' and
return a very large timeout value (30 days) instead of the default.
This avoids setTimeout issues with Infinity while effectively providing
unlimited time for long-running tasks.
* fix: emit lifecycle:error for CLI failures (#6621) (thanks @tyler6204)
* chore: satisfy format/lint gates (#6621) (thanks @tyler6204)
* fix: restore build after upstream type changes (#6621) (thanks @tyler6204)
* test: fix createSystemPromptOverride tests to match new return type (#6621) (thanks @tyler6204)
(cherry picked from commit 8d2f98fb01a6eb3fdb8b30645917ff4fde971f35)
# Conflicts:
# extensions/bluebubbles/src/monitor.ts
# extensions/matrix/CHANGELOG.md
# extensions/msteams/CHANGELOG.md
# extensions/nostr/CHANGELOG.md
# extensions/twitch/CHANGELOG.md
# extensions/voice-call/CHANGELOG.md
# extensions/zalo/CHANGELOG.md
# extensions/zalouser/CHANGELOG.md
# src/agents/auth-profiles/oauth.ts
# src/agents/pi-embedded-runner/system-prompt.ts
* docs: update appcast for 2026.2.1
(cherry picked from commit d842b28a1517f95aae2a5bcd97f2f726e42b93d8)
# Conflicts:
# appcast.xml
* style: format fetch guard signatures
(cherry picked from commit 1b3f987c4d45906e530c3266d2a7465ad18e3dc7)
* fix(docker): add gateway subcommand and cloud-compatible flags
The Dockerfile CMD runs without arguments, causing the CLI to print
help and exit with code 1. This breaks deployment on container
platforms (Render, Railway, Fly.io, etc.) that rely on the CMD.
Changes:
- Add `gateway` subcommand to start the server
- Add `--allow-unconfigured` to allow startup without config file
- Add `--bind lan` to bind to 0.0.0.0 instead of localhost
(required for container health checks)
Fixes #5685
(cherry picked from commit 1a05ee941e7df648cd8349237cde824341a1bbdb)
* fix(docker): remove --bind lan from default CMD to work out of the box
Addresses review feedback: --bind lan requires auth token, so default
CMD should bind to loopback only.
For container platforms needing LAN binding for health checks:
1. Set OPENCLAW_GATEWAY_TOKEN env var
2. Override CMD: ["node","dist/index.js","gateway","--allow-unconfigured","--bind","lan"]
(cherry picked from commit bb3d7343f4befc45be548ab72890eef62193b020)
* test: cover SSRF blocking for attachment URLs
(cherry picked from commit 39c682219e4f359eeb14cf98e1bbabcf9f504547)
* chore: We have a sleep at home. The sleep at home:
(cherry picked from commit 6b0d6e25405b98f29cbdd0a8b77674b3c294ee73)
# Conflicts:
# src/agents/bash-tools.exec.background-abort.test.ts
# src/agents/bash-tools.process.send-keys.test.ts
# src/agents/claude-cli-runner.test.ts
# src/agents/clawdbot-tools.sessions.test.ts
# src/agents/clawdbot-tools.subagents.sessions-spawn-announces-agent-wait-lifecycle-events.test.ts
# src/agents/clawdbot-tools.subagents.sessions-spawn-normalizes-allowlisted-agent-ids.test.ts
# src/auto-reply/reply/reply-dispatcher.ts
# src/channels/ack-reactions.test.ts
# src/config/sessions.test.ts
# src/slack/monitor/media.ts
# src/web/auto-reply/deliver-reply.ts
* fix(update): harden global updates
(cherry picked from commit 57d008a33d4208c81183384d47f938d69b7c7044)
# Conflicts:
# CHANGELOG.md
# src/infra/update-global.ts
# src/infra/update-runner.ts
* chore: fix broken test.
(cherry picked from commit c429ccb64fc319babf4f8adc95df6d658a2d6b2f)
* fix(telegram): handle Grammy HttpError network failures (#3815) (#7195)
* fix(telegram): handle Grammy HttpError network failures (#3815)
Grammy wraps fetch errors in an .error property (not .cause). Added .error
traversal to collectErrorCandidates in network-errors.ts.
Registered scoped unhandled rejection handler in monitorTelegramProvider
to catch network errors that escape the polling loop (e.g., from setMyCommands
during bot setup). Handler is unregistered when the provider stops.
* fix(telegram): address review feedback for Grammy HttpError handling
- Gate .error traversal on HttpError name to avoid widening search graph
- Use runtime logger instead of console.warn for consistency
- Add isGrammyHttpError check to scope unhandled rejection handler
- Consolidate isNetworkRelatedError into isRecoverableTelegramNetworkError
- Add 'timeout' to recoverable message snippets for full coverage
(cherry picked from commit 99b4f2a24e9ec38ca1624757f7df35459bfa67a0)
# Conflicts:
# src/telegram/monitor.ts
* Docs i18n: harden doc-mode pipeline
(cherry picked from commit e70984745be336cbb9f4bc227a9f9a229d5efa46)
* Docs i18n: tune zh-CN prompt + glossary
What: enforce zh-CN tone (你/你的), Skills/local loopback/Tailscale terms, Gateway网关
Why: keep future translation output consistent with issue feedback
Tests: not run (prompt/glossary change)
(cherry picked from commit 2b1f68c92863589f3a4fa7bf96f242936eec8a5e)
* Tests: stub SSRF DNS pinning (#6619) (thanks @joshp123)
(cherry picked from commit 991ed3ab5843fb808c4c92faafde54dda19b3137)
# Conflicts:
# CHANGELOG.md
# src/media-understanding/providers/google/video.test.ts
* fix(webchat): respect user scroll position during streaming and refresh
- Increase near-bottom threshold from 200px to 450px so one long message
doesn't falsely register as 'near bottom'
- Make force=true only override on initial load (chatHasAutoScrolled=false),
not on subsequent refreshChat() calls
- refreshChat() no longer passes force=true to scheduleChatScroll
- Add chatNewMessagesBelow flag for future 'scroll to bottom' button UI
- Clear chatNewMessagesBelow when user scrolls back to bottom
- Add 13 unit tests covering threshold, force behavior, streaming, and reset
(cherry picked from commit e18f43ddade6cffd178550cdd7c306f841f3b7d6)
* fix(ui): add core state and logic for scroll control
(cherry picked from commit 2af977f947c9f3c9964e0d0fe1b8f371392cfbf1)
# Conflicts:
# ui/src/ui/app.ts
* feat(ui): add new messages indicator button
(cherry picked from commit 13db0489c871ff2b0da3a9d0563524137aecf9e1)
* iOS: stabilize talk mode tests
(cherry picked from commit 78f7e5147becb2d7ee3c8cfa748700bc080aa00c)
* Gateway: fix node invoke receive loop
(cherry picked from commit 84e115834fa27a9954f48d61a794b25b9187e6e4)
# Conflicts:
# apps/ios/Sources/Gateway/GatewayConnectionController.swift
# apps/ios/Sources/Gateway/GatewaySettingsStore.swift
# apps/shared/MoltbotKit/Sources/MoltbotKit/GatewayChannel.swift
# apps/shared/MoltbotKit/Tests/MoltbotKitTests/GatewayNodeInvokeTests.swift
* Gateway: wait for snapshot before connect
(cherry picked from commit a4382607d7a8752ed88ad9fc8ba11fae6bc620c0)
* Agents: add nodes invoke action
(cherry picked from commit d9cadf97377812e53b87a15082c74efc67e5e662)
* iOS: fix node notify and identity
(cherry picked from commit 761188cd1d48527c8039c087b5be820ec0a67691)
# Conflicts:
# apps/ios/Sources/Model/NodeAppModel.swift
# apps/ios/SwiftSources.input.xcfilelist
* iOS: streamline notify timeouts
(cherry picked from commit f72ac60b01f166d3b168f70a56211e11c8d19034)
# Conflicts:
# apps/ios/Sources/Gateway/GatewayConnectionController.swift
# apps/ios/Sources/Model/NodeAppModel.swift
* iOS: add write commands for contacts/calendar/reminders
(cherry picked from commit a884955cd6d442a589e501516a1a5ddd0c91ccf9)
# Conflicts:
# apps/ios/Sources/Calendar/CalendarService.swift
# apps/ios/Sources/Contacts/ContactsService.swift
# apps/ios/Sources/Gateway/GatewayConnectionController.swift
# apps/ios/Sources/Info.plist
# apps/ios/Sources/Model/NodeAppModel.swift
# apps/ios/Sources/Reminders/RemindersService.swift
# apps/ios/Sources/Services/NodeServiceProtocols.swift
# apps/ios/Tests/GatewayConnectionControllerTests.swift
# apps/ios/Tests/NodeAppModelInvokeTests.swift
# apps/shared/OpenClawKit/Sources/OpenClawKit/CalendarCommands.swift
# apps/shared/OpenClawKit/Sources/OpenClawKit/ContactsCommands.swift
# apps/shared/OpenClawKit/Sources/OpenClawKit/RemindersCommands.swift
* iOS: add push-to-talk node commands
(cherry picked from commit 9f101d3a9aaeaefb6873e27bc2a5ef9129c51fd0)
# Conflicts:
# apps/ios/Sources/Gateway/GatewayConnectionController.swift
# apps/ios/Sources/Model/NodeAppModel.swift
# apps/ios/SwiftSources.input.xcfilelist
# apps/ios/Tests/NodeAppModelInvokeTests.swift
* iOS: pause voice wake during PTT
(cherry picked from commit 17b18971f17c4cb4ad0e2d302bf8ac614cc77a42)
* iOS: add PTT once/cancel
(cherry picked from commit 1a48bce2947ea2f0ebd923d790322cb3f5035e0b)
# Conflicts:
# apps/ios/Sources/Gateway/GatewayConnectionController.swift
# apps/ios/Tests/NodeAppModelInvokeTests.swift
* Gateway: add PTT chat + nodes CLI
(cherry picked from commit b7aac92ac4511683c4bf44f4119496227286f909)
# Conflicts:
# src/auto-reply/reply/commands-core.ts
* iOS: wire node commands and incremental TTS
(cherry picked from commit 532b9653beed121300fd5decb18125f73bb1e13d)
# Conflicts:
# apps/ios/Sources/Gateway/GatewayConnectionController.swift
# apps/ios/Sources/Model/NodeAppModel.swift
# apps/ios/Sources/Voice/TalkModeManager.swift
# apps/ios/Tests/NodeAppModelInvokeTests.swift
* iOS: update onboarding and gateway UI
(cherry picked from commit ff6114599ef9f85d4cf50fec5e61053bfd09192d)
# Conflicts:
# apps/ios/Sources/Info.plist
# apps/ios/Sources/Model/NodeAppModel.swift
* Core: update shared gateway models
(cherry picked from commit 37eaca719a68aa1ad9dcbfe83c8a20e88bb6951a)
* iOS: improve gateway auto-connect and voice permissions
(cherry picked from commit 6cd3bc3a46f3b1e7ca38673db236ab11bdd6ff00)
# Conflicts:
# IOS-PRIORITIES.md
# src/auto-reply/reply/commands-core.ts
* Revert "iOS: wire node services and tests"
This reverts commit 7b0a0f3dace575c33dafb61d4a13cdef4dd0d64e.
(cherry picked from commit 4ab814fd50c677c4658418ced2a8fb99a19928d2)
# Conflicts:
# apps/ios/Sources/Gateway/GatewayConnectionController.swift
# apps/ios/Sources/Gateway/GatewaySettingsStore.swift
# apps/ios/Sources/Model/NodeAppModel.swift
# apps/ios/Sources/Voice/TalkModeManager.swift
# apps/ios/SwiftSources.input.xcfilelist
# apps/ios/Tests/GatewayConnectionControllerTests.swift
# apps/ios/Tests/NodeAppModelInvokeTests.swift
# apps/shared/MoltbotKit/Sources/MoltbotKit/GatewayChannel.swift
# apps/shared/MoltbotKit/Tests/MoltbotKitTests/GatewayNodeInvokeTests.swift
# apps/shared/OpenClawKit/Sources/OpenClawKit/Capabilities.swift
# src/auto-reply/reply/commands-core.ts
* Revert "Core: update shared gateway models"
This reverts commit 37eaca719a68aa1ad9dcbfe83c8a20e88bb6951a.
(cherry picked from commit 7113dc21a909970098674e3b04d2c74617e9a307)
* feat(config): default thinking for sessions_spawn subagents (#7372)
* feat(config): add subagent default thinking
* fix: accept config subagents.thinking + stabilize test mocks (#7372) (thanks @tyler6204)
* fix: use findLast instead of clearAllMocks in test (#7372)
* fix: correct test assertions for tool result structure (#7372)
* fix: remove unnecessary type assertion after rebase
(cherry picked from commit 64849e81f5ae96f46fa6f19d65cf5ec8d37c18ed)
# Conflicts:
# CHANGELOG.md
# docs/zh-CN/tools/subagents.md
* refactor: use structural typing instead of instanceof for AbortSignal check
Address P1 review feedback from Greptile: instanceof AbortSignal may be
unreliable across different realms (VM, iframe, etc.) where the AbortSignal
constructor may differ. Use structural typing (checking for aborted property
and addEventListener method) for more robust cross-realm compatibility.
(cherry picked from commit 88e29c728c203eab13b25a46ba9c05ed7443d8f3)
# Conflicts:
# src/agents/pi-tools.abort.ts
* fix(tools): ensure file_path alias passes validation in read/write tools (#7451)
Co-authored-by: lotusfall <lotusfall@outlook.com>
(cherry picked from commit 966228a6a90a5693620a430b2bb299f1bdd7adb9)
* fix(telegram): recover from grammY "timed out" long-poll errors (#7239)
grammY getUpdates returns "Request to getUpdates timed out after 500 seconds"
but RECOVERABLE_MESSAGE_SNIPPETS only had "timeout". Since
"timed out".includes("timeout") === false, the error was not classified as
recoverable, causing the polling loop to exit permanently.
Add "timed out" to RECOVERABLE_MESSAGE_SNIPPETS so the polling loop retries
instead of dying silently.
Fixes #7239
Fixes #7255
(cherry picked from commit c6b4de520af848bdfa577146aa8e2e001c87911d)
* Agent: repair malformed tool calls and session files
(cherry picked from commit 0da6de6624a955785136a676aa99aff6b8f4de95)
# Conflicts:
# src/agents/pi-embedded-runner/google.ts
# src/agents/pi-embedded-runner/run/attempt.ts
# src/agents/session-tool-result-guard.ts
* Agents: fix lint in tool-call sanitizers
(cherry picked from commit 67f90dae543e06d132c81a0aff13329da5931e67)
* Agents: harden session file repair
(cherry picked from commit e6fdac7bfb6d15d8b9b1f347f1039dded9fa35a1)
* Agents: flush pending tool results on drop
(cherry picked from commit befa421a57cf4f83cb220e3032e1847a6d12f365)
* fix(slack): fail closed on slash command channel type lookup
(cherry picked from commit fff59da962145088246864e735c5f3a6f1b67a7f)
# Conflicts:
# CHANGELOG.md
# src/slack/monitor/slash.ts
* fix(gateway): require shared auth before device bypass
(cherry picked from commit fe81b1d7125a014b8280da461f34efbf5f761575)
# Conflicts:
# CHANGELOG.md
* style(ui): format resizable divider
(cherry picked from commit 96ad19a627ba14b5770ee3be8cee37eeae4aa230)
* chore: Fix CI.
(cherry picked from commit e77988f7471d35bc42f0c749dde8140a1cad4e27)
* feat(ui): add Agents dashboard
(cherry picked from commit 2a68bcbeb32e2fa14282639ca17574d48a21fe2d)
# Conflicts:
# src/agents/agent-scope.ts
# src/gateway/server-methods/agents.ts
# src/gateway/server-methods/skills.ts
# ui/src/ui/app-settings.ts
# ui/src/ui/app.ts
* chore: fix CI
(cherry picked from commit ac2b71f24033f7d7b3ba8eb5c46c30c374290815)
* CLI: restore terminal state on exit
(cherry picked from commit 157d6d2db7e004ca4bfa1dfd0142d5bbd6aa8e45)
* Onboarding: keep TUI flow exclusive
(cherry picked from commit 58d5b39c9aa635b08ce08d03ef0f17ec0908e1f2)
# Conflicts:
# CHANGELOG.md
# src/wizard/onboarding.finalize.ts
* feat (memory): Implement new (opt-in) QMD memory backend
(cherry picked from commit 5d3af3bc6226026826c5eef48e2ad2eb9f6a01f2)
# Conflicts:
# docs/concepts/memory.md
# src/agents/pi-embedded-runner/system-prompt.ts
# src/agents/system-prompt.ts
# src/agents/tools/memory-tool.ts
# src/commands/status.scan.ts
# src/config/zod-schema.ts
# src/memory/manager.ts
# src/memory/search-manager.ts
* Make memory more resilient to failure
(cherry picked from commit 2c30ba400bbddfee9929e149003f5eccfbe86813)
* Add more tests; make fall back more resilient and visible
(cherry picked from commit 3a57106c1e8e95e488e94152f1fac62e72644b75)
# Conflicts:
# CHANGELOG.md
* Fix build errors
(cherry picked from commit e12184661e9bdfa4cb80987f6fb9db7562285d39)
* fix(qmd): use XDG dirs for qmd home; drop ollama docs
(cherry picked from commit 9be3c27bb7597084b0e547f8185c298495f02976)
* fix(memory-qmd): write XDG index.yml + legacy compat
(cherry picked from commit dd8373a4241a50b10e7a2cc66d9a41c28ca3acad)
# Conflicts:
# src/memory/search-manager.ts
* fix(memory-qmd): create collections via qmd CLI (no YAML)
(cherry picked from commit 564fe6f08957c6cc8bc1973f6420a184f4a18fdb)
* fix(memory/qmd): throttle embed + citations auto + restore --force
(cherry picked from commit 9df78b337900983462ff98261d0e09280d294d89)
* Tests: use OPENCLAW_STATE_DIR in qmd manager
(cherry picked from commit 5d8c665baffda9cefb900a96c3b7c1ae24f328c7)
* Memory: parse quoted qmd command
(cherry picked from commit 3e82cbd55bca40780b3f2a374b638672e8ef612f)
* Memory: fix QMD scope channel parsing
(cherry picked from commit b7f4755020965877ec1b91112f7d5eaf1a8b3677)
* Memory: harden QMD memory_get path checks
(cherry picked from commit c248da031794bc74f430c68071f8382392d2e4c0)
* Memory: clamp QMD citations to injected budget
(cherry picked from commit 1861e76360407981ced3027a4df68a01b4114baf)
# Conflicts:
# src/agents/tools/memory-tool.ts
* Tests: cover QMD scope, reads, and citation clamp
(cherry picked from commit 3d1c3b78ec2be947f43f9f91d94cefd27149071f)
* QMD: use OpenClaw config types
(cherry picked from commit 465536e811690530d3dfab52098a20b82a724c4c)
* Lint: add braces for single-line ifs
(cherry picked from commit e332a717a8d118680d7b3bc0f2ba981a28952980)
* chore: apply formatter
(cherry picked from commit 9bef525944a034aafb76231203e495b27e1a20ac)
# Conflicts:
# docs/concepts/memory.md
# src/agents/system-prompt.ts
# src/agents/tools/memory-tool.ts
# src/commands/status.scan.ts
# src/memory/search-manager.ts
* chore: restore OpenClaw branding
(cherry picked from commit f72214725d6bdde8ff6bc0550524a113555a0664)
# Conflicts:
# docs/concepts/memory.md
# src/agents/system-prompt.ts
# src/agents/tools/memory-tool.ts
# src/memory/search-manager.ts
* chore: fix lint warnings
(cherry picked from commit 30098b04d7298407a9eb8b2896f33e891b74d542)
# Conflicts:
# src/agents/system-prompt.ts
# src/agents/tools/memory-tool.ts
# src/memory/search-manager.ts
* chore: oxfmt
(cherry picked from commit 5915d479dca92acbe43962bc58e6a1d1781a9901)
# Conflicts:
# src/agents/tools/memory-tool.ts
* chore: oxfmt
(cherry picked from commit 600c46b5a4a963e036f78f1ba5da24f0e4748eae)
# Conflicts:
# src/agents/system-prompt.ts
* CLI: cache shell completion scripts
(cherry picked from commit 80d8fe778602c5a2a21632a96134796ba21adef7)
* Install: cache completion scripts on install/update
(cherry picked from commit 9950440cf6dea3cb11da2bfd32bc92c7d6aa0ab8)
* Onboarding: drop completion prompt
(cherry picked from commit 981de051813ae9b2b406d89d119cd6a8346238a2)
# Conflicts:
# src/wizard/onboarding.ts
* feat: remove slop.
(cherry picked from commit 6fb2d3d7d72773182986e41bf8b5d38c871447b1)
# Conflicts:
# docs/install/index.md
# package.json
# packages/clawdbot/package.json
# scripts/docker/cleanup-smoke/Dockerfile
# scripts/postinstall.js
# src/postinstall-patcher.test.ts
* chore: clean up git hooks and actually install them again.
(cherry picked from commit 6b83d82e82912484cb986ed15af39d5a6ff376eb)
# Conflicts:
# docs/zh-CN/scripts.md
# scripts/docker/cleanup-smoke/Dockerfile
# scripts/format-staged.js
# scripts/setup-git-hooks.js
# src/git-hooks.test.ts
* chore: Fix all TypeScript errors in `ui`.
(cherry picked from commit 27677dd8bd37c31cbf04e0ce9802b050ed59a2de)
# Conflicts:
# ui/src/ui/app-render.helpers.ts
# ui/src/ui/app-render.ts
* chore: Switch to `NodeNext` for `module`/`moduleResolution` in `ui`.
(cherry picked from commit 6e09c1142eeca3f01a6b5ab1e390c92ddb841e73)
# Conflicts:
# ui/src/ui/app-channels.ts
# ui/src/ui/app-chat.ts
# ui/src/ui/app-gateway.ts
# ui/src/ui/app-lifecycle.ts
# ui/src/ui/app-polling.ts
# ui/src/ui/app-render.helpers.ts
# ui/src/ui/app-render.ts
# ui/src/ui/app-settings.test.ts
# ui/src/ui/app-settings.ts
# ui/src/ui/app-view-state.ts
# ui/src/ui/app.ts
# ui/src/ui/chat-markdown.browser.test.ts
# ui/src/ui/chat/grouped-render.ts
# ui/src/ui/chat/tool-cards.ts
# ui/src/ui/config-form.browser.test.ts
# ui/src/ui/controllers/chat.test.ts
# ui/src/ui/controllers/chat.ts
# ui/src/ui/controllers/cron.ts
# ui/src/ui/controllers/devices.ts
# ui/src/ui/controllers/sessions.ts
# ui/src/ui/focus-mode.browser.test.ts
# ui/src/ui/format.test.ts
# ui/src/ui/gateway.ts
# ui/src/ui/markdown.test.ts
# ui/src/ui/navigation.browser.test.ts
# ui/src/ui/presenter.ts
# ui/src/ui/tool-display.ts
# ui/src/ui/uuid.test.ts
# ui/src/ui/views/channels.config.ts
# ui/src/ui/views/channels.discord.ts
# ui/src/ui/views/channels.googlechat.ts
# ui/src/ui/views/channels.imessage.ts
# ui/src/ui/views/channels.nostr-profile-form.ts
# ui/src/ui/views/channels.nostr.ts
# ui/src/ui/views/channels.shared.ts
# ui/src/ui/views/channels.signal.ts
# ui/src/ui/views/channels.slack.ts
# ui/src/ui/views/channels.telegram.ts
# ui/src/ui/views/channels.ts
# ui/src/ui/views/channels.whatsapp.ts
# ui/src/ui/views/chat.test.ts
# ui/src/ui/views/chat.ts
# ui/src/ui/views/config-form.render.ts
# ui/src/ui/views/config.browser.test.ts
# ui/src/ui/views/cron.test.ts
# ui/src/ui/views/cron.ts
# ui/src/ui/views/debug.ts
# ui/src/ui/views/exec-approval.ts
# ui/src/ui/views/gateway-url-confirmation.ts
# ui/src/ui/views/instances.ts
# ui/src/ui/views/logs.ts
# ui/src/ui/views/markdown-sidebar.ts
# ui/src/ui/views/nodes.ts
# ui/src/ui/views/overview.ts
# ui/src/ui/views/sessions.ts
# ui/src/ui/views/skills.ts
* chore: Merge tsconfigs, typecheck `ui` as part of `pnpm tsgo` locally and on CI.
(cherry picked from commit 1f2f79a7a7c147f14a46a024ceb333447201dd81)
# Conflicts:
# tsconfig.json
* fix(ui): fix web UI after tsdown migration and typing changes
(cherry picked from commit 5935c4d23d5e3a4d521df99e5d419fb4f8690557)
# Conflicts:
# docs/zh-CN/gateway/configuration.md
# src/agents/skills/bundled-dir.ts
# src/config/schema.ts
# src/gateway/control-ui.ts
# src/gateway/server-http.ts
# src/gateway/server.impl.ts
# src/infra/control-ui-assets.test.ts
# src/infra/control-ui-assets.ts
# tsconfig.json
* fix(skills): warn when bundled dir missing
(cherry picked from commit f60eae83fade776fadf7822a6420967f8e58b6fa)
# Conflicts:
# CHANGELOG.md
* fix(ui): refresh agent files after external edits
(cherry picked from commit ddccfd3ec1cfea9ba5908fd3cae53fd5f48772a5)
* Docs: update zh-CN translations and pipeline
What:
- update zh-CN glossary, TM, and translator prompt
- regenerate zh-CN docs and apply targeted fixes
- add zh-CN AGENTS pipeline guidance
Why:
- address terminology/spacing feedback from #6995
Tests:
- pnpm build && pnpm check && pnpm test
(cherry picked from commit a3ec2d073494cc7227820509b103f1de56375451)
# Conflicts:
# docs/zh-CN/automation/auth-monitoring.md
# docs/zh-CN/automation/cron-jobs.md
# docs/zh-CN/automation/gmail-pubsub.md
# docs/zh-CN/automation/poll.md
# docs/zh-CN/automation/webhook.md
# docs/zh-CN/bedrock.md
# docs/zh-CN/brave-search.md
# docs/zh-CN/broadcast-groups.md
# docs/zh-CN/channels/bluebubbles.md
# docs/zh-CN/channels/discord.md
# docs/zh-CN/channels/googlechat.md
# docs/zh-CN/channels/grammy.md
# docs/zh-CN/channels/imessage.md
# docs/zh-CN/channels/index.md
# docs/zh-CN/channels/line.md
# docs/zh-CN/channels/matrix.md
# docs/zh-CN/channels/mattermost.md
# docs/zh-CN/channels/msteams.md
# docs/zh-CN/channels/nextcloud-talk.md
# docs/zh-CN/channels/nostr.md
# docs/zh-CN/channels/signal.md
# docs/zh-CN/channels/slack.md
# docs/zh-CN/channels/telegram.md
# docs/zh-CN/channels/tlon.md
# docs/zh-CN/channels/twitch.md
# docs/zh-CN/channels/whatsapp.md
# docs/zh-CN/channels/zalo.md
# docs/zh-CN/channels/zalouser.md
# docs/zh-CN/cli/acp.md
# docs/zh-CN/cli/agent.md
# docs/zh-CN/cli/approvals.md
# docs/zh-CN/cli/browser.md
# docs/zh-CN/cli/channels.md
# docs/zh-CN/cli/config.md
# docs/zh-CN/cli/configure.md
# docs/zh-CN/cli/cron.md
# docs/zh-CN/cli/devices.md
# docs/zh-CN/cli/dns.md
# docs/zh-CN/cli/docs.md
# docs/zh-CN/cli/doctor.md
# docs/zh-CN/cli/gateway.md
# docs/zh-CN/cli/health.md
# docs/zh-CN/cli/hooks.md
# docs/zh-CN/cli/index.md
# docs/zh-CN/cli/logs.md
# docs/zh-CN/cli/node.md
# docs/zh-CN/cli/nodes.md
# docs/zh-CN/cli/onboard.md
# docs/zh-CN/cli/pairing.md
# docs/zh-CN/cli/plugins.md
# docs/zh-CN/cli/sandbox.md
# docs/zh-CN/cli/security.md
# docs/zh-CN/cli/skills.md
# docs/zh-CN/cli/status.md
# docs/zh-CN/cli/system.md
# docs/zh-CN/cli/tui.md
# docs/zh-CN/cli/uninstall.md
# docs/zh-CN/cli/update.md
# docs/zh-CN/concepts/agent-loop.md
# docs/zh-CN/concepts/agent-workspace.md
# docs/zh-CN/concepts/agent.md
# docs/zh-CN/concepts/architecture.md
# docs/zh-CN/concepts/context.md
# docs/zh-CN/concepts/group-messages.md
# docs/zh-CN/concepts/groups.md
# docs/zh-CN/concepts/memory.md
# docs/zh-CN/concepts/messages.md
# docs/zh-CN/concepts/model-failover.md
# docs/zh-CN/concepts/model-providers.md
# docs/zh-CN/concepts/models.md
# docs/zh-CN/concepts/multi-agent.md
# docs/zh-CN/concepts/presence.md
# docs/zh-CN/concepts/queue.md
# docs/zh-CN/concepts/session-pruning.md
# docs/zh-CN/concepts/session-tool.md
# docs/zh-CN/concepts/session.md
# docs/zh-CN/concepts/streaming.md
# docs/zh-CN/concepts/system-prompt.md
# docs/zh-CN/concepts/typebox.md
# docs/zh-CN/debugging.md
# docs/zh-CN/diagnostics/flags.md
# docs/zh-CN/environment.md
# docs/zh-CN/experiments/onboarding-config-protocol.md
# docs/zh-CN/experiments/plans/cron-add-hardening.md
# docs/zh-CN/experiments/plans/group-policy-hardening.md
# docs/zh-CN/experiments/plans/openresponses-gateway.md
# docs/zh-CN/experiments/research/memory.md
# docs/zh-CN/gateway/authentication.md
# docs/zh-CN/gateway/background-process.md
# docs/zh-CN/gateway/bonjour.md
# docs/zh-CN/gateway/bridge-protocol.md
# docs/zh-CN/gateway/cli-backends.md
# docs/zh-CN/gateway/configuration-examples.md
# docs/zh-CN/gateway/discovery.md
# docs/zh-CN/gateway/doctor.md
# docs/zh-CN/gateway/gateway-lock.md
# docs/zh-CN/gateway/health.md
# docs/zh-CN/gateway/heartbeat.md
# docs/zh-CN/gateway/index.md
# docs/zh-CN/gateway/local-models.md
# docs/zh-CN/gateway/logging.md
# docs/zh-CN/gateway/multiple-gateways.md
# docs/zh-CN/gateway/openai-http-api.md
# docs/zh-CN/gateway/openresponses-http-api.md
# docs/zh-CN/gateway/pairing.md
# docs/zh-CN/gateway/protocol.md
# docs/zh-CN/gateway/remote-gateway-readme.md
# docs/zh-CN/gateway/remote.md
# docs/zh-CN/gateway/sandbox-vs-tool-policy-vs-elevated.md
# docs/zh-CN/gateway/sandboxing.md
# docs/zh-CN/gateway/security/formal-verification.md
# docs/zh-CN/gateway/security/index.md
# docs/zh-CN/gateway/tailscale.md
# docs/zh-CN/gateway/tools-invoke-http-api.md
# docs/zh-CN/gateway/troubleshooting.md
# docs/zh-CN/help/faq.md
# docs/zh-CN/help/index.md
# docs/zh-CN/help/troubleshooting.md
# docs/zh-CN/hooks.md
# docs/zh-CN/index.md
# docs/zh-CN/install/ansible.md
# docs/zh-CN/install/bun.md
# docs/zh-CN/install/development-channels.md
# docs/zh-CN/install/docker.md
# docs/zh-CN/install/index.md
# docs/zh-CN/install/migrating.md
# docs/zh-CN/install/nix.md
# docs/zh-CN/install/uninstall.md
# docs/zh-CN/install/updating.md
# docs/zh-CN/logging.md
# docs/zh-CN/multi-agent-sandbox-tools.md
# docs/zh-CN/network.md
# docs/zh-CN/nodes/camera.md
# docs/zh-CN/nodes/images.md
# docs/zh-CN/nodes/index.md
# docs/zh-CN/nodes/location-command.md
# docs/zh-CN/nodes/media-understanding.md
# docs/zh-CN/nodes/talk.md
# docs/zh-CN/nodes/voicewake.md
# docs/zh-CN/perplexity.md
# docs/zh-CN/pi-dev.md
# docs/zh-CN/pi.md
# docs/zh-CN/platforms/android.md
# docs/zh-CN/platforms/digitalocean.md
# docs/zh-CN/platforms/exe-dev.md
# docs/zh-CN/platforms/fly.md
# docs/zh-CN/platforms/gcp.md
# docs/zh-CN/platforms/hetzner.md
# docs/zh-CN/platforms/index.md
# docs/zh-CN/platforms/ios.md
# docs/zh-CN/platforms/linux.md
# docs/zh-CN/platforms/mac/bundled-gateway.md
# docs/zh-CN/platforms/mac/canvas.md
# docs/zh-CN/platforms/mac/child-process.md
# docs/zh-CN/platforms/mac/dev-setup.md
# docs/zh-CN/platforms/mac/health.md
# docs/zh-CN/platforms/mac/remote.md
# docs/zh-CN/platforms/mac/skills.md
# docs/zh-CN/platforms/mac/voicewake.md
# docs/zh-CN/platforms/mac/webchat.md
# docs/zh-CN/platforms/mac/xpc.md
# docs/zh-CN/platforms/macos-vm.md
# docs/zh-CN/platforms/macos.md
# docs/zh-CN/platforms/oracle.md
# docs/zh-CN/platforms/raspberry-pi.md
# docs/zh-CN/platforms/windows.md
# docs/zh-CN/plugin.md
# docs/zh-CN/plugins/agent-tools.md
# docs/zh-CN/plugins/voice-call.md
# docs/zh-CN/plugins/zalouser.md
# docs/zh-CN/prose.md
# docs/zh-CN/providers/anthropic.md
# docs/zh-CN/providers/index.md
# docs/zh-CN/providers/minimax.md
# docs/zh-CN/providers/models.md
# docs/zh-CN/providers/qwen.md
# docs/zh-CN/providers/vercel-ai-gateway.md
# docs/zh-CN/refactor/clawnet.md
# docs/zh-CN/refactor/exec-host.md
# docs/zh-CN/refactor/outbound-session-mirroring.md
# docs/zh-CN/refactor/strict-config.md
# docs/zh-CN/reference/AGENTS.default.md
# docs/zh-CN/reference/RELEASING.md
# docs/zh-CN/reference/rpc.md
# docs/zh-CN/reference/session-management-compaction.md
# docs/zh-CN/reference/templates/SOUL.dev.md
# docs/zh-CN/reference/templates/USER.dev.md
# docs/zh-CN/reference/test.md
# docs/zh-CN/security/formal-verification.md
# docs/zh-CN/start/getting-started.md
# docs/zh-CN/start/hubs.md
# docs/zh-CN/start/lore.md
# docs/zh-CN/start/onboarding.md
# docs/zh-CN/start/openclaw.md
# docs/zh-CN/start/pairing.md
# docs/zh-CN/start/setup.md
# docs/zh-CN/start/showcase.md
# docs/zh-CN/start/wizard.md
# docs/zh-CN/testing.md
# docs/zh-CN/token-use.md
# docs/zh-CN/tools/agent-send.md
# docs/zh-CN/tools/browser-linux-troubleshooting.md
# docs/zh-CN/tools/browser-login.md
# docs/zh-CN/tools/browser.md
# docs/zh-CN/tools/chrome-extension.md
# docs/zh-CN/tools/creating-skills.md
# docs/zh-CN/tools/elevated.md
# docs/zh-CN/tools/exec-approvals.md
# docs/zh-CN/tools/exec.md
# docs/zh-CN/tools/firecrawl.md
# docs/zh-CN/tools/index.md
# docs/zh-CN/tools/lobster.md
# docs/zh-CN/tools/skills-config.md
# docs/zh-CN/tools/skills.md
# docs/zh-CN/tools/slash-commands.md
# docs/zh-CN/tools/web.md
# docs/zh-CN/tts.md
# docs/zh-CN/tui.md
# docs/zh-CN/vps.md
# docs/zh-CN/web/control-ui.md
# docs/zh-CN/web/dashboard.md
# docs/zh-CN/web/index.md
# docs/zh-CN/web/webchat.md
* Channels: add Feishu/Lark support
(cherry picked from commit 2483f26c235a2a3271cae733f653ff6d78641726)
# Conflicts:
# docs/docs.json
* fix(approvals): gate /approve by gateway scopes
(cherry picked from commit efe2a464af9fcaa2da13873742003d21408a3f9d)
# Conflicts:
# src/auto-reply/reply/commands-approve.ts
* test: add /approve gateway scope coverage (#1) (thanks @mitsuhiko)
(cherry picked from commit d41acf99a63aafd2259ef716eba407c00f3a0a17)
# Conflicts:
# CHANGELOG.md
* test: reset /approve mock per test (#1) (thanks @mitsuhiko)
(cherry picked from commit 4df4435c45f0292a90d6c0159db46a324f4c1573)
# Conflicts:
# src/auto-reply/reply/commands-approve.test.ts
* chore: prep 2026.2.2 docs/release checks
(cherry picked from commit 539a15e63fcc823256893ccde8bd421db14aba23)
# Conflicts:
# CHANGELOG.md
# scripts/release-check.ts
* chore: update appcast for 2026.2.2
(cherry picked from commit 95cd2210f93d6ab2acc5e29dbad6065294365863)
# Conflicts:
# appcast.xml
* chore: add mac dSYM zip to release artifacts
(cherry picked from commit f1cbe7db1d764e57aea8ec4d8fb1b2a6287fafb5)
# Conflicts:
# scripts/package-mac-dist.sh
* fix(update): honor update.channel for update.run
(cherry picked from commit bbe9cb30224af989782d42d6de8e8053abaee51b)
# Conflicts:
# src/gateway/server-methods/update.ts
# src/infra/update-runner.ts
* feat: add configurable web_fetch maxChars cap
(cherry picked from commit d3ba57b7d7e0c7e9ae26c4b479ce2141c08767e5)
* fix(matrix): require unique allowlist matches in wizard
(cherry picked from commit 41d2993f7bccc43b6046dba20c1bf59dfec6c4b3)
# Conflicts:
# extensions/matrix/src/onboarding.ts
* iMessage: promote BlueBubbles and refresh docs/skills (#8415)
* feat: Make BlueBubbles the primary iMessage integration
- Remove old imsg skill (skills/imsg/SKILL.md)
- Create new BlueBubbles skill (skills/bluebubbles/SKILL.md) with message tool examples
- Add keep-alive script documentation for VM/headless setups to docs/channels/bluebubbles.md
- AppleScript that pokes Messages.app every 5 minutes
- LaunchAgent configuration for automatic execution
- Prevents Messages.app from going idle in VM environments
- Update all documentation to prioritize BlueBubbles over legacy imsg:
- Mark imsg channel as legacy throughout docs
- Update README.md channel lists
- Update wizard, hubs, pairing, and index docs
- Update FAQ to recommend BlueBubbles for iMessage
- Update RPC docs to note imsg as legacy pattern
- Update Chinese documentation (zh-CN)
- Replace imsg examples with generic macOS skill examples where appropriate
BlueBubbles is now the recommended first-class iMessage integration,
with the legacy imsg integration marked for potential future removal.
* refactor: Update import paths and improve code formatting
- Adjusted import paths in session-status-tool.ts, whatsapp-heartbeat.ts, and heartbeat-runner.ts for consistency.
- Reformatted code for better readability by aligning and grouping related imports and function parameters.
- Enhanced error messages and conditional checks for clarity in heartbeat-runner.ts.
* skills: restore imsg skill and align bluebubbles skill
* docs: update FAQ for clarity and formatting
- Adjusted the formatting of the FAQ section to ensure consistent bullet point alignment.
- No content changes were made, only formatting improvements for better readability.
* style: oxfmt touched files
* fix: preserve BlueBubbles developer reference (#8415) (thanks @tyler6204)
(cherry picked from commit 9c4eab69cca597d6ff7a14e652ef069ac06e8b8f)
# Conflicts:
# CHANGELOG.md
# README.md
# docs/help/faq.md
# docs/reference/rpc.md
# skills/bluebubbles/SKILL.md
# src/agents/tools/session-status-tool.ts
# src/channels/plugins/whatsapp-heartbeat.ts
# src/infra/heartbeat-runner.ts
* refactor: remove unnecessary blank line in policy test file
(cherry picked from commit 3e6c623cfea82841eeac3c92ae31481576af7a75)
# Conflicts:
# extensions/nextcloud-talk/src/policy.test.ts
* feat: add new messages indicator style for chat interface
- Introduced a floating pill element above the compose area to indicate new messages.
- Styled the indicator with hover effects and responsive design for better user interaction.
(cherry picked from commit efb4a34be4fdc98e18d928c62442b85edf398404)
* Telegram: add inline button model selection for /models and /model commands
(cherry picked from commit 16349b6e9312a4627fb3e3292511e298487e16ac)
# Conflicts:
# src/auto-reply/reply/commands-models.ts
# src/auto-reply/reply/directive-handling.model.ts
# src/telegram/bot-handlers.ts
* Telegram: fix model button review issues
- Add currentModel to callback handler for checkmark display
- Add 64-byte callback_data limit protection (skip long model IDs)
- Add tests for large model lists and callback_data limits
(cherry picked from commit 202c554d09ad519742be7e928ff66a8ab2cc2b12)
* feat(discord): add set-presence action for bot activity and status
Bridge the agent tools layer to the Discord gateway WebSocket via a new
gateway registry, allowing agents to set the bot's activity and online
status. Supports playing, streaming, listening, watching, custom, and
competing activity types. Custom type uses activityState as the sidebar
text; other types show activityName in the sidebar and activityState in
the flyout. Opt-in via channels.discord.actions.presence (default false).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit 5af322f710be2af011d4fc53de1b39fc77e73ccb)
# Conflicts:
# docs/channels/discord.md
# skills/discord/SKILL.md
# src/discord/monitor/provider.ts
* Address PR feedback
(cherry picked from commit f04e84f194adff236e056acc538cdba5c575844f)
* Make openclaw consistent in this file (#8533)
Co-authored-by: stephenchen2025 <schenjobs@gmail.com>
(cherry picked from commit d2ff28dda7598cbac7e126d655454d8883d76d6d)
# Conflicts:
# src/browser/client-fetch.ts
* feat: add support for Moonshot API key for China endpoint
(cherry picked from commit 1c6b25ddbbeffb51daae43aae85ce01930d9e459)
# Conflicts:
# src/commands/onboard-auth.config-core.ts
* fix(control-ui): resolve header logo when gateway.controlUi.basePath is set (#7178)
* fix(control-ui): resolve header logo when gateway.controlUi.basePath is set
* refactor(control-ui): header logo under basePath; normalize logo URL with normalizeBasePath
(cherry picked from commit 7b3d23b703babb5d6fd9ee6b4e3336c254ed205d)
# Conflicts:
# ui/src/ui/app-render.ts
* Add baidu qianfan model provider
(cherry picked from commit 30ac80b96b452b7f3efcfc447335256c256227a7)
# Conflicts:
# src/cli/program/register.onboard.ts
# src/commands/auth-choice.preferred-provider.ts
# src/commands/onboard-auth.config-core.ts
# src/commands/onboard-auth.ts
* fix(cron): fix timeout, add timestamp validation, enable file sync
Fixes #7667
Task 1: Fix cron operation timeouts
- Increase default gateway tool timeout from 10s to 30s
- Increase cron-specific tool timeout to 60s
- Increase CLI default timeout from 10s to 30s
- Prevents timeouts when gateway is busy with long-running jobs
Task 2: Add timestamp validation
- New validateScheduleTimestamp() function in validate-timestamp.ts
- Rejects atMs timestamps more than 1 minute in the past
- Rejects atMs timestamps more than 10 years in the future
- Applied to both cron.add and cron.update operations
- Provides helpful error messages with current time and offset
Task 3: Enable file sync for manual edits
- Track file modification time (storeFileMtimeMs) in CronServiceState
- Check file mtime in ensureLoaded() and reload if changed
- Recompute next runs after reload to maintain accuracy
- Update mtime after persist() to prevent reload loop
- Dashboard now picks up manual edits to ~/.openclaw/cron/jobs.json
(cherry picked from commit 3a03e38378e2bb9ea17a71cdea5b6b30ae750a3c)
# Conflicts:
# src/cron/service/store.ts
# src/gateway/server-methods/cron.ts
* feat(cron): introduce delivery modes for isolated jobs
- Added support for new delivery modes in cron jobs: `announce`, `deliver`, and `none`.
- Updated documentation to reflect changes in delivery options and usage examples.
- Enhanced the cron job schema to include delivery configuration.
- Refactored related CLI commands and UI components to accommodate the new delivery settings.
- Improved handling of legacy delivery fields for backward compatibility.
This update allows users to choose how output from isolated jobs is delivered, enhancing flexibility in job management.
(cherry picked from commit 511c656cbcb6214b208c5bde44768a16ec388929)
# Conflicts:
# CHANGELOG.md
# docs/automation/cron-jobs.md
# docs/automation/cron-vs-heartbeat.md
# docs/cli/cron.md
# src/cron/isolated-agent/run.ts
* feat(cron): default isolated jobs to announce delivery and enhance scheduling options
- Updated isolated cron jobs to default to `announce` delivery mode, improving user experience.
- Enhanced scheduling options to accept ISO 8601 timestamps for `schedule.at`, while still supporting epoch milliseconds.
- Refined documentation to clarify delivery modes and scheduling formats.
- Adjusted related CLI commands and UI components to reflect these changes, ensuring consistency across the platform.
- Improved handling of legacy delivery fields for backward compatibility.
This update streamlines the configuration of isolated jobs, making it easier for users to manage job outputs and schedules.
(cherry picked from commit 0bb0dfc9bccbab8473a409ae03ab7892920080f9)
# Conflicts:
# CHANGELOG.md
* feat(cron): enhance one-shot job behavior and CLI options
- Default one-shot jobs to delete after success, improving job management.
- Introduced `--keep-after-run` CLI option to allow users to retain one-shot jobs post-execution.
- Updated documentation to clarify default behaviors and new options for one-shot jobs.
- Adjusted cron job creation logic to ensure consistent handling of delete options.
- Enhanced tests to validate new behaviors and ensure reliability.
This update streamlines the handling of one-shot jobs, providing users with more control over job persistence and execution outcomes.
(cherry picked from commit ab9f06f4ffaec25ada17ff6797a33ffb2f6ca07c)
# Conflicts:
# CHANGELOG.md
* feat(cron): enhance delivery modes and job configuration
- Updated isolated cron jobs to support new delivery modes: `announce` and `none`, improving output management.
- Refactored job configuration to remove legacy fields and streamline delivery settings.
- Enhanced the `CronJobEditor` UI to reflect changes in delivery options, including a new segmented control for delivery mode selection.
- Updated documentation to clarify the new delivery configurations and their implications for job execution.
- Improved tests to validate the new delivery behavior and ensure backward compatibility with legacy settings.
This update provides users with greater flexibility in managing how isolated jobs deliver their outputs, enhancing overall usability and clarity in job configurations.
(cherry picked from commit 3f82daefd8010cda5b7ead7c1717a9078acaec29)
# Conflicts:
# CHANGELOG.md
# apps/macos/Sources/Moltbot/CronJobEditor.swift
# docs/zh-CN/automation/cron-vs-heartbeat.md
# src/agents/moltbot-tools.ts
# src/agents/tools/message-tool.ts
# src/cron/isolated-agent/run.ts
# src/cron/service/jobs.ts
* feat(cron): set default enabled state for cron jobs
- Added logic to default the `enabled` property to `true` if not explicitly set as a boolean in the cron job input.
- Updated job creation and store functions to ensure consistent handling of the `enabled` state across the application.
- Enhanced input normalization to improve job configuration reliability.
This update ensures that cron jobs are enabled by default, enhancing user experience and reducing potential misconfigurations.
(cherry picked from commit 140994386388df7c171b25b1cac625d64987430a)
* refactor(cron): update delivery instructions for isolated agent
- Revised the delivery instructions in the isolated agent's command body to clarify that summaries should be returned as plain text and will be delivered by the main agent.
- Removed the previous directive regarding messaging tools to streamline communication guidelines.
This change enhances clarity in the delivery process for isolated agent tasks.
(cherry picked from commit ef4949b936ffc59ce47d03a5526b57f4a62079f8)
* feat(cron): enhance delivery handling and testing for isolated jobs
- Introduced new properties for explicit message targeting and message tool disabling in the EmbeddedRunAttemptParams type.
- Updated cron job tests to validate best-effort delivery behavior and handling of delivery failures.
- Added logic to clear delivery settings when switching session targets in cron jobs.
- Improved the resolution of delivery failures and best-effort logic in the isolated agent's run function.
This update enhances the flexibility and reliability of delivery mechanisms in isolated cron jobs, ensuring better handling of message delivery scenarios.
(cherry picked from commit 64df61f697435a0d359542728b0f03bfba695a67)
* refactor(cron): improve delivery configuration handling in CronJobEditor and CLI
- Enhanced the delivery configuration logic in CronJobEditor to explicitly set the bestEffort property based on job settings.
- Refactored the CLI command to streamline delivery object creation, ensuring proper handling of optional fields like channel and to.
- Improved code readability and maintainability by restructuring delivery assignment logic.
This update clarifies the delivery configuration process, enhancing the reliability of job settings in both the editor and CLI.
(cherry picked from commit 246896d64bf4025cd2d9e13b1911c28079fd6209)
* feat(cron): enhance legacy delivery handling in job patches
- Introduced logic to map legacy payload delivery updates onto the delivery object for `agentTurn` jobs, ensuring backward compatibility with legacy clients.
- Added tests to validate the correct application of legacy delivery settings in job patches, improving reliability in job configuration.
- Refactored delivery handling functions to streamline the merging of legacy delivery fields into the current job structure.
This update enhances the flexibility of delivery configurations, ensuring that legacy settings are properly handled in the context of new job patches.
(cherry picked from commit 6fb8d8850e952a61f13947f2c41fc28b0603f039)
* fix(cron): fix test failures and regenerate protocol files
- Add forceReload option to ensureLoaded to avoid stat I/O in normal
paths while still detecting cross-service writes in the timer path
- Post isolated job summary back to main session (restores the old
isolation.postToMainPrefix behavior via delivery model)
- Update legacy migration tests to check delivery.channel instead of
payload.channel (normalization now moves delivery fields to top-level)
- Remove legacy deliver/channel/to/bestEffortDeliver from payload schema
- Update protocol conformance test for delivery modes
- Regenerate GatewayModels.swift (isolation -> delivery)
(cherry picked from commit f8d253406296a548e53a63651834b8b9cb1fb405)
# Conflicts:
# src/cron/cron-protocol-conformance.test.ts
* UI: handle future timestamps in formatAgo
(cherry picked from commit 79d00e20db8d5c9a8b30dfb0c835b4e895c6f6fb)
# Conflicts:
# ui/src/ui/format.test.ts
* Telegram: use Grammy types directly, add typed Probe/Audit to plugin interface (#8403)
* Telegram: replace duplicated types with Grammy imports, add Probe/Audit generics to plugin interface
* Telegram: remove legacy forward metadata (deprecated in Bot API 7.0), simplify required-field checks
* Telegram: clean up remaining legacy references and unnecessary casts
* Telegram: keep RequestInit parameter type in proxy fetch (addresses review feedback)
* Telegram: add exhaustiveness guard to resolveForwardOrigin switch
(cherry picked from commit da6de4981557d42c13af8a93706c07eb6231e7a5)
# Conflicts:
# extensions/telegram/src/channel.ts
# src/channels/plugins/types.adapters.ts
# src/telegram/bot-native-commands.ts
# src/telegram/bot-updates.ts
# src/telegram/bot.ts
# src/telegram/bot/helpers.test.ts
# src/telegram/bot/helpers.ts
* fix(telegram): include forward_from_chat metadata in forwarded message context (#8133)
Extract missing metadata from forwarded Telegram messages:
- Add fromChatType to TelegramForwardedContext, capturing the original
chat type (channel/supergroup/group) from forward_from_chat.type
and forward_origin.chat/sender_chat.type
- Add fromMessageId to capture the original message ID from channel forwards
- Read author_signature from forward_origin objects (modern API),
preferring it over the deprecated forward_signature field
- Pass ForwardedFromChatType and ForwardedFromMessageId through to
the inbound context payload
- Add test coverage for forward_origin channel/chat types, including
author_signature extraction and fromChatType propagation
(cherry picked from commit 57566c5e4d633ce199fc24901580fc5ffa9b1350)
# Conflicts:
# src/telegram/bot/helpers.test.ts
* fix(imessage): unify timeout configuration with configurable probeTimeoutMs
- Add probeTimeoutMs config option to channels.imessage
- Export DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS constant (10s) from probe.ts
- Propagate timeout config through all iMessage probe/RPC operations
- Fix hardcoded 2000ms timeouts that were too short for SSH connections
Closes: timeout issues when using SSH wrapper scripts (imsg-ssh)
(cherry picked from commit 78f8a29071305db4b060911aded4d787e69e2ac0)
* fix(imessage): detect self-chat echoes to prevent infinite loops (#8680)
(cherry picked from commit 18652d181b47732c7389391da56e7536656e5cf4)
* feat: add cloudflare ai gateway provider
(cherry picked from commit 5b0851ebd82cd7ec3372d070ab4d73fda81bd959)
# Conflicts:
# CHANGELOG.md
# README.md
# src/agents/models-config.providers.ts
# src/cli/program/register.onboard.ts
# src/commands/auth-choice.apply.api-providers.ts
# src/commands/onboard-auth.config-core.ts
# src/commands/onboard-auth.ts
# src/commands/onboard-non-interactive/local/auth-choice.ts
* Fix format
(cherry picked from commit 7bf408060885257e17d77b0674cb39c241e81da9)
# Conflicts:
# docs/docs.json
* optimize doc
(cherry picked from commit fb5280e1b5cd0315390f95b3100759020f683ee5)
# Conflicts:
# docs/providers/qianfan.md
* Docs: landing page revamp (#8885)
* Docs: refresh landing page
* Docs: add landing page companion pages
* Docs: drop legacy Jekyll assets
* Docs: remove legacy terminal css test
* Docs: restore terminal css assets
* Docs: remove terminal css assets
(cherry picked from commit 718dba8cb69201e3163a62a3542a9777e4df0538)
# Conflicts:
# docs/_config.yml
# docs/_layouts/default.html
# docs/assets/theme.js
# docs/docs.json
# docs/index.md
* fix(app-render): handle optional model in renderApp function
(cherry picked from commit 01ce144fa9abf8dc920d476e0f420a33356a8e41)
# Conflicts:
# ui/src/ui/app-render.ts
* feat: add shell completion installation prompt to CLI update command
(cherry picked from commit 1d17630dc654a0f27aeba65484e6769434bf38fa)
# Conflicts:
# src/cli/update-cli.ts
* feat: add shell completion test script for installation verification
(cherry picked from commit 42c690632d792f8c5fe48c089979f977b4454dd9)
* completion: export cache utilities and require cached file for installation
- Export `resolveCompletionCachePath` and `completionCacheExists` for external use
- Update `installCompletion` to require cache existence (never use slow dynamic pattern)
- Add `usesSlowDynamicCompletion` to detect old `source <(...)` patterns
- Add `getShellProfilePath` helper for consistent profile path resolution
- Update `formatCompletionSourceLine` to always use cached file
(cherry picked from commit d5f8208c38793eab899cb9a76bc5d85d257c12c8)
* doctor: add shell completion check module
- Add `checkShellCompletionStatus` to get profile/cache/slow-pattern status
- Add `ensureCompletionCacheExists` for silent cache regeneration
- Add `doctorShellCompletion` to check and fix completion issues:
- Auto-upgrade old slow dynamic patterns to cached version
- Auto-regenerate cache if profile exists but cache is missing
- Prompt to install if no completion is configured
(cherry picked from commit 3fae90386328a264916e92c55dcf71a29c9350f7)
* doctor: integrate shell completion check into doctor command
- Import and call `doctorShellCompletion` during doctor run
- Checks/fixes completion issues before gateway health check
(cherry picked from commit 5bd63b012c9c617edbcb9c5e5ab62a5e690661c9)
* update: use shared completion helpers for shell completion setup
- Replace inline completion logic with `checkShellCompletionStatus` and `ensureCompletionCacheExists`
- Auto-upgrade old slow dynamic patterns silently during update
- Auto-regenerate cache if profile exists but cache is missing
- Prompt to install if no completion is configured
(cherry picked from commit dbaf0a8ae27cb8a75d21b391e20378a0a1f5d1d7)
# Conflicts:
# src/cli/update-cli.ts
* onboard: use shared completion helpers for shell completion setup
- Replace inline completion logic with `checkShellCompletionStatus` and `ensureCompletionCacheExists`
- Auto-upgrade old slow dynamic patterns silently during onboarding
- Auto-regenerate cache if profile exists but cache is missing
- Prompt to install if no completion is configured
(cherry picked from commit 3e14192730b128a47795c2f8246a13726fb32953)
# Conflicts:
# src/wizard/onboarding.finalize.ts
* scripts: update test-shell-completion to use shared helpers
- Use `checkShellCompletionStatus` and `ensureCompletionCacheExists` from doctor-completion
- Display "Uses slow pattern" status in output
- Simulate doctor/update/onboard behavior for all completion scenarios
- Remove duplicated utility functions
(cherry picked from commit dae0e2b3258d4e259d12df52d80339846a790f61)
* feat: per-channel responsePrefix override (#9001)
* feat: per-channel responsePrefix override
Add responsePrefix field to all channel config types and Zod schemas,
enabling per-channel and per-account outbound response prefix overrides.
Resolution cascade (most specific wins):
L1: channels.<ch>.accounts.<id>.responsePrefix
L2: channels.<ch>.responsePrefix
L3: (reserved for channels.defaults)
L4: messages.responsePrefix (existing global)
Semantics:
- undefined -> inherit from parent level
- empty string -> explicitly no prefix (stops cascade)
- "auto" -> derive [identity.name] from routed agent
Changes:
- Core logic: resolveResponsePrefix() in identity.ts accepts
optional channel/accountId and walks the cascade
- resolveEffectiveMessagesConfig() passes channel context through
- Types: responsePrefix added to WhatsApp, Telegram, Discord, Slack,
Signal, iMessage, Google Chat, MS Teams, Feishu, BlueBubbles configs
- Zod schemas: responsePrefix added for config validation
- All channel handlers wired: telegram, discord, slack, signal,
imessage, line, heartbeat runner, route-reply, native commands
- 23 new tests covering backward compat, channel/account levels,
full cascade, auto keyword, empty string stops, unknown fallthrough
Fully backward compatible - no existing config is affected.
Fixes #8857
* fix: address CI lint + review feedback
- Replace Record<string, any> with proper typed helpers (no-explicit-any)
- Add curly braces to single-line if returns (eslint curly)
- Fix JSDoc: 'Per-channel' → 'channel/account' on shared config types
- Extract getChannelConfig() helper for type-safe dynamic key access
* fix: finish responsePrefix overrides (#9001) (thanks @mudrii)
* fix: normalize prefix wiring and types (#9001) (thanks @mudrii)
---------
Co-authored-by: Gustavo Madeira Santana <gumadeiras@gmail.com>
(cherry picked from commit 5d82c82313a1f305bea5a3cd14847a35e93c589b)
# Conflicts:
# CHANGELOG.md
# extensions/bluebubbles/src/monitor.ts
# extensions/googlechat/src/monitor.ts
# extensions/tlon/src/monitor/index.ts
# extensions/twitch/src/monitor.ts
# extensions/zalo/src/monitor.ts
# extensions/zalouser/src/monitor.ts
# src/agents/identity.ts
# src/auto-reply/reply/route-reply.ts
# src/discord/monitor/message-handler.process.ts
# src/discord/monitor/native-command.ts
# src/feishu/message.ts
# src/gateway/server-methods/chat.ts
# src/line/monitor.ts
# src/slack/monitor/slash.ts
# src/telegram/bot-message-dispatch.test.ts
# src/telegram/bot-message-dispatch.ts
# src/telegram/bot-native-commands.ts
# src/web/auto-reply/monitor/process-message.ts
* Discord: allow disabling thread starter context
(cherry picked from commit bebf3237756344221a1ed5a0960d01b375572050)
* feat(heartbeat): add accountId config option for multi-agent routing (#8702)
* feat(heartbeat): add accountId config option for multi-agent routing
Add optional accountId field to heartbeat configuration, allowing
multi-agent setups to explicitly specify which Telegram account
should be used for heartbeat delivery.
Previously, heartbeat delivery would use the accountId from the
session's deliveryContext. When a session had no prior conversation
history, heartbeats would default to the first/primary account
instead of the agent's intended bot.
Changes:
- Add accountId to HeartbeatSchema (zod-schema.agent-runtime.ts)
- Use heartbeat.accountId with fallback to session accountId (targets.ts)
Backward compatible: if accountId is not specified, behavior is unchanged.
Closes #8695
* fix: improve heartbeat accountId routing (#8702) (thanks @lsh411)
* fix: harden heartbeat accountId routing (#8702) (thanks @lsh411)
* fix: expose heartbeat accountId in status (#8702) (thanks @lsh411)
* chore: format status + heartbeat tests (#8702) (thanks @lsh411)
---------
Co-authored-by: m1 16 512 <m116512@m1ui-MacBookAir-2.local>
Co-authored-by: Gustavo Madeira Santana <gumadeiras@gmail.com>
(cherry picked from commit a42e3cb78ab75233a5ebcc949d2532630ec234c5)
# Conflicts:
# CHANGELOG.md
# src/commands/status.command.ts
# src/infra/heartbeat-runner.returns-default-unset.test.ts
# src/infra/outbound/targets.ts
* Telegram: remove @ts-nocheck from bot.ts, fix duplicate error handler, harden sticker caching (#9077)
* Telegram: remove @ts-nocheck from bot.ts and bot-message-dispatch.ts
- bot/types.ts: TelegramContext.me uses UserFromGetMe (Grammy) instead of manual inline type
- bot.ts: remove 6 unsafe casts (as any, as unknown, as object), use Grammy types directly
- bot.ts: remove dead message_thread_id access on reactions (not in Telegram Bot API)
- bot.ts: remove resolveThreadSessionKeys import (no longer needed for reactions)
- bot-message-dispatch.ts: replace ': any' with DispatchTelegramMessageParams type
- bot-message-dispatch.ts: add sticker.fileId guard before cache access
- bot.test.ts: update reaction tests, remove dead DM thread-reaction test
* Telegram: remove duplicate bot.catch handler (only the last one runs in Grammy)
* Telegram: remove @ts-nocheck from bot.ts, fix duplicate error handler, harden sticker caching (#9077)
(cherry picked from commit 96abc1c864376689abb76a1c49a7443390ab6749)
# Conflicts:
# src/telegram/bot.ts
* Tests: restore TUI gateway env
(cherry picked from commit 5e025c4ba3412b142dd326f900ca66a354c186ff)
# Conflicts:
# src/tui/gateway-chat.test.ts
* Telegram: remove @ts-nocheck from bot-message.ts (#9180)
* Telegram: remove @ts-nocheck from bot-message.ts, type deps via Omit<BuildTelegramMessageContextParams>
* Telegram: widen allMedia to TelegramMediaRef[] so stickerMetadata flows through
* Telegram: remove @ts-nocheck from bot-message.ts (#9180)
(cherry picked from commit 90b4e54354741d062059afb13f7c43a6ae8640ef)
* Telegram: remove last @ts-nocheck from bot-handlers.ts (#9206)
* Telegram: remove @ts-nocheck from bot-handlers.ts, use Grammy types directly, deduplicate StickerMetadata
* Telegram: remove last @ts-nocheck from bot-handlers.ts (#9206)
(cherry picked from commit 21f8c3db18f1fc445b96a9a72e2ec74e049afa1a)
# Conflicts:
# src/telegram/bot-message-context.ts
* Message: clarify media schema + fix MEDIA newline
(cherry picked from commit a6fd76efebd3171d7f575e7ae298b60fdb3ef897)
# Conflicts:
# src/infra/outbound/message-action-runner.test.ts
* fix(mac): resolve cron schedule formatters
(cherry picked from commit cfdc551346b674b4a6f8714e634b37f95ed7d1be)
* chore(mac): update appcast for 2026.2.3
(cherry picked from commit 7f95cdac78fef994b53f888e08a0681d5e4c9c75)
# Conflicts:
# appcast.xml
* Fix import error
(cherry picked from commit c8e67ad5d576ce26bd62041d062daa226a554887)
# Conflicts:
# src/commands/onboard-auth.config-core.ts
* Add auth choice
(cherry picked from commit 52c9d3480fb4d949e7f471fb8c1a7def1398d5a7)
* Fix key resolve
(cherry picked from commit 4d30f97407a75168a9d7e7683ad2158ee3b3d22c)
* Optimize import
(cherry picked from commit 7af00f040aa055e9a9278e29085d0dcb092e7ae7)
# Conflicts:
# src/cron/isolated-agent/run.ts
* fix(cli): resolve bundled chrome extension path
(cherry picked from commit 0621d0e9e82d62170db3c54f6852200b99ec1188)
# Conflicts:
# src/cli/browser-cli-extension.test.ts
* test(cli): use unique temp dir for extension install
(cherry picked from commit 1008c28f5a65d706bf7c0892fb4b5d76d729ff04)
# Conflicts:
# src/cli/browser-cli-extension.test.ts
* fix(cli): support…
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 3, 2026
…thanks @ryancnelson) (openclaw#6660) (cherry picked from commit 8eb11bd) # Conflicts: # CHANGELOG.md # README.md # src/agents/pi-embedded-subscribe.handlers.tools.ts
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
* Fix missing before_tool_call hook integration - Add hook call in handleToolExecutionStart before tool execution begins - Support parameter modification via hookResult.params - Support tool call blocking via hookResult.block with custom blockReason - Fix try/catch logic to properly re-throw blocking errors using __isHookBlocking flag - Maintain tool event consistency by emitting start/end events when blocked - Addresses GitHub issue openclaw#6535 (1 of 8 unimplemented hooks now working) * Add comprehensive test suite for before_tool_call hook - 9 tests covering all hook scenarios: no hooks, parameter passing, modification, blocking, error handling - Tests tool name normalization and different argument types - Verifies proper error re-throwing and logging behavior - Maintained in fork for regression testing * Fix all issues identified by Greptile code review Address P0/P1/P3 bugs: P0 - Fix parameter mutation crash for non-object args: - Normalize args to objects before passing to hooks (maintains hook contract) - Handle parameter merging safely for both object and non-object args P1 - Add missing internal state updates when blocking tools: - Set toolMetaById metadata like normal flow - Call onAgentEvent callback to maintain consistency - Emit events in same order as normal tool execution P1 - Fix test expectations to match implementation reality: - Non-object args normalized to {} for hook params (not passed as-is) - Add test for safe parameter modification with various arg types - Update mocks to verify state updates when blocking P3 - Replace magic __isHookBlocking property with dedicated ToolBlockedError class: - More robust error handling without property collision risk - Cleaner control flow that's serialization-safe ---------
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
john-ver
pushed a commit
to apmcoin/apmclaw
that referenced
this pull request
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix missing
before_tool_callhook integrationFixes the
before_tool_callhook which was defined in the plugin type system but never actually called during tool execution.Problem
The
before_tool_callhook was defined insrc/plugins/types.tsand had a complete runner function insrc/plugins/hooks.ts, but was never wired into the actual tool execution flow. Plugin developers could register handlers that would never execute.This addresses 1 of the 8 unimplemented hooks identified in #6535.
Solution
handleToolExecutionStart()before tool execution beginshookResult.paramshookResult.blockwith customblockReasonAPI Usage
Plugins can now register
before_tool_callhandlers:Testing
Comprehensive test suite (9 tests covering all hook scenarios) available at: https://github.com/ryancnelson/openclaw/blob/feature/implement-before-tool-call-hook/src/agents/pi-embedded-subscribe.handlers.tools.before-tool-call-hook.test.ts
Breaking Changes
None - this is purely additive functionality that was already documented as available.
Related: #6535
Greptile Overview
Greptile Summary
This PR wires the previously-declared
before_tool_callplugin hook into the embedded Pi tool execution path (handleToolExecutionStart), allowing plugins to block tool calls or mutate tool params before execution. It also adds a dedicated Vitest suite covering the main hook scenarios.The changes fit into the existing agent event pipeline by attempting to preserve tool event consistency (emitting start/end events even on block) and keeping hook failures non-fatal (logged warnings).
Confidence Score: 3/5
hasHooks, but the current implementation assumes tool args are spreadable objects when applying hook param overrides, which can throw at runtime for non-object args. Additionally, the blocked-call path emits events but bypasses other internal state/callback behavior, which could create observable inconsistencies depending on downstream usage.(5/5) You can turn off certain types of comments like style here!