xstudio-linux 0.0.0-stage → 0.2.4

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.
Files changed (222) hide show
  1. package/CHANGELOG.md +469 -0
  2. package/LICENSE +31 -0
  3. package/README.md +542 -2
  4. package/dist/adapter-cli/cli.d.ts +28 -0
  5. package/dist/adapter-cli/cli.js +233 -0
  6. package/dist/adapter-cli/cli.js.map +1 -0
  7. package/dist/adapter-mcp/server.d.ts +81 -0
  8. package/dist/adapter-mcp/server.js +473 -0
  9. package/dist/adapter-mcp/server.js.map +1 -0
  10. package/dist/config.d.ts +45 -0
  11. package/dist/config.js +78 -0
  12. package/dist/config.js.map +1 -0
  13. package/dist/core/catalog/pronunciation.d.ts +47 -0
  14. package/dist/core/catalog/pronunciation.js +402 -0
  15. package/dist/core/catalog/pronunciation.js.map +1 -0
  16. package/dist/core/catalog/singers.d.ts +46 -0
  17. package/dist/core/catalog/singers.js +122 -0
  18. package/dist/core/catalog/singers.js.map +1 -0
  19. package/dist/core/contracts.d.ts +348 -0
  20. package/dist/core/contracts.js +17 -0
  21. package/dist/core/contracts.js.map +1 -0
  22. package/dist/core/degrade/chain.d.ts +80 -0
  23. package/dist/core/degrade/chain.js +137 -0
  24. package/dist/core/degrade/chain.js.map +1 -0
  25. package/dist/core/diagnose/error-resolver.d.ts +51 -0
  26. package/dist/core/diagnose/error-resolver.js +202 -0
  27. package/dist/core/diagnose/error-resolver.js.map +1 -0
  28. package/dist/core/guard/skill-gate.d.ts +89 -0
  29. package/dist/core/guard/skill-gate.js +121 -0
  30. package/dist/core/guard/skill-gate.js.map +1 -0
  31. package/dist/core/midi/convert.d.ts +31 -0
  32. package/dist/core/midi/convert.js +125 -0
  33. package/dist/core/midi/convert.js.map +1 -0
  34. package/dist/core/midi/smf.d.ts +37 -0
  35. package/dist/core/midi/smf.js +422 -0
  36. package/dist/core/midi/smf.js.map +1 -0
  37. package/dist/core/render/artifacts.d.ts +37 -0
  38. package/dist/core/render/artifacts.js +417 -0
  39. package/dist/core/render/artifacts.js.map +1 -0
  40. package/dist/core/render/orchestrator.d.ts +110 -0
  41. package/dist/core/render/orchestrator.js +974 -0
  42. package/dist/core/render/orchestrator.js.map +1 -0
  43. package/dist/core/svip/codec.d.ts +30 -0
  44. package/dist/core/svip/codec.js +664 -0
  45. package/dist/core/svip/codec.js.map +1 -0
  46. package/dist/core/svip/document.d.ts +31 -0
  47. package/dist/core/svip/document.js +158 -0
  48. package/dist/core/svip/document.js.map +1 -0
  49. package/dist/core/svip/editor.d.ts +71 -0
  50. package/dist/core/svip/editor.js +245 -0
  51. package/dist/core/svip/editor.js.map +1 -0
  52. package/dist/core/svip/model.d.ts +74 -0
  53. package/dist/core/svip/model.js +158 -0
  54. package/dist/core/svip/model.js.map +1 -0
  55. package/dist/core/svip/tick.d.ts +21 -0
  56. package/dist/core/svip/tick.js +59 -0
  57. package/dist/core/svip/tick.js.map +1 -0
  58. package/dist/core/svip/validator.d.ts +39 -0
  59. package/dist/core/svip/validator.js +267 -0
  60. package/dist/core/svip/validator.js.map +1 -0
  61. package/dist/host/linux.d.ts +15 -0
  62. package/dist/host/linux.js +42 -0
  63. package/dist/host/linux.js.map +1 -0
  64. package/dist/host/sidecar.d.ts +61 -0
  65. package/dist/host/sidecar.js +365 -0
  66. package/dist/host/sidecar.js.map +1 -0
  67. package/dist/host/wine-launch.d.ts +60 -0
  68. package/dist/host/wine-launch.js +77 -0
  69. package/dist/host/wine-launch.js.map +1 -0
  70. package/dist/host/wine-paths.d.ts +30 -0
  71. package/dist/host/wine-paths.js +103 -0
  72. package/dist/host/wine-paths.js.map +1 -0
  73. package/dist/index.d.ts +20 -0
  74. package/dist/index.js +17 -0
  75. package/dist/index.js.map +1 -0
  76. package/dist/services.d.ts +55 -0
  77. package/dist/services.js +78 -0
  78. package/dist/services.js.map +1 -0
  79. package/dist/shared/errors.d.ts +61 -0
  80. package/dist/shared/errors.js +125 -0
  81. package/dist/shared/errors.js.map +1 -0
  82. package/dist/shared/paths.d.ts +8 -0
  83. package/dist/shared/paths.js +30 -0
  84. package/dist/shared/paths.js.map +1 -0
  85. package/dist/shared/schema.d.ts +26 -0
  86. package/dist/shared/schema.js +68 -0
  87. package/dist/shared/schema.js.map +1 -0
  88. package/dist/shared/types.d.ts +43 -0
  89. package/dist/shared/types.js +19 -0
  90. package/dist/shared/types.js.map +1 -0
  91. package/dist/tests/unit/artifacts.test.d.ts +1 -0
  92. package/dist/tests/unit/artifacts.test.js +243 -0
  93. package/dist/tests/unit/artifacts.test.js.map +1 -0
  94. package/dist/tests/unit/data-plane.test.d.ts +1 -0
  95. package/dist/tests/unit/data-plane.test.js +153 -0
  96. package/dist/tests/unit/data-plane.test.js.map +1 -0
  97. package/dist/tests/unit/degrade.test.d.ts +1 -0
  98. package/dist/tests/unit/degrade.test.js +133 -0
  99. package/dist/tests/unit/degrade.test.js.map +1 -0
  100. package/dist/tests/unit/diagnosis.test.d.ts +1 -0
  101. package/dist/tests/unit/diagnosis.test.js +66 -0
  102. package/dist/tests/unit/diagnosis.test.js.map +1 -0
  103. package/dist/tests/unit/errors.test.d.ts +1 -0
  104. package/dist/tests/unit/errors.test.js +83 -0
  105. package/dist/tests/unit/errors.test.js.map +1 -0
  106. package/dist/tests/unit/mcp-server.test.d.ts +1 -0
  107. package/dist/tests/unit/mcp-server.test.js +267 -0
  108. package/dist/tests/unit/mcp-server.test.js.map +1 -0
  109. package/dist/tests/unit/mcp-smoke.d.ts +6 -0
  110. package/dist/tests/unit/mcp-smoke.js +7 -0
  111. package/dist/tests/unit/mcp-smoke.js.map +1 -0
  112. package/dist/tests/unit/mcp-smoke.test.d.ts +1 -0
  113. package/dist/tests/unit/mcp-smoke.test.js +196 -0
  114. package/dist/tests/unit/mcp-smoke.test.js.map +1 -0
  115. package/dist/tests/unit/midi.test.d.ts +1 -0
  116. package/dist/tests/unit/midi.test.js +255 -0
  117. package/dist/tests/unit/midi.test.js.map +1 -0
  118. package/dist/tests/unit/pronunciation.test.d.ts +1 -0
  119. package/dist/tests/unit/pronunciation.test.js +83 -0
  120. package/dist/tests/unit/pronunciation.test.js.map +1 -0
  121. package/dist/tests/unit/registry-contract.test.d.ts +1 -0
  122. package/dist/tests/unit/registry-contract.test.js +114 -0
  123. package/dist/tests/unit/registry-contract.test.js.map +1 -0
  124. package/dist/tests/unit/render-orchestrator.test.d.ts +1 -0
  125. package/dist/tests/unit/render-orchestrator.test.js +548 -0
  126. package/dist/tests/unit/render-orchestrator.test.js.map +1 -0
  127. package/dist/tests/unit/sidecar.test.d.ts +1 -0
  128. package/dist/tests/unit/sidecar.test.js +299 -0
  129. package/dist/tests/unit/sidecar.test.js.map +1 -0
  130. package/dist/tests/unit/singers.test.d.ts +1 -0
  131. package/dist/tests/unit/singers.test.js +73 -0
  132. package/dist/tests/unit/singers.test.js.map +1 -0
  133. package/dist/tests/unit/skill-gate.test.d.ts +1 -0
  134. package/dist/tests/unit/skill-gate.test.js +207 -0
  135. package/dist/tests/unit/skill-gate.test.js.map +1 -0
  136. package/dist/tests/unit/svip-codec.test.d.ts +1 -0
  137. package/dist/tests/unit/svip-codec.test.js +182 -0
  138. package/dist/tests/unit/svip-codec.test.js.map +1 -0
  139. package/dist/tests/unit/svip-document.test.d.ts +1 -0
  140. package/dist/tests/unit/svip-document.test.js +137 -0
  141. package/dist/tests/unit/svip-document.test.js.map +1 -0
  142. package/dist/tests/unit/svip-editor.test.d.ts +1 -0
  143. package/dist/tests/unit/svip-editor.test.js +275 -0
  144. package/dist/tests/unit/svip-editor.test.js.map +1 -0
  145. package/dist/tests/unit/svip-tick.test.d.ts +1 -0
  146. package/dist/tests/unit/svip-tick.test.js +66 -0
  147. package/dist/tests/unit/svip-tick.test.js.map +1 -0
  148. package/dist/tools/common.d.ts +87 -0
  149. package/dist/tools/common.js +174 -0
  150. package/dist/tools/common.js.map +1 -0
  151. package/dist/tools/control.d.ts +21 -0
  152. package/dist/tools/control.js +376 -0
  153. package/dist/tools/control.js.map +1 -0
  154. package/dist/tools/data.d.ts +37 -0
  155. package/dist/tools/data.js +680 -0
  156. package/dist/tools/data.js.map +1 -0
  157. package/dist/tools/definition.d.ts +60 -0
  158. package/dist/tools/definition.js +44 -0
  159. package/dist/tools/definition.js.map +1 -0
  160. package/dist/tools/degrade.d.ts +3 -0
  161. package/dist/tools/degrade.js +30 -0
  162. package/dist/tools/degrade.js.map +1 -0
  163. package/dist/tools/guide.d.ts +10 -0
  164. package/dist/tools/guide.js +66 -0
  165. package/dist/tools/guide.js.map +1 -0
  166. package/dist/tools/open.d.ts +3 -0
  167. package/dist/tools/open.js +74 -0
  168. package/dist/tools/open.js.map +1 -0
  169. package/dist/tools/probe.d.ts +8 -0
  170. package/dist/tools/probe.js +132 -0
  171. package/dist/tools/probe.js.map +1 -0
  172. package/dist/tools/registry.d.ts +10 -0
  173. package/dist/tools/registry.js +16 -0
  174. package/dist/tools/registry.js.map +1 -0
  175. package/dist/version.d.ts +4 -0
  176. package/dist/version.js +19 -0
  177. package/dist/version.js.map +1 -0
  178. package/docs/DESIGN.md +561 -0
  179. package/docs/RECON-GUI.md +271 -0
  180. package/docs/RECON.md +339 -0
  181. package/docs/SPEC.md +786 -0
  182. package/docs/WINE.md +193 -0
  183. package/examples/.scratch/01-midi-to-wudi/wudi-demo.svip3 +0 -0
  184. package/examples/.scratch/01-midi-to-wudi/wudi-melody.mid +0 -0
  185. package/examples/.scratch/01-midi-to-wudi/wudi-roundtrip.mid +0 -0
  186. package/examples/.scratch/02-three-singers/melody.chenziyu.svip3 +0 -0
  187. package/examples/.scratch/02-three-singers/melody.hechang.svip3 +0 -0
  188. package/examples/.scratch/02-three-singers/melody.svip3 +0 -0
  189. package/examples/.scratch/02-three-singers/melody.wudi.svip3 +0 -0
  190. package/examples/.scratch/03-velocity-diction/phrase.svip3 +0 -0
  191. package/examples/.scratch/03-velocity-diction/phrase.svip3.bak.20261206-163755-200 +0 -0
  192. package/examples/.scratch/03-velocity-diction/phrase.svip3.bak.20261206-163755-203 +0 -0
  193. package/examples/.scratch/03-velocity-diction/phrase.svip3.bak.20261206-163755-204 +0 -0
  194. package/examples/.scratch/04-unknown-dialog-abort/dialog-demo.svip3 +0 -0
  195. package/examples/01-midi-to-wudi.mjs +144 -0
  196. package/examples/02-three-singers-compare.mjs +140 -0
  197. package/examples/03-velocity-diction-rerender.mjs +160 -0
  198. package/examples/04-unknown-dialog-abort.mjs +126 -0
  199. package/examples/README.md +101 -0
  200. package/examples/lib/harness.mjs +274 -0
  201. package/fixtures/midi/melody-480.mid +0 -0
  202. package/fixtures/midi/melody-96.mid +0 -0
  203. package/fixtures/svip/1.svip3 +0 -0
  204. package/fixtures/svip/3.svip3 +0 -0
  205. package/fixtures/uia/README.md +37 -0
  206. package/fixtures/uia/export-dialog.snapshot.json +446 -0
  207. package/fixtures/uia/main-window.snapshot.json +2997 -0
  208. package/fixtures/uia/open-dialog.snapshot.json +103 -0
  209. package/icon.svg +10 -0
  210. package/package.json +84 -4
  211. package/proto/xstudio.proto +128 -0
  212. package/scripts/check-contract.mjs +184 -0
  213. package/scripts/entry-smoke.mjs +26 -0
  214. package/scripts/inspect-svip.mjs +161 -0
  215. package/scripts/setup-venv.sh +93 -0
  216. package/scripts/wine-gui-probe.py +302 -0
  217. package/sidecar/xstudio_uia.py +1478 -0
  218. package/skills/xstudio-gui/SKILL.md +196 -0
  219. package/skills/xstudio-gui/assertions.md +103 -0
  220. package/skills/xstudio-gui/dialogs.md +90 -0
  221. package/skills/xstudio-gui/gestures.md +158 -0
  222. package/skills/xstudio-gui/ui-map.json +242 -0
