session-peer 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PARITY.md +329 -18
- package/README.ja.md +13 -5
- package/README.ko.md +13 -5
- package/README.md +13 -4
- package/README.zh-CN.md +12 -4
- package/RELEASING.md +109 -7
- package/SECURITY.md +1 -1
- package/VALIDATION.md +277 -7
- package/dist/cli.d.ts +10 -1
- package/dist/cli.js +288 -45
- package/dist/diagnostics.d.ts +2 -0
- package/dist/diagnostics.js +1 -1
- package/dist/discovery.js +39 -3
- package/dist/help.js +32 -5
- package/dist/output.d.ts +1 -1
- package/dist/output.js +30 -1
- package/dist/process.js +76 -5
- package/dist/protocol.d.ts +6 -3
- package/dist/protocol.js +21 -6
- package/dist/replies.d.ts +30 -0
- package/dist/replies.js +283 -0
- package/dist/ssh.d.ts +24 -0
- package/dist/ssh.js +114 -0
- package/dist/updates.d.ts +37 -0
- package/dist/updates.js +444 -0
- package/dist/windows.d.ts +1 -1
- package/dist/windows.js +4 -3
- package/dist/writer.js +5 -3
- package/docs/api.md +4 -4
- package/docs/design/remote-deployment.md +867 -0
- package/docs/guide.ja.md +118 -15
- package/docs/guide.ko.md +218 -22
- package/docs/guide.md +254 -23
- package/docs/guide.zh-CN.md +105 -14
- package/docs/shorthand.md +198 -0
- package/package.json +6 -4
- package/shorthand/sp.ps1 +11 -0
- package/shorthand/sp.sh +11 -0
package/docs/api.md
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
[Back to README](../README.md) · [User guide](guide.md)
|
|
4
4
|
|
|
5
5
|
The package exposes a small ESM API with TypeScript declarations. Install it
|
|
6
|
-
locally with `npm install --ignore-scripts session-peer@0.
|
|
6
|
+
locally with `npm install --ignore-scripts session-peer@0.3.1` before importing it.
|
|
7
7
|
Importing the package does not execute the CLI or submit a message.
|
|
8
8
|
|
|
9
9
|
```js
|
|
10
10
|
import { VERSION, VERSION_LINE, reply, envelope } from 'session-peer';
|
|
11
11
|
|
|
12
|
-
console.log(VERSION); // 0.
|
|
13
|
-
console.log(VERSION_LINE); // session-peer 0.
|
|
12
|
+
console.log(VERSION); // 0.3.1
|
|
13
|
+
console.log(VERSION_LINE); // session-peer 0.3.1 (typescript)
|
|
14
14
|
const address = 'session-peer://v1/reply?agent=claude&session=12345&transport=local';
|
|
15
15
|
console.log(reply(address)); // { to: '12345' }
|
|
16
16
|
console.log(envelope('Please review and reply.', true, address));
|
|
@@ -21,7 +21,7 @@ console.log(envelope('Please review and reply.', true, address));
|
|
|
21
21
|
| `VERSION` | Package version string. |
|
|
22
22
|
| `VERSION_LINE` | CLI version string including the TypeScript marker. |
|
|
23
23
|
| `reply(uri)` | Parse a supported Reply-To URI into `{ to, host?, home? }`; throw on invalid input. Parsing does not discover or authorize the destination. |
|
|
24
|
-
| `envelope(text, noFrom, address?)` | Trim leading/trailing newlines, optionally prepend
|
|
24
|
+
| `envelope(text, noFrom, address?, sender?)` | Trim leading/trailing newlines, optionally prepend sender metadata, and append a validated Reply-To URI. `sender` is `{ agent, id }` or `null` for none; when omitted, a valid Codex UUID from the environment is used. Returns text only. |
|
|
25
25
|
|
|
26
26
|
The example uses a placeholder PID and performs no delivery. These helpers do
|
|
27
27
|
not verify a live writer, establish a return route, or confirm consumption.
|