@memberjunction/realtime-runtime 6.2.0-edge.6 → 6.2.0-edge.7

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,28 +1,77 @@
1
1
  import { Observable } from 'rxjs';
2
+ /**
3
+ * Longest single `setTimeout` we arm. Browsers store the delay as a signed 32-bit integer (max
4
+ * 2_147_483_647 ms, about 24.8 days); a larger delay fires immediately. A far deadline is therefore
5
+ * reached in hops of at most this many ms.
6
+ */
7
+ export declare const MAX_TIMER_MS = 2147000000;
8
+ /** What happens as the deadline approaches. Both fields are optional; see the defaults on {@link ClientSessionDeadline.Options}. */
9
+ export interface SessionDeadlineOptions {
10
+ /** Whether the host intends the session to end when the deadline is reached. The class never ends a session itself; it only carries the flag for the runtime. Default `true`. */
11
+ autoEnd?: boolean;
12
+ /** Offsets, in ms before the deadline, at which `Warning$` fires once each. Default none. */
13
+ warnBeforeMs?: readonly number[];
14
+ }
2
15
  /**
3
16
  * The client's view of when its session must end — the CLIENT half of a limit the server enforces
4
17
  * authoritatively (the janitor closes a session past its stored deadline whatever a client does).
5
18
  *
6
- * The client keeps a copy so it can end the call gracefully before the server does, and show a
7
- * countdown. It follows one rule: **the server's word moves the deadline only later** when it arrives
8
- * as an extension (identity verification relaxes a session's limits) — a stale or hostile value can
9
- * therefore never cut a session short here, and nothing a client does with this class extends the
10
- * server's deadline.
19
+ * It holds the deadline, runs the alarm for it (`Warning$` ahead of the deadline, `Reached$` at it)
20
+ * and follows one rule: **the server's word moves the deadline only later** when it arrives as an
21
+ * extension (identity verification relaxes a session's limits). A stale or hostile value can never
22
+ * pull the deadline earlier, and nothing a client does with this class extends the server's deadline.
23
+ * "Never cut a session short here" describes the VALUE this class holds, not the runtime's behaviour:
24
+ * when `Reached$` fires the runtime may end the session, because that is the deadline the host asked for.
25
+ *
26
+ * Time counts down by elapsed time measured by the timers from the moment the deadline was set or
27
+ * extended, never by comparing the wall clock to the deadline at fire time, so a laptop clock that
28
+ * is behind cannot fire late and let the server cut first. The class never ends a session: `Reached$`
29
+ * emits synchronously inside the timer callback and the runtime decides what follows.
11
30
  */
12
31
  export declare class ClientSessionDeadline {
32
+ private readonly now;
33
+ /** Shared by every instance until its first Set, so frozen (array too): a caller mutating `Options` cannot change another instance's defaults. */
34
+ private static readonly DEFAULT_OPTIONS;
13
35
  private readonly subject;
36
+ private readonly warningSubject;
37
+ private readonly reachedSubject;
38
+ private options;
39
+ private timers;
40
+ private disposed;
41
+ /** @param now Clock read once per Set/Extend to anchor the countdown; injectable for tests. */
42
+ constructor(now?: () => number);
14
43
  /** Emits the current deadline (or `null` when none is known), then every change. */
15
44
  readonly Deadline$: Observable<Date | null>;
45
+ /** Emits once per configured warning offset as its moment arrives; `remainingMs` is that offset. */
46
+ readonly Warning$: Observable<{
47
+ deadline: Date;
48
+ remainingMs: number;
49
+ }>;
50
+ /** Emits once when the deadline is reached. */
51
+ readonly Reached$: Observable<{
52
+ deadline: Date;
53
+ }>;
16
54
  /** The current deadline, or `null` when none is known. */
17
55
  get Value(): Date | null;
18
- /** Sets the baseline deadline outright (a host that knows the session's cap at start). `null` clears it. */
19
- Set(deadline: Date | null): void;
56
+ /** The options of the current arming (defaults `{ autoEnd: true, warnBeforeMs: [] }`). */
57
+ get Options(): Readonly<Required<SessionDeadlineOptions>>;
58
+ /** Sets the baseline deadline outright (a host that knows the session's cap at start) and arms the alarm. `null` clears it. A second call replaces the options. */
59
+ Set(deadline: Date | null, options?: SessionDeadlineOptions): void;
20
60
  /**
21
61
  * Applies a server-announced deadline: adopted when none is known or when it is LATER than the one
22
- * held; ignored when earlier, equal or unparseable. Returns whether the deadline changed.
62
+ * held; ignored when earlier, equal or unparseable. Keeps the options and re-arms every timer.
63
+ * Returns whether the deadline changed.
23
64
  */
24
65
  Extend(deadlineIso: string | undefined): boolean;
25
- /** Forgets the deadline (session ended). */
66
+ /** Forgets the deadline (session ended), cancels every timer and restores the default options, so the next call does not inherit this one's. */
26
67
  Clear(): void;
68
+ /** Cancels every timer and completes the streams; later calls are no-ops. */
69
+ Dispose(): void;
70
+ private static normalizeOffsets;
71
+ /** Anchors the countdown now and schedules the warnings and the deadline, all measured by elapsed time. */
72
+ private arm;
73
+ /** Runs `fire` after `delayMs` of elapsed time, re-arming in MAX_TIMER_MS hops (each hop is one finite timer, so the chain ends). */
74
+ private schedule;
75
+ private cancelTimers;
27
76
  }
