session-peer 0.3.6 → 0.4.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/docs/guide.md CHANGED
@@ -4,13 +4,15 @@
4
4
 
5
5
  [English](guide.md) | [한국어](guide.ko.md) | [日本語](guide.ja.md) | [简体中文](guide.zh-CN.md)
6
6
 
7
- **Documentation and source version: 0.3.6.** Review the selected release and registry metadata before installation. Dated preparation and validation records are in [VALIDATION.md](../VALIDATION.md); release procedures are in [RELEASING.md](../RELEASING.md). SSH endpoints require the same TypeScript client version; 0.3.5 and 0.3.6 refuse each other’s SSH preflight.
7
+ **Documentation and source version: 0.4.0.** Review the selected release and registry metadata before installation. Dated preparation and validation records are in [VALIDATION.md](../VALIDATION.md); release procedures are in [RELEASING.md](../RELEASING.md). SSH endpoints require the same TypeScript client version; 0.3.6 and 0.4.0 refuse each other’s SSH preflight.
8
8
 
9
- This guide covers version 0.3.6 ([0.3.1 reliability fixes](../PARITY.md#031-reliability-fixes)). Version 0.3.0 introduced multi-host SSH, sender context and return routes, update checks and the optional `sp` shorthand ([0.3.0 changes](../PARITY.md#030-remote-usability-and-maintenance)). [Public 0.3.1 release evidence](../VALIDATION.md#public-031--2026-10-04-kst) records a prior publication. References to 0.1.0 below describe the older release.
9
+ **0.4.0 handoff scope:** opt-in native observation is limited to exact Codex 0.160.1/0.162.1 on macOS arm64; explicit `operator_confirmed` receipts use supported POSIX ledgers. Linux/Windows native observation and automatic ACK collection remain unsupported.
10
+
11
+ This guide covers version 0.4.0 ([0.3.1 reliability fixes](../PARITY.md#031-reliability-fixes)). Version 0.3.0 introduced multi-host SSH, sender context and return routes, update checks and the optional `sp` shorthand ([0.3.0 changes](../PARITY.md#030-remote-usability-and-maintenance)). [Public 0.3.1 release evidence](../VALIDATION.md#public-031--2026-10-04-kst) records a prior publication. References to 0.1.0 below describe the older release.
10
12
 
11
13
  <a id="migration-boundaries-033-candidate"></a>
12
14
 
13
- ## Migration boundaries (0.3.6)
15
+ ## Migration boundaries (0.4.0)
14
16
 
15
17
  The [public 0.3.2 record](../VALIDATION.md#public-032--2026-10-07-kst) fixes the
16
18
  release source and artifact. SSH preflight checks the exact TS version banner,
@@ -50,10 +52,16 @@ not a commit hash; operators must align reviewed source commits separately.
50
52
 
51
53
  See [migration details](../PARITY.md#ordinary-cli-migration-notes--117) and
52
54
  [Windows qualification](../VALIDATION.md#windows-ssh-destination-f5--2026-10-07-kst).
53
- The Python 1.0.2 test reference stays pinned; neither compared public CLI
54
- provides general native ACK/wait, end-to-end deduplication or Side Session.
55
- Relay/MCP are outside this migration comparison.
55
+ The dated migration comparison above uses the historical public versions.
56
+ The 0.4.0 source uses Python 1.1.0 as its development
57
+ comparison baseline; public npm 0.3.3 retains its historical 1.0.2 marker.
58
+ Python 1.1.0 includes an experimental local Claude receipt-only ACK path.
59
+ That does not establish automated ACK or original-sender SSH collectors in this TS
60
+ implementation. Neither baseline provides an end-to-end consumption guarantee;
61
+ Side Session remains experimental. Relay/MCP are outside this comparison.
62
+
56
63
 
64
+ [0.4.0 handoff design and implementation scope](../PARITY.md#handoff-v1-design-candidate--69)
57
65
 
58
66
  ## Contents
59
67
 
@@ -73,7 +81,7 @@ Relay/MCP are outside this migration comparison.
73
81
  **Find and message running Claude Code and Codex sessions, locally or over SSH.**
74
82
  This TypeScript client runs on Node.js without Python.
75
83
 
76
- This guide describes **version 0.3.6**. The npm package and CLI command are both **`session-peer`**. This
84
+ This guide describes **version 0.4.0**. The npm package and CLI command are both **`session-peer`**. This
77
85
  project does not provide a Relay server or hosted service.
78
86
 
79
87
  ## Quick start
@@ -81,12 +89,12 @@ project does not provide a Relay server or hosted service.
81
89
  Use Node **22.13+ within 22.x or 24.x**. Check which `session-peer` your PATH
82
90
  selects if the Python CLI is already installed; both packages use that command.
83
91
 
84
- **Version 0.3.6 installation:** check registry availability and review the chosen release before running the npm install/update examples. If that version is unavailable, use the [reviewed source build](#build-from-source).
92
+ **Version 0.4.0 installation:** check registry availability and review the chosen release before running the npm install/update examples. If that version is unavailable, use the [reviewed source build](#build-from-source).
85
93
 
86
94
  ```sh
87
- npm view session-peer@0.3.6 version dist.integrity
88
- npm install --global --ignore-scripts session-peer@0.3.6
89
- session-peer --version # session-peer 0.3.6 (typescript)
95
+ npm view session-peer@0.4.0 version dist.integrity
96
+ npm install --global --ignore-scripts session-peer@0.4.0
97
+ session-peer --version # session-peer 0.4.0 (typescript)
90
98
  session-peer list --agent claude --json
91
99
  session-peer send --to CLAUDE_PID --message 'Please review the API contract.' --dry-run --json
92
100
  ```
@@ -153,7 +161,7 @@ submits nothing. JSON adds sanitized `codexHomeResolution` and, when supplied by
153
161
  native queue output, `queueId`; neither confirms consumption. See the
154
162
  [selection contract](../PARITY.md#source-codex-home-selection--17--020).
155
163
  Published **0.1.0** still requires an explicit live home and has no inactive opt-in.
156
- On SSH, both ends need the same TypeScript client version (0.3.6).
164
+ On SSH, both ends need the same TypeScript client version (0.4.0).
157
165
 
158
166
  ## Requirements
159
167
 
@@ -177,11 +185,11 @@ npm run build
177
185
  node dist/cli.js --version
178
186
  npm pack --ignore-scripts
179
187
  # Optional global install: first check which session-peer your PATH selects.
180
- npm install --global --ignore-scripts ./session-peer-0.3.6.tgz
188
+ npm install --global --ignore-scripts ./session-peer-0.4.0.tgz
181
189
  session-peer --version
182
190
  ```
183
191
 
184
- Expected for version 0.3.6: `session-peer 0.3.6 (typescript)`. Keep the `./...tgz` path to
192
+ Expected for version 0.4.0: `session-peer 0.4.0 (typescript)`. Keep the `./...tgz` path to
185
193
  select the locally built artifact. Check the checkout version before using
186
194
  these commands for a later release.
187
195
 
@@ -201,7 +209,7 @@ On Windows PowerShell, inspect competing commands with
201
209
  npm ci --ignore-scripts
202
210
  npm run build
203
211
  npm pack --ignore-scripts
204
- npm install --prefix "$env:TEMP\session-peer-ts-source" --ignore-scripts .\session-peer-0.3.6.tgz
212
+ npm install --prefix "$env:TEMP\session-peer-ts-source" --ignore-scripts .\session-peer-0.4.0.tgz
205
213
  & "$env:TEMP\session-peer-ts-source\node_modules\.bin\session-peer.cmd" --version
206
214
  # Later: npm uninstall --prefix "$env:TEMP\session-peer-ts-source" session-peer
207
215
  ```
@@ -441,8 +449,10 @@ npm run test:package
441
449
  npm audit
442
450
  ```
443
451
 
444
- Python is only the development conformance oracle (v1.0.2 commit
445
- `47c23713d0a2a3c11ebde6186afd8c43489b8b65`), never a runtime dependency. Tests also
452
+ Python is only the development comparison oracle (v1.1.0 commit
453
+ `8ca77cf31254c8287a2593fe484bb30a7dba2727`), never a runtime dependency.
454
+ The tested projection covers ordinary list/discovery; it does not establish full
455
+ send/handoff interoperability. Tests also
446
456
  need a C compiler and lsof for the POSIX contract suite. CI uses Node 22/24 on
447
457
  macOS, Linux and Windows. macOS/Linux run the full contract suite and package
448
458
  checks against the pinned reference. Windows x64 runs build/type checks, native
@@ -464,7 +474,7 @@ separate approval. Licensed under [MIT](../LICENSE).
464
474
 
465
475
  ## Package release
466
476
 
467
- Public **0.3.2** was verified on 2026-10-07 KST ([immutable checkpoint](../VALIDATION.md#public-032--2026-10-07-kst)). Check current 0.3.6 availability and npm tags with the registry queries below; dated preparation evidence does not establish a later publication outcome.
477
+ Public **0.3.2** was verified on 2026-10-07 KST ([immutable checkpoint](../VALIDATION.md#public-032--2026-10-07-kst)). Check current 0.4.0 availability and npm tags with the registry queries below; dated preparation evidence does not establish a later publication outcome.
468
478
 
469
479
  Version 0.2.1 was published and verified on 2026-09-29 KST and 0.2.0 on
470
480
  2026-09-28 KST; see the [0.2.1 public release record](../VALIDATION.md#public-021--2026-09-29-kst).
@@ -472,7 +482,7 @@ Later releases add their own dated records. Check the exact version and current
472
482
  tags before installing:
473
483
 
474
484
  ```sh
475
- npm view session-peer@0.3.6 version dist.integrity
485
+ npm view session-peer@0.4.0 version dist.integrity
476
486
  npm view session-peer dist-tags
477
487
  ```
478
488
 
@@ -524,7 +534,7 @@ and reports `current`, `latest`, `channel` (`latest` by default, or `preview`),
524
534
  installation's owner is positively identified from the running CLI's path:
525
535
  an npm global prefix whose own `session-peer` launcher points at this package
526
536
  (default, Homebrew, nvm, nvm-windows and fnm prefixes), for example
527
- `npm install --global --ignore-scripts session-peer@0.3.6`; a pnpm, Yarn or Bun
537
+ `npm install --global --ignore-scripts session-peer@0.4.0`; a pnpm, Yarn or Bun
528
538
  global store whose manifest declares `session-peer`; Volta; or the npx cache.
529
539
  Project installs (`npm_project`, `pnpm_project`), source checkouts (`source`)
530
540
  and anything else (`unknown`) get `updateCommand: null` and a `guidance`
@@ -610,3 +620,19 @@ install a runtime. See [compatibility and validation](../PARITY.md#source-ts-ski
610
620
 
611
621
  Optional `sp` shorthand ships with 0.3.0 and later (not 0.2.1 or earlier) and is
612
622
  never enabled automatically. See [explicit activation and collisions](shorthand.md).
623
+
624
+
625
+ <a id="unreleased-handoff"></a>
626
+
627
+ ## Private handoff and delivery observation (0.4.0)
628
+
629
+ 0.4.0 includes an opt-in private POSIX handoff ledger. Required unsupported evidence refuses before submission; best-effort unsupported evidence never proves ACK. Automated receipt bootstrap, Windows ledger and original-sender SSH collectors remain unsupported. POSIX SSH opt-in uses an explicitly initialized destination ledger: no-effect preparation pins target/home/generation before one send. See [destination-side SSH details](api.md#unreleased-destination-side-ssh-handoff); fake-SSH fixtures are distinct from real network qualification.
630
+
631
+ [CLI](api.md#unreleased-opt-in-handoff-cli--040-work)
632
+
633
+
634
+ Native observation supports exact Codex 0.160.1/0.162.1 on macOS arm64 with an already-warm metadata store. Retained qualified intents can start an independent `handoff wait`: native observation is read-only, while the operation persists private wait/terminal records. No native submission is repeated. Each operation owns its cutoff and preserves other pending or terminal waits. Dedicated new 0.162.1 Codex and Claude Code 2.1.296 sessions supplied local evidence; synthetic tests remain separate. Queued/posted, injection, turn completion and plain reply are distinct from receipt ACK. Automated ACK and Windows handoff remain unsupported.
635
+
636
+ [Observation](api.md#unreleased-local-delivery-observation--72)
637
+
638
+ Native delivery observation is unsupported on Linux and Windows. The supported POSIX ledger can record an explicitly verified receipt as `operator_confirmed`; this is not automatic ACK collection. The 0.4.0 scope is qualified macOS observation and explicit operator confirmation. Linux, Windows and receipt-bootstrap extensions are tracked separately in [#130](https://github.com/abruption/session-peer-ts/issues/130), [#131](https://github.com/abruption/session-peer-ts/issues/131) and [#132](https://github.com/abruption/session-peer-ts/issues/132).
@@ -4,13 +4,15 @@
4
4
 
5
5
  [English](guide.md) | [한국어](guide.ko.md) | [日本語](guide.ja.md) | [简体中文](guide.zh-CN.md)
6
6
 
7
- **文档和源码版本:0.3.6。** 安装前,请审核所选发布版本和注册表元数据。按日期记录的准备与验证结果见 [VALIDATION.md](../VALIDATION.md),发布流程见 [RELEASING.md](../RELEASING.md)。SSH 两端必须使用相同的 TypeScript 客户端版本;0.3.5 与 0.3.6 会拒绝彼此的 SSH 预检。
7
+ **文档和源码版本:0.4.0。** 安装前,请审核所选发布版本和注册表元数据。按日期记录的准备与验证结果见 [VALIDATION.md](../VALIDATION.md),发布流程见 [RELEASING.md](../RELEASING.md)。SSH 两端必须使用相同的 TypeScript 客户端版本;0.3.6 与 0.4.0 会拒绝彼此的 SSH 预检。
8
8
 
9
- 这是 0.3.6 详细指南([0.3.1 可靠性修复](../PARITY.md#031-reliability-fixes))。0.3.0 新增了多主机 SSH、发送者信息与回复路由、更新检查以及可选的 `sp` 简写([0.3.0 变更](../PARITY.md#030-remote-usability-and-maintenance))。此前的发布记录见 [0.3.1 公开发布证据](../VALIDATION.md#public-031--2026-10-04-kst);下文 0.1.0 的说明用于旧版本对比。
9
+ **0.4.0 handoff 范围:** 可选 native 观测仅限 macOS arm64 上精确 Codex 0.160.1/0.162.1 版本;明确的 `operator_confirmed` 收件确认使用受支持的 POSIX ledger。Linux、Windows 的 native 观测和自动 ACK 收集仍不支持。
10
+
11
+ 这是 0.4.0 详细指南([0.3.1 可靠性修复](../PARITY.md#031-reliability-fixes))。0.3.0 新增了多主机 SSH、发送者信息与回复路由、更新检查以及可选的 `sp` 简写([0.3.0 变更](../PARITY.md#030-remote-usability-and-maintenance))。此前的发布记录见 [0.3.1 公开发布证据](../VALIDATION.md#public-031--2026-10-04-kst);下文 0.1.0 的说明用于旧版本对比。
10
12
 
11
13
  <a id="迁移边界-033-候选"></a>
12
14
 
13
- ## 迁移边界 (0.3.6)
15
+ ## 迁移边界 (0.4.0)
14
16
 
15
17
  [0.3.2 公开记录](../VALIDATION.md#public-032--2026-10-07-kst)固定了发布源码和产物。SSH 预检验证 TS 版本标识完全一致,不检查提交哈希;源码构建使用的已审核提交需要由操作人员另行对齐。
16
18
 
@@ -22,8 +24,10 @@
22
24
  - npm、Python、远程主机、技能分别管理。TS 不提供自身更新或远程更新。通知默认关闭,禁用设置优先。显式 `update --check` 仍会查询注册表。公开 TS 0.3.5 接受公开技能 `0.2.1` 及旧 `0.1.0`、`0.2.0` 的精确配置;公开 TS 0.3.2、0.3.3 和 0.3.4 拒绝 `0.2.1`。安装部分固定了独立发布的技能源码。
23
25
  - Windows 验证使用公开 0.3.1、Windows 10 x64、管理员账号、PowerShell 5.1 和 Node 24.16.0。验证范围包括离线安装、包装器与原生锁、操作端 doctor 和不存在目标的 dry-run,以及 31 项本地 fixture。Node 22 仅确认版本标识和原生锁。非管理员、其他架构、F6 运行时校验、此前 Linux 实验的最新规则仍未验证。这不是 0.3.2 实机 ACK 或部署辅助工具的验证。
24
26
 
25
- 请参阅[迁移详情](../PARITY.md#ordinary-cli-migration-notes--117)和 [Windows 验证记录](../VALIDATION.md#windows-ssh-destination-f5--2026-10-07-kst)。Python 1.0.2 测试基准保持不变。对比的两个公开 CLI 都没有通用原生 ACK/wait、端到端去重或 Side Session 支持。Relay/MCP 不在此次迁移对比范围内。
27
+ 请参阅[迁移详情](../PARITY.md#ordinary-cli-migration-notes--117)和 [Windows 验证记录](../VALIDATION.md#windows-ssh-destination-f5--2026-10-07-kst)。上述带日期的迁移比较针对当时的公开版本。0.4.0 源码的开发比较基准为 Python 1.1.0;公开 npm 0.3.3 原有的 1.0.2 标识保持不变。Python 1.1.0 包含实验性的本地 Claude 收件确认专用 ACK 路径。这不表示 TS 实现支持自动 ACK、原发送方的 SSH 收件确认收集器或 Windows handoff。两种基准均不保证端到端消费,Side Session 仍属实验功能。Relay/MCP 不在比较范围内。
28
+
26
29
 
30
+ [0.4.0 handoff 设计与实现范围](../PARITY.md#handoff-v1-design-candidate--69)
27
31
 
28
32
  ## 目录
29
33
 
@@ -40,7 +44,7 @@
40
44
 
41
45
  向正在运行的 **Claude Code 和 Codex 会话**发送消息,支持本机和跨机器 SSH。这是运行于 Node.js 的 TypeScript 客户端,不需要 Python。
42
46
 
43
- **这是 0.3.6 使用指南。**包名为 `session-peer`,CLI 命令为 **`session-peer`**。本项目不提供 Relay 服务器或托管服务。
47
+ **这是 0.4.0 使用指南。**包名为 `session-peer`,CLI 命令为 **`session-peer`**。本项目不提供 Relay 服务器或托管服务。
44
48
 
45
49
  ## 功能与边界
46
50
 
@@ -57,7 +61,7 @@
57
61
 
58
62
  构建后,`node dist/cli.js list --json` 合并列出 Claude/Codex,`list --agent codex --json` 查找已知 home。公开 npm **0.1.0** 仍要求显式 agent,以及 Codex 列表所需的 home;0.2.0 也支持显式命令格式。
59
63
 
60
- 范围仅限默认 `~/.codex`、`CODEX_HOME`、macOS Orca 下的直接账户 home,以及 JSON 数组 `SESSION_PEER_CODEX_HOMES`。`--codex-home` 固定 Codex 列表并绕过无关配置错误;`--agent claude` 完全跳过 Codex 探索。同一 home 的别名合并,不同 home 的相同 UUID 保留。发送时使用每行的 `codexHome`。可选 home 缺失不是错误;显式 home 缺失或无效会保留成功读取的行,并返回退出码 1。列表不会选择 writer 或提交消息。[列表契约](../PARITY.md#source-unified-listing-contract--16--020)说明排序、诊断、`--all` 和 SSH 行为。0.2.0的 Codex 发送在省略 `--codex-home` 时选择唯一且稳定的 live writer;显式 home 仍会检查所有已知竞争 home。非活动队列提交需要已保存的线程、所有候选均确认非活动,以及 `--codex-home HOME --allow-inactive-codex-home`,不会执行 wake/resume。Dry-run 不提交。JSON 新增诊断 `codexHomeResolution`,且仅在原生输出提供时包含 `queueId`;两者均不代表消费确认。请参阅[选择契约](../PARITY.md#source-codex-home-selection--17--020)。公开 **0.1.0** 仍需要显式 live home,且没有非活动许可选项。SSH 两端需要相同的 TypeScript 客户端版本(0.3.6)。
64
+ 范围仅限默认 `~/.codex`、`CODEX_HOME`、macOS Orca 下的直接账户 home,以及 JSON 数组 `SESSION_PEER_CODEX_HOMES`。`--codex-home` 固定 Codex 列表并绕过无关配置错误;`--agent claude` 完全跳过 Codex 探索。同一 home 的别名合并,不同 home 的相同 UUID 保留。发送时使用每行的 `codexHome`。可选 home 缺失不是错误;显式 home 缺失或无效会保留成功读取的行,并返回退出码 1。列表不会选择 writer 或提交消息。[列表契约](../PARITY.md#source-unified-listing-contract--16--020)说明排序、诊断、`--all` 和 SSH 行为。0.2.0的 Codex 发送在省略 `--codex-home` 时选择唯一且稳定的 live writer;显式 home 仍会检查所有已知竞争 home。非活动队列提交需要已保存的线程、所有候选均确认非活动,以及 `--codex-home HOME --allow-inactive-codex-home`,不会执行 wake/resume。Dry-run 不提交。JSON 新增诊断 `codexHomeResolution`,且仅在原生输出提供时包含 `queueId`;两者均不代表消费确认。请参阅[选择契约](../PARITY.md#source-codex-home-selection--17--020)。公开 **0.1.0** 仍需要显式 live home,且没有非活动许可选项。SSH 两端需要相同的 TypeScript 客户端版本(0.4.0)。
61
65
 
62
66
  ### 0.2.0 CLI 易用性
63
67
 
@@ -79,15 +83,15 @@ macOS、Linux 或 Windows native;Node **22.x 中的 22.13 及以上,或 24.x
79
83
 
80
84
  使用 Node 22.x 的 22.13 及以上或 24.x,并确认要安装的确切版本是否已发布。Python CLI 也使用同一个命令名;若已有安装,请先检查 PATH。
81
85
 
82
- **安装 0.3.6:** 运行 npm 安装或更新示例前,请确认注册表可用性并审核所选发布版本。如该版本不可用,请使用[已审核的源码构建](#从源码构建)。
86
+ **安装 0.4.0:** 运行 npm 安装或更新示例前,请确认注册表可用性并审核所选发布版本。如该版本不可用,请使用[已审核的源码构建](#从源码构建)。
83
87
 
84
88
  ```sh
85
- npm view session-peer@0.3.6 version dist.integrity
86
- npm install --global --ignore-scripts session-peer@0.3.6
89
+ npm view session-peer@0.4.0 version dist.integrity
90
+ npm install --global --ignore-scripts session-peer@0.4.0
87
91
  session-peer --version
88
92
  ```
89
93
 
90
- 预期输出:`session-peer 0.3.6 (typescript)`。
94
+ 预期输出:`session-peer 0.4.0 (typescript)`。
91
95
 
92
96
  1. 用 `session-peer list --agent claude --json` 查找目标并选择准确 PID。
93
97
  2. 用 `session-peer send --to CLAUDE_PID --message 'Please reply after checking.' --dry-run --json` 验证,不提交。
@@ -106,7 +110,7 @@ npm run build
106
110
  node dist/cli.js --version
107
111
  npm pack --ignore-scripts
108
112
  # 可选:全局安装前先检查 PATH 选择的现有命令
109
- npm install --global --ignore-scripts ./session-peer-0.3.6.tgz
113
+ npm install --global --ignore-scripts ./session-peer-0.4.0.tgz
110
114
  session-peer --version
111
115
  ```
112
116
 
@@ -116,7 +120,7 @@ session-peer --version
116
120
 
117
121
  安装前后用 `type -a session-peer` 和 `command -v session-peer` 检查实际执行项。其他实现也可能提供同名命令;请选择 PATH 上的一种,或显式运行 `node /absolute/path/dist/cli.js`。不要用 `--force` 覆盖其他管理器的文件。本包不会自动安装、删除或调整 Python 包、技能或服务。卸载使用 `npm uninstall --global session-peer`,随后再次检查 PATH。
118
122
 
119
- 在 Windows PowerShell 中用 `Get-Command session-peer -All` 检查已有命令。为了不替换 Python CLI,可先执行 `npm ci --ignore-scripts`、`npm run build`、`npm pack --ignore-scripts`,再用 `npm install --prefix "$env:TEMP\session-peer-ts-source" --ignore-scripts .\session-peer-0.3.6.tgz` 安装到隔离目录。以 `& "$env:TEMP\session-peer-ts-source\node_modules\.bin\session-peer.cmd" --version` 验证,并可用 `npm uninstall --prefix "$env:TEMP\session-peer-ts-source" session-peer` 卸载。
123
+ 在 Windows PowerShell 中用 `Get-Command session-peer -All` 检查已有命令。为了不替换 Python CLI,可先执行 `npm ci --ignore-scripts`、`npm run build`、`npm pack --ignore-scripts`,再用 `npm install --prefix "$env:TEMP\session-peer-ts-source" --ignore-scripts .\session-peer-0.4.0.tgz` 安装到隔离目录。以 `& "$env:TEMP\session-peer-ts-source\node_modules\.bin\session-peer.cmd" --version` 验证,并可用 `npm uninstall --prefix "$env:TEMP\session-peer-ts-source" session-peer` 卸载。
120
124
 
121
125
  ## 使用
122
126
 
@@ -201,20 +205,20 @@ npm run test:package
201
205
  npm audit
202
206
  ```
203
207
 
204
- Python 只用作开发时的兼容性基准(v1.0.2,`47c23713d0a2a3c11ebde6186afd8c43489b8b65`),不是运行时依赖。POSIX 契约测试还需要 C 编译器和 lsof。CI 在三种 OS 上使用 Node 22/24。macOS/Linux 对固定基准执行完整契约与包检查;Windows x64 执行构建、类型检查、原生 Claude inbox、持有/空闲锁、writer 归属与提交前竞争、CLI 队列结果、隔离模拟 SSH 目标的实际 PowerShell/.cmd 帧处理、包安装/原生加载/卸载及 audit。这些属于 fixture 检查;Windows 不运行 POSIX/Python 参考测试套件。Windows x64/Node 24 实机 ACK 是单独的一次性证据。临时 SQLite、Unix inbox、真实锁 fixture 与 [VALIDATION.md](../VALIDATION.md) 中专用真实 TUI 的证据分开记录;fixture 通过不是 ACK。包测试检查文件清单、重复打包哈希、全新安装与卸载。原生依赖通常有安装脚本,已验证的预编译路径使用 `--ignore-scripts`。SQLite 只读连接仍可能参与 WAL 共享内存管理,不能视为快照。
208
+ Python 只用作开发时的比较基准(v1.1.0,`8ca77cf31254c8287a2593fe484bb30a7dba2727`),不是运行时依赖。验证范围为普通列表和发现结果,不代表发送或 handoff 的完整互操作性。POSIX 契约测试还需要 C 编译器和 lsof。CI 在三种 OS 上使用 Node 22/24。macOS/Linux 对固定基准执行完整契约与包检查;Windows x64 执行构建、类型检查、原生 Claude inbox、持有/空闲锁、writer 归属与提交前竞争、CLI 队列结果、隔离模拟 SSH 目标的实际 PowerShell/.cmd 帧处理、包安装/原生加载/卸载及 audit。这些属于 fixture 检查;Windows 不运行 POSIX/Python 参考测试套件。Windows x64/Node 24 实机 ACK 是单独的一次性证据。临时 SQLite、Unix inbox、真实锁 fixture 与 [VALIDATION.md](../VALIDATION.md) 中专用真实 TUI 的证据分开记录;fixture 通过不是 ACK。包测试检查文件清单、重复打包哈希、全新安装与卸载。原生依赖通常有安装脚本,已验证的预编译路径使用 `--ignore-scripts`。SQLite 只读连接仍可能参与 WAL 共享内存管理,不能视为快照。
205
209
 
206
210
  参见 [CONTRIBUTING.md](../CONTRIBUTING.md)、[RELEASING.md](../RELEASING.md) 和 [SECURITY.md](../SECURITY.md)。后续版本的发布需单独批准,未启用自动 npm 发布。采用 [MIT](../LICENSE) 许可证。
207
211
 
208
212
  ## npm 版本
209
213
 
210
- 公开 **0.3.2** 于 2026-10-07 KST 完成验证([不可变公开记录](../VALIDATION.md#public-032--2026-10-07-kst))。请用下方注册表查询确认 0.3.6 的当前可用性和 npm 标签;带日期的准备证据不能证明后续发布结果。
214
+ 公开 **0.3.2** 于 2026-10-07 KST 完成验证([不可变公开记录](../VALIDATION.md#public-032--2026-10-07-kst))。请用下方注册表查询确认 0.4.0 的当前可用性和 npm 标签;带日期的准备证据不能证明后续发布结果。
211
215
 
212
216
  0.2.1 已于 2026-09-29 KST、0.2.0 已于 2026-09-28 KST 公开并验证。请参阅
213
217
  [0.2.1 公开记录](../VALIDATION.md#public-021--2026-09-29-kst)(之后的版本各自追加带日期的记录),
214
218
  安装前核对准确版本与当前标签。
215
219
 
216
220
  ```sh
217
- npm view session-peer@0.3.6 version dist.integrity
221
+ npm view session-peer@0.4.0 version dist.integrity
218
222
  npm view session-peer dist-tags
219
223
  ```
220
224
 
@@ -253,7 +257,7 @@ dist-tag(3 秒超时,不重试),并报告 `current`、`latest`、`channe
253
257
  `ahead`)、`managedBy`、`updateCommand` 和 `guidance`。只有根据当前 CLI 路径能确切识别
254
258
  安装的管理方时才给出命令:其自身 `session-peer` 启动器指向本包的 npm 全局 prefix
255
259
  (默认、Homebrew、nvm、nvm-windows、fnm,例如
256
- `npm install --global --ignore-scripts session-peer@0.3.6`),清单中声明了
260
+ `npm install --global --ignore-scripts session-peer@0.4.0`),清单中声明了
257
261
  `session-peer` 的 pnpm、Yarn、Bun 全局存储,Volta,或 npx 缓存。项目安装
258
262
  (`npm_project`、`pnpm_project`)、源码检出(`source`)以及其他情况(`unknown`)只返回
259
263
  `updateCommand: null` 和一句 `guidance`,因此不会给出可能修改无关当前目录的命令。它只报告
@@ -320,3 +324,19 @@ postinstall 不会调用 Skills CLI,安装此技能不会覆盖 Python 技能
320
324
 
321
325
  可选的 `sp` 简写包含在 0.3.0 及更高版本中(0.2.1 及更早版本没有),不会自动启用。
322
326
  请参阅[显式启用、冲突与停用(英文)](shorthand.md)。
327
+
328
+
329
+ <a id="unreleased-handoff"></a>
330
+
331
+ ## 私有 handoff 与投递观测(0.4.0)
332
+
333
+ 0.4.0 包含 opt-in private POSIX handoff ledger。所需证据通道 unsupported 时在提交前拒绝;best-effort 提交并不证明 ACK。自动收件确认连接设置、Windows ledger 和原发送方的 SSH 收件确认收集器尚不支持。POSIX SSH opt-in 在已明确初始化的目标 ledger 上进行无发送的准备,固定目标、home、generation 后只发送一次。请参阅[目标端 SSH 说明](api.md#unreleased-destination-side-ssh-handoff)。模拟 SSH fixture 与实际网络验证分别记录。
334
+
335
+ [CLI](api.md#unreleased-opt-in-handoff-cli--040-work)
336
+
337
+
338
+ native 观测仅支持 macOS arm64 上的精确 Codex 0.160.1/0.162.1 和已有的元数据存储。保留验证依据的提交可通过独立的 `handoff wait` 只读观测 native 状态。该操作会在私有 ledger 中保存等待和终态记录,但不会再次进行 native 提交。每项等待只按自己的截止时间判断,并保留其他等待及过去的终态。新建专用 Codex 0.162.1、Claude Code 2.1.296 会话的实机依据与合成测试分开记录。queued/posted、注入、轮次结束及普通回复均不等于收件确认 ACK。自动 ACK 和 Windows handoff 仍不支持。
339
+
340
+ [Observation](api.md#unreleased-local-delivery-observation--72)
341
+
342
+ Linux、Windows 的 native 注入观察尚不支持。支持的 POSIX ledger 可将操作人员明确确认的收件事实记录为 `operator_confirmed`,但这不是自动 ACK 收集。0.4.0 范围是已验证的 macOS 观察和操作人员的明确确认。Linux、Windows 观察及 receipt bootstrap 分别作为 [#130](https://github.com/abruption/session-peer-ts/issues/130)、[#131](https://github.com/abruption/session-peer-ts/issues/131)、[#132](https://github.com/abruption/session-peer-ts/issues/132) 的后续工作。
package/docs/shorthand.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Optional `sp` shorthand
2
2
 
3
- This reference describes source/package version 0.3.6. Check registry availability before using a version-pinned npm installation; before publication use a reviewed source artifact. The shorthand forwards to the explicitly selected CLI and does not install or upgrade it.
3
+ This reference describes source/package version 0.4.0. Check registry availability before using a version-pinned npm installation; before publication use a reviewed source artifact. The shorthand forwards to the explicitly selected CLI and does not install or upgrade it.
4
4
 
5
5
  [README](../README.md) · [User guide](guide.md)
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "session-peer",
3
- "version": "0.3.6",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -41,7 +41,7 @@
41
41
  "build": "tsc -p tsconfig.json",
42
42
  "test": "npm run build && npm run test:types && node --import ./test/fixtures/isolate-env.mjs --experimental-strip-types --test test/*.test.ts",
43
43
  "test:types": "tsc -p tsconfig.test.json",
44
- "test:windows": "npm run build && npm run test:types && node --import ./test/fixtures/isolate-env.mjs --import ./test/fixtures/windows-inspection-diagnostic.mjs --experimental-strip-types --test --test-concurrency=1 test/writer-uid.test.ts test/claude-records.test.ts test/reply-agent-binding.test.ts test/windows.test.ts test/windows-contract.test.ts test/windows-inspection.test.ts test/input-boundaries.test.ts test/discovery.test.ts test/codex-homes.test.ts test/diagnostics.test.ts test/cli-usability.test.ts test/skill-guidance.test.ts test/skill-metadata.test.ts test/ssh-hosts.test.ts test/ssh-response.test.ts test/replies.test.ts test/updates.test.ts",
44
+ "test:windows": "npm run build && npm run test:types && node --import ./test/fixtures/isolate-env.mjs --import ./test/fixtures/windows-inspection-diagnostic.mjs --experimental-strip-types --test --test-concurrency=1 test/handoff-core.test.ts test/handoff-cli.test.ts test/handoff-delivery.test.ts test/metadata-observation.test.ts test/handoff-writer-probe.test.ts test/app-server.test.ts test/writer-uid.test.ts test/claude-records.test.ts test/reply-agent-binding.test.ts test/windows.test.ts test/windows-contract.test.ts test/windows-inspection.test.ts test/input-boundaries.test.ts test/discovery.test.ts test/codex-homes.test.ts test/diagnostics.test.ts test/cli-usability.test.ts test/skill-guidance.test.ts test/skill-metadata.test.ts test/ssh-hosts.test.ts test/ssh-response.test.ts test/ssh-handoff.test.ts test/replies.test.ts test/updates.test.ts",
45
45
  "test:package": "npm run build && node --experimental-strip-types test/package-smoke.ts"
46
46
  },
47
47
  "devDependencies": {