gm-plugkit 2.0.1230 → 2.0.1232
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/bootstrap.js +3 -0
- package/package.json +1 -1
- package/plugkit-wasm-wrapper.js +21 -4
package/bootstrap.js
CHANGED
|
@@ -211,6 +211,9 @@ async function extractNpmPackageWasm(destPath, version) {
|
|
|
211
211
|
timeout: ATTEMPT_TIMEOUT_MS,
|
|
212
212
|
encoding: 'utf8',
|
|
213
213
|
windowsHide: true,
|
|
214
|
+
// CREATE_NO_WINDOW — inherited by .cmd shims npm spawns during
|
|
215
|
+
// package install, so no conhost flash during the extract step.
|
|
216
|
+
...(process.platform === 'win32' ? { creationFlags: 0x08000000 } : {}),
|
|
214
217
|
});
|
|
215
218
|
|
|
216
219
|
if (result.error) throw result.error;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-plugkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1232",
|
|
4
4
|
"description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Includes plugkit-wasm-wrapper for WASM-based spool watching.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
package/plugkit-wasm-wrapper.js
CHANGED
|
@@ -797,15 +797,22 @@ function ensureAcptoapi() {
|
|
|
797
797
|
}
|
|
798
798
|
// Resolve `bun` to its actual .exe on Windows so the spawned daemon
|
|
799
799
|
// doesn't enter conhost via a bun.cmd shim. See
|
|
800
|
-
// [[windows-spawn-cmd-shim-flash]]
|
|
801
|
-
//
|
|
802
|
-
//
|
|
800
|
+
// [[windows-spawn-cmd-shim-flash]].
|
|
801
|
+
//
|
|
802
|
+
// Use CREATE_NO_WINDOW (0x08000000) | DETACHED_PROCESS (0x00000008)
|
|
803
|
+
// creationFlags so the suppression is INHERITED by every descendant
|
|
804
|
+
// bun-x downloads and launches (acptoapi itself spawns 11 ACP sub-
|
|
805
|
+
// daemons via .cmd shims; without this flag each one pops a conhost
|
|
806
|
+
// window). windowsHide:true alone only hides the immediate child.
|
|
807
|
+
const CREATE_NO_WINDOW = 0x08000000;
|
|
808
|
+
const DETACHED_PROCESS = 0x00000008;
|
|
803
809
|
const cmd = resolveWindowsExeLocal('bun');
|
|
804
810
|
const child = spawn(cmd, ['x', 'acptoapi@latest'], {
|
|
805
811
|
detached: true,
|
|
806
812
|
stdio: 'ignore',
|
|
807
813
|
windowsHide: true,
|
|
808
814
|
shell: false,
|
|
815
|
+
creationFlags: CREATE_NO_WINDOW | DETACHED_PROCESS,
|
|
809
816
|
});
|
|
810
817
|
child.unref();
|
|
811
818
|
_acptoapiBoot.spawned_at = Date.now();
|
|
@@ -906,7 +913,17 @@ function getOrCreateBrowserSession(cwd, claudeSessionId, pw) {
|
|
|
906
913
|
'--no-default-browser-check',
|
|
907
914
|
'--disable-features=Translate',
|
|
908
915
|
];
|
|
909
|
-
|
|
916
|
+
// Chrome itself is GUI but its remote-debugging port creates conhost
|
|
917
|
+
// when launched from a console-attached parent. CREATE_NO_WINDOW
|
|
918
|
+
// (0x08000000) | DETACHED_PROCESS (0x00000008) prevents the helper
|
|
919
|
+
// processes (sandbox, GPU, network service) from allocating consoles.
|
|
920
|
+
// Inherited by the entire chrome subprocess tree on Windows.
|
|
921
|
+
const child = spawn(chrome, chromeArgs, {
|
|
922
|
+
detached: true,
|
|
923
|
+
stdio: 'ignore',
|
|
924
|
+
windowsHide: true,
|
|
925
|
+
...(process.platform === 'win32' ? { creationFlags: 0x08000000 | 0x00000008 } : {}),
|
|
926
|
+
});
|
|
910
927
|
const chromePid = child.pid;
|
|
911
928
|
child.unref();
|
|
912
929
|
const deadline = Date.now() + 10000;
|