session-peer 0.6.2 → 0.7.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/PARITY.md +1 -1
- package/README.ja.md +40 -33
- package/README.ko.md +16 -22
- package/README.md +10 -16
- package/README.zh-CN.md +38 -30
- package/RELEASING.md +20 -0
- package/dist/cli.d.ts +1 -17
- package/dist/cli.js +38 -211
- package/dist/execution.d.ts +60 -0
- package/dist/execution.js +215 -0
- package/dist/process.d.ts +2 -0
- package/dist/process.js +21 -3
- package/dist/protocol.d.ts +2 -2
- package/dist/protocol.js +1 -1
- package/dist/skill-metadata.js +4 -3
- package/docs/api.md +18 -15
- package/docs/design/execution-and-mcp.md +84 -0
- package/docs/design/typescript-skill-compatibility.md +7 -0
- package/docs/guide.ja.md +55 -53
- package/docs/guide.ko.md +52 -48
- package/docs/guide.md +81 -77
- package/docs/guide.zh-CN.md +54 -51
- package/docs/shorthand.md +9 -10
- package/package.json +2 -1
package/docs/guide.zh-CN.md
CHANGED
|
@@ -1,39 +1,14 @@
|
|
|
1
1
|
# 用户指南 — session-peer (TypeScript)
|
|
2
2
|
|
|
3
|
-
普通 Codex 队列也会拒绝无法判定云端策略适用范围的上下文,包括存在 `auth.json` 的登录 home,并返回 `codex_cloud_storage_unverified`。不会读取凭据或缓存内容;另行验证的 owned app-server 路径仍需实际存储绑定证据。
|
|
4
|
-
|
|
5
|
-
此源码检查 Codex home、系统配置、macOS 管理配置,以及队列进程和目标进程实际工作目录所适用的项目配置。详见[存储检查范围与拒绝条件](api.md#codex-storage-configuration)。Windows 的 Codex 发送和 dry-run 在本地存储检查方式通过验证前会拒绝队列提交。doctor 和 dry-run 不执行 Codex,加载器版本仍标为未验证。
|
|
6
|
-
|
|
7
|
-
当前功能差异与移植决策见[注明日期的对照表](../PARITY.md#current-scoped-feature-matrix)。表中区分 TypeScript 已发布的功能与单独固定的 Python 比较基准。
|
|
8
|
-
|
|
9
3
|
[返回 README](../README.zh-CN.md)
|
|
10
4
|
|
|
11
5
|
[English](guide.md) | [한국어](guide.ko.md) | [日本語](guide.ja.md) | [简体中文](guide.zh-CN.md)
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
**0.4.0 handoff 范围:** 可选 native 观测仅限 macOS arm64 上精确 Codex 0.160.1/0.162.1 版本;明确的 `operator_confirmed` 收件确认使用受支持的 POSIX ledger。Linux、Windows 的 native 观测和自动 ACK 收集仍不支持。 0.6.2 源码记录了不可选用的 Linux arm64 Codex 0.162.1 候选(固定的上游 `aarch64-unknown-linux-musl` 可执行文件、schema 及一次注入测试),但不启用 Linux 观测;Linux native 观测仍不支持。
|
|
16
|
-
|
|
17
|
-
这是 0.6.2 详细指南([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 的说明用于旧版本对比。
|
|
18
|
-
|
|
19
|
-
<a id="迁移边界-033-候选"></a>
|
|
20
|
-
|
|
21
|
-
## 迁移边界 (0.4.0)
|
|
22
|
-
|
|
23
|
-
[0.3.2 公开记录](../VALIDATION.md#public-032--2026-10-07-kst)固定了发布源码和产物。SSH 预检验证 TS 版本标识完全一致,不检查提交哈希;源码构建使用的已审核提交需要由操作人员另行对齐。
|
|
7
|
+
本指南介绍如何安装和使用 CLI。
|
|
24
8
|
|
|
25
|
-
|
|
26
|
-
- Claude 会话目录缺失时,返回空列表和 `status:ok`。可选 Codex home 缺失时为 `absent`;没有可读 DB 且没有错误时,整体为 `not_installed`。空列表或 doctor 完成都不授予发送权限。
|
|
27
|
-
- 重复 `--host` 返回按请求顺序排列的数组。主机分别执行期间发生的失败汇总为退出码 1;执行前的命令整体拒绝(如主机重复或消息为空)在数组输出中仍保持退出码 2。公开 0.3.2 在 SSH 退出 255 或超时后,也可能丢失完整响应的证据。0.3.3 保留与请求匹配的完整事实,并返回本地退出码 1 和 `sshTransport`。不完整或无效证据仍为 unknown。unknown 时不得自动重发。
|
|
28
|
-
- 0.2.0 引入的基础 doctor 不执行 Codex,也不向 inbox 提交。0.3.0 起,显式 `--check-return-route` 仅对可用的非本地目标执行有时间限制的反向 SSH 无操作命令。同机自身路由无需 SSH 即返回 `verified`、`transport:local`、`self_route_normalized`;缺少主机时在任何探测前失败。`--check-reply-to` 不受支持。verified 表示本地路由归一化或一次 SSH 无操作命令成功,不是 ACK 认证或通用反向访问保证。
|
|
29
|
-
- 将同机 Reply-To 归一化为本地路径,必须明确指定匹配的 OS 用户、使用可识别的准确本机名称,且没有显式 SSH 选项。发送者证据冲突时省略身份;Claude 名称不可用时使用 PID。
|
|
30
|
-
- 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`。安装部分固定了独立发布的技能源码。
|
|
31
|
-
- 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 或部署辅助工具的验证。
|
|
32
|
-
|
|
33
|
-
请参阅[迁移详情](../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 不在比较范围内。
|
|
9
|
+
**文档和源码版本:0.7.0。** SSH 两端必须使用相同的 TypeScript 版本。
|
|
34
10
|
|
|
35
|
-
|
|
36
|
-
[0.4.0 handoff 设计与实现范围](../PARITY.md#handoff-v1-design-candidate--69)
|
|
11
|
+
普通 Codex 发送受[存储检查规则](api.md#codex-storage-configuration)约束。Windows 上的 Codex 发送和 dry-run 会在消息入队前停止。
|
|
37
12
|
|
|
38
13
|
## 目录
|
|
39
14
|
|
|
@@ -42,6 +17,7 @@
|
|
|
42
17
|
- [安装](#安装)
|
|
43
18
|
- [使用](#使用)
|
|
44
19
|
- [成功含义与安全性](#成功含义与安全性)
|
|
20
|
+
- [迁移边界](#迁移边界-040)
|
|
45
21
|
- [开发与验证](#开发与验证)
|
|
46
22
|
- [npm 版本](#npm-版本)
|
|
47
23
|
- [相关项目](#相关项目)
|
|
@@ -50,12 +26,12 @@
|
|
|
50
26
|
|
|
51
27
|
向正在运行的 **Claude Code 和 Codex 会话**发送消息,支持本机和跨机器 SSH。这是运行于 Node.js 的 TypeScript 客户端,不需要 Python。
|
|
52
28
|
|
|
53
|
-
**这是 0.
|
|
29
|
+
**这是 0.7.0 使用指南。**包名为 `session-peer`,CLI 命令为 **`session-peer`**。本项目不提供 Relay 服务器或托管服务。
|
|
54
30
|
|
|
55
31
|
## 功能与边界
|
|
56
32
|
|
|
57
33
|
- 发现本机 Claude/Codex 会话与已知 Codex home(面向 0.2.0 的功能,见下文)。
|
|
58
|
-
- 先用 `--dry-run` 验证目标,再向原生 inbox / queue 提交一次消息。Codex
|
|
34
|
+
- 先用 `--dry-run` 验证目标,再向原生 inbox / queue 提交一次消息。Codex 通常要求唯一且稳定的活跃 writer。
|
|
59
35
|
- 通过 SSH 调用远端已安装的同版本客户端,支持结构化 Reply-To URI 和 JSON 输出。
|
|
60
36
|
- 目标或进程归属不明确时拒绝操作;不会自动重试结果不确定的提交。
|
|
61
37
|
|
|
@@ -65,9 +41,9 @@
|
|
|
65
41
|
|
|
66
42
|
### 0.2.0 统一列表
|
|
67
43
|
|
|
68
|
-
构建后,`node dist/cli.js list --json` 合并列出 Claude/Codex,`list --agent codex --json` 查找已知 home。公开 npm **0.1.0** 仍要求显式 agent,以及 Codex 列表所需的 home
|
|
44
|
+
构建后,`node dist/cli.js list --json` 合并列出 Claude/Codex,`list --agent codex --json` 查找已知 home。公开 npm **0.1.0** 仍要求显式 agent,以及 Codex 列表所需的 home;安装命令和显式的 `list`、`send` 命令也适用于 0.1.0。
|
|
69
45
|
|
|
70
|
-
范围仅限默认 `~/.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
|
|
46
|
+
范围仅限默认 `~/.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 行为。当前源码中,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.7.0)。
|
|
71
47
|
|
|
72
48
|
### 0.2.0 CLI 易用性
|
|
73
49
|
|
|
@@ -85,7 +61,7 @@ Unicode 14.0.0 默认 full casefold 精确匹配,不进行规范化或模糊
|
|
|
85
61
|
|
|
86
62
|
如果 `CLAUDE_CONFIG_DIR` 和 `ANTHROPIC_CONFIG_DIR` 都没有非空值,Claude 探索除 `~/.claude/sessions` 外,还会检查 `~/Library/Application Support/orca/claude-profiles` 下各直接子档案的 `home/sessions`。显式设置环境变量时只使用指定的会话登记目录。Linux 和 Windows 不会扫描这一 macOS 路径。配置档案数和登记项数均有上限。自动发现的配置档案目录和登记文件必须归当前用户所有,且其他用户或用户组不可写入;不满足安全条件的来源会使探索被标记为不完整。对 macOS 自动探索来源的扩展 ACL(额外访问权限)一律保守拒绝,包括仅指定所有者的 ACL。检查使用受限的系统元数据工具,不执行代理。
|
|
87
63
|
|
|
88
|
-
|
|
64
|
+
部分来源查询失败时,列表会保留已读取的会话,并返回非零退出码和诊断信息,说明结果不完整。发送和发件人识别要求信息完整且无冲突。指向同一实际登记目录的别名可以合并为一行;PID 或收件端点信息冲突时,不会按目录顺序或指定 PID 来决定目标。选择和 handoff 连续性检查保留原始登记信息的依据,并在提交前重新检查。列表和 dry-run 不连接收件端点。这些检查不证明 native 代次、消息消费或收讫确认 ACK。
|
|
89
65
|
|
|
90
66
|
### 显式本地收讫确认
|
|
91
67
|
|
|
@@ -115,15 +91,15 @@ macOS、Linux 或 Windows native;Node **22.x 中的 22.13 及以上,或 24.x
|
|
|
115
91
|
|
|
116
92
|
使用 Node 22.x 的 22.13 及以上或 24.x,并确认要安装的确切版本是否已发布。Python CLI 也使用同一个命令名;若已有安装,请先检查 PATH。
|
|
117
93
|
|
|
118
|
-
**安装 0.
|
|
94
|
+
**安装 0.7.0:** 运行 npm 安装或更新示例前,请确认注册表可用性并审核所选发布版本。如该版本不可用,请使用[已审核的源码构建](#从源码构建)。
|
|
119
95
|
|
|
120
96
|
```sh
|
|
121
|
-
npm view session-peer@0.
|
|
122
|
-
npm install --global --ignore-scripts session-peer@0.
|
|
97
|
+
npm view session-peer@0.7.0 version dist.integrity
|
|
98
|
+
npm install --global --ignore-scripts session-peer@0.7.0
|
|
123
99
|
session-peer --version
|
|
124
100
|
```
|
|
125
101
|
|
|
126
|
-
预期输出:`session-peer 0.
|
|
102
|
+
预期输出:`session-peer 0.7.0 (typescript)`。
|
|
127
103
|
|
|
128
104
|
1. 用 `session-peer list --agent claude --json` 查找目标并选择准确 PID。
|
|
129
105
|
2. 用 `session-peer send --to CLAUDE_PID --message 'Please reply after checking.' --dry-run --json` 验证,不提交。
|
|
@@ -142,7 +118,7 @@ npm run build
|
|
|
142
118
|
node dist/cli.js --version
|
|
143
119
|
npm pack --ignore-scripts
|
|
144
120
|
# 可选:全局安装前先检查 PATH 选择的现有命令
|
|
145
|
-
npm install --global --ignore-scripts ./session-peer-0.
|
|
121
|
+
npm install --global --ignore-scripts ./session-peer-0.7.0.tgz
|
|
146
122
|
session-peer --version
|
|
147
123
|
```
|
|
148
124
|
|
|
@@ -152,7 +128,7 @@ session-peer --version
|
|
|
152
128
|
|
|
153
129
|
安装前后用 `type -a session-peer` 和 `command -v session-peer` 检查实际执行项。其他实现也可能提供同名命令;请选择 PATH 上的一种,或显式运行 `node /absolute/path/dist/cli.js`。不要用 `--force` 覆盖其他管理器的文件。本包不会自动安装、删除或调整 Python 包、技能或服务。卸载使用 `npm uninstall --global session-peer`,随后再次检查 PATH。
|
|
154
130
|
|
|
155
|
-
在 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.
|
|
131
|
+
在 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.7.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` 卸载。
|
|
156
132
|
|
|
157
133
|
## 使用
|
|
158
134
|
|
|
@@ -218,14 +194,41 @@ session-peer list --host alpha --host user@[2001:db8::1] \
|
|
|
218
194
|
| 结果 | 含义 |
|
|
219
195
|
| --- | --- |
|
|
220
196
|
| `validated`, `submitted:false` | dry-run 检查通过,尚未发送。 |
|
|
221
|
-
| `posted` / `queued` | inbox 已写入 / queue
|
|
197
|
+
| `posted` / `queued` | inbox 已写入 / queue 已接受,**不能确认接收方已处理消息或发回 ACK**。 |
|
|
222
198
|
| `refused`, `submitted:false` | 提交前被拒绝。 |
|
|
223
199
|
| `unknown`, `submitted:null` | 可能已经提交,不要自动重发。 |
|
|
224
200
|
|
|
225
|
-
|
|
201
|
+
消息提交后,没有回复或目标会话退出,都不足以判断接收方是否已处理消息,也不足以判断发送是否失败。不要自动重发。
|
|
226
202
|
|
|
227
203
|
`consumptionConfirmed` 始终为 false。必须在目标 TUI 中另行确认实际 ACK,不可由排队或轮询 transcript 推断。退出码 0/1/2 分别表示成功/错误/用法错误。错误只返回固定代码,不返回原生 stderr 或消息内容。Codex 使用真实内核 flock、文件身份和同用户进程开始时间进行多次核验,排队前再次检查。不删除 lock,也不向拥有它的代理进程发送信号。发现结果仍包含本地名称、路径、ID,分享前请脱敏。
|
|
228
204
|
|
|
205
|
+
<a id="迁移边界-033-候选"></a>
|
|
206
|
+
|
|
207
|
+
## 迁移边界 (0.4.0)
|
|
208
|
+
|
|
209
|
+
普通 Codex 队列也会拒绝无法判定云端策略适用范围的上下文,包括存在 `auth.json` 的登录 home,并返回 `codex_cloud_storage_unverified`。不会读取凭据或缓存内容;另行验证的 owned app-server 路径仍需实际存储绑定证据。
|
|
210
|
+
|
|
211
|
+
此源码检查 Codex home、系统配置、macOS 管理配置,以及队列进程和目标进程实际工作目录所适用的项目配置。详见[存储检查范围与拒绝条件](api.md#codex-storage-configuration)。Windows 的 Codex 发送和 dry-run 在本地存储检查方式通过验证前会拒绝队列提交。doctor 和 dry-run 不执行 Codex,加载器版本仍标为未验证。
|
|
212
|
+
|
|
213
|
+
当前功能差异与移植决策见[注明日期的对照表](../PARITY.md#current-scoped-feature-matrix)。表中区分 TypeScript 已发布的功能与单独固定的 Python 比较基准。
|
|
214
|
+
|
|
215
|
+
另见 [0.3.0 变更](../PARITY.md#030-remote-usability-and-maintenance)、[0.3.1 可靠性修复](../PARITY.md#031-reliability-fixes)和 [0.3.1 发布记录](../VALIDATION.md#public-031--2026-10-04-kst)。本文提到的 0.1.0 指旧版本。
|
|
216
|
+
|
|
217
|
+
[0.3.2 公开记录](../VALIDATION.md#public-032--2026-10-07-kst)固定了发布源码和产物。SSH 预检验证 TS 版本标识完全一致,不检查提交哈希;源码构建使用的已审核提交需要由操作人员另行对齐。
|
|
218
|
+
|
|
219
|
+
- Python 的 Claude JSON 可能省略 `status`、`submitted`、`consumptionConfirmed`。TS 使用 `validated`/`posted`、明确的 `submitted` 和 `consumptionConfirmed:false`。缺失字段不等于 false 或 null。Claude 名称可以为 null,Codex `queueId` 是可选字段。提交不能证明 ACK。
|
|
220
|
+
- Claude 会话目录缺失时,返回空列表和 `status:ok`。可选 Codex home 缺失时为 `absent`;没有可读 DB 且没有错误时,整体为 `not_installed`。空列表或 doctor 完成都不授予发送权限。
|
|
221
|
+
- 重复 `--host` 返回按请求顺序排列的数组。主机分别执行期间发生的失败汇总为退出码 1;执行前的命令整体拒绝(如主机重复或消息为空)在数组输出中仍保持退出码 2。公开 0.3.2 在 SSH 退出 255 或超时后,也可能丢失完整响应的证据。0.3.3 保留与请求匹配的完整事实,并返回本地退出码 1 和 `sshTransport`。不完整或无效证据仍为 unknown。unknown 时不得自动重发。
|
|
222
|
+
- 0.2.0 引入的基础 doctor 不执行 Codex,也不向 inbox 提交。0.3.0 起,显式 `--check-return-route` 仅对可用的非本地目标执行有时间限制的反向 SSH 无操作命令。同机自身路由无需 SSH 即返回 `verified`、`transport:local`、`self_route_normalized`;缺少主机时在任何探测前失败。`--check-reply-to` 不受支持。verified 表示本地路由归一化或一次 SSH 无操作命令成功,不是 ACK 认证或通用反向访问保证。
|
|
223
|
+
- 将同机 Reply-To 归一化为本地路径,必须明确指定匹配的 OS 用户、使用可识别的准确本机名称,且没有显式 SSH 选项。发送者证据冲突时省略身份;Claude 名称不可用时使用 PID。
|
|
224
|
+
- 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`。安装部分固定了独立发布的技能源码。
|
|
225
|
+
- 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 或部署辅助工具的验证。
|
|
226
|
+
|
|
227
|
+
请参阅[迁移详情](../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 不在比较范围内。
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
[0.4.0 handoff 设计与实现范围](../PARITY.md#handoff-v1-design-candidate--69)
|
|
231
|
+
|
|
229
232
|
## 开发与验证
|
|
230
233
|
|
|
231
234
|
```sh
|
|
@@ -237,20 +240,20 @@ npm run test:package
|
|
|
237
240
|
npm audit
|
|
238
241
|
```
|
|
239
242
|
|
|
240
|
-
Python 只用作开发时的比较基准(v1.1.0,`8ca77cf31254c8287a2593fe484bb30a7dba2727`),不是运行时依赖。验证范围为普通列表和发现结果,不代表发送或 handoff 的完整互操作性。POSIX 契约测试还需要 C 编译器和 lsof。CI 在三种 OS 上使用 Node 22/24。macOS/Linux 对固定基准执行完整契约与包检查;Windows x64 执行构建、类型检查、原生 Claude inbox
|
|
243
|
+
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 共享内存管理,不能视为快照。
|
|
241
244
|
|
|
242
245
|
参见 [CONTRIBUTING.md](../CONTRIBUTING.md)、[RELEASING.md](../RELEASING.md) 和 [SECURITY.md](../SECURITY.md)。后续版本的发布需单独批准,未启用自动 npm 发布。采用 [MIT](../LICENSE) 许可证。
|
|
243
246
|
|
|
244
247
|
## npm 版本
|
|
245
248
|
|
|
246
|
-
公开 **0.3.2** 于 2026-10-07 KST 完成验证([不可变公开记录](../VALIDATION.md#public-032--2026-10-07-kst))。请用下方注册表查询确认 0.
|
|
249
|
+
公开 **0.3.2** 于 2026-10-07 KST 完成验证([不可变公开记录](../VALIDATION.md#public-032--2026-10-07-kst))。请用下方注册表查询确认 0.7.0 的当前可用性和 npm 标签;带日期的准备证据不能证明后续发布结果。
|
|
247
250
|
|
|
248
251
|
0.2.1 已于 2026-09-29 KST、0.2.0 已于 2026-09-28 KST 公开并验证。请参阅
|
|
249
252
|
[0.2.1 公开记录](../VALIDATION.md#public-021--2026-09-29-kst)(之后的版本各自追加带日期的记录),
|
|
250
253
|
安装前核对准确版本与当前标签。
|
|
251
254
|
|
|
252
255
|
```sh
|
|
253
|
-
npm view session-peer@0.
|
|
256
|
+
npm view session-peer@0.7.0 version dist.integrity
|
|
254
257
|
npm view session-peer dist-tags
|
|
255
258
|
```
|
|
256
259
|
|
|
@@ -276,6 +279,7 @@ session-peer doctor --host user@host --json
|
|
|
276
279
|
存活进程公布了 pipe,并不证明 pipe 存在或可以连接。`capabilities` 明确将
|
|
277
280
|
wake/wait/ACK 和消费确认标为不支持。可选的 TS 技能元数据检查也不会安装任何内容。
|
|
278
281
|
参见[诊断边界](../PARITY.md#source-read-only-doctor--18--020)。SSH 两端需要相同的 TypeScript 客户端版本。
|
|
282
|
+
|
|
279
283
|
### 更新检查与提示(0.3.0,#22)
|
|
280
284
|
|
|
281
285
|
```sh
|
|
@@ -289,7 +293,7 @@ dist-tag(3 秒超时,不重试),并报告 `current`、`latest`、`channe
|
|
|
289
293
|
`ahead`)、`managedBy`、`updateCommand` 和 `guidance`。只有根据当前 CLI 路径能确切识别
|
|
290
294
|
安装的管理方时才给出命令:其自身 `session-peer` 启动器指向本包的 npm 全局 prefix
|
|
291
295
|
(默认、Homebrew、nvm、nvm-windows、fnm,例如
|
|
292
|
-
`npm install --global --ignore-scripts session-peer@0.
|
|
296
|
+
`npm install --global --ignore-scripts session-peer@0.7.0`),清单中声明了
|
|
293
297
|
`session-peer` 的 pnpm、Yarn、Bun 全局存储,Volta,或 npx 缓存。项目安装
|
|
294
298
|
(`npm_project`、`pnpm_project`)、源码检出(`source`)以及其他情况(`unknown`)只返回
|
|
295
299
|
`updateCommand: null` 和一句 `guidance`,因此不会给出可能修改无关当前目录的命令。它只报告
|
|
@@ -307,8 +311,7 @@ npm 版本,Python 版 `session-peer` 的发布是独立的版本序列,从
|
|
|
307
311
|
不应发起未经请求的网络访问。设置 `SESSION_PEER_UPDATE_NOTICE=1` 开启后,若 24 小时内的
|
|
308
312
|
缓存显示有更新的 npm 稳定版,JSON 结果会增加 `clientUpdate` 对象,文本输出则在 stderr
|
|
309
313
|
写一行。缓存缺失、无效或过期时会启动一个分离的刷新进程,不会延迟或改变命令结果与退出码;
|
|
310
|
-
刷新失败后 1
|
|
311
|
-
显式检查,写入都只在持有 `npm-update.lock` 时进行,且只覆盖更旧的记录。任何调用都不会接管或
|
|
314
|
+
刷新失败后 1 小时内不再尝试。无论是后台刷新还是显式检查,都只有持有 `npm-update.lock` 的进程可以写入缓存,且只覆盖更旧的记录。任何调用都不会接管或
|
|
312
315
|
删除不是自己创建的锁。若刷新异常退出,或因 I/O 错误未能释放锁而留下锁,后台刷新会停止,`update --check` 会报告
|
|
313
316
|
`cache: "skipped_stale_lock"`。请在没有 session-peer 进程运行时手动删除 `npm-update.lock`。
|
|
314
317
|
|
|
@@ -364,11 +367,11 @@ postinstall 不会调用 Skills CLI,安装此技能不会覆盖 Python 技能
|
|
|
364
367
|
|
|
365
368
|
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 与实际网络验证分别记录。
|
|
366
369
|
|
|
367
|
-
[CLI](api.md#unreleased-opt-in-handoff-cli--040-work)
|
|
370
|
+
[CLI 规范](api.md#unreleased-opt-in-handoff-cli--040-work)
|
|
368
371
|
|
|
369
372
|
|
|
370
|
-
|
|
373
|
+
原生观测仅支持 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 仍不支持。
|
|
371
374
|
|
|
372
|
-
[
|
|
375
|
+
[投递观测规范](api.md#unreleased-local-delivery-observation--72)
|
|
373
376
|
|
|
374
|
-
Linux、Windows 的 native 注入观察尚不支持。 0.
|
|
377
|
+
Linux、Windows 的 native 注入观察尚不支持。 0.7.0 源码记录了不可选用的 Linux arm64 Codex 0.162.1 候选(固定的上游 `aarch64-unknown-linux-musl` 可执行文件、schema 及一次注入测试),但不启用 Linux 观测;Linux 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
|
+
This reference describes source/package version 0.7.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
|
|
|
@@ -23,9 +23,8 @@ co-installation is outside this feature's scope.
|
|
|
23
23
|
|
|
24
24
|
## Checking for the activation files
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
package version. Check for the files in the installed package directory:
|
|
26
|
+
Published packages include the activation files starting with 0.3.0. For a
|
|
27
|
+
source build, check the files directly in the installed package directory:
|
|
29
28
|
|
|
30
29
|
```sh
|
|
31
30
|
# Global npm installation:
|
|
@@ -40,9 +39,8 @@ Test-Path (Join-Path (npm root --global) 'session-peer/shorthand/sp.ps1')
|
|
|
40
39
|
Test-Path (Join-Path (npm root --prefix <prefix>) 'session-peer/shorthand/sp.ps1')
|
|
41
40
|
```
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
be activated from it.
|
|
42
|
+
If the file is missing, check the selected package path and installation
|
|
43
|
+
before activating `sp`. You can still use the `session-peer` command.
|
|
46
44
|
|
|
47
45
|
## Why activation is explicit
|
|
48
46
|
|
|
@@ -191,9 +189,10 @@ below the original, so this is a version replacement, not a registry upgrade),
|
|
|
191
189
|
and checks that `sp --version` and `session-peer --version` both report the
|
|
192
190
|
replacement. It then uninstalls the package and checks that both names fail as
|
|
193
191
|
command not found (Bash/zsh exit 127, PowerShell `CommandNotFoundException`) and
|
|
194
|
-
that deactivation removes `sp`.
|
|
195
|
-
|
|
196
|
-
|
|
192
|
+
that deactivation removes `sp`.
|
|
193
|
+
|
|
194
|
+
The fixture keeps both versions in the same prefix. It does not test moving the
|
|
195
|
+
command elsewhere on PATH, install globally, or edit a shell profile.
|
|
197
196
|
|
|
198
197
|
These are isolated fixtures, not live message or ACK evidence. Submission,
|
|
199
198
|
ownership, permissions and no-retry-on-unknown contracts remain those of the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "session-peer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"test": "npm run build && npm run test:types && node --import ./test/fixtures/isolate-env.mjs --experimental-strip-types --test --test-concurrency=1 test/*.test.ts",
|
|
45
45
|
"test:types": "tsc -p tsconfig.test.json",
|
|
46
46
|
"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/claude-profiles.test.ts test/reply-agent-binding.test.ts test/windows.test.ts test/windows-contract.test.ts test/windows-inspection.test.ts test/windows-process-tree.test.ts test/windows-storage.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 test/ssh-jump-windows.test.ts && node --import ./test/fixtures/isolate-env.mjs --experimental-strip-types --test --test-name-pattern=Windows.Codex.send.and.dry-run test/codex-storage.test.ts && node --import ./test/fixtures/isolate-env.mjs --experimental-strip-types --test test/current-version.test.ts test/receipt-protocol.test.ts test/receipt-state.test.ts test/receipt-collector.test.ts test/receipt-command.test.ts test/receipt-send.test.ts test/receipt-transport-boundaries.test.ts test/receipt-acl.test.ts test/receipt-cli.test.ts test/receipt-producer.test.ts",
|
|
47
|
+
"test:mcp": "npm run build && node --test packages/session-peer-mcp/test/stdio.test.mjs && node test/mcp-package-smoke.mjs",
|
|
47
48
|
"test:package": "npm run build && node --experimental-strip-types test/package-smoke.ts"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|