@pluno/product-agent-web 0.1.315 → 0.1.317
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/README.md +4 -0
- package/dist/adapters/web/accountPresentation.d.ts +3 -3
- package/dist/adapters/web/directoryAdapters.d.ts +0 -1
- package/dist/adapters/web/featureHttp.d.ts +6 -22
- package/dist/adapters/web/featureLifecycle.d.ts +2 -15
- package/dist/adapters/web/featureOwner.d.ts +5 -6
- package/dist/adapters/web/featurePresentation.d.ts +4 -4
- package/dist/core/account/contracts.d.ts +6 -18
- package/dist/core/account/selectors.d.ts +2 -2
- package/dist/core/account/state.d.ts +1 -1
- package/dist/core/conversation/deliveryContracts.d.ts +1 -1
- package/dist/core/features/contracts.d.ts +37 -338
- package/dist/core/features/reducer.d.ts +5 -7
- package/dist/core/features/selectors.d.ts +1 -1
- package/dist/core/features/state.d.ts +1 -1
- package/dist/core/index.d.ts +0 -2
- package/dist/core/interactions/actions.d.ts +7 -7
- package/dist/core/interactions/contracts.d.ts +8 -121
- package/dist/core/interactions/selectors.d.ts +5 -25
- package/dist/core/interactions/state.d.ts +1 -1
- package/dist/core/kernel/capabilities.d.ts +0 -14
- package/dist/core/model-selection/selectors.d.ts +1 -1
- package/dist/core/session-directory/contracts.d.ts +0 -1
- package/dist/index.d.ts +2 -37
- package/dist/operationTiming.d.ts +1 -1
- package/dist/product-agent-runtime.cjs +1 -1
- package/dist/product-agent-runtime.js +221 -274
- package/dist/product-agent-sdk.js +4717 -6136
- package/dist/product-agent-widget.js +5994 -8146
- package/dist/public/operationRoutes.d.ts +0 -3
- package/dist/runtime/composition.d.ts +3 -8
- package/dist/runtime/modelSelection.d.ts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtimeClient.d.ts +0 -6
- package/dist/runtimeState.d.ts +0 -10
- package/dist/shareCard.d.ts +0 -25
- package/dist/widget.d.ts +2 -28
- package/package.json +2 -3
- package/dist/activeUsersCounter.d.ts +0 -4
- package/dist/adapters/web/activeUsers.d.ts +0 -4
- package/dist/adapters/web/deviceHints.d.ts +0 -2
- package/dist/adapters/web/localPreferences.d.ts +0 -17
- package/dist/core/account/reducer.d.ts +0 -2
- package/dist/core/active-users/reducer.d.ts +0 -47
- package/dist/core/features/appearance.d.ts +0 -10
- package/dist/core/interactions/preferenceOpenings.d.ts +0 -22
- package/dist/core/interactions/reducer.d.ts +0 -6
- package/dist/featureActionFeedback.d.ts +0 -19
- package/dist/modelSelection.d.ts +0 -62
|
@@ -1,110 +1,22 @@
|
|
|
1
|
-
import type { PAProductAgentModel } from "../model-selection/contracts";
|
|
2
1
|
import type { PAJsonObject } from "../protocol/json";
|
|
3
|
-
export type PAInteractionAction = "connect" | "dismiss" | "dont_show_again" | "enable" | "later" | "never" | "run" | "snooze" | "submit_feedback";
|
|
4
|
-
export type PAInteractionActionInput = Readonly<{
|
|
5
|
-
interactionId: string;
|
|
6
|
-
action: PAInteractionAction;
|
|
7
|
-
expectedRevision: number;
|
|
8
|
-
sourceVersion: number | null;
|
|
9
|
-
payload?: PAJsonObject;
|
|
10
|
-
}>;
|
|
11
|
-
export type PAFeatureName = 'notifications' | 'tab_grouping';
|
|
12
|
-
export type PAPreferencePrompt = Readonly<{
|
|
13
|
-
eligibleSince: string | null;
|
|
14
|
-
revision: number;
|
|
15
|
-
requestId: string | null;
|
|
16
|
-
snoozedUntil: string | null;
|
|
17
|
-
}>;
|
|
18
|
-
export type PAPreferencePrompts = Readonly<Record<PAFeatureName, PAPreferencePrompt>>;
|
|
19
|
-
export type PAUserDecisionInput = Readonly<{
|
|
20
|
-
promptKey: string;
|
|
21
|
-
expectedRevision: number;
|
|
22
|
-
}> & (Readonly<{
|
|
23
|
-
category: 'social_share';
|
|
24
|
-
action: 'dismiss' | 'shared';
|
|
25
|
-
}> | Readonly<{
|
|
26
|
-
category: 'proactive_suggestion';
|
|
27
|
-
action: 'not_now' | 'never';
|
|
28
|
-
}> | Readonly<{
|
|
29
|
-
category: 'morning_report';
|
|
30
|
-
action: 'snooze';
|
|
31
|
-
}>);
|
|
32
|
-
export type PAUserDecision = Readonly<{
|
|
33
|
-
decisionKey: string;
|
|
34
|
-
revision: number;
|
|
35
|
-
decidedAt: string;
|
|
36
|
-
request: PAUserDecisionInput & Readonly<{
|
|
37
|
-
requestId: string;
|
|
38
|
-
}>;
|
|
39
|
-
outcome: 'resolved' | 'snoozed' | 'suppressed';
|
|
40
|
-
nextEligibleAt: string | null;
|
|
41
|
-
}>;
|
|
42
|
-
export type PADeviceFact = Readonly<{
|
|
43
|
-
permission: 'unknown' | 'granted' | 'missing' | 'unsupported';
|
|
44
|
-
revision: number;
|
|
45
|
-
snoozedUntil: string | null;
|
|
46
|
-
pending?: boolean;
|
|
47
|
-
}>;
|
|
48
2
|
export type PAInteractionState = Readonly<{
|
|
49
|
-
|
|
50
|
-
scope: string;
|
|
51
|
-
openingGeneration: number;
|
|
52
|
-
expectedRevision: number;
|
|
53
|
-
feature: PAFeatureName;
|
|
54
|
-
action: 'enable' | 'allow' | 'not_now' | 'dont_enable';
|
|
55
|
-
}>>>;
|
|
56
|
-
openings: Readonly<Record<string, import('./preferenceOpenings').PAPreferenceOpening>>;
|
|
57
|
-
openingGeneration: number;
|
|
58
|
-
closedScopes: Readonly<Record<string, boolean>>;
|
|
59
|
-
bridgeReady: boolean;
|
|
60
|
-
bridgeError: string | null;
|
|
61
|
-
crossTabTurns: Readonly<Record<string, readonly string[]>>;
|
|
62
|
-
sources: Readonly<Record<string, import('../conversation/display').PAConversationInteractionSource>>;
|
|
63
|
-
welcome: Readonly<Record<string, Readonly<{
|
|
64
|
-
id: string;
|
|
65
|
-
clientScopeId?: string;
|
|
66
|
-
sourceSuggestionId?: string;
|
|
67
|
-
category: 'proactive_suggestion' | 'morning_report';
|
|
68
|
-
expiresAt?: number;
|
|
69
|
-
text: string;
|
|
70
|
-
tasks: readonly string[];
|
|
71
|
-
eligible: boolean;
|
|
72
|
-
}>>>;
|
|
73
|
-
deviceHints: Readonly<Record<string, boolean>>;
|
|
74
|
-
localSharingReady: boolean;
|
|
75
|
-
localSharing: Readonly<Record<string, Readonly<{
|
|
76
|
-
revision: number;
|
|
77
|
-
resolved: boolean;
|
|
78
|
-
}>>>;
|
|
79
|
-
decisions: Readonly<Record<string, PAUserDecision>>;
|
|
80
|
-
preferencePrompts: PAPreferencePrompts;
|
|
81
|
-
deviceFacts: Readonly<Record<PAFeatureName, PADeviceFact>>;
|
|
3
|
+
sources: Readonly<Record<string, import("../conversation/display").PAConversationInteractionSource>>;
|
|
82
4
|
actions: Readonly<Record<string, Readonly<{
|
|
83
5
|
interactionId: string;
|
|
84
6
|
clientScopeId: string;
|
|
85
7
|
conversationScopeId: string | null;
|
|
86
|
-
taskIndex: number | null;
|
|
87
8
|
action: string;
|
|
88
9
|
expectedRevision: number;
|
|
89
10
|
sourceVersion: number | null;
|
|
90
|
-
status:
|
|
91
|
-
|
|
92
|
-
error: import('../protocol/errors').PATransportedError | null;
|
|
11
|
+
status: "pending" | "error" | "done";
|
|
12
|
+
error: import("../protocol/errors").PATransportedError | null;
|
|
93
13
|
operation: PAInteractionPlatformOperation;
|
|
94
14
|
}>>>;
|
|
95
|
-
devicePending: Readonly<Record<string, Readonly<{
|
|
96
|
-
feature: PAFeatureName;
|
|
97
|
-
requestId: string;
|
|
98
|
-
generation: number;
|
|
99
|
-
desired: boolean | null;
|
|
100
|
-
action?: 'check' | 'allow' | 'not_now';
|
|
101
|
-
}>>>;
|
|
102
|
-
deviceErrors: Readonly<Partial<Record<PAFeatureName, import('../protocol/errors').PATransportedError>>>;
|
|
103
15
|
}>;
|
|
104
16
|
export type PAInteractionProjection = Readonly<{
|
|
105
17
|
id: string;
|
|
106
18
|
category: string;
|
|
107
|
-
placement:
|
|
19
|
+
placement: "turn" | "bottom_overlay" | "welcome";
|
|
108
20
|
sourceId: string | null;
|
|
109
21
|
conversationId: string | null;
|
|
110
22
|
userMessageId: string | null;
|
|
@@ -112,39 +24,14 @@ export type PAInteractionProjection = Readonly<{
|
|
|
112
24
|
decisionRevision: number;
|
|
113
25
|
actions: readonly string[];
|
|
114
26
|
actionLabels?: Readonly<Record<string, string>>;
|
|
115
|
-
status:
|
|
116
|
-
error: import(
|
|
27
|
+
status: "presentable" | "pending" | "error";
|
|
28
|
+
error: import("../protocol/errors").PATransportedError | null;
|
|
117
29
|
payload: PAJsonObject;
|
|
118
30
|
nextEligibleAt: string | null;
|
|
119
31
|
}>;
|
|
120
32
|
export type PAInteractionPlatformOperation = Readonly<{
|
|
121
|
-
kind:
|
|
122
|
-
interactionId: string;
|
|
123
|
-
variant: 'social' | 'referral';
|
|
124
|
-
platform?: 'linkedin' | 'x' | 'instagram';
|
|
125
|
-
}> | Readonly<{
|
|
126
|
-
kind: 'connect';
|
|
33
|
+
kind: "connect";
|
|
127
34
|
interactionId: string;
|
|
128
35
|
authRequestId: string;
|
|
129
|
-
source: import(
|
|
130
|
-
}> | Readonly<{
|
|
131
|
-
kind: 'pair';
|
|
132
|
-
interactionId: string;
|
|
133
|
-
requestId: string;
|
|
134
|
-
managementUrl: string;
|
|
135
|
-
}> | Readonly<{
|
|
136
|
-
kind: 'run' | 'edit';
|
|
137
|
-
requestedModel?: PAProductAgentModel;
|
|
138
|
-
interactionId: string;
|
|
139
|
-
text: string;
|
|
140
|
-
clientScopeId: string;
|
|
141
|
-
conversationScopeId: string;
|
|
142
|
-
submissionId: string;
|
|
143
|
-
}> | Readonly<{
|
|
144
|
-
kind: 'saveHint';
|
|
145
|
-
interactionId: string;
|
|
146
|
-
}> | Readonly<{
|
|
147
|
-
kind: 'saveSharing';
|
|
148
|
-
interactionId: string;
|
|
149
|
-
expectedRevision: number;
|
|
36
|
+
source: import("../conversation/display").PAConversationInteractionSource;
|
|
150
37
|
}>;
|
|
@@ -1,25 +1,5 @@
|
|
|
1
|
-
import type { PAStage7Slices } from
|
|
2
|
-
import type { PAConversationState } from
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
newChat: boolean;
|
|
7
|
-
submissionStarted: boolean;
|
|
8
|
-
clientScopeId?: string;
|
|
9
|
-
conversationScopeId?: string;
|
|
10
|
-
}>;
|
|
11
|
-
export declare function selectWelcomeAction(state: PAStage7Slices, interactionId: string, view: Pick<PAInteractionView, 'clientScopeId' | 'conversationScopeId'>): Readonly<{
|
|
12
|
-
interactionId: string;
|
|
13
|
-
clientScopeId: string;
|
|
14
|
-
conversationScopeId: string | null;
|
|
15
|
-
taskIndex: number | null;
|
|
16
|
-
action: string;
|
|
17
|
-
expectedRevision: number;
|
|
18
|
-
sourceVersion: number | null;
|
|
19
|
-
status: "pending" | "error" | "done";
|
|
20
|
-
step: "perform" | "persist";
|
|
21
|
-
error: import("..").PATransportedError | null;
|
|
22
|
-
operation: import("./contracts").PAInteractionPlatformOperation;
|
|
23
|
-
}>;
|
|
24
|
-
export declare function selectStage7Interactions(state: PAStage7Slices, conversation: PAConversationState, view: PAInteractionView): readonly PAInteractionProjection[];
|
|
25
|
-
export declare function selectStage7ClientInteractions(state: PAStage7Slices, conversation: PAConversationState, directory: import('../session-directory/contracts').PADirectoryState, clientScopeId: string): readonly PAInteractionProjection[];
|
|
1
|
+
import type { PAStage7Slices } from "../features/contracts";
|
|
2
|
+
import type { PAConversationState } from "../conversation/contracts";
|
|
3
|
+
import type { PADirectoryState } from "../session-directory/contracts";
|
|
4
|
+
import type { PAInteractionProjection } from "./contracts";
|
|
5
|
+
export declare function selectStage7ClientInteractions(state: PAStage7Slices, conversation: PAConversationState, directory: PADirectoryState, clientScopeId: string): readonly PAInteractionProjection[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PAInteractionState } from
|
|
1
|
+
import type { PAInteractionState } from "./contracts";
|
|
2
2
|
export declare function createInteractionState(): PAInteractionState;
|
|
@@ -14,7 +14,6 @@ export declare const PA_OPERATION_CAPABILITY: {
|
|
|
14
14
|
readonly change_task_page_title: "canChangeTaskPageTitle";
|
|
15
15
|
readonly open_external_link: "canOpenExternalLinks";
|
|
16
16
|
readonly use_runtime_helper: "canUseRuntimeHelpers";
|
|
17
|
-
readonly use_sandbox_files: "canUseSandboxFiles";
|
|
18
17
|
readonly show_notification: "canShowSystemNotifications";
|
|
19
18
|
readonly share: "canShare";
|
|
20
19
|
readonly submit_feedback: "canSubmitFeedback";
|
|
@@ -36,7 +35,6 @@ export declare const PA_OPERATION_CAPABILITY: {
|
|
|
36
35
|
readonly manage_notification_permission: "canRequestNotificationPermission";
|
|
37
36
|
readonly manage_tab_group_permission: "canRequestTabGroupPermission";
|
|
38
37
|
readonly manage_integration_auth: "canManageIntegrationAuth";
|
|
39
|
-
readonly read_active_users: "canReadActiveUsers";
|
|
40
38
|
readonly manage_extension_update: "canManageExtensionUpdate";
|
|
41
39
|
readonly record_widget_lifecycle: "canRecordWidgetLifecycle";
|
|
42
40
|
readonly read_hosted_browser_eligibility: "canReadHostedBrowserEligibility";
|
|
@@ -81,14 +79,12 @@ export type PASurfaceCapabilities = Readonly<{
|
|
|
81
79
|
canManageOriginAccess: boolean;
|
|
82
80
|
canStartDeepFlow: boolean;
|
|
83
81
|
canUseRuntimeHelpers: boolean;
|
|
84
|
-
canUseSandboxFiles: boolean;
|
|
85
82
|
canReadHostedBrowserEligibility: boolean;
|
|
86
83
|
canManageInteractions: boolean;
|
|
87
84
|
canReadStarterPrompts: boolean;
|
|
88
85
|
canManageMorningReport: boolean;
|
|
89
86
|
canManageProactiveSuggestions: boolean;
|
|
90
87
|
canManageIntegrationAuth: boolean;
|
|
91
|
-
canReadActiveUsers: boolean;
|
|
92
88
|
canManageExtensionUpdate: boolean;
|
|
93
89
|
canRecordWidgetLifecycle: boolean;
|
|
94
90
|
}>;
|
|
@@ -130,14 +126,12 @@ export declare const PA_SURFACE_PROFILES: {
|
|
|
130
126
|
canManageOriginAccess: boolean;
|
|
131
127
|
canStartDeepFlow: boolean;
|
|
132
128
|
canUseRuntimeHelpers: boolean;
|
|
133
|
-
canUseSandboxFiles: boolean;
|
|
134
129
|
canReadHostedBrowserEligibility: boolean;
|
|
135
130
|
canManageInteractions: boolean;
|
|
136
131
|
canReadStarterPrompts: boolean;
|
|
137
132
|
canManageMorningReport: boolean;
|
|
138
133
|
canManageProactiveSuggestions: boolean;
|
|
139
134
|
canManageIntegrationAuth: boolean;
|
|
140
|
-
canReadActiveUsers: boolean;
|
|
141
135
|
canManageExtensionUpdate: boolean;
|
|
142
136
|
canRecordWidgetLifecycle: boolean;
|
|
143
137
|
}>;
|
|
@@ -177,14 +171,12 @@ export declare const PA_SURFACE_PROFILES: {
|
|
|
177
171
|
canManageOriginAccess: boolean;
|
|
178
172
|
canStartDeepFlow: boolean;
|
|
179
173
|
canUseRuntimeHelpers: boolean;
|
|
180
|
-
canUseSandboxFiles: boolean;
|
|
181
174
|
canReadHostedBrowserEligibility: boolean;
|
|
182
175
|
canManageInteractions: boolean;
|
|
183
176
|
canReadStarterPrompts: boolean;
|
|
184
177
|
canManageMorningReport: boolean;
|
|
185
178
|
canManageProactiveSuggestions: boolean;
|
|
186
179
|
canManageIntegrationAuth: boolean;
|
|
187
|
-
canReadActiveUsers: boolean;
|
|
188
180
|
canManageExtensionUpdate: boolean;
|
|
189
181
|
canRecordWidgetLifecycle: boolean;
|
|
190
182
|
}>;
|
|
@@ -224,14 +216,12 @@ export declare const PA_SURFACE_PROFILES: {
|
|
|
224
216
|
canManageOriginAccess: boolean;
|
|
225
217
|
canStartDeepFlow: boolean;
|
|
226
218
|
canUseRuntimeHelpers: boolean;
|
|
227
|
-
canUseSandboxFiles: boolean;
|
|
228
219
|
canReadHostedBrowserEligibility: boolean;
|
|
229
220
|
canManageInteractions: boolean;
|
|
230
221
|
canReadStarterPrompts: boolean;
|
|
231
222
|
canManageMorningReport: boolean;
|
|
232
223
|
canManageProactiveSuggestions: boolean;
|
|
233
224
|
canManageIntegrationAuth: boolean;
|
|
234
|
-
canReadActiveUsers: boolean;
|
|
235
225
|
canManageExtensionUpdate: boolean;
|
|
236
226
|
canRecordWidgetLifecycle: boolean;
|
|
237
227
|
}>;
|
|
@@ -271,14 +261,12 @@ export declare const PA_SURFACE_PROFILES: {
|
|
|
271
261
|
canManageOriginAccess: boolean;
|
|
272
262
|
canStartDeepFlow: boolean;
|
|
273
263
|
canUseRuntimeHelpers: boolean;
|
|
274
|
-
canUseSandboxFiles: boolean;
|
|
275
264
|
canReadHostedBrowserEligibility: boolean;
|
|
276
265
|
canManageInteractions: boolean;
|
|
277
266
|
canReadStarterPrompts: boolean;
|
|
278
267
|
canManageMorningReport: boolean;
|
|
279
268
|
canManageProactiveSuggestions: boolean;
|
|
280
269
|
canManageIntegrationAuth: boolean;
|
|
281
|
-
canReadActiveUsers: boolean;
|
|
282
270
|
canManageExtensionUpdate: boolean;
|
|
283
271
|
canRecordWidgetLifecycle: boolean;
|
|
284
272
|
}>;
|
|
@@ -318,14 +306,12 @@ export declare const PA_SURFACE_PROFILES: {
|
|
|
318
306
|
canManageOriginAccess: boolean;
|
|
319
307
|
canStartDeepFlow: boolean;
|
|
320
308
|
canUseRuntimeHelpers: boolean;
|
|
321
|
-
canUseSandboxFiles: boolean;
|
|
322
309
|
canReadHostedBrowserEligibility: boolean;
|
|
323
310
|
canManageInteractions: boolean;
|
|
324
311
|
canReadStarterPrompts: boolean;
|
|
325
312
|
canManageMorningReport: boolean;
|
|
326
313
|
canManageProactiveSuggestions: boolean;
|
|
327
314
|
canManageIntegrationAuth: boolean;
|
|
328
|
-
canReadActiveUsers: boolean;
|
|
329
315
|
canManageExtensionUpdate: boolean;
|
|
330
316
|
canRecordWidgetLifecycle: boolean;
|
|
331
317
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PAClientScopeId } from "../kernel/state";
|
|
2
2
|
import type { PAModelScope, PAModelSelectionState } from "./state";
|
|
3
|
-
export declare const selectNextTurnModel: (scope: PAModelScope) => "
|
|
3
|
+
export declare const selectNextTurnModel: (scope: PAModelScope) => "anthropic/claude-opus-5" | "anthropic/claude-opus-5.5" | "anthropic/claude-sonnet-5" | "deepseek/deepseek-chat-v3.1" | "deepseek/deepseek-v4-flash" | "gpt-5.4-nano" | "gpt-5.4-mini" | "gpt-5.4" | "gpt-5.6-luna" | "gpt-5.6-terra" | "gpt-5.6-sol" | "gpt-6.1-sol" | "gpt-6-sol" | "gpt-6-luna" | undefined;
|
|
4
4
|
export declare const selectModelScope: (state: PAModelSelectionState, clientScopeId: PAClientScopeId) => Readonly<{
|
|
5
5
|
sessionId: string | null;
|
|
6
6
|
defaultModel: import("./contracts").PAProductAgentModel | undefined;
|
|
@@ -34,7 +34,6 @@ export type PADirectoryOptimisticEntry = Readonly<{
|
|
|
34
34
|
export type PAConversationDirectoryPage = Readonly<{
|
|
35
35
|
entries: readonly PAConversationMetadata[];
|
|
36
36
|
next_cursor: string | null;
|
|
37
|
-
personal_model?: string | null;
|
|
38
37
|
}>;
|
|
39
38
|
export type PADirectoryAuthority = Readonly<{
|
|
40
39
|
authorityId: PAAuthorityId;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type HistoryRefreshFailure } from "./renderDiagnostics";
|
|
2
2
|
import { type OperationTiming } from "./operationTiming";
|
|
3
|
-
import type { ActiveUsersCounterValue } from "./activeUsersCounter";
|
|
4
3
|
import { type RenderedErrorEvidence, type UiInvariantEvidence } from "./renderDiagnostics";
|
|
5
4
|
import type { ProductAgentTaskStatus } from "./taskPageTitle";
|
|
6
5
|
import type { ProductAgentEntityQueryData, ProductAgentAccountProjection, ProductAgentSubmissionContext, ProductAgentInteraction, ProductAgentInteractionAction, ProductAgentQueryState } from "./runtimeState";
|
|
@@ -141,7 +140,6 @@ export type ProductAgentState = {
|
|
|
141
140
|
stableSelectionKey?: string;
|
|
142
141
|
isDraftSession?: boolean;
|
|
143
142
|
submissionContext?: ProductAgentSubmissionContext;
|
|
144
|
-
activeUsersCount?: number | null;
|
|
145
143
|
status: "idle" | "connecting" | "connected" | "reconnecting" | "closed" | "error";
|
|
146
144
|
user: ProductAgentUser | null;
|
|
147
145
|
sessionId: string | null;
|
|
@@ -198,7 +196,6 @@ export declare class ProductAgentTokenProviderError extends Error {
|
|
|
198
196
|
constructor(message: string, retryable: boolean, status?: number | undefined, retryAfterMs?: number | undefined);
|
|
199
197
|
}
|
|
200
198
|
export type ProductAgentInitOptions = {
|
|
201
|
-
activeUsersLoader?: () => Promise<ActiveUsersCounterValue>;
|
|
202
199
|
token?: string;
|
|
203
200
|
tokenProvider?: (context?: ProductAgentTokenProviderContext) => Promise<string>;
|
|
204
201
|
backendUrl?: string;
|
|
@@ -233,33 +230,6 @@ export type ProductAgentRuntimeAdapters = {
|
|
|
233
230
|
subscribeNetworkCapture?: (subscriber: (event: CapturedRequest) => void) => () => void;
|
|
234
231
|
integrationAuthStatusLoader?: (request: ProductAgentIntegrationAuthRequest) => Promise<"pending" | "completed" | "cancelled" | "expired">;
|
|
235
232
|
integrationAuthHandler?: (request: ProductAgentIntegrationAuthRequest) => Promise<void>;
|
|
236
|
-
personalChannelConnectionHandler?: (request: ProductAgentPersonalChannelConnectionRequest) => Promise<void>;
|
|
237
|
-
featurePermissions?: {
|
|
238
|
-
runtimeClientId?: () => string | null;
|
|
239
|
-
dispose?: () => void;
|
|
240
|
-
subscribe?: (changed: () => void) => () => void;
|
|
241
|
-
getState: (feature: "notifications" | "tab_grouping", sessionId?: string | null) => Promise<{
|
|
242
|
-
error?: string | null;
|
|
243
|
-
crossTabUserMessageIds?: string[];
|
|
244
|
-
bridgeReady: boolean;
|
|
245
|
-
permissionNeeded: boolean;
|
|
246
|
-
permissionGranted?: boolean;
|
|
247
|
-
permissionPending?: boolean;
|
|
248
|
-
snoozedUntil?: string | null;
|
|
249
|
-
sessionId?: string | null;
|
|
250
|
-
participantTabIds?: number[];
|
|
251
|
-
}>;
|
|
252
|
-
enable: (feature: "notifications" | "tab_grouping", request: {
|
|
253
|
-
requestId: string;
|
|
254
|
-
expectedRevision: number;
|
|
255
|
-
action: "enable" | "allow";
|
|
256
|
-
}) => Promise<void>;
|
|
257
|
-
dismiss: (feature: "notifications" | "tab_grouping", request: {
|
|
258
|
-
requestId: string;
|
|
259
|
-
expectedRevision: number;
|
|
260
|
-
action: "not_now";
|
|
261
|
-
}) => Promise<void>;
|
|
262
|
-
};
|
|
263
233
|
};
|
|
264
234
|
export type ProductAgentWebSocket = {
|
|
265
235
|
readyState: number;
|
|
@@ -371,8 +341,6 @@ export declare class ProductAgentSessionEngine {
|
|
|
371
341
|
private queuedClientEvents;
|
|
372
342
|
private readonly pendingRetainedCommandDeliveries;
|
|
373
343
|
private pendingWidgetLifecycleEvents;
|
|
374
|
-
private activeComposerWarmupId;
|
|
375
|
-
private readonly authenticatingWarmupHints;
|
|
376
344
|
private directoryAuthority;
|
|
377
345
|
private readonly directoryHttp;
|
|
378
346
|
private directoryScope;
|
|
@@ -386,7 +354,6 @@ export declare class ProductAgentSessionEngine {
|
|
|
386
354
|
private readonly firstResponseTimersByClientMessageId;
|
|
387
355
|
private readonly modelClientScopeId;
|
|
388
356
|
private draftModel;
|
|
389
|
-
private lastPersonalModel;
|
|
390
357
|
private draftModelExplicit;
|
|
391
358
|
private lastUserMessagePageUrl;
|
|
392
359
|
private runtimeHelperJavascript;
|
|
@@ -420,7 +387,6 @@ export declare class ProductAgentSessionEngine {
|
|
|
420
387
|
connect(): Promise<void>;
|
|
421
388
|
disconnect(): void;
|
|
422
389
|
destroy(): void;
|
|
423
|
-
warmup(reason?: "panel_open" | "extension_install" | "composer_input", requestedModel?: ProductAgentModel): void;
|
|
424
390
|
recordPromptPresented(feature: "notifications" | "tab_grouping", openingGeneration: number): void;
|
|
425
391
|
recordWidgetLifecycle(action: ProductAgentWidgetLifecycleAction, trigger: ProductAgentWidgetLifecycleTrigger): void;
|
|
426
392
|
sendMessage(content: string, options?: {
|
|
@@ -498,8 +464,7 @@ export declare class ProductAgentSessionEngine {
|
|
|
498
464
|
private flushPendingWidgetLifecycleEvents;
|
|
499
465
|
private handleServerEvent;
|
|
500
466
|
private applyAccountSubmissionError;
|
|
501
|
-
private
|
|
502
|
-
private updateAccountFallbackFromSession;
|
|
467
|
+
private updateHistoricalModelFromSession;
|
|
503
468
|
private executeToolCall;
|
|
504
469
|
private startPageLifecycleRecovery;
|
|
505
470
|
private installSessionBrowserApis;
|
|
@@ -536,7 +501,7 @@ export declare function installProductAgentPageEnvironment(subscriber: (event: C
|
|
|
536
501
|
export declare function getProductAgentOriginAccessErrorMessage(message: string, runtimeOrigin?: string): string | null;
|
|
537
502
|
export declare function normalizeProductAgentSessionItems(value: unknown, backendUrl?: string): ProductAgentMessage[];
|
|
538
503
|
export declare function validateProductAgentProviderInputFile(file: File): void;
|
|
539
|
-
export { createProductAgentQueryState, mergeProductAgentEntityPages, normalizeProductAgentEntityPage, ProductAgentQueryController, resolveProductAgentComposerAction,
|
|
504
|
+
export { createProductAgentQueryState, mergeProductAgentEntityPages, normalizeProductAgentEntityPage, ProductAgentQueryController, resolveProductAgentComposerAction, isProductAgentAuthReconnectError, PRODUCT_AGENT_AUTH_RECONNECTING_ERROR_MESSAGE, resolveProductAgentWidgetPresentation, selectProductAgentQueryEntities, } from "./runtimeState";
|
|
540
505
|
export { ProductAgentSessionHistoryManager } from "./sessionHistoryState";
|
|
541
506
|
export type { ProductAgentSessionHistoryEntity, ProductAgentSessionHistoryLoader, } from "./sessionHistoryState";
|
|
542
507
|
export { createLocalStorageInteractionDecisionStorage, ProductAgentInteractionManager, readLocalStorageInteractionDecisions, } from "./interactionManager";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const OPERATION_TIMING_STAGES: readonly ["submit", "stop", "staging_ipc", "send_ipc", "stop_ipc", "attachment_transfer", "tab_lookup", "tab_recovery", "session_recovery", "conversation_scope", "local_stage", "view_publication", "page_access", "authentication", "community", "preferences", "page_capture", "session_tabs", "context_ready", "first_frame", "checkpoint", "command_http", "http_authentication", "http_request", "receipt_http", "attachment_upload", "runtime_reading", "runtime_stopping", "runtime_progress", "runtime_stopped", "message_painted", "reading_painted", "stopping_painted", "progress_painted", "stopped_painted", "
|
|
1
|
+
export declare const OPERATION_TIMING_STAGES: readonly ["submit", "stop", "staging_ipc", "send_ipc", "stop_ipc", "attachment_transfer", "tab_lookup", "tab_recovery", "session_recovery", "conversation_scope", "local_stage", "view_publication", "page_access", "authentication", "community", "preferences", "page_capture", "session_tabs", "context_ready", "first_frame", "checkpoint", "command_http", "http_authentication", "http_request", "receipt_http", "attachment_upload", "runtime_reading", "runtime_stopping", "runtime_progress", "runtime_stopped", "message_painted", "reading_painted", "stopping_painted", "progress_painted", "stopped_painted", "session_tabs_snapshot", "tab_window", "tab_summary", "preparation_deadline", "preparation_retired", "context_discarded", "checkpoint_queue", "checkpoint_prepared", "checkpoint_restore", "checkpoint_prerequisite", "checkpoint_bindings", "checkpoint_write", "checkpoint_cleanup", "reload_checkpoint", "reload_checkpoint_queue", "reload_directory_write", "reload_directory_read", "reload_storage_read", "reload_documents", "reload_storage_write", "acceptance_received", "acceptance_applied", "cancellation_queue", "cancellation_write"];
|
|
2
2
|
export type OperationTimingStage = typeof OPERATION_TIMING_STAGES[number];
|
|
3
3
|
export type OperationTiming = {
|
|
4
4
|
entrySurface?: "extension_sidepanel" | "extension_widget" | "main_web_chat" | "embedded_widget" | "embedded_custom_ui" | "automation" | "mcp" | "whatsapp" | "email";
|