dsh-read-animation: Enabling Agents to Truly 'See' Animated Images

Preface

In DeepSeek Harness (DSH), the common path for showing images to models is read_image or various multimodal plugins. The documentation states plainly: Harness normalizes every stored image into a single-frame 8-bit sRGB raster before handing it to the model, even for animated images. When testing with an 8-frame GIF, read_image typically only returns the first frame (pages=1), with the remaining frames discarded during normalization; even if upper-layer vision plugins claim to support GIF, they cannot recover the timeline that has already been lost.

dsh-read-animation (maintainer NeoHotaru, community-classified under model inference) targets exactly this pipeline: decoding animations while the bytes are still intact or can still be read from disk, letting the UI continue playing the original GIF/WebP you paste, while the model receives a sampled frame sequence with indices and time labels (or a single annotated grid image) rather than the silent first frame.

What This Is

In one sentence: a DeepSeek Harness plugin—pasted animated GIFs or WebP play normally in the interface, while the model side receives a time-evenly-sampled, labeled frame sequence description.

  • Name: dsh-read-animation (npm / plugin package name)
  • Maintainer: NeoHotaru
  • License: MIT (see package.json in the repository)
  • Directory page: https://www.skillhub.cn/plugins/NeoHotaru/dsh-read-animation
  • Source: https://github.com/NeoHotaru/dsh-read-animation

Community plugin directories are curated by sites like SkillHub and are not officially affiliated with DeepSeek / High-Flyer; installation and behavior should be based on the repository README and release packages.

Where the Problem Comes From

The mechanism summarized in the README is roughly as follows:

  1. The local attachment pipeline does not pass through image/gif; after re-encoding, sharp only keeps page 0.
  2. admitPromptContent performs single-frame normalization on images on the Host side, and the original multi-frame animation is lost here; afterwards, vision plugins, routing, or LLM adapters only see a static image.
  3. When pasting GIF/WebP into the chat box, the browser-side bytes can be uploaded intact, but Host normalization still destroys the animation; the plugin wraps a layer around admitPromptContent: decode and cache frames, still returning the original result externally, without modifying the message body you wrote.
  4. Animated PNG (APNG) is explicitly stated in the README: the currently-depended libvips cannot read acTL and other chunks, so the plugin identifies and rejects by name rather than silently providing only the first frame.

Therefore the capability must land at the moment when “the animation in the file is still complete” or “the original bytes are still retained on the paste/upload path”; the plugin returns the original file for browser playback on the display read path readImage, and constructs an annotated frame table on the model read path readImageRequest (built once and cached).

Core Features

Paste and UI Display

After pasting an animated image:

  • Message content remains unchanged; it won’t turn one animated image into multiple static images stuffed into the conversation.
  • The Web UI gets the original Blob and mediaType through session.readAttachment → Host readImage, and the browser plays the animation itself.
  • Each sampled frame carries an index and start time in the attachment display name (e.g., x.gif#frame16@1960ms), rendered by Harness to the model as Image "<name>" … format.

Model Side: Frame Table and Tools

Adapters fetch images through readImageRequest(ref, target, signal); the plugin composites multiple frames into one annotated grid image (README example: an 8-frame phone-ratio animation could be a 4×2 grid, each cell at original size, with frame number, duration, and start time printed below), and the same attachment yields consistent results across multiple requests.

Animations in the workspace or file attachments can use the tool read_animation(path, …): returns a text header (path, type, total frames, duration, fps, whether it loops, sampling description, etc.), then attaches descriptions and images per frame. You can specify frames indices via parameters or increase max_frames for denser sampling; the README explicitly states that motion between sampling gaps is invisible to avoid model misjudgment.

Versions and Environment

  • DSH: 0.1.3-alpha.2 or higher (engines.dsh is consistent with the README Install section; see COMPATIBILITY.md in the repo for details).
  • Node: ^22.19.0 || >=24.0.0 (package.json).
  • Currently fetched package version: 0.1.2 (subject to registry resolution when you actually add).

Installation and Activation

Replace web with the profile name you actually use. After installation, you must restart the running DSH instance; the plugin takes effect in the next process.

Installation method provided by the official README:

dsh plugin --profile web add dsh-read-animation

You can also install from a tagged Git commit (will copy the entire repository, including tests and fixtures; README recommends npm):

dsh plugin --profile web add github:NeoHotaru/dsh-read-animation#v0.1.0

Local checkout development chain (need to run npm install in that directory to pull sharp):

cd dsh-read-animation
npm install
dsh plugin --profile web add link:$PWD

The same spec can be used on the Web sidebar Plugins page; the plugin list in Settings is read-only. The plugin runs with the permissions of the current DSH process; review the source code and MIT license terms yourself before installing.

Typical Usage

Pasting Animated Images in Chat

  1. Install and restart DSH (--profile web or your profile).
  2. Paste GIF or animated WebP directly into the input box and send normally.
  3. The interface should continue playing the original animation; when asking questions to vision-capable models, the model side should receive sampled frames or a composite frame table, not just the first frame.

No additional description is needed in the message; the plugin does not modify the text you input.

Workspace Files: read_animation

Call the tool for animated image paths on disk (parameters based on runtime schema, README example logic as follows):

  • By default, evenly sample several frames on the timeline and explain in <content> which frame indices were attached.
  • When you need to focus on a specific moment, use frames to specify indices; increase max_frames for denser previews.

Return structure example (from README, replace paths with your environment):

<path>D:\work\dance.gif</path>
<type>animation</type>
<content>
image/gif animation, 480x270 px, 24 frames, 1200 ms total, ~20 fps, loops forever.
Attached below are 6 frames sampled evenly in time from this animation. ...
Only frames 0, 4, 9, 13, 18, 23 of 24 were sampled, ...
</content>

Then each sampled frame will have a similar title:

frame 9 of 24 (sample 3) · starts at 450 ms · displayed for 50 ms
[ image ]

Use Cases and Notes

Who It’s For

  • Developers who need Agents to understand UI animations, loading animations, short demo GIFs/WebPs.
  • Multimodal workflows already using the DSH Web profile and willing to supplement the “temporal dimension” information on the paste or read_animation paths.

Limitations and Notes

  • Don’t expect other plugins to “reverse-infer” animations after the Host has already single-framed them; this plugin intervenes at the admit / image-read request seams.
  • APNG is currently explicitly unsupported; it will reject rather than provide only the first frame.
  • Depends on native modules like sharp; if installation fails, check Node version and npm install per the README.
  • Community directory metadata like star counts change; at writing time GitHub showed about 2 stars, which is not a quality endorsement.

Conclusion

If your pain point is “animations in DSH only become the first frame,” dsh-read-animation binds decoding, UI playback, and model-side annotated sampling into the same plugin and aligns with the readImageRequest toolchain. For further understanding, open the community directory page and repository README (including Chinese README.zh.md).

  • Directory: https://www.skillhub.cn/plugins/NeoHotaru/dsh-read-animation
  • GitHub: https://github.com/NeoHotaru/dsh-read-animation
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye