@marketrix.ai/widget 3.8.53 → 3.8.134
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/src/components/base/icons.d.ts +0 -12
- package/dist/src/index.d.ts +0 -4
- package/dist/src/sdk/contract.d.ts +2 -2
- package/dist/src/sdk/contracts/entities.d.ts +149 -35
- package/dist/src/sdk/contracts/widget.d.ts +6 -6
- package/dist/src/sdk/index.d.ts +2 -2
- package/dist/src/services/ApiService.d.ts +0 -6
- package/dist/src/services/DomService.d.ts +0 -33
- package/dist/src/services/ScreenShareService.d.ts +0 -7
- package/dist/src/services/SessionManager.d.ts +0 -6
- package/dist/src/services/SessionRecorder.d.ts +0 -15
- package/dist/src/services/StorageService.d.ts +0 -21
- package/dist/src/services/ValidationService.d.ts +0 -7
- package/dist/src/types/index.d.ts +0 -7
- package/dist/src/utils/apiUtils.d.ts +0 -3
- package/dist/src/utils/bootstrap.d.ts +0 -34
- package/dist/src/utils/chat.d.ts +0 -24
- package/dist/src/utils/{format.d.ts → color.d.ts} +0 -9
- package/dist/src/utils/{common.d.ts → logger.d.ts} +0 -3
- package/dist/src/utils/validation.d.ts +0 -9
- package/dist/widget.mjs +62 -62
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,6 @@ export interface IconData {
|
|
|
14
14
|
paths: IconPath[];
|
|
15
15
|
}
|
|
16
16
|
export declare const icons: {
|
|
17
|
-
/** FaCheckCircle */
|
|
18
17
|
readonly checkCircle: {
|
|
19
18
|
readonly viewBox: "0 0 512 512";
|
|
20
19
|
readonly paths: [{
|
|
@@ -22,7 +21,6 @@ export declare const icons: {
|
|
|
22
21
|
readonly fill: "currentColor";
|
|
23
22
|
}];
|
|
24
23
|
};
|
|
25
|
-
/** FaCircle */
|
|
26
24
|
readonly circle: {
|
|
27
25
|
readonly viewBox: "0 0 512 512";
|
|
28
26
|
readonly paths: [{
|
|
@@ -30,7 +28,6 @@ export declare const icons: {
|
|
|
30
28
|
readonly fill: "currentColor";
|
|
31
29
|
}];
|
|
32
30
|
};
|
|
33
|
-
/** FaExclamationCircle */
|
|
34
31
|
readonly exclamationCircle: {
|
|
35
32
|
readonly viewBox: "0 0 512 512";
|
|
36
33
|
readonly paths: [{
|
|
@@ -38,7 +35,6 @@ export declare const icons: {
|
|
|
38
35
|
readonly fill: "currentColor";
|
|
39
36
|
}];
|
|
40
37
|
};
|
|
41
|
-
/** FaTimesCircle */
|
|
42
38
|
readonly timesCircle: {
|
|
43
39
|
readonly viewBox: "0 0 512 512";
|
|
44
40
|
readonly paths: [{
|
|
@@ -46,7 +42,6 @@ export declare const icons: {
|
|
|
46
42
|
readonly fill: "currentColor";
|
|
47
43
|
}];
|
|
48
44
|
};
|
|
49
|
-
/** FaBan */
|
|
50
45
|
readonly ban: {
|
|
51
46
|
readonly viewBox: "0 0 512 512";
|
|
52
47
|
readonly paths: [{
|
|
@@ -54,7 +49,6 @@ export declare const icons: {
|
|
|
54
49
|
readonly fill: "currentColor";
|
|
55
50
|
}];
|
|
56
51
|
};
|
|
57
|
-
/** FaArrowUp */
|
|
58
52
|
readonly arrowUp: {
|
|
59
53
|
readonly viewBox: "0 0 448 512";
|
|
60
54
|
readonly paths: [{
|
|
@@ -62,7 +56,6 @@ export declare const icons: {
|
|
|
62
56
|
readonly fill: "currentColor";
|
|
63
57
|
}];
|
|
64
58
|
};
|
|
65
|
-
/** FaArrowDown */
|
|
66
59
|
readonly arrowDown: {
|
|
67
60
|
readonly viewBox: "0 0 448 512";
|
|
68
61
|
readonly paths: [{
|
|
@@ -70,7 +63,6 @@ export declare const icons: {
|
|
|
70
63
|
readonly fill: "currentColor";
|
|
71
64
|
}];
|
|
72
65
|
};
|
|
73
|
-
/** FiX */
|
|
74
66
|
readonly x: {
|
|
75
67
|
readonly viewBox: "0 0 24 24";
|
|
76
68
|
readonly paths: [{
|
|
@@ -89,7 +81,6 @@ export declare const icons: {
|
|
|
89
81
|
readonly strokeLinejoin: "round";
|
|
90
82
|
}];
|
|
91
83
|
};
|
|
92
|
-
/** IoChatbubbleEllipsesOutline */
|
|
93
84
|
readonly chatBubble: {
|
|
94
85
|
readonly viewBox: "0 0 512 512";
|
|
95
86
|
readonly paths: [{
|
|
@@ -109,7 +100,6 @@ export declare const icons: {
|
|
|
109
100
|
readonly fill: "currentColor";
|
|
110
101
|
}];
|
|
111
102
|
};
|
|
112
|
-
/** IoStop */
|
|
113
103
|
readonly stop: {
|
|
114
104
|
readonly viewBox: "0 0 512 512";
|
|
115
105
|
readonly paths: [{
|
|
@@ -117,7 +107,6 @@ export declare const icons: {
|
|
|
117
107
|
readonly fill: "currentColor";
|
|
118
108
|
}];
|
|
119
109
|
};
|
|
120
|
-
/** LuMousePointerClick */
|
|
121
110
|
readonly mousePointerClick: {
|
|
122
111
|
readonly viewBox: "0 0 24 24";
|
|
123
112
|
readonly paths: [{
|
|
@@ -157,7 +146,6 @@ export declare const icons: {
|
|
|
157
146
|
readonly strokeLinejoin: "round";
|
|
158
147
|
}];
|
|
159
148
|
};
|
|
160
|
-
/** SiTicktick */
|
|
161
149
|
readonly ticktick: {
|
|
162
150
|
readonly viewBox: "0 0 24 24";
|
|
163
151
|
readonly paths: [{
|
package/dist/src/index.d.ts
CHANGED
|
@@ -33,10 +33,6 @@ export { getCurrentConfig };
|
|
|
33
33
|
* Renders widget into parent container with shadow DOM
|
|
34
34
|
*/
|
|
35
35
|
export declare const MarketrixWidget: React.FC<MarketrixWidgetProps>;
|
|
36
|
-
/**
|
|
37
|
-
* addWidget - Function that auto-detects mode and initializes widget
|
|
38
|
-
* Supports preview, production, and dev modes
|
|
39
|
-
*/
|
|
40
36
|
export declare const mountWidget: (config: AddWidgetConfig) => Promise<void>;
|
|
41
37
|
export type { InstructionType } from './sdk';
|
|
42
38
|
export type { AddWidgetConfig, ChatMessage, MarketrixConfig, MarketrixWidgetProps, WidgetState } from './types';
|
|
@@ -388,7 +388,7 @@ export declare const widgetContract: {
|
|
|
388
388
|
error: string;
|
|
389
389
|
} | {
|
|
390
390
|
type: "task/status";
|
|
391
|
-
status: "
|
|
391
|
+
status: "running" | "has_question" | "completed" | "failed" | "stopped";
|
|
392
392
|
message?: string | undefined;
|
|
393
393
|
task_id?: string | undefined;
|
|
394
394
|
timestamp?: number | undefined;
|
|
@@ -419,7 +419,7 @@ export declare const widgetContract: {
|
|
|
419
419
|
error: string;
|
|
420
420
|
} | {
|
|
421
421
|
type: "task/status";
|
|
422
|
-
status: "
|
|
422
|
+
status: "running" | "has_question" | "completed" | "failed" | "stopped";
|
|
423
423
|
message?: string | undefined;
|
|
424
424
|
task_id?: string | undefined;
|
|
425
425
|
timestamp?: number | undefined;
|
|
@@ -16,20 +16,13 @@ export declare const KnowledgeSourceSchema: z.ZodEnum<{
|
|
|
16
16
|
research: "research";
|
|
17
17
|
}>;
|
|
18
18
|
export type KnowledgeSource = z.infer<typeof KnowledgeSourceSchema>;
|
|
19
|
-
export declare const QAFlowStatusSchema: z.ZodEnum<{
|
|
20
|
-
pending: "pending";
|
|
21
|
-
processing: "processing";
|
|
22
|
-
waiting_review: "waiting_review";
|
|
23
|
-
completed: "completed";
|
|
24
|
-
failed: "failed";
|
|
25
|
-
}>;
|
|
26
19
|
export declare const SimulationStatusSchema: z.ZodEnum<{
|
|
27
|
-
completed: "completed";
|
|
28
|
-
failed: "failed";
|
|
29
20
|
queued: "queued";
|
|
30
21
|
running: "running";
|
|
31
22
|
creating_knowledge: "creating_knowledge";
|
|
32
23
|
has_question: "has_question";
|
|
24
|
+
completed: "completed";
|
|
25
|
+
failed: "failed";
|
|
33
26
|
stopped: "stopped";
|
|
34
27
|
}>;
|
|
35
28
|
export type SimulationStatus = z.infer<typeof SimulationStatusSchema>;
|
|
@@ -39,9 +32,9 @@ export type SimulationStatus = z.infer<typeof SimulationStatusSchema>;
|
|
|
39
32
|
* `simulation/graph-updated` app event.
|
|
40
33
|
*/
|
|
41
34
|
export declare const GraphStatusSchema: z.ZodEnum<{
|
|
42
|
-
pending: "pending";
|
|
43
35
|
completed: "completed";
|
|
44
36
|
failed: "failed";
|
|
37
|
+
pending: "pending";
|
|
45
38
|
generating: "generating";
|
|
46
39
|
}>;
|
|
47
40
|
export declare const ApplicationTypeSchema: z.ZodEnum<{
|
|
@@ -172,15 +165,20 @@ export declare const KnowledgeEntitySchema: z.ZodObject<{
|
|
|
172
165
|
}, z.core.$strip>;
|
|
173
166
|
export type KnowledgeData = z.infer<typeof KnowledgeEntitySchema>;
|
|
174
167
|
/**
|
|
175
|
-
*
|
|
176
|
-
*
|
|
168
|
+
* Device viewport — the only device dimension (Chrome-only). A simulation runs at exactly
|
|
169
|
+
* one viewport; selecting N viewports fans out into N simulations (one per viewport).
|
|
170
|
+
* Defined here (the widget/root import closure) so SSE + simulation + qa contracts can share it.
|
|
177
171
|
*/
|
|
178
|
-
export declare const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
172
|
+
export declare const ViewportNameSchema: z.ZodEnum<{
|
|
173
|
+
desktop: "desktop";
|
|
174
|
+
tablet: "tablet";
|
|
175
|
+
mobile: "mobile";
|
|
176
|
+
}>;
|
|
177
|
+
export type ViewportName = z.infer<typeof ViewportNameSchema>;
|
|
178
|
+
export declare const VIEWPORT_DIMENSIONS: Record<ViewportName, {
|
|
179
|
+
width: number;
|
|
180
|
+
height: number;
|
|
182
181
|
}>;
|
|
183
|
-
export type QAVerdict = z.infer<typeof QAVerdictSchema>;
|
|
184
182
|
export declare const QAProcessResponseSchema: z.ZodObject<{
|
|
185
183
|
ultimate_goal: z.ZodString;
|
|
186
184
|
test_cases: z.ZodArray<z.ZodObject<{
|
|
@@ -218,11 +216,11 @@ export declare const SimulationTaskEntrySchema: z.ZodObject<{
|
|
|
218
216
|
title: z.ZodString;
|
|
219
217
|
instructions: z.ZodString;
|
|
220
218
|
status: z.ZodEnum<{
|
|
221
|
-
pending: "pending";
|
|
222
|
-
failed: "failed";
|
|
223
219
|
running: "running";
|
|
224
220
|
has_question: "has_question";
|
|
221
|
+
failed: "failed";
|
|
225
222
|
stopped: "stopped";
|
|
223
|
+
pending: "pending";
|
|
226
224
|
passed: "passed";
|
|
227
225
|
skipped: "skipped";
|
|
228
226
|
}>;
|
|
@@ -240,6 +238,62 @@ export declare const SimulationTaskEntrySchema: z.ZodObject<{
|
|
|
240
238
|
}, z.core.$strip>>>;
|
|
241
239
|
}, z.core.$strip>;
|
|
242
240
|
export type SimulationTaskEntry = z.infer<typeof SimulationTaskEntrySchema>;
|
|
241
|
+
export declare const SentimentSchema: z.ZodEnum<{
|
|
242
|
+
positive: "positive";
|
|
243
|
+
neutral: "neutral";
|
|
244
|
+
negative: "negative";
|
|
245
|
+
}>;
|
|
246
|
+
export declare const StepReactionSchema: z.ZodObject<{
|
|
247
|
+
step_index: z.ZodNumber;
|
|
248
|
+
screenshot_ref: z.ZodNullable<z.ZodString>;
|
|
249
|
+
reaction: z.ZodString;
|
|
250
|
+
sentiment: z.ZodNullable<z.ZodEnum<{
|
|
251
|
+
positive: "positive";
|
|
252
|
+
neutral: "neutral";
|
|
253
|
+
negative: "negative";
|
|
254
|
+
}>>;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
export declare const JourneyReactionSchema: z.ZodObject<{
|
|
257
|
+
reaction: z.ZodString;
|
|
258
|
+
sentiment: z.ZodEnum<{
|
|
259
|
+
positive: "positive";
|
|
260
|
+
neutral: "neutral";
|
|
261
|
+
negative: "negative";
|
|
262
|
+
}>;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
export declare const PersonaSimReactionEntitySchema: z.ZodObject<{
|
|
265
|
+
id: z.ZodNumber;
|
|
266
|
+
run_id: z.ZodNullable<z.ZodNumber>;
|
|
267
|
+
persona_id: z.ZodNullable<z.ZodNumber>;
|
|
268
|
+
user_index: z.ZodNullable<z.ZodNumber>;
|
|
269
|
+
simulation_id: z.ZodNullable<z.ZodNumber>;
|
|
270
|
+
study_variant_id: z.ZodNullable<z.ZodNumber>;
|
|
271
|
+
journey_reaction: z.ZodNullable<z.ZodString>;
|
|
272
|
+
journey_sentiment: z.ZodNullable<z.ZodEnum<{
|
|
273
|
+
positive: "positive";
|
|
274
|
+
neutral: "neutral";
|
|
275
|
+
negative: "negative";
|
|
276
|
+
}>>;
|
|
277
|
+
status: z.ZodEnum<{
|
|
278
|
+
completed: "completed";
|
|
279
|
+
failed: "failed";
|
|
280
|
+
pending: "pending";
|
|
281
|
+
}>;
|
|
282
|
+
step_reactions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
283
|
+
step_index: z.ZodNumber;
|
|
284
|
+
screenshot_ref: z.ZodNullable<z.ZodString>;
|
|
285
|
+
reaction: z.ZodString;
|
|
286
|
+
sentiment: z.ZodNullable<z.ZodEnum<{
|
|
287
|
+
positive: "positive";
|
|
288
|
+
neutral: "neutral";
|
|
289
|
+
negative: "negative";
|
|
290
|
+
}>>;
|
|
291
|
+
}, z.core.$strip>>>;
|
|
292
|
+
question_answers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
293
|
+
study_question_id: z.ZodNumber;
|
|
294
|
+
answer: z.ZodString;
|
|
295
|
+
}, z.core.$strip>>>;
|
|
296
|
+
}, z.core.$strip>;
|
|
243
297
|
export declare const SimulationEntitySchema: z.ZodObject<{
|
|
244
298
|
id: z.ZodOptional<z.ZodNumber>;
|
|
245
299
|
created_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -248,17 +302,25 @@ export declare const SimulationEntitySchema: z.ZodObject<{
|
|
|
248
302
|
job_id: z.ZodString;
|
|
249
303
|
browser_session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
250
304
|
status: z.ZodEnum<{
|
|
251
|
-
completed: "completed";
|
|
252
|
-
failed: "failed";
|
|
253
305
|
queued: "queued";
|
|
254
306
|
running: "running";
|
|
255
307
|
creating_knowledge: "creating_knowledge";
|
|
256
308
|
has_question: "has_question";
|
|
309
|
+
completed: "completed";
|
|
310
|
+
failed: "failed";
|
|
257
311
|
stopped: "stopped";
|
|
258
312
|
}>;
|
|
259
313
|
status_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
260
314
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
261
315
|
instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
316
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
317
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
318
|
+
direct: "direct";
|
|
319
|
+
uxr: "uxr";
|
|
320
|
+
survey: "survey";
|
|
321
|
+
ab: "ab";
|
|
322
|
+
qa: "qa";
|
|
323
|
+
}>>>;
|
|
262
324
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
263
325
|
source: z.ZodOptional<z.ZodEnum<{
|
|
264
326
|
direct: "direct";
|
|
@@ -271,11 +333,11 @@ export declare const SimulationEntitySchema: z.ZodObject<{
|
|
|
271
333
|
title: z.ZodString;
|
|
272
334
|
instructions: z.ZodString;
|
|
273
335
|
status: z.ZodEnum<{
|
|
274
|
-
pending: "pending";
|
|
275
|
-
failed: "failed";
|
|
276
336
|
running: "running";
|
|
277
337
|
has_question: "has_question";
|
|
338
|
+
failed: "failed";
|
|
278
339
|
stopped: "stopped";
|
|
340
|
+
pending: "pending";
|
|
279
341
|
passed: "passed";
|
|
280
342
|
skipped: "skipped";
|
|
281
343
|
}>;
|
|
@@ -293,17 +355,59 @@ export declare const SimulationEntitySchema: z.ZodObject<{
|
|
|
293
355
|
}, z.core.$strip>>>;
|
|
294
356
|
}, z.core.$strip>>>;
|
|
295
357
|
graph_status: z.ZodOptional<z.ZodEnum<{
|
|
296
|
-
pending: "pending";
|
|
297
358
|
completed: "completed";
|
|
298
359
|
failed: "failed";
|
|
360
|
+
pending: "pending";
|
|
299
361
|
generating: "generating";
|
|
300
362
|
}>>;
|
|
301
363
|
graph_steps_processed: z.ZodOptional<z.ZodNumber>;
|
|
302
364
|
graph_steps_total: z.ZodOptional<z.ZodNumber>;
|
|
303
365
|
graph_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
304
366
|
created_by_user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
305
|
-
persona_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
306
367
|
has_question: z.ZodOptional<z.ZodBoolean>;
|
|
368
|
+
participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
369
|
+
persona_id: z.ZodNumber;
|
|
370
|
+
user_count: z.ZodNumber;
|
|
371
|
+
}, z.core.$strip>>>;
|
|
372
|
+
reactions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
373
|
+
id: z.ZodNumber;
|
|
374
|
+
run_id: z.ZodNullable<z.ZodNumber>;
|
|
375
|
+
persona_id: z.ZodNullable<z.ZodNumber>;
|
|
376
|
+
user_index: z.ZodNullable<z.ZodNumber>;
|
|
377
|
+
simulation_id: z.ZodNullable<z.ZodNumber>;
|
|
378
|
+
study_variant_id: z.ZodNullable<z.ZodNumber>;
|
|
379
|
+
journey_reaction: z.ZodNullable<z.ZodString>;
|
|
380
|
+
journey_sentiment: z.ZodNullable<z.ZodEnum<{
|
|
381
|
+
positive: "positive";
|
|
382
|
+
neutral: "neutral";
|
|
383
|
+
negative: "negative";
|
|
384
|
+
}>>;
|
|
385
|
+
status: z.ZodEnum<{
|
|
386
|
+
completed: "completed";
|
|
387
|
+
failed: "failed";
|
|
388
|
+
pending: "pending";
|
|
389
|
+
}>;
|
|
390
|
+
step_reactions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
391
|
+
step_index: z.ZodNumber;
|
|
392
|
+
screenshot_ref: z.ZodNullable<z.ZodString>;
|
|
393
|
+
reaction: z.ZodString;
|
|
394
|
+
sentiment: z.ZodNullable<z.ZodEnum<{
|
|
395
|
+
positive: "positive";
|
|
396
|
+
neutral: "neutral";
|
|
397
|
+
negative: "negative";
|
|
398
|
+
}>>;
|
|
399
|
+
}, z.core.$strip>>>;
|
|
400
|
+
question_answers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
401
|
+
study_question_id: z.ZodNumber;
|
|
402
|
+
answer: z.ZodString;
|
|
403
|
+
}, z.core.$strip>>>;
|
|
404
|
+
}, z.core.$strip>>>;
|
|
405
|
+
driver_persona_id: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
406
|
+
viewport: z.ZodDefault<z.ZodEnum<{
|
|
407
|
+
desktop: "desktop";
|
|
408
|
+
tablet: "tablet";
|
|
409
|
+
mobile: "mobile";
|
|
410
|
+
}>>;
|
|
307
411
|
}, z.core.$strip>;
|
|
308
412
|
export type SimulationData = z.infer<typeof SimulationEntitySchema>;
|
|
309
413
|
export declare const ApplicationEntitySchema: z.ZodObject<{
|
|
@@ -481,21 +585,31 @@ export declare const StateTriggerEntitySchema: z.ZodObject<{
|
|
|
481
585
|
}, z.core.$strip>;
|
|
482
586
|
export type StateTriggerData = z.infer<typeof StateTriggerEntitySchema>;
|
|
483
587
|
/**
|
|
484
|
-
* QA run
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
* Canonical wire vocabulary; `deriveQARunStats` returns `'running'` directly.
|
|
489
|
-
* `'pending'` is the empty-task initial state.
|
|
588
|
+
* QA run status — first-class TEXT+CHECK column on qa_run (no longer derived).
|
|
589
|
+
* `synthesizing` = all sims terminal but per-journey verdicts still completing (QA has no
|
|
590
|
+
* run-level rollup like studies). Canonical wire vocabulary.
|
|
490
591
|
*/
|
|
491
592
|
export declare const QARunStatusSchema: z.ZodEnum<{
|
|
492
|
-
|
|
593
|
+
running: "running";
|
|
493
594
|
completed: "completed";
|
|
494
595
|
failed: "failed";
|
|
495
|
-
running: "running";
|
|
496
596
|
stopped: "stopped";
|
|
597
|
+
synthesizing: "synthesizing";
|
|
497
598
|
}>;
|
|
498
599
|
export type QARunStatus = z.infer<typeof QARunStatusSchema>;
|
|
600
|
+
/** QA verdict per (run, persona, journey, viewport) — DATA-derived by the api from qa_verdict; NOT a wire status. */
|
|
601
|
+
export declare const QARunVerdictStatusSchema: z.ZodEnum<{
|
|
602
|
+
failed: "failed";
|
|
603
|
+
passed: "passed";
|
|
604
|
+
indecisive: "indecisive";
|
|
605
|
+
}>;
|
|
606
|
+
export type QARunVerdictStatus = z.infer<typeof QARunVerdictStatusSchema>;
|
|
607
|
+
/** A human resolution of an indecisive verdict — resolves to a decision, so no `indecisive`. */
|
|
608
|
+
export declare const HumanRulingSchema: z.ZodEnum<{
|
|
609
|
+
failed: "failed";
|
|
610
|
+
passed: "passed";
|
|
611
|
+
}>;
|
|
612
|
+
export type HumanRuling = z.infer<typeof HumanRulingSchema>;
|
|
499
613
|
export declare const ActionLogTypeSchema: z.ZodEnum<{
|
|
500
614
|
user_login: "user_login";
|
|
501
615
|
url_visit: "url_visit";
|
|
@@ -664,12 +778,12 @@ export declare const SuggestedSimulationSchema: z.ZodObject<{
|
|
|
664
778
|
simulation_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
665
779
|
task_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
666
780
|
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
667
|
-
completed: "completed";
|
|
668
|
-
failed: "failed";
|
|
669
781
|
queued: "queued";
|
|
670
782
|
running: "running";
|
|
671
783
|
creating_knowledge: "creating_knowledge";
|
|
672
784
|
has_question: "has_question";
|
|
785
|
+
completed: "completed";
|
|
786
|
+
failed: "failed";
|
|
673
787
|
stopped: "stopped";
|
|
674
788
|
}>>>;
|
|
675
789
|
}, z.core.$strip>;
|
|
@@ -366,10 +366,10 @@ export declare const WidgetEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
366
366
|
}, z.core.$strip>, z.ZodObject<{
|
|
367
367
|
type: z.ZodLiteral<"task/status">;
|
|
368
368
|
status: z.ZodEnum<{
|
|
369
|
-
completed: "completed";
|
|
370
|
-
failed: "failed";
|
|
371
369
|
running: "running";
|
|
372
370
|
has_question: "has_question";
|
|
371
|
+
completed: "completed";
|
|
372
|
+
failed: "failed";
|
|
373
373
|
stopped: "stopped";
|
|
374
374
|
}>;
|
|
375
375
|
message: z.ZodOptional<z.ZodString>;
|
|
@@ -850,7 +850,7 @@ export declare const widgetStream: import("@orpc/contract").ContractProcedureBui
|
|
|
850
850
|
error: string;
|
|
851
851
|
} | {
|
|
852
852
|
type: "task/status";
|
|
853
|
-
status: "
|
|
853
|
+
status: "running" | "has_question" | "completed" | "failed" | "stopped";
|
|
854
854
|
message?: string | undefined;
|
|
855
855
|
task_id?: string | undefined;
|
|
856
856
|
timestamp?: number | undefined;
|
|
@@ -881,7 +881,7 @@ export declare const widgetStream: import("@orpc/contract").ContractProcedureBui
|
|
|
881
881
|
error: string;
|
|
882
882
|
} | {
|
|
883
883
|
type: "task/status";
|
|
884
|
-
status: "
|
|
884
|
+
status: "running" | "has_question" | "completed" | "failed" | "stopped";
|
|
885
885
|
message?: string | undefined;
|
|
886
886
|
task_id?: string | undefined;
|
|
887
887
|
timestamp?: number | undefined;
|
|
@@ -1360,7 +1360,7 @@ export declare const widgetRoutes: {
|
|
|
1360
1360
|
error: string;
|
|
1361
1361
|
} | {
|
|
1362
1362
|
type: "task/status";
|
|
1363
|
-
status: "
|
|
1363
|
+
status: "running" | "has_question" | "completed" | "failed" | "stopped";
|
|
1364
1364
|
message?: string | undefined;
|
|
1365
1365
|
task_id?: string | undefined;
|
|
1366
1366
|
timestamp?: number | undefined;
|
|
@@ -1391,7 +1391,7 @@ export declare const widgetRoutes: {
|
|
|
1391
1391
|
error: string;
|
|
1392
1392
|
} | {
|
|
1393
1393
|
type: "task/status";
|
|
1394
|
-
status: "
|
|
1394
|
+
status: "running" | "has_question" | "completed" | "failed" | "stopped";
|
|
1395
1395
|
message?: string | undefined;
|
|
1396
1396
|
task_id?: string | undefined;
|
|
1397
1397
|
timestamp?: number | undefined;
|
package/dist/src/sdk/index.d.ts
CHANGED
|
@@ -393,7 +393,7 @@ export declare const sdk: {
|
|
|
393
393
|
error: string;
|
|
394
394
|
} | {
|
|
395
395
|
type: "task/status";
|
|
396
|
-
status: "
|
|
396
|
+
status: "running" | "has_question" | "completed" | "failed" | "stopped";
|
|
397
397
|
message?: string | undefined;
|
|
398
398
|
task_id?: string | undefined;
|
|
399
399
|
timestamp?: number | undefined;
|
|
@@ -424,7 +424,7 @@ export declare const sdk: {
|
|
|
424
424
|
error: string;
|
|
425
425
|
} | {
|
|
426
426
|
type: "task/status";
|
|
427
|
-
status: "
|
|
427
|
+
status: "running" | "has_question" | "completed" | "failed" | "stopped";
|
|
428
428
|
message?: string | undefined;
|
|
429
429
|
task_id?: string | undefined;
|
|
430
430
|
timestamp?: number | undefined;
|
|
@@ -2,17 +2,11 @@ import type { MarketrixConfig, SendMessageRequest, SendMessageResponse } from '.
|
|
|
2
2
|
export declare class ApiService {
|
|
3
3
|
private config;
|
|
4
4
|
constructor(config: MarketrixConfig);
|
|
5
|
-
/**
|
|
6
|
-
* Get the current chat ID (does not create if missing)
|
|
7
|
-
*/
|
|
8
5
|
getChatId(): string | null;
|
|
9
6
|
/**
|
|
10
7
|
* Get user_id from various sources (config, localStorage, sessionStorage)
|
|
11
8
|
*/
|
|
12
9
|
private getUserId;
|
|
13
|
-
/**
|
|
14
|
-
* Log widget question to action_log
|
|
15
|
-
*/
|
|
16
10
|
logWidgetQuestion(question: string, mode: string): Promise<void>;
|
|
17
11
|
/**
|
|
18
12
|
* Send a message via the typed stream (fire-and-forget).
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fingerprint of an indexed element for validation
|
|
3
|
-
*/
|
|
4
1
|
export interface ElementFingerprint {
|
|
5
2
|
tagName: string;
|
|
6
3
|
id: string | null;
|
|
@@ -13,23 +10,14 @@ export interface ElementFingerprint {
|
|
|
13
10
|
selector: string;
|
|
14
11
|
indexVersion: number;
|
|
15
12
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Result of validating an element at a given index
|
|
18
|
-
*/
|
|
19
13
|
export interface ValidationResult {
|
|
20
14
|
isValid: boolean;
|
|
21
15
|
mismatchReason?: 'element_removed' | 'element_changed';
|
|
22
16
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Result of looking up an element by index
|
|
25
|
-
*/
|
|
26
17
|
export interface ElementLookupResult {
|
|
27
18
|
element: HTMLElement | null;
|
|
28
19
|
error?: string;
|
|
29
20
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Result of validated element lookup (includes validation info)
|
|
32
|
-
*/
|
|
33
21
|
export interface ValidatedElementResult extends ElementLookupResult {
|
|
34
22
|
validation: ValidationResult;
|
|
35
23
|
}
|
|
@@ -43,13 +31,7 @@ export declare class DomService {
|
|
|
43
31
|
private indexVersion;
|
|
44
32
|
private constructor();
|
|
45
33
|
static getInstance(): DomService;
|
|
46
|
-
/**
|
|
47
|
-
* Generate a unique CSS selector for an element
|
|
48
|
-
*/
|
|
49
34
|
private generateSelector;
|
|
50
|
-
/**
|
|
51
|
-
* Generate a fingerprint for an element to enable validation later
|
|
52
|
-
*/
|
|
53
35
|
private generateFingerprint;
|
|
54
36
|
/**
|
|
55
37
|
* Check if an element matches a stored fingerprint.
|
|
@@ -66,29 +48,14 @@ export declare class DomService {
|
|
|
66
48
|
* Always clears previous index first.
|
|
67
49
|
*/
|
|
68
50
|
indexInteractableElements(): Array<[number, Element]>;
|
|
69
|
-
/**
|
|
70
|
-
* Get element coordinates using getBoundingClientRect()
|
|
71
|
-
* Returns viewport-relative coordinates
|
|
72
|
-
*/
|
|
73
51
|
private getElementCoordinates;
|
|
74
|
-
/**
|
|
75
|
-
* Check if an element creates a stacking context
|
|
76
|
-
* Based on CSS stacking context rules
|
|
77
|
-
*/
|
|
78
52
|
private isStackingContext;
|
|
79
|
-
/**
|
|
80
|
-
* Calculate global z-order for an element
|
|
81
|
-
* Traverses up the DOM tree to identify stacking contexts and calculate z-order
|
|
82
|
-
*/
|
|
83
53
|
private calculateGlobalZOrder;
|
|
84
54
|
/**
|
|
85
55
|
* Get HTML snapshot with data-id attributes injected.
|
|
86
56
|
* This re-indexes the live DOM and then produces a corresponding HTML string.
|
|
87
57
|
*/
|
|
88
58
|
getSnapshotHtml(): string;
|
|
89
|
-
/**
|
|
90
|
-
* Get actionable elements metadata
|
|
91
|
-
*/
|
|
92
59
|
getInteractableElements(): Array<{
|
|
93
60
|
index: number;
|
|
94
61
|
fingerprint: ElementFingerprint;
|
|
@@ -8,12 +8,5 @@
|
|
|
8
8
|
* @returns Promise resolving to the MediaStream
|
|
9
9
|
*/
|
|
10
10
|
export declare function startScreenShare(): Promise<MediaStream>;
|
|
11
|
-
/**
|
|
12
|
-
* Stop screen sharing and clear the stream reference.
|
|
13
|
-
*/
|
|
14
11
|
export declare function stopScreenShare(): void;
|
|
15
|
-
/**
|
|
16
|
-
* Check if screensharing is currently active.
|
|
17
|
-
* @returns True if screensharing is active, false otherwise
|
|
18
|
-
*/
|
|
19
12
|
export declare function isScreenSharing(): boolean;
|
|
@@ -9,13 +9,7 @@ declare class SessionManager {
|
|
|
9
9
|
private chatId;
|
|
10
10
|
private initializationPromise;
|
|
11
11
|
private constructor();
|
|
12
|
-
/**
|
|
13
|
-
* Get singleton instance
|
|
14
|
-
*/
|
|
15
12
|
static getInstance(): SessionManager;
|
|
16
|
-
/**
|
|
17
|
-
* Get current chat ID without creating a new one
|
|
18
|
-
*/
|
|
19
13
|
getChatId(): string | null;
|
|
20
14
|
/**
|
|
21
15
|
* Get or create chat ID with promise-based locking
|
|
@@ -17,13 +17,7 @@ export declare class SessionRecorder {
|
|
|
17
17
|
private consecutiveFailures;
|
|
18
18
|
private isFlushing;
|
|
19
19
|
constructor(chatId: string, applicationId: number);
|
|
20
|
-
/**
|
|
21
|
-
* Send rrweb/metadata command via POST
|
|
22
|
-
*/
|
|
23
20
|
private sendMetadata;
|
|
24
|
-
/**
|
|
25
|
-
* Buffer an event and trigger flush if thresholds are met
|
|
26
|
-
*/
|
|
27
21
|
private bufferEvent;
|
|
28
22
|
/**
|
|
29
23
|
* Flush buffered events via POST.
|
|
@@ -44,16 +38,7 @@ export declare class SessionRecorder {
|
|
|
44
38
|
* Internal start implementation. Checks stopRequested at each async boundary.
|
|
45
39
|
*/
|
|
46
40
|
private doStart;
|
|
47
|
-
/**
|
|
48
|
-
* Stop recording session. Flushes remaining events before stopping.
|
|
49
|
-
*/
|
|
50
41
|
stop(): void;
|
|
51
|
-
/**
|
|
52
|
-
* Get current session ID
|
|
53
|
-
*/
|
|
54
42
|
getSessionId(): string;
|
|
55
|
-
/**
|
|
56
|
-
* Check if recording is active
|
|
57
|
-
*/
|
|
58
43
|
isActive(): boolean;
|
|
59
44
|
}
|
|
@@ -22,9 +22,6 @@ import type { ChatMessage, InstructionType, MarketrixConfig } from '../types';
|
|
|
22
22
|
type StoredMessage = Omit<ChatMessage, 'videoStream' | 'timestamp'> & {
|
|
23
23
|
timestamp: string;
|
|
24
24
|
};
|
|
25
|
-
/**
|
|
26
|
-
* Unified storage structure for all widget data
|
|
27
|
-
*/
|
|
28
25
|
export interface MarketrixChatContext {
|
|
29
26
|
chat_id: string | null;
|
|
30
27
|
messages: StoredMessage[];
|
|
@@ -48,25 +45,10 @@ declare class StorageService {
|
|
|
48
45
|
private context;
|
|
49
46
|
private constructor();
|
|
50
47
|
static getInstance(): StorageService;
|
|
51
|
-
/**
|
|
52
|
-
* Load context from localStorage
|
|
53
|
-
*/
|
|
54
48
|
private loadContext;
|
|
55
|
-
/**
|
|
56
|
-
* Save context to localStorage
|
|
57
|
-
*/
|
|
58
49
|
private saveContext;
|
|
59
|
-
/**
|
|
60
|
-
* Get the full context
|
|
61
|
-
*/
|
|
62
50
|
getContext(): MarketrixChatContext;
|
|
63
|
-
/**
|
|
64
|
-
* Update context with partial data
|
|
65
|
-
*/
|
|
66
51
|
updateContext(updates: Partial<MarketrixChatContext>): void;
|
|
67
|
-
/**
|
|
68
|
-
* Check if a string is a valid chat_id
|
|
69
|
-
*/
|
|
70
52
|
private isValidChatId;
|
|
71
53
|
/**
|
|
72
54
|
* Get chat_id with window.name fallback for cross-page navigation
|
|
@@ -85,9 +67,6 @@ declare class StorageService {
|
|
|
85
67
|
getConfig(): MarketrixConfig | null;
|
|
86
68
|
setConfig(config: MarketrixConfig | null): void;
|
|
87
69
|
clear(): void;
|
|
88
|
-
/**
|
|
89
|
-
* Check if context exists and has a valid chat_id
|
|
90
|
-
*/
|
|
91
70
|
hasValidContext(): boolean;
|
|
92
71
|
}
|
|
93
72
|
export declare const storageService: StorageService;
|