@helpai/elements 0.59.1 → 0.59.3

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/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-Daefe1g1.js';
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-Crtq-vQg.js';
2
2
  import 'zod';
3
3
 
4
4
  /**
@@ -319,7 +319,7 @@ interface FeatureFlags {
319
319
  * approve/reject controls for gated tools. Default `true`. Set `false` to
320
320
  * suppress them (the wire still carries the signals; they just won't show).
321
321
  */
322
- humanInLoop?: boolean;
322
+ disableHumanInLoop?: boolean;
323
323
  }
324
324
  /**
325
325
  * Client-side attachment limits. Server enforcement is still required —
@@ -697,11 +697,11 @@ interface ModuleStatus {
697
697
  */
698
698
  interface HomeConfig {
699
699
  brandName?: string;
700
- showGreeting?: boolean;
700
+ hideGreeting?: boolean;
701
701
  greetingText?: string;
702
702
  userAvatars?: ModuleAvatar[];
703
- showSearchBar?: boolean;
704
- showRecentConversations?: boolean;
703
+ hideSearchBar?: boolean;
704
+ hideRecentConversations?: boolean;
705
705
  status?: ModuleStatus;
706
706
  contentBlockTitle?: string;
707
707
  }
@@ -849,8 +849,8 @@ interface BehaviorOptions {
849
849
  showSources?: boolean;
850
850
  /** Fade the message list at its scroll edges (gradient mask). Default `true`. */
851
851
  scrollFade?: boolean;
852
- /** Show 👍/👎 feedback controls on assistant replies. Default `true`. */
853
- enableMessageFeedback?: boolean;
852
+ /** Turn OFF the 👍/👎 feedback controls on assistant replies. Unset/`false` = shown (default). */
853
+ disableMessageFeedback?: boolean;
854
854
  }
855
855
  /**
856
856
  * Section: panel header actions — the enabled set (`history`/`close` buttons +
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.1" : "0.0.0-dev";
32
+ var ELEMENTS_VERSION = true ? "0.59.3" : "0.0.0-dev";
33
33
  var ELEMENTS_VERSION_PARAM = "_ev";
34
34
 
35
35
  // src/i18n/strings.ts
@@ -1031,7 +1031,7 @@ var DEFAULT_ATTACHMENTS = {
1031
1031
  var DEFAULT_FEATURES = {
1032
1032
  files: true,
1033
1033
  voice: "local",
1034
- humanInLoop: true
1034
+ disableHumanInLoop: false
1035
1035
  };
1036
1036
  var DEFAULT_FORMS = { list: [], byTrigger: {} };
1037
1037
  var DEFAULT_TRACKING = {
@@ -1068,7 +1068,6 @@ var DEFAULT_HAPTICS = {
1068
1068
  events: void 0
1069
1069
  };
1070
1070
  var DEFAULT_MODULES = [{ label: "tabConversations", layout: "chat" }];
1071
- var DEFAULT_HOME_MODULE = { showSearchBar: true };
1072
1071
 
1073
1072
  // src/core/config/resolve.ts
1074
1073
  function resolveOptions(rawOpts) {
@@ -1108,11 +1107,11 @@ function resolveOptions(rawOpts) {
1108
1107
  showToolCalls: behavior.showToolCalls ?? false,
1109
1108
  showSources: behavior.showSources ?? false,
1110
1109
  scrollFade: behavior.scrollFade ?? true,
1111
- enableMessageFeedback: behavior.enableMessageFeedback ?? true,
1110
+ enableMessageFeedback: !(behavior.disableMessageFeedback ?? false),
1112
1111
  features: {
1113
1112
  files: opts.features?.files ?? DEFAULT_FEATURES.files,
1114
1113
  voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
1115
- humanInLoop: opts.features?.humanInLoop ?? DEFAULT_FEATURES.humanInLoop,
1114
+ disableHumanInLoop: opts.features?.disableHumanInLoop ?? false,
1116
1115
  tools: opts.features?.tools
1117
1116
  },
1118
1117
  forms: resolveForms(opts.forms, locale),
@@ -1226,9 +1225,9 @@ function resolveModules(overrides) {
1226
1225
  if (m.layout === "home") {
1227
1226
  resolved.brandName = m.brandName;
1228
1227
  resolved.greetingText = m.greetingText;
1229
- resolved.showGreeting = m.showGreeting ?? true;
1230
- resolved.showSearchBar = m.showSearchBar ?? DEFAULT_HOME_MODULE.showSearchBar;
1231
- resolved.showRecentConversations = m.showRecentConversations ?? true;
1228
+ resolved.hideGreeting = m.hideGreeting ?? false;
1229
+ resolved.hideSearchBar = m.hideSearchBar ?? false;
1230
+ resolved.hideRecentConversations = m.hideRecentConversations ?? false;
1232
1231
  if (m.userAvatars && m.userAvatars.length > 0) resolved.userAvatars = m.userAvatars;
1233
1232
  if (m.status) resolved.status = m.status;
1234
1233
  resolved.contentBlockTitle = m.contentBlockTitle;
@@ -1438,7 +1437,7 @@ var BEHAVIOR_ATTRS = [
1438
1437
  ["show-tool-calls", "showToolCalls", boolAttr],
1439
1438
  ["show-sources", "showSources", boolAttr],
1440
1439
  ["scroll-fade", "scrollFade", boolAttr],
1441
- ["enable-message-feedback", "enableMessageFeedback", boolAttr]
1440
+ ["disable-message-feedback", "disableMessageFeedback", boolAttr]
1442
1441
  ];
1443
1442
  var I18N_ATTRS = [["locale", "locale"]];
1444
1443
  var ACTION_NAMES = new Set(ACTION_NAME_LITERALS);
@@ -2242,6 +2241,7 @@ function messageToWireParts(m) {
2242
2241
  var log6 = logger.scope("transport");
2243
2242
  var MAX_RESUME_ATTEMPTS = 3;
2244
2243
  var RESUME_BACKOFF_MS = 400;
2244
+ var POST_FINISH_DRAIN_MS = 5e3;
2245
2245
  var CONTENT_CACHE_TTL_MS = 6e4;
2246
2246
  var CONVERSATIONS_CACHE_TTL_MS = 1e4;
2247
2247
  var MAX_REQUEST_RETRIES = 3;
@@ -2755,6 +2755,7 @@ var AgentTransport = class {
2755
2755
  */
