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/CONTRIBUTING.md +11 -1
- package/PARITY.md +416 -0
- package/README.ja.md +80 -91
- package/README.ko.md +81 -165
- package/README.md +80 -174
- package/README.zh-CN.md +76 -91
- package/RELEASING.md +130 -7
- package/SECURITY.md +3 -2
- package/UNICODE-LICENSE.txt +39 -0
- package/VALIDATION.md +251 -16
- package/dist/casefold.d.ts +2 -0
- package/dist/casefold.js +9 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +87 -30
- package/dist/diagnostics.d.ts +21 -0
- package/dist/diagnostics.js +231 -0
- package/dist/discovery.d.ts +22 -1
- package/dist/discovery.js +199 -50
- package/dist/help.d.ts +1 -0
- package/dist/help.js +50 -0
- package/dist/output.d.ts +2 -0
- package/dist/output.js +43 -0
- package/dist/process.d.ts +1 -0
- package/dist/process.js +14 -2
- package/dist/protocol.d.ts +2 -2
- package/dist/protocol.js +11 -2
- package/dist/send.d.ts +8 -0
- package/dist/send.js +38 -18
- package/dist/windows.d.ts +2 -0
- package/dist/windows.js +30 -3
- package/dist/writer.d.ts +34 -3
- package/dist/writer.js +140 -69
- package/docs/api.md +30 -0
- package/docs/guide.ja.md +208 -0
- package/docs/guide.ko.md +294 -0
- package/docs/guide.md +324 -0
- package/docs/guide.zh-CN.md +204 -0
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -1,201 +1,107 @@
|
|
|
1
1
|
# session-peer (TypeScript)
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
+
[](https://www.npmjs.com/package/session-peer)
|
|
4
|
+
[](https://www.npmjs.com/package/session-peer)
|
|
5
|
+
[](https://www.npmjs.com/package/session-peer)
|
|
6
|
+
[](https://github.com/abruption/session-peer-ts/actions/workflows/ci.yml)
|
|
7
|
+
[](https://www.npmjs.com/package/session-peer)
|
|
8
|
+
[](LICENSE)
|
|
23
9
|
|
|
24
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
44
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
90
|
-
`--
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
34
|
+
## Quick Start
|
|
97
35
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
|
151
|
-
|
|
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
|
-
|
|
159
|
-
|
|
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
|
-
|
|
57
|
+
### Update
|
|
174
58
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
|
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
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
-
[
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
[](https://www.npmjs.com/package/session-peer)
|
|
4
|
+
[](https://www.npmjs.com/package/session-peer)
|
|
5
|
+
[](https://www.npmjs.com/package/session-peer)
|
|
6
|
+
[](https://github.com/abruption/session-peer-ts/actions/workflows/ci.yml)
|
|
7
|
+
[](https://www.npmjs.com/package/session-peer)
|
|
8
|
+
[](LICENSE)
|
|
21
9
|
|
|
22
|
-
|
|
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
|
-
|
|
16
|
+
**发现正在运行的 Claude Code 和 Codex 会话,并在本机或通过 SSH 发送消息。**
|
|
17
|
+
这是不需要 Python 的 Node.js 客户端。包名与命令名均为 `session-peer`。
|
|
45
18
|
|
|
46
|
-
|
|
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
|
|
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
|
-
|
|
28
|
+
`--dry-run` 仅验证,不提交。实际发送时移除同一命令中的 `--dry-run`,执行一次。
|
|
29
|
+
需要确认时,请明确要求回复。**`posted` / `queued` 仅表示提交,不代表消费或 ACK。**
|
|
30
|
+
遇到 `unknown` (`submitted:null`)、没有回复或目标退出时,不要自动重试。
|
|
31
|
+
`consumptionConfirmed` 始终为 false,请在接收方 TUI 中确认实际回复。
|
|
58
32
|
|
|
59
|
-
|
|
33
|
+
## Quick Start
|
|
60
34
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
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
|
|
89
|
-
|
|
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
|
-
|
|
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
|
-
|
|
105
|
-
npm install --global --ignore-scripts session-peer@0.1.0-preview.1
|
|
106
|
-
```
|
|
55
|
+
### Update
|
|
107
56
|
|
|
108
|
-
|
|
57
|
+
使用 npm 更新由 npm 管理的安装。先检查标签并审阅目标版本,再安装指定版本。
|
|
58
|
+
下面示例将旧 npm 安装更新至 0.2.1。CLI 没有自更新命令。
|
|
109
59
|
|
|
110
60
|
```sh
|
|
111
|
-
npm
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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),并移除凭据、消息内容和个人路径。
|