dsh-codex-style-computer-use 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -22
- package/README.zh.md +46 -21
- package/icon.svg +29 -0
- package/lib/audit.js +7 -0
- package/lib/batch.js +14 -19
- package/lib/bin/attention-worker.exe +0 -0
- package/lib/bin/attention-worker.exe.json +1 -1
- package/lib/compact-feedback.js +175 -0
- package/lib/continuation.js +1 -1
- package/lib/core/bin/dsh-computer-use-worker.exe +0 -0
- package/lib/core/bin/dsh-computer-use-worker.exe.json +2 -2
- package/lib/core/compile-worker.ps1 +5 -1
- package/lib/core/index.js +452 -129
- package/lib/core/native-runtime.js +23 -1
- package/lib/core/winmd/Windows.winmd +0 -0
- package/lib/core/worker.cs +2415 -356
- package/lib/feedback-routes.json +11 -0
- package/lib/feedback.js +49 -16
- package/lib/image-output.js +59 -11
- package/lib/index.js +42 -7
- package/lib/key-command.js +37 -0
- package/lib/media-contract.js +43 -0
- package/lib/observations.js +267 -13
- package/lib/policy.js +30 -10
- package/lib/tool-contract.js +56 -0
- package/lib/tools.js +174 -51
- package/lib/verification-region.js +17 -0
- package/mcp/package.json +2 -1
- package/mcp/src/execution.js +8 -5
- package/mcp/src/index.js +16 -267
- package/mcp/src/tools.js +271 -0
- package/package.json +5 -2
- package/scripts/check-behavior.mjs +83 -0
- package/scripts/measure-tool-tokens.mjs +21 -0
- package/scripts/render-promo.py +81 -0
- package/skills/computer-use/SKILL.md +35 -8
- package/skills/computer-use/references/lifecycle.md +11 -7
- package/skills/computer-use/references/maintenance.md +9 -5
- package/skills/computer-use/references/precision.md +39 -14
- package/skills/computer-use/references/progressive-control.md +10 -4
- package/skills/computer-use/references/zero-uia-apps.md +54 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Zero-UIA apps: the WeChat 4.x case (measured 2026-11-04)
|
|
2
|
+
|
|
3
|
+
A worked example of the SKILL.md "Zero-UIA applications" ladder. Names and numbers below are
|
|
4
|
+
what was actually measured on this machine; treat them as the pattern, not as constants.
|
|
5
|
+
|
|
6
|
+
## The signal
|
|
7
|
+
|
|
8
|
+
`computer_uia` on WeChat 4.x returns ~8 elements: the window, a tiny pane, and one
|
|
9
|
+
`MMUIRenderSubWindowHW` pane — WeChat's own UI framework draws every real control off-screen.
|
|
10
|
+
No accessibility tree exists for the content at all. One query establishes this; more queries
|
|
11
|
+
will not change it.
|
|
12
|
+
|
|
13
|
+
## What worked, in order
|
|
14
|
+
|
|
15
|
+
1. **OCR the decision regions.** The search dropdown, the conversation-list rows, the chat
|
|
16
|
+
header: `computer_ocr` over each, pick entries by name, click box centers. This is the
|
|
17
|
+
cheap path and should be first.
|
|
18
|
+
2. **Keyboard flow for navigation.** `ctrl+f` focuses search; type; `enter` opens the result
|
|
19
|
+
page; `escape`/re-clicking closes it. The focus warning ("may not have reached its target",
|
|
20
|
+
"no editable pattern") fires on every keystroke here — expected false negative, the box is
|
|
21
|
+
below the custom surface.
|
|
22
|
+
3. **Crops only where looks matter.** The input-box content check before sending (compare the
|
|
23
|
+
pasted text character by character), the sent-bubble confirmation after.
|
|
24
|
+
|
|
25
|
+
## Traps measured on the way
|
|
26
|
+
|
|
27
|
+
- **Search language must match the UI language.** The client was Traditional Chinese: the
|
|
28
|
+
built-in assistant is 「檔案傳輸助手」 and a Simplified "档案传输" query returns only web
|
|
29
|
+
suggestions ("搜尋網路結果"). Search a language-invariant token, or skip search: after the
|
|
30
|
+
search page closes, the wanted conversation was simply row two of the list.
|
|
31
|
+
- **An IME garbles unicode typing.** A 37-char CJK message typed via `computer_type` (which had
|
|
32
|
+
fallen back to unicode — see below) went out as `【【试】】SH computer--se…`: characters
|
|
33
|
+
dropped, punctuation doubled. Clipboard paste (`ctrl+v`) delivers byte-exact.
|
|
34
|
+
- **Why auto-paste fell back to unicode that day:** the clipboard held a private format
|
|
35
|
+
(49161) the preservation lease cannot snapshot, and the old behaviour REFUSED to paste —
|
|
36
|
+
the JS auto-fallback then re-typed as unicode into the IME. Since 2026-11-04 the worker
|
|
37
|
+
downgrades to paste-without-restore + `clipboardWarning` instead of refusing; if you still
|
|
38
|
+
see `clipboardRestore:"skipped-unpreservable-clipboard"`, the old clipboard is gone — say so.
|
|
39
|
+
- **`delete`/`backspace` are destructive keys** (always require human approval; auto-refused
|
|
40
|
+
under approval-policy `never`). The search box's own ✕ button clears it without any chord.
|
|
41
|
+
- **Enter can move the foreground inside the app** (search page ↔ main window are different
|
|
42
|
+
HWNDs): a KICKOFF-FOCUS-REQUIRED after `enter` is normal — the refusal now names the actual
|
|
43
|
+
foreground (hwnd/pid/title); re-activate and continue.
|
|
44
|
+
- **A click that changes nothing is not always a miss**: clicking an already-focused input
|
|
45
|
+
box reports changedPct 0 with the caret already inside — read `focus`/`receiver` before
|
|
46
|
+
re-clicking. The warning text says the same.
|
|
47
|
+
|
|
48
|
+
## The verification discipline that saved the run
|
|
49
|
+
|
|
50
|
+
Before pressing `enter` to send: OCR/crop the input box and compare the text character by
|
|
51
|
+
character — the IME-garbled first message was only caught (too late) by the post-send bubble
|
|
52
|
+
crop. The corrected second message was verified BEFORE sending and went out byte-exact.
|
|
53
|
+
External side effects (messages, submits) always get the pre-send readback, not just the
|
|
54
|
+
post-send one.
|