pi-squire 0.5.1 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,17 @@ follows [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.6.0] - 2026-10-15
10
+
11
+ ### Added
12
+
13
+ - Every delegate now starts with `PI_UNATTENDED=1` in its environment, a
14
+ general signal that no human is watching the session. Delegates run as a
15
+ full TUI, so extensions that open a dialog, such as a handoff gate or an
16
+ approval prompt, waited on nobody and stalled the delegate; they can read
17
+ this variable to skip the dialog instead. The test that pins the child's
18
+ exact environment now includes it.
19
+
9
20
  ## [0.5.1] - 2026-10-14
10
21
 
11
22
  ### Changed
@@ -228,7 +239,8 @@ author's dotfiles; the changes below are against that copy.
228
239
 
229
240
  - The published file list includes `child.ts`, which `index.ts` imports.
230
241
 
231
- [Unreleased]: https://github.com/gvanderclay/pi-squire/compare/v0.5.1...HEAD
242
+ [Unreleased]: https://github.com/gvanderclay/pi-squire/compare/v0.6.0...HEAD
243
+ [0.6.0]: https://github.com/gvanderclay/pi-squire/compare/v0.5.1...v0.6.0
232
244
  [0.5.1]: https://github.com/gvanderclay/pi-squire/compare/v0.5.0...v0.5.1
233
245
  [0.5.0]: https://github.com/gvanderclay/pi-squire/compare/v0.4.0...v0.5.0
234
246
  [0.4.0]: https://github.com/gvanderclay/pi-squire/compare/v0.3.2...v0.4.0
package/README.md CHANGED
@@ -178,7 +178,11 @@ variable of its own. `PI_DELEGATE_PARENT` and `PI_DELEGATE_AUTO_EXIT` are set
178
178
  for the child, never read as configuration by the parent. The window starts
179
179
  with the tmux server's environment plus only these from the parent:
180
180
  `PI_CODING_AGENT_DIR`, `PI_CODING_AGENT_SESSION_DIR` (when the parent has it
181
- set), `PI_DELEGATE_PARENT` and `PI_DELEGATE_AUTO_EXIT`. Anything else the
181
+ set), `PI_DELEGATE_PARENT` and `PI_DELEGATE_AUTO_EXIT`, and it always gets `PI_UNATTENDED=1`.
182
+ `PI_UNATTENDED=1` is a general signal, not specific to pi-squire: no human is
183
+ watching this session, even though it runs in a TUI. Other extensions may read
184
+ it to skip a dialog or confirmation instead of waiting on one, and any other
185
+ runner that starts Pi unattended can set it too. Anything else the
182
186
  parent process has, such as a `CLAUDE_CONFIG_DIR` set by a shell alias,
183
187
  reaches the child only through a `session:launch` contributor. `--model` and
184
188
  `--thinking` override the agent's defaults for one call, and an unknown value
@@ -557,8 +561,8 @@ Other extensions may rely on:
557
561
  - the `[delegate]` result text and the closed-without-a-result text;
558
562
  - `AGENT.md`'s frontmatter keys and its location,
559
563
  `<agent dir>/agents/<name>/AGENT.md`;
560
- - the child environment variables `PI_DELEGATE_PARENT` and
561
- `PI_DELEGATE_AUTO_EXIT`.
564
+ - the child environment variables `PI_DELEGATE_PARENT`,
565
+ `PI_DELEGATE_AUTO_EXIT` and `PI_UNATTENDED=1`.
562
566
 
563
567
  A `message:*` provider must:
564
568
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-squire",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "Starts a delegate Pi session in a background tmux window, sends it the task over message:*, and shows the parent its result",
5
5
  "keywords": [
6
6
  "pi-package",
package/src/index.ts CHANGED
@@ -469,6 +469,8 @@ export default function delegate(
469
469
  PI_CODING_AGENT_DIR: getAgentDir(),
470
470
  [PARENT_ENV]: parent,
471
471
  [AUTO_EXIT_ENV]: start.autoExit ? "1" : "0",
472
+ // A general signal for any extension: no human watches this session, so don't wait on a dialog.
473
+ PI_UNATTENDED: "1",
472
474
  };
473
475
  if (start.rest.length > 0) env[FALLBACK_ENV] = start.rest.join(",");
474
476
  const sessionDir = process.env[SESSION_DIR_ENV];