@pluno/product-agent-web 0.1.232 → 0.1.233

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.
@@ -218,7 +218,7 @@ function Ei(s, e) {
218
218
  };
219
219
  }
220
220
  const ps = (s) => s.selectedModel ?? s.historyModel ?? s.defaultModel, Dn = (s, e) => s.scopes[e];
221
- function Z(s) {
221
+ function ne(s) {
222
222
  return s?.execution_message_ids ?? s?.user_message_ids ?? [];
223
223
  }
224
224
  function Y(s) {
@@ -291,7 +291,7 @@ function Vt(s, e) {
291
291
  if (e.conversation_id !== s.sessionId) throw new Error("Execution belongs to another conversation.");
292
292
  if (lt(e.version), s.execution && e.version <= s.execution.version) return s;
293
293
  const t = { ...s.executionByUserMessage };
294
- for (const i of Z(e)) t[i] = { version: e.version, phase: e.phase };
294
+ for (const i of ne(e)) t[i] = { version: e.version, phase: e.phase };
295
295
  return { ...s, execution: e, executionByUserMessage: t };
296
296
  }
297
297
  function Nn(s) {
@@ -487,9 +487,9 @@ function Bn(s, e, t, i) {
487
487
  }
488
488
  case "conversation.stop": {
489
489
  if (t.clients[e.clientScopeId] !== e.conversationScopeId) return { state: s, effects: r };
490
- const a = t.selections[e.conversationScopeId].sessionId, c = a ? s.sessions[a]?.execution : null, u = Object.values(s.submissions).filter((f) => (a ? f.sessionId === a : f.conversationScopeId === e.conversationScopeId) && (!e.userMessageIds || e.userMessageIds.includes(f.userMessageId))), l = u.filter((f) => !f.cancelled && (f.delivery !== "failed" || s.deliveries[f.userMessageId]?.phase === "paused") && (f.delivery !== "accepted" || f.executionVersion === null)), d = l.length > 0, h = c && ["queued", "thinking", "steering", "stopping"].includes(c.phase) && (!e.userMessageIds || Z(c).some((f) => e.userMessageIds.includes(f)));
490
+ const a = t.selections[e.conversationScopeId].sessionId, c = a ? s.sessions[a]?.execution : null, u = Object.values(s.submissions).filter((f) => (a ? f.sessionId === a : f.conversationScopeId === e.conversationScopeId) && (!e.userMessageIds || e.userMessageIds.includes(f.userMessageId))), l = u.filter((f) => !f.cancelled && (f.delivery !== "failed" || s.deliveries[f.userMessageId]?.phase === "paused") && (f.delivery !== "accepted" || f.executionVersion === null)), d = l.length > 0, h = c && ["queued", "thinking", "steering", "stopping"].includes(c.phase) && (!e.userMessageIds || ne(c).some((f) => e.userMessageIds.includes(f)));
491
491
  if (!d && !h && (c || !e.userMessageIds?.length)) return { state: s, effects: r };
492
- const m = Array.from(new Set(e.userMessageIds ?? [...l.map((f) => f.userMessageId), ...h ? Z(c) : []])), p = { ...s.submissions };
492
+ const m = Array.from(new Set(e.userMessageIds ?? [...l.map((f) => f.userMessageId), ...h ? ne(c) : []])), p = { ...s.submissions };
493
493
  for (const f of u)
494
494
  m.includes(f.userMessageId) && f.delivery !== "accepted" && (p[f.userMessageId] = { ...f, cancelled: !0 });
495
495
  n = { ...s, submissions: p, stops: { ...s.stops, [e.conversationScopeId]: {
@@ -684,7 +684,7 @@ function Jt(s) {
684
684
  };
685
685
  for (const [o, a] of Object.entries(e.stops))
686
686
  for (const c of a.userMessageIds) {
687
- const u = e.submissions[c], l = u?.sessionId ?? Object.values(e.sessions).find((h) => Z(h.execution).includes(c))?.sessionId, d = u?.delivery === "accepted" || l && Z(e.sessions[l]?.execution).includes(c);
687
+ const u = e.submissions[c], l = u?.sessionId ?? Object.values(e.sessions).find((h) => ne(h.execution).includes(c))?.sessionId, d = u?.delivery === "accepted" || l && ne(e.sessions[l]?.execution).includes(c);
688
688
  l && d && r(`stop:${o}:${a.requestId}:${c}`, l, c, a.reason);
689
689
  }
690
690
  for (const o of Object.values(e.submissions))
@@ -1420,12 +1420,12 @@ function ye(s, e, t) {
1420
1420
  }
1421
1421
  const d = r?.execution, h = o.filter((g) => !g.cancelled && g.delivery !== "failed"), m = h.filter((g) => g.delivery !== "accepted" && g.executionVersion === null), p = h.filter((g) => g.delivery === "accepted" && g.executionVersion === null), f = h[h.length - 1], v = m.length > 0, I = f !== void 0 && p.includes(f);
1422
1422
  let S = v ? "submitting" : I ? "awaiting_execution" : d?.phase ?? "idle";
1423
- const w = Object.entries(s.stops).filter(([g]) => g === t || n !== null && e.selections[g]?.sessionId === n).map(([, g]) => g).find((g) => (!o.length || g.userMessageIds.includes(o[o.length - 1].userMessageId) || !v && !I && Z(d).some((T) => g.userMessageIds.includes(T))) && (!d || d.version <= g.executionVersion || ["thinking", "steering", "queued", "stopping"].includes(d.phase) || o.some((T) => T.cancelled && T.executionVersion === null && g.userMessageIds.includes(T.userMessageId)))), y = d && ["thinking", "steering", "queued", "stopping"].includes(d.phase) || o.some((g) => g.delivery === "accepted" && g.executionVersion === null && w?.userMessageIds.includes(g.userMessageId));
1424
- w && y && !v && (!d || !["thinking", "steering", "queued", "stopping"].includes(d.phase) || Z(d).every((g) => w.userMessageIds.includes(g))) && (S = "stopping"), w && !y && !v && o.some((g) => g.cancelled && g.executionVersion === null && w.userMessageIds.includes(g.userMessageId)) && (S = o.some((g) => w.userMessageIds.includes(g.userMessageId) && ["sending", "uncertain"].includes(g.delivery)) ? "stopping" : "stopped");
1423
+ const w = Object.entries(s.stops).filter(([g]) => g === t || n !== null && e.selections[g]?.sessionId === n).map(([, g]) => g).find((g) => (!o.length || g.userMessageIds.includes(o[o.length - 1].userMessageId) || !v && !I && ne(d).some((T) => g.userMessageIds.includes(T))) && (!d || d.version <= g.executionVersion || ["thinking", "steering", "queued", "stopping"].includes(d.phase) || o.some((T) => T.cancelled && T.executionVersion === null && g.userMessageIds.includes(T.userMessageId)))), y = d && ["thinking", "steering", "queued", "stopping"].includes(d.phase) || o.some((g) => g.delivery === "accepted" && g.executionVersion === null && w?.userMessageIds.includes(g.userMessageId));
1424
+ w && y && !v && (!d || !["thinking", "steering", "queued", "stopping"].includes(d.phase) || ne(d).every((g) => w.userMessageIds.includes(g))) && (S = "stopping"), w && !y && !v && o.some((g) => g.cancelled && g.executionVersion === null && w.userMessageIds.includes(g.userMessageId)) && (S = o.some((g) => w.userMessageIds.includes(g.userMessageId) && ["sending", "uncertain"].includes(g.delivery)) ? "stopping" : "stopped");
1425
1425
  const A = ["thinking", "steering", "queued"].includes(S), C = s.stops[t] ?? w, k = C?.userMessageIds.filter((g) => !["completed", "failed"].includes(r?.executionByUserMessage[g]?.phase ?? "")) ?? [], X = k.some((g) => {
1426
1426
  const T = o.find((P) => P.userMessageId === g);
1427
- return !Object.values(s.operations).some((P) => P.command.type === "run.stop" && P.command.payload.expectedUserMessageId === g && P.phase === "done") && (T?.executionVersion === null && ["sending", "uncertain", "accepted"].includes(T.delivery) || !!(d && Z(d).includes(g) && ["thinking", "steering", "queued", "stopping"].includes(d.phase)));
1428
- }), R = Z(d), oe = v || I ? f?.userMessageId ?? null : R[R.length - 1] ?? null, he = l.find((g) => g.userMessageId === oe), Ne = A ? [...he?.activityIds ?? []].reverse().find((g) => u[g] === "open") ?? null : null, pe = n !== null && !!e.selections[t]?.provisionalId && a.length === 0 && o.length === 0 && // The first persisted idle snapshot already has a positive synchronization version.
1427
+ return !Object.values(s.operations).some((P) => P.command.type === "run.stop" && P.command.payload.expectedUserMessageId === g && P.phase === "done") && (T?.executionVersion === null && ["sending", "uncertain", "accepted"].includes(T.delivery) || !!(d && ne(d).includes(g) && ["thinking", "steering", "queued", "stopping"].includes(d.phase)));
1428
+ }), R = d?.user_message_ids ?? [], oe = v || I ? f?.userMessageId ?? null : R[R.length - 1] ?? null, he = l.find((g) => g.userMessageId === oe), Ne = A ? [...he?.activityIds ?? []].reverse().find((g) => u[g] === "open") ?? null : null, pe = n !== null && !!e.selections[t]?.provisionalId && a.length === 0 && o.length === 0 && // The first persisted idle snapshot already has a positive synchronization version.
1429
1429
  (!r?.execution || r.execution.phase === "idle" && r.execution.user_message_ids.length === 0) && Object.values(s.operations).some((g) => g.conversationScopeId === t && g.phase === "done" && ["runtime.warmup", "attachment.prepare"].includes(g.command.type) && !g.command.payload.sessionId && g.result?.sessionId === n);
1430
1430
  return J({
1431
1431
  selectionKey: t ? JSON.stringify([s.authorityId, s.generation, t]) : void 0,
@@ -7020,7 +7020,7 @@ function ci(s) {
7020
7020
  };
7021
7021
  }
7022
7022
  const ua = globalThis.fetch.bind(globalThis), di = '.pluno-pa-widget-host[data-pluno-product-agent-ui="widget"]', ha = '.pluno-pa-widget[data-pluno-product-agent-ui-root="widget"]', pa = ".pluno-pa-widget__panel", fa = ".pluno-pa-widget__timeline", ma = "__plunoExtensionWidgetOwner";
7023
- class ne extends Error {
7023
+ class ie extends Error {
7024
7024
  constructor(e, t, i, n) {
7025
7025
  super(e), this.retryable = t, this.status = i, this.retryAfterMs = n, this.name = "ProductAgentTokenProviderError";
7026
7026
  }
@@ -7142,7 +7142,7 @@ function Da(s) {
7142
7142
  }
7143
7143
  }
7144
7144
  function hi(s) {
7145
- if (s instanceof ne)
7145
+ if (s instanceof ie)
7146
7146
  return s.retryable;
7147
7147
  if (s && typeof s == "object") {
7148
7148
  const e = s.status;
@@ -7619,7 +7619,7 @@ class mt {
7619
7619
  let a = null;
7620
7620
  const c = new Promise((u, l) => {
7621
7621
  a = window.setTimeout(() => {
7622
- r.abort(), l(new ne("Pluno token provider timed out", !0));
7622
+ r.abort(), l(new ie("Pluno token provider timed out", !0));
7623
7623
  }, wa);
7624
7624
  });
7625
7625
  try {
@@ -7628,9 +7628,9 @@ class mt {
7628
7628
  c
7629
7629
  ]);
7630
7630
  if (r.signal.aborted || this.tokenAbortController !== r)
7631
- throw new ne("Pluno token request was cancelled", !0);
7631
+ throw new ie("Pluno token request was cancelled", !0);
7632
7632
  if (!u)
7633
- throw new ne("Pluno token provider did not return a token", !1);
7633
+ throw new ie("Pluno token provider did not return a token", !1);
7634
7634
  return this.token = u, this.tokenExpiresAtMs = Da(u), u;
7635
7635
  } finally {
7636
7636
  a !== null && window.clearTimeout(a);
@@ -7671,7 +7671,7 @@ class mt {
7671
7671
  if (this.token = await this.acquireToken("connect", { forceRefresh: e }), this.token && (this.directoryHttp.auth.token = this.token), t !== this.connectionAttemptId || this.state.status === "closed")
7672
7672
  return;
7673
7673
  if (!this.token && !this.options.webSocketFactory)
7674
- throw new ne("Pluno requires a token or tokenProvider", !1);
7674
+ throw new ie("Pluno requires a token or tokenProvider", !1);
7675
7675
  if (!this.options.webSocketFactory && this.rejectedTransportToken !== null && this.rejectedTransportToken === this.token) {
7676
7676
  this.setState({ status: "error", lastError: i });
7677
7677
  return;
@@ -7758,12 +7758,12 @@ class mt {
7758
7758
  N("web-sdk.agent", "Pluno connection attempt failed; retrying", {
7759
7759
  message: r.message,
7760
7760
  reconnectAttempt: this.reconnectAttempts
7761
- }), n instanceof ne && this.reportTransportDiagnostic("auth_timeout"), this.setState({
7761
+ }), n instanceof ie && this.reportTransportDiagnostic("auth_timeout"), this.setState({
7762
7762
  status: "reconnecting",
7763
7763
  lastError: Ra,
7764
7764
  lastErrorCode: "connection_failed"
7765
7765
  }), this.emit("error", r), this.scheduleReconnect(
7766
- n instanceof ne ? n.retryAfterMs : void 0
7766
+ n instanceof ie ? n.retryAfterMs : void 0
7767
7767
  );
7768
7768
  return;
7769
7769
  }
@@ -9081,7 +9081,7 @@ class mt {
9081
9081
  const i = await this.acquireToken("connect", { forceRefresh: !0 });
9082
9082
  if (this.socket !== e || this.state.status === "closed" || this.clientRuntime.isDisposed)
9083
9083
  throw new b("Conversation authority was retired.", "authority_retired", !0);
9084
- if (!i) throw new ne("Pluno token provider did not return a token", !1);
9084
+ if (!i) throw new ie("Pluno token provider did not return a token", !1);
9085
9085
  this.directoryHttp.auth.token = i, await this.replaceDefaultTransportCredentials(e);
9086
9086
  })().catch((i) => {
9087
9087
  if (this.credentialRecoveryFailure = fe(i), this.socket !== e || this.state.status === "closed") throw i;
@@ -9171,7 +9171,7 @@ function Ba() {
9171
9171
  if (!me(S, w, p?.body)) {
9172
9172
  const A = {
9173
9173
  requestId: zt("fetch"),
9174
- url: ee(S, Lt),
9174
+ url: Z(S, Lt),
9175
9175
  method: (p?.method ?? I?.method ?? "GET").toUpperCase(),
9176
9176
  requestHeaders: w,
9177
9177
  requestBody: Si(p?.body),
@@ -9191,7 +9191,7 @@ function Ba() {
9191
9191
  (C) => {
9192
9192
  e({
9193
9193
  ...A,
9194
- errorText: ee(C instanceof Error ? C.message : String(C)),
9194
+ errorText: Z(C instanceof Error ? C.message : String(C)),
9195
9195
  durationMs: Date.now() - f
9196
9196
  });
9197
9197
  }
@@ -9205,7 +9205,7 @@ function Ba() {
9205
9205
  return jt.set(this, {
9206
9206
  requestId: zt("xhr"),
9207
9207
  method: String(m ?? "GET").toUpperCase(),
9208
- url: ee(w, Lt),
9208
+ url: Z(w, Lt),
9209
9209
  requestHeaders: {},
9210
9210
  startedAtMs: Date.now(),
9211
9211
  startedAt: (/* @__PURE__ */ new Date()).toISOString(),
@@ -9274,7 +9274,7 @@ function Ba() {
9274
9274
  const f = performance.timeOrigin + p.startTime;
9275
9275
  e({
9276
9276
  requestId: zt("resource"),
9277
- url: ee(p.name, Lt),
9277
+ url: Z(p.name, Lt),
9278
9278
  method: "GET",
9279
9279
  resourceType: "resource",
9280
9280
  responseStatus: p.responseStatus,
@@ -9730,13 +9730,13 @@ function ac(s, e) {
9730
9730
  }
9731
9731
  const P = /* @__PURE__ */ new Map(), Se = /* @__PURE__ */ new Map();
9732
9732
  for (const E of T) {
9733
- const O = f(E), se = Se.get(O) ?? 0;
9734
- Se.set(O, se + 1), (q.get(O) ?? 0) > 8 && se >= 6 && !l.has(E) && P.set(O, (P.get(O) ?? 0) + 1);
9733
+ const O = f(E), te = Se.get(O) ?? 0;
9734
+ Se.set(O, te + 1), (q.get(O) ?? 0) > 8 && te >= 6 && !l.has(E) && P.set(O, (P.get(O) ?? 0) + 1);
9735
9735
  }
9736
9736
  const Be = /* @__PURE__ */ new Map(), Cs = /* @__PURE__ */ new Set(), yt = [], qs = [];
9737
9737
  for (const E of T) {
9738
- const O = f(E), se = q.get(O) ?? 0, Ps = Be.get(O) ?? 0;
9739
- if (Be.set(O, Ps + 1), se > 8 && Ps >= 6 && !l.has(E)) {
9738
+ const O = f(E), te = q.get(O) ?? 0, Ps = Be.get(O) ?? 0;
9739
+ if (Be.set(O, Ps + 1), te > 8 && Ps >= 6 && !l.has(E)) {
9740
9740
  Cs.has(O) || (yt.push([`… ${P.get(O) ?? 0} similar siblings omitted`]), Cs.add(O));
9741
9741
  continue;
9742
9742
  }
@@ -9751,7 +9751,7 @@ function ac(s, e) {
9751
9751
  [pe, ...Le.map((E) => E.textPreview)].filter(Boolean).join(" ")
9752
9752
  ).slice(0, 180), An = k.hasAttribute("contenteditable") && (pe.length > 0 || !k.querySelector("[contenteditable]")), Os = u.some((E) => k.hasAttribute(E)) || !!Ne || An, bt = (k.getClientRects().length > 0 || oe.display === "contents") && (t.has(R) || Os || he) && (It || he) && (!n.has(R) || It || Os || he), wt = bt ? 1 : 0, _e = [];
9753
9753
  if (bt) {
9754
- const E = Le.some((se) => se.containsTextElement), O = i.has(R) && !E ? Ms : pe;
9754
+ const E = Le.some((te) => te.containsTextElement), O = i.has(R) && !E ? Ms : pe;
9755
9755
  _e.push(on(k, c, o, O.slice(0, 180)));
9756
9756
  }
9757
9757
  for (const E of yt)
@@ -9762,8 +9762,8 @@ function ac(s, e) {
9762
9762
  St.length > E.length && E.push("… shadow DOM omitted");
9763
9763
  const O = R.includes("tooltip") || R.includes("popper") || R.includes("loader");
9764
9764
  if (X < 2 && !O) {
9765
- const se = bt ? "#shadow-root" : `${R} #shadow-root`;
9766
- _e.push(...Ve([se, ...Ve(E, 1)], wt));
9765
+ const te = bt ? "#shadow-root" : `${R} #shadow-root`;
9766
+ _e.push(...Ve([te, ...Ve(E, 1)], wt));
9767
9767
  } else
9768
9768
  _e.push(...Ve(E, wt));
9769
9769
  }
@@ -10033,7 +10033,7 @@ function dn(s, e) {
10033
10033
  createdAt: typeof t.createdAt == "string" ? t.createdAt : (/* @__PURE__ */ new Date()).toISOString(),
10034
10034
  ...B(n) !== null ? { displaySequence: B(n) } : {},
10035
10035
  ...F(n) !== null ? { causalSequence: F(n) } : {},
10036
- respondsToUserMessageId: ie(n) ?? void 0,
10036
+ respondsToUserMessageId: se(n) ?? void 0,
10037
10037
  ...L(n) ? { runId: L(n) } : {},
10038
10038
  dataType: "assistant_draft",
10039
10039
  ...n.steered === !0 ? { steered: !0 } : {}
@@ -10050,7 +10050,7 @@ function dn(s, e) {
10050
10050
  createdAt: typeof t.createdAt == "string" ? t.createdAt : (/* @__PURE__ */ new Date()).toISOString(),
10051
10051
  ...B(n) !== null ? { displaySequence: B(n) } : {},
10052
10052
  ...F(n) !== null ? { causalSequence: F(n) } : {},
10053
- respondsToUserMessageId: ie(n) ?? void 0,
10053
+ respondsToUserMessageId: se(n) ?? void 0,
10054
10054
  ...L(n) ? { runId: L(n) } : {},
10055
10055
  attachments: un(n.attachments, e),
10056
10056
  ...n.steered === !0 ? { steered: !0 } : {}
@@ -10075,7 +10075,7 @@ function dn(s, e) {
10075
10075
  content: "",
10076
10076
  createdAt: typeof t.createdAt == "string" ? t.createdAt : (/* @__PURE__ */ new Date()).toISOString(),
10077
10077
  ...B(n) !== null ? { displaySequence: B(n) } : {},
10078
- respondsToUserMessageId: ie(n) ?? void 0,
10078
+ respondsToUserMessageId: se(n) ?? void 0,
10079
10079
  ...L(n) ? { runId: L(n) } : {},
10080
10080
  dataType: "function_call_output",
10081
10081
  toolName: ws,
@@ -10090,7 +10090,7 @@ function dn(s, e) {
10090
10090
  content: "",
10091
10091
  createdAt: typeof t.createdAt == "string" ? t.createdAt : (/* @__PURE__ */ new Date()).toISOString(),
10092
10092
  ...B(n) !== null ? { displaySequence: B(n) } : {},
10093
- respondsToUserMessageId: ie(n) ?? void 0,
10093
+ respondsToUserMessageId: se(n) ?? void 0,
10094
10094
  ...L(n) ? { runId: L(n) } : {},
10095
10095
  dataType: "scheduled_check_in",
10096
10096
  toolName: en,
@@ -10106,7 +10106,7 @@ function dn(s, e) {
10106
10106
  createdAt: typeof t.createdAt == "string" ? t.createdAt : (/* @__PURE__ */ new Date()).toISOString(),
10107
10107
  ...B(n) !== null ? { displaySequence: B(n) } : {},
10108
10108
  ...F(n) !== null ? { causalSequence: F(n) } : {},
10109
- respondsToUserMessageId: ie(n) ?? void 0,
10109
+ respondsToUserMessageId: se(n) ?? void 0,
10110
10110
  ...L(n) ? { runId: L(n) } : {},
10111
10111
  dataType: "function_call_output",
10112
10112
  toolName: "authenticate_pipedream_app",
@@ -10119,7 +10119,7 @@ function dn(s, e) {
10119
10119
  createdAt: typeof t.createdAt == "string" ? t.createdAt : (/* @__PURE__ */ new Date()).toISOString(),
10120
10120
  ...B(n) !== null ? { displaySequence: B(n) } : {},
10121
10121
  ...F(n) !== null ? { causalSequence: F(n) } : {},
10122
- respondsToUserMessageId: ie(n) ?? void 0,
10122
+ respondsToUserMessageId: se(n) ?? void 0,
10123
10123
  ...L(n) ? { runId: L(n) } : {},
10124
10124
  dataType: "function_call_output",
10125
10125
  toolName: "request_personal_channel_connection",
@@ -10134,7 +10134,7 @@ function dn(s, e) {
10134
10134
  createdAt: typeof t.createdAt == "string" ? t.createdAt : (/* @__PURE__ */ new Date()).toISOString(),
10135
10135
  ...B(n) !== null ? { displaySequence: B(n) } : {},
10136
10136
  ...F(n) !== null ? { causalSequence: F(n) } : {},
10137
- respondsToUserMessageId: ie(n) ?? void 0,
10137
+ respondsToUserMessageId: se(n) ?? void 0,
10138
10138
  ...L(n) ? { runId: L(n) } : {},
10139
10139
  dataType: String(n.type),
10140
10140
  toolName: n.type === "tab_lifecycle_decision" ? "tab_lifecycle_decision" : typeof n.name == "string" ? n.name : void 0,
@@ -10148,7 +10148,7 @@ function dn(s, e) {
10148
10148
  createdAt: typeof t.createdAt == "string" ? t.createdAt : (/* @__PURE__ */ new Date()).toISOString(),
10149
10149
  ...B(n) !== null ? { displaySequence: B(n) } : {},
10150
10150
  ...F(n) !== null ? { causalSequence: F(n) } : {},
10151
- respondsToUserMessageId: ie(n) ?? void 0,
10151
+ respondsToUserMessageId: se(n) ?? void 0,
10152
10152
  ...L(n) ? { runId: L(n) } : {},
10153
10153
  dataType: String(n.type),
10154
10154
  loading: n.steered !== !0 && n.type === "run_status" && (n.status === "running" || n.status === "retrying"),
@@ -10530,7 +10530,7 @@ function Hc(s) {
10530
10530
  } = s;
10531
10531
  return r;
10532
10532
  }
10533
- function ie(s) {
10533
+ function se(s) {
10534
10534
  const e = s.respondsToUserMessageId;
10535
10535
  return typeof e == "string" && e ? e : null;
10536
10536
  }
@@ -10554,7 +10554,7 @@ function mn(s) {
10554
10554
  return e;
10555
10555
  }
10556
10556
  function ks(s, e) {
10557
- return Sn(s) ? gt : ee(dt(e), Ma);
10557
+ return Sn(s) ? gt : Z(dt(e), Ma);
10558
10558
  }
10559
10559
  function Vc(s, e) {
10560
10560
  return typeof s == "string" ? s : s instanceof URL ? s.toString() : e?.url ?? "";
@@ -10588,10 +10588,10 @@ async function Gc(s) {
10588
10588
  return;
10589
10589
  const { done: c, value: u } = a;
10590
10590
  if (c)
10591
- return ee(r + n.decode());
10591
+ return Z(r + n.decode());
10592
10592
  const l = _s - o;
10593
10593
  if (u.byteLength > l)
10594
- return r += n.decode(u.subarray(0, Math.max(l, 0)), { stream: !0 }), e.cancel(), `${ee(r)}... [truncated]`;
10594
+ return r += n.decode(u.subarray(0, Math.max(l, 0)), { stream: !0 }), e.cancel(), `${Z(r)}... [truncated]`;
10595
10595
  o += u.byteLength, r += n.decode(u, { stream: !0 });
10596
10596
  }
10597
10597
  } catch {
@@ -10604,14 +10604,14 @@ async function Gc(s) {
10604
10604
  function Qc(s, e) {
10605
10605
  if (gn(new Headers(e)))
10606
10606
  try {
10607
- return s.responseType === "" || s.responseType === "text" ? ee(s.responseText ?? "") : void 0;
10607
+ return s.responseType === "" || s.responseType === "text" ? Z(s.responseText ?? "") : void 0;
10608
10608
  } catch {
10609
10609
  return;
10610
10610
  }
10611
10611
  }
10612
10612
  function Si(s) {
10613
10613
  if (typeof s == "string")
10614
- return ee(s);
10614
+ return Z(s);
10615
10615
  }
10616
10616
  function Jc(s) {
10617
10617
  return z({
@@ -10680,7 +10680,7 @@ function Zc(s) {
10680
10680
  }
10681
10681
  return e;
10682
10682
  }
10683
- function ee(s, e = _s) {
10683
+ function Z(s, e = _s) {
10684
10684
  return s.length <= e ? s : `${s.slice(0, e)}... [truncated ${s.length - e} chars]`;
10685
10685
  }
10686
10686
  function zt(s) {
@@ -10719,7 +10719,7 @@ function id(s) {
10719
10719
  function nd(s) {
10720
10720
  return s === 401 || s === 403;
10721
10721
  }
10722
- const gt = "[REDACTED_SECRET]", te = "[REDACTED_TOKEN]", rd = "[REDACTED_SIGNED_URL]", od = 20, ad = /^(access_token|accessToken|refresh_token|refreshToken|id_token|idToken|authToken|token|api_key|apiKey|apikey|key|secret|signature|sig|password|passwd|pwd|code|state|session|jwt|csrf|csrfToken|xsrf|xsrfToken)$/i, vn = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}/gi, In = /\bBasic\s+[A-Za-z0-9+/=-]{12,}/gi, bn = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g, wn = /\b(access_token|accessToken|refresh_token|refreshToken|id_token|idToken|authToken|api_key|apiKey|apikey|client_secret|clientSecret|password|secret|token|jwt|csrf|csrfToken|xsrf|xsrfToken)\b\s*[:=]\s*["']?[^"',&\s}]+/gi, cd = /\bhttps?:\/\/[^\s"'<>]+(?:X-Amz-Signature|X-Goog-Signature|Signature|sig=)[^\s"'<>]*/gi, dd = /\bhttps?:\/\/[^\s"'<>]+/gi, ld = /[),.;\]]+$/;
10722
+ const gt = "[REDACTED_SECRET]", ee = "[REDACTED_TOKEN]", rd = "[REDACTED_SIGNED_URL]", od = 20, ad = /^(access_token|accessToken|refresh_token|refreshToken|id_token|idToken|authToken|token|api_key|apiKey|apikey|key|secret|signature|sig|password|passwd|pwd|code|state|session|jwt|csrf|csrfToken|xsrf|xsrfToken)$/i, vn = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}/gi, In = /\bBasic\s+[A-Za-z0-9+/=-]{12,}/gi, bn = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g, wn = /\b(access_token|accessToken|refresh_token|refreshToken|id_token|idToken|authToken|api_key|apiKey|apikey|client_secret|clientSecret|password|secret|token|jwt|csrf|csrfToken|xsrf|xsrfToken)\b\s*[:=]\s*["']?[^"',&\s}]+/gi, cd = /\bhttps?:\/\/[^\s"'<>]+(?:X-Amz-Signature|X-Goog-Signature|Signature|sig=)[^\s"'<>]*/gi, dd = /\bhttps?:\/\/[^\s"'<>]+/gi, ld = /[),.;\]]+$/;
10723
10723
  function z(s) {
10724
10724
  return ct(s, 0, /* @__PURE__ */ new WeakSet());
10725
10725
  }
@@ -10750,17 +10750,17 @@ function _n(s) {
10750
10750
  try {
10751
10751
  const e = new URL(s, location.href);
10752
10752
  for (const t of Array.from(e.searchParams.keys()))
10753
- ad.test(t) && e.searchParams.set(t, te);
10754
- return e.username && (e.username = te), e.password && (e.password = te), e.toString();
10753
+ ad.test(t) && e.searchParams.set(t, ee);
10754
+ return e.username && (e.username = ee), e.password && (e.password = ee), e.toString();
10755
10755
  } catch {
10756
10756
  return hd(s);
10757
10757
  }
10758
10758
  }
10759
10759
  function dt(s) {
10760
- return s.replace(cd, rd).replace(dd, pd).replace(vn, `Bearer ${te}`).replace(In, `Basic ${te}`).replace(bn, te).replace(wn, (e, t) => `${t}: ${gt}`);
10760
+ return s.replace(cd, rd).replace(dd, pd).replace(vn, `Bearer ${ee}`).replace(In, `Basic ${ee}`).replace(bn, ee).replace(wn, (e, t) => `${t}: ${gt}`);
10761
10761
  }
10762
10762
  function hd(s) {
10763
- return s.replace(vn, `Bearer ${te}`).replace(In, `Basic ${te}`).replace(bn, te).replace(wn, (e, t) => `${t}: ${gt}`);
10763
+ return s.replace(vn, `Bearer ${ee}`).replace(In, `Basic ${ee}`).replace(bn, ee).replace(wn, (e, t) => `${t}: ${gt}`);
10764
10764
  }
10765
10765
  function pd(s) {
10766
10766
  const e = s.match(ld)?.[0] ?? "", t = e ? s.slice(0, -e.length) : s;
@@ -10794,7 +10794,7 @@ export {
10794
10794
  mt as ProductAgentSessionEngine,
10795
10795
  Id as ProductAgentSessionHistoryManager,
10796
10796
  bd as ProductAgentTaskPageTitleController,
10797
- ne as ProductAgentTokenProviderError,
10797
+ ie as ProductAgentTokenProviderError,
10798
10798
  Ua as calculateReconnectDelay,
10799
10799
  md as canSubmitPersonalProductAgentMessage,
10800
10800
  vd as createLocalStorageInteractionDecisionStorage,