2756
2756
  async *drain(source, seenIds, ctrl) {
2757
2757
  let terminal = false;
2758
+ let watchdog;
2758
2759
  try {
2759
2760
  for await (const evt of source) {
2760
2761
  if (ctrl.signal.aborted) return true;
@@ -2763,12 +2764,17 @@ var AgentTransport = class {
2763
2764
  seenIds.add(evt.eventId);
2764
2765
  }
2765
2766
  yield evt;
2766
- if (evt.chunk.type === "finish" || evt.chunk.type === "error") terminal = true;
2767
+ if (evt.chunk.type === "finish" || evt.chunk.type === "error") {
2768
+ terminal = true;
2769
+ watchdog ?? (watchdog = setTimeout(() => ctrl.abort(), POST_FINISH_DRAIN_MS));
2770
+ }
2767
2771
  }
2768
2772
  } catch (err) {
2769
2773
  if (ctrl.signal.aborted) return true;
2770
2774
  if (err instanceof StreamError && err.status !== void 0) throw err;
2771
2775
  log6.debug("stream segment dropped", { err });
2776
+ } finally {
2777
+ if (watchdog) clearTimeout(watchdog);
2772
2778
  }
2773
2779
  return terminal;
2774
2780
  }
@@ -7594,13 +7600,13 @@ function HomeRoot(props2) {
7594
7600
  const [content, setContent] = useState12([]);
7595
7601
  const tagsKey = config.contentTags?.join(",");
7596
7602
  useEffect11(() => {
7597
- if (!config.showRecentConversations) return;
7603
+ if (config.hideRecentConversations) return;
7598
7604
  let cancelled = false;
7599
7605
  transport.listConversations({ limit: 1 }).then((res) => !cancelled && setRecent(res.conversations?.[0] ?? null)).catch((err) => !cancelled && log14.warn("listConversations (home) failed", { err }));
7600
7606
  return () => {
7601
7607
  cancelled = true;
7602
7608
  };
7603
- }, [transport, config.showRecentConversations]);
7609
+ }, [transport, config.hideRecentConversations]);
7604
7610
  useEffect11(() => {
7605
7611
  if (!config.contentTags?.length) return;
7606
7612
  let cancelled = false;
@@ -7628,13 +7634,13 @@ function HomeRoot(props2) {
7628
7634
  /* @__PURE__ */ jsx32(HeaderActions, { panelProps, variant: "plain" })
7629
7635
  ] })
7630
7636
  ] }),
