pi-auto-unattended 0.9.1 → 0.9.2
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/CHANGELOG.md +6 -0
- package/extensions/pi-auto.ts +3 -2
- package/package.json +1 -1
- package/test/pi-auto.test.mjs +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 0.9.2 (2026-12-05)
|
|
4
|
+
|
|
5
|
+
- 修:`/reload` 不再拆掉本会话的计时器。旧判据是「只有 `reason=new` 保留」,`reload` 落到
|
|
6
|
+
`writeTimers([])` 分支 ⇒ 一次 reload 把排着的 `auto_timer` 全清空(实测 14:54 排的唤醒被 14:58 的 reload 吃掉)。
|
|
7
|
+
现在只有 `quit`(进程真退出)才清;`reload`/`new`/`resume`/`fork` 都保留,新实例在 `session_start` 从磁盘重新 arm。
|
|
8
|
+
|
|
3
9
|
## 0.9.1 (2026-12-05)
|
|
4
10
|
|
|
5
11
|
- 底栏状态段带出「在等什么」:`auto on #12 tm2@15:06 bg1`(开关 + 本轮计数 + 排着的计时器数/最早到点 +
|
package/extensions/pi-auto.ts
CHANGED
|
@@ -2106,8 +2106,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
2106
2106
|
clearInterval(bgPoller);
|
|
2107
2107
|
bgPoller = undefined;
|
|
2108
2108
|
}
|
|
2109
|
-
//
|
|
2110
|
-
|
|
2109
|
+
// 进程真退出(quit)才丢计时器;`/reload`、`/new`、交接、resume/fork 都是同一进程换实例,
|
|
2110
|
+
// 计时器要留着:新实例的 session_start 从磁盘重新 arm(reload 曾把计时器拆掉)。
|
|
2111
|
+
if (event.reason === "quit") writeTimers([]);
|
|
2111
2112
|
if (!state) return;
|
|
2112
2113
|
audit({ kind: "session-end", cwd: state.cwd, rounds: state.rounds, keepAlive: state.keepAlive, reason: event.reason });
|
|
2113
2114
|
if (!state.keepAlive) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-auto-unattended",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Unattended Pi sessions without a loop: idle-timeout nudge via pi-mailbox (bounded per day), context-threshold handoff reminder, agent/TUI/CLI timers (auto_timer, /timer, pi-auto timer), timed schedules, and a systemd daemon that keeps one agent per selected folder alive plus a nightly 'wrap up' reminder.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
package/test/pi-auto.test.mjs
CHANGED
|
@@ -950,6 +950,8 @@ test("交接(reason=new)不丢计时器;真退出才清;死 pid 的孤
|
|
|
950
950
|
assert.equal(readTimers().length, 1, "启动时恢复");
|
|
951
951
|
await host.shutdown("new");
|
|
952
952
|
assert.equal(readTimers().length, 1, "换会话不是退出,计时器留着");
|
|
953
|
+
await host.shutdown("reload");
|
|
954
|
+
assert.equal(readTimers().length, 1, "/reload 不是退出,计时器留着(曾在这里被拆掉)");
|
|
953
955
|
await host.shutdown("quit");
|
|
954
956
|
assert.equal(readTimers().length, 0, "真退出清掉");
|
|
955
957
|
|