pi-link 0.1.15-beta.1 → 0.1.16

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,17 +6,45 @@ This changelog is based on the git history from `2026-03-21` (initial commit) th
6
6
 
7
7
  ---
8
8
 
9
- ## 0.1.15-beta.1 — 2026-05-17
9
+ ## 0.1.16 — 2026-06-09
10
10
 
11
- First recommended beta of the 0.1.15 cycle. Install with `npm i -g pi-link@beta`. The `latest` tag still points at 0.1.14. Promotion to `latest` after smoke + at least one external user confirmation.
11
+ ### Added
12
+
13
+ - **`link_compact` tool — ask another terminal to compact its context window and wait until it finishes.** A fourth LLM tool alongside `link_send`, `link_prompt`, and `link_list`. The call blocks until the target reports compaction complete, so an orchestrator can immediately dispatch follow-up work to a freshly trimmed worker without sleeping or polling. Busy targets (mid-turn or already compacting) decline instead of being interrupted; self-targets are rejected with a pointer to `/compact`; unknown targets resolve immediately as `not_found`; the call times out after 180 seconds. Compact several workers at once via parallel tool calls. Adds `compact_request` / `compact_response` wire messages, both hub-forwarded with an authoritative `from`.
14
+
15
+ ### Changed
16
+
17
+ - **`/link-name` now collapses internal whitespace.** Leading and trailing whitespace is stripped, and runs of internal whitespace collapse to a single space. `/link-name "build lead"` saves and shows as `build lead`. Startup names (`--link-name`), saved-name load, saved-name comparison, and the `/link-name` command all normalize identically via a shared `normalizeName()` helper — so a saved name with stray spaces compares equal to its trimmed/collapsed form and won't trigger a redundant append on resume.
18
+
19
+ ### Fixed
20
+
21
+ - **Hub no longer broadcasts spurious `terminal_left` for already-removed clients.** The hub's WebSocket close handler now looks up the client in live hub state instead of a closure variable captured at register time. If the socket has no live entry — a duplicate or post-removal close event (e.g. a close firing after the error handler's own `close()`) — it's ignored. Previously this could produce phantom "X left" notifications and drift `connectedTerminals` between hub and clients.
22
+
23
+ ### Internal
24
+
25
+ - **Behavior-identical refactors.** Shared helpers (`targetNotFound`, `renderIconResult`, `latestCustomData`) extracted to remove duplication across tool execute/render paths and session-entry scans. `pushStatus()` skips the `captureContext()` call on no-op pushes. `CompactResponseMsg.reason` comment updated to include `"unsupported"`. No user-visible behavior change.
26
+
27
+ ---
28
+
29
+ ## 0.1.15 — 2026-05-18
30
+
31
+ Stable release for the 0.1.15 cycle, promoted after beta soak.
32
+
33
+ ### Install note for Pi 0.75+
34
+
35
+ Pi 0.75 installs Pi packages under `~/.pi/agent/npm/`, so `pi install npm:pi-link` still enables the in-Pi extension features (`/link*`, tools, `--link`) but no longer puts the `pi-link` shell launcher on PATH.
36
+
37
+ If you use `pi-link <name>` from your shell, also install the launcher globally:
12
38
 