7631
- config.showGreeting !== false ? /* @__PURE__ */ jsxs26(Fragment7, { children: [
7637
+ !config.hideGreeting ? /* @__PURE__ */ jsxs26(Fragment7, { children: [
7632
7638
  /* @__PURE__ */ jsx32("h1", { class: `${p28}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
7633
7639
  greeting.subtitle ? /* @__PURE__ */ jsx32("p", { class: `${p28}-home-lead`, children: greeting.subtitle }) : null
7634
7640
  ] }) : null
7635
7641
  ] }),
7636
7642
  /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
7637
- config.showSearchBar !== false ? /* @__PURE__ */ jsx32(
7643
+ !config.hideSearchBar ? /* @__PURE__ */ jsx32(
7638
7644
  HomeSearchButton,
7639
7645
  {
7640
7646
  placeholder: strings.homeSearchPlaceholder,
@@ -8787,12 +8793,12 @@ function App({ options, hostElement, bus }) {
8787
8793
  );
8788
8794
  const toolInteraction = useMemo3(
8789
8795
  () => ({
8790
- humanInLoop: options.features.humanInLoop,
8796
+ humanInLoop: !options.features.disableHumanInLoop,
8791
8797
  onResult: handleToolResult,
8792
8798
  onDecision: handleToolDecision,
8793
8799
  onEdit: handleToolEdit
8794
8800
  }),
8795
- [options.features.humanInLoop, handleToolResult, handleToolDecision, handleToolEdit]
8801
+ [options.features.disableHumanInLoop, handleToolResult, handleToolDecision, handleToolEdit]
8796
8802
  );
8797
8803
  const userMessageCount = () => messagesSig.value.reduce((n, m) => n + (m.role === "user" ? 1 : 0), 0);
8798
8804
  const effectiveForms = options.forms.list.length > 0 ? options.forms : remoteForms ?? options.forms;
package/package.json CHANGED
@@ -80,5 +80,5 @@
80
80
  ],
81
81
  "type": "module",
82
82
  "types": "./index.d.ts",
83
- "version": "0.59.1"
83
+ "version": "0.59.3"
84
84
  }
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-Daefe1g1.js';
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-Crtq-vQg.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /**
@@ -85,7 +85,7 @@ declare const behaviorSchema: z.ZodObject<{
85
85
  showToolCalls: z.ZodDefault<z.ZodBoolean>;
86
86
  showSources: z.ZodDefault<z.ZodBoolean>;
87
87
  scrollFade: z.ZodDefault<z.ZodBoolean>;
88
- enableMessageFeedback: z.ZodDefault<z.ZodBoolean>;
88
+ disableMessageFeedback: z.ZodDefault<z.ZodBoolean>;
89
89
  }, z.core.$loose>;
90
90
  type Behavior = z.infer<typeof behaviorSchema>;
91
91
 
@@ -308,7 +308,7 @@ declare const featureFlagsSchema: z.ZodObject<{
308
308
  code: z.ZodString;
309
309
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
310
310
  }, z.core.$loose>]>>>;
311
- humanInLoop: z.ZodDefault<z.ZodBoolean>;
311
+ disableHumanInLoop: z.ZodDefault<z.ZodBoolean>;
312
312
  }, z.core.$loose>;
313
313
  type FeatureFlags = z.infer<typeof featureFlagsSchema>;
314
314
 
@@ -875,15 +875,15 @@ declare const moduleSchema: z.ZodObject<{
875
875
  contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
876
876
  id: z.ZodOptional<z.ZodString>;
877
877
  brandName: z.ZodOptional<z.ZodString>;
878
- showGreeting: z.ZodOptional<z.ZodBoolean>;
878
+ hideGreeting: z.ZodOptional<z.ZodBoolean>;
879
879
  greetingText: z.ZodOptional<z.ZodString>;
880
880
  userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
881
881
  name: z.ZodString;
882
882
  avatar: z.ZodOptional<z.ZodString>;
883
883
  role: z.ZodOptional<z.ZodString>;
884
884
  }, z.core.$loose>>>;
885
- showSearchBar: z.ZodOptional<z.ZodBoolean>;
886
- showRecentConversations: z.ZodOptional<z.ZodBoolean>;
885
+ hideSearchBar: z.ZodOptional<z.ZodBoolean>;
886
+ hideRecentConversations: z.ZodOptional<z.ZodBoolean>;
887
887
  status: z.ZodOptional<z.ZodObject<{
888
888
  text: z.ZodOptional<z.ZodString>;
889
889
  level: z.ZodOptional<z.ZodString>;
@@ -903,15 +903,15 @@ declare const modulesSchema: z.ZodArray<z.ZodObject<{
903
903
  contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
904
904
  id: z.ZodOptional<z.ZodString>;
905
905
  brandName: z.ZodOptional<z.ZodString>;
906
- showGreeting: z.ZodOptional<z.ZodBoolean>;
906
+ hideGreeting: z.ZodOptional<z.ZodBoolean>;
907
907
  greetingText: z.ZodOptional<z.ZodString>;
908
908
  userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
909
909
  name: z.ZodString;
910
910
  avatar: z.ZodOptional<z.ZodString>;
911
911
  role: z.ZodOptional<z.ZodString>;
912
912
  }, z.core.$loose>>>;
913
- showSearchBar: z.ZodOptional<z.ZodBoolean>;
914
- showRecentConversations: z.ZodOptional<z.ZodBoolean>;
913
+ hideSearchBar: z.ZodOptional<z.ZodBoolean>;
914
+ hideRecentConversations: z.ZodOptional<z.ZodBoolean>;
915
915
  status: z.ZodOptional<z.ZodObject<{
916
916
  text: z.ZodOptional<z.ZodString>;
917
917
  level: z.ZodOptional<z.ZodString>;
package/schema.json CHANGED
@@ -490,9 +490,9 @@
490
490
  "description": "Fade the message list at its scroll edges with a soft gradient mask (the fade lifts at the very top/bottom). `true` (default) enables it; `false` shows hard edges.",
491
491
  "type": "boolean"
492
492
  },
493
- "enableMessageFeedback": {
494
- "default": true,
495
- "description": "Show 👍/👎 feedback controls under each assistant reply. `true` (default) shows them. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`.",
493
+ "disableMessageFeedback": {
494
+ "default": false,
495
+ "description": "Turn OFF the 👍/👎 feedback controls under each assistant reply. Unset/`false` = shown (default), `true` = hidden. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`.",
496
496
  "type": "boolean"
497
497
  }
498
498
  },
@@ -503,7 +503,7 @@
503
503
  "showToolCalls",
504
504
  "showSources",
505
505
  "scrollFade",
506
- "enableMessageFeedback"
506
+ "disableMessageFeedback"
507
507
  ],
508
508
  "additionalProperties": {},
509
509
  "description": "Conversation behaviour — lifecycle, streaming, and the transcript surface (scroll, feedback).",
@@ -516,7 +516,7 @@
516
516
  "startMinimized": false,
517
517
  "responseMode": "buffered",
518
518
  "scrollFade": false,
519
- "enableMessageFeedback": false
519
+ "disableMessageFeedback": true
520
520
  }
521
521
  ]
522
522
  },
@@ -1309,16 +1309,16 @@
1309
1309
  ]
1310
1310
  }
1311
1311
  },
