@aintela/chat 0.9.0 → 0.10.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.
@@ -5,7 +5,7 @@ var o = (i, t, e) => bt(i, typeof t != "symbol" ? t + "" : t, e);
5
5
  import { i as N, E as I, S as x, z as St, C as U, j as Lt, L as Pt, P as z, n as Ft, q as _t, T as Nt, o as Ut, s as et, B as xt } from "./serializer-DvR3nOcf.js";
6
6
  import { format as qt } from "date-fns";
7
7
  import Wt from "lodash";
8
- import { C as E, P as Bt } from "./Prompt-DZb7OaPp.js";
8
+ import { C, P as Bt } from "./Prompt-DZb7OaPp.js";
9
9
  import { d as Gt } from "./environmentUtils-VZNTCzEE.js";
10
10
  import { r as zt } from "./httpSessionService-BIkDesYB.js";
11
11
  const Q = {
@@ -281,9 +281,9 @@ function Yt(i, t) {
281
281
  h(Yt, "foldClientOutput");
282
282
  function Xt(i, t, e, s, n) {
283
283
  var p;
284
- const r = i.parts.findIndex((m) => {
284
+ const r = i.parts.findIndex((w) => {
285
285
  var u;
286
- return ((u = m.functionDetails) == null ? void 0 : u.id) === s;
286
+ return ((u = w.functionDetails) == null ? void 0 : u.id) === s;
287
287
  }), a = r > -1 ? i.parts[r] : e, c = t.functionDetails, l = a.functionDetails, f = {
288
288
  ...a,
289
289
  eventType: t.eventType,
@@ -367,10 +367,10 @@ function ee(i, t, e) {
367
367
  if (s.eventType === I.FunctionClientOutput && !!((c = s.functionDetails) != null && c.id))
368
368
  Yt(r, s);
369
369
  else if (Qt(s, n)) {
370
- const p = jt(s.eventType) || Kt(s.eventType), m = p ? (l = s.functionDetails) == null ? void 0 : l.id : void 0;
371
- p && !m && console.error("Got isCall or isResponse without a callId", s);
372
- const u = m ? r.functionMap.get(m) : void 0;
373
- u && m && s.functionDetails ? Xt(r, s, u, m, e) : (Vt(r, s, t, m), a = !0);
370
+ const p = jt(s.eventType) || Kt(s.eventType), w = p ? (l = s.functionDetails) == null ? void 0 : l.id : void 0;
371
+ p && !w && console.error("Got isCall or isResponse without a callId", s);
372
+ const u = w ? r.functionMap.get(w) : void 0;
373
+ u && w && s.functionDetails ? Xt(r, s, u, w, e) : (Vt(r, s, t, w), a = !0);
374
374
  }
375
375
  s.textAppendable && Zt(r, s, t, a);
376
376
  }
@@ -449,7 +449,7 @@ const kt = 4001, se = 4002, Dt = 4004, ne = 4100, H = 500, ie = 2e4, re = 1e3, o
449
449
  /** Connected by the store AND by the transport. */
450
450
  get isUp() {
451
451
  var t, e;
452
- return this.state.connectionStatus === E.Connected && (((e = (t = this.ports).isConnected) == null ? void 0 : e.call(t)) ?? !0);
452
+ return this.state.connectionStatus === C.Connected && (((e = (t = this.ports).isConnected) == null ? void 0 : e.call(t)) ?? !0);
453
453
  }
454
454
  // ─── Commands ───────────────────────────────────────────────────────────
455
455
  /**
@@ -487,7 +487,7 @@ const kt = 4001, se = 4002, Dt = 4004, ne = 4100, H = 500, ie = 2e4, re = 1e3, o
487
487
  } catch (e) {
488
488
  console.error(`${S} hangUp threw`, e);
489
489
  }
490
- t && this.state.setConnectionStatus(E.Disconnected);
490
+ t && this.state.setConnectionStatus(C.Disconnected);
491
491
  }
492
492
  // ─── Transport reports ──────────────────────────────────────────────────
493
493
  /**
@@ -506,13 +506,13 @@ const kt = 4001, se = 4002, Dt = 4004, ne = 4100, H = 500, ie = 2e4, re = 1e3, o
506
506
  console.log(`${S} socket closed (code=${t}) while a dial is in flight — judged when it settles.`);
507
507
  return;
508
508
  }
509
- this.state.connectionStatus === E.Connected && (console.warn(`${S} socket closed: code=${t} reason="${e}" (session ${this.target.sessionId ?? "(new)"}).`), this.state.setConnectionStatus(E.Disconnected), this.judge(t));
509
+ this.state.connectionStatus === C.Connected && (console.warn(`${S} socket closed: code=${t} reason="${e}" (session ${this.target.sessionId ?? "(new)"}).`), this.state.setConnectionStatus(C.Disconnected), this.judge(t));
510
510
  }
511
511
  }
512
512
  // ─── The dial ───────────────────────────────────────────────────────────
513
513
  dial() {
514
514
  const t = this.target;
515
- this.lastCloseCode = null, this.state.setConnectionStatus(E.Connecting);
515
+ this.lastCloseCode = null, this.state.setConnectionStatus(C.Connecting);
516
516
  const e = this.now();
517
517
  console.log(`${S} dialling session ${t.sessionId ?? "(new)"}${t.resume ? " with the replay cursor" : ""}${this.everConnected ? " (reconnect)" : ""}.`);
518
518
  const n = (async () => (t.prepare && await t.prepare(), this.ports.dial(t.sessionId, { resume: t.resume })))().then((r) => {
@@ -531,14 +531,14 @@ const kt = 4001, se = 4002, Dt = 4004, ne = 4100, H = 500, ie = 2e4, re = 1e3, o
531
531
  this.ports.hangUp();
532
532
  } catch {
533
533
  }
534
- throw this.state.setConnectionStatus(E.Disconnected), this.halt("session-gone", { sessionId: t.sessionId, actualSessionId: r }), new Error(`Session ${t.sessionId} no longer exists on the server (it answered with ${r}).`);
534
+ throw this.state.setConnectionStatus(C.Disconnected), this.halt("session-gone", { sessionId: t.sessionId, actualSessionId: r }), new Error(`Session ${t.sessionId} no longer exists on the server (it answered with ${r}).`);
535
535
  }
536
536
  const a = this.everConnected;
537
- return this.everConnected = !0, t.sessionId = r, t.resume = !0, t.prepare = void 0, this.wait = H, this.attempt = 0, this.state.setConnectionStatus(E.Connected), console.log(`${S} ${a ? "reconnected to" : "connected to"} session ${r} in ${this.now() - e}ms.`), (l = (c = this.ports).onConnected) == null || l.call(c, r, { reconnect: a }), r;
537
+ return this.everConnected = !0, t.sessionId = r, t.resume = !0, t.prepare = void 0, this.wait = H, this.attempt = 0, this.state.setConnectionStatus(C.Connected), console.log(`${S} ${a ? "reconnected to" : "connected to"} session ${r} in ${this.now() - e}ms.`), (l = (c = this.ports).onConnected) == null || l.call(c, r, { reconnect: a }), r;
538
538
  }).catch((r) => {
539
539
  if (this.target === t && !this.halted) {
540
540
  const a = this.lastCloseCode;
541
- console.error(`${S} dial of session ${t.sessionId ?? "(new)"} failed after ${this.now() - e}ms${a !== null ? ` (socket closed with ${a})` : ""}:`, r), this.state.setConnectionStatus(E.Disconnected), this.inflight === n && (this.inflight = null), this.judge(a);
541
+ console.error(`${S} dial of session ${t.sessionId ?? "(new)"} failed after ${this.now() - e}ms${a !== null ? ` (socket closed with ${a})` : ""}:`, r), this.state.setConnectionStatus(C.Disconnected), this.inflight === n && (this.inflight = null), this.judge(a);
542
542
  }
543
543
  throw r;
544
544
  }).finally(() => {
@@ -613,18 +613,18 @@ const kt = 4001, se = 4002, Dt = 4004, ne = 4100, H = 500, ie = 2e4, re = 1e3, o
613
613
  this.state.turnOpen && this.state.setLastActivity();
614
614
  const t = this.now() - this.state.lastActivity;
615
615
  if (t > _) {
616
- if (this.state.sessionActive && this.state.setIsSessionActive(!1), this.cancelRetry(), this.state.connectionStatus === E.Connected) {
616
+ if (this.state.sessionActive && this.state.setIsSessionActive(!1), this.cancelRetry(), this.state.connectionStatus === C.Connected) {
617
617
  console.warn(`${S} idle for ${Math.round(t / 1e3)}s (limit ${_ / 1e3}s) — closing the socket (session ${this.target.sessionId ?? "(new)"}). Activity, or a send, redials it.`);
618
618
  try {
619
619
  this.ports.hangUp();
620
620
  } catch (e) {
621
621
  console.error(`${S} hangUp threw`, e);
622
622
  }
623
- this.state.setConnectionStatus(E.Disconnected);
623
+ this.state.setConnectionStatus(C.Disconnected);
624
624
  }
625
625
  return;
626
626
  }
627
- this.state.sessionActive || (console.log(`${S} activity resumed — the session is active again.`), this.state.setIsSessionActive(!0), this.wait = H, this.state.connectionStatus === E.Disconnected && !this.halted && !this.inflight && (this.target.resume = !0, this.dial().catch(() => {
627
+ this.state.sessionActive || (console.log(`${S} activity resumed — the session is active again.`), this.state.setIsSessionActive(!0), this.wait = H, this.state.connectionStatus === C.Disconnected && !this.halted && !this.inflight && (this.target.resume = !0, this.dial().catch(() => {
628
628
  }))), t > _ * ae ? this.idleWarningLogged || (this.idleWarningLogged = !0, console.warn(`${S} idle ${Math.round(t / 1e3)}s of ${_ / 1e3}s — the socket closes in about ${Math.round((_ - t) / 1e3)}s unless something happens.`)) : this.idleWarningLogged = !1;
629
629
  }
630
630
  };
@@ -665,7 +665,7 @@ const ct = class ct {
665
665
  h(ct, "ThrottledEmitter");
666
666
  let Z = ct;
667
667
  const y = class y {
668
- constructor(t, e, s, n, r, a, c, l, f, p, m) {
668
+ constructor(t, e, s, n, r, a, c, l, f, p, w) {
669
669
  o(this, "base_url");
670
670
  o(this, "msg_order", 0);
671
671
  o(this, "interactionsMap", /* @__PURE__ */ new Map());
@@ -722,7 +722,7 @@ const y = class y {
722
722
  o(this, "detachedRunInteractionServices", /* @__PURE__ */ new Map());
723
723
  // ─── Artifacts ──────────────────────────────────────────────────────────
724
724
  o(this, "runningRequests", /* @__PURE__ */ new Map());
725
- this.options = m ?? {}, this.user = t, this.config = r, this.rawJwt = t.access_token, this.base_url = n, this.eventBusService = e, this.sessionId = p, this.artifactService = s, this.sessionState = a.getState(), this.notificationPort = c, this.storageService = f, a.subscribe((u, g) => {
725
+ this.options = w ?? {}, this.user = t, this.config = r, this.rawJwt = t.access_token, this.base_url = n, this.eventBusService = e, this.sessionId = p, this.artifactService = s, this.sessionState = a.getState(), this.notificationPort = c, this.storageService = f, a.subscribe((u, g) => {
726
726
  this.sessionState = u, g.turnOpen && !u.turnOpen && this.flushAnnouncements();
727
727
  }), this.wsService = l, this.connection = new V({
728
728
  store: a,
@@ -738,12 +738,12 @@ const y = class y {
738
738
  }, "onConnected"),
739
739
  onRetryScheduled: /* @__PURE__ */ h(({ delayMs: u, attempt: g }) => {
740
740
  var D;
741
- const w = Date.now(), M = ((D = this.sessionState.connectionOutage) == null ? void 0 : D.since) ?? w;
742
- this.sessionState.setConnectionOutage({ since: M, retryAt: w + u, attempt: g, halted: null }), w - M >= y.OUTAGE_CLOSES_TURN_AFTER_MS && this.closeOpenTurnWith(y.OUTAGE_TURN_MESSAGE);
741
+ const m = Date.now(), v = ((D = this.sessionState.connectionOutage) == null ? void 0 : D.since) ?? m;
742
+ this.sessionState.setConnectionOutage({ since: v, retryAt: m + u, attempt: g, halted: null }), m - v >= y.OUTAGE_CLOSES_TURN_AFTER_MS && this.closeOpenTurnWith(y.OUTAGE_TURN_MESSAGE);
743
743
  }, "onRetryScheduled"),
744
744
  onHalt: /* @__PURE__ */ h((u, g) => {
745
- const w = this.sessionState.connectionOutage;
746
- this.sessionState.setConnectionOutage({ since: (w == null ? void 0 : w.since) ?? Date.now(), retryAt: null, attempt: (w == null ? void 0 : w.attempt) ?? 0, halted: u }), this.notifyHalt(u, g), this.closeOpenTurnWith(y.HALT_TURN_MESSAGE[u]);
745
+ const m = this.sessionState.connectionOutage;
746
+ this.sessionState.setConnectionOutage({ since: (m == null ? void 0 : m.since) ?? Date.now(), retryAt: null, attempt: (m == null ? void 0 : m.attempt) ?? 0, halted: u }), this.notifyHalt(u, g), this.closeOpenTurnWith(y.HALT_TURN_MESSAGE[u]);
747
747
  }, "onHalt")
748
748
  }), this.wsService.onEvent = async (u) => {
749
749
  await this.Message(u);
@@ -1134,7 +1134,7 @@ const y = class y {
1134
1134
  }
1135
1135
  // Send a message to the server over the socket
1136
1136
  async sendMessageInternal(t, e) {
1137
- var r, a, c, l, f, p, m, u;
1137
+ var r, a, c, l, f, p, w, u, g, m;
1138
1138
  const s = this.suspendState;
1139
1139
  this.suspendState = !1;
1140
1140
  const n = this.startInteraction(t.friendlyMessage ?? t.data, s);
@@ -1156,16 +1156,17 @@ const y = class y {
1156
1156
  // against any registered LlmAgent variant without seeding a Mongo record.
1157
1157
  AgentImplementation: (l = this.config.agentConfig) == null ? void 0 : l.agentImplementation,
1158
1158
  Parameters: {
1159
- CustomerName: ((f = this.config.customer) == null ? void 0 : f.name) ?? "",
1160
- DataSet: ((p = this.config.customer) == null ? void 0 : p.dataSetId) ?? ""
1159
+ ...((p = (f = this.config).parameters) == null ? void 0 : p.call(f)) ?? {},
1160
+ CustomerName: ((w = this.config.customer) == null ? void 0 : w.name) ?? "",
1161
+ DataSet: ((u = this.config.customer) == null ? void 0 : u.dataSetId) ?? ""
1161
1162
  },
1162
1163
  // Forward image attachments as a structured payload (PascalCase
1163
1164
  // keys to match the C# `Message.Images` / `MessageImage` model).
1164
- Images: (m = t.images) != null && m.length ? t.images.map((g) => ({ MimeType: g.mimeType, Data: g.data })) : void 0,
1165
+ Images: (g = t.images) != null && g.length ? t.images.map((v) => ({ MimeType: v.mimeType, Data: v.data })) : void 0,
1165
1166
  // Client-only UI representation for this turn (PascalCase to match the C# `Message.UserUi`
1166
1167
  // model). The server persists it as a UserUiContent sibling and strips it from the model
1167
1168
  // request; Content remains the only model-facing text.
1168
- UserUi: (u = t.userUi) != null && u.name ? { Name: t.userUi.name, Args: t.userUi.args } : void 0
1169
+ UserUi: (m = t.userUi) != null && m.name ? { Name: t.userUi.name, Args: t.userUi.args } : void 0
1169
1170
  }), this.localOpen(n.interactionId, "system"), {
1170
1171
  interaction: n,
1171
1172
  success: !0
@@ -1498,25 +1499,25 @@ const ge = 5e3, pe = 3e4, Y = 1e4, lt = class lt {
1498
1499
  const c = a.length > 0 ? `?${a.join("&")}` : "", l = this.baseUrl.replace(/^http:\/\//, "ws://").replace(/^https:\/\//, "wss://"), f = `${l}/ws/connect/${t ?? ""}${c}`;
1499
1500
  console.log("[WebSocket] Connecting to", `${l}/ws/connect/${t ?? ""}` + (t && this.lastSeq >= 0 ? ` (resume lastSeq=${this.lastSeq})` : "")), this.detachSocket(), this.ws = new WebSocket(f), this.ws.onopen = () => {
1500
1501
  console.log("[WebSocket] Socket open — waiting for the session id"), this.ping(), this.monitor();
1501
- }, this.ws.onmessage = (v) => {
1502
+ }, this.ws.onmessage = (E) => {
1502
1503
  try {
1503
1504
  this.lastActivity = (/* @__PURE__ */ new Date()).getTime(), this.pingSentAt = null;
1504
- const C = this.streamingResponseSerializer.parse(v.data);
1505
- if (!C)
1505
+ const M = this.streamingResponseSerializer.parse(E.data);
1506
+ if (!M)
1506
1507
  throw "Error parsing event JSON";
1507
- this.handleMessage(C, v.data);
1508
- } catch (C) {
1509
- console.error("[WebSocket] Error parsing message:", C);
1508
+ this.handleMessage(M, E.data);
1509
+ } catch (M) {
1510
+ console.error("[WebSocket] Error parsing message:", M);
1510
1511
  }
1511
- }, this.ws.onerror = (v) => {
1512
- console.error("[WebSocket] Error:", v), this.onError && this.onError("WebSocket error");
1513
- }, this.ws.onclose = (v) => {
1514
- var C;
1515
- console.log(`[WebSocket] Closed: code=${v.code} reason="${v.reason}" (session ${this.sessionLabel}, lastSeq=${this.lastSeq})`), this.monitorInterval && (clearInterval(this.monitorInterval), this.monitorInterval = null), this.pingSentAt = null, this.sessionId = void 0, (C = this.onClose) == null || C.call(this, v.code, v.reason);
1512
+ }, this.ws.onerror = (E) => {
1513
+ console.error("[WebSocket] Error:", E), this.onError && this.onError("WebSocket error");
1514
+ }, this.ws.onclose = (E) => {
1515
+ var M;
1516
+ console.log(`[WebSocket] Closed: code=${E.code} reason="${E.reason}" (session ${this.sessionLabel}, lastSeq=${this.lastSeq})`), this.monitorInterval && (clearInterval(this.monitorInterval), this.monitorInterval = null), this.pingSentAt = null, this.sessionId = void 0, (M = this.onClose) == null || M.call(this, E.code, E.reason);
1516
1517
  };
1517
- const p = 200, m = 3e4, u = 8e3, g = this.ws;
1518
+ const p = 200, w = 3e4, u = 8e3, g = this.ws;
1518
1519
  this.sessionId = void 0;
1519
- let w = 0, M = 0;
1520
+ let m = 0, v = 0;
1520
1521
  for (; ; ) {
1521
1522
  if (this.ws !== g) {
1522
1523
  n("Connection attempt superseded by a newer connect()");
@@ -1527,19 +1528,19 @@ const ge = 5e3, pe = 3e4, Y = 1e4, lt = class lt {
1527
1528
  n("Connection closed before a session id was received");
1528
1529
  return;
1529
1530
  }
1530
- if (g.readyState === WebSocket.CONNECTING && w >= m) {
1531
+ if (g.readyState === WebSocket.CONNECTING && m >= w) {
1531
1532
  try {
1532
1533
  g.close();
1533
1534
  } catch {
1534
1535
  }
1535
- n(`Server did not accept the connection within ${m / 1e3}s`);
1536
+ n(`Server did not accept the connection within ${w / 1e3}s`);
1536
1537
  return;
1537
1538
  }
1538
- if (g.readyState === WebSocket.OPEN && M >= u) {
1539
+ if (g.readyState === WebSocket.OPEN && v >= u) {
1539
1540
  n(`Connected but no session id arrived within ${u / 1e3}s`);
1540
1541
  return;
1541
1542
  }
1542
- w % 2e3 === 0 && console.log("Aguardando session Id"), await this.sleep(p), w += p, g.readyState === WebSocket.OPEN && (M += p);
1543
+ m % 2e3 === 0 && console.log("Aguardando session Id"), await this.sleep(p), m += p, g.readyState === WebSocket.OPEN && (v += p);
1543
1544
  }
1544
1545
  console.log(`[WebSocket] Session ${this.sessionId} proven${this.lastSeq >= 0 ? ` (replaying from lastSeq=${this.lastSeq})` : ""}.`), this.lastKnownSessionId = this.sessionId, (F = this.onOpen) == null || F.call(this), this.flushPendingAnswers(this.sessionId), s(this.sessionId);
1545
1546
  });
@@ -1943,9 +1944,9 @@ function Te(i, t, e, s) {
1943
1944
  }
1944
1945
  h(Te, "framesUrl");
1945
1946
  async function ye(i) {
1946
- var F, v, C, ft, gt;
1947
- const { baseUrl: t, runId: e, signal: s, onFrame: n, onEnd: r, onOpen: a, onRetry: c } = i, l = i.resource ?? "detachedRun", f = i.fetchImpl ?? ((A, $) => fetch(A, $)), p = ((F = i.retry) == null ? void 0 : F.initialMs) ?? 500, m = ((v = i.retry) == null ? void 0 : v.maxMs) ?? 15e3, u = ((C = i.retry) == null ? void 0 : C.maxAttempts) ?? Number.POSITIVE_INFINITY;
1948
- let g = i.afterSeq ?? 0, w = 0, M = !1;
1947
+ var F, E, M, ft, gt;
1948
+ const { baseUrl: t, runId: e, signal: s, onFrame: n, onEnd: r, onOpen: a, onRetry: c } = i, l = i.resource ?? "detachedRun", f = i.fetchImpl ?? ((A, $) => fetch(A, $)), p = ((F = i.retry) == null ? void 0 : F.initialMs) ?? 500, w = ((E = i.retry) == null ? void 0 : E.maxMs) ?? 15e3, u = ((M = i.retry) == null ? void 0 : M.maxAttempts) ?? Number.POSITIVE_INFINITY;
1949
+ let g = i.afterSeq ?? 0, m = 0, v = !1;
1949
1950
  async function D(A) {
1950
1951
  if (i.onUnauthorized)
1951
1952
  try {
@@ -1964,13 +1965,13 @@ async function ye(i) {
1964
1965
  K && (O.Authorization = `Bearer ${K}`);
1965
1966
  const k = await f(Te(t, l, e, g), { method: "GET", headers: O, signal: s, cache: "no-store" });
1966
1967
  if (k.status === 401) {
1967
- if (!M && await D(K)) {
1968
- M = !0;
1968
+ if (!v && await D(K)) {
1969
+ v = !0;
1969
1970
  continue;
1970
1971
  }
1971
1972
  throw new L(401);
1972
1973
  }
1973
- if (M = !1, !k.ok)
1974
+ if (v = !1, !k.ok)
1974
1975
  throw Se(k.status) ? new Error(`GET detached-run frames answered ${k.status}`) : new L(k.status);
1975
1976
  if (!k.body) throw new L(k.status, "The frames response has no readable body");
1976
1977
  a == null || a();
@@ -1995,7 +1996,7 @@ async function ye(i) {
1995
1996
  console.warn(`[DetachedRunFrames] run ${e}: a frame that is not JSON was skipped (seq ${T.id ?? "?"})`, b);
1996
1997
  return;
1997
1998
  }
1998
- w = 0;
1999
+ m = 0;
1999
2000
  try {
2000
2001
  n(mt, R);
2001
2002
  } catch (b) {
@@ -2020,10 +2021,10 @@ async function ye(i) {
2020
2021
  if (O instanceof L) throw O;
2021
2022
  A = O;
2022
2023
  }
2023
- if (w += 1, w >= u) throw A;
2024
- const $ = Math.min(p * 2 ** (w - 1), m);
2024
+ if (m += 1, m >= u) throw A;
2025
+ const $ = Math.min(p * 2 ** (m - 1), w);
2025
2026
  try {
2026
- c == null || c(A, w, $);
2027
+ c == null || c(A, m, $);
2027
2028
  } catch {
2028
2029
  }
2029
2030
  await Ie($, s);
@@ -2101,7 +2102,7 @@ const dt = class dt {
2101
2102
  }).then(() => {
2102
2103
  a || r(new Error("The frames stream stopped before it opened"));
2103
2104
  }).catch((c) => {
2104
- var p, m, u;
2105
+ var p, w, u;
2105
2106
  const l = me(c), f = l.kind === "notFound" ? Dt : l.kind === "forbidden" || l.kind === "unauthorized" ? 1008 : 1011;
2106
2107
  console.error(`[DetachedRunFrames] run ${t}: following stopped (${l.kind})`, c);
2107
2108
  try {
@@ -2109,7 +2110,7 @@ const dt = class dt {
2109
2110
  } catch (g) {
2110
2111
  console.error("[DetachedRunFrames] onFollowError threw", g);
2111
2112
  }
2112
- (m = this.onError) == null || m.call(this, String((c == null ? void 0 : c.message) ?? c)), (u = this.onClose) == null || u.call(this, f, String((c == null ? void 0 : c.message) ?? "")), a || r(c);
2113
+ (w = this.onError) == null || w.call(this, String((c == null ? void 0 : c.message) ?? c)), (u = this.onClose) == null || u.call(this, f, String((c == null ? void 0 : c.message) ?? "")), a || r(c);
2113
2114
  }).finally(() => {
2114
2115
  this.controller === e && (this.following = !1);
2115
2116
  });
@@ -2208,4 +2209,4 @@ export {
2208
2209
  me as t,
2209
2210
  Re as u
2210
2211
  };
2211
- //# sourceMappingURL=detachedRunActivity-jHa9SDv1.js.map
2212
+ //# sourceMappingURL=detachedRunActivity-DWOR3cAC.js.map