session-peer 0.3.2 → 0.3.4

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.zh-CN.md CHANGED
@@ -1,3 +1,5 @@
1
+ <div align="center">
2
+
1
3
  # session-peer (TypeScript)
2
4
 
3
5
  [![npm 版本](https://img.shields.io/npm/v/session-peer?logo=npm)](https://www.npmjs.com/package/session-peer)
@@ -13,11 +15,13 @@
13
15
 
14
16
  <!-- docs-contract: stable-release-source; package=session-peer; bin=session-peer; node=22.13+/24; python-reference=1.0.2 -->
15
17
 
16
- **文档和源码版本:0.3.2。** 使用以下固定版本 npm 命令前,请通过 npm 注册表或版本徽章确认 0.3.2 是否已发布。发布前,请使用已审核的源码检出版本或本地构建产物。构建和 SSH 两端需要相同的已审核版本。
18
+ **文档和源码版本:0.3.4。** 安装前,请审核所选发布版本和注册表元数据。按日期记录的准备与验证结果见 [VALIDATION.md](VALIDATION.md),发布流程见 [RELEASING.md](RELEASING.md)。SSH 两端必须使用相同的 TypeScript 客户端版本;0.3.3 与 0.3.4 会拒绝彼此的 SSH 预检。
17
19
 
18
20
  **发现正在运行的 Claude Code 和 Codex 会话,并在本机或通过 SSH 发送消息。**
19
21
  这是不需要 Python 的 Node.js 客户端。包名与命令名均为 `session-peer`。
20
22
 
23
+ </div>
24
+
21
25
  ## Demo
22
26
 
23
27
  ![TypeScript session-peer 0.2.1 的实际 Codex 与 Claude Code 请求和回复](https://raw.githubusercontent.com/abruption/session-peer-ts/main/docs/assets/session-peer-ts-v0.2.1-roundtrip.gif)
@@ -50,13 +54,15 @@ session-peer send --to CLAUDE_PID --message '请检查 API 契约并回复。' -
50
54
  `Get-Command session-peer -All` 检查 PATH。选择所需实现,不要用 `--force`
51
55
  覆盖其他安装管理器的文件。
52
56
 
57
+ **安装 0.3.4:** 运行 npm 安装或更新示例前,请确认注册表可用性并审核所选发布版本。如该版本不可用,请使用[已审核的源码构建](docs/guide.zh-CN.md#从源码构建)。
58
+
53
59
  ```sh
54
- npm view session-peer@0.3.2 version dist.integrity
55
- npm install --global --ignore-scripts session-peer@0.3.2
60
+ npm view session-peer@0.3.4 version dist.integrity
61
+ npm install --global --ignore-scripts session-peer@0.3.4
56
62
  session-peer --version
57
63
  ```
58
64
 
59
- 预期输出:`session-peer 0.3.2 (typescript)`。隔离安装、源码构建、Windows 和
65
+ 预期输出:`session-peer 0.3.4 (typescript)`。隔离安装、源码构建、Windows 和
60
66
  卸载步骤见下方详细指南。
61
67
 
62
68
  可选的 `sp` 简写包含在 0.3.0 及更高版本中(0.2.1 及更早版本没有),不会自动启用。
@@ -65,11 +71,11 @@ session-peer --version
65
71
  ### Update
66
72
 
67
73
  使用 npm 更新由 npm 管理的安装。先检查标签并审阅目标版本,再安装指定版本。
68
- 下面示例将旧 npm 安装更新至 0.3.2。CLI 不会安装更新,`session-peer update --check` 只做检查。
74
+ 下面示例将旧 npm 安装更新至所选的 0.3.4。CLI 不会安装更新,`session-peer update --check` 只做检查。
69
75
 
70
76
  ```sh
71
77
  npm view session-peer dist-tags
72
- npm install --global --ignore-scripts session-peer@0.3.2
78
+ npm install --global --ignore-scripts session-peer@0.3.4
73
79
  session-peer --version
74
80
  ```
75
81
 
package/RELEASING.md CHANGED
@@ -2,19 +2,134 @@
2
2
 
3
3
  Publication is manual. Merging, pushing, tagging or creating a GitHub release
4
4
  never dispatches `publish.yml`. Python session-peer and its Relay release train
5
- remain independent. The npm Trusted Publisher for `abruption/session-peer-ts`,
6
- `publish.yml`, environment `npm` allows `npm stage publish` only. The workflow
5
+ remain independent. The last directly verified npm Trusted Publisher mapping
6
+ for `abruption/session-peer-ts`, `publish.yml`, environment `npm` allowed
7
+ `npm stage publish` only. Stage-only permission remains the required policy;
8
+ the historical 0.3.2 settings-read exception is recorded below. The workflow
7
9
  uses OIDC and no npm token. The protected GitHub environment requires a reviewer
8
10
  and permits deployments from `main` only.
9
11
 
10
- ## 0.3.2 release procedure
12
+ ## 0.3.4 stable preparation — 2026-10-12 KST
13
+
14
+ The patch integrates [PR #134](https://github.com/abruption/session-peer-ts/pull/134), merged as `c210ee963741f77153df10038c28e228ea7a902f`: Windows native exit forwarding and independently published TS skill guidance. Draft #106–#109 and #82 are excluded. Preparation is not staging or publication approval.
15
+
16
+ Read-only registry baseline at this checkpoint: `latest=0.3.3`, `preview=0.1.0-preview.1`, and 0.3.4 absent. Previous stable integrity:
17
+ `sha512-5OQ7eUlR5Oy3RHFRoR3FuBkV7LT72dfjfBEbWRCY5wYP7Dz8TmN2jlRPpo2SFHPAwosFc0WIt8Iis/vyHckxRg==`.
18
+ Previous stable attestation metadata: `https://registry.npmjs.org/-/npm/v1/attestations/session-peer@0.3.3`.
19
+ The immutable public 0.3.3 source is `c0ed30273b9e9c0049df86ae3c38486a94289527`. Historical records below are retained.
20
+
21
+ 1. Review and merge this preparation, then require successful exact-main CI/release gate, CodeQL and Windows Node 22/24 for the resulting 40-character main SHA.
22
+ 2. Fresh authenticated reads must verify ownership, pending npm stages, stage-only Trusted Publisher mapping/permissions, package MFA and protected GitHub npm environment/reviewer/main-only restrictions. Recheck registry tags, previous integrity, provenance content/source and target absence. This preparation performs no authenticated publication settings audit; prior approvals/exceptions do not carry forward.
23
+ 3. Build and validate the exact-source archive, reproducible packing, isolated installation/removal and every packaged Markdown document. Apply the [artifact documentation gate](#documentation-gate-for-the-next-release); installation examples and runtime/banner/archive must agree on 0.3.4. Preserve historical/fixture and real-effect evidence boundaries.
24
+ 4. Obtain separate approval naming the exact merged main SHA, `session-peer@0.3.4`, `stable-stage` and eventual `latest` promotion to 0.3.4.
25
+ 5. Only then dispatch `publish.yml` with `source_sha=<approved SHA>`, `version=0.3.4`, `mode=stable-stage`, `confirmation=session-peer@0.3.4 stable-stage`. Review the retained Actions artifact before protected environment approval. Verify staged bytes and provenance, then obtain separate final npm 2FA approval. Never retry an uncertain upload or broaden publisher permissions.
26
+ 6. After publication, verify public integrity/provenance/signatures and isolated version/install/removal, and append a dated public record. Leave preview unchanged. Tags/GitHub Releases/fleet installation require their own decisions.
27
+
28
+ SSH endpoints must both use exactly 0.3.4 when testing this package; public 0.3.3 refuses its banner. Managers/operators own upgrades. No implicit provisioning, postinstall, automatic resend, delivery/ACK support or 0.4 feature promotion is introduced. TS skill metadata/full0.3.2, published pin8482cf6 and Python1.0.2 reference remain independent and unchanged.
29
+
30
+ ## 0.3.3 candidate preparation — #128 (2026-10-09 KST)
31
+
32
+ This dated checkpoint records preparation only. The candidate integrated reviewed
33
+ dependency heads
34
+ [PR #125](https://github.com/abruption/session-peer-ts/pull/125) (`d4c9138`),
35
+ [PR #127](https://github.com/abruption/session-peer-ts/pull/127) (`8c882fa`), and
36
+ [Draft PR #126](https://github.com/abruption/session-peer-ts/pull/126) (`f10b971`).
37
+ At this checkpoint all three remained open and unmerged; human review and merge
38
+ were required. Candidate integration did not establish an approved main release SHA.
39
+ No staging, publication, tag, GitHub Release or fleet rollout is authorized by
40
+ preparation [#128](https://github.com/abruption/session-peer-ts/issues/128).
41
+
42
+ The registry baseline checked at this checkpoint was **latest=0.3.2** and
43
+ **preview=0.1.0-preview.1**; 0.3.3 was the new target and was not published at that checkpoint.
44
+ Previous stable integrity:
45
+ `sha512-VNlzBqELXLFI8uCopfEdYrfweIacHeP6dMK32/4vwQJy8fUIKC64c5WCE3IwQVeCTKGMz9mXSxhzZnXmSGMuuA==`.
46
+ Previous stable attestation metadata:
47
+ `https://registry.npmjs.org/-/npm/v1/attestations/session-peer@0.3.2`.
48
+ Preserve the immutable public 0.3.2 source
49
+ `f335f07352c842f2f6ceb12bd2ca6274b52f69f7` and all historical evidence below.
50
+
51
+ 1. Review the exact dependency heads and companion guard profile before their
52
+ human merge gate. Review and merge the 0.3.3 preparation after its dependencies.
53
+ Require successful CI and release gate for the exact resulting 40-character
54
+ `main` SHA, including Windows Node 22/24; candidate-only checks do not qualify
55
+ a different main SHA. Record bounded strict SSH/native and metadata reader
56
+ evidence in VALIDATION.md without claiming ACK, consumption, general platform
57
+ qualification or 0.4 features.
58
+ 2. Perform fresh authenticated reads of package ownership, pending npm stages,
59
+ stage-only Trusted Publisher mapping/permissions, package MFA settings and
60
+ protected GitHub `npm` environment/reviewer/main restrictions. Recheck the
61
+ registry baseline, previous integrity, unchanged preview tag and absence of
62
+ 0.3.3. The historical 0.3.2 settings-read exception does **not** carry forward.
63
+ A reauthentication or unread setting leaves this gate incomplete.
64
+ 3. Build and verify the local candidate archive from that exact merged source,
65
+ including packed four-language documentation:
66
+ package, lockfile, runtime banner, examples and tarball must agree on 0.3.3;
67
+ archive documentation must describe its approved publication state, retain
68
+ dated historical records, and pass the artifact documentation gate. Record
69
+ source SHA, tarball integrity and validation without editing a validated
70
+ archive in place. See [artifact documentation policy](#documentation-gate-for-the-next-release).
71
+ 4. Obtain a separate approval naming that exact merged `main` SHA, **0.3.3**,
72
+ **stable-stage**, and promotion of `latest` to **0.3.3**. Preparation, dependency
73
+ review and previous release approvals do not authorize this action.
74
+ 5. Only after that approval dispatch `publish.yml` with `mode=stable-stage`,
75
+ `version=0.3.3`, `source_sha=<approved main SHA>` and
76
+ `confirmation=session-peer@0.3.3 stable-stage`. Download the prepare job’s
77
+ `npm-release-<SHA>` artifact and apply the documentation gate before protected
78
+ GitHub environment approval. Verify staged bytes against that retained
79
+ artifact and review provenance, then obtain the
80
+ **separate final npm 2FA approval** for publication and `latest` promotion.
81
+ Stop on uncertain staging outcomes and inspect the existing stage; do not
82
+ retry uploads or broaden publisher permissions.
83
+ 6. Verify public integrity, provenance/signatures, exact version and isolated
84
+ install/removal; record the new public checkpoint while keeping preview and
85
+ historical checkpoints intact. Only an **actually published** guard runtime
86
+ can precede separate successor skill finalization/tag/publication/pin updates.
87
+ Companion [Draft #20 design acceptance at `699a325`](https://github.com/abruption/session-peer-skill/blob/699a3251830c30c62d0f812363faf4d0eb0c8e0c/docs/typescript-compatibility.md)
88
+ records static review of exact #126 `ba18bb8` and release Draft #129
89
+ `bfb3d6f` on 2026-10-09; full heads/design hashes are recorded in the
90
+ [guard design](docs/design/typescript-skill-compatibility.md#exact-companion-design-acceptance--2026-10-09-kst). No tests were rerun in that review. At that
91
+ checkpoint, runtime and successor skill were unpublished. Design-only
92
+ acceptance does not authorize runtime merge/release, final successor skill
93
+ metadata/publication/installation or replace pin
94
+ `081cc3c1d16a394bd92824333f4bc61c36951799`.
95
+
96
+ 0.3.2 and 0.3.3 refuse each other's SSH version preflight. Operators and package
97
+ managers own coordinated endpoint upgrades; no postinstall, automatic deployment
98
+ or uncertain-send retry is introduced. Windows jump-host #20 and provisioning
99
+ #23 limitations remain; the Python 1.0.2 oracle and 0.4 proposals stay separate.
100
+
101
+ ## Public release checkpoint — 0.3.2 (2026-10-07 KST)
102
+
103
+ Public `session-peer@0.3.2` was verified with `latest=0.3.2` and unchanged
104
+ `preview=0.1.0-preview.1`; see [the dated record](VALIDATION.md#public-032--2026-10-07-kst).
105
+ Publication source: `f335f07352c842f2f6ceb12bd2ca6274b52f69f7`; stage-only run
106
+ `37571653938`; stage `2226865d-2dac-4d42-bd4e-2e1c998b9833`.
107
+ The Actions/staged/public bytes matched, and integrity, source provenance,
108
+ signature audit and isolated install/removal passed. This is not a GitHub
109
+ Release/tag or fleet rollout record.
110
+
111
+ The procedure below is historical for this completed publication. Do not
112
+ replay its approvals, stage 0.3.2 again or republish that version. A later
113
+ release needs a new baseline, exact source approval and validation.
114
+
115
+ ## Historical 0.3.2 release procedure and recorded exception
116
+
117
+ Public 0.3.2 publication completed **with a recorded exception to step 2**.
118
+ Authenticated ownership and pending stages, GitHub environment protection and
119
+ registry baselines were checked. Fresh Trusted Publisher permission and
120
+ package MFA settings reads requested reauthentication, and the operator
121
+ explicitly instructed skipping those two reads. No fresh confirmation of
122
+ either setting is claimed. Successful OIDC staging, protected environment
123
+ approval and separate npm 2FA publication are execution evidence; they do not
124
+ establish the skipped settings. This exception applies only to the historical
125
+ 0.3.2 release; future releases require their own checks and approvals.
11
126
 
12
127
  The release preparation is based on reviewed main `488ddddac302ba2ad0841061dc8df9187ff6a983`; 0.4 feature branches are excluded. The required pre-staging baseline is **0.3.1**, with `latest=0.3.1` and `preview=0.1.0-preview.1`; these are preconditions, not a permanent statement of registry state. Check the registry and dated validation record for publication status. Previous stable integrity is pinned to:
13
128
  `sha512-iZq06dbm6NavHuPZYMIxAnzQN5ksqm66yufpppddVWUYkuaG5TJvktbUXTSX7v3BBFnuybEJekI0KSaDo3Xfbg==`.
14
129
  Previous stable attestation metadata: `https://registry.npmjs.org/-/npm/v1/attestations/session-peer@0.3.1`. Historical records below remain historical.
15
130
 
16
131
  1. Review and merge the 0.3.2 preparation PR, then require successful CI and release gate for the exact merged main SHA, including Windows Node 22/24. Check the current deployment qualification evidence in VALIDATION.md; pending F5 evidence is not a pass.
17
- 2. Recheck package ownership/2FA, the npm environment reviewer/main-only policy, stage-only Trusted Publisher mapping, and authenticated pending stages. Require 0.3.2 absent, `latest=0.3.1`, unchanged preview tag/integrity and the pinned public 0.3.1 integrity/provenance.
132
+ 2. Required preflight: recheck package ownership/2FA, npm environment protection, stage-only Trusted Publisher permissions and authenticated pending stages; verify registry baselines. Historical 0.3.2 execution: ownership, authenticated stages, environment protection and registry baselines were checked; fresh Trusted Publisher permissions and package MFA settings reads were explicitly skipped under the recorded operator exception above. Those two reads are not marked complete.
18
133
  3. Obtain separate approval naming the exact merged 40-character main SHA, **0.3.2**, **stable-stage**, and promotion of `latest` to 0.3.2. Preparation approval and previous release approvals do not authorize staging or publication.
19
134
  4. Only after that approval, dispatch publish.yml with `mode=stable-stage`, `version=0.3.2`, `source_sha=<approved main SHA>` and `confirmation=session-peer@0.3.2 stable-stage`. Review the staged artifact and complete separate npm 2FA approval before publication.
20
135
 
package/SECURITY.md CHANGED
@@ -14,7 +14,7 @@ homes, SQLite DBs, transcripts, browser profiles or .env files. Rotate exposed
14
14
  secrets with their provider; deleting a comment does not revoke a secret.
15
15
 
16
16
  Review is manual and best-effort, with no response or fix deadline. The project is
17
- a published npm client, with 0.3.1 release evidence in [VALIDATION.md](VALIDATION.md#public-031--2026-10-04-kst).
17
+ a published npm client, with 0.3.2 release evidence in [VALIDATION.md](VALIDATION.md#public-032--2026-10-07-kst).
18
18
  Reports on published versions and source commits are welcome; no maintenance
19
19
  window or backport promise exists. English and Korean reports are welcome. Disclosure
20
20
  is coordinated with the reporter; private reports are not automatically public.
package/VALIDATION.md CHANGED
@@ -1,4 +1,200 @@
1
- # Validation record — updated 2026-10-07 KST
1
+ # Validation record — updated 2026-10-12 KST
2
+
3
+ ## 0.3.4 artifact documentation correction — 2026-10-12 KST
4
+
5
+ The approved-source prepare run [38193012263](https://github.com/abruption/session-peer-ts/actions/runs/38193012263) at `1c99b39138c26a5ec08245f78f133d058bc354f0` passed tests/packaging and produced the same bytes as the local archive, SHA-256 `a0026b157ca9444931243cb60416ac24ad773bd118425852650e6671a545d773`. Independent packaged-document review then found stale current-description text in the skill design and PARITY: the package compiled VERSION was 0.3.4, but those paragraphs still said 0.3.3 and marked the added row as an unreleased proposal without clearly restricting it to PR #134 history.
6
+
7
+ The artifact documentation gate therefore failed. The workflow was cancelled before protected environment approval: prepare succeeded, publish was cancelled, and no npm upload or public publication occurred. The rejected archive and Actions manifest are retained for comparison; they were not edited in place. The correction describes current source/package VERSION 0.3.4 while explicitly retaining the original PR #134 checkpoint as history. Runtime logic, finite profile values, metadata/pins, release baseline and all other packaged documents are unchanged.
8
+
9
+ A new reviewed source and artifact require fresh exact-source staging approval. The earlier approved SHA and settings-read exception remain external historical records, not authority to stage changed bytes. No new publication result is claimed here.
10
+
11
+ ## 0.3.4 preparation checkpoint — 2026-10-12 KST
12
+
13
+ Base main: `c210ee963741f77153df10038c28e228ea7a902f`, merged [PR #134](https://github.com/abruption/session-peer-ts/pull/134). Exact base main CLI [38191285491](https://github.com/abruption/session-peer-ts/actions/runs/38191285491) and CodeQL [38191285293](https://github.com/abruption/session-peer-ts/actions/runs/38191285293) completed successfully, including Windows Node 22/24. Draft 0.4 PR #106–#109 and experimental #82 are excluded. This is preparation, not approval to stage or publish.
14
+
15
+ Candidate source/package/banner/installation examples are 0.3.4. The registry read at this checkpoint was `latest=0.3.3`, `preview=0.1.0-preview.1`, 0.3.4 absent; previous stable integrity is the public value recorded below. This read does not establish authenticated pending stages, package MFA or Trusted Publisher settings.
16
+
17
+ Local macOS arm64, Node 24.16.0/npm 11.15.0:
18
+
19
+ - `npm ci --ignore-scripts`, `npm run build`, `npm run test:types`: PASS.
20
+ - `npm test`: 190 total, 185 PASS, 0 FAIL, 5 Windows-only SKIP. The first preparation run had 183 PASS/2 FAIL/5 SKIP because two update-notice regexes retained the old current/latest pair. Updating those expectations to 0.3.4/0.3.5 produced the successful final run; no production logic was changed to satisfy them.
21
+ - Python conformance uses the existing verified `47c23713d0a2a3c11ebde6186afd8c43489b8b65` reference. The Python1.0.2 parity pin is unchanged.
22
+ - `npm run test:package`: PASS, reproducible package and isolated installation/removal, bash/zsh shorthand contract and lifecycle. No global installation.
23
+ - `node scripts/check-repository.mjs`, `git diff --check`: PASS. `npm audit`: zero vulnerabilities.
24
+
25
+ The physical Windows 24-case synthetic fixture evidence below belongs to the PR #134 correction at version 0.3.3, not to a new physical 0.3.4 installation, live queue/injection or ACK experiment. Preparation will additionally validate its exact committed artifact and current-head CI before review completion; their source/hash results belong in the PR record and are not fabricated here. Publication/environment approval/final npm2FA/tag/fleet operations are not performed by these checks.
26
+
27
+ ## Public 0.3.3 checkpoint — rechecked 2026-10-12 KST
28
+
29
+ The earlier candidate/preparation sections below are dated history, not the
30
+ current publication state. npm `latest` is `0.3.3`, `preview` is
31
+ `0.1.0-preview.1`, and the public 0.3.3 metadata exposes integrity
32
+ `sha512-5OQ7eUlR5Oy3RHFRoR3FuBkV7LT72dfjfBEbWRCY5wYP7Dz8TmN2jlRPpo2SFHPAwosFc0WIt8Iis/vyHckxRg==`
33
+ and its registry attestation URL. The existing publication workflow
34
+ [37907833518](https://github.com/abruption/session-peer-ts/actions/runs/37907833518)
35
+ completed successfully at source `c0ed30273b9e9c0049df86ae3c38486a94289527`.
36
+ This follow-up read checks metadata/run identity; it does not redo signature or
37
+ provenance authentication and does not publish anything.
38
+
39
+ ## Windows SSH patch verification — #133, 2026-10-12 KST
40
+
41
+ An isolated patch checkout based on public 0.3.3 source
42
+ `c0ed30273b9e9c0049df86ae3c38486a94289527` forwards the native
43
+ `$LASTEXITCODE` from both encoded PowerShell commands. A missing native exit
44
+ fails with 1. The strict response validator, version/host-key guards and
45
+ one-request/no-resend behavior are unchanged. A separate explicit, unreleased
46
+ 0.3.4 skill matrix row is tested with validator arguments; package/compiled
47
+ runtime version stays 0.3.3.
48
+
49
+ Physical destination: Windows 10 x64 (10.0.19045), PowerShell 5.1.19041.6456,
50
+ Node 24.16.0. The client was macOS arm64 / Node 24.16.0. Existing key/trust
51
+ and fixed BatchMode/StrictHostKeyChecking were used, without configuration
52
+ changes. All 24 SSH fixture scenarios passed:
53
+
54
+ - Six synthetic native outcomes, each tested with a legacy launcher control,
55
+ explicit exit forwarding and the corrected complete local CLI: success/0,
56
+ refusal/1, refusal/2, complete success/255, malformed/2 and missing stdout/0.
57
+ - Native refusal/2 now yields client exit2 with refused/submitted:false.
58
+ Complete success/255 retains queued/submitted:true and the fixture queueId,
59
+ with sshTransport failure, client exit1, consumptionConfirmed:false and
60
+ retryAllowed:false. Malformed/missing outputs remain unknown/submitted:null.
61
+ - Nonzero exact-banner preflight (legacy/control/CLI) and mismatched-version
62
+ preflight make zero request calls. Mixed ordered results through two aliases
63
+ of the **same** destination retain success/refusal and call once per entry.
64
+ - Missing native executable with no LASTEXITCODE returns1 rather than0.
65
+
66
+ Raw legacy/forward controls produced identical decoded stdout for the six outcomes;
67
+ only exit forwarding changed. Message data remained in stdin, not the encoded
68
+ command or native argv. The disposable native executable emitted synthetic
69
+ metadata: no actual agent session, Codex queue, model, injection or ACK was
70
+ invoked. Only the owned remote test directory was written and removed;
71
+ absence was independently verified. This is Windows-destination evidence,
72
+ not Windows-client jump support or two-machine/native-agent qualification.
73
+
74
+ The new portable command/framing regression passed 5/5 with the existing
75
+ SSH-response CLI suite. Actual PowerShell regression coverage is also added
76
+ to the existing Windows-native contract suite; CI results belong to the PR
77
+ head. The first local full-suite attempt used the physical-harness temporary
78
+ root, whose type:module package boundary invalidated CommonJS fixture scripts
79
+ (149 passed, 36 failed, five skipped). That test-environment error was corrected
80
+ by separating the test root; it is not reported as an all-green run.
81
+ The next full run exposed two existing exact-command expectations that needed
82
+ the new exit-forwarding suffix; those expectations still assert the complete
83
+ quoted/hardened command. The final `npm test` passed 190 tests: 185 passed,
84
+ zero failed, five Windows-only skips, including successful build and type
85
+ checks. `test:package` passed reproducible packing, isolated installation and
86
+ removal, and bash/zsh shorthand contract/lifecycle checks. Repository/link and
87
+ diff checks passed, and npm audit reported zero vulnerabilities. Conformance
88
+ used the existing Python 1.0.2 reference at
89
+ `47c23713d0a2a3c11ebde6186afd8c43489b8b65`; the entrypoint, core and compatibility
90
+ fixture (19 files) were byte-compared with the exact upstream archive before
91
+ execution. No reference repin was made.
92
+
93
+ Initial PR CI `38187131255` passed the added real-PowerShell exit regression on
94
+ Windows Node 22 but failed the following existing SSH contract's absolute
95
+ call-count assertion: it inherited the new subtest's log entries. The fixture
96
+ now explicitly initializes that existing subtest's own SSH call log; its exact
97
+ request-count assertions are preserved. This was test isolation, not a runtime
98
+ failure or a CI rerun treated as an unchanged-head success. Final PR-head CI
99
+ results are recorded in the PR after the correction.
100
+
101
+ ## 0.3.3 candidate preparation — 2026-10-09 KST
102
+
103
+ Preparation [#128](https://github.com/abruption/session-peer-ts/issues/128)
104
+ integrates the still-unmerged dependency heads: documentation #125
105
+ `d4c91387b8c968d45a822f82b69ff9333f4ae0bf`, ordinary SSH #127
106
+ `8c882fab220ade044d00beb9d23bf6ecb7727bdc`, and Draft skill guard #126
107
+ `f10b97115830d5968ff7a0583dc470643c3cbeda`, based on main
108
+ `b12699e108c0857b029d4b5c72f82414eb64b21c`. This is an unpublished
109
+ review candidate, not a merged release SHA or publication authorization.
110
+ The 0.4.0 handoff/app-server/observer drafts are excluded. Exact companion
111
+ successor-profile acceptance remains pending; candidate `VERSION=0.3.3`
112
+ exercises a proposed finite row, not published skill compatibility.
113
+
114
+ Local macOS arm64, Node 24.16.0 checks at preparation checkpoint
115
+ `de0472aa6e5ac94d29f227d04dc93671b4d45646`:
116
+
117
+ - `npm test`: 183 tests, 178 passed, zero failed, five Windows-only skips.
118
+ This command also ran `npm run build` and `npm run test:types` successfully.
119
+ Conformance used the existing Python 1.0.2 oracle at
120
+ `47c23713d0a2a3c11ebde6186afd8c43489b8b65`; no reference repin.
121
+ - The release, skill-metadata, updates and multi-host integration selection
122
+ passed 41 tests before the full suite.
123
+ - `npm run test:package`: reproducible package, fresh isolated installation,
124
+ native dependency loading, bash/zsh shorthand contract, actual fixture
125
+ version replacement (`0.3.3` to `0.3.3-fixture.1`) and removal passed.
126
+ - `node scripts/check-repository.mjs`, `git diff --check` and `npm audit`
127
+ passed; audit reported zero vulnerabilities.
128
+
129
+ The first candidate CI run `37886970517` failed its Windows Node 22
130
+ same-size metadata mutation fixture: the automatic timestamp change was not
131
+ observed while the file was open. The fixture now explicitly advances mtime
132
+ and asserts that metadata changed after inspection returns; fixture mutation
133
+ errors also propagate outside the reader’s conservative error handler, so
134
+ a setup/assertion failure cannot count as expected refusal. No timing sleep
135
+ is used. This tests an
136
+ observable metadata change, not an atomic snapshot or undetectable writes.
137
+ Runtime reader behavior is unchanged. After this test-only correction,
138
+ `npm run build`, `npm run test:types` and the 15 skill-metadata tests passed
139
+ locally. Corrected exact-head Windows/aggregate CI results belong in the PR;
140
+ the first failed run is not reported as all green.
141
+
142
+ The registry baseline was read as `latest=0.3.2`,
143
+ `preview=0.1.0-preview.1`, and 0.3.3 absent. Previous stable integrity matches
144
+ its public record below. Authenticated pending-stage, Trusted Publisher,
145
+ package MFA and protected-environment policy reads were not performed for
146
+ this preparation. They remain fresh pre-publication gates.
147
+
148
+ The strict SSH and bounded metadata evidence is fixture/CI evidence described
149
+ in the dependency design documents. No live agent delivery, ACK, real remote
150
+ SSH qualification, crash recovery or fleet update was performed here. Local
151
+ Windows-only skips are not passes; candidate CI and exact post-merge main CI
152
+ must be reported separately at their own exact heads. Local artifact hashes
153
+ and current-head CI results are recorded in the preparation PR, without
154
+ substituting them for an approved Actions publication artifact.
155
+
156
+ ## Public 0.3.2 — 2026-10-07 KST
157
+
158
+ `session-peer@0.3.2` was published at **2026-10-07 13:34:36 KST**
159
+ (`2026-10-07T04:34:36.456Z`). Verified registry tags: `latest=0.3.2`,
160
+ `preview=0.1.0-preview.1` unchanged. Publication source is
161
+ `f335f07352c842f2f6ceb12bd2ca6274b52f69f7` (PR #112 after #111), with exact-main
162
+ CLI run `37570782974` and CodeQL run `37570783335` both successful.
163
+
164
+ Stage-only Trusted Publisher workflow [37571653938](https://github.com/abruption/session-peer-ts/actions/runs/37571653938)
165
+ completed prepare and publish. The approved inputs were exact source above,
166
+ version `0.3.2`, mode `stable-stage`; protected GitHub environment approval and
167
+ separate npm 2FA approval followed. Stage ID:
168
+ `2226865d-2dac-4d42-bd4e-2e1c998b9833`.
169
+
170
+ - Retained Actions archive, downloaded staged tarball and public registry
171
+ tarball were byte-identical. SHA-256:
172
+ `a1ded0c99765f25d0570aa8a38e2ccf0c1c4760b3e25de2b1f20f56061b90540`.
173
+ - Registry integrity:
174
+ `sha512-VNlzBqELXLFI8uCopfEdYrfweIacHeP6dMK32/4vwQJy8fUIKC64c5WCE3IwQVeCTKGMz9mXSxhzZnXmSGMuuA==`.
175
+ - Public publish/SLSA attestation subject digests matched the tarball. SLSA
176
+ named the exact source above, `abruption/session-peer-ts`, `publish.yml` and
177
+ run `37571653938/attempts/1`.
178
+ - `node scripts/release.mjs artifact` and `verify` passed against the retained
179
+ Actions artifact: allowlist/version/source/hash, registry integrity/tags,
180
+ attestation metadata, npm signature audit, fresh isolated installation and
181
+ removal. All 16 packaged Markdown files byte-matched publication source.
182
+ - Authenticated stage listing and ownership were checked. Fresh Trusted
183
+ Publisher permission/package MFA settings reads requested reauthentication;
184
+ the operator instructed skipping those reads. This is a recorded exception
185
+ to the settings-read gate for the historical 0.3.2 release, not completion
186
+ of those reads. No fresh settings confirmation is claimed. Actual OIDC
187
+ staging, protected environment review and separate proof-of-presence
188
+ publication are execution evidence; they do not establish the skipped
189
+ permission or MFA policies. No setting was changed. Future releases require
190
+ their own policy checks and approvals.
191
+
192
+ The Windows destination qualification below used published **0.3.1**, not
193
+ 0.3.2 live delivery. Runtime delta in 0.3.2 is VERSION only; no 0.4.0 drafts
194
+ were included. #20 Windows-client jump and #23 remaining qualification/design
195
+ follow-ups remain open. GitHub tag/Release and fleet upgrades are not claimed.
196
+ The preparation checkpoints below describe their dated pre-publication state.
197
+
2
198
 
3
199
  ## 0.3.2 preparation checkpoint — 2026-10-07 KST
4
200
 
@@ -92,9 +288,9 @@ runtime-identity enforcement remain outside this qualification. The earlier
92
288
  Linux run and its untested newer recovery rules remain historical evidence.
93
289
 
94
290
 
95
- This dated record covers the 0.3.2 preparation checkpoint; public 0.3.1,
96
- 0.3.0, 0.2.1 and 0.2.0 verification; historical 0.1.0 public verification;
97
- earlier candidate checks and live-agent observations. Older sections
291
+ This dated record covers public 0.3.2, 0.3.1, 0.3.0, 0.2.1 and 0.2.0
292
+ verification; the historical 0.3.2 preparation checkpoint; historical 0.1.0
293
+ public verification; earlier candidate checks and live-agent observations. Older sections
98
294
  describe their stated checkpoint rather than current feature availability.
99
295
  It does not claim complete Python parity.
100
296
  Python reference: v1.0.2, commit `47c23713d0a2a3c11ebde6186afd8c43489b8b65`.
package/dist/cli.js CHANGED
@@ -7,7 +7,8 @@ import { lstatSync } from 'node:fs';
7
7
  import { listing, Refusal } from './discovery.js';
8
8
  import { executable, run, UnknownOutcome } from './process.js';
9
9
  import { checkMessage, send, CodexUnknownOutcome } from './send.js';
10
- import { HomeRefusal, uuid } from './writer.js';
10
+ import { HomeRefusal } from './writer.js';
11
+ import { responseOutcome } from './ssh-response.js';
11
12
  import { envelope, host, reply, VERSION, VERSION_LINE } from './protocol.js';
12
13
  import { CHANNELS, checkUpdate, noticeText, refreshCache, refuseSelfUpdate, REFRESH_ARG, updateNotice, UpdateRefusal } from './updates.js';
13
14
  import { jumpOptions, sshConfig, sshJump, sshOptions } from './ssh.js';
@@ -251,7 +252,9 @@ async function remote(options, ssh, target, resolved, message, returnTo) {
251
252
  if (!windows)
252
253
  return `${quote(binary)} ${flag}`;
253
254
  // PowerShell also closes single-quoted strings on U+2018-U+201B.
254
- const code = `& '${binary.replace(/['\u2018-\u201b]/g, '$&$&')}' ${flag}`;
255
+ // PowerShell otherwise maps every native nonzero exit to 1. A failed
256
+ // invocation has no native exit code and must not accidentally exit 0.
257
+ const code = `& '${binary.replace(/['\u2018-\u201b]/g, '$&$&')}' ${flag}; if ($null -eq $LASTEXITCODE) { exit 1 }; exit $LASTEXITCODE`;
255
258
  return `powershell.exe -NoProfile -NonInteractive -EncodedCommand ${Buffer.from(code, 'utf16le').toString('base64')}`;
256
259
  };
257
260
  // OpenSSH keeps the first value obtained, so the fixed hardening options
@@ -279,48 +282,22 @@ async function remote(options, ssh, target, resolved, message, returnTo) {
279
282
  if (returnTo)
280
283
  args.push('--return-route-host', returnTo);
281
284
  const done = await run(ssh, [...base, invoke('--stdio-request')], {
282
- timeout: 90000, input: JSON.stringify({ schemaVersion: 1, args })
285
+ timeout: 90000, rawStdout: true, input: JSON.stringify({ schemaVersion: 1, args })
283
286
  });
284
287
  const uncertain = () => { if (command === 'send' && !flags.has('--dry-run') && done.spawned)
285
288
  throw new UnknownOutcome(); throw new Refusal('remote_response_unverified', 1); };
286
- if (done.interrupted || !done.spawned)
287
- return uncertain();
288
- let value;
289
+ let verified;
289
290
  try {
290
- value = JSON.parse(done.stdout);
291
+ verified = responseOutcome(done, { command, to: values.get('--to'), dryRun: flags.has('--dry-run'), returnTo,
292
+ home: values.get('--codex-home'), allowInactive: flags.has('--allow-inactive-codex-home') });
291
293
  }
292
294
  catch {
293
295
  return uncertain();
294
296
  }
295
- if (!value || value.schemaVersion !== 1 || value.command !== command || typeof value.ok !== 'boolean' || typeof value.host !== 'string' ||
296
- ![0, 1, 2].includes(done.code ?? -1) || (value.ok !== (done.code === 0)))
297
- return uncertain();
298
- if (command === 'doctor' && value.ok && (value.diagnosticCompleted !== true || typeof value.ready !== 'boolean' || value.implementation !== 'typescript' || !value.agents || typeof value.agents !== 'object' || Array.isArray(value.agents)))
299
- return uncertain();
300
- const probe = value.returnRoute;
301
- if (command === 'doctor' && value.ok && returnTo && (!probe || typeof probe !== 'object' || !['verified', 'failed'].includes(probe.status) || !['local', 'ssh'].includes(probe.transport)))
302
- return uncertain();
303
- const expectedStatus = flags.has('--dry-run') ? 'validated' : values.get('--to')?.startsWith('codex:') ? 'queued' : 'posted';
304
- if (command === 'send' && (value.consumptionConfirmed !== false ||
305
- (value.ok && (value.submitted !== !flags.has('--dry-run') || value.status !== expectedStatus)) ||
306
- (!value.ok && !((value.submitted === false && value.status === 'refused') || (value.submitted === null && value.status === 'unknown')))))
307
- return uncertain();
308
- if (command === 'send' && value.ok) {
309
- const target = value.target;
310
- const requestedTarget = values.get('--to') ?? '';
311
- const requestedCodexThread = requestedTarget.startsWith('codex:') ? requestedTarget.slice(6) : undefined;
312
- const validTarget = target && !Array.isArray(target) &&
313
- (target.agent === undefined || target.agent === (requestedCodexThread ? 'codex' : 'claude')) &&
314
- (requestedCodexThread
315
- ? typeof target.id === 'string' && uuid(target.id) && target.id.toLowerCase() === requestedCodexThread.toLowerCase()
316
- : Number.isSafeInteger(target.pid) && target.pid > 0 &&
317
- (typeof target.name === 'string' || target.name === null));
318
- if (!validTarget)
319
- return uncertain();
320
- }
297
+ const { value } = verified;
321
298
  // `clientUpdate` is client-local: a remote-supplied value is never trusted or shown.
322
299
  delete value.clientUpdate;
323
- return { value: { ...value, host: resolved.canonical, sshHost: target }, exitCode: done.code };
300
+ return { value: { ...value, host: resolved.canonical, sshHost: target }, exitCode: verified.exitCode };
324
301
  }
325
302
  function failure(error, command, where) {
326
303
  const unknown = error instanceof UnknownOutcome;
@@ -513,6 +490,10 @@ try {
513
490
  results = results?.map(item => ({ ...item, ...routing }));
514
491
  result = { ...result, ...routing };
515
492
  }
493
+ // Wire-only request context for remote home canonicalization. The caller
494
+ // validates and removes this scalar; ordinary local result shape is unchanged.
495
+ if (wire && command === 'send' && result.ok === true && options.values.has('--codex-home'))
496
+ result.requestedCodexHome = options.values.get('--codex-home');
516
497
  // Without a return host there is nothing to probe from the destination.
517
498
  if (command === 'doctor' && options.flags.has('--check-return-route') && !returnTo)
518
499
  results = results?.map(item => item.ok === false ? item : ({ ...item, returnRoute: { status: 'failed', transport: 'ssh', host: null, reason: 'return_host_unavailable' } }));
@@ -3,7 +3,8 @@
3
3
  import { accessSync, constants, readdirSync, readFileSync, statSync } from 'node:fs';
4
4
  import { homedir } from 'node:os';
5
5
  import { delimiter, isAbsolute, join } from 'node:path';
6
- import { canonical, listingCandidates, sqliteHome } from './discovery.js';
6
+ import { listingCandidates, sqliteHome } from './discovery.js';
7
+ import { inspectSkill } from './skill-metadata.js';
7
8
  import { batchShim } from './process.js';
8
9
  import { windowsProcessStart } from './windows.js';
9
10
  const failure = (error, missing, unknown) => {
@@ -197,35 +198,5 @@ export async function doctor(agent, home, binary) {
197
198
  export function inspectSkills(home) {
198
199
  const paths = new Set([join(homedir(), '.agents/skills/session-peer-ts/SKILL.md'),
199
200
  join(home || process.env.CODEX_HOME || join(homedir(), '.codex'), 'skills/session-peer-ts/SKILL.md')]);
200
- return [...paths].map(path => {
201
- try {
202
- path = canonical(path);
203
- if (!statSync(path).isFile() || statSync(path).size > 65536)
204
- return { path, status: 'unknown', code: 'skill_metadata_unreadable' };
205
- const text = readFileSync(path, 'utf8');
206
- const front = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(text)?.[1];
207
- if (!front)
208
- return { path, status: 'unknown', code: 'skill_metadata_missing' };
209
- const lines = front.split(/\r?\n/);
210
- const sections = lines.map((line, index) => /^metadata: *(?:#.*)?$/.test(line) ? index : -1).filter(index => index >= 0);
211
- if (sections.length !== 1)
212
- return { path, status: 'unknown', code: 'skill_metadata_missing' };
213
- const start = sections[0] + 1;
214
- let end = start;
215
- while (end < lines.length && (/^ /.test(lines[end]) || /^ *(?:#.*)?$/.test(lines[end])))
216
- end++;
217
- const fields = lines.slice(start, end).map(line => /^ ([a-z-]+): *(?:"([^"\r\n]*)"|'([^'\r\n]*)'|([^#"'\r\n]*?)) *(?:#.*)?$/.exec(line));
218
- const field = (key) => {
219
- const values = fields.filter(match => match?.[1] === key).map(match => (match[2] ?? match[3] ?? match[4]).trim());
220
- return values.length === 1 ? values[0] : undefined;
221
- };
222
- const implementation = field('runtime-implementation'), minimum = field('runtime-min-version');
223
- const policy = field('runtime-capability-policy');
224
- const compatible = implementation === 'typescript' && minimum === '0.1.0' && policy === 'probe-help' && field('version') === '0.1.0' && field('runtime-full-version') === '0.1.0';
225
- return { path, status: compatible ? 'compatible' : 'incompatible', code: compatible ? 'skill_contract_compatible' : 'skill_contract_mismatch', verification: 'metadata_only' };
226
- }
227
- catch (error) {
228
- return { path, ...failure(error, 'skill_missing', 'skill_metadata_unreadable') };
229
- }
230
- });
201
+ return [...paths].map(inspectSkill);
231
202
  }
package/dist/output.js CHANGED
@@ -68,5 +68,11 @@ export function renderOutput(value, format) {
68
68
  if (value.command === 'send')
69
69
  lines.push(value.submitted === null ? 'Submission outcome unknown. Do not retry automatically.' : 'Nothing submitted.');
70
70
  }
71
+ if (value.sshTransport && typeof value.sshTransport === 'object') {
72
+ const transport = value.sshTransport;
73
+ lines.push(`SSH transport: ${safe(transport.status)} (${safe(transport.reason)}); verified remote facts retained.`);
74
+ if (value.submitted === true)
75
+ lines.push('Do not resend automatically.');
76
+ }
71
77
  return lines.join('\n');
72
78
  }
package/dist/process.d.ts CHANGED
@@ -2,16 +2,20 @@ export declare class UnknownOutcome extends Error {
2
2
  }
3
3
  export declare const batchShim: (path: string) => boolean;
4
4
  export declare function executable(name: string): string;
5
+ export type StopReason = 'timeout' | 'output_limit' | 'process_error';
5
6
  export type Done = {
6
7
  code: number | null;
7
8
  stdout: string;
8
9
  stderr: string;
9
10
  spawned: boolean;
10
11
  interrupted: boolean;
12
+ stdoutBytes?: Buffer;
13
+ stopReason?: StopReason;
11
14
  };
12
15
  export declare function run(binary: string, args: string[], options?: {
13
16
  env?: NodeJS.ProcessEnv;
14
17
  input?: string;
15
18
  timeout?: number;
16
19
  limit?: number;
20
+ rawStdout?: boolean;
17
21
  }): Promise<Done>;