@vincemakes/kiso-client 0.42.2 → 0.43.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/dist/client.d.ts CHANGED
@@ -29,7 +29,9 @@ export declare class ClientError extends Error {
29
29
  readonly runId: string | undefined;
30
30
  constructor(status: number, error: WireError);
31
31
  }
32
- /** What `events()` yields: a wire event under its seq, or a product frame beside one. */
32
+ /** What `events()` yields: a wire event under its seq, a host frame, or
33
+ * (0.43.0) the transport's comment — `: open`, `: keepalive` — so a
34
+ * consumer can tell a quiet stream from a dead one. */
33
35
  export type ClientEvent = {
34
36
  readonly kind: "event";
35
37
  readonly event: WireEvent;
@@ -37,6 +39,9 @@ export type ClientEvent = {
37
39
  readonly kind: "frame";
38
40
  readonly event: string;
39
41
  readonly data: unknown;
42
+ } | {
43
+ readonly kind: "comment";
44
+ readonly comment: string;
40
45
  };
41
46
  export interface EventsOptions {
42
47
  /** The last seq already seen; −1 (the default) for everything. */
package/dist/client.js CHANGED
@@ -159,7 +159,7 @@ export function createClient(options) {
159
159
  }
160
160
  function toClientEvent(frame) {
161
161
  if (frame.data === undefined)
162
- return null; // a comment: open / keepalive
162
+ return frame.comment !== undefined ? { kind: "comment", comment: frame.comment } : null; // 0.43.0: the transport's liveness, surfaced
163
163
  let data;
164
164
  try {
165
165
  data = JSON.parse(frame.data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-client",
3
- "version": "0.42.2",
3
+ "version": "0.43.0",
4
4
  "description": "kiso client — the typed client for a hosted kiso session over the wire protocol: run, resume, abort, approve, the snapshot, and a stream that reconnects with Last-Event-ID and never repeats an event. Browser and Node; depends on the protocol package only.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -21,13 +21,13 @@
21
21
  "test": "vitest run"
22
22
  },
23
23
  "dependencies": {
24
- "@vincemakes/kiso-protocol": "0.42.2"
24
+ "@vincemakes/kiso-protocol": "0.43.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@vincemakes/kiso-core": "0.42.2",
28
- "@vincemakes/kiso-evals": "0.42.2",
29
- "@vincemakes/kiso-runtime": "0.42.2",
30
- "@vincemakes/kiso-server": "0.42.2",
27
+ "@vincemakes/kiso-core": "0.43.0",
28
+ "@vincemakes/kiso-evals": "0.43.0",
29
+ "@vincemakes/kiso-runtime": "0.43.0",
30
+ "@vincemakes/kiso-server": "0.43.0",
31
31
  "@types/node": "^26.1.2",
32
32
  "typescript": "^5.7.2",
33
33
  "vitest": "^3.0.0"