@cplieger/web-terminal-engine 6.2.0-dev.1 → 6.2.0-dev.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/jsr.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cplieger/web-terminal-engine",
3
- "version": "6.2.0-dev.1",
3
+ "version": "6.2.0-dev.5",
4
4
  "license": "MPL-2.0",
5
5
  "exports": {
6
6
  ".": "./src/index.ts"
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@cplieger/web-terminal-engine",
3
- "version": "6.2.0-dev.1",
3
+ "version": "6.2.0-dev.5",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "typecheck": "tsc -p tsconfig.json",
7
7
  "typecheck:tests": "tsc -p tsconfig.test.json",
8
8
  "test": "vitest --run",
9
9
  "test:e2e": "playwright test",
10
+ "test:mutation": "stryker run",
10
11
  "lint:eslint": "eslint .",
11
12
  "lint:prettier": "prettier --check .",
12
13
  "lint:knip": "knip",
@@ -21,18 +22,17 @@
21
22
  "@stryker-mutator/vitest-runner": "10.0.0",
22
23
  "@types/pngjs": "6.0.5",
23
24
  "@typescript/native": "npm:typescript@7.0.2",
24
- "@vitest/browser": "5.0.3",
25
25
  "@vitest/browser-playwright": "5.0.3",
26
26
  "@vitest/coverage-v8": "5.0.3",
27
27
  "esbuild": "0.28.2",
28
28
  "eslint": "10.12.0",
29
29
  "fast-check": "4.10.2",
30
- "knip": "6.39.0",
30
+ "knip": "6.40.0",
31
31
  "playwright": "1.63.0",
32
32
  "pngjs": "7.0.0",
33
33
  "prettier": "3.9.9",
34
34
  "typescript": "npm:@typescript/typescript6@6.0.2",
35
- "typescript-eslint": "8.71.0",
35
+ "typescript-eslint": "8.71.1",
36
36
  "vitest": "5.0.3"
37
37
  },
38
38
  "overrides": {
package/src/connection.ts CHANGED
@@ -40,7 +40,7 @@ type ConnState =
40
40
  // false: controls are 0x00-sentinel binary frames and input is leading-NUL-
41
41
  // split. true: controls are text frames and input is raw binary.
42
42
  | { status: "connected"; sock: WebSocket; abort: AbortController; upgraded: boolean }
43
- | { status: "reconnecting"; timer: ReturnType<typeof setTimeout>; delayMs: number }
43
+ | { status: "reconnecting"; timer: ReturnType<typeof setTimeout> }
44
44
  | { status: "incompatible" };
45
45
 
46
46
  // The server's close code for "the child process has exited"
@@ -727,7 +727,7 @@ export function createConnection(opts: ConnectionOptions): Connection {
727
727
  connState = { status: "disconnected" };
728
728
  connect();
729
729
  }, step.scheduledMs);
730
- connState = { status: "reconnecting", timer, delayMs: step.scheduledMs };
730
+ connState = { status: "reconnecting", timer };
731
731
  }
732
732
 
733
733
  function cancelScheduledReconnect(): void {
@@ -8,15 +8,12 @@
8
8
  import { nextBackoffDelay } from "./reconnect.js";
9
9
 
10
10
  /** SessionInfo is one session's wire shape: the JSON object the session REST
11
- * API (GET/POST /api/sessions) returns per session. Mirrors the Go
12
- * terminal.SessionInfo — the two are kept in lockstep by hand (single 8-field
13
- * type; flip to wiregen if this surface grows).
11
+ * API (GET/POST /api/sessions) returns per session, kept in lockstep with the Go
12
+ * terminal.SessionInfo by hand.
14
13
  *
15
- * Three of the fields are title-shaped and they are not interchangeable:
16
- * `title` is the RESOLVED display title, `pinnedTitle` is the USER's name (set
17
- * and cleared only by a human action, outranking everything else), and
18
- * `clientTitle` is a CLIENT-DERIVED automatic title a client asked the server to
19
- * remember. */
14
+ * `title` is the RESOLVED display title, `pinnedTitle` the USER's name (set and
15
+ * cleared only by a human action, outranking everything else), and `clientTitle`
16
+ * a CLIENT-DERIVED automatic title a client asked the server to remember. */
20
17
  export interface SessionInfo {
21
18
  readonly id: string;
22
19
  /** the session's current status. "working"/"idle"/"exited"/"crashed" are
@@ -35,6 +32,13 @@ export interface SessionInfo {
35
32
  readonly status:
36
33
  "working" | "idle" | "input" | "done" | "exited" | "crashed" | "failed" | "warning";
37
34
  readonly title: string;
35
+ /** the session's short public name, safe to put in a URL: 1 to 64 characters
36
+ * of `[A-Za-z0-9_-]`, unique among live sessions, and NOT a capability
37
+ * (nothing attaches with it; only `id` does). The server mints a random one
38
+ * and a host may replace it (web-terminal-kiro sets the kiro-cli thread id).
39
+ * Absent from a server before 6.2 and from a status event carrying
40
+ * `removed`. Untrusted wire text: validate it before use. */
41
+ readonly alias?: string;
38
42
  /** the raw client-derived automatic title (before the precedence baked into
39
43
  * `title`); a consumer that treats the program's OSC window title as
40
44
  * unreliable reads this instead of `title`. */
package/src/store.ts CHANGED
@@ -810,11 +810,10 @@ export class LineStore {
810
810
  * Record the server's retained-history bounds from a resumeAck so the
811
811
  * renderer can tell a genuine trim from a still-loading state.
812
812
  *
813
- * `committed` is deliberately NOT stored. The replay-jump prediction needs
814
- * it, but it takes it as an argument from the ack being processed — reading a
815
- * stored copy would risk predicting from a previous ack's value, which is the
816
- * same class of defect as predicting from a mutated `highest`.
813
+ * `committed` is deliberately not stored: the replay-jump prediction takes it
814
+ * from the ack being processed, and a stored copy could carry a previous ack's.
817
815
  */
816
+ // deadset:ignore DS1801 -- published LineStore method; dropping the leading parameter would break its callers
818
817
  noteResumeBounds(_committed: number, oldestIndex: number): void {
819
818
  if (Number.isInteger(oldestIndex) && oldestIndex >= 0) {
820
819
  this.serverOldest = oldestIndex;