Commit Graph

389 Commits

Author SHA1 Message Date
Tak Hoffman c0c32445ab
fix(regression): restore feishu cold-runtime chunking 2026-03-27 21:17:17 -05:00
Peter Steinberger 90c50fd9d8 test: stabilize extension mocks for ci shards 2026-03-27 22:40:30 +00:00
Peter Steinberger 992b30604d refactor: move extension-owned tests to extensions 2026-03-27 21:37:09 +00:00
Jacob Tomlinson 2e23d44491
tests(feishu): reload chat tool after mock reset 2026-03-27 18:53:39 +00:00
Peter Steinberger 69e67a764d
refactor(feishu): remove docx table lint suppressions 2026-03-27 18:15:40 +00:00
Peter Steinberger 87dddb818d fix(ci): restore plugin runtime boundaries 2026-03-27 14:38:40 +00:00
Peter Steinberger 66a2e72bee fix: restore CI runtime seams 2026-03-27 14:07:01 +00:00
Ted Li 4d5f762b7d
fix: fall back from synthetic tool accounts (#55627) (thanks @MonkeyLeeT)
* feishu: fall back from synthetic tool accounts

* feishu: validate implicit tool accounts by config id

* fix: fall back from synthetic tool accounts (#55627) (thanks @MonkeyLeeT)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-27 15:09:36 +05:30
Peter Steinberger 7c00cc9d0a test: fix feishu batch insert test syntax 2026-03-27 07:10:55 +00:00
Peter Steinberger 854b71a4b0 test: fix feishu test typings 2026-03-27 07:10:55 +00:00
Ayaan Zaidi cfddce4196
fix(feishu): restore tsgo test typing 2026-03-27 12:13:59 +05:30
Ayaan Zaidi f2b2b12af4
test(feishu): type bot interaction fixtures 2026-03-27 11:54:23 +05:30
Ayaan Zaidi 59a25978dd
test(feishu): type reply lifecycle fixtures 2026-03-27 11:54:23 +05:30
Ayaan Zaidi 6ad50ce474
test(feishu): type tool harness fixtures 2026-03-27 11:54:23 +05:30
Ayaan Zaidi 1042710e3b
test(feishu): type policy fixtures 2026-03-27 11:54:23 +05:30
Ayaan Zaidi b23dc5073f
test(feishu): type basic fixtures 2026-03-27 11:54:23 +05:30
Ayaan Zaidi 9db096a98f
refactor(feishu): remove docx explicit-any escapes 2026-03-27 11:34:35 +05:30
Ayaan Zaidi 571d4d52e9
refactor(feishu): remove stale explicit-any escapes 2026-03-27 11:34:35 +05:30
Ayaan Zaidi f248fc8f86
refactor(feishu): type runtime payload seams 2026-03-27 11:34:35 +05:30
Ayaan Zaidi 9ce2dbe9aa
refactor(feishu): type sender drive and typing helpers 2026-03-27 11:34:35 +05:30
Ayaan Zaidi bd4ecbfe49
refactor(feishu): type docx and media sdk seams 2026-03-27 11:15:07 +05:30
Ayaan Zaidi 8b13710c09
refactor(plugin-sdk): expose zod subpath 2026-03-27 09:55:47 +05:30
Peter Steinberger f29c1206cd test: dedupe extension channel fixtures 2026-03-26 17:59:05 +00:00
Ayaan Zaidi 4b1c37a152
fix: avoid duplicate ACP Telegram finals (#55173)
* fix: avoid duplicate final ACP text on telegram

* fix: keep ACP final fallback for non-telegram blocks

* fix: count telegram ACP block replies as success

* fix: recover ACP final fallback after block failures

* fix: settle telegram ACP block delivery before fallback

* test: isolate ACP dispatch mocks under shared workers

* fix: prefer telegram provider for ACP visibility
2026-03-26 20:37:21 +05:30
Jacob Tomlinson 81c45976db
Feishu: reject legacy raw card command payloads (#55130)
* Feishu: reject legacy raw card callbacks

* Feishu: cover legacy text card payloads

* Docs: refresh config baseline

* CI: refresh PR checks

* Feishu: limit legacy card guard scope
2026-03-26 14:17:45 +00:00
Jacob Tomlinson 5e8cb22176
Feishu: validate webhook signatures before parsing (#55083)
* Feishu: validate webhook signatures before parsing

* Scripts: allow Feishu raw body guard callsite
2026-03-26 10:29:22 +00:00
Devin Robison 764394c78b
fix: enforce localRoots sandbox on Feishu docx upload file reads (#54693)
* fix: enforce localRoots sandbox on Feishu docx upload file reads

* Formatting fixes

* Update tests

* Feedback updates
2026-03-25 16:09:00 -06:00
Lin Z a0b9dc0078
fix(feishu): use message create_time for inbound timestamps (#52809)
* fix(feishu): use message create_time instead of Date.now() for Timestamp field

When a message is sent offline and later retried by the Feishu client
upon reconnection, Date.now() captures the *delivery* time rather than
the *authoring* time.  This causes downstream consumers to see a
timestamp that can be minutes or hours after the user actually composed
the message, leading to incorrect temporal semantics — for example, a
"delete this" command may target the wrong resource because the agent
believes the instruction was issued much later than it actually was.

Replace every Date.now() used for message timestamps with the original
create_time from the Feishu event payload (millisecond-epoch string),
falling back to Date.now() only when the field is absent.  The
definition is also hoisted to the top of handleFeishuMessage so that
both the pending-history path and the main inbound-payload path share
the same authoritative value.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test(feishu): verify Timestamp uses message create_time

Add two test cases:
1. When create_time is present, Timestamp must equal the parsed value
2. When create_time is absent, Timestamp falls back to Date.now()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: revert unrelated formatting change to lifecycle.test.ts

This file was inadvertently formatted in a prior commit. Reverting to
match main and keep the PR scoped to the Feishu timestamp fix only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(feishu): use message create_time for inbound timestamps (#52809) (thanks @schumilin)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
2026-03-25 08:36:12 -07:00
Lin Z bd4237c16c
fix(feishu): close WebSocket connections on monitor stop (#52844)
* fix(feishu): close WebSocket connections on monitor stop/abort

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test(feishu): add WebSocket cleanup tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(feishu): close WebSocket connections on monitor stop (#52844) (thanks @schumilin)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
2026-03-25 08:32:21 -07:00
Peter Steinberger b7f2b0d7b9
refactor: align pairing replies, daemon hints, and feishu mention policy 2026-03-25 04:22:53 -07:00
Peter Steinberger fac0a172e5 test: refresh pairing reply assertions for fenced codes (#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
Peter Steinberger bc8622c659 test: collapse helper extension test suites 2026-03-25 05:21:16 +00:00
Peter Steinberger 410c2dba65 test: collapse provider plugin suites 2026-03-25 04:25:02 +00:00
Peter Steinberger 83591fabfb test: consolidate plugin provider suites 2026-03-25 00:42:09 +00:00
Peter Steinberger f6205de73a
refactor: split feishu helpers and tests 2026-03-24 17:12:25 -07:00
Peter Steinberger 561acd1675
test: tighten shared card schema coverage 2026-03-24 17:04:07 -07:00
Peter Steinberger 3664c2ce46 fix: polish feishu retry helper (#43788) (thanks @lefarcen) 2026-03-24 16:55:37 -07:00
Elian b9f48707dc fix(feishu): prevent silent group message drops when bot-info probe times out
When OpenClaw restarts under load, the Feishu bot-info probe
(`/open-apis/bot/v3/info`) can exceed the 10-second timeout due to
event-loop contention during channel initialization. This leaves
`botOpenId` empty, causing `checkBotMentioned()` to return `false`
for every group message — silently dropping them all while DMs
continue to work fine.

Two fixes:

1. **Increase startup probe timeout from 10s to 30s** and make it
   configurable via `OPENCLAW_FEISHU_STARTUP_PROBE_TIMEOUT_MS` env var.
   The previous 10s budget was too tight when multiple channels
   (Slack, Discord, Feishu) initialize concurrently.

2. **Graceful degradation in `checkBotMentioned()`**: when `botOpenId`
   is unknown, return `true` (assume mentioned) instead of `false`.
   This prevents group messages from being silently discarded when the
   probe fails for any reason. The trade-off is that the bot may
   respond to non-@-mentioned messages temporarily until the next
   successful probe, which is far preferable to total silence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 16:55:37 -07:00
grassylcao ca578a9183 fix: mark card field as optional in message tool schema
The `createMessageToolCardSchema()` helper returned a bare `Type.Object()`
which TypeBox treats as required when merged into the parent tool schema via
`Type.Object({ card: ... })`. This caused schema validation to reject
media-only sends on Feishu and MSTeams with "must have required property
card", even though the implementation correctly treats card as optional.

Wrap the return value in `Type.Optional()` so the card field is excluded
from the JSON Schema `required` array. Fixes the catch-22 where omitting
card fails validation and including an empty card triggers the runtime
"does not support card with media" guard.

Closes #53697

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:53:56 -07:00
Peter Steinberger 6f6468027a refactor: dedupe test and runtime seams 2026-03-24 23:33:30 +00:00
Devin Robison 3031f061fc
Adjust Feishu webhook request body limits (#53933) 2026-03-24 15:02:05 -06:00
Peter Steinberger a4327ad544 refactor: dedupe tests and harden suite isolation 2026-03-24 19:16:19 +00:00
Peter Steinberger ba95d43e3c
refactor: split feishu runtime and inspect secret resolution 2026-03-24 10:05:15 -07:00
Han Pingtian a1cb302c20 Feishu: avoid CLI startup failure on unresolved SecretRef 2026-03-24 09:47:18 -07:00
Tao Xie 0b54b64fe7
fix(feishu): preserve docx block tree order (openclaw#40524)
Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm vitest run extensions/feishu/src/docx.test.ts

Co-authored-by: Tao Xie <7379039+TaoXieSZ@users.noreply.github.com>
2026-03-24 00:28:10 -05:00
Vincent Koc 29ad211e76
fix(plugins): unblock Discord/Slack message tool sends and Feishu media (#52991)
* fix(plugins): unblock Discord and Slack message tool payloads

* docs(changelog): note Discord Slack and Feishu message fixes
2026-03-23 09:04:57 -07:00
Peter Steinberger 6b9915a106
refactor!: drop legacy CLAWDBOT env compatibility 2026-03-22 22:13:39 -07:00
Peter Steinberger 583bea001c refactor: share parsed channel allowlist prompts 2026-03-23 01:56:01 +00:00