cc-peer 1.1.3 → 1.1.5
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.md +7 -3
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -42,15 +42,19 @@ peer.on("message", (m) => console.log(`${m.fromName ?? m.from}: ${m.body}`));
|
|
|
42
42
|
peer.on("receipt", (r) => console.log(`status: ${r.status}`));
|
|
43
43
|
|
|
44
44
|
const sessions = await peer.roster();
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
await peer.
|
|
45
|
+
const first = sessions.find((s) => s.name === "claude");
|
|
46
|
+
if (first !== undefined) {
|
|
47
|
+
const { msgId } = await peer.send({ pid: first.pid }, "hello from my app");
|
|
48
|
+
await peer.subscribeIdle({ pid: first.pid });
|
|
49
|
+
}
|
|
48
50
|
peer.on("idle", (n) => console.log(`session ${n.state}`));
|
|
49
51
|
|
|
50
52
|
// …later
|
|
51
53
|
await peer.stop();
|
|
52
54
|
```
|
|
53
55
|
|
|
56
|
+
Every release is also mirrored to the GitHub Packages registry as `@exadev/cc-peer` (GitHub Packages requires owner-scoped names), and single-executable binaries for every platform/architecture pair ship as release assets.
|
|
57
|
+
|
|
54
58
|
The REST facade (`npx cc-peer`) serves `GET /sessions`, `POST /messages`, `POST /idle-subscriptions`, `GET /events` (SSE), and a self-describing `GET /openapi.json` on loopback with a bearer token.
|
|
55
59
|
|
|
56
60
|
## Limitations
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-peer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Communicate with local Claude Code instances over their native cross-session peer messaging: send and receive messages, register as a named discoverable peer, receipts, idle subscriptions, and a REST facade via `npx cc-peer`.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,8 +56,9 @@
|
|
|
56
56
|
"test": "vitest run",
|
|
57
57
|
"test:watch": "vitest",
|
|
58
58
|
"test:mutation": "stryker run",
|
|
59
|
-
"prepublishOnly": "pnpm lint && pnpm typecheck && pnpm test && pnpm build && publint && attw --pack",
|
|
60
|
-
"prepare": "husky"
|
|
59
|
+
"prepublishOnly": "pnpm lint && pnpm typecheck && pnpm test:coverage && pnpm build && publint && attw --pack",
|
|
60
|
+
"prepare": "husky",
|
|
61
|
+
"test:coverage": "vitest run --coverage"
|
|
61
62
|
},
|
|
62
63
|
"dependencies": {
|
|
63
64
|
"zod": "4.5.4"
|
|
@@ -90,6 +91,7 @@
|
|
|
90
91
|
"@stryker-mutator/core": "10.0.0",
|
|
91
92
|
"@stryker-mutator/vitest-runner": "10.0.0",
|
|
92
93
|
"@types/node": "26.4.1",
|
|
94
|
+
"@vitest/coverage-v8": "5.0.0",
|
|
93
95
|
"commitlint": "21.2.2",
|
|
94
96
|
"eslint": "10.10.0",
|
|
95
97
|
"eslint-config-prettier": "10.1.8",
|