pi-auto-unattended 0.8.1 → 0.8.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.8.2 (2026-12-05)
4
+
5
+ - 修噪音:会话自己 `off` 之后(当天已有 `retired`),手开会话分支不再弹「上下文 ≥ 阈值,该交接」的
6
+ `handoff-notify`(e2e 实测在收工瞬间弹了一句)。回归 33 → 34 条。
7
+ - 真会话 e2e(`PI_AUTO_HANDOFF_AT=1`,`env` 前缀传参):audit 依次
8
+ `session-start → continue → handoff-remind(percent 1.5324, stage 2) → off → session-end(reason=new) → session-start`,
9
+ 新会话接 kickoff 后立刻 off,无乒乓。
10
+
3
11
  ## 0.8.1 (2026-12-05)
4
12
 
5
13
  - 交接**冷却**:10 分钟内不重复发交接指令(`PI_AUTO_HANDOFF_COOLDOWN_MS` 可覆盖,0 = 关)。
@@ -1592,7 +1592,8 @@ export default function (pi: ExtensionAPI) {
1592
1592
  }
1593
1593
  if (!now.keepAlive) {
1594
1594
  // 手开会话:到线只提一句(不注入消息、不触发新一轮),同一条线只提醒一次
1595
- if (hMode !== "off" && pct !== null && pct >= hAt && (now.handoffStage ?? 0) === 0) {
1595
+ // 已经自己的收工的不再提醒(off 之后 keepAlive=false,别在收工后弹一句「该交接了」)
1596
+ if (hMode !== "off" && !retiredToday(now.cwd) && pct !== null && pct >= hAt && (now.handoffStage ?? 0) === 0) {
1596
1597
  touch(ctx, { handoffStage: 1, handoffReminders: 1 });
1597
1598
  try {
1598
1599
  ctx.ui?.notify?.(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-auto-unattended",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Unattended Pi sessions: tool-side extensions (auto_switch keep-alive, auto_schedule timed runs, auto_today project-scoped daily brief, auto_timer/auto_bg wait-without-blocking, context-threshold handoff at idle) plus a pi-auto CLI and systemd daemon that keeps one agent alive per selected folder and nudges them through pi-mailbox.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -884,3 +884,16 @@ test("交接冷却:刚交接完同一进程换会话不再乒乓(阈值低
884
884
  host.cleanup();
885
885
  }
886
886
  });
887
+
888
+ test("收工后不再弹交接提醒(retired 当天 ⇒ 手开会话分支也不 notify)", async () => {
889
+ const host = createHost({ boot: false });
890
+ try {
891
+ await host.boot();
892
+ retire(host.ctx.cwd, "agent off", { sessionId: "sess-1", boot: true });
893
+ host.setPercent(60);
894
+ assert.equal(await host.settle("completed"), undefined);
895
+ assert.doesNotMatch(host.audit(), /handoff-notify/);
896
+ } finally {
897
+ host.cleanup();
898
+ }
899
+ });