@pluno/product-agent-web 0.1.237 → 0.1.238

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import type { PAHistoryRefreshFailure } from "./core/conversation/historyRefreshFailure";
1
2
  import type { ProductAgentState } from "./index";
2
3
  import type { UiInvariantSnapshot } from "./uiInvariants";
3
4
  import { type OwnerDiagnostics } from "./runtime/transitionDiagnostics";
@@ -19,6 +20,8 @@ export type UiTransitionContext = {
19
20
  guardCreatedAt: number | null;
20
21
  owner?: OwnerDiagnostics;
21
22
  };
23
+ export type HistoryRefreshFailure = PAHistoryRefreshFailure;
24
+ export declare function isHistoryRefreshFailure(value: unknown): value is HistoryRefreshFailure;
22
25
  export type RenderedErrorEvidence = {
23
26
  sessionId: string | null;
24
27
  itemId: string;
@@ -1,3 +1,4 @@
1
+ import { type HistoryRefreshFailure } from "./renderDiagnostics";
1
2
  import { type HttpRequestDiagnostic } from "./httpDiagnostics";
2
3
  import { type OperationTiming } from "./operationTiming";
3
4
  import { type RenderedErrorEvidence, type UiInvariantEvidence } from "./renderDiagnostics";
@@ -18,6 +19,7 @@ export type ProductAgentRuntimeCommand = {
18
19
  reason: string;
19
20
  errorFingerprint: string;
20
21
  displayedMessage?: string;
22
+ historyRefreshFailure?: HistoryRefreshFailure;
21
23
  renderedError?: RenderedErrorEvidence;
22
24
  httpRequest?: HttpRequestDiagnostic;
23
25
  } | {
@@ -119,7 +121,7 @@ export type ProductAgentRuntimeClient = {
119
121
  reportOperationTiming?(timing: OperationTiming): void;
120
122
  reportResponseVisibility?(observation: ResponseVisibilityObservation): void;
121
123
  reportInvalidStateTransition?(reason: string, clientMessageId?: string, uiInvariant?: UiInvariantEvidence): void;
122
- reportDisplayedError?(reason: string, errorFingerprint: string, displayedMessage?: string, renderedError?: RenderedErrorEvidence): void;
124
+ reportDisplayedError?(reason: string, errorFingerprint: string, displayedMessage?: string, renderedError?: RenderedErrorEvidence, historyRefreshFailure?: HistoryRefreshFailure): void;
123
125
  warmup(reason?: "panel_open" | "extension_install" | "composer_input"): void;
124
126
  recordWidgetLifecycle(action: ProductAgentWidgetLifecycleAction, trigger: ProductAgentWidgetLifecycleTrigger): void;
125
127
  sendMessage(content: string, options?: {
@@ -193,7 +195,7 @@ export declare class ProductAgentRemoteRuntimeClient implements ProductAgentRunt
193
195
  reportOperationTiming(timing: OperationTiming): void;
194
196
  reportResponseVisibility(observation: ResponseVisibilityObservation): void;
195
197
  reportInvalidStateTransition(reason: string, clientMessageId?: string, uiInvariant?: UiInvariantEvidence): void;
196
- reportDisplayedError(reason: string, errorFingerprint: string, displayedMessage?: string, renderedError?: RenderedErrorEvidence): void;
198
+ reportDisplayedError(reason: string, errorFingerprint: string, displayedMessage?: string, renderedError?: RenderedErrorEvidence, historyRefreshFailure?: HistoryRefreshFailure): void;
197
199
  sendMessage(content: string, options?: {
198
200
  attachments?: ProductAgentAttachment[];
199
201
  clientMessageId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluno/product-agent-web",
3
- "version": "0.1.237",
3
+ "version": "0.1.238",
4
4
  "description": "Browser SDK and default widget for embedding Pluno Product Agent into customer web apps.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",