xstudio-linux 0.0.0-stage → 0.2.3
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/CHANGELOG.md +443 -0
- package/LICENSE +31 -0
- package/README.md +527 -2
- package/dist/adapter-cli/cli.d.ts +28 -0
- package/dist/adapter-cli/cli.js +235 -0
- package/dist/adapter-cli/cli.js.map +1 -0
- package/dist/adapter-mcp/server.d.ts +81 -0
- package/dist/adapter-mcp/server.js +477 -0
- package/dist/adapter-mcp/server.js.map +1 -0
- package/dist/config.d.ts +45 -0
- package/dist/config.js +78 -0
- package/dist/config.js.map +1 -0
- package/dist/core/catalog/pronunciation.d.ts +47 -0
- package/dist/core/catalog/pronunciation.js +402 -0
- package/dist/core/catalog/pronunciation.js.map +1 -0
- package/dist/core/catalog/singers.d.ts +46 -0
- package/dist/core/catalog/singers.js +122 -0
- package/dist/core/catalog/singers.js.map +1 -0
- package/dist/core/contracts.d.ts +348 -0
- package/dist/core/contracts.js +17 -0
- package/dist/core/contracts.js.map +1 -0
- package/dist/core/degrade/chain.d.ts +80 -0
- package/dist/core/degrade/chain.js +137 -0
- package/dist/core/degrade/chain.js.map +1 -0
- package/dist/core/diagnose/error-resolver.d.ts +51 -0
- package/dist/core/diagnose/error-resolver.js +202 -0
- package/dist/core/diagnose/error-resolver.js.map +1 -0
- package/dist/core/guard/skill-gate.d.ts +89 -0
- package/dist/core/guard/skill-gate.js +121 -0
- package/dist/core/guard/skill-gate.js.map +1 -0
- package/dist/core/midi/convert.d.ts +31 -0
- package/dist/core/midi/convert.js +125 -0
- package/dist/core/midi/convert.js.map +1 -0
- package/dist/core/midi/smf.d.ts +37 -0
- package/dist/core/midi/smf.js +422 -0
- package/dist/core/midi/smf.js.map +1 -0
- package/dist/core/render/artifacts.d.ts +37 -0
- package/dist/core/render/artifacts.js +417 -0
- package/dist/core/render/artifacts.js.map +1 -0
- package/dist/core/render/orchestrator.d.ts +110 -0
- package/dist/core/render/orchestrator.js +974 -0
- package/dist/core/render/orchestrator.js.map +1 -0
- package/dist/core/svip/codec.d.ts +30 -0
- package/dist/core/svip/codec.js +664 -0
- package/dist/core/svip/codec.js.map +1 -0
- package/dist/core/svip/document.d.ts +31 -0
- package/dist/core/svip/document.js +158 -0
- package/dist/core/svip/document.js.map +1 -0
- package/dist/core/svip/editor.d.ts +71 -0
- package/dist/core/svip/editor.js +245 -0
- package/dist/core/svip/editor.js.map +1 -0
- package/dist/core/svip/model.d.ts +74 -0
- package/dist/core/svip/model.js +158 -0
- package/dist/core/svip/model.js.map +1 -0
- package/dist/core/svip/tick.d.ts +21 -0
- package/dist/core/svip/tick.js +59 -0
- package/dist/core/svip/tick.js.map +1 -0
- package/dist/core/svip/validator.d.ts +39 -0
- package/dist/core/svip/validator.js +267 -0
- package/dist/core/svip/validator.js.map +1 -0
- package/dist/host/linux.d.ts +15 -0
- package/dist/host/linux.js +42 -0
- package/dist/host/linux.js.map +1 -0
- package/dist/host/sidecar.d.ts +61 -0
- package/dist/host/sidecar.js +365 -0
- package/dist/host/sidecar.js.map +1 -0
- package/dist/host/wine-launch.d.ts +60 -0
- package/dist/host/wine-launch.js +77 -0
- package/dist/host/wine-launch.js.map +1 -0
- package/dist/host/wine-paths.d.ts +30 -0
- package/dist/host/wine-paths.js +103 -0
- package/dist/host/wine-paths.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/services.d.ts +55 -0
- package/dist/services.js +78 -0
- package/dist/services.js.map +1 -0
- package/dist/shared/errors.d.ts +61 -0
- package/dist/shared/errors.js +125 -0
- package/dist/shared/errors.js.map +1 -0
- package/dist/shared/paths.d.ts +8 -0
- package/dist/shared/paths.js +30 -0
- package/dist/shared/paths.js.map +1 -0
- package/dist/shared/schema.d.ts +26 -0
- package/dist/shared/schema.js +68 -0
- package/dist/shared/schema.js.map +1 -0
- package/dist/shared/types.d.ts +43 -0
- package/dist/shared/types.js +19 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/tests/unit/artifacts.test.d.ts +1 -0
- package/dist/tests/unit/artifacts.test.js +243 -0
- package/dist/tests/unit/artifacts.test.js.map +1 -0
- package/dist/tests/unit/data-plane.test.d.ts +1 -0
- package/dist/tests/unit/data-plane.test.js +153 -0
- package/dist/tests/unit/data-plane.test.js.map +1 -0
- package/dist/tests/unit/degrade.test.d.ts +1 -0
- package/dist/tests/unit/degrade.test.js +133 -0
- package/dist/tests/unit/degrade.test.js.map +1 -0
- package/dist/tests/unit/diagnosis.test.d.ts +1 -0
- package/dist/tests/unit/diagnosis.test.js +66 -0
- package/dist/tests/unit/diagnosis.test.js.map +1 -0
- package/dist/tests/unit/errors.test.d.ts +1 -0
- package/dist/tests/unit/errors.test.js +83 -0
- package/dist/tests/unit/errors.test.js.map +1 -0
- package/dist/tests/unit/mcp-server.test.d.ts +1 -0
- package/dist/tests/unit/mcp-server.test.js +267 -0
- package/dist/tests/unit/mcp-server.test.js.map +1 -0
- package/dist/tests/unit/mcp-smoke.d.ts +6 -0
- package/dist/tests/unit/mcp-smoke.js +7 -0
- package/dist/tests/unit/mcp-smoke.js.map +1 -0
- package/dist/tests/unit/mcp-smoke.test.d.ts +1 -0
- package/dist/tests/unit/mcp-smoke.test.js +196 -0
- package/dist/tests/unit/mcp-smoke.test.js.map +1 -0
- package/dist/tests/unit/midi.test.d.ts +1 -0
- package/dist/tests/unit/midi.test.js +255 -0
- package/dist/tests/unit/midi.test.js.map +1 -0
- package/dist/tests/unit/pronunciation.test.d.ts +1 -0
- package/dist/tests/unit/pronunciation.test.js +83 -0
- package/dist/tests/unit/pronunciation.test.js.map +1 -0
- package/dist/tests/unit/registry-contract.test.d.ts +1 -0
- package/dist/tests/unit/registry-contract.test.js +114 -0
- package/dist/tests/unit/registry-contract.test.js.map +1 -0
- package/dist/tests/unit/render-orchestrator.test.d.ts +1 -0
- package/dist/tests/unit/render-orchestrator.test.js +548 -0
- package/dist/tests/unit/render-orchestrator.test.js.map +1 -0
- package/dist/tests/unit/sidecar.test.d.ts +1 -0
- package/dist/tests/unit/sidecar.test.js +299 -0
- package/dist/tests/unit/sidecar.test.js.map +1 -0
- package/dist/tests/unit/singers.test.d.ts +1 -0
- package/dist/tests/unit/singers.test.js +73 -0
- package/dist/tests/unit/singers.test.js.map +1 -0
- package/dist/tests/unit/skill-gate.test.d.ts +1 -0
- package/dist/tests/unit/skill-gate.test.js +182 -0
- package/dist/tests/unit/skill-gate.test.js.map +1 -0
- package/dist/tests/unit/svip-codec.test.d.ts +1 -0
- package/dist/tests/unit/svip-codec.test.js +182 -0
- package/dist/tests/unit/svip-codec.test.js.map +1 -0
- package/dist/tests/unit/svip-document.test.d.ts +1 -0
- package/dist/tests/unit/svip-document.test.js +137 -0
- package/dist/tests/unit/svip-document.test.js.map +1 -0
- package/dist/tests/unit/svip-editor.test.d.ts +1 -0
- package/dist/tests/unit/svip-editor.test.js +275 -0
- package/dist/tests/unit/svip-editor.test.js.map +1 -0
- package/dist/tests/unit/svip-tick.test.d.ts +1 -0
- package/dist/tests/unit/svip-tick.test.js +66 -0
- package/dist/tests/unit/svip-tick.test.js.map +1 -0
- package/dist/tools/common.d.ts +80 -0
- package/dist/tools/common.js +167 -0
- package/dist/tools/common.js.map +1 -0
- package/dist/tools/control.d.ts +21 -0
- package/dist/tools/control.js +376 -0
- package/dist/tools/control.js.map +1 -0
- package/dist/tools/data.d.ts +37 -0
- package/dist/tools/data.js +680 -0
- package/dist/tools/data.js.map +1 -0
- package/dist/tools/definition.d.ts +60 -0
- package/dist/tools/definition.js +44 -0
- package/dist/tools/definition.js.map +1 -0
- package/dist/tools/degrade.d.ts +3 -0
- package/dist/tools/degrade.js +30 -0
- package/dist/tools/degrade.js.map +1 -0
- package/dist/tools/guide.d.ts +10 -0
- package/dist/tools/guide.js +66 -0
- package/dist/tools/guide.js.map +1 -0
- package/dist/tools/open.d.ts +3 -0
- package/dist/tools/open.js +74 -0
- package/dist/tools/open.js.map +1 -0
- package/dist/tools/probe.d.ts +8 -0
- package/dist/tools/probe.js +132 -0
- package/dist/tools/probe.js.map +1 -0
- package/dist/tools/registry.d.ts +10 -0
- package/dist/tools/registry.js +16 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.js +19 -0
- package/dist/version.js.map +1 -0
- package/docs/DESIGN.md +553 -0
- package/docs/RECON-GUI.md +271 -0
- package/docs/RECON.md +339 -0
- package/docs/SPEC.md +786 -0
- package/docs/WINE.md +192 -0
- package/examples/.scratch/01-midi-to-wudi/wudi-demo.svip3 +0 -0
- package/examples/.scratch/01-midi-to-wudi/wudi-melody.mid +0 -0
- package/examples/.scratch/01-midi-to-wudi/wudi-roundtrip.mid +0 -0
- package/examples/.scratch/02-three-singers/melody.chenziyu.svip3 +0 -0
- package/examples/.scratch/02-three-singers/melody.hechang.svip3 +0 -0
- package/examples/.scratch/02-three-singers/melody.svip3 +0 -0
- package/examples/.scratch/02-three-singers/melody.wudi.svip3 +0 -0
- package/examples/.scratch/03-velocity-diction/phrase.svip3 +0 -0
- package/examples/.scratch/03-velocity-diction/phrase.svip3.bak.20261206-163755-200 +0 -0
- package/examples/.scratch/03-velocity-diction/phrase.svip3.bak.20261206-163755-203 +0 -0
- package/examples/.scratch/03-velocity-diction/phrase.svip3.bak.20261206-163755-204 +0 -0
- package/examples/.scratch/04-unknown-dialog-abort/dialog-demo.svip3 +0 -0
- package/examples/01-midi-to-wudi.mjs +144 -0
- package/examples/02-three-singers-compare.mjs +140 -0
- package/examples/03-velocity-diction-rerender.mjs +160 -0
- package/examples/04-unknown-dialog-abort.mjs +126 -0
- package/examples/README.md +101 -0
- package/examples/lib/harness.mjs +274 -0
- package/fixtures/midi/melody-480.mid +0 -0
- package/fixtures/midi/melody-96.mid +0 -0
- package/fixtures/svip/1.svip3 +0 -0
- package/fixtures/svip/3.svip3 +0 -0
- package/fixtures/uia/README.md +37 -0
- package/fixtures/uia/export-dialog.snapshot.json +446 -0
- package/fixtures/uia/main-window.snapshot.json +2997 -0
- package/fixtures/uia/open-dialog.snapshot.json +103 -0
- package/icon.svg +10 -0
- package/package.json +84 -4
- package/proto/xstudio.proto +128 -0
- package/scripts/check-contract.mjs +184 -0
- package/scripts/entry-smoke.mjs +26 -0
- package/scripts/inspect-svip.mjs +161 -0
- package/scripts/setup-venv.sh +93 -0
- package/scripts/wine-gui-probe.py +302 -0
- package/sidecar/xstudio_uia.py +1478 -0
- package/skills/xstudio-gui/SKILL.md +194 -0
- package/skills/xstudio-gui/assertions.md +103 -0
- package/skills/xstudio-gui/dialogs.md +90 -0
- package/skills/xstudio-gui/gestures.md +158 -0
- package/skills/xstudio-gui/ui-map.json +242 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# RECON-GUI — live verification of the X Studio UIA layer
|
|
2
|
+
|
|
3
|
+
Status: working notes for the F layer (`sidecar/uia.ps1`, `src/host/sidecar.ts`,
|
|
4
|
+
`src/core/render/*`, `skills/xstudio-gui/`). This file separates what was
|
|
5
|
+
**proven live** from what is **implemented but unverified**, so no claim in the
|
|
6
|
+
plugin exceeds its evidence. It supersedes the "Qt widget tree unverified" note
|
|
7
|
+
in [RECON.md §5](RECON.md#5-uia-feasibility) — that question is now answered
|
|
8
|
+
(see §2).
|
|
9
|
+
|
|
10
|
+
Capture date: 2026-10-18 (Asia/Shanghai). X Studio 1.2.7, NetEase Cloud Music
|
|
11
|
+
edition, running as PID 22324, window class `Qt622QWindowIcon`, DPI 120 (125%).
|
|
12
|
+
|
|
13
|
+
## 1. Method and safety envelope
|
|
14
|
+
|
|
15
|
+
All live probes were **read-only**: `probe`, `snapshot`, `assert` (element/text
|
|
16
|
+
state), `readDialog`, plus the orchestrator's `wait()` polling (which only reads
|
|
17
|
+
snapshot/dialog state). No menu was clicked, no playback was started and no
|
|
18
|
+
export was run against the user's open project during this verification round.
|
|
19
|
+
|
|
20
|
+
Where a capability requires a UI action that would change the user's session
|
|
21
|
+
(open a file dialog, start a render, confirm an export), the evidence comes from
|
|
22
|
+
the **earlier read-only recon session** (team-5a10f17a):
|
|
23
|
+
|
|
24
|
+
- extracted tool results: `C:/Users/HP/Documents/deepseek-harness/plugins-dev/_probe/recon-gui-results.txt`
|
|
25
|
+
- raw probe scripts: `C:/Users/HP/Documents/deepseek-harness/plugins-dev/_probe/recon-ps1/*.ps1`
|
|
26
|
+
- checked-in fixtures: [`fixtures/uia/`](../fixtures/uia/README.md)
|
|
27
|
+
|
|
28
|
+
Those recon captures were made by opening menus / the export dialog read-only and
|
|
29
|
+
then cancelling them (no project modification). They are marked
|
|
30
|
+
**verified-recon** below.
|
|
31
|
+
|
|
32
|
+
## 2. The Qt widget tree IS reachable through UIA (was unverified, now verified)
|
|
33
|
+
|
|
34
|
+
Earlier recon (RECON.md §5) could not tell whether Qt internals were visible
|
|
35
|
+
because a modal native file dialog was open on top of the Qt window. With no
|
|
36
|
+
dialog open, a plain descendant walk of the main window returns a complete
|
|
37
|
+
widget tree:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
probe() -> running:true pid:22324 title:'网易云音乐·X Studio - <project>.svip3'
|
|
41
|
+
class:'Qt622QWindowIcon' dpi:120 bounds:{177,92,1583,860} minimized:false
|
|
42
|
+
snapshot() -> 131 elements, truncated:false, warnings:[]
|
|
43
|
+
control types: 54 Group, 33 CheckBox, 10 ListItem, 7 Button, 7 MenuItem,
|
|
44
|
+
3 Custom, 3 Edit, 3 Window, 2 List, 2 Spinner, 2 Text,
|
|
45
|
+
1 Image, 1 MenuBar, 1 StatusBar, 1 Thumb, 1 ToolBar
|
|
46
|
+
class names : QWidget, QPushButton, QRadioButton, QAction, QFrame, QLabel,
|
|
47
|
+
QLineEdit, QCheckBox, QTimeEdit, QDockWidget, QMenuBar,
|
|
48
|
+
QStatusBar, QSizeGrip, QListWidget; xstudio::CreateMainWindow,
|
|
49
|
+
xstudio::TopToolBar, xstudio::TrackArea, xstudio::TrackWidget,
|
|
50
|
+
xstudio::TrackSingerWidget, xstudio::TrackSingerList,
|
|
51
|
+
xstudio::PianoArea, xstudio::PianoWidget, xstudio::PianoToolBar,
|
|
52
|
+
xstudio::ParamsArea, xstudio::LoadingWidget,
|
|
53
|
+
xstudio::SingerListWidget, xstudio::SingerSearchWidget,
|
|
54
|
+
xstudio::VolumeSetWidget
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Every checked-in element identity in
|
|
58
|
+
[`skills/xstudio-gui/ui-map.json`](../skills/xstudio-gui/ui-map.json) comes from
|
|
59
|
+
this live snapshot. Full evidence:
|
|
60
|
+
[`fixtures/uia/main-window.snapshot.json`](../fixtures/uia/main-window.snapshot.json).
|
|
61
|
+
|
|
62
|
+
**Verified live:** the main window + top bar (transport, BPM/time/beat fields),
|
|
63
|
+
menu bar (7 top-level items), track area, piano-roll dock, singer-library dock,
|
|
64
|
+
status bar, window-level `Invoke/Value/Window/Transform` patterns, `TogglePattern`
|
|
65
|
+
state (`play_or_pause_btn_` reported `Off`), `ValuePattern` values
|
|
66
|
+
(`bpm_edit` = `120.0`), AutomationIds on ~100 controls.
|
|
67
|
+
|
|
68
|
+
**Caveat:** the piano-roll note canvas (`xstudio::PianoWidget`) exposes only an
|
|
69
|
+
empty `QWidget` child; individual notes are not UIA elements. That is by design —
|
|
70
|
+
note editing belongs to the data plane (§6.1 of the spec).
|
|
71
|
+
|
|
72
|
+
## 3. Sidecar protocol — verified live
|
|
73
|
+
|
|
74
|
+
`sidecar/uia.ps1` (PowerShell 7.6.6 / .NET 10.0.12) was spawned exactly the way
|
|
75
|
+
`src/host/sidecar.ts` does it and driven with newline-delimited JSON:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
-> {"id":"r1","method":"probe","params":{}}
|
|
79
|
+
<- {"id":"r1","ok":true,"data":{"running":true,"foreground":false,...,"pid":22324,...}}
|
|
80
|
+
-> {"id":"r2","method":"snapshot","params":{"maxElements":300}}
|
|
81
|
+
<- {"id":"r2","ok":true,"data":{"window":{...},"elements":[...131...],"truncated":false,...}}
|
|
82
|
+
-> {"id":"r3","method":"assert","params":{"ref":"<snapshot>:e1","state":"exists"}}
|
|
83
|
+
<- {"id":"r3","ok":true,"data":{"ok":true,"actual":"...e1 exists",...}}
|
|
84
|
+
-> {"id":"r4","method":"assert","params":{"text":"文件"}}
|
|
85
|
+
<- {"id":"r4","ok":true,"data":{"ok":true,"actual":"[...:e126] ControlType.MenuItem '文件'",...}}
|
|
86
|
+
-> {"id":"r5","method":"assert","params":{"ref":"deadbeef:e1","state":"exists"}}
|
|
87
|
+
<- {"id":"r5","ok":false,"error":{"code":"GUI_REF_NOT_FOUND","message":"Ref ... is from an older snapshot ..."}}
|
|
88
|
+
-> {"id":"r6","method":"readDialog","params":{}}
|
|
89
|
+
<- {"id":"r6","ok":true,"data":null}
|
|
90
|
+
-> {"id":"r9","method":"close","params":{}}
|
|
91
|
+
<- {"id":"r9","ok":true,"data":{"ok":true,"detail":"sidecar closing"}} (process exits 0)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Verified: UTF-8 framing (Chinese names round-trip), request/response correlation,
|
|
95
|
+
snapshot-scoped refs with stale-ref rejection (`GUI_REF_NOT_FOUND`), structured
|
|
96
|
+
error envelope, `assert` (element + window text), `readDialog` returning `null`
|
|
97
|
+
when no dialog is open, clean `close`/exit. Through the compiled Node client the
|
|
98
|
+
same run also proved `probe()`, `snapshot()`, `assert()`, `readDialog()` and the
|
|
99
|
+
render orchestrator's `wait()` read-only polling.
|
|
100
|
+
|
|
101
|
+
## 4. Menu paths — verified-recon
|
|
102
|
+
|
|
103
|
+
Observed by expanding each menu read-only in the prior recon session (items were
|
|
104
|
+
enumerated, then the menu was collapsed; nothing was invoked):
|
|
105
|
+
|
|
106
|
+
| Menu | Items |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| 网易云音乐·X Studio | 关于网易云音乐 · X Studio, 偏好设置, 软件官网 |
|
|
109
|
+
| 文件 | 新建, **打开工程**, 最近打开, 保存, 另存为, 导入, **导出** |
|
|
110
|
+
| 编辑 | 全选, 取消选择, 撤销, 恢复, 剪切, 复制, 粘贴, 克隆, 删除, 分割 |
|
|
111
|
+
| 轨道 | 新建演唱轨, 新建音频轨, 新建说唱轨 |
|
|
112
|
+
| 视图 | 歌手列表, 历史记录, 素材库, 虚拟键盘, 曲速、拍号、调号 |
|
|
113
|
+
| 工具 | 人声伴奏分离, 手动测速, 人声转midi, 修改人声转换地址 |
|
|
114
|
+
| 帮助 | 授权文档, 用户反馈, 快捷键, 功能介绍, 使用教程, 常见问题, 网络诊断, 示例工程 |
|
|
115
|
+
|
|
116
|
+
File submenus (verified-recon):
|
|
117
|
+
|
|
118
|
+
- 导出 → **导出音频**, 导出midi
|
|
119
|
+
- 导入 → 导入音频, 导入midi
|
|
120
|
+
- 最近打开 → the two recent projects
|
|
121
|
+
|
|
122
|
+
The spec's `插入 → 伴奏` path does **not** exist in build 1.2.7; the observed
|
|
123
|
+
equivalent is `文件 → 导入 → 导入音频` (documented in
|
|
124
|
+
[gestures.md](../skills/xstudio-gui/gestures.md) §5, unverified end-to-end).
|
|
125
|
+
|
|
126
|
+
## 5. Export settings dialog — verified-recon (tree + patterns), unverified (confirmation)
|
|
127
|
+
|
|
128
|
+
The dialog was opened once via `文件 → 导出 → 导出音频`, fully captured, then
|
|
129
|
+
cancelled with its `取消` button:
|
|
130
|
+
|
|
131
|
+
- window: `ExportAudioSettingDialog`, class `xstudio::ExportAudioSettingDialog`,
|
|
132
|
+
automationId prefix
|
|
133
|
+
`create_main_window.top_bar.xstudio__TopToolBar.xstudio__ExportAudioSettingDialog`.
|
|
134
|
+
- 45 elements, including: `导出设置` label, `file_name_edit` (value `2`),
|
|
135
|
+
`file_path_label` (value `C:/Users/HP/Downloads`), `file_save_bt`,
|
|
136
|
+
`导出范围` radio `全部`/`选中区域`, `导出轨道` radio `合并`/`分轨`,
|
|
137
|
+
`声道` radio `单声道`/`立体声`, format/bitrate/sample-rate custom combos with
|
|
138
|
+
labels `MP3`, `192k bps`, `48.000 kHz`, and `取消` / `确认` buttons.
|
|
139
|
+
- patterns captured per element: `Invoke`, `Value`, `Text`, `Toggle`,
|
|
140
|
+
`SelectionItem` (radio buttons), `Window`.
|
|
141
|
+
|
|
142
|
+
**Unverified:** the format/bitrate/sample-rate *popup menus* were not captured
|
|
143
|
+
(the probe that tried to open them failed to compile); the folder-picker flow was
|
|
144
|
+
never exercised; and the `确认` (export) step was intentionally not run against
|
|
145
|
+
the user's project. `RenderOrchestrator.runExport` therefore:
|
|
146
|
+
treats the current combo labels as authoritative, only selects a different value
|
|
147
|
+
via a popup item it can actually see, and refuses (`EXPORT_FAILED`) when the
|
|
148
|
+
storage path differs from the requested `out_dir` instead of writing elsewhere.
|
|
149
|
+
|
|
150
|
+
Reconstructed evidence:
|
|
151
|
+
[`fixtures/uia/export-dialog.snapshot.json`](../fixtures/uia/export-dialog.snapshot.json).
|
|
152
|
+
|
|
153
|
+
## 6. Open-project dialog — verified-recon (tree), unverified (typing + confirm)
|
|
154
|
+
|
|
155
|
+
`文件 → 打开工程` opens the **native Win32 common file dialog**:
|
|
156
|
+
|
|
157
|
+
- window class `#32770`, title `打开工程`, native handle was captured.
|
|
158
|
+
- all controls surface as `Pane` elements; their `AutomationId` is the Win32
|
|
159
|
+
control id: `1148` = filename edit, `1136` = file-type combo
|
|
160
|
+
(`网易云音乐·X Studio Project (*.svip3 *.svip)`), `1` = `打开(O)`,
|
|
161
|
+
`2` = `取消`.
|
|
162
|
+
- the dialog was closed read-only with `WM_CLOSE` afterwards.
|
|
163
|
+
|
|
164
|
+
Important behaviour discovered during recon: `InvokePattern.Invoke()` on the
|
|
165
|
+
`打开工程` menu item **blocks** while the modal dialog is open (the recon call
|
|
166
|
+
timed out with COM `0x80131505`, while the dialog appeared correctly). The
|
|
167
|
+
sidecar therefore dispatches modal-opening invokes on a secondary runspace with a
|
|
168
|
+
2.5 s timeout and answers `dispatched`; callers poll `readDialog()`/`snapshot`.
|
|
169
|
+
This is why `xstudio_preview_trigger` is two-phase.
|
|
170
|
+
|
|
171
|
+
**Unverified:** typing the project path into id `1148` and confirming with id `1`
|
|
172
|
+
was never exercised live (it would change the user's open project). The
|
|
173
|
+
orchestrator implements it with UIA ValuePattern first and a native
|
|
174
|
+
`GetDlgItem(1148)` + `WM_SETTEXT` / `BM_CLICK(1)` fallback, because .NET Core's
|
|
175
|
+
`UIAutomationClient` does **not** ship `LegacyIAccessiblePattern` (verified: the
|
|
176
|
+
managed type does not exist in `UIAutomationClient.dll` 10.0.0.0), so classic
|
|
177
|
+
Win32 controls need the native fallback.
|
|
178
|
+
|
|
179
|
+
Reconstructed evidence:
|
|
180
|
+
[`fixtures/uia/open-dialog.snapshot.json`](../fixtures/uia/open-dialog.snapshot.json).
|
|
181
|
+
|
|
182
|
+
## 7. Render / playback — element verified, end-to-end unverified
|
|
183
|
+
|
|
184
|
+
Verified live: `play_or_pause_btn_` exists, is enabled, reports
|
|
185
|
+
`Invoke/Value/Toggle` patterns and `toggleState: "Off"`; the piano-roll toolbar
|
|
186
|
+
contains `xstudio::LoadingWidget` (`render_loading`); the playhead fields
|
|
187
|
+
(`time_control_`, `beat_control`) report values; the transport also exposes
|
|
188
|
+
`stop_btn_`, `record_midi_btn_`, `loop_btn_`.
|
|
189
|
+
|
|
190
|
+
**Unverified:** the actual cloud render request/completion cycle (starting
|
|
191
|
+
playback on the user's project was out of scope for this verification round; the
|
|
192
|
+
render happens on the vendor cloud and needs a login/network). Completion
|
|
193
|
+
heuristics implemented: play toggle `On`→`Off`, a progress bar reaching 100 %, or
|
|
194
|
+
an idle state after having seen playback. Cloud error text in dialogs/toasts maps
|
|
195
|
+
to `CLOUD_UNREACHABLE`.
|
|
196
|
+
|
|
197
|
+
## 8. Dependency / environment facts (verified)
|
|
198
|
+
|
|
199
|
+
| Item | Result |
|
|
200
|
+
| --- | --- |
|
|
201
|
+
| PowerShell | `pwsh` 7.6.6, .NET 10.0.12 (bundled DSH runtime) |
|
|
202
|
+
| UIA assemblies | `Add-Type -AssemblyName UIAutomationClient,UIAutomationTypes` loads from the profile's `@dsh-ops/pwsh-win32-x64` |
|
|
203
|
+
| `LegacyIAccessiblePattern` | **absent** from the .NET Core UIAutomationClient managed surface; native dialogs use the Win32 fallback instead |
|
|
204
|
+
| DPI awareness | `SetProcessDpiAwarenessContext(PER_MONITOR_AWARE_V2)` succeeds; UIA rectangles are physical pixels (DPI 120) |
|
|
205
|
+
| Screenshots | `System.Drawing.CopyFromScreen` over the window rectangle worked during recon (screenshots saved to `%TEMP%`); `snapshot({include_screenshot:true})` uses the same path and writes to `<workspace>/uia-snapshots/` (not exercised in this verification round) |
|
|
206
|
+
| Foreground detection | `GetForegroundWindow` + process id works; the browser owned the foreground during verification (`foreground:false`, `requireForeground` would have refused actions) |
|
|
207
|
+
| Startup cost | first request includes pwsh spawn + UIA load + Win32 helper compile ≈ 3–7 s; later requests are fast (snapshot of 131 elements is sub-second on this machine) |
|
|
208
|
+
|
|
209
|
+
## 9. Verified vs unverified summary
|
|
210
|
+
|
|
211
|
+
| Capability | Status | Evidence |
|
|
212
|
+
| --- | --- | --- |
|
|
213
|
+
| Main window discovered by process name + `Qt622QWindowIcon` | **verified live** | §2 |
|
|
214
|
+
| Qt widget tree reachable by UIA (131 elements, AutomationIds, patterns) | **verified live** | §2, fixture |
|
|
215
|
+
| Structured sidecar protocol, refs, stale-ref rejection, errors, close | **verified live** | §3 |
|
|
216
|
+
| `probe` / `snapshot` / `assert` / `readDialog` through the compiled Node client | **verified live** | §3 |
|
|
217
|
+
| Render orchestrator `wait()` read-only polling | **verified live** | §3, §7 |
|
|
218
|
+
| Menu paths and File submenus (导出音频/导入音频) | verified-recon | §4 |
|
|
219
|
+
| Export dialog element tree + patterns | verified-recon | §5 |
|
|
220
|
+
| Native open-project dialog tree (#32770, ids 1148/1/2) | verified-recon | §6 |
|
|
221
|
+
| Modal-opening invoke blocks; async dispatch works | verified-recon (observation) | §6 |
|
|
222
|
+
| Open project end-to-end (type path + confirm) | **unverified** | §6 |
|
|
223
|
+
| Start playback / cloud render end-to-end | **unverified** | §7 |
|
|
224
|
+
| Export end-to-end (confirm + artifact) | **unverified** | §5 |
|
|
225
|
+
| Format/bitrate/sample-rate combo popups | **unverified** | §5 |
|
|
226
|
+
| Export storage folder picker | **unverified** (fails honestly) | §5 |
|
|
227
|
+
| Native `WM_SETTEXT`/`BM_CLICK` fallback for #32770 controls | **unverified** | §6 |
|
|
228
|
+
| `send_keys` operations | **unverified** | implemented behind foreground check |
|
|
229
|
+
| `snapshot({include_screenshot:true})` live capture | unverified this round (recon screenshot capture works) | §8 |
|
|
230
|
+
| Piano-roll notes as UIA elements | **not exposed** (data plane owns notes) | §2 |
|
|
231
|
+
|
|
232
|
+
## 10. How to reproduce the read-only verification
|
|
233
|
+
|
|
234
|
+
```powershell
|
|
235
|
+
$node = 'C:\Users\HP\.dsh\dsh-runtimes\dsh-primary-runtime\dependencies\node\bin\node.exe'
|
|
236
|
+
cd C:\Users\HP\Documents\deepseek-harness\plugins-dev\dsh-xstudio
|
|
237
|
+
& $node node_modules\typescript\bin\tsc -p tsconfig.json
|
|
238
|
+
# drive the sidecar directly (read-only)
|
|
239
|
+
$code = @'
|
|
240
|
+
import { createSidecar } from './dist/host/sidecar.js'
|
|
241
|
+
const sidecar = createSidecar({ gui: { requireForeground: false } })
|
|
242
|
+
console.log(await sidecar.probe())
|
|
243
|
+
console.log((await sidecar.snapshot()).elements.length)
|
|
244
|
+
console.log(await sidecar.assert({ text: '文件' }))
|
|
245
|
+
console.log(await sidecar.readDialog())
|
|
246
|
+
await sidecar.dispose()
|
|
247
|
+
'@
|
|
248
|
+
$code | Set-Content dist\smoke.mjs -Encoding utf8
|
|
249
|
+
& $node dist\smoke.mjs
|
|
250
|
+
Remove-Item dist\smoke.mjs
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Unit tests never touch the app: `node --test dist/tests/unit/sidecar.test.js
|
|
254
|
+
dist/tests/unit/render-orchestrator.test.js dist/tests/unit/artifacts.test.js`.
|
|
255
|
+
|
|
256
|
+
## 11. Open questions / risks
|
|
257
|
+
|
|
258
|
+
1. **`确认` export behaviour** must be validated on a throw-away project before
|
|
259
|
+
the export tool is used against real work (cloud render + login + timing).
|
|
260
|
+
2. **Combo popups**: if a build exposes format/bitrate/sample-rate popups as
|
|
261
|
+
separate top-level windows, `snapshot` should include them (it already appends
|
|
262
|
+
visible non-tooltip windows), but this was never observed live.
|
|
263
|
+
3. **Folder picker**: if the dialog's folder button flow is needed regularly, it
|
|
264
|
+
deserves its own recon round (typing a path into the Explorer-style dialog is
|
|
265
|
+
build-dependent).
|
|
266
|
+
4. **Element cap**: the default snapshot cap (600) is above the observed 131
|
|
267
|
+
elements; a dialog-heavy state could hit it. `truncated`/`warnings` are
|
|
268
|
+
reported, and refs beyond the cap are simply absent.
|
|
269
|
+
5. **App updates** may rename Qt object names; `ui-map.json` records the build
|
|
270
|
+
version and must be re-verified after an update (the tests and docs mark what
|
|
271
|
+
changes would break).
|
package/docs/RECON.md
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
# RECON — reconstruction and verification notes
|
|
2
|
+
|
|
3
|
+
Status: working notes for `dsh-xstudio` 0.1.0. This file records **how** the
|
|
4
|
+
`.svip3` format and the GUI automation target were reconstructed, so every
|
|
5
|
+
claim in [SPEC.md](SPEC.md) can be traced to evidence. Verified and inferred
|
|
6
|
+
statements are kept apart on purpose; nothing here is presented as vendor
|
|
7
|
+
documentation, because no such documentation exists.
|
|
8
|
+
|
|
9
|
+
Capture date: 2026-10-18 (Asia/Shanghai).
|
|
10
|
+
|
|
11
|
+
## 0. Environment under test
|
|
12
|
+
|
|
13
|
+
| Item | Value | Status |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| OS | Windows 11 | verified (shell) |
|
|
16
|
+
| DeepSeek Harness | 0.2.1-rc.2, profile plugin model (`install_bundle`) | verified (Lead) |
|
|
17
|
+
| Node.js | v24.21.0 (bundled runtime); package engines say `>=20` | verified (shell) |
|
|
18
|
+
| X Studio | 1.2.7, NetEase Cloud Music edition | verified (Lead) |
|
|
19
|
+
| Install dir | `D:\NetEase Cloud Music XStudio\` (contains `NetEase Cloud Music XStudio.exe`) | verified |
|
|
20
|
+
| Running process | `NetEase Cloud Music XStudio`, PID observed 22324 | verified (`Get-Process`) |
|
|
21
|
+
| Main window title | `网易云音乐·X Studio - 2.svip3` (app had `2.svip3` open during recon) | verified (UIA) |
|
|
22
|
+
| Main window class | `Qt622QWindowIcon` (Qt 6.22 window) | verified (UIA) |
|
|
23
|
+
| PowerShell for the sidecar | PowerShell 7 (`pwsh`), .NET `UIAutomationClient`/`UIAutomationTypes` load successfully | verified |
|
|
24
|
+
| Tavily credentials | Initially no API key; later configured through the official Tavily CLI OAuth login (`~/.tavily/config.json`) | verified (CLI + live plugin, 2026-10-18) |
|
|
25
|
+
|
|
26
|
+
## 1. Fixtures
|
|
27
|
+
|
|
28
|
+
Both fixtures are real projects saved by X Studio, copied byte-for-byte into
|
|
29
|
+
`fixtures/svip/` (the Lead's verified copies live in `C:\Users\HP\Downloads\`;
|
|
30
|
+
copies also exist in the `plugins-dev` parent directory). They are 363 bytes
|
|
31
|
+
each and are the only project files the project has evidence for.
|
|
32
|
+
|
|
33
|
+
| Fixture | Bytes | SHA-256 | Internal `source_path` |
|
|
34
|
+
| --- | --- | --- | --- |
|
|
35
|
+
| `fixtures/svip/1.svip3` | 363 | `fd441f59ece13bd4e33be63ded20f9b86972043fbeeb6c7476abde853e86acf3` | `C:/Users/HP/Downloads/1.svip3` (forward slashes) |
|
|
36
|
+
| `fixtures/svip/3.svip3` | 363 | `6e6e4cf8663889932a74ecca04b0d29935b9284857f5db40ba043c31e48a9658` | `C:\Users\HP\Downloads\2.svip3` (backslashes; note the file was saved as `2.svip3` and renamed to `3.svip3` on disk) |
|
|
37
|
+
|
|
38
|
+
Decoded content (verified by the wire dump in §2 and by the codec tests):
|
|
39
|
+
|
|
40
|
+
| Field | `1.svip3` | `3.svip3` |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `app_version` | `3.0.3` | `3.0.3` |
|
|
43
|
+
| `internal_clock_base` | 115200 | 115200 |
|
|
44
|
+
| `tempo.bpm_x100` | 12000 (= 120 BPM) | 12000 (= 120 BPM) |
|
|
45
|
+
| `time_sig.ns` | 4/4 | 3/4 |
|
|
46
|
+
| `track_data.type_url` | `type.googleapis.com/xstudio.proto.SingingTrack` | same |
|
|
47
|
+
| `singing.singer_name` | `何畅` | `何畅` |
|
|
48
|
+
| `singing.velocity_offset` | 0.7 | 1.0 |
|
|
49
|
+
| `singing.ui_color_hex` | `#7F97AE` | `#7F97AE` |
|
|
50
|
+
| `singing.track_type` | 2 | 2 |
|
|
51
|
+
| `singing.uuid` | `f532206c-47de-4103-9017-cbb91b3f9366` | same UUID (the second file is a copy) |
|
|
52
|
+
| `singing.pan_db` | -18.0 | -18.0 |
|
|
53
|
+
| `payload.label` | `未命名` | `未命名` |
|
|
54
|
+
| `payload.sub_type` | 2 | 2 |
|
|
55
|
+
| `payload.start_tick` / `end_tick` | 21120 / 21120 | 21120 / 21120 |
|
|
56
|
+
| `payload.visibility_mask` | 2^64-1 | 2^64-1 |
|
|
57
|
+
| `payload.short_id` | `F969` | `F969` |
|
|
58
|
+
| notes | 4 notes, positions 0/480/960/1680, lengths 480/480/720/480, pitches 59/60/61/62, lyric `啦`, phoneme `la` | 4 notes, positions 0/960/1680/2160, lengths 480/720/480/240, pitches 59/61/62/63, lyric `啦`, phoneme `la` |
|
|
59
|
+
| `gain.linear_gain` | 1.0 | 6.0 |
|
|
60
|
+
| `unknown_field_9` | 8 | 8 |
|
|
61
|
+
| `total_ticks` | 7680 | 7680 |
|
|
62
|
+
| `flags` | 1 | 1 |
|
|
63
|
+
| `display.placeholder` | `-` | `-` |
|
|
64
|
+
| note `expr_param_1` / `expr_param_2` | -1.0 / -1.0 | -1.0 / -1.0 |
|
|
65
|
+
|
|
66
|
+
The two files differ in exactly: `source_path`, `time_sig` (4/4 vs 3/4),
|
|
67
|
+
`velocity_offset` (0.7 vs 1.0), `gain` (1.0 vs 6.0), and the note list. Every
|
|
68
|
+
other byte is identical, which makes them a useful pair for "edit one field,
|
|
69
|
+
prove nothing else moved" tests.
|
|
70
|
+
|
|
71
|
+
## 2. Wire-level evidence
|
|
72
|
+
|
|
73
|
+
`scripts/inspect-svip.mjs` (dependency-free, read-only) scans the raw protobuf
|
|
74
|
+
wire format with no schema and prints every tag. This is the primary evidence
|
|
75
|
+
for the field numbers in [SPEC.md §4](SPEC.md#4-protobuf-schema-verbatim); it
|
|
76
|
+
was cross-checked against the proto3 encoding rules and the codec tests.
|
|
77
|
+
|
|
78
|
+
Observed tags (wire type in parentheses; all offsets from the start of the
|
|
79
|
+
file):
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
1 (2) source_path "C:/Users/HP/Downloads/1.svip3" tag 0a
|
|
83
|
+
2 (2) app_version "3.0.3" tag 12
|
|
84
|
+
3 (0) internal_clock_base 115200 tag 18 varint 808407
|
|
85
|
+
4 (2) tempo { 2: 12000 } tag 22
|
|
86
|
+
5 (2) time_sig { 2: { 1: 4, 2: 4 } } tag 2a
|
|
87
|
+
6 (2) track_data (Any) { 1: type_url, 2: SingingTrack } tag 32
|
|
88
|
+
7 (2) gain { 1: fixed32 1.0 } tag 3a
|
|
89
|
+
9 (0) unknown_field_9 8 tag 48
|
|
90
|
+
11 (0) total_ticks 7680 tag 58
|
|
91
|
+
12 (0) flags 1 tag 60
|
|
92
|
+
14 (2) display { 2: "-" } tag 72
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Inside `SingingTrack` (the `Any.value` payload, 235 bytes):
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
1 (5) velocity_offset fixed32 0x3f333333 = 0.7 (1.svip3) / 0x3f800000 = 1.0 (3.svip3)
|
|
99
|
+
4 (2) singer_name "何畅"
|
|
100
|
+
6 (2) ui_color_hex "#7F97AE"
|
|
101
|
+
7 (0) track_type 2
|
|
102
|
+
8 (2) payload 165 bytes
|
|
103
|
+
9 (2) uuid "f532206c-47de-4103-9017-cbb91b3f9366"
|
|
104
|
+
12 (5) pan_db fixed32 0xc1900000 = -18.0
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Inside `TrackPayload`:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
1 (2) label "未命名"
|
|
111
|
+
2 (0) sub_type 2
|
|
112
|
+
4 (0) start_tick 21120
|
|
113
|
+
6 (0) end_tick 21120
|
|
114
|
+
8 (2) notes repeated Note (4 entries)
|
|
115
|
+
18 (0) visibility_mask 0x9001 + varint 0xFFFFFFFFFFFFFFFF
|
|
116
|
+
19 (2) short_id "F969"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Inside one `Note` (the first note of `1.svip3`, which omits `position_tick`):
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
2 (0) length_tick 480
|
|
123
|
+
3 (0) midi_pitch 59
|
|
124
|
+
4 (2) lyric_text "啦"
|
|
125
|
+
5 (2) phoneme_roman "la"
|
|
126
|
+
14 (0) note_flag 1
|
|
127
|
+
15 (5) expr_param_1 fixed32 0xbf800000 = -1.0
|
|
128
|
+
16 (5) expr_param_2 fixed32 0xbf800000 = -1.0
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Three encoding facts that matter for a lossless editor:
|
|
132
|
+
|
|
133
|
+
1. **`position_tick` is proto3 `optional` and omitted when 0.** The first note
|
|
134
|
+
of every observed file has no field 1 at all; decoding must default it to 0
|
|
135
|
+
and re-encoding must omit it again to stay byte-identical.
|
|
136
|
+
2. **Floats are `fixed32` wire type 5**, not varints: `velocity_offset`,
|
|
137
|
+
`pan_db`, `gain.linear_gain`, `expr_param_1`, `expr_param_2`. A generic
|
|
138
|
+
varint writer corrupts them.
|
|
139
|
+
3. **`expr_param_1`/`expr_param_2` use -1.0 as "unset"**, not 0. The editor
|
|
140
|
+
must never reinterpret the sentinel.
|
|
141
|
+
|
|
142
|
+
## 3. Corrections to the v2.2 spec text
|
|
143
|
+
|
|
144
|
+
The v2.2 specification said `visibility_mask` (TrackPayload field 18) is
|
|
145
|
+
`fixed64`. The fixtures prove otherwise:
|
|
146
|
+
|
|
147
|
+
- The tag bytes are `90 01` = field 18, **wire type 0** (varint). A `fixed64`
|
|
148
|
+
field would use tag `91 01` (wire type 1) followed by exactly 8 raw bytes.
|
|
149
|
+
- The value is a 10-byte varint `ff ff ff ff ff ff ff ff ff 01` = 2^64-1.
|
|
150
|
+
- `protobufjs` with `fixed64` throws while decoding the fixture; with `uint64`
|
|
151
|
+
it decodes both files and re-encodes them byte-for-byte.
|
|
152
|
+
|
|
153
|
+
`proto/xstudio.proto` therefore declares `uint64 visibility_mask = 18;`. This
|
|
154
|
+
is recorded as a **corrected inference**: the spec was the starting hypothesis,
|
|
155
|
+
the bytes are the authority.
|
|
156
|
+
|
|
157
|
+
A second, smaller observation: the spec's sample notes for the pair "1.svip3 has
|
|
158
|
+
4 notes, tempo 120, gain 1.0" and "3.svip3 has gain 6.0, 3/4, singer 何畅" are
|
|
159
|
+
confirmed, but **both** files name `何畅` as the singer and both use
|
|
160
|
+
`velocity_offset` 0.7 / 1.0 respectively.
|
|
161
|
+
|
|
162
|
+
## 4. Round-trip proof
|
|
163
|
+
|
|
164
|
+
Method: decode both fixtures with the codec, re-encode with no model change,
|
|
165
|
+
compare bytes.
|
|
166
|
+
|
|
167
|
+
- Result: **byte-identical for both files** (363/363 bytes equal). Verified by
|
|
168
|
+
the Lead during reconnaissance and guarded by the codec unit tests
|
|
169
|
+
(`src/tests/unit/svip-*.test.ts`).
|
|
170
|
+
- This is only possible because the codec (a) preserves every unknown field as
|
|
171
|
+
raw bytes, (b) writes proto3 default-valued fields the same way X Studio does
|
|
172
|
+
(omitted), and (c) emits fields in ascending field-number order, which is the
|
|
173
|
+
order both fixtures use.
|
|
174
|
+
- `writeProjectDocument` re-uses the original bytes and reports `changed:false`
|
|
175
|
+
when the model deep-equals the model it read, so a read-only round trip never
|
|
176
|
+
rewrites the file.
|
|
177
|
+
|
|
178
|
+
## 5. UIA feasibility
|
|
179
|
+
|
|
180
|
+
What was verified read-only on 2026-10-18, with the app running and a modal
|
|
181
|
+
**打开工程** ("Open project") file dialog open:
|
|
182
|
+
|
|
183
|
+
- `UIAutomationClient` + `UIAutomationTypes` load in PowerShell 7.
|
|
184
|
+
- The X Studio top-level window is found by process id; its class is
|
|
185
|
+
`Qt622QWindowIcon` (Qt 6.22), `ControlType.Window`.
|
|
186
|
+
- The window exposes `InvokePattern`, `WindowPattern` and `TransformPattern`.
|
|
187
|
+
- While the file dialog was open, a descendant walk of the main window returned
|
|
188
|
+
100 elements: 29 Buttons, 19 TreeItems, 15 Panes, 5 ToolBars, 5 MenuItems,
|
|
189
|
+
4 MenuBars, 3 Lists, 3 SplitButtons, 2 Edits, 2 ComboBoxes, 1 ProgressBar,
|
|
190
|
+
plus scrollbars/title-bar chrome. 45 elements had an `AutomationId`, 89 had a
|
|
191
|
+
`Name`. Most of those elements belong to the Win32 common file dialog
|
|
192
|
+
(`#32770`, `DirectUIHWND`, `SysTreeView32`) that was open on top of the Qt
|
|
193
|
+
window, not to the Qt widget tree itself.
|
|
194
|
+
- The **Qt widget tree itself is unverified**: Qt on Windows only exposes its
|
|
195
|
+
widgets through its accessibility bridge, and the modal dialog made it
|
|
196
|
+
impossible to tell how much of the main window is visible to UIA without
|
|
197
|
+
interacting with the app. This is the main remaining feasibility risk for the
|
|
198
|
+
GUI layer. `docs/RECON-GUI.md` (owned by the GUI task) records the detailed
|
|
199
|
+
live element map; where it is silent, treat Qt-internal elements as
|
|
200
|
+
unverified.
|
|
201
|
+
|
|
202
|
+
Consequences already reflected in the design:
|
|
203
|
+
|
|
204
|
+
- The GUI layer must resolve elements by UIA identity (Name / AutomationId /
|
|
205
|
+
ClassName / ControlType path), never by cached screen coordinates.
|
|
206
|
+
- `xstudio_ui_snapshot` is the only way to obtain refs, and refs expire with the
|
|
207
|
+
snapshot.
|
|
208
|
+
- The plugin must degrade to the data plane plus `xstudio_guide_print` whenever
|
|
209
|
+
the GUI cannot be driven; it never falls back to blind clicking.
|
|
210
|
+
|
|
211
|
+
## 6. Verified vs inferred
|
|
212
|
+
|
|
213
|
+
| Claim | Status | Evidence |
|
|
214
|
+
| --- | --- | --- |
|
|
215
|
+
| `.svip3` is a protobuf message from package `xstudio.proto` | verified | wire dump, `proto/xstudio.proto`, codec tests |
|
|
216
|
+
| PPQ is 480 (not `internal_clock_base` 115200) | verified | tick math + note lengths: 480 = quarter |
|
|
217
|
+
| `visibility_mask` is uint64, not fixed64 | verified | tag `90 01`, varint value, protobufjs behaviour |
|
|
218
|
+
| `position_tick` omitted when 0 | verified | first note in both fixtures |
|
|
219
|
+
| `expr_param_*` sentinel is -1.0 | verified | fixed32 `0xbf800000` in every observed note |
|
|
220
|
+
| decode→encode is byte-identical | verified | Lead's recon + codec tests |
|
|
221
|
+
| Unknown fields can be preserved verbatim | verified | codec tests inject unknowns |
|
|
222
|
+
| X Studio renders on the vendor cloud | verified (Lead) | login-gated playback behaviour; no local model inference |
|
|
223
|
+
| X Studio main window is a Qt 6 window reachable by UIA | verified | `Qt622QWindowIcon`, patterns above |
|
|
224
|
+
| Qt widget internals are reachable through UIA | **verified live (read-only)** | live snapshot of the running app: 131 elements with AutomationIds/patterns (RECON-GUI §2–§3); the earlier "unverified" note only reflected the recon moment when a modal dialog blocked the walk |
|
|
225
|
+
| The app version string in projects is `3.0.3` while the installed app is 1.2.7 | verified | fixtures vs install; likely an internal schema version (inference) |
|
|
226
|
+
| Export format/sample rate are stored in the project | **false** | they live in the export dialog, not in the protobuf |
|
|
227
|
+
| Tavily results can be executed as instructions | **never** | design rule; results are sanitized data only |
|
|
228
|
+
|
|
229
|
+
## 7. Reproduce this
|
|
230
|
+
|
|
231
|
+
```powershell
|
|
232
|
+
# Wire dump (read-only)
|
|
233
|
+
node scripts/inspect-svip.mjs fixtures/svip/1.svip3
|
|
234
|
+
node scripts/inspect-svip.mjs fixtures/svip/*.svip3 --json > evidence.json
|
|
235
|
+
|
|
236
|
+
# Hashes
|
|
237
|
+
Get-FileHash fixtures/svip/*.svip3 -Algorithm SHA256
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
The project tests are the executable form of these claims:
|
|
241
|
+
`node --test dist/tests` after `pnpm run build`.
|
|
242
|
+
|
|
243
|
+
## 8. Open questions
|
|
244
|
+
|
|
245
|
+
1. How much of the Qt widget tree is visible to UIA when no modal dialog is
|
|
246
|
+
open? (GUI task.)
|
|
247
|
+
2. Do all four singers (伍笛, 小冰, 何畅, 陈子渝) share the same track layout, or
|
|
248
|
+
do some require a different `payload.sub_type`? Only 何畅 files were
|
|
249
|
+
available; the plugin never changes `sub_type` (read-only pass-through).
|
|
250
|
+
3. Does X Studio rewrite `source_path` on save? `3.svip3` still contains
|
|
251
|
+
`...\2.svip3`, so it appears not to; the plugin normalizes the path only when
|
|
252
|
+
it writes, and keeps a backup first.
|
|
253
|
+
4. Whether a newer X Studio build changes any field number. The codec preserves
|
|
254
|
+
unknown fields precisely so a new build's additions survive a round trip.
|
|
255
|
+
|
|
256
|
+
## 9. Recovery provenance and re-verification (2026-10-18, this session)
|
|
257
|
+
|
|
258
|
+
The first implementation pass ran under the "创造模式(Cordis)" preset (session
|
|
259
|
+
`session-1f0ba5d9` continued as `session-f38670f5`, `agentPreset: "cordis"`).
|
|
260
|
+
That session ended when the third-party model route returned
|
|
261
|
+
`403 insufficient_user_quota` and then `400 INVALID_REQUEST: tools: at least one
|
|
262
|
+
tool must have defer_loading=false` after a mid-session model change. The
|
|
263
|
+
workspace was reset; nothing was left on disk except this repository's empty
|
|
264
|
+
directory and a stale profile junction.
|
|
265
|
+
|
|
266
|
+
The current session reconstructed the lost tree byte-for-byte from the prior
|
|
267
|
+
session event log (each `run_code` body and each teammate `write` tool call was
|
|
268
|
+
replayed against a mocked tool registry). Recovered files are treated as
|
|
269
|
+
untrusted until the executable checks pass; the tests in `src/tests/unit/` are
|
|
270
|
+
the acceptance gate.
|
|
271
|
+
|
|
272
|
+
Current-environment re-verification (this session, 2026-10-18 16:2x Asia/Shanghai):
|
|
273
|
+
|
|
274
|
+
| Item | Value | Status |
|
|
275
|
+
| --- | --- | --- |
|
|
276
|
+
| DSH | 0.2.1-rc.2, profile `desktop` | verified (`dsh --version`) |
|
|
277
|
+
| Agent preset of this session | `liangshen` (NOT `cordis`) — preset selection is a Web-UI action; the creator toolset (`tool-cordis`, Plugin Manager, Cordis skills) is nevertheless available here | verified (session record `agent-preset/selected` / session metadata) |
|
|
278
|
+
| X Studio | running, PID 22324, main window `网易云音乐·X Studio - 2.svip3`, class `Qt622QWindowIcon` | verified (`Get-Process`) |
|
|
279
|
+
| Fixtures | `C:\Users\HP\Downloads\1.svip3`, `3.svip3` (363 bytes each) | verified (file system) |
|
|
280
|
+
| Tavily credentials | Initially `TAVILY_API_KEY` / `TVLY_API_KEY` unset (env + config scan). Later the user logged in through the Tavily CLI: `~/.tavily/config.json` holds an OAuth session and `tvly --status` reports "Authenticated via OAuth" | verified (2026-10-18, both states) |
|
|
281
|
+
| Node / pnpm | bundled Node 24.x runtime and pnpm; project deps installed with pnpm | verified |
|
|
282
|
+
|
|
283
|
+
Updated consequences: with the Tavily CLI OAuth session available, live
|
|
284
|
+
enrichment **was** demonstrated through the installed plugin (singer refresh,
|
|
285
|
+
pronunciation, unknown-dialog diagnosis — all `via: "tavily"`; see §10). Full
|
|
286
|
+
cloud-render/export flows remain unverified end-to-end because the plugin must
|
|
287
|
+
not operate on the user's open project; they are unit-tested with a fake
|
|
288
|
+
sidecar and degrade to explicit `guide` results. Qt widget internals are
|
|
289
|
+
verified live for read-only introspection (RECON-GUI).
|
|
290
|
+
|
|
291
|
+
## 10. Tavily credential model and live evidence (2026-10-18, later round)
|
|
292
|
+
|
|
293
|
+
The user configured Tavily through the official Tavily CLI (uv tool install
|
|
294
|
+
`tavily-cli`; `tvly --status` → "Authenticated via OAuth"). Its credential file
|
|
295
|
+
`~/.tavily/config.json` contains an `oauth` object
|
|
296
|
+
(`access_token`, `refresh_token`, `expires_at` ≈ 24 h, `client_id`,
|
|
297
|
+
`token_endpoint_auth_method: "none"`, `redirect_uri`), not a `tvly-…` REST API
|
|
298
|
+
key.
|
|
299
|
+
|
|
300
|
+
Evidence gathered while adding support for this file to the plugin:
|
|
301
|
+
|
|
302
|
+
- `tvly search … --json` works (exit 0, real results) → the OAuth session is
|
|
303
|
+
valid for Tavily's MCP resource (`https://mcp.tavily.com/mcp`).
|
|
304
|
+
- The same access token sent to the REST endpoint `https://api.tavily.com/search`
|
|
305
|
+
(as `api_key` body field, `x-api-key` header, or `Authorization: Bearer`)
|
|
306
|
+
returns **HTTP 401 "Unauthorized: missing or invalid API key."** The token is
|
|
307
|
+
minted for the MCP resource, not the REST API; the plugin therefore speaks MCP
|
|
308
|
+
Streamable HTTP for OAuth mode.
|
|
309
|
+
- MCP handshake verified: `POST /mcp` `initialize` → HTTP 200 + SSE
|
|
310
|
+
`Mcp-Session-Id`; notification accepted (202); `tools/list` exposes
|
|
311
|
+
`tavily_search`, `tavily_extract`, `tavily_crawl`, `tavily_map`,
|
|
312
|
+
`tavily_research`; `tools/call tavily_search` returns
|
|
313
|
+
`structuredContent` with the same `{query, answer, results[]}` shape as REST.
|
|
314
|
+
- The plugin's new resolver reads (in order) config `tavily.apiKey`, environment
|
|
315
|
+
`TAVILY_API_KEY`/`TVLY_API_KEY`, then `~/.tavily/config.json` — supporting a
|
|
316
|
+
plain `api_key` (REST) or the `oauth` session (MCP). It never writes,
|
|
317
|
+
refreshes or revokes the CLI's credentials; an expired token yields a typed
|
|
318
|
+
`oauth-expired` failure with a "run `tvly login`" hint.
|
|
319
|
+
- Live through the installed bundle (HMR reloaded the new build): `xstudio_probe`
|
|
320
|
+
reports `tavily.authMode: "oauth"`, `keyConfigured: true`;
|
|
321
|
+
`xstudio_singers_list({refresh:true})` → `via: "tavily"`, 13 singers
|
|
322
|
+
(WOWAIDO roster); pronunciation lookup `龘` → `via: "tavily"`; an unknown
|
|
323
|
+
dialog text through `xstudio_ui_dialog_respond` → `via: "tavily"`.
|
|
324
|
+
- The public WOWAIDO roster (Baidu Baike / 163 article, retrieved via Tavily) is
|
|
325
|
+
小冰、何畅、陈水若、徐梦甜、若溪、崔璨、言泽宇、小鱼豆腐、夏语冰、小堂妹、
|
|
326
|
+
陈子渝、卢卢; 伍笛 is kept from the project fixtures. These 13 names are now
|
|
327
|
+
the built-in fallback catalog (no network needed) and are cross-checked against
|
|
328
|
+
live results by the roster parser.
|
|
329
|
+
|
|
330
|
+
### Later the same day: the CLI file switched to a plain API key
|
|
331
|
+
|
|
332
|
+
The Tavily CLI credential file was subsequently replaced with a file containing
|
|
333
|
+
`api_key` only (the OAuth session was removed). The plugin's resolver picked the
|
|
334
|
+
new source automatically: `xstudio_probe` reports `authMode: "api-key"` and the
|
|
335
|
+
REST transport is used; the OAuth/MCP transport remains implemented and covered
|
|
336
|
+
by the `tavily-oauth` test suite (credential parsing, auth precedence, expiry,
|
|
337
|
+
SSE framing, breaker integration). No code or configuration change was needed —
|
|
338
|
+
this is the documented config → environment → CLI-file precedence working in
|
|
339
|
+
both directions.
|