Invoice-Downloader
EthanYoQ
电子发票整理与报销准备工具:从邮箱批量收集 PDF/OFD/XML 发票,OCR 识别、分类归档并生成 Excel 汇总;提供 Windows/macOS 桌面版与 DSH 插件。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:wz1184197761/dsh-plugin-wremote
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Mirror a single window of a Windows desktop app (built for WeChat) into a DSH sidebar panel, with mouse, wheel, keyboard and text going back to the real window — plus six agent tools so the model can look at the screen and act on it.
The screen is not re-rendered, re-encoded or proxied through a third-party service: the panel shows
the same MJPEG frames the standalone wremote page shows, and clicks are replayed into the real
window through SendInput.
Windows only. Capture uses Windows Graphics Capture and input goes through
user32!SendInput. There is no macOS or Linux path.
The plugin is a bridge; it does not capture anything by itself. It talks to a small Python service
(wremote) over HTTP + WebSocket on 127.0.0.1:8098.
From a clone of this repository:
setup.cmd
It creates .venv, installs opencv-python, numpy, windows-capture, websockets, and starts
the service on port 8098. WeChat must be running — the service locates its main window by title.
To start it later without reinstalling:
.venv\Scripts\python.exe wremote\launch.py --port 8098 --fps 20 --quality 85
wremote\launch.py is idempotent: if the port is already listening it exits immediately, so it is
safe to call from a scheduled task or a shortcut.
dsh plugin add <path-to-this-repo>
Then reload the profile (or restart DSH) and open the WeChat mirror icon in the sidebar.
If you see "upstream not connected", the service from step 1 is not running — run setup.cmd
again, it will detect the port and only report status.
Everything lives in the config block of this plugin's entry (cordis.patch.yml):
| key | default | meaning |
|---|---|---|
host |
127.0.0.1 |
where the wremote service runs |
port |
8098 |
its port |
path |
/ |
websocket path (the service ignores it) |
autoConnect |
true |
connect as soon as the plugin loads |
reconnectMs |
4000 |
reconnect interval after a drop |
streamRetryMs |
1200 |
how often the <img> re-attaches after a stream error |
firstFrameTimeoutMs |
6000 |
how long a tool waits for the first frame |
idleGraceMs |
30000 |
drop the upstream connection this long after the last viewer leaves |
sendGeom |
true |
renegotiate the source window size when the panel goes fullscreen |
| tool | what it does |
|---|---|
wremote_status |
upstream connection, frame sequence, fps, frame size, last server hint |
wremote_screenshot |
grab the current frame and return it as an attachment |
wremote_click |
click at frame pixel x/y; double for double click, button for left/right/middle |
wremote_scroll |
wheel at x/y; positive delta scrolls up, one notch is 120 |
wremote_type |
type text into whatever currently has focus (unicode, no IME needed) |
wremote_key |
press one virtual key, e.g. 13=Enter, 27=Esc, 116=F5 |
The tools are registered in agent scope, so a session that does not use them does not pay for them.
DSH panel <-- MJPEG over HTTP --> DSH host (this plugin) <-- WebSocket --> wremote service
| |
+------------------- POST /api/wremote/input ----------------------------------+
SendInput into the real window
The plugin owns exactly one upstream WebSocket, shared by every viewer, and drops it after
idleGraceMs when nobody is watching. Frames are passed through untouched — no re-encode.
Details, including the geometry negotiation protocol and the debugging checklist, are in docs/DETAIL.md.
MIT — see LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: wechat。