summrise-agent 1.2.471 → 1.2.472
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 +34 -10
- package/package.json +1 -1
- package/summrise-agent.exe +0 -0
package/bin/summrise.js
CHANGED
|
@@ -308,8 +308,11 @@ exports.psq = psq;
|
|
|
308
308
|
// Best-effort + logged, never fatal. `sink` is a PS output pipe
|
|
309
309
|
// (e.g. Write-Host, or the update log pipe). Single-quoted PS literals
|
|
310
310
|
// only (npm audit #6) except the double quotes the .lnk Arguments path
|
|
311
|
-
// needs —
|
|
312
|
-
//
|
|
311
|
+
// needs — those are LITERAL characters, because they sit inside
|
|
312
|
+
// single-quoted PS strings, so NO caller escapes them: `setup` hands this
|
|
313
|
+
// script to `ps()` as argv and the update swap runs it from a file. The
|
|
314
|
+
// backslash-escape `setup` used to apply was deleted with that conversion
|
|
315
|
+
// (see step 7), which is why this line no longer says "escape them".
|
|
313
316
|
// exported: unit-tested in test/cli.test.mjs.
|
|
314
317
|
function deskShortcutRepairPs(scriptsQ, deskDirQ, sink) {
|
|
315
318
|
return [
|
|
@@ -1797,15 +1800,36 @@ const commands = {
|
|
|
1797
1800
|
// 7. stage-brand: heal a stale desktop shortcut (a 2026-09-01 Summrise.lnk
|
|
1798
1801
|
// launches the RETIRED Tauri exe with the old embedded icon) + drop
|
|
1799
1802
|
// the retired orphans. Repair-only (helper checks link existence).
|
|
1800
|
-
// Backslash-escape the .lnk Arguments double quotes for -Command.
|
|
1801
1803
|
console.log("setup: reconciling desktop shortcut (retired-exe repair)...");
|
|
1802
|
-
//
|
|
1803
|
-
//
|
|
1804
|
-
//
|
|
1805
|
-
//
|
|
1806
|
-
//
|
|
1807
|
-
//
|
|
1808
|
-
|
|
1804
|
+
// argv (`ps()`), because BOTH values are paths (SCRIPTS_DIR, DESK_DIR): cmd expands
|
|
1805
|
+
// `%NAME%` inside a quoted region too (see `sh()`), so a `%` in the operator-chosen
|
|
1806
|
+
// install dir would arrive at PowerShell as a variable REFERENCE rather than as data.
|
|
1807
|
+
// This was the LAST acknowledged residual marker in this file, and the pin's cap is
|
|
1808
|
+
// ZERO now — a site that keeps a cmd line has to prove its value cannot carry a `%`.
|
|
1809
|
+
//
|
|
1810
|
+
// A PATH WITH NO `%` OR `"` IS UNAFFECTED: the script PowerShell ends up parsing is the
|
|
1811
|
+
// same text, now handed over directly instead of through cmd. A `"` IN ONE OF THE PATHS
|
|
1812
|
+
// CHANGES SHAPE, and that is the point: cmd reads `"` as a quote TOGGLE, so under the old
|
|
1813
|
+
// form it moved the quoted region (and the `.replace()` below rewrote the whole script
|
|
1814
|
+
// around it); as argv it is data like any other character. (`"` is not a legal character
|
|
1815
|
+
// in an NTFS name, so that one is the CLASS being closed rather than a reachable path — a
|
|
1816
|
+
// `%` in a directory name is legal, and was the reachable member.)
|
|
1817
|
+
//
|
|
1818
|
+
// AND THE `.replace(/"/g, '\\"')` THAT USED TO BE ON THIS LINE IS DELETED AS DEAD, not
|
|
1819
|
+
// merely redundant — it protected nothing and it rewrote the PAYLOAD. `\"` is not a cmd
|
|
1820
|
+
// escape (cmd's is `^`), so under cmd's own rules it did not stop the quoted region
|
|
1821
|
+
// ending at the first `"`; and the `.replace()` ran over the WHOLE joined script, so it
|
|
1822
|
+
// also hit the two double quotes that live INSIDE `deskShortcutRepairPs`'s single-quoted
|
|
1823
|
+
// PowerShell strings — the `.lnk` Arguments value. MEASURED against the builder: exactly
|
|
1824
|
+
// those two characters changed, so the shortcut would have been handed
|
|
1825
|
+
// `-File \"<path>\"` (a literal backslash PowerShell does not strip) had the escape
|
|
1826
|
+
// survived the trip. WHAT LET IT SURVIVE IS REASONED, NOT MEASURED HERE (there is no
|
|
1827
|
+
// cmd.exe on this box): node's CreateProcess quoting, cmd's `/s /c` verbatim tail and
|
|
1828
|
+
// powershell.exe's own `\"` unescaping unwound each other — exactly the "works by
|
|
1829
|
+
// accident" the deleted marker said about this line. With no shell in the path there is
|
|
1830
|
+
// no re-parsing layer left to protect against: `ps()` hands PowerShell the script
|
|
1831
|
+
// VERBATIM, the same way the update swap's `-File` path does.
|
|
1832
|
+
ps(deskShortcutRepairPs((0, exports.psq)(SCRIPTS_DIR), (0, exports.psq)(DESK_DIR), "Write-Host").join("; "));
|
|
1809
1833
|
// C1: write the registry single source of truth (InstallDir; DataDir
|
|
1810
1834
|
// defaults to %ProgramData%\Summrise). Everything else reads it back.
|
|
1811
1835
|
// `regOk` is collected here and summarised at the end of setup: best-effort, but the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "summrise-agent",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.472",
|
|
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": {
|
package/summrise-agent.exe
CHANGED
|
Binary file
|