kaizen-agent 1.7.4 → 1.7.6
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 +658 -658
- package/cli/install.ts +1 -1
- package/cli/web.ts +11 -6
- package/package.json +1 -1
package/cli/install.ts
CHANGED
|
@@ -241,7 +241,7 @@ if (wantWeb) {
|
|
|
241
241
|
} else {
|
|
242
242
|
const argv = Bun.argv.slice(2).filter((a) => a !== "--daemon" && a !== "--no-open");
|
|
243
243
|
const child = Bun.spawn([process.execPath, Bun.main, ...argv, "--no-open"], {
|
|
244
|
-
detached: true, stdio: ["ignore", "ignore", "ignore"],
|
|
244
|
+
detached: true, stdio: ["ignore", "ignore", "ignore"], windowsHide: true,
|
|
245
245
|
});
|
|
246
246
|
child.unref();
|
|
247
247
|
mkdirSync(dirname(pidFile), { recursive: true });
|
package/cli/web.ts
CHANGED
|
@@ -395,15 +395,20 @@ export async function shortcut() {
|
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
if (process.platform === "win32") {
|
|
398
|
-
//
|
|
399
|
-
//
|
|
400
|
-
//
|
|
401
|
-
//
|
|
398
|
+
// bun.exe is a console program, so a .lnk aimed straight at it always opens a
|
|
399
|
+
// console window. The shortcut therefore aims at wscript, whose Run with window
|
|
400
|
+
// style 0 starts `kaizen web --daemon` with no window at all; the daemon outlives
|
|
401
|
+
// that launcher and `kaizen web --stop` ends it. A crash has no console to land
|
|
402
|
+
// in, so web() writes it to ~/.kaizen/web.log instead. A .lnk icon must be an .ico.
|
|
402
403
|
const lnk = join(home, "Desktop", "Kaizen.lnk");
|
|
403
404
|
const ico = join(dirname(import.meta.dir), "assets", "kaizen.ico");
|
|
404
|
-
const
|
|
405
|
+
const vbs = join(home, ".kaizen", "kaizen-web.vbs");
|
|
406
|
+
mkdirSync(dirname(vbs), { recursive: true });
|
|
407
|
+
const vq = (s: string) => `""${s}""`; // a quoted arg inside a VBScript string
|
|
408
|
+
writeFileSync(vbs, `CreateObject("WScript.Shell").Run "${vq(bun)} ${vq(script)} web --daemon", 0, False\r\n`);
|
|
409
|
+
const ps = `$s=(New-Object -ComObject WScript.Shell).CreateShortcut('${lnk}');$s.TargetPath='wscript.exe';$s.Arguments='"${vbs}"';$s.WorkingDirectory='${home}';${existsSync(ico) ? `$s.IconLocation='${ico}';` : ""}$s.Save()`;
|
|
405
410
|
await Bun.$`powershell -NoProfile -Command ${ps}`.quiet();
|
|
406
|
-
return `${lnk} — double-click
|
|
411
|
+
return `${lnk} — double-click starts the board in the background and opens it; kaizen web --stop ends it`;
|
|
407
412
|
}
|
|
408
413
|
|
|
409
414
|
const dir = join(process.env["XDG_DATA_HOME"] ?? join(home, ".local", "share"), "applications");
|
package/package.json
CHANGED