session-peer 0.1.0 → 0.2.1

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/README.md CHANGED
@@ -1,201 +1,107 @@
1
1
  # session-peer (TypeScript)
2
2
 
3
- [English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
4
-
5
- <!-- docs-contract: stable-release-source; package=session-peer; bin=session-peer; node=22.13+/24; python-reference=1.0.2 -->
6
-
7
- Send messages to running **Claude Code and Codex sessions**, locally or on
8
- another machine over SSH. This TypeScript client runs on Node.js without Python.
9
-
10
- **0.1.0 stable release source; publication requires separate approval.** Package name:
11
- `session-peer`. CLI command: **`session-peer`**. This project does not provide
12
- a Relay server or hosted service.
13
-
14
- ## What it does
15
-
16
- - Discover local sessions and explicitly selected Codex homes.
17
- - Validate a destination with `--dry-run`, then submit one message to its native
18
- inbox or queue. Codex requires a unique, stable live writer.
19
- - Use the same commands over SSH to an explicitly installed remote client.
20
- - Accept structured Reply-To URIs as destinations and provide JSON results.
21
- - Refuse ambiguous targets and uncertain ownership; never automatically retry
22
- an uncertain submission.
3
+ [![npm version](https://img.shields.io/npm/v/session-peer?logo=npm)](https://www.npmjs.com/package/session-peer)
4
+ [![npm downloads per week](https://img.shields.io/npm/dw/session-peer?logo=npm)](https://www.npmjs.com/package/session-peer)
5
+ [![npm downloads per month](https://img.shields.io/npm/dm/session-peer?logo=npm)](https://www.npmjs.com/package/session-peer)
6
+ [![CI](https://github.com/abruption/session-peer-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/abruption/session-peer-ts/actions/workflows/ci.yml)
7
+ [![Node support](https://img.shields.io/node/v/session-peer?logo=node.js)](https://www.npmjs.com/package/session-peer)
8
+ [![MIT license](https://img.shields.io/npm/l/session-peer)](LICENSE)
23
9
 
24
- Not implemented: Relay transport, MCP, wake/resume, inactive queueing,
25
- Antigravity, automatic updates, implicit multi-agent discovery, or human text
26
- output. Unsupported commands fail explicitly; this is not a general orchestrator.
10
+ <sub>npm download statistics can lag behind package publication.</sub>
27
11
 
28
- ## Requirements
29
-
30
- macOS, Linux or native Windows; Node **22.13+ within 22.x or 24.x**. Node 26 is not supported.
31
- The native flock dependency needs a matching prebuilt binary (x64/arm64); this
32
- is not a pure-JavaScript package. Codex sends need `codex`; macOS/Linux also
33
- need `lsof` and `ps`. Windows uses native lock and Restart Manager inspection.
34
- Claude needs a live TUI with an accessible native inbox. SSH requires OpenSSH,
35
- existing key/host trust and the **same client version** on the destination.
36
-
37
- ## Install
12
+ [English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
38
13
 
39
- The verified `0.1.0-preview.1` is public. To evaluate the reviewed `0.1.0`
40
- source before stable publication, build it and optionally install its local
41
- tarball:
14
+ <!-- docs-contract: stable-release-source; package=session-peer; bin=session-peer; node=22.13+/24; python-reference=1.0.2 -->
42
15
 
43
- ```sh
44
- git clone https://github.com/abruption/session-peer-ts.git
45
- cd session-peer-ts
46
- npm ci --ignore-scripts
47
- npm run build
48
- node dist/cli.js --version
49
- npm pack --ignore-scripts
50
- # Optional global install: first check which session-peer your PATH selects.
51
- npm install --global --ignore-scripts ./session-peer-0.1.0.tgz
52
- session-peer --version
53
- ```
16
+ **Find and message running Claude Code and Codex sessions, locally or over SSH.**
17
+ A Node.js client that runs without Python. Package and command: `session-peer`.
54
18
 
55
- Expected: `session-peer 0.1.0 (typescript)`. Keep the `./...tgz` path to
56
- select the locally built candidate. Use an explicit version for registry
57
- installation until the stable release has been approved and verified.
58
-
59
- ### Existing installations
60
-
61
- Other implementations may also install `session-peer`. Check `type -a session-peer`
62
- and `command -v session-peer` before and after installation. Choose one on PATH,
63
- or call this build explicitly with `node /absolute/path/dist/cli.js`. Do not use
64
- `--force` to overwrite another manager's files. No Python package, skill or service
65
- is installed, removed or reconfigured automatically. To remove this npm install,
66
- run `npm uninstall --global session-peer` and recheck PATH.
67
-
68
- On Windows PowerShell, inspect competing commands with
69
- `Get-Command session-peer -All`. To avoid replacing the Python CLI, use an isolated prefix:
70
-
71
- ```powershell
72
- npm ci --ignore-scripts
73
- npm run build
74
- npm pack --ignore-scripts
75
- npm install --prefix "$env:TEMP\session-peer-ts-candidate" --ignore-scripts .\session-peer-0.1.0.tgz
76
- & "$env:TEMP\session-peer-ts-candidate\node_modules\.bin\session-peer.cmd" --version
77
- # Later: npm uninstall --prefix "$env:TEMP\session-peer-ts-candidate" session-peer
78
- ```
19
+ ## Demo
79
20
 
80
- ## Use
21
+ After installation, list sessions and replace `CLAUDE_PID` with the exact PID you selected:
81
22
 
82
23
  ```sh
83
24
  session-peer list --agent claude --json
84
- session-peer list --agent codex --codex-home "$HOME/.codex" --json
85
- session-peer send --to CLAUDE_PID --message 'Please review the API contract.' --dry-run --json
86
- session-peer send --to codex:THREAD_UUID --codex-home "$HOME/.codex" --message 'Please review the API contract.' --dry-run --json
25
+ session-peer send --to CLAUDE_PID --message 'Please review the API contract and reply.' --dry-run --json
87
26
  ```
88
27
 
89
- Remove `--dry-run` only when delivery is intended. Omit `--message` or use
90
- `--message -` for UTF-8 stdin. `--all` includes stale/archived records for listing;
91
- it does not authorize sending. Claude accepts a PID, `claude:PID`, or an
92
- unambiguous ASCII name, case-insensitively. Use a PID for Unicode names. Codex
93
- requires a full UUID and explicit home; `--codex-bin` selects an executable.
94
- Output requires `--json` or `--output-format json`.
28
+ `--dry-run` validates without submitting. To send, run the command once without
29
+ `--dry-run`. Ask for an explicit reply when you need acknowledgement.
30
+ **`posted` / `queued` means submitted, not consumed or ACKed.** `unknown`
31
+ (`submitted:null`), no reply or a target exit must not trigger automatic retries.
32
+ `consumptionConfirmed` is always false; verify a reply in the receiver’s TUI.
95
33
 
96
- ### Another machine over SSH
34
+ ## Quick Start
97
35
 
98
- ```sh
99
- session-peer send --host user@machine --remote-bin /absolute/path/session-peer \
100
- --to CLAUDE_PID --message 'Please review the API contract.' --dry-run --json
101
- ```
36
+ Requires macOS, Linux or Windows, **Node 22.13+ within 22.x or 24.x**, and a
37
+ matching native prebuilt dependency (x64/arm64). Claude needs a live TUI inbox;
38
+ Codex needs its CLI and a verifiable writer (also `lsof`/`ps` on macOS/Linux).
39
+ SSH requires existing key/host trust and the **same TypeScript client version**
40
+ on both machines. See the guide for platform requirements and inactive queueing.
102
41
 
103
- The default remote command is `session-peer` on remote PATH. An absolute
104
- `--remote-bin` can select a wrapper using supported Node. The handshake checks
105
- the TypeScript marker and exact version; a different implementation is refused.
106
- SSH uses BatchMode and StrictHostKeyChecking. It never accepts new host keys,
107
- installs a remote runtime or invokes Python as a fallback. Messages travel in a
108
- JSON stdin request, not remote shell arguments. Arbitrary `--ssh-opt`, IPv6
109
- literals and Tailscale canonical-name enrichment are not supported; use an SSH
110
- alias/hostname. Forward access does not establish reverse access.
111
-
112
- For a Windows SSH destination, add `--remote-platform win32` and select a
113
- Windows `--remote-bin 'C:\absolute\path\session-peer.cmd'` if needed. A previously
114
- authenticated OpenSSH control socket can be selected with
115
- `--ssh-control-path /absolute/local/socket`; this does not bypass host-key
116
- verification or grant a new login. For local Windows Codex commands, use a full
117
- `C:\Users\...\.codex` path for `--codex-home`. The Python CLI, if present,
118
- is not removed or replaced by this client.
119
-
120
- ### Replies
121
-
122
- Use a `session-peer://v1/reply?...` URI as `--to`. Unknown/duplicate fields,
123
- unsafe hosts, malformed encoding and conflicting explicit routes are rejected.
124
- `--reply-address URI` adds an explicit return address; no route is inferred or
125
- verified automatically. Use `--no-reply-to` when replying without a new address.
126
- A valid CODEX_THREAD_ID/CODEX_SESSION_ID supplies informational From metadata;
127
- `--no-from` omits it. Unknown senders are not invented. Peer metadata is never
128
- authority, and a Reply-To URI is never executed as shell text.
129
-
130
- ## What success means
131
-
132
- | Result | Meaning |
133
- | --- | --- |
134
- | `validated`, `submitted:false` | Dry-run checks passed; nothing sent. |
135
- | `posted` / `queued` | Native inbox write / queue acceptance, **not consumption or ACK**. |
136
- | `refused`, `submitted:false` | Rejected before submission. |
137
- | `unknown`, `submitted:null` | Submission may have happened; do not automatically resend. |
138
-
139
- `consumptionConfirmed` is always false. Verify an actual ACK separately in the
140
- receiver's TUI, not from queueing or transcript polling. Exit codes are 0/1/2
141
- for success/error/usage. Errors use fixed codes instead of raw native stderr or
142
- message content. Codex uses real kernel flock, file identity and same-user owner
143
- start time across samples, then revalidates before queueing. No lock is deleted
144
- and no owning agent process is signaled. Discovery output still contains local
145
- names/paths/IDs: redact it before sharing.
146
-
147
- ## Development and verification
42
+ ### Install
43
+
44
+ The [Python CLI](https://github.com/abruption/session-peer) uses the same command.
45
+ Check `type -a session-peer` on macOS/Linux or `Get-Command session-peer -All`
46
+ in PowerShell before installing. Choose the intended PATH entry; do not use
47
+ `--force` to overwrite another manager’s files.
148
48
 
149
49
  ```sh
150
- npm ci --ignore-scripts
151
- npm run build
152
- node scripts/check-repository.mjs
153
- SESSION_PEER_PYTHON_ROOT=/path/to/python-reference npm test
154
- npm run test:package
155
- npm audit
50
+ npm install --global --ignore-scripts session-peer@0.2.1
51
+ session-peer --version
156
52
  ```
157
53
 
158
- Python is only the development conformance oracle (v1.0.2 commit
159
- `47c23713d0a2a3c11ebde6186afd8c43489b8b65`), never a runtime dependency. Tests also
160
- need a C compiler and lsof for the POSIX contract suite. CI pins the reference
161
- and covers macOS/Linux/Windows × Node 22/24. Temporary
162
- SQLite, Unix inbox and real lock fixtures are distinct from
163
- the dedicated real-TUI evidence in [VALIDATION.md](VALIDATION.md). A green fixture
164
- test is not an ACK. Package tests inspect contents, repeat-pack hashes, clean
165
- install and uninstall. The native dependency normally has an install script;
166
- the verified prebuilt path uses `--ignore-scripts`. SQLite read-only readers may
167
- participate in WAL shared-memory bookkeeping; they are not snapshots.
168
-
169
- See [CONTRIBUTING.md](CONTRIBUTING.md), [RELEASING.md](RELEASING.md) and
170
- [SECURITY.md](SECURITY.md). Publication requires separate approval; no automatic
171
- npm publish is enabled. Licensed under [MIT](LICENSE).
54
+ Expected: `session-peer 0.2.1 (typescript)`. For isolated installation, source
55
+ builds, Windows and removal, see the detailed guide below.
172
56
 
173
- ## npm release installation
57
+ ### Update
174
58
 
175
- The public preview passed registry integrity, provenance, signature and
176
- fresh-install checks. Install it by exact version. Before stable promotion,
177
- unversioned installs select the older `0.1.0-preview.0` marked `latest`:
59
+ Use npm for an npm-managed installation. Check the available tags and review
60
+ the target version, then install that exact version; this example updates an
61
+ older npm installation to 0.2.1. The CLI has no self-update command.
178
62
 
179
63
  ```sh
180
- npm install --global --ignore-scripts session-peer@0.1.0-preview.1
181
- ```
182
-
183
- Only after the separately approved `0.1.0` stage is published and verified,
184
- install the stable version by exact number:
185
-
186
- ```sh
187
- npm install --global --ignore-scripts session-peer@0.1.0
64
+ npm view session-peer dist-tags
65
+ npm install --global --ignore-scripts session-peer@0.2.1
188
66
  session-peer --version
189
67
  ```
190
68
 
191
- The manual workflow uses Trusted Publisher OIDC staging and requires a
192
- maintainer's 2FA approval; a staged upload is not a public release. See
193
- [RELEASING.md](RELEASING.md).
194
-
195
- ## Related project
196
-
197
- [Python session-peer](https://github.com/abruption/session-peer) is maintained
198
- and released independently; its own optional features and installation guide
199
- remain there (for example `pipx install session-peer`). Its command is also
200
- `session-peer`, so apply the PATH guidance above. This client does not depend on
201
- that installation or claim complete feature/flag parity.
69
+ The companion skill is installed and updated separately; npm installation
70
+ does not install a skill. Review its pinned-source instructions in the guide.
71
+
72
+ <!-- Preserve links to the former detailed sections; their contents are in the guide. -->
73
+ <a id="cli-usability-in-020"></a>
74
+ <a id="what-it-does"></a>
75
+ <a id="unified-listing-in-020"></a>
76
+ <a id="requirements"></a>
77
+ <a id="build-from-source"></a>
78
+ <a id="existing-installations"></a>
79
+ <a id="use"></a>
80
+ <a id="another-machine-over-ssh"></a>
81
+ <a id="replies"></a>
82
+ <a id="what-success-means"></a>
83
+ <a id="development-and-verification"></a>
84
+ <a id="package-release"></a>
85
+ <a id="related-project"></a>
86
+ <a id="read-only-diagnostics-in-020"></a>
87
+ <a id="agent-skill-explicit-installation"></a>
88
+
89
+ ## Docs
90
+
91
+ - [User guide](docs/guide.md) — CLI options, discovery, Codex homes, SSH, replies, installation variants and skill setup.
92
+ - [API reference (English)](docs/api.md).
93
+ - [Compatibility, migration and planned features](PARITY.md).
94
+ - [Release evidence and platform validation](VALIDATION.md).
95
+ - [Development and contributions](CONTRIBUTING.md).
96
+ - [Release process](RELEASING.md).
97
+
98
+ ## License
99
+
100
+ Licensed under the [MIT License](LICENSE).
101
+
102
+ ## Support and security
103
+
104
+ For usage questions and reproducible bugs, [open an issue](https://github.com/abruption/session-peer-ts/issues).
105
+ For vulnerabilities, use [private reporting](https://github.com/abruption/session-peer-ts/security/advisories/new)
106
+ or [support@abruption.dev](mailto:support@abruption.dev?subject=%5Bsession-peer-ts%5D%20Security).
107
+ Read [SECURITY.md](SECURITY.md) and redact credentials, messages and personal paths.
package/README.zh-CN.md CHANGED
@@ -1,119 +1,104 @@
1
1
  # session-peer (TypeScript)
2
2
 
3
- [English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
4
-
5
- <!-- docs-contract: stable-release-source; package=session-peer; bin=session-peer; node=22.13+/24; python-reference=1.0.2 -->
6
-
7
- 向正在运行的 **Claude Code 和 Codex 会话**发送消息,支持本机和跨机器 SSH。这是运行于 Node.js 的 TypeScript 客户端,不需要 Python。
8
-
9
- **0.1.0 稳定版发布源码,正式发布需另行批准。**包名为 `session-peer`,CLI 命令为 **`session-peer`**。本项目不提供 Relay 服务器或托管服务。
10
-
11
- ## 功能与边界
12
-
13
- - 发现本机会话以及显式指定的 Codex home。
14
- - 先用 `--dry-run` 验证目标,再向原生 inbox / queue 提交一次消息。Codex 要求唯一且稳定的活跃 writer。
15
- - 通过 SSH 调用远端已安装的同版本客户端,支持结构化 Reply-To URI 和 JSON 输出。
16
- - 目标或进程归属不明确时拒绝操作;不会自动重试结果不确定的提交。
17
-
18
- 未实现 Relay 传输、MCP、wake/resume、非活跃会话排队、Antigravity、自动更新、隐式多代理发现及面向人的文本输出。不支持的命令会明确失败;这不是通用编排器。
19
-
20
- ## 环境要求
3
+ [![npm 版本](https://img.shields.io/npm/v/session-peer?logo=npm)](https://www.npmjs.com/package/session-peer)
4
+ [![npm 每周下载](https://img.shields.io/npm/dw/session-peer?logo=npm)](https://www.npmjs.com/package/session-peer)
5
+ [![npm 每月下载](https://img.shields.io/npm/dm/session-peer?logo=npm)](https://www.npmjs.com/package/session-peer)
6
+ [![CI](https://github.com/abruption/session-peer-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/abruption/session-peer-ts/actions/workflows/ci.yml)
7
+ [![Node 支持](https://img.shields.io/node/v/session-peer?logo=node.js)](https://www.npmjs.com/package/session-peer)
8
+ [![MIT 许可证](https://img.shields.io/npm/l/session-peer)](LICENSE)
21
9
 
22
- macOS、Linux 或 Windows native;Node **22.x 中的 22.13 及以上,或 24.x**。不支持 Node 26。原生锁依赖需要匹配的 x64/arm64 预编译二进制,本包不是纯 JavaScript 实现。Codex 发送需要 `codex`,macOS/Linux 还需要 `lsof`、`ps`;Windows 使用原生锁和 Restart Manager 验证所有者。Claude 需要运行中的 TUI 及可访问的原生 inbox。SSH 使用已有密钥和主机信任,远端必须安装**同版本**客户端。
10
+ <sub>npm 下载统计可能晚于软件包发布才更新。</sub>
23
11
 
24
- ## 安装
25
-
26
- 已验证的 `0.1.0-preview.1` 已公开。稳定版发布前评估经审查的 `0.1.0` 源码时,请构建源码,并按需安装本地 tarball:
27
-
28
- ```sh
29
- git clone https://github.com/abruption/session-peer-ts.git
30
- cd session-peer-ts
31
- npm ci --ignore-scripts
32
- npm run build
33
- node dist/cli.js --version
34
- npm pack --ignore-scripts
35
- # 可选:全局安装前先检查 PATH 选择的现有命令
36
- npm install --global --ignore-scripts ./session-peer-0.1.0.tgz
37
- session-peer --version
38
- ```
39
-
40
- 预期输出:`session-peer 0.1.0 (typescript)`。保留 `./...tgz` 路径以选择本地候选产物。在稳定版获批并完成验证之前,从注册表安装时请指定准确版本。
12
+ [English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
41
13
 
42
- ### 与已有安装共存
14
+ <!-- docs-contract: stable-release-source; package=session-peer; bin=session-peer; node=22.13+/24; python-reference=1.0.2 -->
43
15
 
44
- 安装前后用 `type -a session-peer` 和 `command -v session-peer` 检查实际执行项。其他实现也可能提供同名命令;请选择 PATH 上的一种,或显式运行 `node /absolute/path/dist/cli.js`。不要用 `--force` 覆盖其他管理器的文件。本包不会自动安装、删除或调整 Python 包、技能或服务。卸载使用 `npm uninstall --global session-peer`,随后再次检查 PATH。
16
+ **发现正在运行的 Claude Code 和 Codex 会话,并在本机或通过 SSH 发送消息。**
17
+ 这是不需要 Python 的 Node.js 客户端。包名与命令名均为 `session-peer`。
45
18
 
46
- 在 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-candidate" --ignore-scripts .\session-peer-0.1.0.tgz` 安装到隔离目录。以 `& "$env:TEMP\session-peer-ts-candidate\node_modules\.bin\session-peer.cmd" --version` 验证,并可用 `npm uninstall --prefix "$env:TEMP\session-peer-ts-candidate" session-peer` 卸载。
19
+ ## Demo
47
20
 
48
- ## 使用
21
+ 安装后列出会话,将 `CLAUDE_PID` 替换为选中的准确 PID:
49
22
 
50
23
  ```sh
51
24
  session-peer list --agent claude --json
52
- session-peer list --agent codex --codex-home "$HOME/.codex" --json
53
- session-peer send --to CLAUDE_PID --message 'Please review the API contract.' --dry-run --json
54
- session-peer send --to codex:THREAD_UUID --codex-home "$HOME/.codex" --message 'Please review the API contract.' --dry-run --json
25
+ session-peer send --to CLAUDE_PID --message '请检查 API 契约并回复。' --dry-run --json
55
26
  ```
56
27
 
57
- 只有确定要投递时才移除 `--dry-run`。省略 `--message` 或使用 `--message -` 会读取 UTF-8 stdin。`--all` 仅让列表包含陈旧 / 已归档记录,不授予发送权限。Claude 支持 PID、`claude:PID` 或唯一的 ASCII 名称(不区分大小写);Unicode 名称请改用 PID。Codex 需要完整 UUID 和显式 home;`--codex-bin` 可指定可执行文件。输出必须选择 `--json` 或 `--output-format json`。
28
+ `--dry-run` 仅验证,不提交。实际发送时移除同一命令中的 `--dry-run`,执行一次。
29
+ 需要确认时,请明确要求回复。**`posted` / `queued` 仅表示提交,不代表消费或 ACK。**
30
+ 遇到 `unknown` (`submitted:null`)、没有回复或目标退出时,不要自动重试。
31
+ `consumptionConfirmed` 始终为 false,请在接收方 TUI 中确认实际回复。
58
32
 
59
- ### 跨机器 SSH
33
+ ## Quick Start
60
34
 
61
- ```sh
62
- session-peer send --host user@machine --remote-bin /absolute/path/session-peer \
63
- --to CLAUDE_PID --message 'Please review the API contract.' --dry-run --json
64
- ```
65
-
66
- 默认远程命令是 PATH 中的 `session-peer`。绝对路径 `--remote-bin` 也可选择使用受支持 Node 的包装器。握手检查 TypeScript 标记及精确版本,不同实现会被拒绝。SSH 使用 BatchMode 和 StrictHostKeyChecking,不自动接受新主机密钥、不安装远程运行时,也不会退回 Python。消息通过 JSON stdin 传输,不放进远程 shell 参数。不支持任意 `--ssh-opt`、IPv6 字面量或 Tailscale 规范名补全,请使用 SSH 别名 / 主机名。正向访问不意味着反向访问已配置。
67
-
68
- 对于 Windows SSH 目标,请指定 `--remote-platform win32`;若远端 PATH 中没有命令,再使用 `--remote-bin 'C:\absolute\path\session-peer.cmd'`。可用 `--ssh-control-path /local/absolute/socket` 选择已认证的 OpenSSH 控制套接字;这不会跳过主机密钥验证或授予新登录。Windows 本机的 Codex home 使用完整 `C:\Users\...\.codex` 路径。已有 Python CLI 不会被自动删除或替换。
69
-
70
- ### 回复
71
-
72
- 可将 `session-peer://v1/reply?...` URI 用作 `--to`。未知 / 重复字段、不安全主机、错误编码及与显式路由的冲突都会被拒绝。`--reply-address URI` 添加显式回信地址,不自动推断或验证回程。回复时不附加新地址可用 `--no-reply-to`。有效的 CODEX_THREAD_ID / CODEX_SESSION_ID 可提供参考性 From 信息,`--no-from` 可省略;不会虚构未知发送者。peer 元数据不是授权,Reply-To URI 也不会作为 shell 文本执行。
73
-
74
- ## 成功含义与安全性
75
-
76
- | 结果 | 含义 |
77
- | --- | --- |
78
- | `validated`, `submitted:false` | dry-run 检查通过,尚未发送。 |
79
- | `posted` / `queued` | inbox 已写入 / queue 已接受,**不是消费确认或 ACK**。 |
80
- | `refused`, `submitted:false` | 提交前被拒绝。 |
81
- | `unknown`, `submitted:null` | 可能已经提交,不要自动重发。 |
35
+ 需要 macOS/Linux/Windows、**Node 22.x 中的 22.13 及以上或 24.x**,以及匹配的
36
+ 原生预编译依赖(x64/arm64)。Claude 需要运行中的 TUI inbox;Codex 需要 CLI 和
37
+ 可验证的 writer(macOS/Linux 还需要 `lsof`、`ps`)。SSH 需要已有密钥、主机信任
38
+ 以及两端**同版本的 TypeScript 客户端**。平台要求与显式非活动队列提交见详细指南。
82
39
 
83
- `consumptionConfirmed` 始终为 false。必须在目标 TUI 中另行确认实际 ACK,不可由排队或轮询 transcript 推断。退出码 0/1/2 分别表示成功/错误/用法错误。错误只返回固定代码,不返回原生 stderr 或消息内容。Codex 使用真实内核 flock、文件身份和同用户进程开始时间进行多次核验,排队前再次检查。不删除 lock,也不向拥有它的代理进程发送信号。发现结果仍包含本地名称、路径、ID,分享前请脱敏。
40
+ ### Install
84
41
 
85
- ## 开发与验证
42
+ [Python CLI](https://github.com/abruption/session-peer)也使用同名命令。
43
+ 安装前,macOS/Linux 使用 `type -a session-peer`,PowerShell 使用
44
+ `Get-Command session-peer -All` 检查 PATH。选择所需实现,不要用 `--force`
45
+ 覆盖其他安装管理器的文件。
86
46
 
87
47
  ```sh
88
- npm ci --ignore-scripts
89
- npm run build
90
- node scripts/check-repository.mjs
91
- SESSION_PEER_PYTHON_ROOT=/path/to/python-reference npm test
92
- npm run test:package
93
- npm audit
48
+ npm install --global --ignore-scripts session-peer@0.2.1
49
+ session-peer --version
94
50
  ```
95
51
 
96
- Python 只用作开发时的兼容性基准(v1.0.2,`47c23713d0a2a3c11ebde6186afd8c43489b8b65`),不是运行时依赖。POSIX 契约测试还需要 C 编译器和 lsof。CI 固定基准提交,覆盖 macOS/Linux/Windows × Node 22/24。临时 SQLite、Unix inbox、真实锁 fixture 与 [VALIDATION.md](VALIDATION.md) 中专用真实 TUI 的证据分开记录;fixture 通过不是 ACK。包测试检查文件清单、重复打包哈希、全新安装与卸载。原生依赖通常有安装脚本,已验证的预编译路径使用 `--ignore-scripts`。SQLite 只读连接仍可能参与 WAL 共享内存管理,不能视为快照。
97
-
98
- 参见 [CONTRIBUTING.md](CONTRIBUTING.md)、[RELEASING.md](RELEASING.md) 和 [SECURITY.md](SECURITY.md)。发布需单独批准,未启用自动 npm 发布。采用 [MIT](LICENSE) 许可证。
99
-
100
- ## npm 发布后的安装
101
-
102
- 已公开的预览版通过了注册表完整性、provenance、签名及全新安装验证。稳定版升级前,未指定版本的安装会选中标记为 `latest` 的旧版 `0.1.0-preview.0`,因此请指定以下准确版本:
52
+ 预期输出:`session-peer 0.2.1 (typescript)`。隔离安装、源码构建、Windows 和
53
+ 卸载步骤见下方详细指南。
103
54
 
104
- ```sh
105
- npm install --global --ignore-scripts session-peer@0.1.0-preview.1
106
- ```
55
+ ### Update
107
56
 
108
- 待另行批准的 `0.1.0` staging 获公开并验证后,再按准确版本安装稳定版:
57
+ 使用 npm 更新由 npm 管理的安装。先检查标签并审阅目标版本,再安装指定版本。
58
+ 下面示例将旧 npm 安装更新至 0.2.1。CLI 没有自更新命令。
109
59
 
110
60
  ```sh
111
- npm install --global --ignore-scripts session-peer@0.1.0
61
+ npm view session-peer dist-tags
62
+ npm install --global --ignore-scripts session-peer@0.2.1
112
63
  session-peer --version
113
64
  ```
114
65
 
115
- 手动工作流通过 Trusted Publisher OIDC 上传至 staging,由维护者使用 2FA 批准。staging 成功不代表已经公开发布。参见 [RELEASING.md](RELEASING.md)。
116
-
117
- ## 相关项目
118
-
119
- [Python session-peer](https://github.com/abruption/session-peer) 独立维护和发布,其可选功能与安装指南(例如 `pipx install session-peer`)见该项目。同样使用 `session-peer` 命令,请注意上述 PATH 规则。本客户端不依赖该安装,也不承诺功能和参数完全对等。
66
+ 配套技能需单独安装和更新;npm 安装不会安装技能。请参阅指南中固定提交的技能安装步骤。
67
+
68
+ <!-- Preserve links to the former detailed sections; their contents are in the guide. -->
69
+ <a id="功能与边界"></a>
70
+ <a id="020-统一列表"></a>
71
+ <a id="020-cli-易用性"></a>
72
+ <a id="环境要求"></a>
73
+ <a id="安装"></a>
74
+ <a id="从源码构建"></a>
75
+ <a id="与已有安装共存"></a>
76
+ <a id="使用"></a>
77
+ <a id="跨机器-ssh"></a>
78
+ <a id="回复"></a>
79
+ <a id="成功含义与安全性"></a>
80
+ <a id="开发与验证"></a>
81
+ <a id="npm-版本"></a>
82
+ <a id="相关项目"></a>
83
+ <a id="020-只读诊断"></a>
84
+ <a id="显式安装代理技能"></a>
85
+
86
+ ## Docs
87
+
88
+ - [用户指南](docs/guide.zh-CN.md) — CLI 选项、发现、Codex home、SSH、回复、安装方式和技能设置.
89
+ - [API 参考(英文)](docs/api.md).
90
+ - [兼容性、迁移和功能计划](PARITY.md).
91
+ - [发布证据与平台验证](VALIDATION.md).
92
+ - [开发与贡献](CONTRIBUTING.md).
93
+ - [发布流程](RELEASING.md).
94
+
95
+ ## License
96
+
97
+ 采用 [MIT 许可证](LICENSE)。
98
+
99
+ ## Support and security
100
+
101
+ 使用问题和可复现的缺陷请提交到[议题](https://github.com/abruption/session-peer-ts/issues)。
102
+ 漏洞请使用[私密报告](https://github.com/abruption/session-peer-ts/security/advisories/new)或
103
+ [support@abruption.dev](mailto:support@abruption.dev?subject=%5Bsession-peer-ts%5D%20Security)。
104
+ 请阅读 [SECURITY.md](SECURITY.md),并移除凭据、消息内容和个人路径。