@vincemakes/kiso-client 0.44.0 → 0.45.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/README.md CHANGED
@@ -17,6 +17,7 @@ for await (const ev of session.events({ after: -1, until: (e) => e.kind === "eve
17
17
  if (ev.kind === "event") render(ev.event); // a WireEvent under its seq
18
18
  else if (ev.event === "billing") bill(ev.data); // a product frame beside it
19
19
  }
20
+ await session.steer("only the editor tests"); // → { runId }; ClientError idle | closed → run() it instead
20
21
  const outcome = await session.abort(); // idle | parked (a reply, not an error) | stopped
21
22
  await session.approve(decisionId, true); // → { needsResume }
22
23
  ```
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AbortReply, ApproveReply, ResolveUncertainReply, RunReply, SessionState, WireError, WireErrorCode, WireEvent, WireInput, WireSource } from "@vincemakes/kiso-protocol";
1
+ import type { AbortReply, ApproveReply, ResolveUncertainReply, RunReply, SteerReply, SessionState, WireError, WireErrorCode, WireEvent, WireInput, WireSource } from "@vincemakes/kiso-protocol";
2
2
  /**
3
3
  * The typed client for a hosted kiso session, over the wire protocol.
4
4
  *
@@ -67,6 +67,12 @@ export declare class SessionClient {
67
67
  source?: WireSource;
68
68
  resumeFirst?: boolean;
69
69
  }): Promise<RunReply>;
70
+ /** ADR-0057 — a person's input for the live run, admitted at its next
71
+ * Safe Admission boundary. Throws `ClientError` with code `idle` (no run
72
+ * in flight) or `closed` (the run's ingress sealed): start a run with
73
+ * the input instead. A stream names input that was accepted and never
74
+ * admitted in an `unadmitted` frame after the run's terminal. */
75
+ steer(input: WireInput): Promise<SteerReply>;
70
76
  resume(): Promise<RunReply>;
71
77
  /** Stop the run in flight. A parked run is a REPLY (kind "parked"), not an error. */
72
78
  abort(options?: {
package/dist/client.js CHANGED
@@ -55,6 +55,14 @@ export class SessionClient {
55
55
  async run(input, options = {}) {
56
56
  return this.#json(await this.#request("POST", "run", { input, ...options }));
57
57
  }
58
+ /** ADR-0057 — a person's input for the live run, admitted at its next
59
+ * Safe Admission boundary. Throws `ClientError` with code `idle` (no run
60
+ * in flight) or `closed` (the run's ingress sealed): start a run with
61
+ * the input instead. A stream names input that was accepted and never
62
+ * admitted in an `unadmitted` frame after the run's terminal. */
63
+ async steer(input) {
64
+ return this.#json(await this.#request("POST", "steer", { input }));
65
+ }
58
66
  async resume() {
59
67
  return this.#json(await this.#request("POST", "resume", {}));
60
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-client",
3
- "version": "0.44.0",
3
+ "version": "0.45.1",
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.44.0"
24
+ "@vincemakes/kiso-protocol": "0.45.1"
25
25
  },
26
26
  "devDependencies": {
27
- "@vincemakes/kiso-core": "0.44.0",
28
- "@vincemakes/kiso-evals": "0.44.0",
29
- "@vincemakes/kiso-runtime": "0.44.0",
30
- "@vincemakes/kiso-server": "0.44.0",
27
+ "@vincemakes/kiso-core": "0.45.1",
28
+ "@vincemakes/kiso-evals": "0.45.1",
29
+ "@vincemakes/kiso-runtime": "0.45.1",
30
+ "@vincemakes/kiso-server": "0.45.1",
31
31
  "@types/node": "^26.1.2",
32
32
  "typescript": "^5.7.2",
33
33
  "vitest": "^3.0.0"