13
- _Supersedes `0.1.15-beta.0`, which was pulled within hours due to a peer-dep namespace bug. See the `0.1.15-beta.0` entry below for the postmortem._
39
+ ```sh
40
+ npm i -g pi-link
41
+ ```
42
+
43
+ Users who only use pi-link inside Pi do not need this extra step. Background: [pi-mono#4587](https://github.com/earendil-works/pi-mono/issues/4587).
14
44
 
15
45
  ### Breaking
16
46
 
17
- - **Pi 0.74+ is now required.** Runtime imports and peer dependencies use the `@earendil-works/*` namespace introduced in Pi 0.74. Users on Pi ≤0.73 should pin `pi-link@0.1.14` (still on the `latest` tag).
18
- - `index.ts`: imports `@earendil-works/pi-coding-agent` and `@earendil-works/pi-tui`
19
- - `package.json` peer deps: `@earendil-works/pi-coding-agent` and `@earendil-works/pi-tui` at `>=0.74.0`
47
+ - **Pi 0.74+ is now required.** pi-link now uses the `@earendil-works/*` Pi package namespace. Users on Pi ≤0.73 should pin `pi-link@0.1.14`.
20
48
 
21
49
  ### Added
22
50
 
@@ -28,22 +56,23 @@ _Supersedes `0.1.15-beta.0`, which was pulled within hours due to a peer-dep nam
28
56
  pi-link --resolve=<name>
29
57
  ```
30
58
 
31
- - **Pi-bundled imports declared as peer dependencies** (using the new `@earendil-works/*` namespace, satisfied natively by Pi 0.74+). Previously only `ws` was declared, so consumers whose toolchain didn't auto-resolve modules through Pi's loader (e.g. some Docker setups) hit `ERR_MODULE_NOT_FOUND` on `typebox`. With modern npm/pnpm, peer deps auto-install when not provided by a parent.
32
-
33
59
  ### Changed
34
60
 
61
+ - **Removed Pi peer dependencies from `package.json`.** Pi provides its own extension APIs at load time; declaring them as npm peers caused unnecessary install warnings and duplicate package installs. `ws` remains the only runtime dependency.
35
62
  - **`pi-link --resolve <missing-name>` now exits with code `2`** (was `0`). Single match still exits `0`; ambiguous still exits `1`; not found is now distinguishable from success in scripts. The legacy `pi-link resolve <missing-name>` form gets the same fix.
36
63
  - **`pi-link <name> <extra-positional>` now errors** instead of silently passing the extra to Pi as a prompt. Catches typos like `pi-link resolv foo`. Tokens that follow a flag without `=` are still accepted as that flag's value (e.g. `pi-link worker --model opus` works). Use `--` to pass bare positionals through unchanged: `pi-link worker -- some-arg`.
37
64
  - **`pi-link foo --help` now errors** with "cannot combine session name and --help" instead of silently passing `--help` to Pi. Run `pi --help` for Pi's own help.
38
- - **Published tarball trimmed to 7 files / 39.7 kB** (was 18 files / 87.5 kB on beta.0). Explicit `files` allowlist in `package.json` so internal planning artifacts (`PLAN-*.md`, `PROPOSAL-*.md`, `REPORT-*.md`, `REQUEST-*.md`) and the test harness no longer ship to npm. Users get `bin/`, `skills/`, `index.ts`, `README.md`, `CHANGELOG.md`, `LICENSE`, and `package.json`.
65
+ - **Published tarball trimmed to 7 files.** Explicit `files` allowlist so internal planning artifacts and the test harness no longer ship to npm.
39
66
 
40
67
  ### Deprecated
41
68
 
42
- - **`pi-link list` and `pi-link resolve` subcommands.** Use `--list` / `--resolve` instead. Subcommands still work for one release with a stderr deprecation warning, then will be removed. The `--global` flag placement is more flexible in the deprecated `resolve` form than the canonical `--resolve` form: `pi-link resolve --global foo` is still accepted, while `pi-link --resolve --global foo` is an error (use `pi-link --resolve foo --global` or `--resolve=foo --global`).
69
+ - **`pi-link list` and `pi-link resolve` subcommands.** Use `--list` / `--resolve` instead. Subcommands still work for one release with a stderr deprecation warning, then will be removed.
43
70
 
44
71
  ### Migration from 0.1.14
45
72
 
46
- All existing scripts and aliases continue to work — the deprecated subcommands print a stderr warning but produce identical output (and the new exit-code 2 on missing resolve). Scripts that depended on `pi-link resolve <name>` returning exit 0 for missing names need updating to handle 2. Most callers already treated empty stdout as "not found" and will be unaffected.
73
+ Existing launcher aliases keep working for this release, but deprecated `list` / `resolve` subcommands now print a stderr warning.
74
+
75
+ One behavior change may affect scripts: `pi-link resolve <missing>` now exits `2` instead of `0`, so callers that trusted exit `0` to mean "found" should update their handling.
47
76
 
48
77
  To silence the deprecation warning, switch to the flag form:
49
78
 
@@ -55,19 +84,15 @@ To silence the deprecation warning, switch to the flag form:
55
84
  | `pi-link resolve foo -g` | `pi-link --resolve foo -g` |
56
85
  | `pi-link resolve --global foo` | `pi-link --resolve foo --global` (order matters in canonical form) |
57
86
 
58
- ### Test coverage
59
-
60
- 40 automated cases in `test/cli-flags-test.mjs` covering: canonical forms (5), deprecation aliases (4), orphan-positional rejection (7), mode-selecting validation (11), help / unknown / managed-flag rejection (8), wrapper-vs-pi flag boundaries (4). Cases that exercise the launch path use a stubbed `pi` on PATH that records argv + `PI_LINK_NAME`. Run with `node test/cli-flags-test.mjs`.
61
-
62
87
  ---
63
88
 
64
89
  ## 0.1.15-beta.0 — 2026-05-17 _(pulled — do not install)_
65
90
 
66
- Initial 0.1.15 beta. Replaced within hours by `0.1.15-beta.1`.
91
+ Initial 0.1.15 beta, superseded by `0.1.15`.
67
92
 
68
- **Issue:** peer dependencies still pointed at the old `@mariozechner/*` namespace, which Pi 0.74 no longer publishes. `npm install` on a Pi-0.74+ machine auto-pulled the tombstoned `@mariozechner/*@0.73.1` packages (203 transitive deps) and printed four npm deprecation warnings (`pi-agent-core`, `pi-tui`, `pi-ai`, `pi-coding-agent`).
93
+ **Issue:** peer dependencies still pointed at the old `@mariozechner/*` namespace, causing npm to install deprecated Pi 0.73 packages on Pi 0.74+ systems.
69
94
 
70
- **Resolution:** migrated to `@earendil-works/*` namespace in `0.1.15-beta.1`. See that entry for the full 0.1.15 feature set.
95
+ **Resolution:** stable `0.1.15` uses the `@earendil-works/*` runtime imports and removes Pi npm peer dependencies.
71
96
 
72
97
  ---
73
98