@@ -0,0 +1,376 @@
1
+ /**
2
+ * Control-plane tools (§5.2): the only path that drives the X Studio GUI.
3
+ * Every tool here requires the UIA sidecar and fails gracefully when X Studio
4
+ * is not running.
5
+ * @module xstudio-linux/tools/control
6
+ */
7
+ import { defineTool, jsonRender } from './definition.js';
8
+ import { envelopeSchema } from '../shared/schema.js';
9
+ import { ok } from '../shared/types.js';
10
+ import { ErrorCode, XStudioError } from '../shared/errors.js';
11
+ import { matchKnownDialog } from '../core/diagnose/error-resolver.js';
12
+ import { enforceSkillGate, guiUnavailable, runTool } from './common.js';
13
+ /** The destructive-dialog blacklist: never auto-confirm these. */
14
+ const DESTRUCTIVE_PATTERNS = [/保存|save/i, /覆盖|overwrite/i, /删除|delete/i, /退出|quit|exit/i];
15
+ /** True when the dialog text is destructive and must not be confirmed. */
16
+ export function isDestructiveDialog(text) {
17
+ return DESTRUCTIVE_PATTERNS.some((pattern) => pattern.test(text));
18
+ }
19
+ /** Map transport-level failures onto the documented cloud error. */
20
+ function classifyRenderError(error) {
21
+ const message = error instanceof Error ? error.message : String(error);
22
+ if (/ENOTFOUND|ECONNREFUSED|ETIMEDOUT|EAI_AGAIN|network|fetch failed|timeout/i.test(message)) {
23
+ throw new XStudioError(ErrorCode.CLOUD_UNREACHABLE, `Cloud rendering is unreachable: ${message}`, {
24
+ hint: 'Check the network connection; X Studio renders on the cloud.',
25
+ next: ['Retry after connectivity returns.', 'The project file is unchanged; data-plane edits still work.'],
26
+ });
27
+ }
28
+ throw error;
29
+ }
30
+ /** Load the render bundle or fail with the standard GUI error. */
31
+ async function requireRender(services) {
32
+ const bundle = await services.getRender();
33
+ if (bundle === null)
34
+ throw guiUnavailable('The GUI sidecar is unavailable (sidecar/xstudio_uia.py missing or Python 3 failed to start).');
35
+ return bundle;
36
+ }
37
+ /** Load the sidecar or fail with the standard GUI error. */
38
+ async function requireSidecar(services) {
39
+ const sidecar = await services.getSidecar();
40
+ if (sidecar === null)
41
+ throw guiUnavailable('The GUI sidecar is unavailable (sidecar/xstudio_uia.py missing or Python 3 failed to start).');
42
+ return sidecar;
43
+ }
44
+ /** Fail fast when the app is not running. */
45
+ async function requireRunning(services) {
46
+ const sidecar = await requireSidecar(services);
47
+ const probe = await sidecar.probe();
48
+ if (!probe.running) {
49
+ throw new XStudioError(ErrorCode.XSTUDIO_NOT_RUNNING, 'X Studio is not running; GUI tools cannot act.', {
50
+ hint: 'Start X Studio manually, or stay on the data plane and use xstudio_guide_print.',
51
+ });
52
+ }
53
+ return { sidecar, probe };
54
+ }
55
+ /** §5.2 `xstudio_preview_trigger`. */
56
+ export function previewTriggerTool(services) {
57
+ return defineTool({
58
+ name: 'xstudio_preview_trigger',
59
+ description: 'Open a .svip3 project in X Studio and trigger the cloud render/preview. Two-phase by design: this returns as soon as the render starts; call xstudio_preview_wait to wait for completion. Requires X Studio to be running. The xstudio-gui skill is recommended reading (skills/xstudio-gui/SKILL.md) but is not required.',
60
+ parameters: { project_path: { type: 'string', required: true, description: 'Project to open and render.' } },
61
+ output: {
62
+ schema: envelopeSchema({
63
+ type: 'object',
64
+ additionalProperties: true,
65
+ properties: {
66
+ project_path: { type: 'string', required: true },
67
+ opened: { type: 'boolean', required: true },
68
+ started: { type: 'boolean', required: true },
69
+ steps: { type: 'array', items: { type: 'string' } },
70
+ },
71
+ }),
72
+ render: jsonRender,
73
+ },
74
+ async execute(args, exec) {
75
+ return runTool('gui', async () => {
76
+ await enforceSkillGate(services, 'xstudio_preview_trigger', exec.agent);
77
+ const projectPath = await services.resolvePath(args.project_path, exec.agent);
78
+ await requireRunning(services);
79
+ const { render } = await requireRender(services);
80
+ let result;
81
+ try {
82
+ result = await render.trigger(projectPath);
83
+ }
84
+ catch (error) {
85
+ classifyRenderError(error);
86
+ }
87
+ return ok('gui', { project_path: projectPath, opened: result.opened, started: result.started, steps: result.steps });
88
+ });
89
+ },
90
+ });
91
+ }
92
+ /** §5.2 `xstudio_preview_wait`. */
93
+ export function previewWaitTool(services) {
94
+ return defineTool({
95
+ name: 'xstudio_preview_wait',
96
+ description: 'Wait for the cloud render started by xstudio_preview_trigger to finish, polling the GUI state. Returns completed:false with evidence on timeout instead of throwing. The xstudio-gui skill is recommended reading (skills/xstudio-gui/SKILL.md) but is not required.',
97
+ parameters: { timeout_ms: { type: 'integer', description: 'Maximum wait in milliseconds; defaults to 120000.' } },
98
+ output: {
99
+ schema: envelopeSchema({
100
+ type: 'object',
101
+ additionalProperties: true,
102
+ properties: {
103
+ completed: { type: 'boolean', required: true },
104
+ elapsed_ms: { type: 'integer', required: true },
105
+ evidence: { type: 'array', items: { type: 'string' } },
106
+ },
107
+ }),
108
+ render: jsonRender,
109
+ },
110
+ async execute(args, exec) {
111
+ return runTool('gui', async () => {
112
+ await enforceSkillGate(services, 'xstudio_preview_wait', exec.agent);
113
+ const timeout = Math.max(1000, Math.min(600000, args.timeout_ms ?? 120000));
114
+ await requireRunning(services);
115
+ const { render } = await requireRender(services);
116
+ const result = await render.wait(timeout);
117
+ return ok('gui', { completed: result.completed, elapsed_ms: result.elapsedMs, evidence: result.evidence });
118
+ });
119
+ },
120
+ });
121
+ }
122
+ /** §5.2 `xstudio_export_run`. */
123
+ export function exportRunTool(services) {
124
+ return defineTool({
125
+ name: 'xstudio_export_run',
126
+ description: 'Walk the X Studio export dialog and produce an audio file. The export format/sample rate live in the dialog, never in the .svip3 file. Returns the artifact path and size after verifying the file exists. The xstudio-gui skill is recommended reading (skills/xstudio-gui/SKILL.md) but is not required.',
127
+ parameters: {
128
+ project_path: { type: 'string', required: true, description: 'Project to export.' },
129
+ format: { type: 'string', required: true, enum: ['wav', 'mp3', 'flac'], description: 'Output format.' },
130
+ sample_rate: { type: 'integer', description: 'Sample rate, e.g. 44100 or 48000.' },
131
+ bitrate: { type: 'string', description: 'Bitrate for lossy formats, e.g. "320k".' },
132
+ out_dir: { type: 'string', required: true, description: 'Output directory.' },
133
+ },
134
+ output: {
135
+ schema: envelopeSchema({
136
+ type: 'object',
137
+ additionalProperties: true,
138
+ properties: {
139
+ path: { type: 'string', required: true },
140
+ bytes: { type: 'integer', required: true },
141
+ format: { type: 'string', required: true },
142
+ duration_ms: { type: 'integer' },
143
+ },
144
+ }),
145
+ render: jsonRender,
146
+ },
147
+ async execute(args, exec) {
148
+ return runTool('gui', async () => {
149
+ await enforceSkillGate(services, 'xstudio_export_run', exec.agent);
150
+ const projectPath = await services.resolvePath(args.project_path, exec.agent);
151
+ const outDir = await services.resolvePath(args.out_dir, exec.agent);
152
+ await requireRunning(services);
153
+ const { render } = await requireRender(services);
154
+ const result = await render.runExport({
155
+ projectPath,
156
+ format: args.format,
157
+ sampleRate: args.sample_rate,
158
+ bitrate: args.bitrate,
159
+ outDir,
160
+ });
161
+ return ok('gui', { path: result.path, bytes: result.bytes, format: result.format });
162
+ });
163
+ },
164
+ });
165
+ }
166
+ /** §5.2 `xstudio_ui_snapshot`. */
167
+ export function uiSnapshotTool(services) {
168
+ return defineTool({
169
+ name: 'xstudio_ui_snapshot',
170
+ description: 'Return a numbered list of the interactable UIA elements of the X Studio main window, plus an optional thumbnail screenshot path. Refs are valid only for this snapshot; re-snapshot after any action that changes the window. The xstudio-gui skill is recommended reading (skills/xstudio-gui/SKILL.md) but is not required.',
171
+ parameters: {
172
+ include_screenshot: { type: 'boolean', description: 'Capture a PNG of the window to the plugin workspace.' },
173
+ max_elements: { type: 'integer', description: 'Cap the element list (default 400).' },
174
+ },
175
+ output: {
176
+ schema: envelopeSchema({
177
+ type: 'object',
178
+ additionalProperties: true,
179
+ properties: {
180
+ window: { type: 'object', additionalProperties: true, properties: { title: { type: 'string', required: true }, pid: { type: 'integer', required: true }, class_name: { type: 'string', required: true } } },
181
+ elements: { type: 'array', items: { type: 'object', additionalProperties: true, properties: { ref: { type: 'string', required: true }, name: { type: 'string', required: true }, automation_id: { type: 'string', required: true }, class_name: { type: 'string', required: true }, control_type: { type: 'string', required: true }, patterns: { type: 'array', items: { type: 'string' } }, enabled: { type: 'boolean', required: true }, depth: { type: 'integer', required: true } } } },
182
+ truncated: { type: 'boolean', required: true },
183
+ screenshot_path: { type: 'string' },
184
+ },
185
+ }),
186
+ render: jsonRender,
187
+ },
188
+ async execute(args, exec) {
189
+ return runTool('gui', async () => {
190
+ await enforceSkillGate(services, 'xstudio_ui_snapshot', exec.agent);
191
+ const sidecar = await requireSidecar(services);
192
+ const snapshot = await sidecar.snapshot({ includeScreenshot: args.include_screenshot === true, maxElements: args.max_elements ?? 400 });
193
+ return ok('gui', {
194
+ window: { title: snapshot.window.title, pid: snapshot.window.pid, class_name: snapshot.window.className },
195
+ ...(snapshot.treeAvailable === undefined ? {} : { tree_available: snapshot.treeAvailable }),
196
+ ...(snapshot.snapshotToken === undefined ? {} : { snapshot_token: snapshot.snapshotToken }),
197
+ elements: snapshot.elements.map((element) => ({
198
+ ref: element.ref,
199
+ name: element.name,
200
+ automation_id: element.automationId,
201
+ class_name: element.className,
202
+ control_type: element.controlType,
203
+ patterns: element.patterns,
204
+ enabled: element.enabled,
205
+ depth: element.depth,
206
+ ...(element.value === undefined ? {} : { value: element.value }),
207
+ ...(element.bounds === undefined ? {} : { bounds: element.bounds }),
208
+ })),
209
+ truncated: snapshot.truncated,
210
+ ...(snapshot.screenshotPath === undefined ? {} : { screenshot_path: snapshot.screenshotPath }),
211
+ });
212
+ });
213
+ },
214
+ });
215
+ }
216
+ /** §5.2 `xstudio_ui_act`: exactly one action per call. */
217
+ export function uiActTool(services) {
218
+ return defineTool({
219
+ name: 'xstudio_ui_act',
220
+ description: 'Perform exactly one primitive GUI action. Element ops (click/set_text/select/invoke_pattern/expand/collapse) target a snapshot ref; send_keys types into the focused window and needs only value (works without the accessibility tree). Destructive actions are refused. Coordinates are never accepted. The xstudio-gui skill is recommended reading (skills/xstudio-gui/SKILL.md) but is not required.',
221
+ parameters: {
222
+ ref: { type: 'string', description: 'Element ref from the latest snapshot (required for element ops; omit for send_keys).' },
223
+ op: { type: 'string', required: true, enum: ['click', 'set_text', 'select', 'invoke_pattern', 'send_keys', 'expand', 'collapse'], description: 'The primitive to perform.' },
224
+ value: { type: 'string', description: 'Text for set_text/send_keys, or the option for select.' },
225
+ },
226
+ output: {
227
+ schema: envelopeSchema({ type: 'object', additionalProperties: true, properties: { ok: { type: 'boolean', required: true }, detail: { type: 'string' } } }),
228
+ render: jsonRender,
229
+ },
230
+ async execute(args, exec) {
231
+ return runTool('gui', async () => {
232
+ await enforceSkillGate(services, 'xstudio_ui_act', exec.agent);
233
+ const sidecar = await requireSidecar(services);
234
+ const result = await sidecar.act({ ref: args.ref, op: args.op, ...(args.value === undefined ? {} : { value: args.value }) });
235
+ if (!result.ok)
236
+ throw new XStudioError(ErrorCode.GUI_ACTION_FAILED, result.detail ?? 'The UIA action failed.');
237
+ return ok('gui', { ok: true, ...(result.detail === undefined ? {} : { detail: result.detail }) });
238
+ });
239
+ },
240
+ });
241
+ }
242
+ /** §5.2 `xstudio_ui_assert`: fail-fast. */
243
+ export function uiAssertTool(services) {
244
+ return defineTool({
245
+ name: 'xstudio_ui_assert',
246
+ description: 'Assert a UI condition and fail fast when it does not hold. Use before and after every control-plane step: element exists/enabled/focused, window text present, or an element value equals the expectation. The xstudio-gui skill is recommended reading (skills/xstudio-gui/SKILL.md) but is not required.',
247
+ parameters: {
248
+ ref: { type: 'string', description: 'Element ref from the latest snapshot.' },
249
+ text: { type: 'string', description: 'Text that must be present in the window.' },
250
+ state: { type: 'string', enum: ['exists', 'enabled', 'visible', 'focused', 'value'], description: 'State to check (default exists).' },
251
+ expect: { type: 'string', description: 'Expected value for state "value".' },
252
+ },
253
+ output: {
254
+ schema: envelopeSchema({ type: 'object', additionalProperties: true, properties: { ok: { type: 'boolean', required: true }, actual: { type: 'string' }, detail: { type: 'string' } } }),
255
+ render: jsonRender,
256
+ },
257
+ async execute(args, exec) {
258
+ return runTool('gui', async () => {
259
+ await enforceSkillGate(services, 'xstudio_ui_assert', exec.agent);
260
+ const sidecar = await requireSidecar(services);
261
+ const result = await sidecar.assert({ ...(args.ref === undefined ? {} : { ref: args.ref }), ...(args.text === undefined ? {} : { text: args.text }), ...(args.state === undefined ? {} : { state: args.state }), ...(args.expect === undefined ? {} : { expect: args.expect }) });
262
+ if (!result.ok) {
263
+ throw new XStudioError(ErrorCode.GUI_ASSERT_FAILED, result.detail ?? 'The UI assertion failed.', {
264
+ hint: result.actual === undefined ? undefined : `Actual: ${result.actual}`,
265
+ });
266
+ }
267
+ return ok('gui', { ok: true, ...(result.actual === undefined ? {} : { actual: result.actual }) });
268
+ });
269
+ },
270
+ });
271
+ }
272
+ /** §5.2 `xstudio_ui_dialog_respond`. */
273
+ export function uiDialogRespondTool(services) {
274
+ return defineTool({
275
+ name: 'xstudio_ui_dialog_respond',
276
+ description: 'Inspect the current X Studio dialog and respond safely. Known fingerprints are handled from the local dialogs table; unknown text returns the always-safe manual suggestion. Destructive dialogs (save/overwrite/delete/quit) are never auto-confirmed. The xstudio-gui skill is recommended reading (skills/xstudio-gui/SKILL.md) but is not required.',
277
+ parameters: {
278
+ error_text: { type: 'string', description: 'Dialog text to diagnose when no dialog is currently readable.' },
279
+ action: { type: 'string', enum: ['dismiss', 'cancel', 'confirm', 'retry', 'login', 'manual'], description: 'Explicit action; defaults to the fingerprint or diagnosis suggestion.' },
280
+ },
281
+ output: {
282
+ schema: envelopeSchema({
283
+ type: 'object',
284
+ additionalProperties: true,
285
+ properties: {
286
+ dialog: { type: 'object', additionalProperties: true, properties: { title: { type: 'string', required: true }, text: { type: 'string', required: true }, buttons: { type: 'array', items: { type: 'string' } } } },
287
+ matched: { type: 'string' },
288
+ suggested_action: { type: 'string', required: true },
289
+ responded: { type: 'boolean', required: true },
290
+ manual_instruction: { type: 'string' },
291
+ confidence: { type: 'number' },
292
+ },
293
+ }),
294
+ render: jsonRender,
295
+ },
296
+ async execute(args, exec) {
297
+ return runTool('gui', async () => {
298
+ await enforceSkillGate(services, 'xstudio_ui_dialog_respond', exec.agent);
299
+ const sidecar = await requireSidecar(services);
300
+ const dialog = await sidecar.readDialog();
301
+ const text = dialog?.text ?? args.error_text ?? '';
302
+ const known = text === '' ? null : matchKnownDialog(text);
303
+ let suggested = args.action;
304
+ const via = 'gui';
305
+ let manualInstruction;
306
+ let confidence;
307
+ if (suggested === undefined) {
308
+ if (known) {
309
+ suggested = known.action;
310
+ }
311
+ else if (text !== '') {
312
+ const diagnosis = await services.diagnose(text);
313
+ suggested = diagnosis.suggestedAction;
314
+ manualInstruction = diagnosis.manualInstruction;
315
+ confidence = diagnosis.confidence;
316
+ }
317
+ else {
318
+ suggested = 'manual';
319
+ }
320
+ }
321
+ const destructive = isDestructiveDialog(text);
322
+ const effective = destructive && suggested === 'confirm' ? 'cancel' : suggested;
323
+ const responded = dialog !== null && effective !== 'manual' && effective !== 'login';
324
+ if (responded) {
325
+ const result = await sidecar.respondDialog(effective);
326
+ if (!result.ok)
327
+ throw new XStudioError(ErrorCode.GUI_ACTION_FAILED, result.detail ?? 'Failed to answer the dialog.');
328
+ }
329
+ return ok(via, {
330
+ ...(dialog === null ? {} : { dialog: { title: dialog.title, text: dialog.text, buttons: dialog.buttons } }),
331
+ ...(known === null ? {} : { matched: known.id }),
332
+ suggested_action: effective,
333
+ responded,
334
+ ...(manualInstruction === undefined ? {} : { manual_instruction: manualInstruction }),
335
+ ...(confidence === undefined ? {} : { confidence }),
336
+ });
337
+ });
338
+ },
339
+ });
340
+ }
341
+ /** §5.2 `xstudio_ui_abort`. */
342
+ export function uiAbortTool(services) {
343
+ return defineTool({
344
+ name: 'xstudio_ui_abort',
345
+ description: 'Abort the current GUI orchestration immediately and release control. Project files are never left half-written (writes are atomic and backed up). The xstudio-gui skill is recommended reading (skills/xstudio-gui/SKILL.md) but is not required.',
346
+ parameters: {},
347
+ output: {
348
+ schema: envelopeSchema({ type: 'object', additionalProperties: true, properties: { ok: { type: 'boolean', required: true } } }),
349
+ render: jsonRender,
350
+ },
351
+ async execute(_args, exec) {
352
+ return runTool('gui', async () => {
353
+ await enforceSkillGate(services, 'xstudio_ui_abort', exec.agent);
354
+ const sidecar = await services.getSidecar();
355
+ if (sidecar === null)
356
+ return ok('gui', { ok: true, detail: 'no sidecar to abort' });
357
+ const result = await sidecar.abort();
358
+ return ok('gui', { ok: result.ok });
359
+ });
360
+ },
361
+ });
362
+ }
363
+ /** All control-plane tools. */
364
+ export function controlTools(services) {
365
+ return [
366
+ previewTriggerTool(services),
367
+ previewWaitTool(services),
368
+ exportRunTool(services),
369
+ uiSnapshotTool(services),
370
+ uiActTool(services),
371
+ uiAssertTool(services),
372
+ uiDialogRespondTool(services),
373
+ uiAbortTool(services),
374
+ ];
375
+ }
376
+ //# sourceMappingURL=control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control.js","sourceRoot":"","sources":["../../src/tools/control.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAErE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAEvE,kEAAkE;AAClE,MAAM,oBAAoB,GAAG,CAAC,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,CAAC,CAAA;AAEzF,0EAA0E;AAC1E,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;AACnE,CAAC;AAED,oEAAoE;AACpE,SAAS,mBAAmB,CAAC,KAAc;IACzC,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACtE,IAAI,0EAA0E,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7F,MAAM,IAAI,YAAY,CAAC,SAAS,CAAC,iBAAiB,EAAE,mCAAmC,OAAO,EAAE,EAAE;YAChG,IAAI,EAAE,8DAA8D;YACpE,IAAI,EAAE,C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AC5B,eAAe,CAAC,QAAQ,CAAC;QACzB,aAAa,CAAC,QAAQ,CAAC;QACvB,cAAc,CAAC,QAAQ,CAAC;QACxB,SAAS,CAAC,QAAQ,CAAC;QACnB,YAAY,CAAC,QAAQ,CAAC;QACtB,mBAAmB,CAAC,QAAQ,CAAC;QAC7B,WAAW,CAAC,QAAQ,CAAC;KACtB,CAAA;AACH,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { ToolServices } from '../services.js';
2
+ /** The singer id must carry the product-line prefix. */
3
+ export declare function normalizeSingerId(input: string): string;
4
+ /** §5.1 `xstudio_singers_list`. */
5
+ export declare function singersListTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
6
+ /** §5.1 `xstudio_project_read`. */
7
+ export declare function projectReadTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
8
+ /** §5.1 `xstudio_project_create`. */
9
+ export declare function projectCreateTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
10
+ /** Parse "N/D" with a clear error. */
11
+ export declare function parseTimeSig(input: string): [number, number];
12
+ /** §5.1 `xstudio_note_add`. */
13
+ export declare function noteAddTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
14
+ /** §5.1 `xstudio_note_remove`. */
15
+ export declare function noteRemoveTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
16
+ /** §5.1 `xstudio_note_edit`. */
17
+ export declare function noteEditTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
18
+ /** §5.1 `xstudio_tempo_set`. */
19
+ export declare function tempoSetTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
20
+ /** §5.1 `xstudio_timesig_set`. */
21
+ export declare function timesigSetTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
22
+ /** §5.1 `xstudio_velocity_set`. */
23
+ export declare function velocitySetTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
24
+ /** §5.1 `xstudio_gain_set`. */
25
+ export declare function gainSetTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
26
+ /** §5.1 `xstudio_lyrics_align`. */
27
+ export declare function lyricsAlignTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
28
+ /** §5.1 `xstudio_midi_import`. */
29
+ export declare function midiImportTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
30
+ /** §5.1 `xstudio_midi_export`. */
31
+ export declare function midiExportTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
32
+ /** §5.1 `xstudio_batch`: one melody, several singers. */
33
+ export declare function batchTool(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>;
34
+ /** Derive a batch output path beside the source project. */
35
+ export declare function deriveBatchPath(sourcePath: string, singerId: string): string;
36
+ /** All data-plane tools in registration order. */
37
+ export declare function dataTools(services: ToolServices): import("./definition.js").LocalToolDefinition<any, any>[];