@pluno/product-agent-web 0.1.236 → 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 { HttpRequestDiagnostic } from "../httpDiagnostics";
1
2
  export type OwnerTransition = {
2
3
  sequence: number;
3
4
  at: number;
@@ -25,6 +26,7 @@ export type OwnerDiagnostics = {
25
26
  transitions: OwnerTransition[];
26
27
  };
27
28
  export type ConversationDiagnostics = {
29
+ httpRequest?: HttpRequestDiagnostic;
28
30
  owner?: OwnerDiagnostics;
29
31
  queryStatus: string | null;
30
32
  queryRequestId: string | null;
@@ -1,3 +1,5 @@
1
+ import { type HistoryRefreshFailure } from "./renderDiagnostics";
2
+ import { type HttpRequestDiagnostic } from "./httpDiagnostics";
1
3
  import { type OperationTiming } from "./operationTiming";
2
4
  import { type RenderedErrorEvidence, type UiInvariantEvidence } from "./renderDiagnostics";
3
5
  import type { ResponseVisibilityObservation, ProductAgentAttachment, ProductAgentEventMap, ProductAgentInvocation, ProductAgentModel, ProductAgentSessionHistoryPage, ProductAgentSessionHistoryEntry, ProductAgentState, ProductAgentWidgetLifecycleAction, ProductAgentWidgetLifecycleTrigger } from "./index";
@@ -17,7 +19,9 @@ export type ProductAgentRuntimeCommand = {
17
19
  reason: string;
18
20
  errorFingerprint: string;
19
21
  displayedMessage?: string;
22
+ historyRefreshFailure?: HistoryRefreshFailure;
20
23
  renderedError?: RenderedErrorEvidence;
24
+ httpRequest?: HttpRequestDiagnostic;
21
25
  } | {
22
26
  type: "runtime.report_invalid_state_transition";
23
27
  uiInvariant?: UiInvariantEvidence;
@@ -117,7 +121,7 @@ export type ProductAgentRuntimeClient = {
117
121
  reportOperationTiming?(timing: OperationTiming): void;
118
122
  reportResponseVisibility?(observation: ResponseVisibilityObservation): void;
119
123
  reportInvalidStateTransition?(reason: string, clientMessageId?: string, uiInvariant?: UiInvariantEvidence): void;
120
- reportDisplayedError?(reason: string, errorFingerprint: string, displayedMessage?: string, renderedError?: RenderedErrorEvidence): void;
124
+ reportDisplayedError?(reason: string, errorFingerprint: string, displayedMessage?: string, renderedError?: RenderedErrorEvidence, historyRefreshFailure?: HistoryRefreshFailure): void;
121
125
  warmup(reason?: "panel_open" | "extension_install" | "composer_input"): void;
122
126
  recordWidgetLifecycle(action: ProductAgentWidgetLifecycleAction, trigger: ProductAgentWidgetLifecycleTrigger): void;
123
127
  sendMessage(content: string, options?: {
@@ -191,7 +195,7 @@ export declare class ProductAgentRemoteRuntimeClient implements ProductAgentRunt
191
195
  reportOperationTiming(timing: OperationTiming): void;
192
196
  reportResponseVisibility(observation: ResponseVisibilityObservation): void;
193
197
  reportInvalidStateTransition(reason: string, clientMessageId?: string, uiInvariant?: UiInvariantEvidence): void;
194
- reportDisplayedError(reason: string, errorFingerprint: string, displayedMessage?: string, renderedError?: RenderedErrorEvidence): void;
198
+ reportDisplayedError(reason: string, errorFingerprint: string, displayedMessage?: string, renderedError?: RenderedErrorEvidence, historyRefreshFailure?: HistoryRefreshFailure): void;
195
199
  sendMessage(content: string, options?: {
196
200
  attachments?: ProductAgentAttachment[];
197
201
  clientMessageId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluno/product-agent-web",
3
- "version": "0.1.236",
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",