@pluno/product-agent-web 0.1.319 → 0.1.321

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.
@@ -123,10 +123,10 @@ function Ae(i) {
123
123
  };
124
124
  }
125
125
  const W = "Pluno is reconnecting. Try again in a moment.";
126
- function C(i) {
126
+ function x(i) {
127
127
  return (i instanceof Error ? i.message : i) === W;
128
128
  }
129
- class Me {
129
+ class Ee {
130
130
  constructor(e, t, s = 20) {
131
131
  this.loadPage = t, this.limit = s, this.recentQuery = new O(
132
132
  `${e}:recent`,
@@ -296,7 +296,7 @@ function X(i) {
296
296
  if (!A(i)) throw new Error("Conversation inputs must be JSON-safe values.");
297
297
  return JSON.parse(JSON.stringify(i));
298
298
  }
299
- class Ee {
299
+ class Me {
300
300
  constructor(e, t = null) {
301
301
  this.storage = e, t && (this.decisions = new Map(
302
302
  t.filter(P).map((s) => [this.getDecisionKey(s), s])
@@ -421,14 +421,14 @@ class Ee {
421
421
  return null;
422
422
  }
423
423
  getDecisionKey(e) {
424
- const t = E(e.scope);
424
+ const t = M(e.scope);
425
425
  return e.action === "dont_show_again" ? `${t}:category:${e.category}` : `${t}:interaction:${e.promptKey}`;
426
426
  }
427
427
  getExactKey(e) {
428
- return `${E(e.scope)}:interaction:${e.key}`;
428
+ return `${M(e.scope)}:interaction:${e.key}`;
429
429
  }
430
430
  getCategoryKey(e) {
431
- return `${E(e.scope)}:category:${e.category}`;
431
+ return `${M(e.scope)}:category:${e.category}`;
432
432
  }
433
433
  }
434
434
  function Te(i, e) {
@@ -443,7 +443,7 @@ function ee(i, e) {
443
443
  const s = JSON.parse(t);
444
444
  return Array.isArray(s) ? s.filter(P) : [];
445
445
  }
446
- function E(i) {
446
+ function M(i) {
447
447
  return `${i.level}:${i.key}`;
448
448
  }
449
449
  function $(i) {
@@ -461,8 +461,8 @@ const te = {
461
461
  stopped: "⏹️"
462
462
  }, se = /^(?:⌛|⏳|✅|❗|⏹️) Pluno(?:: )?/;
463
463
  function ie(i, e) {
464
- if (!e) return M(i);
465
- const t = M(i), s = `${te[e]} Pluno`;
464
+ if (!e) return E(i);
465
+ const t = E(i), s = `${te[e]} Pluno`;
466
466
  return t ? `${s}: ${t}` : s;
467
467
  }
468
468
  class Pe {
@@ -487,10 +487,10 @@ class Pe {
487
487
  }
488
488
  applyStatus(e) {
489
489
  const t = this.titleDocument.getTitle();
490
- t !== this.lastAppliedTitle && (this.baseTitle = M(t)), this.status = e, this.stopObserving || (this.stopObserving = this.titleDocument.observeTitle(() => this.handleTitleChanged())), this.applyTitle();
490
+ t !== this.lastAppliedTitle && (this.baseTitle = E(t)), this.status = e, this.stopObserving || (this.stopObserving = this.titleDocument.observeTitle(() => this.handleTitleChanged())), this.applyTitle();
491
491
  }
492
492
  applyClear() {
493
- const e = this.titleDocument.getTitle(), t = this.lastAppliedTitle !== null && e === this.lastAppliedTitle, s = this.lastAppliedTitle === null ? M(e) : e;
493
+ const e = this.titleDocument.getTitle(), t = this.lastAppliedTitle !== null && e === this.lastAppliedTitle, s = this.lastAppliedTitle === null ? E(e) : e;
494
494
  this.status = null, this.lastAppliedTitle = null, this.stopObserving?.(), this.stopObserving = null, t ? this.titleDocument.setTitle(this.baseTitle) : s !== e && this.titleDocument.setTitle(s);
495
495
  }
496
496
  handleTitleChanged() {
@@ -519,10 +519,10 @@ function Re(i) {
519
519
  }
520
520
  };
521
521
  }
522
- function M(i) {
522
+ function E(i) {
523
523
  return i.replace(se, "");
524
524
  }
525
- const ne = "0.1.319", re = {
525
+ const ne = "0.1.321", re = {
526
526
  version: ne
527
527
  }, g = (i) => typeof i == "string" && /^[a-zA-Z0-9:_.-]{1,160}$/.test(i) ? i : null;
528
528
  function oe(i) {
@@ -535,8 +535,8 @@ function F(i) {
535
535
  const e = i;
536
536
  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;
537
537
  }
538
- const x = ["messageKeys", "canonicalItemKeys", "terminalResponseKeys", "toolCallKeys", "activeResponseKeys"], R = (i) => typeof i == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(i), y = (i) => i === null || R(i), ae = (i) => typeof i == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?(?:Z|\+00:00)$/.test(i) && Number.isFinite(Date.parse(i));
539
- function U(i) {
538
+ const D = ["messageKeys", "canonicalItemKeys", "terminalResponseKeys", "toolCallKeys", "activeResponseKeys"], R = (i) => typeof i == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(i), y = (i) => i === null || R(i), ae = (i) => typeof i == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?(?:Z|\+00:00)$/.test(i) && Number.isFinite(Date.parse(i));
539
+ function G(i) {
540
540
  if (!i || typeof i != "object") return !1;
541
541
  const e = i;
542
542
  return Object.keys(i).every((t) => ["sessionId", "itemId", "userMessageId", "createdAt", "runId", "retryable"].includes(t)) && y(e.sessionId) && R(e.itemId) && y(e.userMessageId) && (e.retryable === void 0 || typeof e.retryable == "boolean") && y(e.runId) && (e.createdAt === null || ae(e.createdAt));
@@ -546,19 +546,19 @@ function de(i) {
546
546
  const e = i, t = (s) => Number.isSafeInteger(s) && s >= 0;
547
547
  return Object.keys(e).every((s) => ["capturedAt", "selectionKey", "userId", "loading", "draft", "thinking", "connected", "hasError", "phase", "queryStatus", "queryRequestId", "queryUpdatedAt", "renderSource", "selectionFencePending", "guardCreatedAt", "owner", "sdkVersion", "presentationGate", "firstObservedAt", "confirmationMs"].includes(s)) && t(e.capturedAt) && [e.queryUpdatedAt, e.guardCreatedAt].every((s) => s === null || t(s)) && [e.selectionKey, e.userId, e.phase, e.queryStatus, e.queryRequestId].every((s) => s === null || g(s) !== null) && [e.loading, e.draft, e.thinking, e.connected, e.hasError, e.selectionFencePending].every((s) => typeof s == "boolean") && ["state", "account", "interactions", "local", "sidepanel_layout", "observer"].includes(e.renderSource) && (e.owner === void 0 || oe(e.owner)) && (e.sdkVersion === void 0 || typeof e.sdkVersion == "string" && e.sdkVersion.length <= 32 && /^\d+\.\d+\.\d+(?:[-+][a-zA-Z0-9.-]+)?$/.test(e.sdkVersion)) && (e.presentationGate === void 0 || ["none", "authentication", "signup"].includes(e.presentationGate)) && [e.firstObservedAt, e.confirmationMs].every((s) => s === void 0 || t(s));
548
548
  }
549
- function G(i) {
549
+ function U(i) {
550
550
  if (!i || typeof i != "object" || Object.keys(i).some((s) => s !== "before" && s !== "current")) return !1;
551
551
  const e = (s) => {
552
552
  if (!s || typeof s != "object") return !1;
553
553
  const n = s;
554
- return Object.keys(s).every((r) => [...x, "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((a) => ["key", "count", "rows", "truncated"].includes(a)) && y(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((a) => a && Object.keys(a).every((o) => ["itemId", "groupId"].includes(o)) && y(a.itemId) && y(a.groupId)))) && (n.context === void 0 || de(n.context)) && (n.thinkingSequence === void 0 || Array.isArray(n.thinkingSequence) && n.thinkingSequence.length <= 20 && n.thinkingSequence.every((r) => r === "user" || r === "thinking")) && y(n.sessionId) && Number.isSafeInteger(n.runtimeItemCount) && n.runtimeItemCount >= 0 && typeof n.welcome == "boolean" && typeof n.truncated == "boolean" && x.every((r) => Array.isArray(n[r]) && n[r].length <= 20 && n[r].every(R));
554
+ return Object.keys(s).every((r) => [...D, "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((a) => ["key", "count", "rows", "truncated"].includes(a)) && y(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((a) => a && Object.keys(a).every((o) => ["itemId", "groupId"].includes(o)) && y(a.itemId) && y(a.groupId)))) && (n.context === void 0 || de(n.context)) && (n.thinkingSequence === void 0 || Array.isArray(n.thinkingSequence) && n.thinkingSequence.length <= 20 && n.thinkingSequence.every((r) => r === "user" || r === "thinking")) && y(n.sessionId) && Number.isSafeInteger(n.runtimeItemCount) && n.runtimeItemCount >= 0 && typeof n.welcome == "boolean" && typeof n.truncated == "boolean" && D.every((r) => Array.isArray(n[r]) && n[r].length <= 20 && n[r].every(R));
555
555
  }, t = i;
556
556
  return (t.before === null || e(t.before)) && e(t.current);
557
557
  }
558
- const D = 500;
558
+ const C = 500;
559
559
  function B(i) {
560
560
  const e = i.replace(/\n\s*at\s[\s\S]*$/, "").replace(/-----BEGIN [^-]*PRIVATE KEY-----[\s\S]*?(?:-----END [^-]*PRIVATE KEY-----|$)/g, "[REDACTED]").replace(/\b(?:set-cookie|cookie)\s*[:=]\s*[^\n]+/gi, "cookie=[REDACTED]").replace(/\bdata:[^\s<>"']+/gi, "[DATA]").replace(/\b(?:https?:\/\/|www\.)[^\s<>"']+/gi, "[URL]").replace(/\b(?:Bearer|Basic)\s+[^\s,;"']+/gi, "[REDACTED]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)?/g, "[REDACTED]").replace(/\b(?:sk|pk|ghp|gho|github_pat|xoxb|xoxp)[-_][A-Za-z0-9_-]{8,}/g, "[REDACTED]").replace(/\b((?:access|refresh|id|auth)[_-]?token|api[_-]?key|client[_-]?secret|password|passwd|pwd|secret|token|jwt|authorization|cookie|set-cookie)\b["']?\s*[:=]\s*(?:"[^"]*"|'[^']*'|[^\s,;}&]+)/gi, "$1=[REDACTED]").replace(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi, "[EMAIL]").replace(/(?:[A-Z]:[\\/]|\\\\|(?:~|\.\.?)?\/|[\w.-]+[\\/])[^\s<>"']+/gi, "[FILE]").replace(new RegExp("(?<![\\w.])(?:[\\w.-]+\\.[A-Z][A-Z0-9]{0,15}|\\.[A-Z][\\w.-]*)\\b", "gi"), "[FILE]").replace(/\s+/g, " ").trim();
561
- return e.length > D ? `${e.slice(0, D - 1)}…` : e;
561
+ return e.length > C ? `${e.slice(0, C - 1)}…` : e;
562
562
  }
563
563
  function ce(i) {
564
564
  let e = 2166136261;
@@ -705,7 +705,7 @@ const he = [
705
705
  "acceptance_applied",
706
706
  "cancellation_queue",
707
707
  "cancellation_write"
708
- ], Q = [
708
+ ], V = [
709
709
  "request_timed_out",
710
710
  "delivery_unknown",
711
711
  "invalid_ack",
@@ -723,18 +723,18 @@ const he = [
723
723
  ];
724
724
  function ge(i) {
725
725
  const e = i, t = e?.code;
726
- return e?.backendRefusal === !0 ? "backend_refusal" : typeof t == "string" && t !== "backend_refusal" && Q.includes(t) ? t : e?.name === "AbortError" ? "aborted" : e?.name === "TypeError" ? "type_error" : "unknown";
726
+ return e?.backendRefusal === !0 ? "backend_refusal" : typeof t == "string" && t !== "backend_refusal" && V.includes(t) ? t : e?.name === "AbortError" ? "aborted" : e?.name === "TypeError" ? "type_error" : "unknown";
727
727
  }
728
- const V = Math.random().toString(36).slice(2);
728
+ const Q = Math.random().toString(36).slice(2);
729
729
  let fe = 0;
730
- const N = () => `timing:${V}:${++fe}`, v = (i) => typeof i == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(i);
730
+ const N = () => `timing:${Q}:${++fe}`, v = (i) => typeof i == "string" && /^[a-zA-Z0-9:_-]{1,160}$/.test(i);
731
731
  function q(i) {
732
732
  if (!i || typeof i != "object") return !1;
733
733
  const e = i;
734
- return Object.keys(e).every((t) => ["entrySurface", "operation", "layer", "stage", "status", "spanId", "requestId", "clientMessageId", "sessionId", "occurredAt", "durationMs", "failureCategory", "tabId", "queueDepth", "workerId"].includes(t)) && (e.tabId === void 0 || Number.isSafeInteger(e.tabId) && e.tabId >= 0) && (e.queueDepth === void 0 || Number.isSafeInteger(e.queueDepth) && e.queueDepth >= 0) && (e.workerId === void 0 || v(e.workerId)) && (e.failureCategory === void 0 || e.status === "failed" && Q.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) && he.includes(e.stage) && ["started", "completed", "failed", "observed"].includes(e.status) && v(e.spanId) && v(e.requestId) && (e.clientMessageId === null || v(e.clientMessageId)) && (e.sessionId === null || v(e.sessionId)) && typeof e.occurredAt == "string" && e.occurredAt.length <= 40 && Number.isFinite(Date.parse(e.occurredAt)) && Number.isSafeInteger(e.durationMs) && e.durationMs >= 0;
734
+ return Object.keys(e).every((t) => ["entrySurface", "operation", "layer", "stage", "status", "spanId", "requestId", "clientMessageId", "sessionId", "occurredAt", "durationMs", "failureCategory", "tabId", "queueDepth", "workerId"].includes(t)) && (e.tabId === void 0 || Number.isSafeInteger(e.tabId) && e.tabId >= 0) && (e.queueDepth === void 0 || Number.isSafeInteger(e.queueDepth) && e.queueDepth >= 0) && (e.workerId === void 0 || v(e.workerId)) && (e.failureCategory === void 0 || e.status === "failed" && V.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) && he.includes(e.stage) && ["started", "completed", "failed", "observed"].includes(e.status) && v(e.spanId) && v(e.requestId) && (e.clientMessageId === null || v(e.clientMessageId)) && (e.sessionId === null || v(e.sessionId)) && typeof e.occurredAt == "string" && e.occurredAt.length <= 40 && Number.isFinite(Date.parse(e.occurredAt)) && Number.isSafeInteger(e.durationMs) && e.durationMs >= 0;
735
735
  }
736
736
  function j(i, e) {
737
- if (e = { workerId: V, ...e }, !i) return {
737
+ if (e = { workerId: Q, ...e }, !i) return {
738
738
  identity: e,
739
739
  mark: (n) => {
740
740
  },
@@ -846,9 +846,9 @@ function ke(i) {
846
846
  case "runtime.report_operation_timing":
847
847
  return q(e.timing);
848
848
  case "runtime.report_displayed_error":
849
- return (e.errorDiagnostic === void 0 || le(e.errorDiagnostic)) && (e.httpRequest === void 0 || H(e.httpRequest)) && (e.historyRefreshFailure === void 0 || F(e.historyRefreshFailure)) && (e.renderedError === void 0 || U(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);
849
+ return (e.errorDiagnostic === void 0 || le(e.errorDiagnostic)) && (e.httpRequest === void 0 || H(e.httpRequest)) && (e.historyRefreshFailure === void 0 || F(e.historyRefreshFailure)) && (e.renderedError === void 0 || G(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);
850
850
  case "runtime.report_invalid_state_transition":
851
- return (e.uiInvariant === void 0 || G(e.uiInvariant)) && (e.reason === "submitted_turn_returned_to_welcome_without_new_chat" || e.reason === "new_messages_button_without_user_scroll" || ve(e.reason)) && (e.clientMessageId === void 0 || typeof e.clientMessageId == "string");
851
+ return (e.uiInvariant === void 0 || U(e.uiInvariant)) && (e.reason === "submitted_turn_returned_to_welcome_without_new_chat" || e.reason === "new_messages_button_without_user_scroll" || ve(e.reason)) && (e.clientMessageId === void 0 || typeof e.clientMessageId == "string");
852
852
  case "runtime.prompt_presented":
853
853
  return (e.feature === "notifications" || e.feature === "tab_grouping") && typeof e.openingGeneration == "number" && Number.isSafeInteger(e.openingGeneration) && e.openingGeneration > 0;
854
854
  case "runtime.widget_lifecycle":
@@ -867,7 +867,7 @@ function ke(i) {
867
867
  case "interaction.act":
868
868
  return (e.requestedModel === void 0 || typeof e.requestedModel == "string") && typeof e.interactionId == "string" && typeof e.action == "string" && typeof e.expectedRevision == "number";
869
869
  case "conversation.stage_proactive_suggestion":
870
- return typeof e.question == "string" && typeof e.clientMessageId == "string";
870
+ return !1;
871
871
  case "conversation.stage":
872
872
  return (e.reconcileAcceptance === void 0 || typeof e.reconcileAcceptance == "boolean") && (e.selectionKey === void 0 || typeof e.selectionKey == "string") && (e.reconcileAcceptance !== !0 || typeof e.selectionKey == "string" && e.selectionKey.length > 0) && typeof e.content == "string" && typeof e.clientMessageId == "string" && (e.submittedAt === void 0 || typeof e.submittedAt == "number") && (e.requestedModel === void 0 || typeof e.requestedModel == "string") && (e.attachments === void 0 || Array.isArray(e.attachments));
873
873
  case "conversation.fail_staged":
@@ -895,7 +895,6 @@ class qe {
895
895
  initialModel;
896
896
  interactions = [];
897
897
  account = null;
898
- stagedProactiveSuggestionClientMessageId = null;
899
898
  readinessPendingSubmissions = /* @__PURE__ */ new Set();
900
899
  pendingTransfers = /* @__PURE__ */ new Map();
901
900
  // Presentation of commands in transit only; the background remains the submission/delivery owner.
@@ -994,7 +993,7 @@ class qe {
994
993
  });
995
994
  }
996
995
  reportInvalidStateTransition(e, t, s) {
997
- s !== void 0 && !G(s) || this.adapter.dispatch({
996
+ s !== void 0 && !U(s) || this.adapter.dispatch({
998
997
  type: "runtime.report_invalid_state_transition",
999
998
  reason: e,
1000
999
  clientMessageId: t,
@@ -1004,7 +1003,7 @@ class qe {
1004
1003
  }
1005
1004
  reportDisplayedError(e, t, s, n, r) {
1006
1005
  const a = e === "conversation_error" && !n ? this.getState().conversationDiagnostics?.httpRequest : void 0;
1007
- if (n !== void 0 && !U(n) || r !== void 0 && !F(r)) return;
1006
+ if (n !== void 0 && !G(n) || r !== void 0 && !F(r)) return;
1008
1007
  const o = ue(this.getState(), e, s, !!n, this.adapter.diagnosticBuilds);
1009
1008
  this.adapter.dispatch({
1010
1009
  type: "runtime.report_displayed_error",
@@ -1020,6 +1019,7 @@ class qe {
1020
1019
  });
1021
1020
  }
1022
1021
  sendMessage(e, t = {}) {
1022
+ if (t.proactiveSuggestionQuestion !== void 0) return Promise.reject(new Error("Personal Product Agent has retired."));
1023
1023
  const s = e.trim();
1024
1024
  if (this.pendingNavigation) return Promise.reject(new Error("Wait for the conversation to finish loading."));
1025
1025
  t = {
@@ -1030,7 +1030,7 @@ class qe {
1030
1030
  const n = t.attachments ?? [];
1031
1031
  if (!s && n.length === 0) return Promise.resolve(null);
1032
1032
  this.pendingStop = null, this.stopError = null;
1033
- const r = t.clientMessageId ?? (t.proactiveSuggestionQuestion && this.stagedProactiveSuggestionClientMessageId ? this.stagedProactiveSuggestionClientMessageId : crypto.randomUUID()), a = t.submittedAt ?? Date.now(), o = this.submissionGeneration;
1033
+ const r = t.clientMessageId ?? crypto.randomUUID(), a = t.submittedAt ?? Date.now(), o = this.submissionGeneration;
1034
1034
  this.pendingTransfers.set(r, n.flatMap((d) => d.id ? [d.id] : [])), this.submissionPreviews.set(r, { pending: !0, message: {
1035
1035
  id: r,
1036
1036
  role: "user",
@@ -1072,7 +1072,6 @@ class qe {
1072
1072
  invocation: t.invocation,
1073
1073
  content: n,
1074
1074
  clientMessageId: r,
1075
- proactiveSuggestionQuestion: t.proactiveSuggestionQuestion,
1076
1075
  // Preview URLs belong to the renderer's optimistic snapshot and are not valid runtime-command metadata.
1077
1076
  attachments: o.length > 0 ? o.map(K) : void 0,
1078
1077
  submittedAt: t.submittedAt
@@ -1085,7 +1084,6 @@ class qe {
1085
1084
  });
1086
1085
  if (!p || s !== this.submissionGeneration) return null;
1087
1086
  if (c = !0, this.submissionRetries.delete(r), p.result?.submissionAccepted) {
1088
- r === this.stagedProactiveSuggestionClientMessageId && (this.stagedProactiveSuggestionClientMessageId = null);
1089
1087
  for (const l of t.attachments ?? [])
1090
1088
  l.id && this.attachmentFiles.delete(l.id);
1091
1089
  return r;
@@ -1113,19 +1111,18 @@ class qe {
1113
1111
  selectionKey: t.selectionKey,
1114
1112
  initiatedBy: t.initiatedBy,
1115
1113
  invocation: t.invocation,
1116
- proactiveSuggestionQuestion: t.proactiveSuggestionQuestion,
1117
1114
  attachments: o.length > 0 ? o.map(K) : void 0
1118
1115
  }), s !== this.submissionGeneration)) return null;
1119
1116
  for (const l of t.attachments ?? [])
1120
1117
  l.id && this.attachmentFiles.delete(l.id);
1121
- return r === this.stagedProactiveSuggestionClientMessageId && (this.stagedProactiveSuggestionClientMessageId = null), r;
1118
+ return r;
1122
1119
  } catch (p) {
1123
1120
  if (s !== this.submissionGeneration) return null;
1124
- if (C(p))
1121
+ if (x(p))
1125
1122
  for (const f of t.attachments ?? [])
1126
1123
  f.id && this.attachmentFiles.delete(f.id);
1127
1124
  const u = b(p).code === "command_not_received";
1128
- !c && !C(p) && (d || u || t.selectionKey !== void 0) && this.submissionRetries.set(r, {
1125
+ !c && !x(p) && (d || u || t.selectionKey !== void 0) && this.submissionRetries.set(r, {
1129
1126
  retry: async () => (d && await this.connect(), this.sendMessageNow(e, { ...t, reconcileAcceptance: !d && !u }, s)),
1130
1127
  attachmentIds: (t.attachments ?? []).flatMap((f) => f.id ? [f.id] : [])
1131
1128
  });
@@ -1339,15 +1336,7 @@ class qe {
1339
1336
  }) : (this.cancelPendingSubmissions(), this.submissionPreviews.clear(), this.retainedTranscript = null, this.emit("state", this.getState()), this.navigate({ type: "session.load", sessionId: e }));
1340
1337
  }
1341
1338
  stageProactiveSuggestionQuestion(e) {
1342
- const t = e.trim();
1343
- if (!t) return Promise.resolve();
1344
- const s = this.stagedProactiveSuggestionClientMessageId ?? crypto.randomUUID();
1345
- return this.stagedProactiveSuggestionClientMessageId = s, this.dispatch({
1346
- type: "conversation.stage_proactive_suggestion",
1347
- question: t,
1348
- clientMessageId: s
1349
- }).then(() => {
1350
- });
1339
+ return Promise.resolve();
1351
1340
  }
1352
1341
  dispatch(e) {
1353
1342
  return this.adapter.dispatch(e);
@@ -1413,16 +1402,16 @@ function z(i) {
1413
1402
  }
1414
1403
  export {
1415
1404
  W as PRODUCT_AGENT_AUTH_RECONNECTING_ERROR_MESSAGE,
1416
- Ee as ProductAgentInteractionManager,
1405
+ Me as ProductAgentInteractionManager,
1417
1406
  O as ProductAgentQueryController,
1418
1407
  qe as ProductAgentRemoteRuntimeClient,
1419
- Me as ProductAgentSessionHistoryManager,
1408
+ Ee as ProductAgentSessionHistoryManager,
1420
1409
  Pe as ProductAgentTaskPageTitleController,
1421
1410
  Te as createLocalStorageInteractionDecisionStorage,
1422
1411
  S as createProductAgentQueryState,
1423
1412
  Re as createProductAgentTaskPageTitleDocument,
1424
1413
  ie as formatProductAgentTaskPageTitle,
1425
- C as isProductAgentAuthReconnectError,
1414
+ x as isProductAgentAuthReconnectError,
1426
1415
  ke as isProductAgentRuntimeCommand,
1427
1416
  Z as mergeProductAgentEntityPages,
1428
1417
  w as normalizeProductAgentEntityPage,