session-peer 0.3.1 → 0.3.3

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.
@@ -31,13 +31,13 @@ SSH, so a destination needs only a usable Python and a POSIX shell. Its
31
31
  `install.sh --host` additionally pushes the program to
32
32
  `$HOME/.local/share/session-peer` and links `$HOME/.local/bin/session-peer`.
33
33
 
34
- The TypeScript client deliberately does not do that. In 0.2.1 through 0.3.1 the local client
34
+ The TypeScript client deliberately does not do that. In 0.2.1 through 0.3.2 the local client
35
35
  runs `ssh -T -o BatchMode=yes -o StrictHostKeyChecking=yes -o ConnectTimeout=10`
36
36
  and, before any message leaves the machine:
37
37
 
38
38
  1. runs `<remote-bin> --version` with no message (15 s timeout);
39
39
  2. requires stdout to equal exactly the client's own version line, for example
40
- `session-peer 0.3.1 (typescript)` (`VERSION_LINE` in `src/protocol.ts`),
40
+ `session-peer 0.3.2 (typescript)` (`VERSION_LINE` in `src/protocol.ts`),
41
41
  otherwise refuses with a fixed code from `sshPreflightFailure` in `src/cli.ts`;
42
42
  3. sends a `schemaVersion: 1` JSON request on stdin to
43
43
  `<remote-bin> --stdio-request` and verifies the `schemaVersion: 1` response
@@ -445,10 +445,14 @@ PATH entry, a shell profile or a service.
445
445
  Record other implementations, but never modify them.
446
446
  3. **Upload** the tarballs into a new `<root>/<version>-<id16>.staging-<random>`
447
447
  directory, created exclusively (`mkdir` that fails if the path exists, mode
448
- `0700`). Recompute SHA-256 remotely (`sha256sum`/`shasum -a 256`, or
448
+ `0700` on POSIX, the private DACL above on Windows). Windows creation
449
+ must fail on an existing path (for example, `CreateDirectoryW` with
450
+ `ERROR_ALREADY_EXISTS` treated as refusal); `.NET Directory.CreateDirectory`
451
+ alone is not exclusive. Apply the same rule to the activation lock.
452
+ Recompute SHA-256 remotely (`sha256sum`/`shasum -a 256`, or
449
453
  `Get-FileHash -Algorithm SHA256`). Stop on mismatch.
450
454
  4. **Install offline:**
451
- `<node> <npm-cli.js> install --prefix <staging> --offline --ignore-scripts --no-audit --no-fund <three tarballs>`
455
+ `<node> <npm-cli.js> install --prefix <staging> --offline --ignore-scripts --no-audit --no-fund <package tarball and every dependency tarball pinned by the exact release lockfile>`
452
456
  with an empty, staging-local cache. Run it with `PATH` set to
453
457
  `dirname(<node>)` followed by the system directories, so that any child
454
458
  resolving `node` gets the identity Node. `--ignore-scripts` means no package
@@ -720,7 +724,7 @@ gaps:
720
724
 
721
725
  The details and the deviations from this workflow are in
