@thurstonsand/pi-agent-switchboard 0.10.0 → 0.11.0

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/index.js +15 -5
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.11.0] - 2026-11-03
6
+
7
+ Schema v9: update swb and the pi line together.
8
+
9
+ ### Added
10
+
11
+ - `u` in the roster, and `M-a u` from the agent, marks a session Unseen: its `●` shows at once, and holds for as long as the session stays on the Stage, through any turns it takes, and after you move on. Only coming back to it from another session, for the second a Visit takes, clears it; `u` again takes the mark off. Snoozed and archived sessions can't be marked.
12
+ - `[` and `]` in the roster step back and forward through the sessions you visited, as a browser's back and forward do, and `‹ ›` at the end of the legend does the same with a click. From the agent, `M-a [` and `M-a ]` focus the session there, waking it. A Visit counts as it does for Unseen, a second with the agent focused, so moving the cursor over a session doesn't. A new Deck reaches back through every earlier Visit. Archived sessions are passed over; snoozed ones aren't.
13
+
14
+ ### Changed
15
+
16
+ - An idle session nobody is viewing now stops after an hour by default, not 30 minutes, matching Claude Code's hour-long prompt cache. `reap_after` still sets it.
17
+ - The Deck lists its sessions sooner. It used to ask git, one directory at a time, about every directory any session ever ran in, archived ones included, before showing any; it now asks only about open sessions below their Project's root, all at once, and asks the harnesses what they offer after the list is up. A Deck opened when swb's tmux servers were down also no longer leaves its Stage blank for an extra 0.2 s.
18
+
19
+ ### Fixed
20
+
21
+ - `?` shows every key again. Its popup had a fixed size the list outgrew, so its first keys scrolled off the top, and on a Deck under 37 rows it didn't open at all. It now fits the list, short of the Deck's own size, and when the Deck is too short it scrolls by `j`/`k`, `↑`/`↓`, `space` and PgUp/PgDn, or the wheel, saying how much lies above and below.
22
+
5
23
  ## [0.10.0] - 2026-11-02
6
24
 
7
25
  ### Added
package/index.js CHANGED
@@ -5,10 +5,11 @@ import { dirname as dirname4, join as join3 } from "node:path";
5
5
  import { Text } from "@earendil-works/pi-tui";
6
6
 
7
7
  // packages/shared/src/index.ts
8
- import { execFileSync } from "node:child_process";
8
+ import { execFile, execFileSync } from "node:child_process";
9
9
  import { existsSync as existsSync2, readFileSync, realpathSync } from "node:fs";
10
10
  import { homedir } from "node:os";
11
11
  import { dirname as dirname2, join } from "node:path";
12
+ import { promisify } from "node:util";
12
13
 
13
14
  // packages/shared/src/db.ts
14
15
  import { closeSync, existsSync, linkSync, mkdirSync, openSync, unlinkSync } from "node:fs";
@@ -89,7 +90,7 @@ class Db {
89
90
  }
90
91
 
91
92
  // packages/shared/src/index.ts
92
- var SCHEMA_VERSION = 8;
93
+ var SCHEMA_VERSION = 9;
93
94
  var VIEWS = ["agent", "editor", "split"];
94
95
  var HARNESSES = ["pi", "claude", "codex"];
95
96
  var SNOOZE_PRESETS = ["one_hour", "one_day", "monday", "next_message"];
@@ -140,25 +141,34 @@ function pidAlive(pid) {
140
141
  return error.code === "EPERM";
141
142
  }
142
143
  }
144
+ var GIT_TIMEOUT_MS = 5000;
143
145
  function git(cwd, ...args) {
144
146
  try {
145
- return execFileSync("git", ["-C", cwd, ...args], { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: 5000 }).trim();
147
+ return execFileSync("git", ["-C", cwd, ...args], {
148
+ encoding: "utf8",
149
+ stdio: ["ignore", "pipe", "ignore"],
150
+ timeout: GIT_TIMEOUT_MS
151
+ }).trim();
146
152
  } catch {
147
153
  return null;
148
154
  }
149
155
  }
156
+ var execFileAsync = promisify(execFile);
150
157
  function projectRoot(cwd) {
151
158
  const common = git(cwd, "rev-parse", "--path-format=absolute", "--git-common-dir");
152
159
  return common ? dirname2(common) : cwd;
153
160
  }
154
- function linkedWorktree(cwd) {
155
- const result = git(cwd, "rev-parse", "--path-format=absolute", "--show-toplevel", "--git-dir", "--git-common-dir");
161
+ var WORKTREE_QUERY = ["rev-parse", "--path-format=absolute", "--show-toplevel", "--git-dir", "--git-common-dir"];
162
+ function worktreeFrom(result) {
156
163
  if (!result)
157
164
  return null;
158
165
  const [path, dir, common] = result.split(`
159
166
  `);
160
167
  return dir !== common ? { path, common } : null;
161
168
  }
169
+ function linkedWorktree(cwd) {
170
+ return worktreeFrom(git(cwd, ...WORKTREE_QUERY));
171
+ }
162
172
  function branch(cwd) {
163
173
  const name = git(cwd, "rev-parse", "--abbrev-ref", "HEAD");
164
174
  return name === "HEAD" ? git(cwd, "rev-parse", "--short", "HEAD") : name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thurstonsand/pi-agent-switchboard",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "description": "Records managed pi sessions for Agent Switchboard (swb)",
6
6
  "license": "MIT",