Repository navigation
fix(weixin): deliver files and videos to local and remote Agent sessions - #3645
Merged
Merged
Conversation
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.
Problem and behavior
Ordinary WeChat files and native videos were ignored, so sending a
.pemor video could submit an empty message to the Agent. Image download failures could also submit empty/partial input, and subsequent text could overtake a media download.Receive and decrypt
file_itemandvideo_itemattachments through the existing CDN protocol, save their unchanged bytes through the session-selected filesystem, and include the completed file path in the turn. Native videos arrive as.mp4files; video interpretation depends on the Agent's tools. The decoder distinguishes plaintext file lengths from ciphertextvideo_sizeand bounds each message to five files totaling 30 MiB.Files use unique directories, sanitized names, and POSIX
0700/0600permissions without overwriting workspace files. Failed media, unavailable workspaces, and pending-interaction conflicts produce visible errors. Per-peer ingress preserves receive order through media preparation and turn admission, then releases before model output or interactive replies. Queued input stays fenced to its account identity. Raw voice without transcripts and empty text receive an explicit notice; voice transcripts remain supported.Cross-device bot sessions negotiate
session_attachments_v1and transfer bytes through the existing encrypted device RPC lane. The execution host resolves the session workspace and returns its own path. Older targets explicitly request an upgrade. The additive wire command supports session-scoped, content-checked retries without overwrites; Debug logs exclude attachment contents. SSH workspaces use their selected filesystem and never fall back to local IO.Validation
remote-connectfeatures. The final native-video change passed 28 provider tests, 27 WeChat orchestration tests, and the i18n audit.pnpm run i18n:audit,pnpm run check:repo-hygiene, andgit diff --checkpassed.Checked refreshed upstream
mainand open PRs (including drafts) before implementation; no existing fix covered ordinary WeChat file input. The CDN file/video behavior follows the published@tencent-weixin/openclaw-weixinsources (2.4.8 and 2.4.10).