28
77
  //# sourceMappingURL=client-session-deadline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-session-deadline.d.ts","sourceRoot":"","sources":["../../src/session/client-session-deadline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,MAAM,MAAM,CAAC;AAEnD;;;;;;;;;GASG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0C;IAElE,oFAAoF;IACpF,SAAgB,SAAS,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,CAA+B;IAEjF,0DAA0D;IAC1D,IAAW,KAAK,IAAI,IAAI,GAAG,IAAI,CAE9B;IAED,4GAA4G;IACrG,GAAG,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI;IAIvC;;;OAGG;IACI,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO;IAgBvD,4CAA4C;IACrC,KAAK,IAAI,IAAI;CAGrB"}
1
+ {"version":3,"file":"client-session-deadline.d.ts","sourceRoot":"","sources":["../../src/session/client-session-deadline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAW,MAAM,MAAM,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,YAAY,aAAgB,CAAC;AAE1C,oIAAoI;AACpI,MAAM,WAAW,sBAAsB;IACrC,iLAAiL;IACjL,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6FAA6F;IAC7F,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED;;;;;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G;IAC3G,OAAO,CAAC,GAAG;IAaX,qIAAqI;IACrI,OAAO,CAAC,QAAQ;IAchB,OAAO,CAAC,YAAY;CAMrB"}
@@ -1,34 +1,76 @@
1
- import { BehaviorSubject } from 'rxjs';
1
+ import { BehaviorSubject, Subject } from 'rxjs';
2
+ /**
3
+ * Longest single `setTimeout` we arm. Browsers store the delay as a signed 32-bit integer (max
4
+ * 2_147_483_647 ms, about 24.8 days); a larger delay fires immediately. A far deadline is therefore
5
+ * reached in hops of at most this many ms.
6
+ */
7
+ export const MAX_TIMER_MS = 2_147_000_000;
2
8
  /**
3
9
  * The client's view of when its session must end — the CLIENT half of a limit the server enforces
4
10
  * authoritatively (the janitor closes a session past its stored deadline whatever a client does).
5
11
  *
6
- * The client keeps a copy so it can end the call gracefully before the server does, and show a
7
- * countdown. It follows one rule: **the server's word moves the deadline only later** when it arrives
8
- * as an extension (identity verification relaxes a session's limits) — a stale or hostile value can
9
- * therefore never cut a session short here, and nothing a client does with this class extends the
10
- * server's deadline.
12
+ * It holds the deadline, runs the alarm for it (`Warning$` ahead of the deadline, `Reached$` at it)
13
+ * and follows one rule: **the server's word moves the deadline only later** when it arrives as an
14
+ * extension (identity verification relaxes a session's limits). A stale or hostile value can never
15
+ * pull the deadline earlier, and nothing a client does with this class extends the server's deadline.
16
+ * "Never cut a session short here" describes the VALUE this class holds, not the runtime's behaviour:
17
+ * when `Reached$` fires the runtime may end the session, because that is the deadline the host asked for.
18
+ *
19
+ * Time counts down by elapsed time measured by the timers from the moment the deadline was set or
20
+ * extended, never by comparing the wall clock to the deadline at fire time, so a laptop clock that
21
+ * is behind cannot fire late and let the server cut first. The class never ends a session: `Reached$`
22
+ * emits synchronously inside the timer callback and the runtime decides what follows.
11
23
  */
12
24
  export class ClientSessionDeadline {
13
- constructor() {
25
+ /** Shared by every instance until its first Set, so frozen (array too): a caller mutating `Options` cannot change another instance's defaults. */
26
+ static { this.DEFAULT_OPTIONS = Object.freeze({ autoEnd: true, warnBeforeMs: Object.freeze([]) }); }
27
+ /** @param now Clock read once per Set/Extend to anchor the countdown; injectable for tests. */
28
+ constructor(now = () => Date.now()) {
29
+ this.now = now;
14
30
  this.subject = new BehaviorSubject(null);
31
+ this.warningSubject = new Subject();
32
+ this.reachedSubject = new Subject();
33
+ this.options = ClientSessionDeadline.DEFAULT_OPTIONS;
34
+ this.timers = new Set();
35
+ this.disposed = false;
15
36
  /** Emits the current deadline (or `null` when none is known), then every change. */
16
37
  this.Deadline$ = this.subject.asObservable();
38
+ /** Emits once per configured warning offset as its moment arrives; `remainingMs` is that offset. */
39
+ this.Warning$ = this.warningSubject.asObservable();
40
+ /** Emits once when the deadline is reached. */
41
+ this.Reached$ = this.reachedSubject.asObservable();
17
42
  }
18
43
  /** The current deadline, or `null` when none is known. */
19
44
  get Value() {
20
45
  return this.subject.value;
21
46
  }
22
- /** Sets the baseline deadline outright (a host that knows the session's cap at start). `null` clears it. */
23
- Set(deadline) {
24
- this.subject.next(deadline && Number.isFinite(deadline.getTime()) ? deadline : null);
47
+ /** The options of the current arming (defaults `{ autoEnd: true, warnBeforeMs: [] }`). */
48
+ get Options() {
49
+ return this.options;
50
+ }
51
+ /** Sets the baseline deadline outright (a host that knows the session's cap at start) and arms the alarm. `null` clears it. A second call replaces the options. */
52
+ Set(deadline, options) {
53
+ if (this.disposed) {
54
+ return;
55
+ }
56
+ this.cancelTimers();
57
+ const valid = deadline && Number.isFinite(deadline.getTime()) ? deadline : null;
58
+ this.options = {
59
+ autoEnd: options?.autoEnd ?? true,
60
+ warnBeforeMs: ClientSessionDeadline.normalizeOffsets(options?.warnBeforeMs),
61
+ };
62
+ this.subject.next(valid);
63
+ if (valid) {
64
+ this.arm(valid);
65
+ }
25
66
  }
26
67
  /**
27
68
  * Applies a server-announced deadline: adopted when none is known or when it is LATER than the one
28
- * held; ignored when earlier, equal or unparseable. Returns whether the deadline changed.
69
+ * held; ignored when earlier, equal or unparseable. Keeps the options and re-arms every timer.
70
+ * Returns whether the deadline changed.
29
71
  */
30
72
  Extend(deadlineIso) {
31
- if (!deadlineIso) {
73
+ if (this.disposed || !deadlineIso) {
32
74
  return false;
33
75
  }
34
76
  const parsed = new Date(deadlineIso);
@@ -39,12 +81,68 @@ export class ClientSessionDeadline {
39
81
  if (current !== null && parsed.getTime() <= current.getTime()) {
40
82
  return false;
41
83
  }
84
+ this.cancelTimers();
42
85
  this.subject.next(parsed);
86
+ this.arm(parsed);
43
87
  return true;
44
88
  }
45
- /** Forgets the deadline (session ended). */
89
+ /** Forgets the deadline (session ended), cancels every timer and restores the default options, so the next call does not inherit this one's. */
46
90
  Clear() {
91
+ if (this.disposed) {
92
+ return;
93
+ }
94
+ this.cancelTimers();
95
+ this.options = ClientSessionDeadline.DEFAULT_OPTIONS;
47
96
  this.subject.next(null);
48
97
  }
98
+ /** Cancels every timer and completes the streams; later calls are no-ops. */
99
+ Dispose() {
100
+ if (this.disposed) {
101
+ return;
102
+ }
103
+ this.cancelTimers();
104
+ this.disposed = true;
105
+ this.subject.complete();
106
+ this.warningSubject.complete();
107
+ this.reachedSubject.complete();
108
+ }
109
+ static normalizeOffsets(offsets) {
110
+ const valid = (offsets ?? []).filter((ms) => Number.isFinite(ms) && ms > 0);
111
+ return [...new Set(valid)].sort((a, b) => b - a);
112
+ }
113
+ /** Anchors the countdown now and schedules the warnings and the deadline, all measured by elapsed time. */
114
+ arm(deadline) {
115
+ const remainingAtAnchorMs = deadline.getTime() - this.now();
116
+ for (const offset of this.options.warnBeforeMs) {
117
+ const fireAfterMs = remainingAtAnchorMs - offset;
118
+ // Moment already passed at anchor time: skip rather than fire a stale warning.
119
+ if (fireAfterMs >= 0) {
120
+ this.schedule(fireAfterMs, () => this.warningSubject.next({ deadline, remainingMs: offset }));
121
+ }
122
+ }
123
+ // A past deadline (negative remaining) fires on the next tick, never synchronously inside Set.
124
+ this.schedule(Math.max(0, remainingAtAnchorMs), () => this.reachedSubject.next({ deadline }));
125
+ }
126
+ /** Runs `fire` after `delayMs` of elapsed time, re-arming in MAX_TIMER_MS hops (each hop is one finite timer, so the chain ends). */
127
+ schedule(delayMs, fire) {
128
+ const hopMs = Math.min(delayMs, MAX_TIMER_MS);
129
+ const handle = setTimeout(() => {
130
+ this.timers.delete(handle);
131
+ const leftMs = delayMs - hopMs;
132
+ if (leftMs > 0) {
133
+ this.schedule(leftMs, fire);
134
+ }
135
+ else {
136
+ fire();
137
+ }
138
+ }, hopMs);
139
+ this.timers.add(handle);
140
+ }
141
+ cancelTimers() {
142
+ for (const handle of this.timers) {
143
+ clearTimeout(handle);
144
+ }
145
+ this.timers.clear();
146
+ }
49
147
  }
50
148
  //# sourceMappingURL=client-session-deadline.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-session-deadline.js","sourceRoot":"","sources":["../../src/session/client-session-deadline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,MAAM,CAAC;AAEnD;;;;;;;;;GASG;AACH,MAAM,OAAO,qBAAqB;IAAlC;QACmB,YAAO,GAAG,IAAI,eAAe,CAAc,IAAI,CAAC,CAAC;QAElE,oFAAoF;QACpE,cAAS,GAA4B,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;IAoCnF,CAAC;IAlCC,0DAA0D;IAC1D,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED,4GAA4G;IACrG,GAAG,CAAC,QAAqB;QAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACvF,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,WAA+B;QAC3C,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,WAAW,C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C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC3B,MAAM,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;YAC/B,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;gBACf,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC9B,CAAC;iBAAM,CAAC;gBACN,IAAI,EAAE,CAAC;YACT,CAAC;QACH,CAAC,EAAE,KAAK,CAAC,CAAC;QACV,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAEO,YAAY;QAClB,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACjC,YAAY,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@memberjunction/realtime-runtime",
3
3
  "type": "module",
4
- "version": "6.2.0-edge.6",
4
+ "version": "6.2.0-edge.7",
5
5
  "description": "MemberJunction: Framework-agnostic Realtime Session Runtime — client-direct realtime co-agent session orchestration (mint, driver resolution, transcripts, tool relay, delegation narration, channel lifecycle, usage relay). Pure TypeScript, zero UX dependencies. Consumable from browser (Angular/React/Vue), React Native, or Node test harnesses.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -11,14 +11,14 @@
11
11
  "author": "MemberJunction.com",
12
12
  "license": "BUSL-1.1",
13
13
  "dependencies": {
14
- "@memberjunction/ai": "6.2.0-edge.6",
15
- "@memberjunction/ai-core-plus": "6.2.0-edge.6",
16
- "@memberjunction/ai-engine-base": "6.2.0-edge.6",
17
- "@memberjunction/ai-realtime-client": "6.2.0-edge.6",
18
- "@memberjunction/core": "6.2.0-edge.6",
19
- "@memberjunction/core-entities": "6.2.0-edge.6",
20
- "@memberjunction/global": "6.2.0-edge.6",
21
- "@memberjunction/graphql-dataprovider": "6.2.0-edge.6",
14
+ "@memberjunction/ai": "6.2.0-edge.7",
15
+ "@memberjunction/ai-core-plus": "6.2.0-edge.7",
16
+ "@memberjunction/ai-engine-base": "6.2.0-edge.7",
17
+ "@memberjunction/ai-realtime-client": "6.2.0-edge.7",
18
+ "@memberjunction/core": "6.2.0-edge.7",
19
+ "@memberjunction/core-entities": "6.2.0-edge.7",
20
+ "@memberjunction/global": "6.2.0-edge.7",
21
+ "@memberjunction/graphql-dataprovider": "6.2.0-edge.7",
22
22
  "rxjs": "^7.8.2"
23
23
  },
24
24
  "devDependencies": {