@helpai/elements 6.9.0 โ†’ 6.10.0

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
@@ -520,6 +520,23 @@ interface PresentationOptions {
520
520
  type PageToolCallStatus = 'completed' | 'failed' | 'interrupted';
521
521
  /** A ๐Ÿ‘/๐Ÿ‘Ž reaction on a rateable (assistant/operator) message; `null` clears a prior choice. */
522
522
  type FeedbackValue = 'up' | 'down' | null;
523
+ /**
524
+ * The kinds of steps a reader may choose to see, folded into one line under the reply: `decided`, it asked a person
525
+ * (a visitor or another member); `auto-decided`, the rules decided it; `unasked`, it ran without asking; `failed`, it
526
+ * failed, whoever decided it. A step has every kind that applies ("auto-decided" and "failed" both, for an approved
527
+ * call that then failed) and shows when any of them is chosen. The reader's own decisions and anything waiting on
528
+ * someone always show.
529
+ */
530
+ declare const STEP_KINDS: readonly ['decided', 'auto-decided', 'unasked', 'failed'];
531
+ type StepKind = (typeof STEP_KINDS)[number];
532
+ /**
533
+ * Where a step came from, as the server marks every call (`toolMetadata.origin`), set once where each family of tools
534
+ * is built: `platform`, help.ai's own tools; `mcp`, an MCP server's (an integration, help.ai's own MCP included);
535
+ * `api`, a call to an API integration; `webmcp`, the page's own tools, run in the visitor's browser (those the site
536
+ * hands the widget and those the browser offers through WebMCP).
537
+ */
538
+ declare const STEP_ORIGINS: readonly ['platform', 'mcp', 'api', 'webmcp'];
539
+ type StepOrigin = (typeof STEP_ORIGINS)[number];
523
540
  /**
524
541
  * What an opened step shows: `none`, nothing (the step line alone, for a business that never shows a visitor's data
525
542
  * back); `values`, its values as quiet label and value lines without ids; `table`, tables of what it ran on (ids
@@ -530,13 +547,15 @@ declare const STEP_DETAILS: readonly ['none', 'values', 'table', 'json', 'table-
530
547
  type StepDetails = (typeof STEP_DETAILS)[number];
531
548
  /** The settings, the same keys on a Deployment (`config.behavior.stepDisplay`) and in a member's Preferences. */
532
549
  interface StepDisplay {
533
- /** Every step appears as one folded line under the reply; off, only the steps that involve the reader do. */
534
- showSteps: boolean;
550
+ /** The origins whose steps may appear (`STEP_ORIGINS`), in any combination. */
551
+ stepsFrom: readonly StepOrigin[];
552
+ /** The kinds of steps that appear (`STEP_KINDS`), in any combination: a step from a chosen origin shows when any of its kinds is chosen. */
553
+ stepsShown: readonly StepKind[];
535
554
  /** What an opened step shows (`STEP_DETAILS`). */
536
555
  stepDetails: StepDetails;
537
556
  /** The system that ran a step follows its name: "Ship an order ยท BC Co. back office". */
538
557
  showStepSystem: boolean;
539
- /** Each approval says who decided it, and steps the rules decided show as steps. */
558
+ /** Each decision someone else or the rules made says who made it. */
540
559
  showDecidedBy: boolean;
541
560
  /** A decided approval folds into the steps line; off, it stays in the reply as a card. */
542
561
  foldApprovals: boolean;
@@ -552,7 +571,7 @@ interface BehaviorOptions {
552
571
  responseMode?: ResponseMode;
553
572
  /** Show the model's reasoning ("thoughts") as a collapsible block. Default `false`. */
554
573
  showReasoning?: boolean;
555
- /** How the AI's steps and approvals show; unset keys take the Simple preset. */
574
+ /** How the AI's steps and approvals show; unset keys take the visitor defaults. */
556
575
  stepDisplay?: Partial<StepDisplay>;
557
576
  /** Show citation sources (web links + document references) in the transcript. Default `false`. */
558
577
  showSources?: boolean;
@@ -944,7 +963,7 @@ interface ResolvedOptions {
944
963
  responseMode: ResponseMode;
945
964
  /** Show reasoning ("thoughts") as a collapsible block. Default `false`. */
946
965
  showReasoning: boolean;
947
- /** How the AI's steps and approvals show: the Deployment's settings over the Simple preset. */
966
+ /** How the AI's steps and approvals show: the Deployment's settings over the visitor defaults. */
948
967
  stepDisplay: StepDisplay;
949
968
  /** Show citation sources (web links + document references) in the transcript. Default `false`. */
950
969
  showSources: boolean;
@@ -1159,7 +1178,18 @@ declare const widgetSettingsSchema: z.ZodObject<{
1159
1178
  }>>;
1160
1179
  showReasoning: z.ZodDefault<z.ZodBoolean>;
1161
1180
  stepDisplay: z.ZodOptional<z.ZodObject<{
1162
- showSteps: z.ZodOptional<z.ZodBoolean>;
1181
+ stepsFrom: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1182
+ api: "api";
1183
+ mcp: "mcp";
1184
+ platform: "platform";
1185
+ webmcp: "webmcp";
1186
+ }>>>;
1187
+ stepsShown: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1188
+ "auto-decided": "auto-decided";
1189
+ decided: "decided";
1190
+ failed: "failed";
1191
+ unasked: "unasked";
1192
+ }>>>;
1163
1193
  stepDetails: z.ZodOptional<z.ZodEnum<{
1164
1194
  json: "json";
1165
1195
  none: "none";
@@ -1450,7 +1480,18 @@ declare const widgetConfigSchema: z.ZodObject<{
1450
1480
  }>>;
1451
1481
  showReasoning: z.ZodDefault<z.ZodBoolean>;
1452
1482
  stepDisplay: z.ZodOptional<z.ZodObject<{
1453
- showSteps: z.ZodOptional<z.ZodBoolean>;
1483
+ stepsFrom: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1484
+ api: "api";
1485
+ mcp: "mcp";
1486
+ platform: "platform";
1487
+ webmcp: "webmcp";
1488
+ }>>>;
1489
+ stepsShown: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1490
+ "auto-decided": "auto-decided";
1491
+ decided: "decided";
1492
+ failed: "failed";
1493
+ unasked: "unasked";
1494
+ }>>>;
1454
1495
  stepDetails: z.ZodOptional<z.ZodEnum<{
1455
1496
  json: "json";
1456
1497
  none: "none";
@@ -1742,7 +1783,18 @@ declare const widgetConfigPartialSchema: z.ZodObject<{
1742
1783
  }>>;
1743
1784
  showReasoning: z.ZodDefault<z.ZodBoolean>;
1744
1785
  stepDisplay: z.ZodOptional<z.ZodObject<{
1745
- showSteps: z.ZodOptional<z.ZodBoolean>;
1786
+ stepsFrom: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1787
+ api: "api";
1788
+ mcp: "mcp";
1789
+ platform: "platform";
1790
+ webmcp: "webmcp";
1791
+ }>>>;
1792
+ stepsShown: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1793
+ "auto-decided": "auto-decided";
1794
+ decided: "decided";
1795
+ failed: "failed";
1796
+ unasked: "unasked";
1797
+ }>>>;
1746
1798
  stepDetails: z.ZodOptional<z.ZodEnum<{
1747
1799
  json: "json";
1748
1800
  none: "none";
@@ -1996,7 +2048,18 @@ declare const widgetSettingsPartialSchema: z.ZodObject<{
1996
2048
  }>>;
1997
2049
  showReasoning: z.ZodDefault<z.ZodBoolean>;
1998
2050
  stepDisplay: z.ZodOptional<z.ZodObject<{
1999
- showSteps: z.ZodOptional<z.ZodBoolean>;
2051
+ stepsFrom: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2052
+ api: "api";
2053
+ mcp: "mcp";
2054
+ platform: "platform";
2055
+ webmcp: "webmcp";
2056
+ }>>>;
2057
+ stepsShown: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2058
+ "auto-decided": "auto-decided";
2059
+ decided: "decided";
2060
+ failed: "failed";
2061
+ unasked: "unasked";
2062
+ }>>>;
2000
2063
  stepDetails: z.ZodOptional<z.ZodEnum<{
2001
2064
  json: "json";
2002
2065
  none: "none";
@@ -2305,7 +2368,18 @@ declare const serverConfigSchema: z.ZodObject<{
2305
2368
  }>>;
2306
2369
  showReasoning: z.ZodDefault<z.ZodBoolean>;
2307
2370
  stepDisplay: z.ZodOptional<z.ZodObject<{
2308
- showSteps: z.ZodOptional<z.ZodBoolean>;
2371
+ stepsFrom: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2372
+ api: "api";
2373
+ mcp: "mcp";
2374
+ platform: "platform";
2375
+ webmcp: "webmcp";
2376
+ }>>>;
2377
+ stepsShown: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2378
+ "auto-decided": "auto-decided";
2379
+ decided: "decided";
2380
+ failed: "failed";
2381
+ unasked: "unasked";
2382
+ }>>>;
2309
2383
  stepDetails: z.ZodOptional<z.ZodEnum<{
2310
2384
  json: "json";
2311
2385
  none: "none";
@@ -2636,7 +2710,18 @@ declare const handshakeResponseSchema: z.ZodObject<{
2636
2710
  }>>;
2637
2711
  showReasoning: z.ZodDefault<z.ZodBoolean>;
2638
2712
  stepDisplay: z.ZodOptional<z.ZodObject<{
2639
- showSteps: z.ZodOptional<z.ZodBoolean>;
2713
+ stepsFrom: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2714
+ api: "api";
2715
+ mcp: "mcp";
2716
+ platform: "platform";
2717
+ webmcp: "webmcp";
2718
+ }>>>;
2719
+ stepsShown: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2720
+ "auto-decided": "auto-decided";
2721
+ decided: "decided";
2722
+ failed: "failed";
2723
+ unasked: "unasked";
2724
+ }>>>;
2640
2725
  stepDetails: z.ZodOptional<z.ZodEnum<{
2641
2726
  json: "json";
2642
2727
  none: "none";