summrise-agent 1.2.485 → 1.2.486
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 +18 -2
- package/package.json +1 -1
- package/summrise-agent.exe +0 -0
package/bin/summrise.js
CHANGED
|
@@ -2810,6 +2810,15 @@ const commands = {
|
|
|
2810
2810
|
`if ((-not (Test-Path '${q}\\etc\\config.yaml')) -or (-not (Test-Path '${q}\\etc\\summrise-agent.hostname'))) { "[$(Get-Date -Format o)] migration gate FAILED (etc\\config.yaml/hostname missing) -- aborting, old version keeps running" | ${log}; try { Remove-Item -Force (${busyMarkerPs()}) } catch {}; exit 1 }`,
|
|
2811
2811
|
// A running exe cannot be overwritten on Windows — stop the service
|
|
2812
2812
|
// first (task end + process kill), THEN swap with retry.
|
|
2813
|
+
// **THE RESTART IS IN A `finally` NOW, WHICH IS THE WHOLE POINT.** It used to be the LAST statement of a ~24-step
|
|
2814
|
+
// sequence — 12 copy retries, a registry block, a Remove-Item, a three-file desktop loop — with nothing guarding
|
|
2815
|
+
// it, so an unhandled error, a dead WMI process or a WMI timeout anywhere in between meant the start never ran and
|
|
2816
|
+
// the device stayed dark. Measured 2026-09-28: a device took `summrise update`, the swap answered 502, and its
|
|
2817
|
+
// tunnel went from 502 to **530 / error code 1033** (no connector at all). The task's own watchdog does not cover
|
|
2818
|
+
// it either — `RestartCount 8 -RestartInterval 1min` fires on a CRASH, and a STOPPED task is not a crash.
|
|
2819
|
+
// **`try`/`finally` WITHOUT `catch` IS DELIBERATE**: the failure still propagates to the exit code, and the restart
|
|
2820
|
+
// happens regardless. PowerShell runs a `finally` block for an uncaught exception and for `exit`.
|
|
2821
|
+
"try {",
|
|
2813
2822
|
"try { Stop-ScheduledTask SummriseAgent -ErrorAction Stop } catch {}",
|
|
2814
2823
|
"Get-Process summrise-agent -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue",
|
|
2815
2824
|
"Start-Sleep -Milliseconds 1500",
|
|
@@ -2829,8 +2838,15 @@ const commands = {
|
|
|
2829
2838
|
`foreach($df in @('main.js','preload.js','url-policy.js')){ $ds='${q}\\components\\summrise-desktop-electron\\src\\'+$df+'.new'; if (Test-Path $ds) { $ok2=$false; foreach($i in 1..8){ try { Copy-Item -Force -ErrorAction Stop $ds ('${q}\\components\\summrise-desktop-electron\\src\\'+$df); $ok2=$true; break } catch { Start-Sleep -Milliseconds 500 } }; Remove-Item -Force -ErrorAction SilentlyContinue $ds; "[$(Get-Date -Format o)] desk $df ok=$ok2" | ${log} } }`,
|
|
2830
2839
|
// NEVER leave the device dark: even a failed swap must bring the task
|
|
2831
2840
|
// back up (it will run the old exe until the next update).
|
|
2832
|
-
|
|
2833
|
-
|
|
2841
|
+
// **AND THE LINE THAT REPORTS IT SAYS WHAT HAPPENED, BECAUSE THE OLD ONE COULD NOT BE WRONG.**
|
|
2842
|
+
// It read `"task restarted"` unconditionally, immediately after a try/catch whose BOTH arms could fail — so the log
|
|
2843
|
+
// asserted a restart it had never verified. Measured 2026-09-28: a device took `summrise update`, the swap answered
|
|
2844
|
+
// 502, and the device went dark (the tunnel went from 502 to **530/1033** — no connector at all), while this line
|
|
2845
|
+
// would have said the task was back. `$rs` is the outcome, and it is what the log carries.
|
|
2846
|
+
"} finally {",
|
|
2847
|
+
` $rs=$false; try { Start-ScheduledTask SummriseAgent -ErrorAction Stop; $rs=$true } catch { try { schtasks /Run /TN SummriseAgent; $rs=$true } catch {} }`,
|
|
2848
|
+
` "[$(Get-Date -Format o)] task restart ok=$rs" | ${log}`,
|
|
2849
|
+
"}",
|
|
2834
2850
|
`try { Remove-Item -Force (${busyMarkerPs()}) } catch {}`,
|
|
2835
2851
|
// Custom-port installs: the firewall rule must track the configured
|
|
2836
2852
|
// bind port (baked at update time from the live config.yaml — the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "summrise-agent",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.486",
|
|
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
|