Commit Graph

22073 Commits

Author SHA1 Message Date
hnshah c7f021f70f
fix: preflight invalid telegram photos (#52545) (thanks @hnshah)
* fix(telegram): validate photo dimensions before sendPhoto

Prevents PHOTO_INVALID_DIMENSIONS errors by checking image dimensions
against Telegram Bot API requirements before calling sendPhoto.

If dimensions exceed limits (width + height > 10,000px), automatically
falls back to sending as document instead of crashing with 400 error.

Tested in production (openclaw 2026.3.13) where this error occurred:
  [telegram] tool reply failed: GrammyError: Call to 'sendPhoto' failed!
  (400: Bad Request: PHOTO_INVALID_DIMENSIONS)

Uses existing sharp dependency to read image metadata. Gracefully
degrades if sharp fails (lets Telegram handle validation, backward
compatible behavior).

Closes: #XXXXX (will reference OpenClaw issue if one exists)

* fix(telegram): validate photo aspect ratio

* refactor: use shared telegram image metadata

* fix: fail closed on telegram image metadata

* fix: preflight invalid telegram photos (#52545) (thanks @hnshah)

---------

Co-authored-by: Bob Shah <bobshah@Macs-Mac-Studio.local>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 12:00:20 +05:30
Peter Steinberger b9857a2b79 test: allow daemon start hints to grow on linux (#54058) (thanks @byungsker) 2026-03-24 23:09:04 -07:00
Peter Steinberger 8b80690a1a test: accept fenced discord pairing codes (#54058) (thanks @byungsker) 2026-03-24 23:09:04 -07:00
Peter Steinberger fac0a172e5 test: refresh pairing reply assertions for fenced codes (#54058) (thanks @byungsker) 2026-03-24 23:09:04 -07:00
Peter Steinberger 2566d6b300 fix: finish feishu open-group docs and baselines (#54058) (thanks @byungsker) 2026-03-24 23:09:04 -07:00
lbo728 a322059efa test(feishu): update config-schema test for removed requireMention default 2026-03-24 23:09:04 -07:00
lbo728 69195f7e9d fix(feishu): default requireMention to false for groupPolicy open
Groups configured with groupPolicy: open are expected to respond to all
messages. Previously, requireMention defaulted to true regardless of
groupPolicy, causing image (and other non-text) messages to be silently
dropped because they cannot carry @-mentions.

Fix: when groupPolicy is 'open' and requireMention is not explicitly
configured, resolve it to false instead of true. Users who want
mention-required behaviour in open groups can still set requireMention: true
explicitly.

Adds three regression tests covering the new default, explicit override, and
the unchanged allowlist-policy behaviour.

Closes #52553
2026-03-24 23:09:04 -07:00
VACInc 89b7fee352
fix: preserve Telegram forum topic last-route delivery (#53052) (thanks @VACInc)
* fix(telegram): preserve forum topic thread in last-route delivery

* style(telegram): format last-route update

* test(telegram): cover General topic last-route thread

* test(telegram): align topic route helper

* fix(telegram): skip bound-topic last-route writes

---------

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 11:31:01 +05:30
Peter Steinberger 1c82b06645 test: collapse msteams state and monitor suites 2026-03-25 05:57:02 +00:00
Peter Steinberger e53809035e test: collapse msteams graph suites 2026-03-25 05:57:02 +00:00
Peter Steinberger b99b521a92 test: collapse msteams helper suites 2026-03-25 05:57:02 +00:00
Peter Steinberger f5408d82d2
refactor: unify gateway handshake timeout wiring 2026-03-24 22:53:55 -07:00
Peter Steinberger 258a214bcb
refactor: centralize daemon service start state flow 2026-03-24 22:49:34 -07:00
Liren Pan 5dec3dddc4 style(auth): wrap codex fallback formatting 2026-03-24 22:49:06 -07:00
Liren Pan 773427470a test(auth): cover codex jwt fallback branches 2026-03-24 22:49:06 -07:00
Liren Pan b6e70a5cdd auth: derive codex oauth profile ids from jwt claims 2026-03-24 22:49:06 -07:00
nimbleenigma abec3ed645
fix: keep Telegram native commands on runtime snapshot (#53179) (thanks @nimbleenigma)
* fix(telegram): use runtime snapshot for native commands

* fix: keep Telegram native commands on runtime snapshot (#53179) (thanks @nimbleenigma)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 11:18:54 +05:30
Peter Steinberger 57e2223eec test: align pairing reply assertions 2026-03-25 05:48:31 +00:00
Peter Steinberger 6c3e767289
refactor: centralize Discord gateway supervision 2026-03-24 22:47:12 -07:00
Peter Steinberger efafbece17 test: collapse nextcloud-talk send and helper suites 2026-03-25 05:39:11 +00:00
dobbylorenzbot 717ee2fa59 fix(gateway): raise default connect challenge timeout 2026-03-24 22:38:17 -07:00
HCL db35f30005 fix: validate config before restart + derive loaded from real state
Address Codex P1 + Greptile P2:
- Move config validation before the restart attempt so invalid config
  is caught in the stop→start path (not just the already-loaded path)
- Derive service.loaded from actual isLoaded() after restart instead
  of hardcoded true

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: HCL <chenglunhu@gmail.com>
2026-03-24 22:35:09 -07:00
HCL d2248534d8 fix(daemon): bootstrap stopped service on `gateway start`
After `gateway stop` (which runs `launchctl bootout`), `gateway start`
checks `isLoaded` → false → prints "not loaded" hints and exits.
The service is never re-bootstrapped, so `start` cannot recover from
`stop` — only `gateway install` works.

Root cause: src/cli/daemon-cli/lifecycle-core.ts:208-217 — runServiceStart
calls handleServiceNotLoaded which only prints hints, never attempts
service.restart() (which already handles bootstrap via
bootstrapLaunchAgentOrThrow at launchd.ts:598).

Fix: when service is not loaded, attempt service.restart() first (which
handles re-bootstrapping on all platforms). If restart fails (e.g. plist
was deleted, not just booted out), fall back to the existing hints.

The restart path is already proven: restartLaunchAgent (launchd.ts:556)
handles "not loaded" via bootstrapLaunchAgentOrThrow. This fix routes
the start command through the same recovery path.

Closes #53878

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: HCL <chenglunhu@gmail.com>
2026-03-24 22:35:09 -07:00
Peter Steinberger 7467f304a7 test: collapse nextcloud-talk helper suites 2026-03-25 05:33:57 +00:00
Peter Steinberger e8e45a4936 test: collapse synology-chat helper suites 2026-03-25 05:33:57 +00:00
Peter Steinberger c22f3c514b test: collapse googlechat helper suites 2026-03-25 05:33:57 +00:00
SUMUKH 149c4683a3
fix: scope Telegram pairing code blocks (#52784) (thanks @sumukhj1219)
* Telegram: format pairing challenge for easier copy

* test: restore Telegram pairing chatId assertion

* fix: scope Telegram pairing code blocks (#52784) (thanks @sumukhj1219)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 11:03:33 +05:30
sfwn 9ab226d275 fix(discord): remove safety error listener after teardown to prevent leak 2026-03-24 22:31:03 -07:00
sfwn 731016472c fix(discord): prevent uncaught gateway errors from crashing the process
Move cleanup() after disconnect() in waitForDiscordGatewayStop so the
error listener is still active during disconnect. Add a safety error
listener in the lifecycle finally block to suppress late errors emitted
by Carbon during teardown.

Fixes the "Max reconnect attempts (0) reached after code 1006" uncaught
exception that kills the entire gateway process when a Discord WebSocket
drops and reconnection fails.
2026-03-24 22:31:03 -07:00
w-sss 247f82119c
fix: improve Telegram 403 membership delivery errors (#53635) (thanks @w-sss)
* fix(telegram): improve error messages for 403 bot not member errors

- Detect 403 'bot is not a member' errors specifically
- Provide actionable guidance for users to fix the issue
- Fixes #48273 where outbound sendMessage fails with 403

Root cause:
When a Telegram bot tries to send a message to a channel/group it's not
a member of, the API returns 403 'bot is not a member of the channel chat'.
The error message was not clear about how to fix this.

Fix:
1. Detect 403 errors in wrapTelegramChatNotFoundError
2. Provide clear error message explaining the issue
3. Suggest adding the bot to the channel/group

* fix(telegram): fix regex precedence for 403 error detection

- Group alternatives correctly: /403.*(bot.*not.*member|bot was blocked)/i
- Require 403 for both alternatives (previously bot.*blocked matched any error)
- Update error message to cover both scenarios
- Fixes Greptile review feedback

* fix(telegram): correct regex alternation precedence for 403 errors

- Fix: /403.*(bot.*not.*member|bot was blocked)/ → /403.*(bot.*not.*member|bot.*blocked)/
- Ensures 403 requirement applies to both alternatives
- Fixes Greptile review comment on PR #48650

* fix(telegram): add 'bot was kicked' to 403 error regex and message

* fix(telegram): preserve membership delivery errors

* fix: improve Telegram 403 membership delivery errors (#53635) (thanks @w-sss)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 10:59:29 +05:30
w-sss 0bdb8ac7ad fix(ui): add width/height to context-notice SVG icon
- Fixes #47924
- Prevents SVG icon from expanding and covering entire chat window
- Adds explicit 24x24px dimensions to context-notice__icon SVG

Root cause:
The SVG element lacked explicit width and height attributes,
causing it to expand to fill the parent container when the context
usage warning appears (at ~85% token limit).
2026-03-25 00:25:55 -05:00
Peter Steinberger 33d31e2b0d test: collapse imessage test suites 2026-03-25 05:21:16 +00:00
Peter Steinberger bc8622c659 test: collapse helper extension test suites 2026-03-25 05:21:16 +00:00
Peter Steinberger 6f137fff76 test: collapse telegram and whatsapp target suites 2026-03-25 05:21:16 +00:00
Ayaan Zaidi 793b36c5d2 fix: bootstrap proxy for LanceDB embeddings (#54119) (thanks @neeravmakwana) 2026-03-25 10:50:00 +05:30
Neerav Makwana 1a815e323c test(memory): unmock infra runtime cleanup 2026-03-25 10:50:00 +05:30
Neerav Makwana 09a4453026 fix(memory): bootstrap proxy for LanceDB embeddings 2026-03-25 10:50:00 +05:30
Jealous 2c3cf4f387 chore(tts): rename VOICE_BUBBLE identifiers to OPUS and update docs 2026-03-25 10:49:21 +05:30
Peter Steinberger 46d3617d25
refactor: split gateway plugin bootstrap and registry surfaces 2026-03-24 22:16:26 -07:00
Josh Avant 10161c2d79
Plugins: enforce terminal hook decision semantics for tool/message guards (#54241)
* Plugins: enforce terminal hook decision policies

* Tests: assert terminal hook behavior in integration paths

* Docs: clarify terminal hook decision semantics

* Docs: add hook guard semantics to plugin guides

* Tests: isolate outbound format label expectations

* changelog

Signed-off-by: joshavant <830519+joshavant@users.noreply.github.com>

---------

Signed-off-by: joshavant <830519+joshavant@users.noreply.github.com>
2026-03-25 00:11:13 -05:00
dongdong 5a5c5d4cde
fix: refresh DeepSeek pricing to current V3.2 rates (#54143) (thanks @arkyu2077)
* fix: add actual DeepSeek API pricing to model catalog

Replace zero-cost placeholder with real pricing from DeepSeek docs:
- deepseek-chat (V3): /bin/bash.27/1M input, .10/1M output, /bin/bash.07 cache read
- deepseek-reasoner (R1): /bin/bash.55/1M input, .19/1M output, /bin/bash.14 cache read

Fixes #54134

* fix: refresh DeepSeek pricing to current V3.2 rates

* fix: refresh DeepSeek pricing to current V3.2 rates (#54143) (thanks @arkyu2077)

---------

Co-authored-by: Jasmine Zhang <jasminezhang@192.168.1.75>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 10:34:03 +05:30
Quinn H. d43dda465d
fix: note marketplace streaming and ClawHub URL (#54160) (thanks @QuinnH496)
* fix: correct ClawHub URL in system prompt and use streaming download in marketplace

- Fix #54154: Change clawhub.com to clawhub.ai in system prompt
- Fix #54156: Replace arrayBuffer() with streaming pipeline for marketplace
  plugin downloads to avoid OOM on memory-constrained devices

* fix: guard marketplace archive stream body

* fix: note marketplace streaming and ClawHub URL (#54160) (thanks @QuinnH496)

---------

Co-authored-by: Li Enying <li.enying@openclaw.ai>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 10:29:21 +05:30
Peter Steinberger 61dd61e917
refactor: tighten split-runtime live-state guardrails 2026-03-24 21:58:50 -07:00
Peter Steinberger 94425764a8
refactor: centralize systemd unavailable classification 2026-03-24 21:57:48 -07:00
Jonathan Jing 30e80fb947
fix: isolate channel startup failures (#54215) (thanks @JonathanJing)
* fix(gateway): isolate channel startup failures to prevent cascade

When one channel (e.g., WhatsApp) fails to start due to missing runtime
modules, it should not block other channels (e.g., Discord) from starting.

Changes:
- Use Promise.allSettled to start channels concurrently
- Catch individual channel startup errors without affecting others
- Add startup summary logging for observability

Before: Sequential await startChannel() - if one throws, subsequent
channels never start.

After: Concurrent startup with per-channel error handling - all channels
attempt to start, failures are logged but don't cascade.

Fixes: P0 - WhatsApp runtime exception no longer blocks Discord startup

* fix(gateway): keep channel startup isolation sequential

* fix: isolate channel startup failures (#54215) (thanks @JonathanJing)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 10:22:42 +05:30
Peter Steinberger 8a463e7aa9 test: collapse helper plugin test suites 2026-03-25 04:52:36 +00:00
Peter Steinberger fe84148724 test: collapse messaging target test suites 2026-03-25 04:52:36 +00:00
Peter Steinberger 6e050808ef test: collapse channel setup test suites 2026-03-25 04:52:36 +00:00
Sally O'Malley e5d0d810e1
fixes for cli-containerized (#54223)
Signed-off-by: sallyom <somalley@redhat.com>
2026-03-25 00:51:55 -04:00
VACInc 1c9f62fad3
fix(gateway): restart sentinel wakes session after restart and preserves thread routing (#53940) thanks @VACInc
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
2026-03-24 23:47:21 -05:00