cc-peer 1.4.1 → 1.5.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.
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("../../rolldown-runtime-VH7oDXx4.cjs");
2
- const require_cc_peer = require("../../cc-peer-D_3Bw_NE.cjs");
2
+ const require_cc_peer = require("../../cc-peer-Ba-H-vIs.cjs");
3
3
  const require_alias_ipc = require("../../alias-ipc-Cjs5yivH.cjs");
4
4
  let node_process = require("node:process");
5
5
  node_process = require_rolldown_runtime.__toESM(node_process, 1);
@@ -1,4 +1,4 @@
1
- import { n as CcPeer } from "../../cc-peer-CbnScbXe.mjs";
1
+ import { n as CcPeer } from "../../cc-peer-wpboPWT7.mjs";
2
2
  import { t as AliasCommandSchema } from "../../alias-ipc-DkaozCo7.mjs";
3
3
  import process from "node:process";
4
4
  //#region src/adapters/node/alias-worker.ts
@@ -1,4 +1,4 @@
1
- import { a as InboundMessage, l as PathConfig } from "./cc-peer-DFoi9JJV.cjs";
1
+ import { a as InboundMessage, l as PathConfig } from "./cc-peer-B3i4ZlKV.cjs";
2
2
  import { EventEmitter } from "node:events";
3
3
  //#region src/ports/alias-process.d.ts
