@pluno/product-agent-web 0.1.9 → 0.1.11
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/INTEGRATION.md +3 -1
- package/README.md +2 -1
- package/dist/boltIcon.d.ts +2 -0
- package/dist/index.d.ts +20 -0
- package/dist/product-agent-sdk.js +420 -216
- package/dist/product-agent-widget.js +711 -283
- package/dist/widget.d.ts +4 -0
- package/package.json +1 -1
package/INTEGRATION.md
CHANGED
|
@@ -68,8 +68,9 @@ redaction pipeline before data leaves the browser.
|
|
|
68
68
|
src="https://app.pluno.ai/product-agent/product-agent-widget.js"
|
|
69
69
|
data-pluno-token-endpoint="/api/pluno-product-agent-token"
|
|
70
70
|
data-pluno-launcher-label="Ask for anything..."
|
|
71
|
-
data-pluno-accent-color="#
|
|
71
|
+
data-pluno-accent-color="#7c3aed"
|
|
72
72
|
data-pluno-color-scheme="light"
|
|
73
|
+
data-pluno-font-family='Inter, system-ui, sans-serif'
|
|
73
74
|
data-pluno-position="bottom-right"
|
|
74
75
|
></script>
|
|
75
76
|
```
|
|
@@ -82,6 +83,7 @@ Supported widget script-tag attributes:
|
|
|
82
83
|
- optional `data-pluno-launcher-label`
|
|
83
84
|
- optional `data-pluno-accent-color`
|
|
84
85
|
- optional `data-pluno-color-scheme`
|
|
86
|
+
- optional `data-pluno-font-family`
|
|
85
87
|
- optional `data-pluno-position`
|
|
86
88
|
- optional `data-pluno-auto-mount="false"`
|
|
87
89
|
|
package/README.md
CHANGED
|
@@ -43,7 +43,8 @@ The SDK always captures product network activity by patching `fetch` and `XMLHtt
|
|
|
43
43
|
src="https://app.pluno.ai/product-agent/product-agent-widget.js"
|
|
44
44
|
data-pluno-token-endpoint="/api/pluno-product-agent-token"
|
|
45
45
|
data-pluno-launcher-label="Ask for anything..."
|
|
46
|
-
data-pluno-accent-color="#
|
|
46
|
+
data-pluno-accent-color="#7c3aed"
|
|
47
|
+
data-pluno-font-family='Inter, system-ui, sans-serif'
|
|
47
48
|
></script>
|
|
48
49
|
```
|
|
49
50
|
|
package/dist/index.d.ts
CHANGED
|
@@ -18,11 +18,17 @@ export type ProductAgentMessage = {
|
|
|
18
18
|
dataType?: string;
|
|
19
19
|
loading?: boolean;
|
|
20
20
|
};
|
|
21
|
+
export type ProductAgentAppearance = {
|
|
22
|
+
accentColor?: string;
|
|
23
|
+
colorScheme?: "light" | "dark";
|
|
24
|
+
fontFamily?: string;
|
|
25
|
+
};
|
|
21
26
|
export type ProductAgentState = {
|
|
22
27
|
status: "idle" | "connecting" | "connected" | "reconnecting" | "closed" | "error";
|
|
23
28
|
user: ProductAgentUser | null;
|
|
24
29
|
sessionId: string | null;
|
|
25
30
|
starterPrompts: string[];
|
|
31
|
+
appearance: ProductAgentAppearance | null;
|
|
26
32
|
messages: ProductAgentMessage[];
|
|
27
33
|
assistantDraft: string;
|
|
28
34
|
isThinking: boolean;
|
|
@@ -36,6 +42,7 @@ export type ProductAgentInitOptions = {
|
|
|
36
42
|
clientId?: string;
|
|
37
43
|
metadata?: Record<string, unknown>;
|
|
38
44
|
autoConnect?: boolean;
|
|
45
|
+
initialStarterPrompts?: string[];
|
|
39
46
|
webSocketFactory?: ProductAgentWebSocketFactory;
|
|
40
47
|
};
|
|
41
48
|
export type ProductAgentWebSocket = {
|
|
@@ -64,7 +71,14 @@ export declare class PlunoProductAgent {
|
|
|
64
71
|
private networkBatchTimer;
|
|
65
72
|
private queuedNetworkEvents;
|
|
66
73
|
private queuedClientEvents;
|
|
74
|
+
private readonly transportId;
|
|
67
75
|
private retryAttemptsByClientMessageId;
|
|
76
|
+
private retryTimersByClientMessageId;
|
|
77
|
+
private thinkingWatchdogTimer;
|
|
78
|
+
private activeClientMessageId;
|
|
79
|
+
private activeUserMessageEvent;
|
|
80
|
+
private thinkingWatchdogResyncAttemptsByClientMessageId;
|
|
81
|
+
private thinkingWatchdogRetryAttemptsByClientMessageId;
|
|
68
82
|
private runtimeHelperJavascript;
|
|
69
83
|
private state;
|
|
70
84
|
private constructor();
|
|
@@ -82,6 +96,12 @@ export declare class PlunoProductAgent {
|
|
|
82
96
|
private flushQueuedClientEvents;
|
|
83
97
|
private handleServerEvent;
|
|
84
98
|
private retryAfterRetryableError;
|
|
99
|
+
private clearRetryTimers;
|
|
100
|
+
private markThinkingProgress;
|
|
101
|
+
private scheduleThinkingWatchdog;
|
|
102
|
+
private clearThinkingWatchdog;
|
|
103
|
+
private recoverStuckThinking;
|
|
104
|
+
private resyncThinkingSession;
|
|
85
105
|
private executeToolCall;
|
|
86
106
|
private executeRuntimeHelper;
|
|
87
107
|
private enableNetworkCapture;
|