1312
- "humanInLoop": {
1313
- "default": true,
1314
- "description": "Render human-in-the-loop tool UI — the inline ask-questions form + approve/reject controls for gated tools. `true` (default) shows them; `false` suppresses the UI (the wire still carries the signals).",
1312
+ "disableHumanInLoop": {
1313
+ "default": false,
1314
+ "description": "Turn OFF the human-in-the-loop tool UI — the inline ask-questions form + approve/reject controls for gated tools. Unset/`false` = shown (default), `true` = suppressed (the wire still carries the signals).",
1315
1315
  "type": "boolean"
1316
1316
  }
1317
1317
  },
1318
1318
  "required": [
1319
1319
  "files",
1320
1320
  "voice",
1321
- "humanInLoop"
1321
+ "disableHumanInLoop"
1322
1322
  ],
1323
1323
  "additionalProperties": {},
1324
1324
  "description": "Capability flags — file upload, voice mode, and the tools the assistant may invoke.",
@@ -1841,8 +1841,8 @@
1841
1841
  "type": "string",
1842
1842
  "maxLength": 80
1843
1843
  },
1844
- "showGreeting": {
1845
- "description": "`home` — show the greeting hero (default true).",
1844
+ "hideGreeting": {
1845
+ "description": "`home` — hide the greeting hero. Unset/`false` = shown (default), `true` = hidden.",
1846
1846
  "type": "boolean"
1847
1847
  },
1848
1848
  "greetingText": {
@@ -1878,12 +1878,12 @@
1878
1878
  "additionalProperties": {}
1879
1879
  }
1880
1880
  },
