@pluno/product-agent-web 0.1.205 → 0.1.207

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.
@@ -57,6 +57,8 @@ export declare const PA_COMPATIBILITY_OPERATION_ROUTES: {
57
57
  readonly "sessionEngine.destroy": "platform_shell";
58
58
  readonly "sessionEngine.warmup": "engine_command";
59
59
  readonly "sessionEngine.recordWidgetLifecycle": "platform_shell";
60
+ readonly "sessionEngine.reportDisplayedError": "platform_shell";
61
+ readonly "sessionEngine.reportInvalidStateTransition": "platform_shell";
60
62
  readonly "sessionEngine.sendMessage": "engine_command";
61
63
  readonly "sessionEngine.getModel": "projection";
62
64
  readonly "sessionEngine.setModel": "engine_command";
@@ -82,6 +84,8 @@ export declare const PA_COMPATIBILITY_OPERATION_ROUTES: {
82
84
  readonly "runtime.connect": "engine_command";
83
85
  readonly "runtime.warmup": "engine_command";
84
86
  readonly "runtime.widget_lifecycle": "platform_shell";
87
+ readonly "runtime.report_displayed_error": "platform_shell";
88
+ readonly "runtime.report_invalid_state_transition": "platform_shell";
85
89
  readonly "session.new": "engine_command";
86
90
  readonly "session.load": "engine_command";
87
91
  readonly "session.list": "engine_query";
@@ -4,6 +4,14 @@ import { type ProductAgentEntityQueryData, type ProductAgentQueryState } from ".
4
4
  export type ProductAgentRuntimeEventName = keyof ProductAgentEventMap;
5
5
  export type ProductAgentRuntimeCommand = {
6
6
  type: "runtime.connect";
7
+ } | {
8
+ type: "runtime.report_displayed_error";
9
+ reason: string;
10
+ errorFingerprint: string;
11
+ } | {
12
+ type: "runtime.report_invalid_state_transition";
13
+ reason: string;
14
+ clientMessageId?: string;
7
15
  } | {
8
16
  type: "runtime.warmup";
9
17
  reason: "panel_open" | "extension_install" | "composer_input";
@@ -51,6 +59,7 @@ export type ProductAgentRuntimeCommand = {
51
59
  type: "conversation.stage";
52
60
  content: string;
53
61
  clientMessageId: string;
62
+ submittedAt?: number;
54
63
  proactiveSuggestionQuestion?: string;
55
64
  attachments?: ProductAgentAttachment[];
56
65
  } | {
@@ -64,6 +73,7 @@ export type ProductAgentRuntimeCommand = {
64
73
  initiatedBy?: "pluno";
65
74
  invocation?: ProductAgentInvocation | "pluno";
66
75
  proactiveSuggestionQuestion?: string;
76
+ submittedAt?: number;
67
77
  attachments?: ProductAgentAttachment[];
68
78
  };
69
79
  export type ProductAgentRuntimeCommandResult = {
@@ -82,6 +92,8 @@ export type ProductAgentRuntimeClient = {
82
92
  getState(): ProductAgentState;
83
93
  connect(): Promise<void>;
84
94
  destroy(): void;
95
+ reportInvalidStateTransition?(reason: string, clientMessageId?: string): void;
96
+ reportDisplayedError?(reason: string, errorFingerprint: string): void;
85
97
  warmup(reason?: "panel_open" | "extension_install" | "composer_input"): void;
86
98
  recordWidgetLifecycle(action: ProductAgentWidgetLifecycleAction, trigger: ProductAgentWidgetLifecycleTrigger): void;
87
99
  sendMessage(content: string, options?: {
@@ -90,6 +102,7 @@ export type ProductAgentRuntimeClient = {
90
102
  initiatedBy?: "pluno";
91
103
  invocation?: ProductAgentInvocation | "pluno";
92
104
  proactiveSuggestionQuestion?: string;
105
+ submittedAt?: number;
93
106
  }): Promise<string | null>;
94
107
  getModel(): ProductAgentModel | undefined;
95
108
  setModel(model: ProductAgentModel): void;
@@ -145,12 +158,15 @@ export declare class ProductAgentRemoteRuntimeClient implements ProductAgentRunt
145
158
  destroy(): void;
146
159
  warmup(reason?: "panel_open" | "extension_install" | "composer_input"): Promise<void>;
147
160
  recordWidgetLifecycle(action: ProductAgentWidgetLifecycleAction, trigger: ProductAgentWidgetLifecycleTrigger): void;
161
+ reportInvalidStateTransition(reason: string, clientMessageId?: string): void;
162
+ reportDisplayedError(reason: string, errorFingerprint: string): void;
148
163
  sendMessage(content: string, options?: {
149
164
  attachments?: ProductAgentAttachment[];
150
165
  clientMessageId?: string;
151
166
  initiatedBy?: "pluno";
152
167
  invocation?: ProductAgentInvocation | "pluno";
153
168
  proactiveSuggestionQuestion?: string;
169
+ submittedAt?: number;
154
170
  }): Promise<string | null>;
155
171
  private sendMessageNow;
156
172
  getModel(): ProductAgentModel | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluno/product-agent-web",
3
- "version": "0.1.205",
3
+ "version": "0.1.207",
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",