session-peer 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +6 -1
- package/PARITY.md +396 -0
- package/README.ja.md +102 -19
- package/README.ko.md +134 -37
- package/README.md +159 -44
- package/README.zh-CN.md +98 -19
- package/RELEASING.md +84 -4
- package/UNICODE-LICENSE.txt +39 -0
- package/VALIDATION.md +199 -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 +69 -22
- package/dist/diagnostics.d.ts +21 -0
- package/dist/diagnostics.js +225 -0
- package/dist/discovery.d.ts +21 -1
- package/dist/discovery.js +182 -46
- package/dist/help.d.ts +1 -0
- package/dist/help.js +50 -0
- package/dist/output.d.ts +2 -0
- package/dist/output.js +42 -0
- package/dist/protocol.d.ts +2 -2
- package/dist/protocol.js +1 -1
- package/dist/send.d.ts +8 -0
- package/dist/send.js +30 -17
- package/dist/writer.d.ts +34 -3
- package/dist/writer.js +140 -69
- package/package.json +5 -3
package/CONTRIBUTING.md
CHANGED
|
@@ -47,6 +47,10 @@ version; it does not retroactively alter `0.1.0-preview.0`.
|
|
|
47
47
|
Python reference commit: `47c23713d0a2a3c11ebde6186afd8c43489b8b65`.
|
|
48
48
|
CI checks it out separately. Python is a development oracle, never a runtime
|
|
49
49
|
fallback. Match Node 22/24, macOS/Linux and the native dependency requirements.
|
|
50
|
+
Windows CI separately runs `npm run test:windows` and `npm run test:package`
|
|
51
|
+
on x64 Node 22/24. The Windows fixture compiles with the runner's .NET Framework
|
|
52
|
+
C# compiler and uses real locks/processes plus an isolated fake SSH endpoint
|
|
53
|
+
that invokes actual PowerShell; no live sessions or network destinations.
|
|
50
54
|
Keep `package-lock.json` tracked. Do not commit dist, node_modules, local
|
|
51
55
|
worktrees, credentials, agent state, transcripts or real test evidence.
|
|
52
56
|
|
|
@@ -58,7 +62,8 @@ from queueing. Fixtures are not real-agent evidence. Live tests require explicit
|
|
|
58
62
|
authorization, dedicated targets and independent observation; CI never uses live
|
|
59
63
|
accounts, sessions or credentials. Security reports use SECURITY.md.
|
|
60
64
|
|
|
61
|
-
Synchronize README.md, README.ko.md, README.ja.md and README.zh-CN.md.
|
|
65
|
+
Synchronize README.md, README.ko.md, README.ja.md and README.zh-CN.md. Update PARITY.md with feature/command/env/output changes, source baseline,
|
|
66
|
+
transport limits, evidence date and the relevant issue acceptance tests. Keep runtime
|
|
62
67
|
version/support status and install examples consistent. Product/source changes
|
|
63
68
|
do not authorize npm publication, production deployment or service restarts.
|
|
64
69
|
CI exercises release packaging without publishing. The manual publishing
|
package/PARITY.md
ADDED
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
# Python compatibility and npm migration
|
|
2
|
+
|
|
3
|
+
Updated 2026-09-28 KST. Python reference: **1.0.2**,
|
|
4
|
+
[`47c2371`](https://github.com/abruption/session-peer/tree/47c23713d0a2a3c11ebde6186afd8c43489b8b65/session_peer_core).
|
|
5
|
+
This matrix describes **TS 0.2.0**: unified listing, safe home selection,
|
|
6
|
+
read-only doctor, text/help/positional input, Unicode 14.0.0 name matching and
|
|
7
|
+
separately managed TS skill guidance (#16/#17/#18/#19/#25). Historical **0.1.0**
|
|
8
|
+
differences are called out explicitly. Public availability and tags must be
|
|
9
|
+
checked in the registry; this document does not assert a publication outcome.
|
|
10
|
+
SSH endpoints require the same version; unreleased source builds also require
|
|
11
|
+
the same commit. `referenceVersion: "1.0.2"` identifies the comparison baseline,
|
|
12
|
+
not complete parity. See [VALIDATION.md](VALIDATION.md) for dated evidence.
|
|
13
|
+
|
|
14
|
+
## Feature and command matrix
|
|
15
|
+
|
|
16
|
+
**Implemented** means the stated bounded behavior exists. **Partial** means a
|
|
17
|
+
related command exists with the differences shown. **Planned** means no usable
|
|
18
|
+
TS equivalent yet. **Deliberately different** identifies a maintained boundary,
|
|
19
|
+
not a missing implementation. Issue links describe work, not available features.
|
|
20
|
+
|
|
21
|
+
| Surface | Python 1.0.2 | TS source (published differences noted) | Status / follow-up |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
| Claude discovery and inbox submission | Local POSIX socket / Windows named pipe; PID or name; discovery rechecked before submission | Same transport families and recheck; Windows process start identity and authenticated pipe checks | Implemented; native fixtures are not live ACKs |
|
|
24
|
+
| `list` selection | Unified agent list; optional agent; bounded multiple Codex homes; partial discovery diagnostics | Source: combined Claude/Codex by default, optional agent/home filters, bounded multi-home inventory and partial diagnostics. Published 0.1.0 still requires an agent and explicit Codex home | Implemented in source for [#16](https://github.com/abruption/session-peer-ts/issues/16), 0.2.0; no Antigravity adapter |
|
|
25
|
+
| Codex active queue | Saved UUID, unique live writer, real lock/owner checks, pre-submit revalidation | Source: same protections, full UUID, implicit unique-live selection or explicit home; all known candidates checked | Implemented in source for [#17](https://github.com/abruption/session-peer-ts/issues/17), 0.2.0 |
|
|
26
|
+
| Implicit home / inactive queue | Select unique live home; explicit inactive opt-in under separate guards | Source: unique live selection; explicit saved inactive home with opt-in and verified inactive candidates. Public 0.1.0 has neither | Implemented in source for #17, 0.2.0; no wake/resume |
|
|
27
|
+
| `doctor` | Readiness diagnostics; return-route check is opt-in | Source: read-only local/SSH metadata, per-agent/home results, capabilities and bounded TS skill compatibility. Published 0.1.0 has no doctor | Implemented in source for [#18](https://github.com/abruption/session-peer-ts/issues/18), 0.2.0; no return-route probing |
|
|
28
|
+
| CLI input, help and names | Human text or JSON; positional or named/stdin message; Unicode casefold matching | 0.2.0: explicit JSON/text format, positional/named/stdin body, command help, exact Unicode 14.0.0 casefold with PID for ambiguity | Implemented; [#19](https://github.com/abruption/session-peer-ts/issues/19), 0.2.0. Published 0.1.0 help still says “preview”; source help now describes unified list |
|
|
29
|
+
| From / Reply-To | Caller detection, automatic return-route metadata, structured URI resolution | From uses Codex environment UUID only; explicit `--reply-address`; local/SSH Reply-To URI parsing with conflict checks | Partial; [#21](https://github.com/abruption/session-peer-ts/issues/21), 0.3.0 |
|
|
30
|
+
| SSH | Python source streamed to POSIX remote Python; multiple hosts/options/host metadata | Same-version installed TS CLI required; one host; strict preflight; JSON stdin; explicit Windows PowerShell path | Partial; [#20](https://github.com/abruption/session-peer-ts/issues/20) hosts/options, [#23](https://github.com/abruption/session-peer-ts/issues/23) deployment/version design, 0.3.0 |
|
|
31
|
+
| Updates | Cached advisory client/skill notices; explicit manager-aware update commands | No update cache/command; `--no-update-notice` accepted as a no-op | Planned [#22](https://github.com/abruption/session-peer-ts/issues/22), 0.3.0 |
|
|
32
|
+
| Reusable execution API | Agent/transport capability adapters | Package root exposes pure protocol helpers only; no general typed execution API | Planned [#24](https://github.com/abruption/session-peer-ts/issues/24), Future — Agent integrations |
|
|
33
|
+
| Skill guidance/setup | Companion `session-peer` skill targets Python | Separate `session-peer-ts` companion PR and exact-commit setup; baseline/version/help gates | Source [#25](https://github.com/abruption/session-peer-ts/issues/25), 0.2.0; no tag/publish |
|
|
34
|
+
| MCP | Optional extra, restricted destinations; separate wake permission | Unsupported | Planned [#26](https://github.com/abruption/session-peer-ts/issues/26), Future — Agent integrations |
|
|
35
|
+
| Codex wake | Explicit opt-in; platform/version gates; may run a model and alter history | Unsupported; queued does not wake or prove consumption | Planned [#27](https://github.com/abruption/session-peer-ts/issues/27), Future — Agent integrations |
|
|
36
|
+
| Antigravity | Experimental registered bridge generation/inbox contract | Unsupported | Planned [#28](https://github.com/abruption/session-peer-ts/issues/28), Future — Agent integrations |
|
|
37
|
+
| Paired device client | Optional crypto/device transport and receiver policy | Unsupported | Planned [#29](https://github.com/abruption/session-peer-ts/issues/29) design, [#30](https://github.com/abruption/session-peer-ts/issues/30)–[#32](https://github.com/abruption/session-peer-ts/issues/32), Future — Paired devices and Relay |
|
|
38
|
+
| Relay server / hosted control service | Separate infrastructure and deployment | Not part of the TS CLI deliverable | Deliberately different scope; #29 must define client boundaries before implementation |
|
|
39
|
+
| Wait / general ACK / exactly-once consumption | No general CLI wait/ACK or exactly-once consumption guarantee | No general CLI wait/ACK or exactly-once consumption guarantee | Shared limit, not a TS parity gap; paired-device deduplication is not end-to-end consumption |
|
|
40
|
+
|
|
41
|
+
Source anchors at the baselines:
|
|
42
|
+
[TS CLI](https://github.com/abruption/session-peer-ts/blob/0edc4f8ae05256698f591b7402e89cd3d5858eef/src/cli.ts),
|
|
43
|
+
[writer](https://github.com/abruption/session-peer-ts/blob/0edc4f8ae05256698f591b7402e89cd3d5858eef/src/writer.ts),
|
|
44
|
+
[send](https://github.com/abruption/session-peer-ts/blob/0edc4f8ae05256698f591b7402e89cd3d5858eef/src/send.ts),
|
|
45
|
+
[protocol](https://github.com/abruption/session-peer-ts/blob/0edc4f8ae05256698f591b7402e89cd3d5858eef/src/protocol.ts);
|
|
46
|
+
[Python parser](https://github.com/abruption/session-peer/blob/47c23713d0a2a3c11ebde6186afd8c43489b8b65/session_peer_core/cli.py),
|
|
47
|
+
[commands](https://github.com/abruption/session-peer/blob/47c23713d0a2a3c11ebde6186afd8c43489b8b65/session_peer_core/commands.py),
|
|
48
|
+
[Codex](https://github.com/abruption/session-peer/blob/47c23713d0a2a3c11ebde6186afd8c43489b8b65/session_peer_core/codex.py).
|
|
49
|
+
|
|
50
|
+
## Environment and installation ownership
|
|
51
|
+
|
|
52
|
+
| Setting / surface | TS source behavior / migration consequence |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| `CLAUDE_CONFIG_DIR`, `ANTHROPIC_CONFIG_DIR` | Claude config precedence: first nonempty value in that order, otherwise `~/.claude`. No Codex home is required for Claude listing. |
|
|
55
|
+
| `CODEX_HOME`, default `~/.codex`, macOS Orca account homes | Source: bounded automatic Codex listing and writer safety inventory. Codex send selects a unique stable live home, or validates the explicit home against all competitors. Published 0.1.0 requires it for Codex list too. No recursive disk scan. |
|
|
56
|
+
| `SESSION_PEER_CODEX_HOMES` | Source: JSON array of absolute or `~/` paths adds required listing homes and writer candidates. Invalid list configuration is rejected as a whole with other sources preserved; send keeps fail-closed inventory. Published 0.1.0 uses it only for writer checks. |
|
|
57
|
+
| `CODEX_THREAD_ID`, `CODEX_SESSION_ID` | Valid UUID enables default From metadata; `--no-from` disables it. Claude/Antigravity caller detection is not implemented. |
|
|
58
|
+
| Reply/update/Relay settings from Python | No blanket compatibility. Only the flags and environment reads in the TS baseline above are implemented. Do not infer a route or permission from an environment variable or From header. |
|
|
59
|
+
| Runtime and native dependency | TS needs Node 22.13+ within 22.x or Node 24.x, plus a matching native lock binary. Python is not a TS runtime fallback. |
|
|
60
|
+
| CLI ownership | Both distributions install `session-peer`; npm does not remove Python/uv/pipx/venv installations. Select one path deliberately and update it through its owning manager. |
|
|
61
|
+
| Skills | Install separately and explicitly; no package `postinstall` downloads a skill or invokes another package manager. |
|
|
62
|
+
|
|
63
|
+
## Source unified listing contract — #16 / 0.2.0
|
|
64
|
+
|
|
65
|
+
`node dist/cli.js list --json` combines Claude and saved Codex rows. Use
|
|
66
|
+
`--agent claude` to skip all Codex inventory, or `--agent codex` to skip Claude.
|
|
67
|
+
`--codex-home PATH` pins only Codex discovery (also in a combined list) and
|
|
68
|
+
bypasses unrelated environment/Orca/configuration errors. It is inapplicable to
|
|
69
|
+
`--agent claude`. A configured empty string is invalid JSON: unset
|
|
70
|
+
`SESSION_PEER_CODEX_HOMES` or use `[]` to disable extra homes.
|
|
71
|
+
|
|
72
|
+
Automatic sources are visited in order: default `~/.codex`, nonempty `CODEX_HOME`,
|
|
73
|
+
immediate macOS Orca account homes, then `SESSION_PEER_CODEX_HOMES`. Canonical
|
|
74
|
+
aliases merge source labels; UUIDs in distinct homes stay distinct. Every Codex
|
|
75
|
+
row includes `codexHome` and `stateDb`; identity is host + canonical home + UUID.
|
|
76
|
+
Rows sort by descending `updatedAt`, home and UUID using Unicode code-point
|
|
77
|
+
ordering. `--all` independently includes archived records in every home and
|
|
78
|
+
unreachable Claude records. Discovery success does not imply an active writer.
|
|
79
|
+
|
|
80
|
+
Per-home `status` is `ok`, `absent` or `error`; missing optional default/Orca DBs
|
|
81
|
+
are `absent`. Missing argument/environment/configured homes are errors, even
|
|
82
|
+
when they alias an optional source. Empty readable DBs are `ok` with zero rows.
|
|
83
|
+
Aggregate Codex status is `not_installed` only when no DB is readable and there
|
|
84
|
+
are no errors; that is exit 0. Any inventory/home/agent failure yields exit 1
|
|
85
|
+
while preserving other rows. Error codes are `state_db_missing`,
|
|
86
|
+
`state_db_not_regular`, `permission_denied`, `state_db_read_failed`,
|
|
87
|
+
`home_resolution_failed`, `candidate_enumeration_failed`, or
|
|
88
|
+
`invalid_home_configuration`. Errors use fixed text, never raw exception bodies.
|
|
89
|
+
Inventory errors appear in `discovery.codex.errors`; per-home errors in `homes`.
|
|
90
|
+
Top-level `codexHome` appears only for exactly one candidate and no inventory
|
|
91
|
+
errors; consumers should use each row's home.
|
|
92
|
+
|
|
93
|
+
The same listing and filters execute in the SSH destination's environment;
|
|
94
|
+
nonzero partial responses retain rows and diagnostics. No recursive scan,
|
|
95
|
+
inbox connection, writer selection or queue submission is part of listing.
|
|
96
|
+
SQLite is read-only but its existing WAL bookkeeping caveat still applies.
|
|
97
|
+
Listing availability never relaxes send's lock/owner/revalidation checks.
|
|
98
|
+
The shared enumerators reject a set empty extra-home variable and require named
|
|
99
|
+
homes for both list and send. Listing may return partial results; send refuses
|
|
100
|
+
any unreadable inventory and never uses listing results as authorization.
|
|
101
|
+
Pinned listing bypasses unrelated configuration, but pinned send checks all sources.
|
|
102
|
+
|
|
103
|
+
Source: [discovery.ts](https://github.com/abruption/session-peer-ts/blob/main/src/discovery.ts),
|
|
104
|
+
[CLI](https://github.com/abruption/session-peer-ts/blob/main/src/cli.ts),
|
|
105
|
+
[writer](https://github.com/abruption/session-peer-ts/blob/main/src/writer.ts).
|
|
106
|
+
Contracts: [discovery.test.ts](https://github.com/abruption/session-peer-ts/blob/main/test/discovery.test.ts)
|
|
107
|
+
ports Python unified/multi-home cases; native Windows SSH/partial-envelope checks
|
|
108
|
+
are in [windows-contract.test.ts](https://github.com/abruption/session-peer-ts/blob/main/test/windows-contract.test.ts).
|
|
109
|
+
The Python oracle runs in POSIX CI; deterministic fixtures and injected filesystem
|
|
110
|
+
failures run on Windows too. Error injection is not a real Windows ACL test.
|
|
111
|
+
|
|
112
|
+
## JSON result compatibility
|
|
113
|
+
|
|
114
|
+
Do not parse human messages or assume an optional key exists. Python's
|
|
115
|
+
`schemaVersion: 1` and TS's `schemaVersion: 1` are not identical field contracts.
|
|
116
|
+
TS normal envelopes have `schemaVersion`, `host`, `command`, `ok`, `version`,
|
|
117
|
+
`referenceVersion`; caught failures omit the two version fields. Exit codes are
|
|
118
|
+
0 (success), 1 (operation error), 2 (usage/refusal as classified by the command).
|
|
119
|
+
|
|
120
|
+
| Field / path | Python 1.0.2 | TS (source differences noted) |
|
|
121
|
+
| --- | --- | --- |
|
|
122
|
+
| `list.sessions`, `discovery` | Unified/per-agent and per-home diagnostics; partial results can remain with `ok:false` | Source: Claude rows then Codex rows; readable homes survive failed homes/agents with `ok:false`, exit 1. Published 0.1.0 has only selected-agent/single-home results |
|
|
123
|
+
| `send.status`, `submitted` | Submission/wake/transport-specific details; do not assume a uniform error shape | `validated:false`, `posted:true` (Claude), `queued:true` (Codex); caught refusal is `refused:false`, unknown is `unknown:null` |
|
|
124
|
+
| `consumptionConfirmed` | False for native submission; queueing is not consumption | Always false on send results, including refusal/unknown |
|
|
125
|
+
| `target`, `chars`, `dryRun`, `codexHome` | Target and home details depend on agent; Codex target includes `id`/`name`, with separate `agent` | Success/dry-run target has `agent` plus `id` or `pid`/`name`; `chars` counts enveloped code points; `codexHome` only on Codex success/dry-run |
|
|
126
|
+
| `queueId` | Present if native queue stdout supplies an ID | Source #17: optional bounded native confirmation ID on successful queue only; absent in public 0.1.0 |
|
|
127
|
+
| `codexHomeResolution` | Resolution diagnostics on Codex success and some refusals | Source #17: sanitized resolution on success and failures after resolution begins; private owner fingerprints remain internal. Absent in public 0.1.0 |
|
|
128
|
+
| `remoteVersion` | Optional remote `list` metadata after version discovery (also update diagnostics); not universal on send | Absent; exact TS version banner must pass preflight; mismatch is a refusal |
|
|
129
|
+
| `replyRoute`, `addressResolution` | Optional metadata when route advertised / Reply-To destination resolved | Absent; explicit envelope/URI support does not imply these JSON fields |
|
|
130
|
+
| `wake` | Optional, opt-in; failed activation may still have `submitted:true` and `ok:false` | Absent; unsupported option |
|
|
131
|
+
| SSH metadata | Requested/resolved host and SSH metadata; multi-host list may be an array | Verified remote response adds `host`/`sshHost`; caught local SSH failure reports the local host; no host aggregation |
|
|
132
|
+
| `error`, `retryAllowed` | Error/detail fields vary by path; submission may already have happened | Fixed error codes, caught failure has `retryAllowed:false`; native stderr/message body are not copied into errors |
|
|
133
|
+
| `clientUpdate`, `skillUpdates` | Optional advisory notice metadata | Absent |
|
|
134
|
+
|
|
135
|
+
An **absent** submission field is not `false`; `null` is not `false` either.
|
|
136
|
+
Check `ok`, command, status, exit code and presence separately. TS unknown means
|
|
137
|
+
submission may have happened; never automatically resend. A Python wake error
|
|
138
|
+
with `submitted:true` must not be retried as a fresh send. A missing reply or target exit
|
|
139
|
+
alone does not establish consumption or failure. Observe ACK in the receiver
|
|
140
|
+
TUI separately. Further #20 changes must test success, refused, partial and
|
|
141
|
+
unknown output, including absent/null/false distinctions.
|
|
142
|
+
|
|
143
|
+
Output sources: TS CLI/send above; Python
|
|
144
|
+
[commands](https://github.com/abruption/session-peer/blob/47c23713d0a2a3c11ebde6186afd8c43489b8b65/session_peer_core/commands.py),
|
|
145
|
+
[Codex queue/wake](https://github.com/abruption/session-peer/blob/47c23713d0a2a3c11ebde6186afd8c43489b8b65/session_peer_core/codex.py),
|
|
146
|
+
[SSH errors](https://github.com/abruption/session-peer/blob/47c23713d0a2a3c11ebde6186afd8c43489b8b65/session_peer_core/ssh.py).
|
|
147
|
+
|
|
148
|
+
## Transport, size and failure boundaries
|
|
149
|
+
|
|
150
|
+
| Boundary | Python 1.0.2 | TS (source differences noted) |
|
|
151
|
+
| --- | --- | --- |
|
|
152
|
+
| Remote prerequisite | POSIX-compatible remote shell and usable Python; source delivered over stdin. Native Windows destination is not this SSH path | Installed same-version TS CLI + supported Node/native dependency. POSIX shell by default; explicit `--remote-platform win32` uses PowerShell and a `.cmd` launcher |
|
|
153
|
+
| Message on SSH | Base64 body in quoted remote argv; source on stdin | Message in UTF-8 stdin JSON; PowerShell's encoded command contains launcher/flag, not the message |
|
|
154
|
+
| Remote body/command | 90,000-character remote message cap; fully quoted UTF-8 SSH command capped at 131,071 bytes after base64/argument expansion | Stdin reader capped at 4,100,000 bytes, including JSON framing/escaping. No unlimited stream; OS argv limits still apply when invoking native queue |
|
|
155
|
+
| General message | At most 1,000,000 characters; Codex at most 32 KiB UTF-8 | At most 1,000,000 Unicode code points; Codex at most 32,768 UTF-8 bytes; rejects blank/NUL |
|
|
156
|
+
| Envelope overhead | From/Reply-To and encoding may reduce usable body budget | Limits apply after From/Reply-To envelope creation; JSON escaping can exhaust wire budget sooner |
|
|
157
|
+
| Preflight and refusal | Source transport and path-specific diagnostics, not exact installed-TS preflight | Before message dispatch, version mismatch/auth/host trust/unreachable/timeout produce fixed refusal codes and `submitted:false` |
|
|
158
|
+
| After dispatch | Respect submission metadata; failed wake/transport does not prove nothing was submitted | Lost/malformed/unverified response or nonzero/timed-out native queue after spawn is unknown with `submitted:null`, no automatic retry |
|
|
159
|
+
|
|
160
|
+
Sources: Python
|
|
161
|
+
[limits](https://github.com/abruption/session-peer/blob/47c23713d0a2a3c11ebde6186afd8c43489b8b65/session_peer_core/common.py),
|
|
162
|
+
[SSH construction](https://github.com/abruption/session-peer/blob/47c23713d0a2a3c11ebde6186afd8c43489b8b65/session_peer_core/ssh.py);
|
|
163
|
+
TS CLI/send above. UTF-8 byte limits are not character counts. Local native
|
|
164
|
+
Windows support, WSL/POSIX SSH and TS native Windows SSH are separate paths.
|
|
165
|
+
|
|
166
|
+
## Migrating a workflow to npm
|
|
167
|
+
|
|
168
|
+
1. **Inspect command ownership.** Run `type -a session-peer` (POSIX) or
|
|
169
|
+
`Get-Command session-peer -All` (PowerShell), then `session-peer --version`.
|
|
170
|
+
Record the Python interpreter/venv or owning uv/pipx/package manager before
|
|
171
|
+
changing PATH. Do not delete another manager's files or overwrite its shim.
|
|
172
|
+
2. **Install the chosen version explicitly after checking registry availability.** For 0.2.0:
|
|
173
|
+
`npm install --global --ignore-scripts session-peer@0.2.0`.
|
|
174
|
+
Verify the resolved command/version again. An isolated npm prefix and explicit
|
|
175
|
+
launcher path allow side-by-side evaluation. Install any desired skill
|
|
176
|
+
separately using the exact reviewed commit, explicit agent and scope in the
|
|
177
|
+
[README](README.md#agent-skill-explicit-installation). The original companion
|
|
178
|
+
`session-peer` skill targets Python; use distinct `session-peer-ts` guidance.
|
|
179
|
+
Check implementation and supported help; 0.1.0 development builds historically shared their version string with the public baseline.
|
|
180
|
+
3. **Make selection and output explicit.** Replace bare `list` with
|
|
181
|
+
`session-peer list --agent claude --json`, or
|
|
182
|
+
`session-peer list --agent codex --codex-home /absolute/home --json`.
|
|
183
|
+
Use a full Codex UUID; preserve the discovered home when selecting a row.
|
|
184
|
+
Unicode names use exact Unicode 14.0.0 casefold; use PID for collisions.
|
|
185
|
+
Supply one positional body, `--message`, or UTF-8 stdin. Keep `--json` for
|
|
186
|
+
machine consumers. 0.2.0 also supports combined listing and text output.
|
|
187
|
+
4. **Validate before submission.** Use `send ... --json --dry-run`. Review the
|
|
188
|
+
target/home, then remove `--dry-run` only for an intended submission. Check
|
|
189
|
+
posted/queued separately from receiver ACK; do not retry unknown outcomes.
|
|
190
|
+
Do not test migration against unrelated live sessions.
|
|
191
|
+
5. **Migrate each SSH endpoint deliberately.** Install the exact same TS version
|
|
192
|
+
remotely; Python's same-named CLI does not pass TS preflight. Set an absolute
|
|
193
|
+
`--remote-bin` where PATH is ambiguous; for Windows add
|
|
194
|
+
`--remote-platform win32` and the `.cmd` path. Retain existing SSH host trust
|
|
195
|
+
and authentication; a control socket is not new authorization. Account for
|
|
196
|
+
the size limits above and lack of multi-host aggregation.
|
|
197
|
+
6. **Keep unsupported workflows on an explicit Python path.** Updates,
|
|
198
|
+
MCP, wake, Antigravity and paired devices need their existing implementation
|
|
199
|
+
until their issues are delivered. Doctor is available in 0.2.0; 0.1.0 lacked this command. Updating npm does not update Python, skills,
|
|
200
|
+
external Relay infrastructure or a remote host automatically. To return to
|
|
201
|
+
Python, select its recorded path or uninstall only the npm-owned installation.
|
|
202
|
+
|
|
203
|
+
## Evidence and ongoing maintenance
|
|
204
|
+
|
|
205
|
+
| Evidence class | What it establishes | What it does not establish |
|
|
206
|
+
| --- | --- | --- |
|
|
207
|
+
| Baseline source review above | Implemented branches, flags, bounds and optional fields at pinned SHAs | Behavior of a different release or a live destination |
|
|
208
|
+
| POSIX CI fixtures | Read-only SQLite/reference discovery, real local fixture locks/sockets, CLI/SSH failure contracts, packaging on Node 22/24 | Live model consumption or all OS/architecture combinations |
|
|
209
|
+
| Windows CI native fixtures | x64 Node 22/24: real kernel locks, Restart Manager PID/SID/start evidence, ownership/revalidation races, queue fixture, actual PowerShell/.cmd with fake SSH endpoint, installed native binary/package checks | Real network SSH authentication, real Codex queue acceptance, Windows arm64, receiver ACK |
|
|
210
|
+
| Dedicated live observations | Only the recorded target/runtime/OS/arch and observed submission/ACK in [VALIDATION.md](VALIDATION.md#real-tui-and-ssh-checks) | General qualification of all builds/agents; fixture pass is never ACK |
|
|
211
|
+
| Public registry checks | Exact package hashes, provenance/signature metadata and isolated installation for the recorded release | Live-agent delivery or consumption |
|
|
212
|
+
|
|
213
|
+
The implemented rows map to these repeatable checks:
|
|
214
|
+
|
|
215
|
+
- [conformance.test.ts](https://github.com/abruption/session-peer-ts/blob/main/test/conformance.test.ts): Claude/Codex discovery against the pinned Python oracle, unsupported schema/row/command refusal, empty-PATH runtime.
|
|
216
|
+
- [transport.test.ts](https://github.com/abruption/session-peer-ts/blob/main/test/transport.test.ts): real POSIX inbox, guarded queue, wrong/competing writer, unknown native outcome, inert Reply-To, host boundaries, SSH preflight/framing/loss.
|
|
217
|
+
- [windows.test.ts](https://github.com/abruption/session-peer-ts/blob/main/test/windows.test.ts) and [windows-contract.test.ts](https://github.com/abruption/session-peer-ts/blob/main/test/windows-contract.test.ts): the bounded Windows native contracts described above.
|
|
218
|
+
- [input-boundaries.test.ts](https://github.com/abruption/session-peer-ts/blob/main/test/input-boundaries.test.ts): exact 1,000,000-code-point / 32,768-byte message bounds, envelope overhead, 4,100,000-byte escaped JSON wire bound and invalid UTF-8 refusal. Python SSH limits are source-inspected here; these TS tests do not exercise the Python transport.
|
|
219
|
+
- [types.test.ts](https://github.com/abruption/session-peer-ts/blob/main/test/types.test.ts), [package-smoke.ts](https://github.com/abruption/session-peer-ts/blob/main/test/package-smoke.ts), [release.test.ts](https://github.com/abruption/session-peer-ts/blob/main/test/release.test.ts): pure typed helpers, package/native loading, artifact and publication gates. They do not test future update/provisioning implementations.
|
|
220
|
+
|
|
221
|
+
Windows expansion belongs to [#34](https://github.com/abruption/session-peer-ts/issues/34);
|
|
222
|
+
this matrix belongs to [#33](https://github.com/abruption/session-peer-ts/issues/33).
|
|
223
|
+
Each feature PR must update its rows, sources, evidence date and affected README
|
|
224
|
+
languages. Changes to JSON, env, defaults, runtime/remote requirements or packaging
|
|
225
|
+
must include the corresponding acceptance tests. Keep planned features distinct
|
|
226
|
+
from supported behavior and deliberate exclusions; milestone assignment is not
|
|
227
|
+
a release commitment. Recheck the exact packaged copy during release review.
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
## Source Codex home selection — #17 / 0.2.0
|
|
231
|
+
|
|
232
|
+
This is 0.2.0 behavior; it does not change the immutable npm 0.1.0 archive. `send --to codex:UUID` selects only a unique stable live writer across
|
|
233
|
+
bounded known homes. `--codex-home` pins the destination but still inventories
|
|
234
|
+
competitors. A unique live writer without a saved row yields
|
|
235
|
+
`thread_not_yet_persisted`; an unknown owner or multiple live writers refuses.
|
|
236
|
+
An unsaved live competitor is checked too. Listing does not authorize sending.
|
|
237
|
+
|
|
238
|
+
`--allow-inactive-codex-home` requires an explicit home (including a home in a
|
|
239
|
+
Reply-To URI), a saved thread there, and all candidates verified inactive.
|
|
240
|
+
Ordinary inactive sends retain `error: inactive_writer` with resolution reason
|
|
241
|
+
`inactive_queue_requires_opt_in`. No wake, resume, native DB write, wait or ACK
|
|
242
|
+
is added. Dry-run validates once and submits zero messages. Actual submission
|
|
243
|
+
re-enumerates and compares all candidates, saved-row presence, DB file identity,
|
|
244
|
+
lock-file identity and live owner evidence immediately before one native queue
|
|
245
|
+
call. Evidence changes refuse; changes after the final check remain an OS/native
|
|
246
|
+
queue race, not an exactly-once guarantee. Post-spawn failures remain unknown,
|
|
247
|
+
`submitted: null`, `retryAllowed: false`; a queue ID is not an ACK.
|
|
248
|
+
|
|
249
|
+
| Home/configuration | Source send behavior |
|
|
250
|
+
| --- | --- |
|
|
251
|
+
| Unset `SESSION_PEER_CODEX_HOMES`, or `[]` | No extra candidates |
|
|
252
|
+
| Empty/whitespace, malformed JSON, relative/non-string/NUL array entry | Reject entire configuration, even with explicit destination |
|
|
253
|
+
| Absolute or `~/` array entries | Canonicalized, deduplicated, required homes |
|
|
254
|
+
| Explicit argument, nonempty `CODEX_HOME`, configured home missing DB | `home_inventory_unreadable`; candidate `state_db_missing` |
|
|
255
|
+
| Optional default/Orca home missing DB | Allowed as absent, but requested UUID lock still checked |
|
|
256
|
+
| Unreadable DB, unresolved path, unknown writer | Refuse; never skip a competitor using partial results |
|
|
257
|
+
|
|
258
|
+
Migration from 0.1.0: unset an empty `SESSION_PEER_CODEX_HOMES` or set it to `[]`;
|
|
259
|
+
remove stale `CODEX_HOME` instead of relying on its missing DB being ignored.
|
|
260
|
+
These guards are stricter than Python 1.0.2's selected-missing-DB exemption and
|
|
261
|
+
saved-match writer inspection: this source checks even unsaved competitors.
|
|
262
|
+
|
|
263
|
+
`codexHomeResolution` has `schemaVersion: 1`, `status` (`selected`, `explicit`,
|
|
264
|
+
`ambiguous`, `unknown`), canonical `selected` or null, fixed `reason`, and
|
|
265
|
+
`candidates`. Each candidate has `codexHome`, `sources`, `savedThread`
|
|
266
|
+
(boolean/null), `writerLock` (`not_checked`, `held`, `free`, `absent`, `unknown`),
|
|
267
|
+
optional `activity`, and fixed `reason`. Uninspected candidates remain explicit.
|
|
268
|
+
No raw subprocess stdout/stderr, PID start fingerprint, UID or command is exported.
|
|
269
|
+
Errors before home resolution (invalid options/message or missing executable)
|
|
270
|
+
need not include this field. SSH resolves on the destination and preserves these
|
|
271
|
+
fields on verified responses; response loss cannot supply trusted diagnostics.
|
|
272
|
+
|
|
273
|
+
`queueId` is included only when successful native stdout contains exactly one
|
|
274
|
+
line `Queued message ID for thread UUID.` for the requested UUID. ID must be
|
|
275
|
+
1–128 ASCII alphanumeric/`.`/`_`/`:`/`-` characters, starting alphanumeric.
|
|
276
|
+
Missing, malformed or multiple confirmations omit the field without retrying or
|
|
277
|
+
changing successful queue status. Failed native processes never expose an ID.
|
|
278
|
+
|
|
279
|
+
Contracts: `test/codex-homes.test.ts`, `test/transport.test.ts` and
|
|
280
|
+
`test/windows-contract.test.ts`. These are fixtures, not real recipient ACKs.
|
|
281
|
+
|
|
282
|
+
## Source read-only doctor — #18 / 0.2.0
|
|
283
|
+
|
|
284
|
+
Evidence date: 2026-09-28. `doctor --json [--agent claude|codex]` supports local
|
|
285
|
+
inspection and the existing version-checked SSH/stdin JSON transport. Published
|
|
286
|
+
npm 0.1.0 does not contain this command. Both SSH endpoints must use the same
|
|
287
|
+
0.2.0 build; development checkouts should also match commits.
|
|
288
|
+
|
|
289
|
+
`ok:true`, exit 0 and `diagnosticCompleted:true` mean the diagnostic command
|
|
290
|
+
completed, including when agents are unavailable. `ready` is a metadata
|
|
291
|
+
precondition summary for the selected agents, **not authorization to send**.
|
|
292
|
+
Per-agent results remain in `agents`; per-home Codex results retain source labels,
|
|
293
|
+
required/optional status and missing, permission, unsupported-schema or unknown
|
|
294
|
+
codes. Explicit doctor home inspection bypasses unrelated inventory, like list;
|
|
295
|
+
it does not replace send's stricter competitor checks. Codex executable paths
|
|
296
|
+
are inspected for accessibility and never executed, even with `--codex-bin`.
|
|
297
|
+
An accessible DB and executable do not verify a live writer (`writerVerified:false`).
|
|
298
|
+
|
|
299
|
+
Claude checks bounded numeric session records (regular files, maximum 64 KiB),
|
|
300
|
+
process identity and inbox metadata. POSIX checks the socket file; Windows checks
|
|
301
|
+
process identity and a named-pipe advertisement, **not pipe existence or availability
|
|
302
|
+
for connection**. `verification` states this distinction. Invalid records and
|
|
303
|
+
unknown/permission inspections are counted. There is no inbox connection, queue
|
|
304
|
+
submission, lock acquisition, chmod, configuration mutation, wake, login, or
|
|
305
|
+
credential read. Native process arguments, stderr and session names/bodies are
|
|
306
|
+
not emitted. Host/home and executable paths are intentionally reported.
|
|
307
|
+
|
|
308
|
+
`capabilities` describes implementation support: `list/send/doctor:true`,
|
|
309
|
+
`wake/wait/ack/consumptionConfirmation:false`, `agents:[claude,codex]`,
|
|
310
|
+
`transports:[local,ssh]`; `implementation:typescript` distinguishes runtime identity.
|
|
311
|
+
These are implementation capabilities, not evidence of agent readiness or ACK.
|
|
312
|
+
|
|
313
|
+
`skills` inspects only `~/.agents/skills/session-peer-ts/SKILL.md` and
|
|
314
|
+
`<explicit home, CODEX_HOME, or ~/.codex>/skills/session-peer-ts/SKILL.md`.
|
|
315
|
+
No skill installation or reference traversal occurs. The #25 TS skill contract
|
|
316
|
+
requires metadata version/min/full `0.1.0`, implementation `typescript`, and
|
|
317
|
+
capability policy `probe-help`; missing/malformed/incompatible metadata is
|
|
318
|
+
reported separately and does not change agent readiness. This conservative
|
|
319
|
+
metadata check does not certify instruction content. Generic Python
|
|
320
|
+
`session-peer` skills are not inferred compatible. No `--check-reply-to` probe
|
|
321
|
+
or general reply-observation API is implemented.
|
|
322
|
+
|
|
323
|
+
Acceptance evidence: `test/diagnostics.test.ts` ports Python diagnostic cases for
|
|
324
|
+
missing homes/tools, unsupported schema, per-home results, permission/unknown
|
|
325
|
+
boundaries, invalid/stale session records, read-only inspection and unavailable
|
|
326
|
+
inbox; adds source capabilities, bounded skill metadata, stdio and POSIX SSH
|
|
327
|
+
fixtures. `test/windows-contract.test.ts` checks doctor through real encoded
|
|
328
|
+
PowerShell/.cmd fixture SSH, without queue dispatch. Fixture evidence is not a
|
|
329
|
+
live-agent or delivery/consumption test.
|
|
330
|
+
|
|
331
|
+
## Source CLI usability — issue #19 (2026-09-28)
|
|
332
|
+
|
|
333
|
+
Version 0.2.0 adds full list/send/doctor help, text rendering and one positional
|
|
334
|
+
message. The matrix distinguishes this from historical 0.1.0. The explicit
|
|
335
|
+
output requirement is retained: `--json` or `--output-format json|text`; no default
|
|
336
|
+
format changes. No selector retains `json_output_required` for compatibility.
|
|
337
|
+
Conflicting selectors and all parse errors produce one JSON refusal before stdin
|
|
338
|
+
reads/discovery/send. Valid text requests render execution errors as text. Remote
|
|
339
|
+
wire requests require JSON even when the caller selects local text output.
|
|
340
|
+
Partial discovery preserves rows, diagnostics and nonzero exit status. Terminal
|
|
341
|
+
control characters in text labels are escaped; JSON is unchanged.
|
|
342
|
+
|
|
343
|
+
One positional body, named body or stdin is accepted; combining sources refuses
|
|
344
|
+
before reading stdin. `--` terminates option parsing. Empty or whitespace input
|
|
345
|
+
is rejected before envelope construction. Existing input/transport budgets and
|
|
346
|
+
unknown outcome/no retry boundaries remain.
|
|
347
|
+
|
|
348
|
+
Claude exact name matching uses Unicode **14.0.0** `CaseFolding.txt` C/F mappings
|
|
349
|
+
(default non-Turkic full casefold), pinned independently of Node ICU and Python's
|
|
350
|
+
runtime Unicode version. No normalization or fuzzy comparison occurs. ß/ss,
|
|
351
|
+
Greek sigma and ligature collisions require PID selection. Unicode data source
|
|
352
|
+
and SHA-256 are recorded in `src/casefold.ts`; regenerate offline with
|
|
353
|
+
`node scripts/generate-casefold.mjs /path/to/CaseFolding.txt` (hash enforced). The package includes
|
|
354
|
+
`UNICODE-LICENSE.txt`. Python builds with newer Unicode databases can differ for
|
|
355
|
+
characters added after 14.0.0; this is not a blanket future-Unicode parity claim.
|
|
356
|
+
`test/cli-usability.test.ts` covers format/help/input/error boundaries, real local
|
|
357
|
+
name/PID selection with collisions, and text escaping on all CI platforms.
|
|
358
|
+
|
|
359
|
+
## Source TS skill guidance — #25 / 0.2.0
|
|
360
|
+
|
|
361
|
+
Evidence date: 2026-09-28. TS CLI baseline for this work is `8289da7`; companion
|
|
362
|
+
candidate is [`081cc3c1d16a394bd92824333f4bc61c36951799`](https://github.com/abruption/session-peer-skill/tree/081cc3c1d16a394bd92824333f4bc61c36951799/session-peer-ts).
|
|
363
|
+
This is separately reviewed source, not a skill tag or npm release. Published
|
|
364
|
+
npm 0.1.0 remains unchanged. There is no runtime setup subcommand: user-invoked
|
|
365
|
+
Skills CLI 1.7.0 is the reviewed setup path, with an exact commit, explicit agent,
|
|
366
|
+
and explicit project/user scope chosen before running the documented command.
|
|
367
|
+
|
|
368
|
+
- Ownership: resolve the PATH launcher, require `session-peer X.Y.Z (typescript)`,
|
|
369
|
+
then capture that launcher's help. Python's `referenceVersion` is not a feature
|
|
370
|
+
guarantee. Baseline examples retain explicit agent, Codex home and JSON flags.
|
|
371
|
+
- Development capabilities: `doctor`, implicit home selection and inactive opt-in
|
|
372
|
+
require affirmative help support. When top-level help advertises per-command
|
|
373
|
+
help, inspect `send --help` for send flags and `doctor --help` for the supported
|
|
374
|
+
doctor command. Mere mention in an unsupported list does not enable a feature.
|
|
375
|
+
Skill minimum/full runtime metadata mean baseline
|
|
376
|
+
support, not support for every conditional option. No assumption of wake,
|
|
377
|
+
Antigravity, Relay, MCP or general wait support is imported from Python.
|
|
378
|
+
- Workflow: fresh list → preserve exact home/PID → dry-run → one authorized send.
|
|
379
|
+
Reply URIs remain data, `queued` is not ACK, and `unknown` never permits retry.
|
|
380
|
+
- Metadata contract: separate `session-peer-ts/SKILL.md`, skill version `0.1.0`,
|
|
381
|
+
`runtime-implementation: "typescript"`, `runtime-min-version: "0.1.0"`,
|
|
382
|
+
`runtime-full-version: "0.1.0"`, `runtime-capability-policy: "probe-help"`.
|
|
383
|
+
Missing or incompatible skills can be diagnosed independently of transport
|
|
384
|
+
readiness; the runtime never executes instructions merely to inspect metadata.
|
|
385
|
+
- Lifecycle: no npm hooks, downloads, automatic update or overwrite of the Python
|
|
386
|
+
skill. Pinned update repeats `add` for another reviewed commit after inspecting
|
|
387
|
+
local edits. `skills update` follows a moving source and is not this workflow.
|
|
388
|
+
- Acceptance evidence: `test/diagnostics.test.ts` already tests the exact
|
|
389
|
+
companion metadata contract as compatible without executing or exposing the
|
|
390
|
+
skill body; compatibility does not authorize sending.
|
|
391
|
+
`test/skill-guidance.test.ts` exercises baseline JSON list,
|
|
392
|
+
selected-home dry-run refusal and gated explicit inactive dry-run in disposable
|
|
393
|
+
SQLite homes; no submission occurs. Companion `scripts/test-ts-skill.mjs`
|
|
394
|
+
exercises real Skills CLI project/global install, replacement-update, list and
|
|
395
|
+
removal for Codex/Claude Code while preserving a Python skill fixture. Those
|
|
396
|
+
are installation/contract fixtures, not live-agent delivery or ACK evidence.
|