@pluno/product-agent-web 0.1.41 → 0.1.45
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 +24 -0
- package/dist/product-agent-sdk.js +400 -273
- package/dist/product-agent-widget.js +1147 -889
- package/dist/widget.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,19 @@ export type ProductAgentAttachment = {
|
|
|
43
43
|
sizeBytes: number;
|
|
44
44
|
dataUrl: string;
|
|
45
45
|
};
|
|
46
|
+
export type ProductAgentSessionHistoryEntry = {
|
|
47
|
+
id: string;
|
|
48
|
+
title: string | null;
|
|
49
|
+
firstUserMessage?: string | null;
|
|
50
|
+
currentPage: unknown;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
lastActiveAt: string;
|
|
54
|
+
};
|
|
55
|
+
export type ProductAgentSessionHistoryPage = {
|
|
56
|
+
sessions: ProductAgentSessionHistoryEntry[];
|
|
57
|
+
nextCursor: string | null;
|
|
58
|
+
};
|
|
46
59
|
export type ProductAgentImageAttachment = ProductAgentAttachment;
|
|
47
60
|
export type ProductAgentAppearance = {
|
|
48
61
|
accentColor?: string;
|
|
@@ -55,6 +68,7 @@ export type ProductAgentState = {
|
|
|
55
68
|
user: ProductAgentUser | null;
|
|
56
69
|
sessionId: string | null;
|
|
57
70
|
starterPrompts: string[];
|
|
71
|
+
starterPromptsLoading: boolean;
|
|
58
72
|
appearance: ProductAgentAppearance | null;
|
|
59
73
|
messages: ProductAgentMessage[];
|
|
60
74
|
assistantDraft: string;
|
|
@@ -101,6 +115,7 @@ export declare class PlunoProductAgent {
|
|
|
101
115
|
private networkBatchTimer;
|
|
102
116
|
private queuedNetworkEvents;
|
|
103
117
|
private queuedClientEvents;
|
|
118
|
+
private pendingSessionHistoryRequests;
|
|
104
119
|
private readonly transportId;
|
|
105
120
|
private retryAttemptsByClientMessageId;
|
|
106
121
|
private retryTimersByClientMessageId;
|
|
@@ -114,6 +129,8 @@ export declare class PlunoProductAgent {
|
|
|
114
129
|
private thinkingWatchdogResyncAttemptsByClientMessageId;
|
|
115
130
|
private thinkingWatchdogRetryAttemptsByClientMessageId;
|
|
116
131
|
private runtimeHelperJavascript;
|
|
132
|
+
private transientStarterPromptsRequestInFlight;
|
|
133
|
+
private transientStarterPromptsRequestAttempted;
|
|
117
134
|
private state;
|
|
118
135
|
private constructor();
|
|
119
136
|
static init(options: ProductAgentInitOptions): Promise<PlunoProductAgent>;
|
|
@@ -127,12 +144,19 @@ export declare class PlunoProductAgent {
|
|
|
127
144
|
}): void;
|
|
128
145
|
stop(): void;
|
|
129
146
|
startNewSession(): void;
|
|
147
|
+
listSessions(options?: {
|
|
148
|
+
cursor?: string | null;
|
|
149
|
+
limit?: number;
|
|
150
|
+
}): Promise<ProductAgentSessionHistoryPage>;
|
|
151
|
+
loadSession(sessionId: string): void;
|
|
130
152
|
private send;
|
|
131
153
|
private sendNow;
|
|
154
|
+
private requestTransientStarterPrompts;
|
|
132
155
|
private flushQueuedClientEvents;
|
|
133
156
|
private handleServerEvent;
|
|
134
157
|
private retryAfterRetryableError;
|
|
135
158
|
private clearRetryTimers;
|
|
159
|
+
private rejectPendingSessionHistoryRequests;
|
|
136
160
|
private markThinkingProgress;
|
|
137
161
|
private scheduleThinkingWatchdog;
|
|
138
162
|
private clearThinkingWatchdog;
|