Repository navigation
feat(feishu): let agents resend received stickers - #130374
Conversation
Add opt-in agent sticker sending using received file keys, preserve inbound keys, and stop unsupported sticker resource downloads. Reuse keyed-media delivery and canonical reply selection; inherit source topics only within the same destination and account. Related: #114578.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 5:35 PM ET / 21:35 UTC. ClawSweeper reviewWhat this changesThe PR adds an opt-in Feishu sticker action that resends a sticker already received by the same bot and fixes topic reply anchoring when a send target or account changes. Merge readinessThis protected maintainer PR appears coherent and has no concrete patch defect from source review, but it should stay open for human landing review until the queued exact-head checks complete. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Feishu plugin parses inbound sticker messages, makes an account-gated action visible to the agent, and routes that action through the plugin’s existing Feishu delivery and reply helpers. The output is a direct or threaded Feishu message plus a delivery receipt. flowchart LR
A[Inbound Feishu sticker] --> B[Sticker key parser]
B --> C[Agent message action]
C --> D[Account action gate]
D --> E[Reply and topic anchor]
E --> F[Feishu media sender]
F --> G[Feishu message API]
G --> H[Delivery receipt]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +36, Tests +346, Docs +50, Generated 0, Other 0. Total +432 across 16 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only after exact-head CI is green and a maintainer accepts the documented best-effort proof boundary; retain the default-off account gate and the explicit replacement-semantics documentation. Do we have a high-confidence way to reproduce the issue? Not applicable to the primary feature request; the included routing repair has source and local-test coverage, while authenticated Feishu delivery requires an authorized bot and received sticker key. Is this the best way to solve the issue? Yes, subject to pending contract and CI evidence: the feature stays in the owning Feishu plugin and reuses existing target, reply, and receipt paths rather than adding core or storage behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ce4a680544a3. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Pre-merge verification for The Feishu plugin now preserves received sticker keys and exposes an opt-in resend action through its existing keyed-media delivery owner. The same repair removes unsupported sticker downloads and duplicated direct file/audio/video sending. Topic routing is resolved once at the action owner, with same-destination/account checks, top-level opt-outs, and correct explicit-versus-implicit reply precedence. Current-head local commands: node scripts/run-vitest.mjs extensions/feishu/src/config-schema.test.ts extensions/feishu/src/channel.test.ts extensions/feishu/src/accounts.test.ts
node scripts/run-vitest.mjs extensions/feishu/src/message-content-loopback.test.ts extensions/feishu/src/bot.helpers.test.ts extensions/feishu/src/outbound.test.ts extensions/feishu/src/outbound-delivery.test.ts
node scripts/check-docs-config-examples.mjs
git diff --check c3d95c2d8071539aa66b4adce1da96ef8e32c3b4..HEADResults: 304 + 164 tests passed across seven current-head suites; the earlier broader run passed 814 tests across 15 suites on code-identical Exact-head CI run 33015456132 is green, including lint. Earlier manual lint attempts were interrupted by runner shutdowns; no source workaround was added. Production LOC is +126/-90 (net +36) for the new opt-in capability and routing boundary; tests are +357/-11. No persistence or schema-version change is present. ClawSweeper follow-through: account-action replacement semantics are documented and independently tested; SDK 1.73.0 source/types were directly inspected; the PR description now records changes, proof, and remaining risk. Authenticated Feishu delivery and screenshots remain unavailable because no authorized bot or received key exists. The maintainer explicitly accepted best-effort validation. The real SDK/Axios local HTTP fixture proves request shaping and reply behavior, not live vendor acceptance; that limitation is not hidden or presented as live proof. Scope clarification: this implements the received-sticker sending portion of #114578, not keyword-based search. The issue will remain open for that unimplemented portion; the PR no longer carries an auto-closing keyword. Proceeding through native preparation and pinned-head merge. Thanks @zw-xysk for #114578. |
|
Merged via squash.
|
* origin/main: (275 commits) fix(ai): require explicit compatible-provider endpoints (#130453) test(control-ui): guard the hand-mirrored theme --bg copies (#130444) fix(onboard): preserve the saved skills package manager (#130438) improve(worker): diagnose admission-deadline failures and widen daemon revalidation budget (#130435) fix(plugins): align diffs external install metadata (#130362) refactor(models): consolidate config normalization (#130439) fix(browser): accept common keyboard aliases (#130401) fix(release): refresh IMAP plugin baselines (#130351) fix(tests): type sticky model agent fixtures (#130441) fix(qa): track current Slack progress cards (#130354) feat(ui): refine the mobile composer (#130308) fix(ui): clarify gateway disconnect status in tab title (#130364) test(qa): await gateway startup before network probes (#130353) fix(qa): run Buzz profile scenarios with pooled credentials (#130316) fix(crabbox): keep the setup failure reason and name its phase (#130425) fix: dashboard tools target the wrong Gateway after admission (#130112) fix(ui): distinguish inherited model defaults from session pins (#120805) feat(feishu): let agents resend received stickers (#130374) refactor(models): prepare selection policy once (#130413) fix(ui): make dashboard side panels enter split view (#130426) ... # Conflicts: # test/scripts/docker-build-helper.test.ts
* feat(feishu): resend received stickers without losing topic routing Add opt-in agent sticker sending using received file keys, preserve inbound keys, and stop unsupported sticker resource downloads. Reuse keyed-media delivery and canonical reply selection; inherit source topics only within the same destination and account. Related: openclaw#114578. * fix(feishu): preserve topic mode for prepared implicit replies * docs(feishu): preserve account action gates when enabling stickers
Implements the received-sticker sending portion of #114578. Keyword-based sticker search remains unimplemented; keep the issue open for that remaining request.
What Problem This Solves
Feishu agents can react to messages but cannot resend a sticker. Received sticker keys are discarded, and the inbound path attempts a resource download that Feishu does not support.
Why This Change Was Made
Add the existing shared
stickeraction behindchannels.feishu.actions.sticker: true, also configurable per account. Send a receivedfile_keythroughfileIdor the firststickerId, using the same bot account that received it. Discovery and model guidance respect the selected account's opt-in.The Feishu plugin remains the owner: sticker delivery reuses the existing keyed-media sender, reply/fallback policy, and delivery receipts. This removes the duplicated direct file/audio/video send branch. Inbound and merged-forward content preserve a bounded, escaped sticker key without downloading resource bytes. No sticker-store search, upload, new dependency, cache, database, or core action/schema field is introduced.
Independent review also exposed an existing topic-routing defect: sending from a topic session to another chat could still address the source topic's message ID. The shared text/card/media/sticker anchor now inherits context only for the same conversation/provider/account, honors top-level opt-outs, and uses the existing outbound reply/thread selector for explicit routing.
Production LOC: +126/-90 (net +36) | Tests: +357/-11. The growth adds the new opt-in action and its routing boundary; generated metadata, the shrink-only assertion baseline, and documentation are counted separately.
User Impact
After enabling the action and sending a sticker to the bot, users can ask it to resend that sticker. Existing accounts remain opted out. An account-level
actionsobject retains the existing replacement semantics, so include any other desired action gates when overriding it. Text, media, and sticker actions no longer inherit an unrelated source topic when their destination or account changes.The official Lark message content reference documents
msg_type: "sticker", JSONfile_key, and the received-by-this-bot restriction. The pinned SDK 1.73.0 source and types independently match that request shape and explicitly exclude sticker resource downloads. See Feishu sticker replies for enablement.Evidence
437416a95137, a fresh independent account/config/channel run passed 304 tests and the lead's inbound/SDK-transport/outbound-delivery rerun passed 164 tests: 468 tests across seven suites rerun on the final head.reactions: falseis inherited when an account has no action override; account{sticker: true}retains the existing replacement semantics and restores reactions' default; the documented{reactions: false, sticker: true}example preserves the reaction gate while opting into stickers. No configuration migration or persisted-state change is required.git diff --check, generated channel metadata, and all 1,203 validated documentation configuration examples passed. The local changed gate passed its guards, doctor tests, boundary/dependency checks, and dead-export scans, then stopped at unrelated stale dependency type errors (Google SDK, markdown-it, and TUI declarations) in the shared worktree. A delegated Testbox attempt timed out during source sync before running checks and was stopped.fbbe8e0fe017ebe34d51ad87465b59cff8fe485e: build, production types, test types, JavaScript test lanes, configuration checks, and macOS Swift passed. The first lint attempt received a runner shutdown signal and exited 143 without a lint finding. After canceling the unrelated unfinished iOS lane, the targeted lint retry ended with the same shutdown signal and exit 143. Hosted lint remains incomplete; canceled iOS jobs are not passes, and this is not a green overall-CI claim.437416a95137e734a3c245397a76efcfdb97d88cadds only the account-action replacement warning and example requested by review. It changes no production code or tests; the documentation configuration check and docs-only autoreview passed. Normal exact-head PR CI run 33015456132 is green, including lint, build, types, and the selected plugin/configuration compatibility tests. This current-head run supersedes the incomplete older manual proof above.Review follow-through: the account-action documentation finding is addressed beside the opt-in example. No persistent data model changed: the generated metadata diff adds only the channel/account
actions.stickerbooleans, and the JSON in inbound tests is a message fixture, not stored state. The maintainer explicitly accepted best-effort validation because no authorized Feishu/Lark bot or received sticker key is available. Authenticated delivery remains unverified; the SDK fixture is not described as live proof.Proof boundary and landing prerequisites
An authenticated live Feishu/Lark send has not been performed. No authorized bot credentials and received sticker key are available. The maintainer explicitly directed proceeding with best-effort proof: failing/passing owner-boundary regressions, independent review, inspected vendor SDK/source contracts, and real SDK/Axios requests against a local HTTP fixture. This does not establish authenticated Feishu acceptance. A future live check should receive and resend a sticker into a direct chat and a topic using the same authorized bot account. Required exact-head CI and native landing validation remain prerequisites.
Thanks @zw-xysk for the feature request in #114578.