1881
- "showSearchBar": {
1882
- "description": "`home` — show the 'Search for help' bar (default true).",
1881
+ "hideSearchBar": {
1882
+ "description": "`home` — hide the 'Search for help' bar. Unset/`false` = shown (default), `true` = hidden.",
1883
1883
  "type": "boolean"
1884
1884
  },
1885
- "showRecentConversations": {
1886
- "description": "`home` — show the visitor's most recent conversation card (default true).",
1885
+ "hideRecentConversations": {
1886
+ "description": "`home` — hide the visitor's most recent conversation card. Unset/`false` = shown (default), `true` = hidden.",
1887
1887
  "type": "boolean"
1888
1888
  },
1889
1889
  "status": {
@@ -1939,8 +1939,6 @@
1939
1939
  "label": "tabHome",
1940
1940
  "layout": "home",
1941
1941
  "brandName": "Acme",
1942
- "showSearchBar": true,
1943
- "showRecentConversations": true,
1944
1942
  "contentBlockTitle": "Popular articles",
1945
1943
  "contentTags": [
1946
1944
  "popular"
@@ -2362,9 +2360,9 @@
2362
2360
  "description": "Fade the message list at its scroll edges with a soft gradient mask (the fade lifts at the very top/bottom). `true` (default) enables it; `false` shows hard edges.",
2363
2361
  "type": "boolean"
2364
2362
  },
2365
- "enableMessageFeedback": {
2366
- "default": true,
2367
- "description": "Show 👍/👎 feedback controls under each assistant reply. `true` (default) shows them. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`.",
2363
+ "disableMessageFeedback": {
2364
+ "default": false,
2365
+ "description": "Turn OFF the 👍/👎 feedback controls under each assistant reply. Unset/`false` = shown (default), `true` = hidden. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`.",
2368
2366
  "type": "boolean"
2369
2367
  }
2370
2368
  },
@@ -2375,7 +2373,7 @@
2375
2373
  "showToolCalls",
2376
2374
  "showSources",
2377
2375
  "scrollFade",
2378
- "enableMessageFeedback"
2376
+ "disableMessageFeedback"
2379
2377
  ],
2380
2378
  "additionalProperties": {},
2381
2379
  "description": "Conversation behaviour — lifecycle, streaming, and the transcript surface (scroll, feedback).",
@@ -2388,7 +2386,7 @@
2388
2386
  "startMinimized": false,
2389
2387
  "responseMode": "buffered",
2390
2388
  "scrollFade": false,
2391
- "enableMessageFeedback": false
2389
+ "disableMessageFeedback": true
2392
2390
  }
2393
2391
  ]
2394
2392
  },
@@ -3181,16 +3179,16 @@
3181
3179
  ]
3182
3180
  }
3183
3181
  },
3184
- "humanInLoop": {
3185
- "default": true,
3186
- "description": "Render human-in-the-loop tool UI — the inline ask-questions form + approve/reject controls for gated tools. `true` (default) shows them; `false` suppresses the UI (the wire still carries the signals).",
3182
+ "disableHumanInLoop": {
3183
+ "default": false,
3184
+ "description": "Turn OFF the human-in-the-loop tool UI — the inline ask-questions form + approve/reject controls for gated tools. Unset/`false` = shown (default), `true` = suppressed (the wire still carries the signals).",
3187
3185
  "type": "boolean"
3188
3186
  }
3189
3187
  },
3190
3188
  "required": [
3191
3189
  "files",
3192
3190
  "voice",
3193
- "humanInLoop"
3191
+ "disableHumanInLoop"
3194
3192
  ],
3195
3193
  "additionalProperties": {},
3196
3194
  "description": "Capability flags — file upload, voice mode, and the tools the assistant may invoke.",
@@ -3253,8 +3251,8 @@
3253
3251
  "type": "string",
3254
3252
  "maxLength": 80
3255
3253
  },
3256
- "showGreeting": {
3257
- "description": "`home` — show the greeting hero (default true).",
3254
+ "hideGreeting": {
3255
+ "description": "`home` — hide the greeting hero. Unset/`false` = shown (default), `true` = hidden.",
3258
3256
  "type": "boolean"
3259
3257
  },
3260
3258
  "greetingText": {
@@ -3290,12 +3288,12 @@
3290
3288
  "additionalProperties": {}
3291
3289
  }
3292
3290
  },
