@pluno/product-agent-web 0.1.255 → 0.1.257

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.
@@ -83,7 +83,7 @@ class O {
83
83
  for (const e of this.listeners) e(this.state);
84
84
  }
85
85
  }
86
- function y(s) {
86
+ function v(s) {
87
87
  const e = {}, t = [];
88
88
  for (const i of s.entities)
89
89
  e[i.id] || t.push(i.id), e[i.id] = i;
@@ -103,10 +103,10 @@ function G(s, e, t) {
103
103
  function Q(s) {
104
104
  return s ? s.ids.map((e) => s.entitiesById[e]).filter((e) => !!e) : [];
105
105
  }
106
- function _e(s) {
106
+ function Ie(s) {
107
107
  return s.visible ? s.minimized ? { state: "minimized" } : { state: s.open ? "visible_open" : "visible_closed" } : { state: "hidden" };
108
108
  }
109
- function Ie(s, e) {
109
+ function _e(s, e) {
110
110
  return e === "limit_exceeded" ? { allowed: !1, reason: "credits_exhausted", actions: ["upgrade", "earn_credits"] } : e === "subscription_required" || e === "subscription_inactive" || e === "payment_issue" || e === "subscription_invalid" || e === "payment_required" ? { allowed: !1, reason: "payment_issue", actions: ["upgrade"] } : s ?? { allowed: !0, reason: "allowed", actions: [] };
111
111
  }
112
112
  function Se(s) {
@@ -120,7 +120,7 @@ function we(s) {
120
120
  function Ae(s) {
121
121
  return s.submissionAllowed && s.isAuthenticated && s.hasWorkspace && !s.isWebsiteBlocked && s.isCurrentPageResolved && !s.isSubmitting && !s.hasPendingMessage;
122
122
  }
123
- function Ee(s) {
123
+ function Te(s) {
124
124
  const e = s.hasDraftMessage || s.hasPreSubmittedAttachment;
125
125
  return s.hasRunningAssistantTurn && !e ? {
126
126
  action: "stop",
@@ -134,11 +134,11 @@ const H = "Pluno is reconnecting. Try again in a moment.";
134
134
  function Z(s) {
135
135
  return (s instanceof Error ? s.message : s) === H;
136
136
  }
137
- class Me {
137
+ class Ee {
138
138
  constructor(e, t, i = 20) {
139
139
  this.loadPage = t, this.limit = i, this.recentQuery = new O(
140
140
  `${e}:recent`,
141
- async ({ cursor: n }) => y(
141
+ async ({ cursor: n }) => v(
142
142
  await this.loadPage({ cursor: n, limit: this.limit, pinned: !1 }).then((r) => ({
143
143
  entities: r.sessions,
144
144
  nextCursor: r.nextCursor
@@ -147,7 +147,7 @@ class Me {
147
147
  G
148
148
  ), this.pinnedQuery = new O(
149
149
  `${e}:pinned`,
150
- async () => y({
150
+ async () => v({
151
151
  entities: await this.loadAllPinned(),
152
152
  nextCursor: null
153
153
  })
@@ -167,11 +167,11 @@ class Me {
167
167
  activityReconciliationScheduled = !1;
168
168
  getState() {
169
169
  const e = this.recentQuery.getState(), t = this.pinnedQuery.getState(), i = [
170
- ...g(t.data),
171
- ...g(e.data)
170
+ ...f(t.data),
171
+ ...f(e.data)
172
172
  ], n = new Map(i.map((d) => [d.id, d])), r = Array.from(n.values()).map(
173
173
  (d) => this.applyOverrides(d, this.completedRefreshSequence)
174
- ), o = Array.from(this.optimisticEntities.values()).filter((d) => !n.has(d.id)).reverse(), a = e.data || t.data || o.length > 0 ? y({
174
+ ), o = Array.from(this.optimisticEntities.values()).filter((d) => !n.has(d.id)).reverse(), a = e.data || t.data || o.length > 0 ? v({
175
175
  entities: [...o, ...r],
176
176
  nextCursor: e.data?.nextCursor ?? null
177
177
  }) : null;
@@ -243,8 +243,8 @@ class Me {
243
243
  }
244
244
  reconcileDurableEntities() {
245
245
  const e = [
246
- ...g(this.pinnedQuery.getState().data),
247
- ...g(this.recentQuery.getState().data)
246
+ ...f(this.pinnedQuery.getState().data),
247
+ ...f(this.recentQuery.getState().data)
248
248
  ], t = new Set(e.map((i) => i.id));
249
249
  for (const i of this.optimisticEntities.keys())
250
250
  t.has(i) && this.optimisticEntities.delete(i);
@@ -283,7 +283,7 @@ class Me {
283
283
  for (const e of this.listeners) e(this.getState());
284
284
  }
285
285
  }
286
- function g(s) {
286
+ function f(s) {
287
287
  return s ? s.ids.map((e) => s.entitiesById[e]).filter((e) => !!e) : [];
288
288
  }
289
289
  function V(s, e) {
@@ -320,7 +320,7 @@ function W(s, e) {
320
320
  return !0;
321
321
  return !1;
322
322
  }
323
- class Pe {
323
+ class Me {
324
324
  constructor(e, t = null) {
325
325
  this.storage = e, t && (this.decisions = new Map(
326
326
  t.filter(A).map((i) => [this.getDecisionKey(i), i])
@@ -463,17 +463,17 @@ class Pe {
463
463
  return null;
464
464
  }
465
465
  getDecisionKey(e) {
466
- const t = I(e.scope);
466
+ const t = _(e.scope);
467
467
  return e.action === "dont_show_again" ? `${t}:category:${e.category}` : `${t}:interaction:${e.promptKey}`;
468
468
  }
469
469
  getExactKey(e) {
470
- return `${I(e.scope)}:interaction:${e.key}`;
470
+ return `${_(e.scope)}:interaction:${e.key}`;
471
471
  }
472
472
  getCategoryKey(e) {
473
- return `${I(e.scope)}:category:${e.category}`;
473
+ return `${_(e.scope)}:category:${e.category}`;
474
474
  }
475
475
  }
476
- function Te(s, e) {
476
+ function Pe(s, e) {
477
477
  return {
478
478
  load: async () => Y(s, e),
479
479
  save: async (t) => s.setItem(e, JSON.stringify(t))
@@ -485,7 +485,7 @@ function Y(s, e) {
485
485
  const i = JSON.parse(t);
486
486
  return Array.isArray(i) ? i.filter(A) : [];
487
487
  }
488
- function I(s) {
488
+ function _(s) {
489
489
  return `${s.level}:${s.key}`;
490
490
  }
491
491
  function z(s) {
@@ -503,8 +503,8 @@ const X = {
503
503
  stopped: "⏹️"
504
504
  }, ee = /^(?:⌛|⏳|✅|❗|⏹️) Pluno(?:: )?/;
505
505
  function te(s, e) {
506
- if (!e) return _(s);
507
- const t = _(s), i = `${X[e]} Pluno`;
506
+ if (!e) return I(s);
507
+ const t = I(s), i = `${X[e]} Pluno`;
508
508
  return t ? `${i}: ${t}` : i;
509
509
  }
510
510
  class Oe {
@@ -529,10 +529,10 @@ class Oe {
529
529
  }
530
530
  applyStatus(e) {
531
531
  const t = this.titleDocument.getTitle();
532
- t !== this.lastAppliedTitle && (this.baseTitle = _(t)), this.status = e, this.stopObserving || (this.stopObserving = this.titleDocument.observeTitle(() => this.handleTitleChanged())), this.applyTitle();
532
+ t !== this.lastAppliedTitle && (this.baseTitle = I(t)), this.status = e, this.stopObserving || (this.stopObserving = this.titleDocument.observeTitle(() => this.handleTitleChanged())), this.applyTitle();
533
533
  }
534
534
  applyClear() {
535
- const e = this.titleDocument.getTitle(), t = this.lastAppliedTitle !== null && e === this.lastAppliedTitle, i = this.lastAppliedTitle === null ? _(e) : e;
535
+ const e = this.titleDocument.getTitle(), t = this.lastAppliedTitle !== null && e === this.lastAppliedTitle, i = this.lastAppliedTitle === null ? I(e) : e;
536
536
  this.status = null, this.lastAppliedTitle = null, this.stopObserving?.(), this.stopObserving = null, t ? this.titleDocument.setTitle(this.baseTitle) : i !== e && this.titleDocument.setTitle(i);
537
537
  }
538
538
  handleTitleChanged() {
@@ -561,7 +561,7 @@ function qe(s) {
561
561
  }
562
562
  };
563
563
  }
564
- function _(s) {
564
+ function I(s) {
565
565
  return s.replace(ee, "");
566
566
  }
567
567
  const p = (s) => typeof s == "string" && /^[a-zA-Z0-9:_.-]{1,160}$/.test(s) ? s : null;
@@ -575,11 +575,11 @@ function K(s) {
575
575
  const e = s;
576
576
  return Object.keys(e).every((t) => ["sessionId", "episodeId", "consecutiveFailures", "transportCode", "requestId", "durationMs"].includes(t)) && typeof e.sessionId == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(e.sessionId) && typeof e.episodeId == "string" && /^[a-zA-Z0-9:_-]{1,500}$/.test(e.episodeId) && (e.transportCode === void 0 || typeof e.transportCode == "string" && /^[a-z0-9_]{1,80}$/.test(e.transportCode)) && (e.requestId === void 0 || typeof e.requestId == "string" && /^[a-zA-Z0-9_-]{1,160}$/.test(e.requestId)) && (e.durationMs === void 0 || typeof e.durationMs == "number" && Number.isFinite(e.durationMs) && e.durationMs >= 0) && Number.isSafeInteger(e.consecutiveFailures) && e.consecutiveFailures >= 1;
577
577
  }
578
- const R = ["messageKeys", "canonicalItemKeys", "terminalResponseKeys", "toolCallKeys", "activeResponseKeys"], E = (s) => typeof s == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(s), v = (s) => s === null || E(s), ie = (s) => typeof s == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?(?:Z|\+00:00)$/.test(s) && Number.isFinite(Date.parse(s));
578
+ const R = ["messageKeys", "canonicalItemKeys", "terminalResponseKeys", "toolCallKeys", "activeResponseKeys"], T = (s) => typeof s == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(s), h = (s) => s === null || T(s), ie = (s) => typeof s == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?(?:Z|\+00:00)$/.test(s) && Number.isFinite(Date.parse(s));
579
579
  function $(s) {
580
580
  if (!s || typeof s != "object") return !1;
581
581
  const e = s;
582
- return Object.keys(s).every((t) => ["sessionId", "itemId", "userMessageId", "createdAt", "runId", "retryable"].includes(t)) && v(e.sessionId) && E(e.itemId) && v(e.userMessageId) && (e.retryable === void 0 || typeof e.retryable == "boolean") && v(e.runId) && (e.createdAt === null || ie(e.createdAt));
582
+ return Object.keys(s).every((t) => ["sessionId", "itemId", "userMessageId", "createdAt", "runId", "retryable"].includes(t)) && h(e.sessionId) && T(e.itemId) && h(e.userMessageId) && (e.retryable === void 0 || typeof e.retryable == "boolean") && h(e.runId) && (e.createdAt === null || ie(e.createdAt));
583
583
  }
584
584
  function ne(s) {
585
585
  if (!s || typeof s != "object") return !1;
@@ -591,7 +591,7 @@ function U(s) {
591
591
  const e = (i) => {
592
592
  if (!i || typeof i != "object") return !1;
593
593
  const n = i;
594
- return Object.keys(i).every((r) => [...R, "sessionId", "runtimeItemCount", "welcome", "truncated", "thinkingSequence", "context"].includes(r)) && (n.context === void 0 || ne(n.context)) && (n.thinkingSequence === void 0 || Array.isArray(n.thinkingSequence) && n.thinkingSequence.length <= 20 && n.thinkingSequence.every((r) => r === "user" || r === "thinking")) && v(n.sessionId) && Number.isSafeInteger(n.runtimeItemCount) && n.runtimeItemCount >= 0 && typeof n.welcome == "boolean" && typeof n.truncated == "boolean" && R.every((r) => Array.isArray(n[r]) && n[r].length <= 20 && n[r].every(E));
594
+ return Object.keys(i).every((r) => [...R, "sessionId", "runtimeItemCount", "welcome", "truncated", "thinkingSequence", "context", "duplicateToolCalls"].includes(r)) && (n.duplicateToolCalls === void 0 || Array.isArray(n.duplicateToolCalls) && n.duplicateToolCalls.length <= 5 && n.duplicateToolCalls.every((r) => r && Object.keys(r).every((o) => ["key", "count", "rows", "truncated"].includes(o)) && h(r.key) && Number.isSafeInteger(r.count) && r.count >= 2 && typeof r.truncated == "boolean" && Array.isArray(r.rows) && r.rows.length >= 1 && r.rows.length <= 5 && r.rows.length <= r.count && r.rows.every((o) => o && Object.keys(o).every((a) => ["itemId", "groupId"].includes(a)) && h(o.itemId) && h(o.groupId)))) && (n.context === void 0 || ne(n.context)) && (n.thinkingSequence === void 0 || Array.isArray(n.thinkingSequence) && n.thinkingSequence.length <= 20 && n.thinkingSequence.every((r) => r === "user" || r === "thinking")) && h(n.sessionId) && Number.isSafeInteger(n.runtimeItemCount) && n.runtimeItemCount >= 0 && typeof n.welcome == "boolean" && typeof n.truncated == "boolean" && R.every((r) => Array.isArray(n[r]) && n[r].length <= 20 && n[r].every(T));
595
595
  }, t = s;
596
596
  return (t.before === null || e(t.before)) && e(t.current);
597
597
  }
@@ -606,10 +606,10 @@ function re(s) {
606
606
  e ^= s.charCodeAt(t), e = Math.imul(e, 16777619);
607
607
  return `fnv1a-${(e >>> 0).toString(16).padStart(8, "0")}`;
608
608
  }
609
- const oe = "0.1.255", ae = {
609
+ const oe = "0.1.257", ae = {
610
610
  version: oe
611
611
  };
612
- function M(s) {
612
+ function E(s) {
613
613
  if (!s || typeof s != "object") return !1;
614
614
  const e = s;
615
615
  return Object.keys(s).every((t) => ["boundary", "category", "messageKind"].includes(t)) && ["runtime", "web_transport", "extension_ipc"].includes(e.boundary) && ["error", "object", "null", "array", "string", "undefined", "number", "boolean", "bigint", "symbol", "function"].includes(e.category) && ["object_coercion", "text", "blank", "non_text"].includes(e.messageKind);
@@ -617,7 +617,7 @@ function M(s) {
617
617
  function de(s) {
618
618
  if (!s || typeof s != "object") return !1;
619
619
  const e = s;
620
- return Object.keys(e).every((t) => ["sessionId", "requestId", "code", "normalization", "builds", "clientMessageId"].includes(t)) && (e.clientMessageId === void 0 || p(e.clientMessageId) !== null) && [e.sessionId, e.requestId, e.code].every((t) => t === null || p(t) !== null) && (e.normalization === void 0 || M(e.normalization)) && !!e.builds && typeof e.builds == "object" && typeof e.builds.sdk == "string" && Object.entries(e.builds).every(([t, i]) => ["sdk", "rendererExtension", "contentExtension", "backgroundExtension"].includes(t) && typeof i == "string" && /^\d{1,5}\.\d{1,5}\.\d{1,5}$/.test(i));
620
+ return Object.keys(e).every((t) => ["sessionId", "requestId", "code", "normalization", "builds", "clientMessageId"].includes(t)) && (e.clientMessageId === void 0 || p(e.clientMessageId) !== null) && [e.sessionId, e.requestId, e.code].every((t) => t === null || p(t) !== null) && (e.normalization === void 0 || E(e.normalization)) && !!e.builds && typeof e.builds == "object" && typeof e.builds.sdk == "string" && Object.entries(e.builds).every(([t, i]) => ["sdk", "rendererExtension", "contentExtension", "backgroundExtension"].includes(t) && typeof i == "string" && /^\d{1,5}\.\d{1,5}\.\d{1,5}$/.test(i));
621
621
  }
622
622
  function ce(s, e, t, i, n = {}) {
623
623
  const r = !i && e === "conversation_error" && t !== void 0 && s.conversationDiagnostics?.errorMessageFingerprint === re(L(t)) ? s.conversationDiagnostics : void 0;
@@ -626,7 +626,7 @@ function ce(s, e, t, i, n = {}) {
626
626
  requestId: p(r?.httpRequest?.requestId ?? r?.errorRequestId ?? r?.queryRequestId),
627
627
  ...p(r?.failedClientMessageId) ? { clientMessageId: r.failedClientMessageId } : {},
628
628
  code: r ? p(s.lastErrorCode) : null,
629
- ...M(r?.errorNormalization) ? { normalization: r.errorNormalization } : {},
629
+ ...E(r?.errorNormalization) ? { normalization: r.errorNormalization } : {},
630
630
  builds: { sdk: ae.version, ...n }
631
631
  };
632
632
  }
@@ -640,10 +640,10 @@ function le(s) {
640
640
  ...s.details === void 0 ? {} : { details: s.details }
641
641
  };
642
642
  }
643
- function h(s, e = "runtime_error", t = "runtime") {
643
+ function g(s, e = "runtime_error", t = "runtime") {
644
644
  const i = s !== null && typeof s == "object" ? s : null, n = typeof s == "string" ? s : i && "message" in i && typeof i.message == "string" ? i.message : "", r = i && "code" in i && typeof i.code == "string" && i.code.trim() ? i.code : e, o = i && "details" in i ? i.details : null, a = o && typeof o == "object" ? o : {}, d = {
645
645
  // Preserve the first boundary's shape after normalization replaces the original message/prototype.
646
- errorNormalization: M(a.errorNormalization) ? a.errorNormalization : {
646
+ errorNormalization: E(a.errorNormalization) ? a.errorNormalization : {
647
647
  boundary: t,
648
648
  category: s instanceof Error ? "error" : s === null ? "null" : Array.isArray(s) ? "array" : typeof s,
649
649
  messageKind: n.trim() === "[object Object]" ? "object_coercion" : n.trim() ? "text" : typeof s == "string" || i && "message" in i && typeof i.message == "string" ? "blank" : "non_text"
@@ -727,7 +727,9 @@ const ue = [
727
727
  "warmup_http",
728
728
  "warmup_wait",
729
729
  "acceptance_received",
730
- "acceptance_applied"
730
+ "acceptance_applied",
731
+ "cancellation_queue",
732
+ "cancellation_write"
731
733
  ], B = [
732
734
  "request_timed_out",
733
735
  "delivery_unknown",
@@ -750,11 +752,11 @@ function pe(s) {
750
752
  }
751
753
  const he = Math.random().toString(36).slice(2);
752
754
  let ge = 0;
753
- const C = () => `timing:${he}:${++ge}`, f = (s) => typeof s == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(s);
754
- function P(s) {
755
+ const C = () => `timing:${he}:${++ge}`, y = (s) => typeof s == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(s);
756
+ function M(s) {
755
757
  if (!s || typeof s != "object") return !1;
756
758
  const e = s;
757
- return Object.keys(e).every((t) => ["entrySurface", "operation", "layer", "stage", "status", "spanId", "requestId", "clientMessageId", "sessionId", "occurredAt", "durationMs", "failureCategory"].includes(t)) && (e.failureCategory === void 0 || e.status === "failed" && B.includes(e.failureCategory)) && (e.entrySurface === void 0 || ["extension_sidepanel", "extension_widget", "main_web_chat", "embedded_widget", "embedded_custom_ui", "automation", "mcp", "whatsapp", "email"].includes(e.entrySurface)) && ["send", "stop"].includes(e.operation) && ["renderer", "sdk", "extension", "http"].includes(e.layer) && ue.includes(e.stage) && ["started", "completed", "failed", "observed"].includes(e.status) && f(e.spanId) && f(e.requestId) && (e.clientMessageId === null || f(e.clientMessageId)) && (e.sessionId === null || f(e.sessionId)) && typeof e.occurredAt == "string" && e.occurredAt.length <= 40 && Number.isFinite(Date.parse(e.occurredAt)) && Number.isSafeInteger(e.durationMs) && e.durationMs >= 0;
759
+ return Object.keys(e).every((t) => ["entrySurface", "operation", "layer", "stage", "status", "spanId", "requestId", "clientMessageId", "sessionId", "occurredAt", "durationMs", "failureCategory"].includes(t)) && (e.failureCategory === void 0 || e.status === "failed" && B.includes(e.failureCategory)) && (e.entrySurface === void 0 || ["extension_sidepanel", "extension_widget", "main_web_chat", "embedded_widget", "embedded_custom_ui", "automation", "mcp", "whatsapp", "email"].includes(e.entrySurface)) && ["send", "stop"].includes(e.operation) && ["renderer", "sdk", "extension", "http"].includes(e.layer) && ue.includes(e.stage) && ["started", "completed", "failed", "observed"].includes(e.status) && y(e.spanId) && y(e.requestId) && (e.clientMessageId === null || y(e.clientMessageId)) && (e.sessionId === null || y(e.sessionId)) && typeof e.occurredAt == "string" && e.occurredAt.length <= 40 && Number.isFinite(Date.parse(e.occurredAt)) && Number.isSafeInteger(e.durationMs) && e.durationMs >= 0;
758
760
  }
759
761
  function x(s, e) {
760
762
  if (!s) return {
@@ -772,7 +774,7 @@ function x(s, e) {
772
774
  durationMs: Math.max(0, Math.round(performance.now() - o)),
773
775
  ...r === "failed" ? { failureCategory: pe(d) } : {}
774
776
  };
775
- s && P(c) && Promise.resolve().then(() => s(c)).catch(() => {
777
+ s && M(c) && Promise.resolve().then(() => s(c)).catch(() => {
776
778
  });
777
779
  };
778
780
  return {
@@ -794,7 +796,7 @@ function fe(s) {
794
796
  const e = s;
795
797
  return typeof e.observedAt == "string" && e.observedAt.length <= 40 && Number.isFinite(Date.parse(e.observedAt)) && S(e.sessionId) && S(e.responseItemId) && S(e.respondsToUserMessageId) && typeof e.panelVisible == "boolean" && typeof e.documentVisible == "boolean" && typeof e.loading == "boolean";
796
798
  }
797
- function me(s, e, t = "stopped", i, n = "Run stopped by user.") {
799
+ function ye(s, e, t = "stopped", i, n = "Run stopped by user.") {
798
800
  const r = new Set(i ?? [
799
801
  s.assistantDraftRespondsToUserMessageId,
800
802
  s.activeResponseUserMessageId,
@@ -821,7 +823,7 @@ function me(s, e, t = "stopped", i, n = "Run stopped by user.") {
821
823
  lastErrorCode: null
822
824
  };
823
825
  }
824
- const ye = {
826
+ const me = {
825
827
  "stop-without-rendered-message": "Stop is enabled while no message is rendered or the welcome screen is still visible.",
826
828
  "in-progress-stop-unavailable": "An in-progress response has no visible enabled interrupt control.",
827
829
  "stop-did-not-interrupt": "The stopped response remained in progress after an interrupt click.",
@@ -838,7 +840,7 @@ const ye = {
838
840
  "thinking-without-progress": "Thinking remained visible without progress for five minutes."
839
841
  };
840
842
  function ve(s) {
841
- return typeof s == "string" && s.startsWith("ui_invariant:") && Object.prototype.hasOwnProperty.call(ye, s.slice(13));
843
+ return typeof s == "string" && s.startsWith("ui_invariant:") && Object.prototype.hasOwnProperty.call(me, s.slice(13));
842
844
  }
843
845
  function D(s) {
844
846
  return {
@@ -867,7 +869,7 @@ function Re(s) {
867
869
  case "runtime.warmup":
868
870
  return e.reason === "panel_open" || e.reason === "extension_install" || e.reason === "composer_input";
869
871
  case "runtime.report_operation_timing":
870
- return P(e.timing);
872
+ return M(e.timing);
871
873
  case "runtime.report_displayed_error":
872
874
  return (e.errorDiagnostic === void 0 || de(e.errorDiagnostic)) && (e.httpRequest === void 0 || F(e.httpRequest)) && (e.historyRefreshFailure === void 0 || K(e.historyRefreshFailure)) && (e.renderedError === void 0 || $(e.renderedError)) && (e.reason === "conversation_error" || e.reason === "attachment_error" || e.reason === "history_error" || e.reason === "action_error") && typeof e.errorFingerprint == "string" && /^fnv1a-[0-9a-f]{8}$/.test(e.errorFingerprint) && (e.displayedMessage === void 0 || typeof e.displayedMessage == "string" && e.displayedMessage.length <= 500);
873
875
  case "runtime.report_invalid_state_transition":
@@ -935,7 +937,7 @@ class ke {
935
937
  this.stopError && (e.lastError = this.stopError, e.lastErrorCode = "stop_failed");
936
938
  const t = [...this.stopPreviews.keys()];
937
939
  if (!t.length) return e;
938
- const i = me(e, "", "stopping", t);
940
+ const i = ye(e, "", "stopping", t);
939
941
  return e.activeResponseUserMessageId && !this.stopPreviews.has(e.activeResponseUserMessageId) ? { ...e, messages: i.messages, segments: i.segments } : i;
940
942
  }
941
943
  updateProjection(e, t, i, n, r) {
@@ -988,7 +990,7 @@ class ke {
988
990
  this.dispatch({ type: "runtime.widget_lifecycle", action: e, trigger: t });
989
991
  }
990
992
  reportOperationTiming(e) {
991
- !this.destroyed && P(e) && this.adapter.dispatch({ type: "runtime.report_operation_timing", timing: e }).catch(() => {
993
+ !this.destroyed && M(e) && this.adapter.dispatch({ type: "runtime.report_operation_timing", timing: e }).catch(() => {
992
994
  });
993
995
  }
994
996
  reportResponseVisibility(e) {
@@ -1078,9 +1080,9 @@ class ke {
1078
1080
  l.push(u);
1079
1081
  continue;
1080
1082
  }
1081
- const T = u.id ? this.attachmentFiles.get(u.id) : void 0;
1082
- if (!T) throw new Error(`Attachment bytes are unavailable for ${u.name}`);
1083
- if (l.push(await o.measure("attachment_transfer", () => this.adapter.uploadAttachment(T, u, { clientMessageId: r }))), i !== this.submissionGeneration) return null;
1083
+ const P = u.id ? this.attachmentFiles.get(u.id) : void 0;
1084
+ if (!P) throw new Error(`Attachment bytes are unavailable for ${u.name}`);
1085
+ if (l.push(await o.measure("attachment_transfer", () => this.adapter.uploadAttachment(P, u, { clientMessageId: r }))), i !== this.submissionGeneration) return null;
1084
1086
  }
1085
1087
  a = l;
1086
1088
  }
@@ -1103,10 +1105,10 @@ class ke {
1103
1105
  for (const u of t.attachments ?? [])
1104
1106
  u.id && this.attachmentFiles.delete(u.id);
1105
1107
  const l = this.submissionPreviews.get(r);
1106
- throw l && (l.pending = !1, l.error = h(c).message, l.retry = !d && h(c).code === "command_not_received" ? () => this.sendMessageNow(e, t, i) : void 0, this.emit("state", this.getState())), d && await this.adapter.dispatch({
1108
+ throw l && (l.pending = !1, l.error = g(c).message, l.retry = !d && g(c).code === "command_not_received" ? () => this.sendMessageNow(e, t, i) : void 0, this.emit("state", this.getState())), d && await this.adapter.dispatch({
1107
1109
  type: "conversation.fail_staged",
1108
1110
  clientMessageId: r,
1109
- message: h(c).message
1111
+ message: g(c).message
1110
1112
  }), c;
1111
1113
  }
1112
1114
  }
@@ -1127,7 +1129,7 @@ class ke {
1127
1129
  return i && n ? (i.pending = !0, i.error = void 0, i.retry = void 0, this.pendingTransfers.set(t, (i.message.attachments ?? []).flatMap((o) => o.id ? [o.id] : [])), this.emit("state", this.getState()), await n()) : await this.dispatch({ type: "run.retry", clientMessageId: t }), !0;
1128
1130
  } catch (o) {
1129
1131
  if (!i) throw o;
1130
- return r === this.submissionGeneration && this.submissionPreviews.get(t) === i && (i.error = h(o).message, this.emit("state", this.getState())), !1;
1132
+ return r === this.submissionGeneration && this.submissionPreviews.get(t) === i && (i.error = g(o).message, this.emit("state", this.getState())), !1;
1131
1133
  } finally {
1132
1134
  n && this.pendingTransfers.delete(t), i && r === this.submissionGeneration && this.submissionPreviews.get(t) === i && (i.pending = !1, this.emit("state", this.getState()));
1133
1135
  }
@@ -1165,7 +1167,7 @@ class ke {
1165
1167
  }, (c) => {
1166
1168
  if (!(a !== this.submissionGeneration || i.every((l) => !this.stopPreviews.has(l)))) {
1167
1169
  for (const l of i) this.stopPreviews.delete(l);
1168
- this.stopError = h(c).message;
1170
+ this.stopError = g(c).message;
1169
1171
  }
1170
1172
  }).finally(() => {
1171
1173
  this.destroyed || a !== this.submissionGeneration || (this.pendingStop === r && (this.pendingStop = null), this.emit("state", this.getState()));
@@ -1323,7 +1325,7 @@ function w(s) {
1323
1325
  function j(s) {
1324
1326
  return {
1325
1327
  ...s,
1326
- data: s.data ? y({
1328
+ data: s.data ? v({
1327
1329
  entities: Q(s.data).map((e) => ({ ...e })),
1328
1330
  nextCursor: s.data.nextCursor
1329
1331
  }) : null
@@ -1331,13 +1333,13 @@ function j(s) {
1331
1333
  }
1332
1334
  export {
1333
1335
  H as PRODUCT_AGENT_AUTH_RECONNECTING_ERROR_MESSAGE,
1334
- Pe as ProductAgentInteractionManager,
1336
+ Me as ProductAgentInteractionManager,
1335
1337
  O as ProductAgentQueryController,
1336
1338
  ke as ProductAgentRemoteRuntimeClient,
1337
- Me as ProductAgentSessionHistoryManager,
1339
+ Ee as ProductAgentSessionHistoryManager,
1338
1340
  Oe as ProductAgentTaskPageTitleController,
1339
1341
  Ae as canSubmitPersonalProductAgentMessage,
1340
- Te as createLocalStorageInteractionDecisionStorage,
1342
+ Pe as createLocalStorageInteractionDecisionStorage,
1341
1343
  m as createProductAgentQueryState,
1342
1344
  qe as createProductAgentTaskPageTitleDocument,
1343
1345
  te as formatProductAgentTaskPageTitle,
@@ -1345,11 +1347,11 @@ export {
1345
1347
  Z as isProductAgentAuthReconnectError,
1346
1348
  Re as isProductAgentRuntimeCommand,
1347
1349
  G as mergeProductAgentEntityPages,
1348
- y as normalizeProductAgentEntityPage,
1350
+ v as normalizeProductAgentEntityPage,
1349
1351
  Y as readLocalStorageInteractionDecisions,
1350
- Ie as reconcileProductAgentSubmissionGate,
1352
+ _e as reconcileProductAgentSubmissionGate,
1351
1353
  we as resolveProductAgentBillingPresentation,
1352
- Ee as resolveProductAgentComposerAction,
1353
- _e as resolveProductAgentWidgetPresentation,
1354
+ Te as resolveProductAgentComposerAction,
1355
+ Ie as resolveProductAgentWidgetPresentation,
1354
1356
  Q as selectProductAgentQueryEntities
1355
1357
  };