unity-mcp-cli 0.69.1 → 0.71.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 +14 -1
- package/dist/commands/open.d.ts +20 -10
- package/dist/commands/open.js +224 -117
- package/dist/commands/open.js.map +1 -1
- package/dist/lib/open.d.ts +97 -0
- package/dist/lib/open.js +461 -0
- package/dist/lib/open.js.map +1 -0
- package/dist/lib/types.d.ts +191 -0
- package/dist/lib.d.ts +2 -1
- package/dist/lib.js +1 -0
- package/dist/lib.js.map +1 -1
- package/dist/utils/launch-error-dismiss.d.ts +159 -0
- package/dist/utils/launch-error-dismiss.js +440 -0
- package/dist/utils/launch-error-dismiss.js.map +1 -0
- package/dist/utils/unity-editor.d.ts +17 -3
- package/dist/utils/unity-editor.js +47 -11
- package/dist/utils/unity-editor.js.map +1 -1
- package/dist/utils/unity-hub.js +20 -4
- package/dist/utils/unity-hub.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import { execFile, execFileSync } from 'child_process';
|
|
2
|
+
import { platform as nodePlatform } from 'os';
|
|
3
|
+
import { verbose } from './ui.js';
|
|
4
|
+
/**
|
|
5
|
+
* Window-title fragments matched against the Unity launch-errors
|
|
6
|
+
* dialog. Both legacy and current strings are listed so the matcher
|
|
7
|
+
* stays resilient across Unity versions. The match is case-insensitive
|
|
8
|
+
* and substring-based — Unity's actual title varies by version but
|
|
9
|
+
* always contains one of these.
|
|
10
|
+
*
|
|
11
|
+
* Exposed so tests can assert the matcher knows about both spellings
|
|
12
|
+
* without grepping the implementation.
|
|
13
|
+
*/
|
|
14
|
+
export const LAUNCH_ERROR_DIALOG_TITLE_FRAGMENTS = [
|
|
15
|
+
'Safe Mode', // Unity 2020.2+ ("Enter Safe Mode?") — the launch-errors dialog on every modern Unity (2022 LTS, 6000.x)
|
|
16
|
+
'Compiler Errors', // Unity 2020+ ("Hold On" + "Compiler Errors on Launch")
|
|
17
|
+
'Hold On', // Generic Unity progress dialog wrapping the launch-errors variant
|
|
18
|
+
'Compile Errors', // Older Unity dialog spelling
|
|
19
|
+
'Scripts have compiler errors', // Unity 2022+ on Linux (window manager surfacing)
|
|
20
|
+
];
|
|
21
|
+
/** The button label this helper presses to dismiss the dialog. */
|
|
22
|
+
export const DISMISS_BUTTON_LABEL = 'Ignore';
|
|
23
|
+
/**
|
|
24
|
+
* Producer-side prefixes for error messages that callers treat as
|
|
25
|
+
* permanent (the polling loop bails out instead of ticking again).
|
|
26
|
+
*
|
|
27
|
+
* Exported so the bailout matcher in `lib/open.ts` and the
|
|
28
|
+
* error-construction sites below reference the SAME literal — a
|
|
29
|
+
* future re-word lands in both places at once.
|
|
30
|
+
*
|
|
31
|
+
* The matcher in `lib/open.ts` uses `String.includes`, so each
|
|
32
|
+
* constant just needs to be a stable substring of the full message.
|
|
33
|
+
*/
|
|
34
|
+
export const LINUX_XDOTOOL_MISSING_PREFIX = 'xdotool not found on PATH';
|
|
35
|
+
export const UNSUPPORTED_PLATFORM_PREFIX = 'Unsupported platform for launch-errors auto-dismiss';
|
|
36
|
+
/**
|
|
37
|
+
* Try once to find and dismiss the Unity launch-errors dialog on the
|
|
38
|
+
* current OS desktop. Pure-ish — performs a single OS call and
|
|
39
|
+
* returns; never blocks past the underlying syscall's own timeout.
|
|
40
|
+
*
|
|
41
|
+
* Library-safe: never throws (errors are returned in the
|
|
42
|
+
* `DismissOutcome` union), never writes to stdout/stderr, never
|
|
43
|
+
* mutates global state.
|
|
44
|
+
*
|
|
45
|
+
* The helper is platform-dispatched:
|
|
46
|
+
* - **Windows**: Win32 (`FindWindowW` / `EnumWindows` /
|
|
47
|
+
* `EnumChildWindows` / `GetWindowTextW` / `SendMessageW(BM_CLICK)`)
|
|
48
|
+
* driven from PowerShell so we do not pull in a native node-gyp
|
|
49
|
+
* dependency. UI Automation is the documented fallback if title
|
|
50
|
+
* matching breaks on a future Unity release.
|
|
51
|
+
* - **macOS**: AppleScript via `osascript` (the leaner
|
|
52
|
+
* AX-C-API-direct path is a documented follow-up). Requires the
|
|
53
|
+
* user to have granted Accessibility permission to the terminal /
|
|
54
|
+
* `unity-mcp-cli` binary once.
|
|
55
|
+
* - **Linux/X11**: `xdotool` (documented as a Linux platform
|
|
56
|
+
* dependency; `wmctrl` is acceptable as an alternative window
|
|
57
|
+
* enumerator). Wayland is deferred — call out explicitly in the
|
|
58
|
+
* error message so the user does not waste time debugging.
|
|
59
|
+
*/
|
|
60
|
+
export async function tryDismissLaunchErrorsDialog(platform = nodePlatform()) {
|
|
61
|
+
switch (platform) {
|
|
62
|
+
case 'win32':
|
|
63
|
+
return tryDismissWindows();
|
|
64
|
+
case 'darwin':
|
|
65
|
+
return tryDismissMacOS();
|
|
66
|
+
case 'linux':
|
|
67
|
+
return tryDismissLinuxX11();
|
|
68
|
+
default:
|
|
69
|
+
return {
|
|
70
|
+
kind: 'error',
|
|
71
|
+
message: `${UNSUPPORTED_PLATFORM_PREFIX}: ${platform}`,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
// Windows — Win32 via PowerShell
|
|
77
|
+
// ---------------------------------------------------------------------------
|
|
78
|
+
/**
|
|
79
|
+
* The PowerShell payload that probes for the Unity launch-errors
|
|
80
|
+
* dialog and clicks `Ignore` if found. Exported as a string (not a
|
|
81
|
+
* function) so tests can assert the script shape without launching
|
|
82
|
+
* PowerShell.
|
|
83
|
+
*
|
|
84
|
+
* Strategy:
|
|
85
|
+
* 1. P/Invoke `EnumWindows` via Add-Type to enumerate every visible
|
|
86
|
+
* top-level window owned by `Unity.exe`.
|
|
87
|
+
* 2. Filter by title fragment (case-insensitive substring).
|
|
88
|
+
* 3. Walk child windows with `EnumChildWindows`, looking for a
|
|
89
|
+
* Button whose text equals `Ignore`.
|
|
90
|
+
* 4. Send `BM_CLICK` (0x00F5) to the matched button. `BM_CLICK` is
|
|
91
|
+
* preferred over a synthesised mouse event — it works even if
|
|
92
|
+
* the user is mid-click in another app, and it does not steal
|
|
93
|
+
* focus.
|
|
94
|
+
*
|
|
95
|
+
* The script writes a single-token result to stdout:
|
|
96
|
+
* - `dismissed:<button>` on success
|
|
97
|
+
* - `not-found` when no dialog was matched
|
|
98
|
+
* - `error:<message>` on an unexpected exception
|
|
99
|
+
*/
|
|
100
|
+
export const WINDOWS_DISMISS_PS_SCRIPT = `
|
|
101
|
+
$ErrorActionPreference = 'Stop'
|
|
102
|
+
try {
|
|
103
|
+
if (-not ([System.Management.Automation.PSTypeName]'UnityMcp.LaunchErrors.Dismisser').Type) {
|
|
104
|
+
Add-Type -TypeDefinition @"
|
|
105
|
+
using System;
|
|
106
|
+
using System.Collections.Generic;
|
|
107
|
+
using System.Runtime.InteropServices;
|
|
108
|
+
using System.Text;
|
|
109
|
+
namespace UnityMcp.LaunchErrors {
|
|
110
|
+
public static class Dismisser {
|
|
111
|
+
public delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
|
|
112
|
+
[DllImport("user32.dll")] static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);
|
|
113
|
+
[DllImport("user32.dll", CharSet=CharSet.Unicode)] static extern int GetWindowTextW(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
|
|
114
|
+
[DllImport("user32.dll", CharSet=CharSet.Unicode)] static extern int GetClassNameW(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
|
|
115
|
+
[DllImport("user32.dll")] static extern bool IsWindowVisible(IntPtr hWnd);
|
|
116
|
+
[DllImport("user32.dll")] static extern bool EnumChildWindows(IntPtr hWndParent, EnumWindowsProc lpEnumFunc, IntPtr lParam);
|
|
117
|
+
[DllImport("user32.dll")] static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
|
|
118
|
+
[DllImport("user32.dll", CharSet=CharSet.Unicode)] static extern IntPtr SendMessageW(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
|
119
|
+
const uint BM_CLICK = 0x00F5;
|
|
120
|
+
static readonly string[] TitleFragments = new[] { ${LAUNCH_ERROR_DIALOG_TITLE_FRAGMENTS.map((f) => JSON.stringify(f)).join(', ')} };
|
|
121
|
+
static readonly string[] ButtonLabels = new[] { "${DISMISS_BUTTON_LABEL}", "&${DISMISS_BUTTON_LABEL}" };
|
|
122
|
+
public static string TryDismiss(int[] unityPids) {
|
|
123
|
+
var unityPidSet = new HashSet<uint>();
|
|
124
|
+
for (int i = 0; i < unityPids.Length; i++) unityPidSet.Add((uint)unityPids[i]);
|
|
125
|
+
IntPtr matchedDialog = IntPtr.Zero;
|
|
126
|
+
var sb = new StringBuilder(512);
|
|
127
|
+
EnumWindows((hWnd, lParam) => {
|
|
128
|
+
if (!IsWindowVisible(hWnd)) return true;
|
|
129
|
+
uint procId; GetWindowThreadProcessId(hWnd, out procId);
|
|
130
|
+
if (!unityPidSet.Contains(procId)) return true;
|
|
131
|
+
sb.Length = 0;
|
|
132
|
+
GetWindowTextW(hWnd, sb, sb.Capacity);
|
|
133
|
+
var text = sb.ToString();
|
|
134
|
+
foreach (var frag in TitleFragments) {
|
|
135
|
+
if (text.IndexOf(frag, StringComparison.OrdinalIgnoreCase) >= 0) {
|
|
136
|
+
matchedDialog = hWnd;
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return true;
|
|
141
|
+
}, IntPtr.Zero);
|
|
142
|
+
if (matchedDialog == IntPtr.Zero) return "not-found";
|
|
143
|
+
IntPtr matchedButton = IntPtr.Zero;
|
|
144
|
+
EnumChildWindows(matchedDialog, (hWnd, lParam) => {
|
|
145
|
+
sb.Length = 0;
|
|
146
|
+
GetClassNameW(hWnd, sb, sb.Capacity);
|
|
147
|
+
if (sb.ToString() != "Button") return true;
|
|
148
|
+
sb.Length = 0;
|
|
149
|
+
GetWindowTextW(hWnd, sb, sb.Capacity);
|
|
150
|
+
var text = sb.ToString();
|
|
151
|
+
foreach (var label in ButtonLabels) {
|
|
152
|
+
if (string.Equals(text, label, StringComparison.OrdinalIgnoreCase)) {
|
|
153
|
+
matchedButton = hWnd;
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return true;
|
|
158
|
+
}, IntPtr.Zero);
|
|
159
|
+
if (matchedButton == IntPtr.Zero) return "not-found";
|
|
160
|
+
SendMessageW(matchedButton, BM_CLICK, IntPtr.Zero, IntPtr.Zero);
|
|
161
|
+
return "dismissed:${DISMISS_BUTTON_LABEL}";
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
"@
|
|
166
|
+
}
|
|
167
|
+
$unityPids = @(Get-Process -Name 'Unity' -ErrorAction SilentlyContinue | ForEach-Object { [int]$_.Id })
|
|
168
|
+
if ($unityPids.Count -eq 0) { Write-Output 'not-found'; return }
|
|
169
|
+
Write-Output ([UnityMcp.LaunchErrors.Dismisser]::TryDismiss([int[]]$unityPids))
|
|
170
|
+
} catch {
|
|
171
|
+
Write-Output ('error:' + $_.Exception.Message)
|
|
172
|
+
}
|
|
173
|
+
`;
|
|
174
|
+
async function tryDismissWindows() {
|
|
175
|
+
return new Promise((resolve) => {
|
|
176
|
+
execFile('powershell', ['-NoProfile', '-NonInteractive', '-Command', WINDOWS_DISMISS_PS_SCRIPT], { timeout: 5000, windowsHide: true }, (err, stdout) => {
|
|
177
|
+
if (err) {
|
|
178
|
+
// ETIMEDOUT, ENOENT (powershell missing), etc. Treat as transient.
|
|
179
|
+
verbose(`tryDismissWindows: powershell invocation failed (${err.message}) — treating as not-found`);
|
|
180
|
+
resolve({ kind: 'error', message: err.message });
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
resolve(parseDismissOutput(stdout));
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
// ---------------------------------------------------------------------------
|
|
188
|
+
// macOS — AppleScript via osascript
|
|
189
|
+
// ---------------------------------------------------------------------------
|
|
190
|
+
/**
|
|
191
|
+
* The AppleScript snippet used for the macOS dismiss path. Exposed as
|
|
192
|
+
* a string for testability.
|
|
193
|
+
*
|
|
194
|
+
* Strategy: iterate every window of the Unity application process and
|
|
195
|
+
* click the first button titled `Ignore`. If the Unity process is not
|
|
196
|
+
* running OR no matching button exists, the script reports
|
|
197
|
+
* `not-found`. Any AppleScript exception (e.g. Accessibility
|
|
198
|
+
* permission not granted) is reported as `error:<message>` so the
|
|
199
|
+
* caller can surface it once and continue polling.
|
|
200
|
+
*
|
|
201
|
+
* Requires the Terminal / `unity-mcp-cli` binary to have been granted
|
|
202
|
+
* Accessibility permission in System Settings → Privacy & Security →
|
|
203
|
+
* Accessibility. Documented in the README.
|
|
204
|
+
*/
|
|
205
|
+
export const MACOS_DISMISS_APPLESCRIPT = `
|
|
206
|
+
on run
|
|
207
|
+
try
|
|
208
|
+
tell application "System Events"
|
|
209
|
+
if not (exists process "Unity") then
|
|
210
|
+
return "not-found"
|
|
211
|
+
end if
|
|
212
|
+
tell process "Unity"
|
|
213
|
+
repeat with w in windows
|
|
214
|
+
try
|
|
215
|
+
if exists (button "${DISMISS_BUTTON_LABEL}" of w) then
|
|
216
|
+
click button "${DISMISS_BUTTON_LABEL}" of w
|
|
217
|
+
return "dismissed:${DISMISS_BUTTON_LABEL}"
|
|
218
|
+
end if
|
|
219
|
+
end try
|
|
220
|
+
end repeat
|
|
221
|
+
end tell
|
|
222
|
+
end tell
|
|
223
|
+
return "not-found"
|
|
224
|
+
on error errMsg
|
|
225
|
+
return "error:" & errMsg
|
|
226
|
+
end try
|
|
227
|
+
end run
|
|
228
|
+
`;
|
|
229
|
+
async function tryDismissMacOS() {
|
|
230
|
+
return new Promise((resolve) => {
|
|
231
|
+
execFile('osascript', ['-e', MACOS_DISMISS_APPLESCRIPT], { timeout: 5000 }, (err, stdout) => {
|
|
232
|
+
if (err) {
|
|
233
|
+
verbose(`tryDismissMacOS: osascript invocation failed (${err.message}) — treating as transient error`);
|
|
234
|
+
resolve({ kind: 'error', message: err.message });
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
resolve(parseDismissOutput(stdout));
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
// ---------------------------------------------------------------------------
|
|
242
|
+
// Linux/X11 — xdotool
|
|
243
|
+
// ---------------------------------------------------------------------------
|
|
244
|
+
/**
|
|
245
|
+
* Whether `xdotool` is on PATH. Cached per process so the polling
|
|
246
|
+
* loop pays the lookup cost at most once. `which xdotool` /
|
|
247
|
+
* `command -v xdotool` is too coarse here — we directly try
|
|
248
|
+
* `xdotool --version` and observe the exit code.
|
|
249
|
+
*/
|
|
250
|
+
let xdotoolPresence;
|
|
251
|
+
function isXdotoolAvailable() {
|
|
252
|
+
if (xdotoolPresence !== undefined)
|
|
253
|
+
return xdotoolPresence;
|
|
254
|
+
try {
|
|
255
|
+
execFileSync('xdotool', ['--version'], {
|
|
256
|
+
stdio: 'ignore',
|
|
257
|
+
timeout: 2000,
|
|
258
|
+
});
|
|
259
|
+
xdotoolPresence = true;
|
|
260
|
+
}
|
|
261
|
+
catch {
|
|
262
|
+
xdotoolPresence = false;
|
|
263
|
+
}
|
|
264
|
+
return xdotoolPresence;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Reset the cached `xdotool` presence flag. Test-only — production
|
|
268
|
+
* code never needs to call this. Exposed so tests can simulate "the
|
|
269
|
+
* tool was installed mid-process" without affecting other tests.
|
|
270
|
+
*/
|
|
271
|
+
export function _resetXdotoolPresenceForTests() {
|
|
272
|
+
xdotoolPresence = undefined;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Escape a literal string for safe use in `xdotool search --name`.
|
|
276
|
+
* `xdotool search --name` interprets its argument as a regex; without
|
|
277
|
+
* escaping, a future fragment containing metacharacters (e.g.
|
|
278
|
+
* `(Hold On)` or `Compiler Errors v2.0+`) would silently change the
|
|
279
|
+
* match semantics. The current fragments are regex-safe but this
|
|
280
|
+
* helper is defensive and zero-runtime-cost.
|
|
281
|
+
*
|
|
282
|
+
* Exposed for tests so the regex-safety contract is locked down.
|
|
283
|
+
*/
|
|
284
|
+
export function regexEscapeForXdotool(s) {
|
|
285
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Look up currently-running Unity Editor PIDs on the local box.
|
|
289
|
+
* Used by the Linux/X11 dismiss path to scope the title-fragment
|
|
290
|
+
* window match to Unity processes only — without this, `xdotool
|
|
291
|
+
* search --name 'Hold On'` would match any top-level window whose
|
|
292
|
+
* title contains "Hold On" (browser tab, chat client, etc.).
|
|
293
|
+
*
|
|
294
|
+
* Returns an empty array on any failure (missing `pgrep`, no Unity
|
|
295
|
+
* running, syscall error). Pure / idempotent / never throws.
|
|
296
|
+
*/
|
|
297
|
+
function getUnityPidsLinux() {
|
|
298
|
+
try {
|
|
299
|
+
const stdout = execFileSync('pgrep', ['-x', 'Unity'], {
|
|
300
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
301
|
+
timeout: 1000,
|
|
302
|
+
encoding: 'utf8',
|
|
303
|
+
});
|
|
304
|
+
return stdout
|
|
305
|
+
.split(/\r?\n/)
|
|
306
|
+
.map((s) => parseInt(s.trim(), 10))
|
|
307
|
+
.filter((n) => Number.isFinite(n) && n > 0);
|
|
308
|
+
}
|
|
309
|
+
catch {
|
|
310
|
+
return [];
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
async function tryDismissLinuxX11() {
|
|
314
|
+
if (!isXdotoolAvailable()) {
|
|
315
|
+
return {
|
|
316
|
+
kind: 'error',
|
|
317
|
+
message: `${LINUX_XDOTOOL_MISSING_PREFIX}. Install it (e.g. \`sudo apt-get install xdotool\`) to enable Unity launch-errors auto-dismiss on Linux/X11. Wayland is not yet supported.`,
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
const unityPids = new Set(getUnityPidsLinux());
|
|
321
|
+
if (unityPids.size === 0) {
|
|
322
|
+
return { kind: 'not-found' };
|
|
323
|
+
}
|
|
324
|
+
// Strategy:
|
|
325
|
+
// 1. `xdotool search --name '<regex-escaped fragment>'` once per
|
|
326
|
+
// fragment, collect candidate window IDs. Empty stdout from
|
|
327
|
+
// `xdotool search` is reported via a non-zero exit; treat that
|
|
328
|
+
// as "no match".
|
|
329
|
+
// 2. Filter candidate windows to those owned by a Unity PID via
|
|
330
|
+
// `xdotool getwindowpid <winId>` so we never act on an
|
|
331
|
+
// unrelated top-level window with a colliding title.
|
|
332
|
+
// 3. Activate the window (`windowactivate --sync`) and send Return
|
|
333
|
+
// to click the focused button. The Unity launch-errors dialog
|
|
334
|
+
// defaults focus to the leftmost button, which IS `Ignore`.
|
|
335
|
+
return new Promise((resolve) => {
|
|
336
|
+
const fragments = LAUNCH_ERROR_DIALOG_TITLE_FRAGMENTS;
|
|
337
|
+
let idx = 0;
|
|
338
|
+
const tryNext = () => {
|
|
339
|
+
if (idx >= fragments.length) {
|
|
340
|
+
resolve({ kind: 'not-found' });
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
const fragment = fragments[idx++];
|
|
344
|
+
execFile('xdotool', ['search', '--name', regexEscapeForXdotool(fragment)], { timeout: 2000 }, (err, stdout) => {
|
|
345
|
+
if (err || !stdout.trim()) {
|
|
346
|
+
tryNext();
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const candidateIds = stdout.trim().split(/\s+/).filter(Boolean);
|
|
350
|
+
findUnityOwnedWindow(candidateIds, unityPids, (winId) => {
|
|
351
|
+
if (!winId) {
|
|
352
|
+
tryNext();
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
// Activate then send Return to click the focused (Ignore) button.
|
|
356
|
+
execFile('xdotool', ['windowactivate', '--sync', winId, 'key', '--clearmodifiers', 'Return'], { timeout: 2000 }, (activateErr) => {
|
|
357
|
+
if (activateErr) {
|
|
358
|
+
resolve({
|
|
359
|
+
kind: 'error',
|
|
360
|
+
message: `xdotool failed to dismiss window ${winId}: ${activateErr.message}`,
|
|
361
|
+
});
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
resolve({ kind: 'dismissed', button: DISMISS_BUTTON_LABEL });
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
};
|
|
369
|
+
tryNext();
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Walk `candidateIds` and call `done(winId)` with the first window
|
|
374
|
+
* owned by a Unity PID, or `done(undefined)` if none match. Each
|
|
375
|
+
* `xdotool getwindowpid <id>` call has a short timeout so a stalled
|
|
376
|
+
* lookup cannot stall the polling loop. Sequential, not parallel —
|
|
377
|
+
* the candidate list is small and parallelism would buy us nothing
|
|
378
|
+
* meaningful here.
|
|
379
|
+
*/
|
|
380
|
+
function findUnityOwnedWindow(candidateIds, unityPids, done) {
|
|
381
|
+
let idx = 0;
|
|
382
|
+
const next = () => {
|
|
383
|
+
if (idx >= candidateIds.length) {
|
|
384
|
+
done(undefined);
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
const winId = candidateIds[idx++];
|
|
388
|
+
execFile('xdotool', ['getwindowpid', winId], { timeout: 1000 }, (err, stdout) => {
|
|
389
|
+
if (err) {
|
|
390
|
+
next();
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
const pid = parseInt(stdout.trim(), 10);
|
|
394
|
+
if (Number.isFinite(pid) && unityPids.has(pid)) {
|
|
395
|
+
done(winId);
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
next();
|
|
399
|
+
});
|
|
400
|
+
};
|
|
401
|
+
next();
|
|
402
|
+
}
|
|
403
|
+
// ---------------------------------------------------------------------------
|
|
404
|
+
// Shared helpers
|
|
405
|
+
// ---------------------------------------------------------------------------
|
|
406
|
+
/**
|
|
407
|
+
* Parse the single-token contract every platform-specific dispatcher
|
|
408
|
+
* writes to stdout. Exposed for tests so we can exhaustively cover
|
|
409
|
+
* the parser without invoking PowerShell / osascript / xdotool.
|
|
410
|
+
*
|
|
411
|
+
* Inspects the LAST non-empty line of stdout, not the whole buffer:
|
|
412
|
+
* a stray PowerShell warning, `osascript` deprecation notice, or
|
|
413
|
+
* `xdotool` chatter printed before the contract token must not
|
|
414
|
+
* misclassify the result as `not-found`.
|
|
415
|
+
*
|
|
416
|
+
* Contract:
|
|
417
|
+
* - `dismissed:<button>` → `{ kind: 'dismissed', button }`
|
|
418
|
+
* - `not-found` → `{ kind: 'not-found' }`
|
|
419
|
+
* - `error:<message>` → `{ kind: 'error', message }`
|
|
420
|
+
* - any other / empty → `{ kind: 'not-found' }` (defensive — a
|
|
421
|
+
* transient parse miss is treated as "not yet visible" rather
|
|
422
|
+
* than aborting the polling loop)
|
|
423
|
+
*/
|
|
424
|
+
export function parseDismissOutput(stdout) {
|
|
425
|
+
const lines = stdout.split(/\r?\n/).map((l) => l.trim()).filter((l) => l.length > 0);
|
|
426
|
+
if (lines.length === 0)
|
|
427
|
+
return { kind: 'not-found' };
|
|
428
|
+
const last = lines[lines.length - 1];
|
|
429
|
+
if (last === 'not-found')
|
|
430
|
+
return { kind: 'not-found' };
|
|
431
|
+
if (last.startsWith('dismissed:')) {
|
|
432
|
+
const button = last.substring('dismissed:'.length);
|
|
433
|
+
return { kind: 'dismissed', button: button || DISMISS_BUTTON_LABEL };
|
|
434
|
+
}
|
|
435
|
+
if (last.startsWith('error:')) {
|
|
436
|
+
return { kind: 'error', message: last.substring('error:'.length) };
|
|
437
|
+
}
|
|
438
|
+
return { kind: 'not-found' };
|
|
439
|
+
}
|
|
440
|
+
//# sourceMappingURL=launch-error-dismiss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch-error-dismiss.js","sourceRoot":"","sources":["../../src/utils/launch-error-dismiss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,QAAQ,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,CAAC,CAAC;IACrC,IAAI,IAAI,KAAK,WAAW;QAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IACvD,IAAI,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACnD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACvE,CAAC;IACD,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;IACrE,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -16,11 +16,25 @@ export declare function findEditorPath(version?: string): Promise<string | null>
|
|
|
16
16
|
* On macOS, also handles paths that already end with `.app`.
|
|
17
17
|
*/
|
|
18
18
|
export declare function resolveEditorPath(editorDir: string, os: string): string;
|
|
19
|
+
export interface LaunchEditorCallbacks {
|
|
20
|
+
/** Fired once the OS reports the child process has spawned. */
|
|
21
|
+
onSpawn?: (pid: number | undefined) => void;
|
|
22
|
+
/** Fired if the spawn itself fails (binary missing, permission denied, …). */
|
|
23
|
+
onError?: (err: Error) => void;
|
|
24
|
+
}
|
|
19
25
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
26
|
+
* Spawn the Unity Editor binary with the given project path. Returns
|
|
27
|
+
* the spawned `ChildProcess` so callers can await its `spawn` /
|
|
28
|
+
* `error` events themselves; library callers pass `onSpawn`/`onError`
|
|
29
|
+
* to avoid plumbing event listeners through their own code.
|
|
30
|
+
*
|
|
31
|
+
* Library-safe (does NOT call `process.exit`, does NOT print to
|
|
32
|
+
* stdout/stderr — observability is the caller's responsibility via
|
|
33
|
+
* the optional callbacks). The CLI's `commands/open.ts` wires those
|
|
34
|
+
* callbacks back into `ui.success` / `ui.error` so the terminal
|
|
35
|
+
* experience stays identical.
|
|
22
36
|
*/
|
|
23
|
-
export declare function launchEditor(editorPath: string, projectPath: string, env?: Record<string, string
|
|
37
|
+
export declare function launchEditor(editorPath: string, projectPath: string, env?: Record<string, string>, callbacks?: LaunchEditorCallbacks): import('child_process').ChildProcess;
|
|
24
38
|
/**
|
|
25
39
|
* Print actionable help when a required Unity Editor version is not found.
|
|
26
40
|
* Lists installed editors and suggests install or override commands.
|
|
@@ -4,6 +4,7 @@ import { spawn } from 'child_process';
|
|
|
4
4
|
import { platform } from 'os';
|
|
5
5
|
import { findUnityHub, ensureUnityHub, listInstalledEditors } from './unity-hub.js';
|
|
6
6
|
import * as ui from './ui.js';
|
|
7
|
+
import { verbose } from './ui.js';
|
|
7
8
|
/**
|
|
8
9
|
* Compare two Unity version strings with numeric-aware sorting.
|
|
9
10
|
* Parses components like "2022.3.62f3" into [2022, 3, 62, "f", 3].
|
|
@@ -65,34 +66,58 @@ export function getProjectEditorVersion(projectPath) {
|
|
|
65
66
|
* Uses Unity Hub to locate installed editors. Installs Unity Hub automatically if needed.
|
|
66
67
|
*/
|
|
67
68
|
export async function findEditorPath(version) {
|
|
69
|
+
const startedAt = Date.now();
|
|
70
|
+
verbose(`findEditorPath start (version=${version ?? 'auto'})`);
|
|
68
71
|
// Fast path: if we know the version, check common install locations first (instant filesystem check)
|
|
69
72
|
if (version) {
|
|
73
|
+
const fastStartedAt = Date.now();
|
|
70
74
|
const fastResult = findEditorPathByCommonLocations(version);
|
|
71
|
-
|
|
75
|
+
verbose(`findEditorPath fast path completed in ${Date.now() - fastStartedAt}ms (${fastResult ? 'hit' : 'miss'})`);
|
|
76
|
+
if (fastResult) {
|
|
77
|
+
verbose(`findEditorPath resolved via common locations in ${Date.now() - startedAt}ms`);
|
|
72
78
|
return fastResult;
|
|
79
|
+
}
|
|
73
80
|
}
|
|
74
81
|
// Slow path: query Unity Hub CLI for installed editors
|
|
82
|
+
const hubStartedAt = Date.now();
|
|
75
83
|
const hubPath = await ensureUnityHub().catch(() => null);
|
|
84
|
+
verbose(`findEditorPath ensureUnityHub completed in ${Date.now() - hubStartedAt}ms (${hubPath ? 'found' : 'unavailable'})`);
|
|
76
85
|
if (!hubPath) {
|
|
77
|
-
|
|
86
|
+
const fallbackStartedAt = Date.now();
|
|
87
|
+
const fallback = findEditorPathByCommonLocations(version);
|
|
88
|
+
verbose(`findEditorPath fallback common-location scan completed in ${Date.now() - fallbackStartedAt}ms (${fallback ? 'hit' : 'miss'})`);
|
|
89
|
+
verbose(`findEditorPath completed in ${Date.now() - startedAt}ms`);
|
|
90
|
+
return fallback;
|
|
78
91
|
}
|
|
92
|
+
const listStartedAt = Date.now();
|
|
79
93
|
const editors = listInstalledEditors(hubPath);
|
|
94
|
+
verbose(`findEditorPath listInstalledEditors completed in ${Date.now() - listStartedAt}ms (count=${editors.length})`);
|
|
80
95
|
if (editors.length === 0) {
|
|
81
|
-
|
|
96
|
+
const fallbackStartedAt = Date.now();
|
|
97
|
+
const fallback = findEditorPathByCommonLocations(version);
|
|
98
|
+
verbose(`findEditorPath empty-editor fallback completed in ${Date.now() - fallbackStartedAt}ms (${fallback ? 'hit' : 'miss'})`);
|
|
99
|
+
verbose(`findEditorPath completed in ${Date.now() - startedAt}ms`);
|
|
100
|
+
return fallback;
|
|
82
101
|
}
|
|
83
102
|
if (version) {
|
|
84
103
|
const match = editors.find((e) => e.version === version);
|
|
85
|
-
if (match)
|
|
86
|
-
|
|
104
|
+
if (match) {
|
|
105
|
+
const resolved = getEditorBinary(match.path);
|
|
106
|
+
verbose(`findEditorPath matched requested version ${version} in ${Date.now() - startedAt}ms`);
|
|
107
|
+
return resolved;
|
|
108
|
+
}
|
|
87
109
|
}
|
|
88
110
|
// Return the highest installed editor by version-aware sorting
|
|
89
111
|
const sorted = [...editors].sort((a, b) => compareUnityVersions(b.version, a.version));
|
|
90
|
-
|
|
112
|
+
const resolved = getEditorBinary(sorted[0].path);
|
|
113
|
+
verbose(`findEditorPath selected highest installed version ${sorted[0].version} in ${Date.now() - startedAt}ms`);
|
|
114
|
+
return resolved;
|
|
91
115
|
}
|
|
92
116
|
/**
|
|
93
117
|
* Find editor by checking common installation directories.
|
|
94
118
|
*/
|
|
95
119
|
function findEditorPathByCommonLocations(version) {
|
|
120
|
+
const startedAt = Date.now();
|
|
96
121
|
const os = platform();
|
|
97
122
|
const candidates = [];
|
|
98
123
|
switch (os) {
|
|
@@ -156,9 +181,11 @@ function findEditorPathByCommonLocations(version) {
|
|
|
156
181
|
}
|
|
157
182
|
for (const candidate of candidates) {
|
|
158
183
|
if (fs.existsSync(candidate)) {
|
|
184
|
+
verbose(`findEditorPathByCommonLocations hit ${candidate} after ${Date.now() - startedAt}ms (${candidates.length} candidates)`);
|
|
159
185
|
return candidate;
|
|
160
186
|
}
|
|
161
187
|
}
|
|
188
|
+
verbose(`findEditorPathByCommonLocations miss after ${Date.now() - startedAt}ms (${candidates.length} candidates)`);
|
|
162
189
|
return null;
|
|
163
190
|
}
|
|
164
191
|
/**
|
|
@@ -200,10 +227,18 @@ function getEditorBinary(editorDir) {
|
|
|
200
227
|
return resolveEditorPath(editorDir, platform());
|
|
201
228
|
}
|
|
202
229
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
230
|
+
* Spawn the Unity Editor binary with the given project path. Returns
|
|
231
|
+
* the spawned `ChildProcess` so callers can await its `spawn` /
|
|
232
|
+
* `error` events themselves; library callers pass `onSpawn`/`onError`
|
|
233
|
+
* to avoid plumbing event listeners through their own code.
|
|
234
|
+
*
|
|
235
|
+
* Library-safe (does NOT call `process.exit`, does NOT print to
|
|
236
|
+
* stdout/stderr — observability is the caller's responsibility via
|
|
237
|
+
* the optional callbacks). The CLI's `commands/open.ts` wires those
|
|
238
|
+
* callbacks back into `ui.success` / `ui.error` so the terminal
|
|
239
|
+
* experience stays identical.
|
|
205
240
|
*/
|
|
206
|
-
export function launchEditor(editorPath, projectPath, env) {
|
|
241
|
+
export function launchEditor(editorPath, projectPath, env, callbacks) {
|
|
207
242
|
const args = ['-projectPath', path.resolve(projectPath)];
|
|
208
243
|
const child = spawn(editorPath, args, {
|
|
209
244
|
detached: true,
|
|
@@ -211,12 +246,13 @@ export function launchEditor(editorPath, projectPath, env) {
|
|
|
211
246
|
env: { ...process.env, ...env },
|
|
212
247
|
});
|
|
213
248
|
child.on('spawn', () => {
|
|
214
|
-
|
|
249
|
+
callbacks?.onSpawn?.(child.pid);
|
|
215
250
|
});
|
|
216
251
|
child.on('error', (err) => {
|
|
217
|
-
|
|
252
|
+
callbacks?.onError?.(err);
|
|
218
253
|
});
|
|
219
254
|
child.unref();
|
|
255
|
+
return child;
|
|
220
256
|
}
|
|
221
257
|
/**
|
|
222
258
|
* Print actionable help when a required Unity Editor version is not found.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unity-editor.js","sourceRoot":"","sources":["../../src/utils/unity-editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,CAAS,EAAE,CAAS;IAChD,MAAM,YAAY,GAAG,CAAC,CAAS,EAAuB,EAAE;QACtD,MAAM,KAAK,GAAwB,EAAE,CAAC;QACtC,KAAK,MAAM,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;YACzC,2DAA2D;YAC3D,MAAM,MAAM,GAAG,OAA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