@pluno/product-agent-web 0.1.218 → 0.1.219
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.
- package/dist/index.d.ts +20 -0
- package/dist/product-agent-runtime.cjs +1 -1
- package/dist/product-agent-runtime.js +218 -206
- package/dist/product-agent-sdk.js +1107 -1050
- package/dist/product-agent-widget.js +2874 -2804
- package/dist/public/operationRoutes.d.ts +2 -0
- package/dist/responseDiagnostics.d.ts +10 -0
- package/dist/runtimeClient.d.ts +6 -1
- package/dist/uiFlightRecorder.d.ts +2 -0
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@ 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.reportResponseVisibility": "platform_shell";
|
|
60
61
|
readonly "sessionEngine.reportDisplayedError": "platform_shell";
|
|
61
62
|
readonly "sessionEngine.reportInvalidStateTransition": "platform_shell";
|
|
62
63
|
readonly "sessionEngine.sendMessage": "engine_command";
|
|
@@ -84,6 +85,7 @@ export declare const PA_COMPATIBILITY_OPERATION_ROUTES: {
|
|
|
84
85
|
readonly "runtime.connect": "engine_command";
|
|
85
86
|
readonly "runtime.warmup": "engine_command";
|
|
86
87
|
readonly "runtime.widget_lifecycle": "platform_shell";
|
|
88
|
+
readonly "runtime.report_response_visibility": "platform_shell";
|
|
87
89
|
readonly "runtime.report_displayed_error": "platform_shell";
|
|
88
90
|
readonly "runtime.report_invalid_state_transition": "platform_shell";
|
|
89
91
|
readonly "session.new": "engine_command";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResponseDiagnostics, ResponseVisibilityObservation } from "./index";
|
|
2
|
+
export declare function isResponseVisibilityObservation(value: unknown): value is ResponseVisibilityObservation;
|
|
3
|
+
export declare function recordResponseVisibility(owner: object, surface: string, observation: ResponseVisibilityObservation): void;
|
|
4
|
+
export declare function getResponseVisibility(owner: object, surface: string, sessionId: string | null): ResponseVisibilityObservation | null;
|
|
5
|
+
export declare function buildResponseDiagnostics(owner: object, surface: string, sessionId: string | null, clientMessageId: string | undefined, authenticated: boolean, activeClientMessageId: string | null, pendingClientMessageId: string | null, items: ReadonlyArray<{
|
|
6
|
+
id: string;
|
|
7
|
+
role?: string;
|
|
8
|
+
clientMessageId?: string;
|
|
9
|
+
respondsToUserMessageId?: string;
|
|
10
|
+
}>, draftRespondsToUserMessageId?: string | null, hasDraft?: boolean): ResponseDiagnostics;
|
package/dist/runtimeClient.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import type { ProductAgentAttachment, ProductAgentEventMap, ProductAgentInvocation, ProductAgentModel, ProductAgentSessionHistoryPage, ProductAgentSessionHistoryEntry, ProductAgentState, ProductAgentWidgetLifecycleAction, ProductAgentWidgetLifecycleTrigger } from "./index";
|
|
1
|
+
import type { ResponseVisibilityObservation, ProductAgentAttachment, ProductAgentEventMap, ProductAgentInvocation, ProductAgentModel, ProductAgentSessionHistoryPage, ProductAgentSessionHistoryEntry, ProductAgentState, ProductAgentWidgetLifecycleAction, ProductAgentWidgetLifecycleTrigger } from "./index";
|
|
2
2
|
import type { ProductAgentAccountProjection, ProductAgentInteraction, ProductAgentInteractionAction } from "./runtimeState";
|
|
3
3
|
import { type ProductAgentEntityQueryData, type ProductAgentQueryState } from "./runtimeState";
|
|
4
4
|
export type ProductAgentRuntimeEventName = keyof ProductAgentEventMap;
|
|
5
5
|
export type ProductAgentRuntimeCommand = {
|
|
6
6
|
type: "runtime.connect";
|
|
7
|
+
} | {
|
|
8
|
+
type: "runtime.report_response_visibility";
|
|
9
|
+
observation: ResponseVisibilityObservation;
|
|
7
10
|
} | {
|
|
8
11
|
type: "runtime.report_displayed_error";
|
|
9
12
|
reason: string;
|
|
@@ -94,6 +97,7 @@ export type ProductAgentRuntimeClient = {
|
|
|
94
97
|
getState(): ProductAgentState;
|
|
95
98
|
connect(): Promise<void>;
|
|
96
99
|
destroy(): void;
|
|
100
|
+
reportResponseVisibility?(observation: ResponseVisibilityObservation): void;
|
|
97
101
|
reportInvalidStateTransition?(reason: string, clientMessageId?: string): void;
|
|
98
102
|
reportDisplayedError?(reason: string, errorFingerprint: string, displayedMessage?: string): void;
|
|
99
103
|
warmup(reason?: "panel_open" | "extension_install" | "composer_input"): void;
|
|
@@ -162,6 +166,7 @@ export declare class ProductAgentRemoteRuntimeClient implements ProductAgentRunt
|
|
|
162
166
|
destroy(): void;
|
|
163
167
|
warmup(reason?: "panel_open" | "extension_install" | "composer_input"): Promise<void>;
|
|
164
168
|
recordWidgetLifecycle(action: ProductAgentWidgetLifecycleAction, trigger: ProductAgentWidgetLifecycleTrigger): void;
|
|
169
|
+
reportResponseVisibility(observation: ResponseVisibilityObservation): void;
|
|
165
170
|
reportInvalidStateTransition(reason: string, clientMessageId?: string): void;
|
|
166
171
|
reportDisplayedError(reason: string, errorFingerprint: string, displayedMessage?: string): void;
|
|
167
172
|
sendMessage(content: string, options?: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ResponseVisibilityObservation } from "./index";
|
|
1
2
|
import type { ProductAgentState } from "./index";
|
|
2
3
|
export type UiFlightRecord = {
|
|
3
4
|
sequence: number;
|
|
@@ -38,5 +39,6 @@ export type UiFlightRecorderHost = HTMLElement & {
|
|
|
38
39
|
export declare function startUiFlightRecorder(host: UiFlightRecorderHost, root: HTMLElement, surface: UiFlightEvidence["surface"], runtime: {
|
|
39
40
|
getState(): ProductAgentState;
|
|
40
41
|
on(event: "state", listener: (state: ProductAgentState) => void): () => void;
|
|
42
|
+
reportResponseVisibility?(observation: ResponseVisibilityObservation): void;
|
|
41
43
|
reportInvalidStateTransition?(reason: string, clientMessageId?: string): void;
|
|
42
44
|
}): UiFlightRecorder;
|
package/package.json
CHANGED