summrise-agent 1.2.468 → 1.2.470

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/bin/summrise.js CHANGED
@@ -1481,7 +1481,18 @@ function svc(action) {
1481
1481
  // RETURN the status. It used to be discarded, which is why `stop` printed "stopped"
1482
1482
  // and exited 0 for a missing task or an access-denied, and why `start`/`restart` were
1483
1483
  // silent either way. `autostart` already checks; this is the same pattern.
1484
- return sh(`schtasks /${action} /TN ${TASK}`, { stdio: "inherit" });
1484
+ //
1485
+ // argv, NOT an `sh()` command string: both `${action}` and `${TASK}` used to be
1486
+ // interpolated UNQUOTED into a line cmd.exe parses, which is the door the `psArgv()`
1487
+ // incident comment above describes — a value carrying a space, `&`, `|`, `>` or `<`
1488
+ // is re-parsed as an OPERATOR before schtasks ever sees it, and `TASK` is a
1489
+ // literal only until somebody makes the task name configurable.
1490
+ // schtasks needs no shell feature (no pipe, no `&&`, no redirection) and `/Query`
1491
+ // below already spawns it this way, so the door closes with no behaviour change:
1492
+ // the same program receives the same argv.
1493
+ return (0, child_process_1.spawnSync)("schtasks", [`/${action}`, "/TN", TASK], {
1494
+ stdio: "inherit",
1495
+ });
1485
1496
  }
1486
1497
  /**
1487
1498
  * The scheduled task's State (`Running`, `Ready`, `Disabled`, …) or **null when it could not be read**.
@@ -1915,12 +1926,18 @@ const commands = {
1915
1926
  });
1916
1927
  const pre = pfx.status === 0 ? String(pfx.stdout || "").trim() : "";
1917
1928
  if (selfVer && pre) {
1929
+ // `shell: true` is REQUIRED here (npm on Windows is a `.cmd` shim, which a bare
1930
+ // spawnSync cannot execute) — and that shell JOINS THIS ARGV INTO ONE cmd.exe
1931
+ // LINE, the shape the `processRunning` comment above records for the tasklist
1932
+ // filter. `pre` is a PATH (npm's global prefix), so it is DOUBLE-QUOTED for the
1933
+ // cmd layer: unquoted, a prefix like `C:\Program Files\nodejs` was split at its
1934
+ // space and npm installed the CLI somewhere else while reporting success.
1918
1935
  const inst = (0, child_process_1.spawnSync)("npm", [
1919
1936
  "i",
1920
1937
  "-g",
1921
- `summrise-agent@${selfVer}`,
1938
+ `"summrise-agent@${selfVer}"`,
1922
1939
  "--prefix",
1923
- pre,
1940
+ `"${pre}"`,
1924
1941
  "--registry=https://registry.npmjs.org/",
1925
1942
  "--no-audit",
1926
1943
  "--no-fund",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "summrise-agent",
3
- "version": "1.2.468",
3
+ "version": "1.2.470",
4
4
  "description": "Summrise Agent — Windows device MCP server (terminal/SSH/serial) + panel. Self-hosted npm distribution.",
5
5
  "//build": "唯一构建路径:在本目录执行 npm run build。它是自包含的:经 npm exec 按需拉取 typescript@5,无需预装任何 node_modules(干净检出可跑;旧脚本引用 ../summrise-desktop-electron/node_modules/.bin/tsc,干净检出必 ENOENT)。必须用 npm exec --package … -- tsc 的形式:npx 会吃掉传给 tsc 的 -p/--outDir 等参数(round-435:npx 写法从未真正跑通过)。先编 electron TS(--noCheck 纯 emit,与 release.yml 一致)同步两处 src/*.js,再编 src/summrise.ts 到 bin/summrise.js 并校验 round-298 标记(弱 oracle,只证某次构建发生,新鲜性由 publish-release.sh 的 tsc 重编 + cmp 门保证)。",
6
6
  "bin": {
Binary file