@helpai/elements 0.59.1 → 0.59.2
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/elements-web-component.esm.js +6 -6
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +6 -6
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +6 -6
- package/elements.esm.js.map +3 -3
- package/elements.js +8 -8
- package/elements.js.map +3 -3
- package/index.d.ts +1 -1
- package/index.mjs +9 -2
- package/package.json +1 -1
- package/schema.d.ts +26 -26
- package/web-component.mjs +9 -2
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, H as HandshakeResponse, L as Link, S as ServerConfig, b as SiteConfig, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, H as HandshakeResponse, L as Link, S as ServerConfig, b as SiteConfig, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial } from './deployment-BAOjO2dQ.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
package/index.mjs
CHANGED
|
@@ -29,7 +29,7 @@ var BRAND = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// src/core/version.ts
|
|
32
|
-
var ELEMENTS_VERSION = true ? "0.59.
|
|
32
|
+
var ELEMENTS_VERSION = true ? "0.59.2" : "0.0.0-dev";
|
|
33
33
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
34
34
|
|
|
35
35
|
// src/i18n/strings.ts
|
|
@@ -2242,6 +2242,7 @@ function messageToWireParts(m) {
|
|
|
2242
2242
|
var log6 = logger.scope("transport");
|
|
2243
2243
|
var MAX_RESUME_ATTEMPTS = 3;
|
|
2244
2244
|
var RESUME_BACKOFF_MS = 400;
|
|
2245
|
+
var POST_FINISH_DRAIN_MS = 5e3;
|
|
2245
2246
|
var CONTENT_CACHE_TTL_MS = 6e4;
|
|
2246
2247
|
var CONVERSATIONS_CACHE_TTL_MS = 1e4;
|
|
2247
2248
|
var MAX_REQUEST_RETRIES = 3;
|
|
@@ -2755,6 +2756,7 @@ var AgentTransport = class {
|
|
|
2755
2756
|
*/
|
|
2756
2757
|
async *drain(source, seenIds, ctrl) {
|
|
2757
2758
|
let terminal = false;
|
|
2759
|
+
let watchdog;
|
|
2758
2760
|
try {
|
|
2759
2761
|
for await (const evt of source) {
|
|
2760
2762
|
if (ctrl.signal.aborted) return true;
|
|
@@ -2763,12 +2765,17 @@ var AgentTransport = class {
|
|
|
2763
2765
|
seenIds.add(evt.eventId);
|
|
2764
2766
|
}
|
|
2765
2767
|
yield evt;
|
|
2766
|
-
if (evt.chunk.type === "finish" || evt.chunk.type === "error")
|
|
2768
|
+
if (evt.chunk.type === "finish" || evt.chunk.type === "error") {
|
|
2769
|
+
terminal = true;
|
|
2770
|
+
watchdog ?? (watchdog = setTimeout(() => ctrl.abort(), POST_FINISH_DRAIN_MS));
|
|
2771
|
+
}
|
|
2767
2772
|
}
|
|
2768
2773
|
} catch (err) {
|
|
2769
2774
|
if (ctrl.signal.aborted) return true;
|
|
2770
2775
|
if (err instanceof StreamError && err.status !== void 0) throw err;
|
|
2771
2776
|
log6.debug("stream segment dropped", { err });
|
|
2777
|
+
} finally {
|
|
2778
|
+
if (watchdog) clearTimeout(watchdog);
|
|
2772
2779
|
}
|
|
2773
2780
|
return terminal;
|
|
2774
2781
|
}
|
package/package.json
CHANGED
package/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, H as HandshakeResponse, L as Link, P as PAGE_AREA_SUGGESTIONS, f as PageContext, S as ServerConfig, b as SiteConfig, U as UserContext, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial, g as assetSchema, h as blocksConfigSchema, i as connectionConfigPartialSchema, j as connectionConfigSchema, k as cssColorSchema, l as cssLengthSchema, m as endpointsSchema, n as handshakeResponseSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, u as userContextSchema, t as uuid7Schema, w as widgetConfigPartialSchema, v as widgetConfigSchema, x as widgetSettingsPartialSchema, y as widgetSettingsSchema } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, H as HandshakeResponse, L as Link, P as PAGE_AREA_SUGGESTIONS, f as PageContext, S as ServerConfig, b as SiteConfig, U as UserContext, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial, g as assetSchema, h as blocksConfigSchema, i as connectionConfigPartialSchema, j as connectionConfigSchema, k as cssColorSchema, l as cssLengthSchema, m as endpointsSchema, n as handshakeResponseSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, u as userContextSchema, t as uuid7Schema, w as widgetConfigPartialSchema, v as widgetConfigSchema, x as widgetSettingsPartialSchema, y as widgetSettingsSchema } from './deployment-BAOjO2dQ.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -56,9 +56,9 @@ declare const presentationSchema: z.ZodObject<{
|
|
|
56
56
|
inset: z.ZodOptional<z.ZodString>;
|
|
57
57
|
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
58
58
|
fullscreen: "fullscreen";
|
|
59
|
+
normal: "normal";
|
|
59
60
|
expanded: "expanded";
|
|
60
61
|
auto: "auto";
|
|
61
|
-
normal: "normal";
|
|
62
62
|
}>>;
|
|
63
63
|
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
64
64
|
}, z.core.$loose>>;
|
|
@@ -242,9 +242,9 @@ type LauncherOptions = z.infer<typeof launcherOptionsSchema>;
|
|
|
242
242
|
|
|
243
243
|
declare const initialSizeSchema: z.ZodEnum<{
|
|
244
244
|
fullscreen: "fullscreen";
|
|
245
|
+
normal: "normal";
|
|
245
246
|
expanded: "expanded";
|
|
246
247
|
auto: "auto";
|
|
247
|
-
normal: "normal";
|
|
248
248
|
}>;
|
|
249
249
|
declare const resizeOptionsSchema: z.ZodObject<{
|
|
250
250
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -271,9 +271,9 @@ declare const sizeOptionsSchema: z.ZodObject<{
|
|
|
271
271
|
inset: z.ZodOptional<z.ZodString>;
|
|
272
272
|
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
273
273
|
fullscreen: "fullscreen";
|
|
274
|
+
normal: "normal";
|
|
274
275
|
expanded: "expanded";
|
|
275
276
|
auto: "auto";
|
|
276
|
-
normal: "normal";
|
|
277
277
|
}>>;
|
|
278
278
|
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
279
279
|
}, z.core.$loose>;
|
|
@@ -325,40 +325,40 @@ type FeatureFlags = z.infer<typeof featureFlagsSchema>;
|
|
|
325
325
|
*/
|
|
326
326
|
|
|
327
327
|
declare const actionNameSchema: z.ZodEnum<{
|
|
328
|
-
close: "close";
|
|
329
328
|
expand: "expand";
|
|
330
329
|
fullscreen: "fullscreen";
|
|
331
|
-
|
|
332
|
-
theme: "theme";
|
|
330
|
+
close: "close";
|
|
333
331
|
language: "language";
|
|
332
|
+
theme: "theme";
|
|
334
333
|
textSize: "textSize";
|
|
335
334
|
history: "history";
|
|
335
|
+
clear: "clear";
|
|
336
336
|
sound: "sound";
|
|
337
337
|
}>;
|
|
338
338
|
type ActionName = z.infer<typeof actionNameSchema>;
|
|
339
339
|
declare const headerActionsSchema: z.ZodArray<z.ZodEnum<{
|
|
340
|
-
close: "close";
|
|
341
340
|
expand: "expand";
|
|
342
341
|
fullscreen: "fullscreen";
|
|
343
|
-
|
|
344
|
-
theme: "theme";
|
|
342
|
+
close: "close";
|
|
345
343
|
language: "language";
|
|
344
|
+
theme: "theme";
|
|
346
345
|
textSize: "textSize";
|
|
347
346
|
history: "history";
|
|
347
|
+
clear: "clear";
|
|
348
348
|
sound: "sound";
|
|
349
349
|
}>>;
|
|
350
350
|
type HeaderActions = z.infer<typeof headerActionsSchema>;
|
|
351
351
|
/** Section wrapper — `actions` list wrapped under `header` in the dashboard form. */
|
|
352
352
|
declare const headerSchema: z.ZodObject<{
|
|
353
353
|
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
354
|
-
close: "close";
|
|
355
354
|
expand: "expand";
|
|
356
355
|
fullscreen: "fullscreen";
|
|
357
|
-
|
|
358
|
-
theme: "theme";
|
|
356
|
+
close: "close";
|
|
359
357
|
language: "language";
|
|
358
|
+
theme: "theme";
|
|
360
359
|
textSize: "textSize";
|
|
361
360
|
history: "history";
|
|
361
|
+
clear: "clear";
|
|
362
362
|
sound: "sound";
|
|
363
363
|
}>>>;
|
|
364
364
|
}, z.core.$loose>;
|
|
@@ -374,33 +374,33 @@ type HeaderOptions = z.infer<typeof headerSchema>;
|
|
|
374
374
|
*/
|
|
375
375
|
|
|
376
376
|
declare const feedbackEventSchema: z.ZodEnum<{
|
|
377
|
-
voiceStart: "voiceStart";
|
|
378
|
-
voiceStop: "voiceStop";
|
|
379
377
|
error: "error";
|
|
380
378
|
messageReceived: "messageReceived";
|
|
381
379
|
messageSent: "messageSent";
|
|
380
|
+
voiceStart: "voiceStart";
|
|
381
|
+
voiceStop: "voiceStop";
|
|
382
382
|
}>;
|
|
383
383
|
type FeedbackEvent = z.infer<typeof feedbackEventSchema>;
|
|
384
384
|
declare const soundOptionsSchema: z.ZodObject<{
|
|
385
385
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
386
386
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
387
387
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
388
|
-
voiceStart: "voiceStart";
|
|
389
|
-
voiceStop: "voiceStop";
|
|
390
388
|
error: "error";
|
|
391
389
|
messageReceived: "messageReceived";
|
|
392
390
|
messageSent: "messageSent";
|
|
391
|
+
voiceStart: "voiceStart";
|
|
392
|
+
voiceStop: "voiceStop";
|
|
393
393
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
394
394
|
}, z.core.$loose>;
|
|
395
395
|
type SoundOptions = z.infer<typeof soundOptionsSchema>;
|
|
396
396
|
declare const hapticsOptionsSchema: z.ZodObject<{
|
|
397
397
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
398
398
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
399
|
-
voiceStart: "voiceStart";
|
|
400
|
-
voiceStop: "voiceStop";
|
|
401
399
|
error: "error";
|
|
402
400
|
messageReceived: "messageReceived";
|
|
403
401
|
messageSent: "messageSent";
|
|
402
|
+
voiceStart: "voiceStart";
|
|
403
|
+
voiceStop: "voiceStop";
|
|
404
404
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
405
405
|
}, z.core.$loose>;
|
|
406
406
|
type HapticsOptions = z.infer<typeof hapticsOptionsSchema>;
|
|
@@ -409,21 +409,21 @@ declare const feedbackSchema: z.ZodObject<{
|
|
|
409
409
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
410
410
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
411
411
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
412
|
-
voiceStart: "voiceStart";
|
|
413
|
-
voiceStop: "voiceStop";
|
|
414
412
|
error: "error";
|
|
415
413
|
messageReceived: "messageReceived";
|
|
416
414
|
messageSent: "messageSent";
|
|
415
|
+
voiceStart: "voiceStart";
|
|
416
|
+
voiceStop: "voiceStop";
|
|
417
417
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
418
418
|
}, z.core.$loose>>;
|
|
419
419
|
haptics: z.ZodOptional<z.ZodObject<{
|
|
420
420
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
421
421
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
422
|
-
voiceStart: "voiceStart";
|
|
423
|
-
voiceStop: "voiceStop";
|
|
424
422
|
error: "error";
|
|
425
423
|
messageReceived: "messageReceived";
|
|
426
424
|
messageSent: "messageSent";
|
|
425
|
+
voiceStart: "voiceStart";
|
|
426
|
+
voiceStop: "voiceStop";
|
|
427
427
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
428
428
|
}, z.core.$loose>>;
|
|
429
429
|
}, z.core.$loose>;
|
|
@@ -858,18 +858,18 @@ type I18nOptions = z.infer<typeof i18nSchema>;
|
|
|
858
858
|
*/
|
|
859
859
|
|
|
860
860
|
declare const moduleLayoutSchema: z.ZodEnum<{
|
|
861
|
-
home: "home";
|
|
862
861
|
chat: "chat";
|
|
863
862
|
help: "help";
|
|
863
|
+
home: "home";
|
|
864
864
|
news: "news";
|
|
865
865
|
}>;
|
|
866
866
|
type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
|
|
867
867
|
declare const moduleSchema: z.ZodObject<{
|
|
868
868
|
label: z.ZodString;
|
|
869
869
|
layout: z.ZodEnum<{
|
|
870
|
-
home: "home";
|
|
871
870
|
chat: "chat";
|
|
872
871
|
help: "help";
|
|
872
|
+
home: "home";
|
|
873
873
|
news: "news";
|
|
874
874
|
}>;
|
|
875
875
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -895,9 +895,9 @@ type ModuleOptions = z.infer<typeof moduleSchema>;
|
|
|
895
895
|
declare const modulesSchema: z.ZodArray<z.ZodObject<{
|
|
896
896
|
label: z.ZodString;
|
|
897
897
|
layout: z.ZodEnum<{
|
|
898
|
-
home: "home";
|
|
899
898
|
chat: "chat";
|
|
900
899
|
help: "help";
|
|
900
|
+
home: "home";
|
|
901
901
|
news: "news";
|
|
902
902
|
}>;
|
|
903
903
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
package/web-component.mjs
CHANGED
|
@@ -1934,7 +1934,7 @@ function createAuth(opts) {
|
|
|
1934
1934
|
}
|
|
1935
1935
|
|
|
1936
1936
|
// src/core/version.ts
|
|
1937
|
-
var ELEMENTS_VERSION = true ? "0.59.
|
|
1937
|
+
var ELEMENTS_VERSION = true ? "0.59.2" : "0.0.0-dev";
|
|
1938
1938
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
1939
1939
|
|
|
1940
1940
|
// src/stream/types.ts
|
|
@@ -2201,6 +2201,7 @@ function messageToWireParts(m) {
|
|
|
2201
2201
|
var log5 = logger.scope("transport");
|
|
2202
2202
|
var MAX_RESUME_ATTEMPTS = 3;
|
|
2203
2203
|
var RESUME_BACKOFF_MS = 400;
|
|
2204
|
+
var POST_FINISH_DRAIN_MS = 5e3;
|
|
2204
2205
|
var CONTENT_CACHE_TTL_MS = 6e4;
|
|
2205
2206
|
var CONVERSATIONS_CACHE_TTL_MS = 1e4;
|
|
2206
2207
|
var MAX_REQUEST_RETRIES = 3;
|
|
@@ -2714,6 +2715,7 @@ var AgentTransport = class {
|
|
|
2714
2715
|
*/
|
|
2715
2716
|
async *drain(source, seenIds, ctrl) {
|
|
2716
2717
|
let terminal = false;
|
|
2718
|
+
let watchdog;
|
|
2717
2719
|
try {
|
|
2718
2720
|
for await (const evt of source) {
|
|
2719
2721
|
if (ctrl.signal.aborted) return true;
|
|
@@ -2722,12 +2724,17 @@ var AgentTransport = class {
|
|
|
2722
2724
|
seenIds.add(evt.eventId);
|
|
2723
2725
|
}
|
|
2724
2726
|
yield evt;
|
|
2725
|
-
if (evt.chunk.type === "finish" || evt.chunk.type === "error")
|
|
2727
|
+
if (evt.chunk.type === "finish" || evt.chunk.type === "error") {
|
|
2728
|
+
terminal = true;
|
|
2729
|
+
watchdog ?? (watchdog = setTimeout(() => ctrl.abort(), POST_FINISH_DRAIN_MS));
|
|
2730
|
+
}
|
|
2726
2731
|
}
|
|
2727
2732
|
} catch (err) {
|
|
2728
2733
|
if (ctrl.signal.aborted) return true;
|
|
2729
2734
|
if (err instanceof StreamError && err.status !== void 0) throw err;
|
|
2730
2735
|
log5.debug("stream segment dropped", { err });
|
|
2736
|
+
} finally {
|
|
2737
|
+
if (watchdog) clearTimeout(watchdog);
|
|
2731
2738
|
}
|
|
2732
2739
|
return terminal;
|
|
2733
2740
|
}
|