722
726
  [VALIDATION.md](../../VALIDATION.md#remote-deployment-workflow-posix-cell-23-f5--2026-10-02-kst).
723
- Rules added afterwards remain **unvalidated, on Linux too**:
727
+ Rules added after that Linux run remain **unvalidated on Linux**:
724
728
  - the fresh-lock recovery of an unreceipted target;
725
729
  - receipts that copy the marker's `runId`;
726
730
  - `.receipts` trust checks;
@@ -757,37 +761,59 @@ proposed identity launcher (F6) exists.
757
761
  destination with Node 24.16.0 passed real SSH version negotiation. These
758
762
  were manual 0.1.x-era runs, not this workflow end to end.
759
763
 
764
+ ### Windows destination checkpoint — 2026-10-07
765
+
766
+ A user-authorized Windows 10 x64 destination was exercised with published
767
+ 0.3.1, Node 24.16.0 and PowerShell 5.1 under an administrator account, in a
768
+ new dedicated test prefix. Offline installation, self-locating wrapper,
769
+ native lock, activation and operator SSH doctor/nonexistent-target dry-run
770
+ checks passed. Operator checks preceded receipt publication and lock release.
771
+ See [the dated evidence and limits](../../VALIDATION.md#windows-ssh-destination-f5--2026-10-07-kst).
772
+ This was a private operator test harness, not a shipped deploy helper; neither
773
+ the host nor the account was disposable. It does not qualify Windows-client
774
+ `--ssh-jump`.
775
+
760
776
  ### Not validated
761
777
 
762
- - The full workflow against a real **Windows** SSH destination. The Linux
763
- x86_64/glibc cell was run once (see above); other POSIX cells were not.
764
- - Windows: upload and hashing (`Get-FileHash`), `[System.IO.Directory]::Move`
765
- no-replace behavior, the self-locating `.cmd` wrapper (`%~dp0`), reparse
766
- point and DACL checks, and the `%LOCALAPPDATA%` layout.
778
+ - Other Windows account/runtime/architecture combinations and other POSIX
779
+ destinations. The historical Linux x86_64/glibc cell was run once; the
780
+ Windows checkpoint above has its own dated scope and remaining cells.
767
781
  - POSIX root trust checks, `rename(2)` and `libc` detection on anything other
768
782
  than the one Debian x86_64 glibc destination.
769
783
  - Exercised once on the Linux x86_64 host only (with a test harness, not F6),
770
- and not on Windows: failed-activation rollback, marker- and receipt-guarded
784
+ under its dated rules: failed-activation rollback, marker- and receipt-guarded
771
785
  retention, lock contention, explicit break-lock with and without a receipt,
772
- an unowned lock, and the per-file manifest.
773
- - Not exercised anywhere: the explicit recovery of an unreceipted target under
774
- a fresh lock, corrupt, mismatched or orphan receipt handling, `.receipts`
775
- trust checks, and the operator override for unconfirmable lock owners. The
786
+ an unowned lock, and the per-file manifest. Selected corresponding Windows
787
+ fixture cases passed at the 2026-10-07 checkpoint; the dated VALIDATION.md
788
+ section distinguishes native/local fixtures from operator SSH.
789
+ - Not exercised on Linux under the current rules: explicit recovery of an
790
+ unreceipted target under a fresh lock, corrupt/mismatched/orphan receipt
791
+ handling, `.receipts` trust checks and operator override for unconfirmable
792
+ lock owners. Those Windows fixture cells passed at the dated checkpoint.
793
+ General concurrent/adversarial race qualification remains open. The
776
794
  identity launcher was only compared logically (Linux) and prototyped
777
795
  (macOS).
778
796
  - The POSIX empty-directory race window. It is documented as unguaranteed and
779
797
  was not exercised.
780
798
  - Linux arm64, Windows arm64 and macOS x64 native loads; glibc below 2.28 and
781
799
  musl (expected to fail).
782
- - Node 22 destinations under this workflow on Windows, arm64 or macOS (Linux
783
- x86_64 Node 22.23.3 was exercised).
800
+ - Complete Node 22 installation/recovery qualification on Windows, arm64 or
801
+ macOS. Windows x64 Node 22.23.3 direct-CLI/native-lock smoke passed; Linux
802
+ x86_64 Node 22.23.3 was exercised under the earlier dated workflow.
784
803
  - The compatibility contract and the proposed error codes: they are
785
804
  unimplemented.
786
805
 
787
- Because of these gaps, issue #23's last criterion ("validate the selected
788
- workflow with isolated POSIX and Windows destinations") is **not** met. The
789
- POSIX (Linux x86_64) cell of F5 is recorded. **The Windows cell is unmet.**
790
- Local stubs do not count toward either cell.
806
+ F5 now has bounded real-destination evidence on Linux x86_64 and Windows
807
+ 10 x64. The 2026-10-07 Windows checkpoint used **published 0.3.1** with an
808
+ administrator account, PowerShell 5.1 and Node 24.16.0. The primary offline
809
+ provisioning workflow and operator SSH checks (doctor and refused dry-run;
810
+ no message delivery) passed, plus 31 native storage/local-wrapper fixtures.
811
+ Only the primary install has operator SSH evidence. **On Windows**, Node
812
+ 22 has direct-CLI/native-lock smoke evidence only. Issue #23's last criterion
813
+ remains **partially validated**: current recovery rules have not been
814
+ requalified on Linux, and the other cells listed under "Not validated" above
815
+ remain not fully validated. Local stubs do not replace destination evidence. These
816
+ results do not qualify a shipped deploy helper or Windows-client jump.
791
817
 
792
818
  ## Follow-ups
793
819
 
@@ -0,0 +1,73 @@
1
+ # TypeScript skill metadata guard proposal
2
+
3
+ This is the TS source implementation proposal for [#118](https://github.com/abruption/session-peer-ts/issues/118), based on the companion [Draft #20 at `963c3d7`](https://github.com/abruption/session-peer-skill/blob/963c3d748a11b1164013ee26c9c0ef285c52b285/docs/typescript-compatibility.md). Companion [design acceptance at `699a325`](https://github.com/abruption/session-peer-skill/blob/699a3251830c30c62d0f812363faf4d0eb0c8e0c/docs/typescript-compatibility.md) records the full static review of the exact candidates below on 2026-10-09. This design-only acceptance does not authorize runtime merge/release, successor skill metadata/publication, installation or pin changes, content authenticity, or live delivery support.
4
+
5
+ ## Separate version meanings
6
+
7
+ The skill repository tag, Python skill revision, TS skill revision, and npm runtime version are independent. `runtime-min-version` describes the skill's baseline CLI compatibility floor; `runtime-full-version` describes its documented published CLI feature coverage reference. Neither is a security recommendation, a doctor-acceptance rule, permission to send, or evidence of platform/native compatibility. Optional operations still need their actual resolved TS executable's version/help and prerequisites.
8
+
9
+ The finite source proposal is:
10
+
11
+ | Inspecting runtime | Skill version | Implementation | Minimum | Full | Policy | Verdict |
12
+ |---|---|---|---|---|---|---|
13
+ | `0.3.2` | `0.1.0` | `typescript` | `0.1.0` | `0.1.0` | `probe-help` | compatible |
14
+ | `0.3.2` | `0.2.0` | `typescript` | `0.1.0` | `0.3.2` | `probe-help` | incompatible |
15
+ | `0.3.3` (source proposal) | `0.1.0` | `typescript` | `0.1.0` | `0.1.0` | `probe-help` | compatible, exact design accepted (dated record below) |
16
+ | `0.3.3` (source proposal) | `0.2.0` | `typescript` | `0.1.0` | `0.3.2` | `probe-help` | compatible, exact design accepted (dated record below) |
17
+ | Other valid runtime/profile | Any | Any | Any | Any | Any | incompatible |
18
+ | Unavailable/malformed runtime identity | Any | Any | Any | Any | Any | unknown |
19
+
20
+ All compatible rows also require exactly one `name: session-peer-ts`. Inspection uses this runtime's compiled `VERSION`, without executing a binary. Version 0.3.3 builds `VERSION=0.3.3`, so its production doctor inspection path can exercise the proposed successor row as well as the legacy row. The immutable public 0.3.2 artifact remains legacy-only; design acceptance does not establish published compatibility or approve runtime merge/release. Pure validator fixtures also exercise the finite matrix. Every later runtime/profile row needs explicit review; no generic future-version guarantee is implied.
21
+
22
+ ## Limited grammar and results
23
+
24
+ This is a bounded frontmatter string-map grammar, not a generic YAML parser. The file begins with `---` and LF/CRLF, and closes its frontmatter with `---`. Exactly one root `name` scalar and one root `metadata:` map are required. The root `name` occupies one line; an indented non-comment continuation is malformed even across blank/comment lines or when the name follows the metadata map. Indented non-comment content before any root field is also malformed. Metadata entries have two-space indentation, lowercase ASCII keys, and no duplicates. Required metadata keys are `version`, `runtime-implementation`, `runtime-min-version`, `runtime-full-version`, and `runtime-capability-policy`.
25
+
26
+ Values are unescaped single/double-quoted strings or plain ASCII tokens beginning with a letter/digit and continuing with letters, digits, `.`, `_`, `/`, or `-`. A scalar value is separated from its colon by at least one literal ASCII space; comments require a separating space. For root `name`, the parser first requires that literal space and then removes leading whitespace with JavaScript `trimStart()` before parsing the scalar: `name:` followed by a literal space, a tab and the scalar is accepted, while a tab immediately after the colon is malformed. Metadata scalar separators retain their spaces-only grammar. Plain and quoted root names can occur before or after the metadata map. Quoted or noncanonical root key spellings are rejected rather than ignored as possibly ambiguous protected fields. Within `name` and `metadata`, YAML escape interpretation, tags, aliases, sequences, nested maps and block scalars are unsupported. Unrelated root fields and their indented content are ignored until the next root field; this does not permit a continuation of `name`. Protected name/map/scalar grammar does not parse or validate ignored field contents. Instruction bodies are never interpreted. The whole file must be valid UTF-8. A leading BOM, lone CR, and forbidden control characters are rejected. Body bytes are read; `metadata_only` is not a promise to avoid reading them.
27
+
28
+ | Evidence | Status / code | `verification` |
29
+ |---|---|---|
30
+ | Absent entrypoint (`ENOENT`/`ENOTDIR` before established file evidence) | missing / skill_missing | absent |
31
+ | Raw `EACCES`/`EPERM` reaching reader catch | permission_denied / permission_denied | absent |
32
+ | I/O failure, non-regular, overflow, invalid UTF-8, conflicting file evidence | unknown / skill_metadata_unreadable | absent |
33
+ | Missing/duplicate required name or scalar, missing/multiple map, unsupported syntax, BOM/control error | unknown / skill_metadata_missing | absent |
34
+ | Healthy bounded legacy/successor metadata; unavailable/malformed inspecting runtime identity, including ambiguous non-scalar evidence (proposed G04) | unknown / skill_metadata_missing | absent |
35
+ | Well-formed but unsupported name, tuple, or valid runtime | incompatible / skill_contract_mismatch | metadata_only |
36
+ | Exact supported runtime/profile/name | compatible / skill_contract_compatible | metadata_only |
37
+
38
+ The proposed **G04** expectation is fixed as exactly `{ status: 'unknown', code: 'skill_metadata_missing' }`, with no `verification` property, when the inspecting runtime identity is unavailable or malformed, including ambiguous non-scalar identity evidence. Its precondition is healthy bounded legacy/successor metadata: a readable regular file within the byte budget, valid UTF-8, stable file/path evidence, and valid frontmatter/name/profile. Earlier reader failures retain their own envelopes. The existing [`test/skill-metadata.test.ts`](https://github.com/abruption/session-peer-ts/blob/3cd52c166638e4833798e979a55ac71a0405d740/test/skill-metadata.test.ts) test `finite runtime/profile matrix preserves public 0.3.2 and checks the 0.3.3 candidate proposal` asserts this exact object for both profiles with explicit `null`, `{}`, `0`, `''`, `'0.3.3-preview.1'`, and `'00.3.3'` runtime arguments. An omitted or explicitly `undefined` helper argument uses the compiled `VERSION` default and is not an unavailable-identity fixture; the candidate test asserts both omitted and explicit `undefined` arguments use that compiled default. A valid but unsupported stable runtime (for example, `0.3.4`) instead returns exactly `{ status: 'incompatible', code: 'skill_contract_mismatch', verification: 'metadata_only' }`. This documents the TS proposal's G04 expectation covered by the exact static design acceptance below; it does not establish runtime publication or live delivery.
39
+
40
+ The proposed **G07** result for missing, duplicated, or syntactically malformed required frontmatter name/map/scalar evidence is exactly `{ status: 'unknown', code: 'skill_metadata_missing' }`, with no `verification` property. This applies after bounded regular-file evidence, valid UTF-8, and file/path stability have been established; earlier reader failures retain their own envelopes. A well-formed unsupported name or scalar remains `incompatible / skill_contract_mismatch / metadata_only`. The static grammar fixtures and `root name forbids continuations across comments or map boundaries while ignored fields retain their scope` establish this distinction. Both profiles are tested with plain/quoted names before or after metadata, one/two/four-space continuations, blank/comment-separated continuations, orphan indentation, and exact outer inspection results. Controls preserve comments, CRLF, unrelated field content, instruction bodies, and well-formed unsupported name results. This documents the TS proposal's G07 expectation covered by the exact static design acceptance below; it does not establish runtime publication or live delivery.
41
+
42
+ Path canonicalization preserves managed symlink installations. As before, wrapped canonicalization errors can reach the checker as `home_resolution_failed` and therefore `unknown`, rather than a raw permission result. No raw error message or instruction text is returned.
43
+
44
+ These are intentional changes from public TS `0.3.2` at [`f335f07`](https://github.com/abruption/session-peer-ts/blob/f335f07352c842f2f6ceb12bd2ca6274b52f69f7/src/diagnostics.ts): its checker does not validate root name and classifies missing/duplicate/malformed required metadata scalars as incompatible. Its missing/permission/unknown outputs already omit `verification`; this proposal preserves that placement. Public 0.3.2 historical behavior is not re-described as the future source grammar. Neither `compatible` verdict authenticates bytes, approves a send, or proves consumption/ACK.
45
+
46
+ ## Reader bound and file evidence
47
+
48
+ The budget is **65,536 whole-file raw UTF-8 bytes**, including BOM, whitespace, line endings and body. The reader allocates and reads at most **65,537 bytes**, with one overflow-detection byte. Pre-read size checks are an early rejection, not the only bound. Fatal UTF-8 decoding happens after the bounded read.
49
+
50
+ The original entrypoint is canonicalized so a separately managed symlink installation remains usable. The canonical target is inspected with `lstat`, then opened read-only (POSIX also uses `O_NONBLOCK` and `O_NOFOLLOW`). The descriptor must be a regular file and match pre-open device/inode/size/mtime/ctime. After bounded reading, descriptor and path evidence must still match and the original entrypoint must resolve to the same canonical target. Length must match the initial size. Growth, truncation, replacement, alias change, and same-size timestamp changes produce unknown, never a tuple verdict. Disappearance after initial file evidence is conflicting evidence, not a fresh absent-entrypoint result. Every opened descriptor is closed by `finally`.
51
+
52
+ The proposed **B04** fixture `reader rejects observed malformed-content rewrites during bounded chunked reads and closes its descriptor` rewrites the same file after the first real four-byte read, preserving its inode and size. Separate cases replace a protected scalar with malformed syntax or introduce invalid UTF-8. The first returned nonempty chunk is explicitly asserted to contain four bytes, outside reader error handling. Captured read chunks, including that unchanged first chunk, must concatenate to the actual malformed payload; an explicitly observable timestamp change establishes conflicting file evidence. Each case asserts exactly `unknown / skill_metadata_unreadable`, preserved path, no `verification` property, bounded read requests/allocation, and closure of the inspected descriptor exactly once. Fixture failures and assertions are checked outside the reader's error handling. This tests rejection of an observed mutation before parsing or decoding; it does not claim that either parser ran on the malformed bytes. Static malformed/UTF-8 fixtures separately establish their classifications. No atomic snapshot or malicious same-user writer guarantee follows from these tests.
53
+
54
+ These checks detect observed changes; they do not authenticate content against a malicious same-user writer capable of restoring identical metadata, atomically freeze a file, or impose an I/O deadline on arbitrary filesystems. Windows uses read-only opens and regular-file checks; POSIX special-file and symlink replacement cases are exercised on POSIX. Windows fixtures cover portable reader, profile, grammar, resource, and growth/truncation behavior through the native CI suite.
55
+
56
+ ## Fixtures and rollout
57
+
58
+ `test/skill-metadata.test.ts` exercises exact legacy/candidate matrix rows, unknown and future runtimes, every required scalar's missing/equal-duplicate/conflicting-duplicate/malformed/unsupported cases, wrong name/implementation, comments/quoting/CRLF, exact and overflow byte bounds, invalid UTF-8/BOM, regular files/FIFO, growth/truncation/replacement/alias changes including post-EOF changes, descriptor cleanup, bounded read allocation, raw error envelopes and zero runtime/network/write side effects. These are isolated local/CI fixtures, not installed-skill or delivery experiments. `test/diagnostics.test.ts` retains production doctor integration coverage.
59
+
60
+ ### Exact companion design acceptance — 2026-10-09 KST
61
+
62
+ Companion [Draft #20 acceptance at `699a3251830c30c62d0f812363faf4d0eb0c8e0c`](https://github.com/abruption/session-peer-skill/blob/699a3251830c30c62d0f812363faf4d0eb0c8e0c/docs/typescript-compatibility.md) accepts the finite runtime/profile matrix, limited parser/status envelopes, G07 root-name rule, and B04 reader fixtures for these exact reviewed candidates:
63
+
64
+ | Candidate | Reviewed source head | Reviewed design document SHA-256 |
65
+ | --- | --- | --- |
66
+ | TS #126 | [`ba18bb806a6ba503381259b4255211af3adc0336`](https://github.com/abruption/session-peer-ts/blob/ba18bb806a6ba503381259b4255211af3adc0336/docs/design/typescript-skill-compatibility.md) | `3d003cb3541add314941a8d72dc03648f4cabf7ab5a6d3a83d60ff8cc24fb8ea` |
67
+ | Release Draft #129 | [`bfb3d6f1256ab076a76660e08a7bf1ad071a6c6c`](https://github.com/abruption/session-peer-ts/blob/bfb3d6f1256ab076a76660e08a7bf1ad071a6c6c/docs/design/typescript-skill-compatibility.md) | `43244535795e22e720516415d79766cffa017b59daf9f070e1cfae632d19fbd1` |
68
+
69
+ This was read-only source, test and document review with CI-status confirmation; no tests were rerun in that review. At this dated checkpoint, the runtime and successor skill were unpublished. Acceptance applies to design and fixture profiles at the named heads; it does not authorize runtime merge/release, final successor skill metadata, publication, installation or pin changes, and establishes no live delivery, consumption or ACK. The two nonblocking syntax-precision follow-ups recorded in that acceptance are clarified here and covered by added plain-name-after-map and root whitespace fixtures, without changing parser behavior.
70
+
71
+ At the earlier 2026-10-09 coordination checkpoint, a dry-run found an inactive companion session and queued nothing, and a later authorized request was queued without established consumption or a review response. Those attempts remain historical evidence only; the immutable acceptance record above supplies the subsequent design review. Final skill metadata/publication/pin changes still require their own approval.
72
+
73
+ After separate merge/release authorization, the guard runtime must actually be published and its exact source/artifact/profile evidence recorded **before** finalizing and separately publishing successor skill metadata. Only then may the reviewed immutable skill pin and four-language guidance/PARITY change together. This PR does not modify the companion/Python repository, existing skill pin, Python runtime/reference/parity, global installation, PATH, or metadata release. No postinstall or automatic deployment is introduced. Unshipped 0.4 handoff/ACK/observation and unsupported wake/Antigravity/Relay/MCP remain outside this work.
package/docs/guide.ja.md CHANGED
@@ -4,7 +4,26 @@
4
4
 
5
5
  [English](guide.md) | [한국어](guide.ko.md) | [日本語](guide.ja.md) | [简体中文](guide.zh-CN.md)
6
6
 
7
- 0.3.1 の詳細ガイドです([信頼性の修正](../PARITY.md#031-reliability-fixes))。0.3.0 は複数ホスト SSH、送信者情報と返信経路、更新確認、任意の `sp` 短縮名を追加しました([0.3.0 の変更点](../PARITY.md#030-remote-usability-and-maintenance))。前回の公開記録は [0.3.0 公開リリースの証拠](../VALIDATION.md#public-030--2026-10-03-kst) にあります。以下の 0.1.0 の説明は旧版との比較です。
7
+ **文書・ソースのバージョン: 0.3.3。** 2026-10-09 KST の準備時点では 0.3.3 は未公開で、公開 npm `latest` は **0.3.2**、`preview` は `0.1.0-preview.1` でした。以下の 0.3.3 npm 例を使う前に、レジストリで現在の公開状況を確認してください。利用できない場合はレビュー済みソースまたはローカルビルド成果物を使います。ビルドと SSH の両端は同じレビュー済みバージョンが必要で、0.3.2 と 0.3.3 は互いの SSH 事前確認を拒否します。
8
+
9
+ 0.3.3 の詳細ガイドです([0.3.1 の信頼性の修正](../PARITY.md#031-reliability-fixes))。0.3.0 は複数ホスト SSH、送信者情報と返信経路、更新確認、任意の `sp` 短縮名を追加しました([0.3.0 の変更点](../PARITY.md#030-remote-usability-and-maintenance))。以前の公開記録は [0.3.1 公開リリースの証拠](../VALIDATION.md#public-031--2026-10-04-kst) にあります。以下の 0.1.0 の説明は旧版との比較です。
10
+
11
+ <a id="移行時の境界-033-候補"></a>
12
+
13
+ ## 移行時の境界 (0.3.3)
14
+
15
+ [0.3.2 の公開記録](../VALIDATION.md#public-032--2026-10-07-kst)はリリースのソースと成果物を固定しています。SSH の事前確認は TS のバージョン表示の完全一致を検査しますが、コミットハッシュは検査しません。ソースビルドのレビュー済みコミットは運用者が別途揃える必要があります。
16
+
17
+ - Python の Claude JSON は `status`、`submitted`、`consumptionConfirmed` を省略する場合があります。TS は `validated`/`posted`、明示的な `submitted`、`consumptionConfirmed:false` を使います。欠けたフィールドは false や null ではありません。Claude の名前は null の場合があり、Codex の `queueId` は任意です。提出は ACK の証拠ではありません。
18
+ - Claude のセッションディレクトリがない場合は空の一覧と `status:ok` を返します。任意の Codex ホームがない場合は `absent`、読める DB もエラーもない場合は全体が `not_installed` です。空の一覧や doctor の完了は送信許可ではありません。
19
+ - `--host` を繰り返すと要求順の配列を返します。ホスト別の実行中の失敗は終了コード 1 に集約しますが、実行前のコマンド全体の拒否(重複ホストや空のメッセージなど)は配列出力でも終了コード 2 を維持します。公開 0.3.2 は SSH の終了 255 やタイムアウト後に完全な応答の証拠も失う場合があります。0.3.3 は要求に一致する完全な事実を保持し、ローカル終了コード 1 と `sshTransport` を返します。不完全・不正な証拠は unknown のままです。unknown の場合は自動再送しません。
20
+ - 0.2.0 で導入した基本 doctor は Codex を実行せず inbox に提出しません。0.3.0 以降の明示的な `--check-return-route` は、利用できる非ローカル宛先に対してのみ、時間を制限した逆方向 SSH の無操作コマンドを実行します。自分自身への経路は SSH なしで `verified`、`transport:local`、`self_route_normalized` を返し、ホストがない場合は接続確認前に失敗します。`--check-reply-to` は未対応です。verified はローカル経路の正規化または 1 回の SSH 無操作コマンドの成功であり、ACK の認証や一般的な逆方向アクセスの保証ではありません。
21
+ - 同じ端末の Reply-To をローカルに正規化するには、明示した OS ユーザーの一致、認識できる正確なローカル名、明示的な SSH オプションがないことが必要です。送信者の証拠が競合した場合は識別情報を省き、Claude の名前が使えない場合は PID を使います。
22
+ - npm、Python、リモートホスト、スキルは別管理です。TS は自己更新やリモート更新を提供しません。通知は既定で無効で、無効化指定が優先します。明示的な `update --check` はレジストリを照会します。従来のスキルメタデータは `0.1.0` のままで、#118 の後継 Draft は導入用の固定値や公開済み互換性検査の証拠ではありません。
23
+ - Windows の検証は公開 0.3.1、Windows 10 x64、管理者アカウント、PowerShell 5.1、Node 24.16.0 で行いました。オフライン導入、ラッパー・ネイティブロック、運用者の doctor・存在しない宛先の dry-run、ローカル fixture 31 件を検証しました。Node 22 はバージョン表示とネイティブロックの確認のみです。非管理者、他のアーキテクチャ、F6 のランタイム検査、以前の Linux 実験の最新規則は未検証です。0.3.2 の実機 ACK やデプロイ補助ツールの検証ではありません。
24
+
25
+ [移行の詳細](../PARITY.md#ordinary-cli-migration-notes--117)と [Windows の検証記録](../VALIDATION.md#windows-ssh-destination-f5--2026-10-07-kst)を参照してください。Python 1.0.2 のテスト基準は維持します。比較対象の公開 CLI はどちらも一般のネイティブ ACK/wait、エンドツーエンドの重複防止、Side Session を提供しません。Relay/MCP はこの比較の対象外です。
26
+
8
27
 
9
28
  ## 目次
10
29
 
@@ -21,7 +40,7 @@
21
40
 
22
41
  実行中の **Claude Code と Codex セッション**に、ローカルまたは SSH 経由でメッセージを送る TypeScript クライアントです。Node.js で動作し、Python は不要です。
23
42
 
24
- **0.3.1 の利用ガイドです。**パッケージ名は `session-peer`、CLI コマンドは **`session-peer`**。Relay サーバーやホスティングサービスは提供しません。
43
+ **0.3.3 の利用ガイドです。**パッケージ名は `session-peer`、CLI コマンドは **`session-peer`**。Relay サーバーやホスティングサービスは提供しません。
25
44
 
26
45
  ## 機能と範囲
27
46
 
@@ -38,7 +57,7 @@ Relay 通信、MCP、wake/resume、Antigravity、自動更新は未実装です
38
57
 
39
58
  ビルド後の `node dist/cli.js list --json` は Claude/Codex をまとめて表示し、`list --agent codex --json` は既知の home を検索します。公開 npm **0.1.0** では引き続き agent と Codex 一覧の home を明示します。0.2.0 でも明示的なコマンド形式を利用できます。
40
59
 
41
- 対象は既定の `~/.codex`、`CODEX_HOME`、macOS Orca 直下のアカウント home、JSON 配列 `SESSION_PEER_CODEX_HOMES` のみです。`--codex-home` は Codex 一覧を固定して無関係な設定エラーを回避し、`--agent claude` は Codex 探索を省略します。同じ home の別名は統合し、異なる home の同じ UUID は保持します。送信には各行の `codexHome` を使ってください。任意 home の不在はエラーではなく、明示した home の不在・不正は読み取れた行を保持して終了コード 1 を返します。一覧は writer を選択せず、メッセージを提出しません。[一覧契約](../PARITY.md#source-unified-listing-contract--16--020)に順序・診断・`--all`・SSH を記載しています。0.2.0の Codex 送信は `--codex-home` 省略時に一意で安定した live writer を選択します。明示 home でも既知の競合 home をすべて検査します。非アクティブなキュー送信には保存済みスレッド、全候補の非アクティブ検証、および `--codex-home HOME --allow-inactive-codex-home` が必要で、wake/resume は実行しません。Dry-run は提出しません。JSON に診断 `codexHomeResolution` と、ネイティブ出力にある場合のみ `queueId` を追加しますが、消費確認ではありません。[選択契約](../PARITY.md#source-codex-home-selection--17--020)を参照してください。公開 **0.1.0** には明示 live home が必要で、非アクティブ許可オプションはありません。SSH の両端には同じ TypeScript クライアントのバージョン(0.3.1)が必要です。
60
+ 対象は既定の `~/.codex`、`CODEX_HOME`、macOS Orca 直下のアカウント home、JSON 配列 `SESSION_PEER_CODEX_HOMES` のみです。`--codex-home` は Codex 一覧を固定して無関係な設定エラーを回避し、`--agent claude` は Codex 探索を省略します。同じ home の別名は統合し、異なる home の同じ UUID は保持します。送信には各行の `codexHome` を使ってください。任意 home の不在はエラーではなく、明示した home の不在・不正は読み取れた行を保持して終了コード 1 を返します。一覧は writer を選択せず、メッセージを提出しません。[一覧契約](../PARITY.md#source-unified-listing-contract--16--020)に順序・診断・`--all`・SSH を記載しています。0.2.0の Codex 送信は `--codex-home` 省略時に一意で安定した live writer を選択します。明示 home でも既知の競合 home をすべて検査します。非アクティブなキュー送信には保存済みスレッド、全候補の非アクティブ検証、および `--codex-home HOME --allow-inactive-codex-home` が必要で、wake/resume は実行しません。Dry-run は提出しません。JSON に診断 `codexHomeResolution` と、ネイティブ出力にある場合のみ `queueId` を追加しますが、消費確認ではありません。[選択契約](../PARITY.md#source-codex-home-selection--17--020)を参照してください。公開 **0.1.0** には明示 live home が必要で、非アクティブ許可オプションはありません。SSH の両端には同じ TypeScript クライアントのバージョン(0.3.3)が必要です。
42
61
 
43
62
  ### 0.2.0 CLI の使いやすさ
44
63
 
@@ -61,13 +80,15 @@ macOS / Linux / Windows native、Node **22.x の 22.13 以上、または 24.x**
61
80
 
62
81
  Node 22.x の 22.13 以上または 24.x を使用し、インストールする正確なバージョンの公開状況を確認してください。Python CLI も同じコマンド名を使うため、既存のインストールがあれば先に PATH を確認してください。
63
82
 
83
+ **0.3.3 のインストール:** npm の導入・更新例を実行する前に、レジストリで公開状況と選択したリリースを確認してください。利用できない場合は[レビュー済みソースビルド](#ソースからビルド)を使います。
84
+
64
85
  ```sh
65
- npm view session-peer@0.3.1 version dist.integrity
66
- npm install --global --ignore-scripts session-peer@0.3.1
86
+ npm view session-peer@0.3.3 version dist.integrity
87
+ npm install --global --ignore-scripts session-peer@0.3.3
67
88
  session-peer --version
68
89
  ```
69
90
 
70
- 期待値は `session-peer 0.3.1 (typescript)`。
91
+ 期待値は `session-peer 0.3.3 (typescript)`。
71
92
 
72
93
  1. `session-peer list --agent claude --json` で宛先を探し、正確な PID を選びます。
73
94
  2. `session-peer send --to CLAUDE_PID --message 'Please reply after checking.' --dry-run --json` で提出せずに確認します。
@@ -86,7 +107,7 @@ npm run build
86
107
  node dist/cli.js --version
87
108
  npm pack --ignore-scripts
88
109
  # 任意のグローバルインストール前に PATH の既存コマンドを確認
89
- npm install --global --ignore-scripts ./session-peer-0.3.1.tgz
110
+ npm install --global --ignore-scripts ./session-peer-0.3.3.tgz
90
111
  session-peer --version
91
112
  ```
92
113
 
@@ -96,7 +117,7 @@ session-peer --version
96
117
 
97
118
  インストール前後に `type -a session-peer` と `command -v session-peer` を確認します。他の実装も同名コマンドを提供するため、PATH 上の一つを選ぶか `node /absolute/path/dist/cli.js` を使ってください。`--force` で他の管理ツールのファイルを上書きしないでください。Python パッケージ・スキル・サービスを自動変更しません。削除は `npm uninstall --global session-peer` を使い、PATH を再確認します。
98
119
 
99
- Windows PowerShell では `Get-Command session-peer -All` で既存コマンドを確認します。Python CLI を置換せずに試すには、`npm ci --ignore-scripts`、`npm run build`、`npm pack --ignore-scripts` の後、`npm install --prefix "$env:TEMP\session-peer-ts-source" --ignore-scripts .\session-peer-0.3.1.tgz` を実行し、`& "$env:TEMP\session-peer-ts-source\node_modules\.bin\session-peer.cmd" --version` で確認します。同じ prefix の `npm uninstall --prefix "$env:TEMP\session-peer-ts-source" session-peer` で削除します。
120
+ Windows PowerShell では `Get-Command session-peer -All` で既存コマンドを確認します。Python CLI を置換せずに試すには、`npm ci --ignore-scripts`、`npm run build`、`npm pack --ignore-scripts` の後、`npm install --prefix "$env:TEMP\session-peer-ts-source" --ignore-scripts .\session-peer-0.3.3.tgz` を実行し、`& "$env:TEMP\session-peer-ts-source\node_modules\.bin\session-peer.cmd" --version` で確認します。同じ prefix の `npm uninstall --prefix "$env:TEMP\session-peer-ts-source" session-peer` で削除します。
100
121
 
101
122
  ## 使い方
102
123
 
@@ -111,6 +132,8 @@ session-peer send --to codex:THREAD_UUID --codex-home "$HOME/.codex" --message '
111
132
 
112
133
  ### SSH
113
134
 
135
+ **0.3.3:** 完全なリモート応答を厳密に検証した後、SSH が 255 で終了したり収集がタイムアウトしたりしても、確認済みの送信登録の事実を保持します。リモート結果の `ok:true` とローカル終了コード 1・`sshTransport` が併存するため、`submitted` と接続診断を確認してください。不完全、不正、上限超過の応答は unknown のままで、自動再送してはいけません。この 0.3.3 の動作は、変更できない公開済み 0.3.2 パッケージを変更しません。[応答契約](design/ordinary-ssh-responses.md)を参照してください。
136
+
114
137
  ```sh
115
138
  session-peer send --host user@machine --remote-bin /absolute/path/session-peer \
116
139
  --to CLAUDE_PID --message 'Please review the API contract.' --dry-run --json
@@ -185,11 +208,13 @@ Python は開発時の互換検証基準のみです(v1.0.2、`47c23713d0a2a3c
185
208
 
186
209
  ## npm リリース
187
210
 
211
+ 公開 **0.3.2** は 2026-10-07 KST に検証されました([固定された公開記録](../VALIDATION.md#public-032--2026-10-07-kst))。以下のレジストリ照会で 0.3.3 の現在の公開状況と npm タグを確認してください。日付付きの準備記録は、その後の公開結果を証明しません。
212
+
188
213
  0.2.1 は 2026-09-29 KST、0.2.0 は 2026-09-28 KST に公開・検証されました。
189
214
  [0.2.1 公開記録](../VALIDATION.md#public-021--2026-09-29-kst)を参照し(以降のリリースはそれぞれ日付付きの記録を追加します)、導入前に正確なバージョンと現在のタグを確認してください。
190
215
 
191
216
  ```sh
192
- npm view session-peer@0.3.1 version dist.integrity
217
+ npm view session-peer@0.3.3 version dist.integrity
193
218
  npm view session-peer dist-tags
194
219
  ```
195
220
 
@@ -231,7 +256,7 @@ session-peer update --check --channel preview --output-format text
231
256
  実行中の CLI のパスからインストールの管理者を確実に特定できた場合にだけ示します。
232
257
  対象は、自身の `session-peer` ランチャーがこのパッケージを指す npm グローバル prefix
233
258
  (既定、Homebrew、nvm、nvm-windows、fnm。例:
234
- `npm install --global --ignore-scripts session-peer@0.3.1`)、マニフェストで
259
+ `npm install --global --ignore-scripts session-peer@0.3.3`)、マニフェストで
235
260
  `session-peer` を宣言している pnpm・Yarn・Bun のグローバルストア、Volta、npx キャッシュ
236
261
  です。プロジェクトへのインストール(`npm_project`、`pnpm_project`)、ソースチェック
237
262
  アウト(`source`)、それ以外(`unknown`)では `updateCommand: null` と `guidance` の文だけを
@@ -293,6 +318,8 @@ Claude Code では `--agent claude-code` を使用します。ユーザー単位
293
318
  すべてに `--global` を付けてください。既存の `session-peer-ts` を置き換える前にローカルの変更を確認してください。
294
319
  Codex の `.agents/skills` は、このパスを探索する他のクライアントと共有されます。
295
320
 
321
+ 0.3.3 は production doctor 経路で、上限付き `metadata_only` ガードの提案を実行します。後継プロファイル(スキル `0.2.0` / 最小 `0.1.0` / 全機能の参照 `0.3.2`)は、厳密な #126 `ba18bb8` とリリース Draft #129 `bfb3d6f` に対する [companion Draft #20 の設計限定承認 `699a325`](https://github.com/abruption/session-peer-skill/blob/699a3251830c30c62d0f812363faf4d0eb0c8e0c/docs/typescript-compatibility.md)を得ました。完全なコミットとレビュー対象の設計ハッシュは以下のガード設計に記録しています。ソース・テスト・文書の静的レビューと CI 状態の確認で、テストは再実行していません。2026-10-09 の承認時点ではランタイムと後継スキルは未公開でした。この承認はランタイムのマージ・公開や最終的な後継スキルのメタデータ・公開・導入・固定コミット変更を許可せず、公開互換性・配信・ACK を証明しません。ガードランタイムを実際に公開してから、後継スキルの確定・タグ・固定コミットを別途変更します。ランタイムとスキルの更新は各管理者が行い、postinstall は追加しません。[ガード提案](design/typescript-skill-compatibility.md)を参照してください。
322
+
296
323
  ```sh
297
324
  npx -y skills@1.7.0 add https://github.com/abruption/session-peer-skill/tree/081cc3c1d16a394bd92824333f4bc61c36951799/session-peer-ts --skill session-peer-ts --agent codex --copy --yes
298
325
  npx -y skills@1.7.0 list --agent codex --json