4
4
  interface AliasStartOptions extends PathConfig {
@@ -1,4 +1,4 @@
1
- import { a as InboundMessage, l as PathConfig } from "./cc-peer-DFoi9JJV.mjs";
1
+ import { a as InboundMessage, l as PathConfig } from "./cc-peer-B3i4ZlKV.mjs";
2
2
  import { EventEmitter } from "node:events";
3
3
  //#region src/ports/alias-process.d.ts
4
4
  interface AliasStartOptions extends PathConfig {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  const require_rolldown_runtime = require("../rolldown-runtime-VH7oDXx4.cjs");
3
- const require_cc_peer = require("../cc-peer-D_3Bw_NE.cjs");
3
+ const require_cc_peer = require("../cc-peer-Ba-H-vIs.cjs");
4
4
  const require_errors = require("../errors-Dl_lSq1N.cjs");
5
5
  let node_crypto = require("node:crypto");
6
6
  let zod = require("zod");
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as RegistryEntrySchema, n as CcPeer, r as PrioritySchema } from "../cc-peer-CbnScbXe.mjs";
2
+ import { i as RegistryEntrySchema, n as CcPeer, r as PrioritySchema } from "../cc-peer-wpboPWT7.mjs";
3
3
  import { o as defineSchema } from "../errors-Dcqq2MIW.mjs";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { z } from "zod";
@@ -37,6 +37,7 @@ declare const RegistryEntrySchema: z.ZodObject<{
37
37
  startedAt: z.ZodNumber;
38
38
  procStart: z.ZodString;
39
39
  version: z.ZodString;
40
+ ccPeerVersion: z.ZodOptional<z.ZodString>;
40
41
  peerProtocol: z.ZodNumber;
41
42
  peerFeatures: z.ZodArray<z.ZodEnum<{
42
43
  notify_idle: "notify_idle";
@@ -94,6 +95,7 @@ declare const RegistryEntrySchema: z.ZodObject<{
94
95
  pidDomain: string;
95
96
  messagingSocketPath: string;
96
97
  updatedAt: number;
98
+ ccPeerVersion?: string | undefined;
97
99
  name?: string | undefined;
98
100
  nameSource?: "user" | "peer" | "derived" | "collision" | "auto" | "hook" | undefined;
99
101
  nameSince?: number | undefined;
@@ -232,8 +234,8 @@ declare const PeerIdleNoticeSchema: z.ZodObject<{
232
234
  type PeerIdleNotice = z.infer<typeof PeerIdleNoticeSchema>;
233
235
  //#endregion
234
236
  //#region src/cc-peer.d.ts
235
- /** Package version placeholder until semantic-release owns it. */
236
- declare const CC_PEER_VERSION = "0.0.0";
237
+ /** cc-peer's own package version, read from package.json and inlined at bundle time so it needs no filesystem access at runtime (the SEA build ships as a single file with no package.json alongside it). */
238
+ declare const CC_PEER_VERSION: string;
237
239
  /** How a target can be addressed. */
238
240
  type PeerRef = {
239
241
  pid: number;
@@ -37,6 +37,7 @@ declare const RegistryEntrySchema: z.ZodObject<{
37
37
  startedAt: z.ZodNumber;
38
38
  procStart: z.ZodString;
39
39
  version: z.ZodString;
40
+ ccPeerVersion: z.ZodOptional<z.ZodString>;
40
41
  peerProtocol: z.ZodNumber;
41
42
  peerFeatures: z.ZodArray<z.ZodEnum<{
42
43
  notify_idle: "notify_idle";
@@ -94,6 +95,7 @@ declare const RegistryEntrySchema: z.ZodObject<{
94
95
  pidDomain: string;
95
96
  messagingSocketPath: string;
96
97
  updatedAt: number;
98
+ ccPeerVersion?: string | undefined;
97
99
  name?: string | undefined;
98
100
  nameSource?: "user" | "peer" | "derived" | "collision" | "auto" | "hook" | undefined;
99
101
  nameSince?: number | undefined;
@@ -232,8 +234,8 @@ declare const PeerIdleNoticeSchema: z.ZodObject<{
232
234
  type PeerIdleNotice = z.infer<typeof PeerIdleNoticeSchema>;
233
235
  //#endregion
234
236
  //#region src/cc-peer.d.ts
235
- /** Package version placeholder until semantic-release owns it. */
236
- declare const CC_PEER_VERSION = "0.0.0";
237
+ /** cc-peer's own package version, read from package.json and inlined at bundle time so it needs no filesystem access at runtime (the SEA build ships as a single file with no package.json alongside it). */
238
+ declare const CC_PEER_VERSION: string;
237
239
  /** How a target can be addressed. */
238
240
  type PeerRef = {
239
241
  pid: number;
@@ -7,6 +7,9 @@ let node_path = require("node:path");
7
7
  let zod = require("zod");
8
8
  let node_os = require("node:os");
9
9
  let node_child_process = require("node:child_process");
10
+ //#region package.json
11
+ var version = "1.5.1";
12
+ //#endregion
10
13
  //#region src/adapters/node/uds-transport.ts
11
14
  /** macOS linger before close, matching the reference client's ~150ms. */
12
15
  const DEFAULT_LINGER_MS = 150;
@@ -284,6 +287,8 @@ const RegistryEntrySchema = require_errors.defineSchema(zod.z.object({
284
287
  startedAt: zod.z.number().int().nonnegative(),
285
288
  procStart: zod.z.string().min(1),
286
289
  version: zod.z.string().min(1),
290
+ /** cc-peer's own package version, present on every entry cc-peer itself writes regardless of kind; absent on an entry a real interactive Claude Code session wrote directly, since only cc-peer knows to populate it. Distinct from `version`, which is overloaded between a real Claude Code app version and cc-peer's own sentinel string depending on who wrote the entry. */
291
+ ccPeerVersion: zod.z.string().min(1).optional(),
287
292
  peerProtocol: zod.z.number().int(),
288
293
  peerFeatures: zod.z.array(PeerFeatureSchema),
289
294
  kind: SessionKindSchema,
@@ -730,8 +735,8 @@ const ControlFrameSchema = zod.z.union([
730
735
  const WireFrameSchema = zod.z.union([UserFrameSchema, ControlFrameSchema]);
731
736
  //#endregion
732
737
  //#region src/cc-peer.ts
733
- /** Package version placeholder until semantic-release owns it. */
734
- const CC_PEER_VERSION = "0.0.0";
738
+ /** cc-peer's own package version, read from package.json and inlined at bundle time so it needs no filesystem access at runtime (the SEA build ships as a single file with no package.json alongside it). */
739
+ const CC_PEER_VERSION = version;
735
740
  /** Default log sink: logs go nowhere unless a logger is provided. */
736
741
  const sinkLog = () => void 0;
737
742
  /** Peer tokens are 16 random bytes in hex, matching the reference key files. */
@@ -807,6 +812,7 @@ var CcPeer = class CcPeer extends node_events.EventEmitter {
807
812
  startedAt: now,
808
813
  procStart,
809
814
  version: "cc-peer",
815
+ ccPeerVersion: CC_PEER_VERSION,
810
816
  peerProtocol: 1,
811
817
  peerFeatures: ["notify_idle", "reply_across_default_dirs"],
812
818
  kind: "interactive",
@@ -7,6 +7,9 @@ import { dirname, join } from "node:path";
7
7
  import { z } from "zod";
8
8
  import { homedir } from "node:os";
9
9
  import { spawn } from "node:child_process";
10
+ //#region package.json
11
+ var version = "1.5.1";
12
+ //#endregion
10
13
  //#region src/adapters/node/uds-transport.ts
11
14
  /** macOS linger before close, matching the reference client's ~150ms. */
12
15
  const DEFAULT_LINGER_MS = 150;
@@ -284,6 +287,8 @@ const RegistryEntrySchema = defineSchema(z.object({
284
287
  startedAt: z.number().int().nonnegative(),
285
288
  procStart: z.string().min(1),
286
289
  version: z.string().min(1),
290
+ /** cc-peer's own package version, present on every entry cc-peer itself writes regardless of kind; absent on an entry a real interactive Claude Code session wrote directly, since only cc-peer knows to populate it. Distinct from `version`, which is overloaded between a real Claude Code app version and cc-peer's own sentinel string depending on who wrote the entry. */
291
+ ccPeerVersion: z.string().min(1).optional(),
287
292
  peerProtocol: z.number().int(),
288
293
  peerFeatures: z.array(PeerFeatureSchema),
289
294
  kind: SessionKindSchema,
@@ -730,8 +735,8 @@ const ControlFrameSchema = z.union([
730
735
  const WireFrameSchema = z.union([UserFrameSchema, ControlFrameSchema]);
731
736
  //#endregion
732
737
  //#region src/cc-peer.ts
733
- /** Package version placeholder until semantic-release owns it. */
734
- const CC_PEER_VERSION = "0.0.0";
738
+ /** cc-peer's own package version, read from package.json and inlined at bundle time so it needs no filesystem access at runtime (the SEA build ships as a single file with no package.json alongside it). */
739
+ const CC_PEER_VERSION = version;
735
740
  /** Default log sink: logs go nowhere unless a logger is provided. */
736
741
  const sinkLog = () => void 0;
737
742
  /** Peer tokens are 16 random bytes in hex, matching the reference key files. */
@@ -807,6 +812,7 @@ var CcPeer = class CcPeer extends EventEmitter {
807
812
  startedAt: now,
808
813
  procStart,
809
814
  version: "cc-peer",
815
+ ccPeerVersion: CC_PEER_VERSION,
810
816
  peerProtocol: 1,
811
817
  peerFeatures: ["notify_idle", "reply_across_default_dirs"],
812
818
  kind: "interactive",
package/dist/cc-peer.cjs CHANGED
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cc_peer = require("./cc-peer-D_3Bw_NE.cjs");
2
+ const require_cc_peer = require("./cc-peer-Ba-H-vIs.cjs");
3
3
  exports.CC_PEER_VERSION = require_cc_peer.CC_PEER_VERSION;
4
4
  exports.CcPeer = require_cc_peer.CcPeer;
@@ -1,2 +1,2 @@
1
- import { a as InboundMessage, c as SendOptions, i as IdleNotice, n as CcPeer, o as PeerRef, r as CcPeerOptions, s as Receipt, t as CC_PEER_VERSION } from "./cc-peer-DFoi9JJV.cjs";
1
+ import { a as InboundMessage, c as SendOptions, i as IdleNotice, n as CcPeer, o as PeerRef, r as CcPeerOptions, s as Receipt, t as CC_PEER_VERSION } from "./cc-peer-B3i4ZlKV.cjs";
2
2
  export { CC_PEER_VERSION, CcPeer, CcPeerOptions, IdleNotice, InboundMessage, PeerRef, Receipt, SendOptions };
@@ -1,2 +1,2 @@
1
- import { a as InboundMessage, c as SendOptions, i as IdleNotice, n as CcPeer, o as PeerRef, r as CcPeerOptions, s as Receipt, t as CC_PEER_VERSION } from "./cc-peer-DFoi9JJV.mjs";
1
+ import { a as InboundMessage, c as SendOptions, i as IdleNotice, n as CcPeer, o as PeerRef, r as CcPeerOptions, s as Receipt, t as CC_PEER_VERSION } from "./cc-peer-B3i4ZlKV.mjs";
2
2
  export { CC_PEER_VERSION, CcPeer, CcPeerOptions, IdleNotice, InboundMessage, PeerRef, Receipt, SendOptions };
package/dist/cc-peer.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as CcPeer, t as CC_PEER_VERSION } from "./cc-peer-CbnScbXe.mjs";
1
+ import { n as CcPeer, t as CC_PEER_VERSION } from "./cc-peer-wpboPWT7.mjs";
2
2
  export { CC_PEER_VERSION, CcPeer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-peer",
3
- "version": "1.4.1",
3
+ "version": "1.5.1",
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",
@@ -27,6 +27,10 @@
27
27
  "type": "string",
28
28
  "minLength": 1
29
29
  },
30
+ "ccPeerVersion": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
30
34
  "peerProtocol": {
31
35
  "type": "integer",
32
36
  "minimum": -9007199254740991,