3293
- "showSearchBar": {
3294
- "description": "`home` — show the 'Search for help' bar (default true).",
3291
+ "hideSearchBar": {
3292
+ "description": "`home` — hide the 'Search for help' bar. Unset/`false` = shown (default), `true` = hidden.",
3295
3293
  "type": "boolean"
3296
3294
  },
3297
- "showRecentConversations": {
3298
- "description": "`home` — show the visitor's most recent conversation card (default true).",
3295
+ "hideRecentConversations": {
3296
+ "description": "`home` — hide the visitor's most recent conversation card. Unset/`false` = shown (default), `true` = hidden.",
3299
3297
  "type": "boolean"
3300
3298
  },
3301
3299
  "status": {
@@ -3351,8 +3349,6 @@
3351
3349
  "label": "tabHome",
3352
3350
  "layout": "home",
3353
3351
  "brandName": "Acme",
3354
- "showSearchBar": true,
3355
- "showRecentConversations": true,
3356
3352
  "contentBlockTitle": "Popular articles",
3357
3353
  "contentTags": [
3358
3354
  "popular"
package/schema.mjs CHANGED
@@ -134,13 +134,13 @@ var behaviorSchema = z4.object({
134
134
  scrollFade: z4.boolean().default(true).describe(
135
135
  "Fade the message list at its scroll edges with a soft gradient mask (the fade lifts at the very top/bottom). `true` (default) enables it; `false` shows hard edges."
136
136
  ),
137
- enableMessageFeedback: z4.boolean().default(true).describe(
138
- "Show \u{1F44D}/\u{1F44E} feedback controls under each assistant reply. `true` (default) shows them. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`."
137
+ disableMessageFeedback: z4.boolean().default(false).describe(
138
+ "Turn OFF the \u{1F44D}/\u{1F44E} feedback controls under each assistant reply. Unset/`false` = shown (default), `true` = hidden. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`."
139
139
  )
140
140
  }).loose().describe("Conversation behaviour \u2014 lifecycle, streaming, and the transcript surface (scroll, feedback).").meta({
141
141
  examples: [
142
142
  { startMinimized: true, responseMode: "streaming" },
143
- { startMinimized: false, responseMode: "buffered", scrollFade: false, enableMessageFeedback: false }
143
+ { startMinimized: false, responseMode: "buffered", scrollFade: false, disableMessageFeedback: true }
144
144
  ]
145
145
  });
146
146
 
@@ -231,8 +231,8 @@ var featureFlagsSchema = z7.object({
231
231
  tools: z7.array(toolRefSchema).max(200).optional().describe(
232
232
  "Backend tools the assistant may invoke. Bare codes (`'tool:send-money'`) or rich refs (`{ code, config }`)."
233
233
  ),
234
- humanInLoop: z7.boolean().default(true).describe(
235
- "Render human-in-the-loop tool UI \u2014 the inline ask-questions form + approve/reject controls for gated tools. `true` (default) shows them; `false` suppresses the UI (the wire still carries the signals)."
234
+ disableHumanInLoop: z7.boolean().default(false).describe(
235
+ "Turn OFF the human-in-the-loop tool UI \u2014 the inline ask-questions form + approve/reject controls for gated tools. Unset/`false` = shown (default), `true` = suppressed (the wire still carries the signals)."
236
236
  )
237
237
  }).loose().describe("Capability flags \u2014 file upload, voice mode, and the tools the assistant may invoke.").meta({
238
238
  examples: [
@@ -551,7 +551,7 @@ var moduleSchema = z14.object({
551
551
  ),
552
552
  // ── `home` layout config (flat feature flags — no block authoring) ──────
553
553
  brandName: z14.string().max(80).optional().describe("`home` \u2014 hero wordmark (e.g. your company name)."),
554
- showGreeting: z14.boolean().optional().describe("`home` \u2014 show the greeting hero (default true)."),
554
+ hideGreeting: z14.boolean().optional().describe("`home` \u2014 hide the greeting hero. Unset/`false` = shown (default), `true` = hidden."),
555
555
  greetingText: z14.string().max(280).optional().describe("`home` \u2014 override the greeting headline (default 'How can we help?'); supports a `{name}` token."),
556
556
  userAvatars: z14.array(
557
557
  z14.object({
@@ -560,8 +560,10 @@ var moduleSchema = z14.object({
560
560
  role: z14.string().max(80).optional()
561
561
  }).loose()
562
562
  ).max(10).optional().describe("`home` \u2014 team/agent avatars shown in the hero."),
563
- showSearchBar: z14.boolean().optional().describe("`home` \u2014 show the 'Search for help' bar (default true)."),
564
- showRecentConversations: z14.boolean().optional().describe("`home` \u2014 show the visitor's most recent conversation card (default true)."),
563
+ hideSearchBar: z14.boolean().optional().describe("`home` \u2014 hide the 'Search for help' bar. Unset/`false` = shown (default), `true` = hidden."),
564
+ hideRecentConversations: z14.boolean().optional().describe(
565
+ "`home` \u2014 hide the visitor's most recent conversation card. Unset/`false` = shown (default), `true` = hidden."
566
+ ),
565
567
  status: z14.object({
566
568
  text: z14.string().min(1).max(120).optional().describe(
567
569
  "`home` \u2014 status line; an i18n key or a literal (resolved via `localizeText`). Omit to use the built-in generic `homeStatus` string (localized, no custom key needed)."
@@ -583,8 +585,6 @@ var modulesSchema = z14.array(moduleSchema).max(4).describe(
583
585
  label: "tabHome",
584
586
  layout: "home",
585
587
  brandName: "Acme",
586
- showSearchBar: true,
587
- showRecentConversations: true,
588
588
  contentBlockTitle: "Popular articles",
589
589
  contentTags: ["popular"]
590
590
  },
package/web-component.mjs CHANGED
@@ -1012,7 +1012,7 @@ var DEFAULT_ATTACHMENTS = {
1012
1012
  var DEFAULT_FEATURES = {
1013
1013
  files: true,
1014
1014
  voice: "local",
1015
- humanInLoop: true
1015
+ disableHumanInLoop: false
1016
1016
  };
1017
1017
  var DEFAULT_FORMS = { list: [], byTrigger: {} };
1018
1018
  var DEFAULT_TRACKING = {
@@ -1049,7 +1049,6 @@ var DEFAULT_HAPTICS = {
1049
1049
  events: void 0
1050
1050
  };
1051
1051
  var DEFAULT_MODULES = [{ label: "tabConversations", layout: "chat" }];
1052
- var DEFAULT_HOME_MODULE = { showSearchBar: true };
1053
1052
 
1054
1053
  // src/core/config/resolve.ts
1055
1054
  function resolveOptions(rawOpts) {
@@ -1089,11 +1088,11 @@ function resolveOptions(rawOpts) {
1089
1088
  showToolCalls: behavior.showToolCalls ?? false,
1090
1089
  showSources: behavior.showSources ?? false,
1091
1090
  scrollFade: behavior.scrollFade ?? true,
1092
- enableMessageFeedback: behavior.enableMessageFeedback ?? true,
1091
+ enableMessageFeedback: !(behavior.disableMessageFeedback ?? false),
1093
1092
  features: {
1094
1093
  files: opts.features?.files ?? DEFAULT_FEATURES.files,
1095
1094
  voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
1096
- humanInLoop: opts.features?.humanInLoop ?? DEFAULT_FEATURES.humanInLoop,
1095
+ disableHumanInLoop: opts.features?.disableHumanInLoop ?? false,
1097
1096
  tools: opts.features?.tools
1098
1097
  },
1099
1098
  forms: resolveForms(opts.forms, locale),
@@ -1207,9 +1206,9 @@ function resolveModules(overrides) {
1207
1206
  if (m.layout === "home") {
1208
1207
  resolved.brandName = m.brandName;
1209
1208
  resolved.greetingText = m.greetingText;
1210
- resolved.showGreeting = m.showGreeting ?? true;
1211
- resolved.showSearchBar = m.showSearchBar ?? DEFAULT_HOME_MODULE.showSearchBar;
1212
- resolved.showRecentConversations = m.showRecentConversations ?? true;
1209
+ resolved.hideGreeting = m.hideGreeting ?? false;
1210
+ resolved.hideSearchBar = m.hideSearchBar ?? false;
1211
+ resolved.hideRecentConversations = m.hideRecentConversations ?? false;
1213
1212
  if (m.userAvatars && m.userAvatars.length > 0) resolved.userAvatars = m.userAvatars;
1214
1213
  if (m.status) resolved.status = m.status;
1215
1214
  resolved.contentBlockTitle = m.contentBlockTitle;
@@ -1419,7 +1418,7 @@ var BEHAVIOR_ATTRS = [
1419
1418
  ["show-tool-calls", "showToolCalls", boolAttr],
1420
1419
  ["show-sources", "showSources", boolAttr],
1421
1420
  ["scroll-fade", "scrollFade", boolAttr],
1422
- ["enable-message-feedback", "enableMessageFeedback", boolAttr]
1421
+ ["disable-message-feedback", "disableMessageFeedback", boolAttr]
1423
1422
  ];
1424
1423
  var I18N_ATTRS = [["locale", "locale"]];
1425
1424
  var ACTION_NAMES = new Set(ACTION_NAME_LITERALS);
@@ -1934,7 +1933,7 @@ function createAuth(opts) {
1934
1933
  }
1935
1934
 
1936
1935
  // src/core/version.ts
1937
- var ELEMENTS_VERSION = true ? "0.59.1" : "0.0.0-dev";
1936
+ var ELEMENTS_VERSION = true ? "0.59.3" : "0.0.0-dev";
1938
1937
  var ELEMENTS_VERSION_PARAM = "_ev";
1939
1938
 
1940
1939
  // src/stream/types.ts
@@ -2201,6 +2200,7 @@ function messageToWireParts(m) {
2201
2200
  var log5 = logger.scope("transport");
2202
2201
  var MAX_RESUME_ATTEMPTS = 3;
2203
2202
  var RESUME_BACKOFF_MS = 400;
2203
+ var POST_FINISH_DRAIN_MS = 5e3;
2204
2204
  var CONTENT_CACHE_TTL_MS = 6e4;
2205
2205
  var CONVERSATIONS_CACHE_TTL_MS = 1e4;
2206
2206
  var MAX_REQUEST_RETRIES = 3;
@@ -2714,6 +2714,7 @@ var AgentTransport = class {
2714
2714
  */
2715
2715
  async *drain(source, seenIds, ctrl) {
2716
2716
  let terminal = false;
2717
+ let watchdog;
2717
2718
  try {
2718
2719
  for await (const evt of source) {
2719
2720
  if (ctrl.signal.aborted) return true;
@@ -2722,12 +2723,17 @@ var AgentTransport = class {
2722
2723
  seenIds.add(evt.eventId);
2723
2724
  }
2724
2725
  yield evt;
2725
- if (evt.chunk.type === "finish" || evt.chunk.type === "error") terminal = true;
2726
+ if (evt.chunk.type === "finish" || evt.chunk.type === "error") {
2727
+ terminal = true;
2728
+ watchdog ?? (watchdog = setTimeout(() => ctrl.abort(), POST_FINISH_DRAIN_MS));
2729
+ }
2726
2730
  }
2727
2731
  } catch (err) {
2728
2732
  if (ctrl.signal.aborted) return true;
2729
2733
  if (err instanceof StreamError && err.status !== void 0) throw err;
2730
2734
  log5.debug("stream segment dropped", { err });
2735
+ } finally {
2736
+ if (watchdog) clearTimeout(watchdog);
2731
2737
  }
2732
2738
  return terminal;
2733
2739
  }
@@ -7553,13 +7559,13 @@ function HomeRoot(props2) {
7553
7559
  const [content, setContent] = useState12([]);
7554
7560
  const tagsKey = config.contentTags?.join(",");
7555
7561
  useEffect11(() => {
7556
- if (!config.showRecentConversations) return;
7562
+ if (config.hideRecentConversations) return;
7557
7563
  let cancelled = false;
7558
7564
  transport.listConversations({ limit: 1 }).then((res) => !cancelled && setRecent(res.conversations?.[0] ?? null)).catch((err) => !cancelled && log13.warn("listConversations (home) failed", { err }));
7559
7565
  return () => {
7560
7566
  cancelled = true;
7561
7567
  };
7562
- }, [transport, config.showRecentConversations]);
7568
+ }, [transport, config.hideRecentConversations]);
7563
7569
  useEffect11(() => {
7564
7570
  if (!config.contentTags?.length) return;
7565
7571
  let cancelled = false;
@@ -7587,13 +7593,13 @@ function HomeRoot(props2) {
7587
7593
  /* @__PURE__ */ jsx32(HeaderActions, { panelProps, variant: "plain" })
7588
7594
  ] })
7589
7595
  ] }),
7590
- config.showGreeting !== false ? /* @__PURE__ */ jsxs26(Fragment7, { children: [
7596
+ !config.hideGreeting ? /* @__PURE__ */ jsxs26(Fragment7, { children: [
7591
7597
  /* @__PURE__ */ jsx32("h1", { class: `${p28}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
7592
7598
  greeting.subtitle ? /* @__PURE__ */ jsx32("p", { class: `${p28}-home-lead`, children: greeting.subtitle }) : null
7593
7599
  ] }) : null
7594
7600
  ] }),
7595
7601
  /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
7596
- config.showSearchBar !== false ? /* @__PURE__ */ jsx32(
7602
+ !config.hideSearchBar ? /* @__PURE__ */ jsx32(
7597
7603
  HomeSearchButton,
7598
7604
  {
7599
7605
  placeholder: strings.homeSearchPlaceholder,
@@ -8746,12 +8752,12 @@ function App({ options, hostElement, bus }) {
8746
8752
  );
8747
8753
  const toolInteraction = useMemo3(
8748
8754
  () => ({
8749
- humanInLoop: options.features.humanInLoop,
8755
+ humanInLoop: !options.features.disableHumanInLoop,
8750
8756
  onResult: handleToolResult,
8751
8757
  onDecision: handleToolDecision,
8752
8758
  onEdit: handleToolEdit
8753
8759
  }),
8754
- [options.features.humanInLoop, handleToolResult, handleToolDecision, handleToolEdit]
8760
+ [options.features.disableHumanInLoop, handleToolResult, handleToolDecision, handleToolEdit]
8755
8761
  );
8756
8762
  const userMessageCount = () => messagesSig.value.reduce((n, m) => n + (m.role === "user" ? 1 : 0), 0);
8757
8763
  const effectiveForms = options.forms.list.length > 0 ? options.forms : remoteForms ?? options.forms;